Skip to content

Commit 33a65fd

Browse files
Add DisplayName annotations to rail-fence-cipher
1 parent 0541ad3 commit 33a65fd

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

exercises/practice/rail-fence-cipher/src/test/java/RailFenceCipherTest.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import org.junit.jupiter.api.Disabled;
2+
import org.junit.jupiter.api.DisplayName;
23
import org.junit.jupiter.api.Test;
34

45
import static org.assertj.core.api.Assertions.assertThat;
@@ -8,6 +9,7 @@ public class RailFenceCipherTest {
89
private RailFenceCipher railFenceCipher;
910

1011
@Test
12+
@DisplayName("encode with two rails")
1113
public void encodeWithTwoRails() {
1214
railFenceCipher = new RailFenceCipher(2);
1315
assertThat(railFenceCipher.getEncryptedData("XOXOXOXOXOXOXOXOXO"))
@@ -16,6 +18,7 @@ public void encodeWithTwoRails() {
1618

1719
@Disabled("Remove to run test")
1820
@Test
21+
@DisplayName("encode with three rails")
1922
public void encodeWithThreeRails() {
2023
railFenceCipher = new RailFenceCipher(3);
2124
assertThat(railFenceCipher.getEncryptedData("WEAREDISCOVEREDFLEEATONCE"))
@@ -24,6 +27,7 @@ public void encodeWithThreeRails() {
2427

2528
@Disabled("Remove to run test")
2629
@Test
30+
@DisplayName("encode with ending in the middle")
2731
public void encodeWithEndingInTheMiddle() {
2832
railFenceCipher = new RailFenceCipher(4);
2933
assertThat(railFenceCipher.getEncryptedData("EXERCISES"))
@@ -32,6 +36,7 @@ public void encodeWithEndingInTheMiddle() {
3236

3337
@Disabled("Remove to run test")
3438
@Test
39+
@DisplayName("decode with three rails")
3540
public void decodeWithThreeRails() {
3641
railFenceCipher = new RailFenceCipher(3);
3742
assertThat(railFenceCipher.getDecryptedData("TEITELHDVLSNHDTISEIIEA"))
@@ -40,6 +45,7 @@ public void decodeWithThreeRails() {
4045

4146
@Disabled("Remove to run test")
4247
@Test
48+
@DisplayName("decode with five rails")
4349
public void decodeWithFiveRails() {
4450
railFenceCipher = new RailFenceCipher(5);
4551
assertThat(railFenceCipher.getDecryptedData("EIEXMSMESAORIWSCE"))
@@ -48,6 +54,7 @@ public void decodeWithFiveRails() {
4854

4955
@Disabled("Remove to run test")
5056
@Test
57+
@DisplayName("decode with six rails")
5158
public void decodeWithSixRails() {
5259
railFenceCipher = new RailFenceCipher(6);
5360
assertThat(railFenceCipher.getDecryptedData("133714114238148966225439541018335470986172518171757571896261"))

0 commit comments

Comments
 (0)