mirror of
https://github.com/pgpainless/pgpainless.git
synced 2025-09-10 02:39:39 +02:00
Wip: Remove allowNested, add FileUtil
This commit is contained in:
parent
772f69788b
commit
4e83281213
9 changed files with 129 additions and 132 deletions
|
@ -51,18 +51,6 @@ public class ArmorCmdTest {
|
|||
SopCLI.setSopInstance(sop);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void assertAllowNestedIsCalledWhenFlagged() throws SOPGPException.UnsupportedOption {
|
||||
SopCLI.main(new String[] {"armor", "--allow-nested"});
|
||||
verify(armor, times(1)).allowNested();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void assertAllowNestedIsNotCalledByDefault() throws SOPGPException.UnsupportedOption {
|
||||
SopCLI.main(new String[] {"armor"});
|
||||
verify(armor, never()).allowNested();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void assertLabelIsNotCalledByDefault() throws SOPGPException.UnsupportedOption {
|
||||
SopCLI.main(new String[] {"armor"});
|
||||
|
@ -97,14 +85,6 @@ public class ArmorCmdTest {
|
|||
SopCLI.main(new String[] {"armor", "--label", "Sig"});
|
||||
}
|
||||
|
||||
@Test
|
||||
@ExpectSystemExitWithStatus(37)
|
||||
public void ifAllowNestedUnsupportedExit37() throws SOPGPException.UnsupportedOption {
|
||||
when(armor.allowNested()).thenThrow(new SOPGPException.UnsupportedOption("Allowing nested Armor not supported."));
|
||||
|
||||
SopCLI.main(new String[] {"armor", "--allow-nested"});
|
||||
}
|
||||
|
||||
@Test
|
||||
@ExpectSystemExitWithStatus(41)
|
||||
public void ifBadDataExit41() throws SOPGPException.BadData {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue