1- import org .junit .Test ;
21import org .junit .Ignore ;
2+ import org .junit .Test ;
33import org .junit .experimental .runners .Enclosed ;
44import org .junit .runner .RunWith ;
55import org .junit .runners .Parameterized ;
@@ -20,14 +20,14 @@ public static class EncodeTest {
2020
2121 @ Parameters (name = "{index}: expected plaintext \" {0}\" to encode to ciphertext \" {1}\" ." )
2222 public static Collection <Object []> data () {
23- return Arrays .asList (new Object [][] {
24- { "no" , "ml" },
25- { "yes" , "bvh" },
26- { "OMG" , "lnt" },
27- { "mindblowingly" , "nrmwy oldrm tob" },
28- { "Testing, 1 2 3, testing." , "gvhgr mt123 gvhgr mt" },
29- { "Truth is fiction." , "gifgs rhurx grlm" },
30- { "The quick brown fox jumps over the lazy dog." , "gsvjf rxpyi ldmul cqfnk hlevi gsvoz abwlt" }
23+ return Arrays .asList (new Object [][]{
24+ {"no" , "ml" },
25+ {"yes" , "bvh" },
26+ {"OMG" , "lnt" },
27+ {"mindblowingly" , "nrmwy oldrm tob" },
28+ {"Testing, 1 2 3, testing." , "gvhgr mt123 gvhgr mt" },
29+ {"Truth is fiction." , "gifgs rhurx grlm" },
30+ {"The quick brown fox jumps over the lazy dog." , "gsvjf rxpyi ldmul cqfnk hlevi gsvoz abwlt" }
3131 });
3232 }
3333
@@ -37,9 +37,9 @@ public EncodeTest(String plaintext, String ciphertext) {
3737 }
3838
3939
40- @ Test
40+ @ Test
4141 public void test () {
42- assertEquals (ciphertext , Atbash .encode (plaintext ));
42+ assertEquals (ciphertext , new Atbash () .encode (plaintext ));
4343 }
4444 }
4545
@@ -50,11 +50,11 @@ public static class DecodeTest {
5050
5151 @ Parameters (name = "{index}: expected ciphertext \" {0}\" to decode to plaintext \" {1}\" ." )
5252 public static Collection <Object []> data () {
53- return Arrays .asList (new Object [][] {
54- { "vcvix rhn" , "exercism" },
55- { "zmlyh gzxov rhlug vmzhg vkkrm thglm v" , "anobstacleisoftenasteppingstone" },
56- { "gvhgr mt123 gvhgr mt" , "testing123testing" },
57- { "gsvjf rxpyi ldmul cqfnk hlevi gsvoz abwlt" , "thequickbrownfoxjumpsoverthelazydog" }
53+ return Arrays .asList (new Object [][]{
54+ {"vcvix rhn" , "exercism" },
55+ {"zmlyh gzxov rhlug vmzhg vkkrm thglm v" , "anobstacleisoftenasteppingstone" },
56+ {"gvhgr mt123 gvhgr mt" , "testing123testing" },
57+ {"gsvjf rxpyi ldmul cqfnk hlevi gsvoz abwlt" , "thequickbrownfoxjumpsoverthelazydog" }
5858 });
5959 }
6060
@@ -64,9 +64,9 @@ public DecodeTest(String ciphertext, String plaintext) {
6464 }
6565
6666 @ Ignore
67- @ Test
67+ @ Test
6868 public void test () {
69- assertEquals (plaintext , Atbash .decode (ciphertext ));
69+ assertEquals (plaintext , new Atbash () .decode (ciphertext ));
7070 }
7171 }
7272}
0 commit comments