Skip to content

Commit bd9ba2f

Browse files
committed
Added parameters test name annotation Atbash DecodeTest. Changed variable names to be more descriptive.
1 parent 96449b6 commit bd9ba2f

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

‎exercises/atbash-cipher/src/test/java/AtbashTest.java‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,10 @@ public void test() {
4545

4646
@RunWith(Parameterized.class)
4747
public static class DecodeTest {
48-
private String input;
49-
private String expectedOutput;
48+
private String ciphertext;
49+
private String plaintext;
5050

51-
@Parameters
51+
@Parameters(name = "{index}: expected ciphertext \"{0}\" to decode to plaintext \"{1}\".")
5252
public static Collection<Object[]> data() {
5353
return Arrays.asList(new Object[][] {
5454
{ "vcvix rhn", "exercism" },
@@ -57,15 +57,15 @@ public static Collection<Object[]> data() {
5757
});
5858
}
5959

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;
6363
}
6464

6565
@Ignore
6666
@Test
6767
public void test() {
68-
assertEquals(expectedOutput, Atbash.decode(input));
68+
assertEquals(plaintext, Atbash.decode(ciphertext));
6969
}
7070
}
7171
}

0 commit comments

Comments
 (0)