|
@@ -16,17 +16,27 @@ public class HamletParserTest {
|
16
|
16
|
@Test
|
17
|
17
|
public void testChangeHamletToLeon() {
|
18
|
18
|
String hToL = "hamlet";
|
|
19
|
+ String expected = "leon";
|
|
20
|
+ String fakeName = "tariq";
|
19
|
21
|
|
|
22
|
+ String actual = hamletParser.changeNameLeon(hToL);
|
20
|
23
|
|
21
|
|
- assertNotNull(hamletParser.changeNameTariq(hToL));
|
|
24
|
+ assertTrue(actual.contains(expected));
|
|
25
|
+ assertFalse(actual.contains(fakeName));
|
22
|
26
|
}
|
23
|
27
|
|
24
|
28
|
@Test
|
25
|
29
|
public void testChangeHoratioToTariq() {
|
26
|
|
- String hToL = "horatio";
|
|
30
|
+ String hToT = "horatio";
|
|
31
|
+ String expected = "tariq";
|
|
32
|
+ String fakeName = "lil bobby tables";
|
27
|
33
|
|
28
|
34
|
|
29
|
|
- assertNotNull(hamletParser.changeNameTariq(hToL));
|
|
35
|
+ String actual = hamletParser.changeNameTariq(hToT);
|
|
36
|
+
|
|
37
|
+ assertTrue(actual.contains(expected));
|
|
38
|
+ assertFalse(actual.contains(fakeName));
|
|
39
|
+
|
30
|
40
|
}
|
31
|
41
|
|
32
|
42
|
@Test
|