Update test coverage

This commit is contained in:
2023-06-30 21:56:09 -04:00
parent 3f5e44a27f
commit 7f7b5204e3
2 changed files with 32 additions and 1 deletions

View File

@@ -204,7 +204,7 @@ public class TestTrifid{
}
@Test
public void testSetFillIn_nonPrinting(){
public void testSetFillIn_nonPrintingLow(){
assertThrows(InvalidCharacterException.class, () -> {
cipher.setFillIn('\0');
});
@@ -213,6 +213,16 @@ public class TestTrifid{
verify(logger, never()).debug(eq("Setting fill in {}"), anyChar());
}
@Test
public void testSetFill_nonPrintingHigh(){
assertThrows(InvalidCharacterException.class, () -> {
cipher.setFillIn((char)127);
});
assertEquals('+', cipher.fillIn);
verify(logger, never()).debug(eq("Setting fill in {}"), anyChar());
}
@Test
public void testSetFillIn_letter(){
assertThrows(InvalidCharacterException.class, () -> {