Atbash chaptial transform started

This commit is contained in:
2021-12-27 12:21:33 -05:00
parent 6c40edbdfe
commit 11c06657a5
4 changed files with 37 additions and 15 deletions

View File

@@ -1,7 +1,7 @@
//CipherStreamJava/src/main/java/mattrixwv/CipherStreamJava/TestAtbash.java
//Matthew Ellison
// Created: 07-25-21
//Modified: 07-25-21
//Modified: 12-25-21
//These are the tests for the Atbash class
package mattrixwv.CipherStreamJava;
@@ -18,13 +18,13 @@ public class TestAtbash{
//Test 1
String input = "zyx";
String correctOutput = "ABC";
String correctOutput = "abc";
String output = cipher.decode(input);
assertEquals("Atbash Decoding failed the first test", correctOutput, output);
//Test 2
input = "GSV JFRXP YILDM ULC QFNKH LEVI - GSV OZAB WLT";
correctOutput = "THEQUICKBROWNFOXJUMPSOVERTHELAZYDOG";
correctOutput = "thequickbrownfoxjumpsoverthelazydog";
output = cipher.decode(input);
assertEquals("Atbash Decoding failed the second test", correctOutput, output);
}
@@ -34,13 +34,13 @@ public class TestAtbash{
//Test 1
String input = "abc";
String correctOutput = "ZYX";
String correctOutput = "zyx";
String output = cipher.encode(input);
assertEquals("Atbash Encoding failed the first test", correctOutput, output);
//Test 2
input = "The quick brown fox jumps over - the lazy dog";
correctOutput = "GSVJFRXPYILDMULCQFNKHLEVIGSVOZABWLT";
correctOutput = "gsvjfrxpyildmulcqfnkhlevigsvozabwlt";
output = cipher.encode(input);
assertEquals("Atbash Encoding failed the second test", correctOutput, output);
}