|
@@ -15,17 +15,47 @@ public class HamletParserTest {
|
15
|
15
|
|
16
|
16
|
@Test
|
17
|
17
|
public void testChangeHamletToLeon() {
|
|
18
|
+ String leon = hamletParser.changeHamletToLeon("Hamlet", "Leon");
|
|
19
|
+
|
|
20
|
+ int expected = hamletParser.findWord(hamletText , "Hamlet");
|
|
21
|
+ int actual = hamletParser.findWord(leon , "Hamlet");
|
|
22
|
+
|
|
23
|
+ System.out.println(leon);
|
|
24
|
+ // System.out.println(hamletText);
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+ assertEquals(expected, actual);
|
18
|
29
|
}
|
19
|
30
|
|
20
|
31
|
@Test
|
21
|
32
|
public void testChangeHoratioToTariq() {
|
|
33
|
+ String leon = hamletParser.changeHamletToLeon("Horatio", "Tariq");
|
|
34
|
+
|
|
35
|
+ int expected = hamletParser.findWord(hamletText , "Horatio");
|
|
36
|
+ int actual = hamletParser.findWord(leon , "Tariq");
|
|
37
|
+
|
|
38
|
+ System.out.println(leon);
|
|
39
|
+ // System.out.println(hamletText);
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+ assertEquals(expected, actual);
|
22
|
44
|
}
|
23
|
45
|
|
24
|
46
|
@Test
|
25
|
47
|
public void testFindHoratio() {
|
|
48
|
+ int expected = 158;
|
|
49
|
+ int actual = hamletParser.findWord(hamletText,"Horatio");
|
|
50
|
+
|
|
51
|
+ assertEquals(expected, actual);
|
26
|
52
|
}
|
27
|
53
|
|
28
|
54
|
@Test
|
29
|
55
|
public void testFindHamlet() {
|
|
56
|
+ int expected = 472;
|
|
57
|
+ int actual = hamletParser.findWord(hamletText,"Hamlet");
|
|
58
|
+
|
|
59
|
+ assertEquals(expected, actual);
|
30
|
60
|
}
|
31
|
61
|
}
|