|
|
@@ -45,10 +45,10 @@ public class AtbashTest {
|
|
45
|
45
|
|
|
46
|
46
|
@RunWith(Parameterized.class)
|
|
47
|
47
|
public static class DecodeTest {
|
|
48
|
|
- private String input;
|
|
49
|
|
- private String expectedOutput;
|
|
|
48
|
+ private String ciphertext;
|
|
|
49
|
+ private String plaintext;
|
|
50
|
50
|
|
|
51
|
|
- @Parameters
|
|
|
51
|
+ @Parameters(name = "{index}: expected ciphertext \"{0}\" to decode to plaintext \"{1}\".")
|
|
52
|
52
|
public static Collection<Object[]> data() {
|
|
53
|
53
|
return Arrays.asList(new Object[][] {
|
|
54
|
54
|
{ "vcvix rhn", "exercism" },
|
|
|
@@ -57,15 +57,15 @@ public class AtbashTest {
|
|
57
|
57
|
});
|
|
58
|
58
|
}
|
|
59
|
59
|
|
|
60
|
|
- public DecodeTest(String input, String expectedOutput) {
|
|
61
|
|
- this.input = input;
|
|
62
|
|
- this.expectedOutput = expectedOutput;
|
|
|
60
|
+ public DecodeTest(String ciphertext, String plaintext) {
|
|
|
61
|
+ this.ciphertext = ciphertext;
|
|
|
62
|
+ this.plaintext = plaintext;
|
|
63
|
63
|
}
|
|
64
|
64
|
|
|
65
|
65
|
@Ignore
|
|
66
|
66
|
@Test
|
|
67
|
67
|
public void test() {
|
|
68
|
|
- assertEquals(expectedOutput, Atbash.decode(input));
|
|
|
68
|
+ assertEquals(plaintext, Atbash.decode(ciphertext));
|
|
69
|
69
|
}
|
|
70
|
70
|
}
|
|
71
|
71
|
}
|