|
|
@@ -32,6 +32,15 @@ public class BobTest {
|
|
32
|
32
|
|
|
33
|
33
|
@Ignore("Remove to run test")
|
|
34
|
34
|
@Test
|
|
|
35
|
+ public void shoutingGibberish() {
|
|
|
36
|
+ assertEquals(
|
|
|
37
|
+ "Whoa, chill out!",
|
|
|
38
|
+ bob.hey("FCECDFCAAB")
|
|
|
39
|
+ );
|
|
|
40
|
+ }
|
|
|
41
|
+
|
|
|
42
|
+ @Ignore("Remove to run test")
|
|
|
43
|
+ @Test
|
|
35
|
44
|
public void askingAQuestion() {
|
|
36
|
45
|
assertEquals(
|
|
37
|
46
|
"Sure.",
|
|
|
@@ -50,6 +59,15 @@ public class BobTest {
|
|
50
|
59
|
|
|
51
|
60
|
@Ignore("Remove to run test")
|
|
52
|
61
|
@Test
|
|
|
62
|
+ public void askingGibberish() {
|
|
|
63
|
+ assertEquals(
|
|
|
64
|
+ "Sure.",
|
|
|
65
|
+ bob.hey("fffbbcbeab?")
|
|
|
66
|
+ );
|
|
|
67
|
+ }
|
|
|
68
|
+
|
|
|
69
|
+ @Ignore("Remove to run test")
|
|
|
70
|
+ @Test
|
|
53
|
71
|
public void talkingForcefully() {
|
|
54
|
72
|
assertEquals(
|
|
55
|
73
|
"Whatever.",
|
|
|
@@ -69,7 +87,7 @@ public class BobTest {
|
|
69
|
87
|
@Test
|
|
70
|
88
|
public void forcefulQuestions() {
|
|
71
|
89
|
assertEquals(
|
|
72
|
|
- "Whoa, chill out!", bob.hey("WHAT THE HELL WERE YOU THINKING?")
|
|
|
90
|
+ "Calm down, I know what I'm doing!", bob.hey("WHAT THE HELL WERE YOU THINKING?")
|
|
73
|
91
|
);
|
|
74
|
92
|
}
|
|
75
|
93
|
|
|
|
@@ -107,33 +125,25 @@ public class BobTest {
|
|
107
|
125
|
|
|
108
|
126
|
@Ignore("Remove to run test")
|
|
109
|
127
|
@Test
|
|
110
|
|
- public void shoutingWithUmlauts() {
|
|
111
|
|
- assertEquals(
|
|
112
|
|
- "Whoa, chill out!", bob.hey("\u00dcML\u00c4\u00dcTS!")
|
|
113
|
|
- );
|
|
114
|
|
- }
|
|
115
|
|
-
|
|
116
|
|
- @Ignore("Remove to run test")
|
|
117
|
|
- @Test
|
|
118
|
|
- public void calmlySpeakingWithUmlauts() {
|
|
|
128
|
+ public void shoutingWithNoExclamationMark() {
|
|
119
|
129
|
assertEquals(
|
|
120
|
|
- "Whatever.", bob.hey("\u00dcML\u00e4\u00dcTS!")
|
|
|
130
|
+ "Whoa, chill out!", bob.hey("I HATE YOU")
|
|
121
|
131
|
);
|
|
122
|
132
|
}
|
|
123
|
133
|
|
|
124
|
134
|
@Ignore("Remove to run test")
|
|
125
|
135
|
@Test
|
|
126
|
|
- public void shoutingWithNoExclamationMark() {
|
|
|
136
|
+ public void statementContainingQuestionMark() {
|
|
127
|
137
|
assertEquals(
|
|
128
|
|
- "Whoa, chill out!", bob.hey("I HATE YOU")
|
|
|
138
|
+ "Whatever.", bob.hey("Ending with ? means a question.")
|
|
129
|
139
|
);
|
|
130
|
140
|
}
|
|
131
|
141
|
|
|
132
|
142
|
@Ignore("Remove to run test")
|
|
133
|
143
|
@Test
|
|
134
|
|
- public void statementContainingQuestionMark() {
|
|
|
144
|
+ public void nonLettersWithQuestion() {
|
|
135
|
145
|
assertEquals(
|
|
136
|
|
- "Whatever.", bob.hey("Ending with ? means a question.")
|
|
|
146
|
+ "Sure.", bob.hey(":) ?")
|
|
137
|
147
|
);
|
|
138
|
148
|
}
|
|
139
|
149
|
|
|
|
@@ -160,4 +170,58 @@ public class BobTest {
|
|
160
|
170
|
"Fine. Be that way!", bob.hey(" ")
|
|
161
|
171
|
);
|
|
162
|
172
|
}
|
|
|
173
|
+
|
|
|
174
|
+ @Ignore("Remove to run test")
|
|
|
175
|
+ @Test
|
|
|
176
|
+ public void alternateSilence() {
|
|
|
177
|
+ assertEquals(
|
|
|
178
|
+ "Fine. Be that way!", bob.hey("\t\t\t\t\t\t\t\t\t\t")
|
|
|
179
|
+ );
|
|
|
180
|
+ }
|
|
|
181
|
+
|
|
|
182
|
+ @Ignore("Remove to run test")
|
|
|
183
|
+ @Test
|
|
|
184
|
+ public void multipleLineQuestion() {
|
|
|
185
|
+ assertEquals(
|
|
|
186
|
+ "Whatever.",
|
|
|
187
|
+ bob.hey("\nDoes this cryogenic chamber make me look fat?\nno")
|
|
|
188
|
+ );
|
|
|
189
|
+ }
|
|
|
190
|
+
|
|
|
191
|
+ @Ignore("Remove to run test")
|
|
|
192
|
+ @Test
|
|
|
193
|
+ public void startingWithWhitespace() {
|
|
|
194
|
+ assertEquals(
|
|
|
195
|
+ "Whatever.",
|
|
|
196
|
+ bob.hey(" hmmmmmmm...")
|
|
|
197
|
+ );
|
|
|
198
|
+ }
|
|
|
199
|
+
|
|
|
200
|
+ @Ignore("Remove to run test")
|
|
|
201
|
+ @Test
|
|
|
202
|
+ public void endingWithWhiteSpace() {
|
|
|
203
|
+ assertEquals(
|
|
|
204
|
+ "Sure.",
|
|
|
205
|
+ bob.hey("Okay if like my spacebar quite a bit? ")
|
|
|
206
|
+ );
|
|
|
207
|
+ }
|
|
|
208
|
+
|
|
|
209
|
+ @Ignore("Remove to run test")
|
|
|
210
|
+ @Test
|
|
|
211
|
+ public void otherWhiteSpace() {
|
|
|
212
|
+ assertEquals(
|
|
|
213
|
+ "Fine. Be that way!",
|
|
|
214
|
+ bob.hey("\n\r \t")
|
|
|
215
|
+ );
|
|
|
216
|
+ }
|
|
|
217
|
+
|
|
|
218
|
+ @Ignore("Remove to run test")
|
|
|
219
|
+ @Test
|
|
|
220
|
+ public void nonQuestionEndingWithWhiteSpace() {
|
|
|
221
|
+ assertEquals(
|
|
|
222
|
+ "Whatever.",
|
|
|
223
|
+ bob.hey("This is a statement ending with whitespace ")
|
|
|
224
|
+ );
|
|
|
225
|
+ }
|
|
|
226
|
+
|
|
163
|
227
|
}
|