|
|
@@ -17,7 +17,7 @@ public class CryptoSquareTest {
|
|
17
|
17
|
assertEquals(expectedOutput, crypto.getNormalizedPlaintext());
|
|
18
|
18
|
}
|
|
19
|
19
|
|
|
20
|
|
- @Ignore
|
|
|
20
|
+ @Ignore("Remove to run test")
|
|
21
|
21
|
@Test
|
|
22
|
22
|
public void lettersAreLowerCasedDuringNormalization() {
|
|
23
|
23
|
Crypto crypto = new Crypto("WHOA HEY!");
|
|
|
@@ -26,7 +26,7 @@ public class CryptoSquareTest {
|
|
26
|
26
|
assertEquals(expectedOutput, crypto.getNormalizedPlaintext());
|
|
27
|
27
|
}
|
|
28
|
28
|
|
|
29
|
|
- @Ignore
|
|
|
29
|
+ @Ignore("Remove to run test")
|
|
30
|
30
|
@Test
|
|
31
|
31
|
public void numbersAreKeptDuringNormalization() {
|
|
32
|
32
|
Crypto crypto = new Crypto("1, 2, 3, GO!");
|
|
|
@@ -35,7 +35,7 @@ public class CryptoSquareTest {
|
|
35
|
35
|
assertEquals(expectedOutput, crypto.getNormalizedPlaintext());
|
|
36
|
36
|
}
|
|
37
|
37
|
|
|
38
|
|
- @Ignore
|
|
|
38
|
+ @Ignore("Remove to run test")
|
|
39
|
39
|
@Test
|
|
40
|
40
|
public void smallestSquareSizeIs2() {
|
|
41
|
41
|
Crypto crypto = new Crypto("1234");
|
|
|
@@ -44,7 +44,7 @@ public class CryptoSquareTest {
|
|
44
|
44
|
assertEquals(expectedOutput, crypto.getSquareSize());
|
|
45
|
45
|
}
|
|
46
|
46
|
|
|
47
|
|
- @Ignore
|
|
|
47
|
+ @Ignore("Remove to run test")
|
|
48
|
48
|
@Test
|
|
49
|
49
|
public void sizeOfTextWhoseLengthIsPerfectSquareIsItsSquareRoot() {
|
|
50
|
50
|
Crypto crypto = new Crypto("123456789");
|
|
|
@@ -53,7 +53,7 @@ public class CryptoSquareTest {
|
|
53
|
53
|
assertEquals(expectedOutput, crypto.getSquareSize());
|
|
54
|
54
|
}
|
|
55
|
55
|
|
|
56
|
|
- @Ignore
|
|
|
56
|
+ @Ignore("Remove to run test")
|
|
57
|
57
|
@Test
|
|
58
|
58
|
public void sizeOfTextWhoseLengthIsNoPerfectSquareIsNextBiggestSquareRoot() {
|
|
59
|
59
|
Crypto crypto = new Crypto("123456789abc");
|
|
|
@@ -62,7 +62,7 @@ public class CryptoSquareTest {
|
|
62
|
62
|
assertEquals(expectedOutput, crypto.getSquareSize());
|
|
63
|
63
|
}
|
|
64
|
64
|
|
|
65
|
|
- @Ignore
|
|
|
65
|
+ @Ignore("Remove to run test")
|
|
66
|
66
|
@Test
|
|
67
|
67
|
public void sizeIsDeterminedByNormalizedText() {
|
|
68
|
68
|
Crypto crypto = new Crypto("Oh hey, this is nuts!");
|
|
|
@@ -71,7 +71,7 @@ public class CryptoSquareTest {
|
|
71
|
71
|
assertEquals(expectedOutput, crypto.getSquareSize());
|
|
72
|
72
|
}
|
|
73
|
73
|
|
|
74
|
|
- @Ignore
|
|
|
74
|
+ @Ignore("Remove to run test")
|
|
75
|
75
|
@Test
|
|
76
|
76
|
public void segmentsAreSplitBySquareSize() {
|
|
77
|
77
|
Crypto crypto = new Crypto("Never vex thine heart with idle woes");
|
|
|
@@ -80,7 +80,7 @@ public class CryptoSquareTest {
|
|
80
|
80
|
assertEquals(expectedOutput, crypto.getPlaintextSegments());
|
|
81
|
81
|
}
|
|
82
|
82
|
|
|
83
|
|
- @Ignore
|
|
|
83
|
+ @Ignore("Remove to run test")
|
|
84
|
84
|
@Test
|
|
85
|
85
|
public void segmentsAreSplitBySquareSizeUntilTextRunsOut() {
|
|
86
|
86
|
Crypto crypto = new Crypto("ZOMG! ZOMBIES!!!");
|
|
|
@@ -89,7 +89,7 @@ public class CryptoSquareTest {
|
|
89
|
89
|
assertEquals(expectedOutput, crypto.getPlaintextSegments());
|
|
90
|
90
|
}
|
|
91
|
91
|
|
|
92
|
|
- @Ignore
|
|
|
92
|
+ @Ignore("Remove to run test")
|
|
93
|
93
|
@Test
|
|
94
|
94
|
public void cipherTextCombinesTextByColumn() {
|
|
95
|
95
|
Crypto crypto = new Crypto("First, solve the problem. Then, write the code.");
|
|
|
@@ -98,7 +98,7 @@ public class CryptoSquareTest {
|
|
98
|
98
|
assertEquals(expectedOutput, crypto.getCipherText());
|
|
99
|
99
|
}
|
|
100
|
100
|
|
|
101
|
|
- @Ignore
|
|
|
101
|
+ @Ignore("Remove to run test")
|
|
102
|
102
|
@Test
|
|
103
|
103
|
public void cipherTextSkipsCellsWithNoText() {
|
|
104
|
104
|
Crypto crypto = new Crypto("Time is an illusion. Lunchtime doubly so.");
|
|
|
@@ -107,7 +107,7 @@ public class CryptoSquareTest {
|
|
107
|
107
|
assertEquals(expectedOutput, crypto.getCipherText());
|
|
108
|
108
|
}
|
|
109
|
109
|
|
|
110
|
|
- @Ignore
|
|
|
110
|
+ @Ignore("Remove to run test")
|
|
111
|
111
|
@Test
|
|
112
|
112
|
public void normalizedCipherTextIsSplitByHeightOfSquare() {
|
|
113
|
113
|
Crypto crypto = new Crypto("Vampires are people too!");
|
|
|
@@ -116,7 +116,7 @@ public class CryptoSquareTest {
|
|
116
|
116
|
assertEquals(expectedOutput, crypto.getNormalizedCipherText());
|
|
117
|
117
|
}
|
|
118
|
118
|
|
|
119
|
|
- @Ignore
|
|
|
119
|
+ @Ignore("Remove to run test")
|
|
120
|
120
|
@Test
|
|
121
|
121
|
public void normalizedCipherNotExactlyDivisibleBy5SpillsIntoSmallerSegment() {
|
|
122
|
122
|
Crypto crypto = new Crypto("Madness, and then illumination.");
|
|
|
@@ -125,7 +125,7 @@ public class CryptoSquareTest {
|
|
125
|
125
|
assertEquals(expectedOutput, crypto.getNormalizedCipherText());
|
|
126
|
126
|
}
|
|
127
|
127
|
|
|
128
|
|
- @Ignore
|
|
|
128
|
+ @Ignore("Remove to run test")
|
|
129
|
129
|
@Test
|
|
130
|
130
|
public void normalizedCipherIsSplitIntoSegmentsOfCorrectSize() {
|
|
131
|
131
|
Crypto crypto = new Crypto("If man was meant to stay on the ground god would have given us roots");
|
|
|
@@ -134,7 +134,7 @@ public class CryptoSquareTest {
|
|
134
|
134
|
assertEquals(expectedOutput, crypto.getNormalizedCipherText());
|
|
135
|
135
|
}
|
|
136
|
136
|
|
|
137
|
|
- @Ignore
|
|
|
137
|
+ @Ignore("Remove to run test")
|
|
138
|
138
|
@Test
|
|
139
|
139
|
public void normalizedCipherTextIsSplitIntoSegmentsOfCorrectSizeWithPunctuation() {
|
|
140
|
140
|
Crypto crypto = new Crypto("Have a nice day. Feed the dog & chill out!");
|