Updated tests
This commit is contained in:
@@ -415,7 +415,7 @@ public class TestAutokey{
|
|||||||
String correctOutput = "XYZ";
|
String correctOutput = "XYZ";
|
||||||
cipher.setKeyword(keyword);
|
cipher.setKeyword(keyword);
|
||||||
String output = cipher.getKeyword();
|
String output = cipher.getKeyword();
|
||||||
assertEquals("Vigenere failed keyword with whitespace.", correctOutput, output);
|
assertEquals("Autokey failed keyword with whitespace.", correctOutput, output);
|
||||||
|
|
||||||
|
|
||||||
//Test keyword with symbol
|
//Test keyword with symbol
|
||||||
@@ -423,7 +423,7 @@ public class TestAutokey{
|
|||||||
correctOutput = "XYZ";
|
correctOutput = "XYZ";
|
||||||
cipher.setKeyword(keyword);
|
cipher.setKeyword(keyword);
|
||||||
output = cipher.getKeyword();
|
output = cipher.getKeyword();
|
||||||
assertEquals("Vigenere failed keyword with symbol.", correctOutput, output);
|
assertEquals("Autokey failed keyword with symbol.", correctOutput, output);
|
||||||
|
|
||||||
|
|
||||||
//Test keyword with mixed case
|
//Test keyword with mixed case
|
||||||
@@ -431,13 +431,13 @@ public class TestAutokey{
|
|||||||
correctOutput = "XYZ";
|
correctOutput = "XYZ";
|
||||||
cipher.setKeyword(keyword);
|
cipher.setKeyword(keyword);
|
||||||
output = cipher.getKeyword();
|
output = cipher.getKeyword();
|
||||||
assertEquals("Vigenere failed keyword with mixed case.", correctOutput, output);
|
assertEquals("Autokey failed keyword with mixed case.", correctOutput, output);
|
||||||
|
|
||||||
//Test keyword with whitespace, symbol and keyword
|
//Test keyword with whitespace, symbol and keyword
|
||||||
keyword = "x Y%z ";
|
keyword = "x Y%z ";
|
||||||
correctOutput = "XYZ";
|
correctOutput = "XYZ";
|
||||||
cipher.setKeyword(keyword);
|
cipher.setKeyword(keyword);
|
||||||
output = cipher.getKeyword();
|
output = cipher.getKeyword();
|
||||||
assertEquals("Vigenere failed keyword with space, symbol, and mixed case.", correctOutput, output);
|
assertEquals("Autokey failed keyword with space, symbol, and mixed case.", correctOutput, output);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user