|
@@ -18,27 +18,36 @@ public class HamletParserTest {
|
18
|
18
|
|
19
|
19
|
@Test
|
20
|
20
|
public void testChangeHamletToLeon() {
|
|
21
|
+ String text = hamletText;
|
|
22
|
+ String str = "Hamlet";
|
|
23
|
+
|
|
24
|
+ String actual = hamletParser.changeToLeon(str);
|
|
25
|
+ Assert.assertTrue(actual.contains("Leon"));
|
21
|
26
|
|
22
|
27
|
}
|
23
|
28
|
@Test
|
24
|
29
|
public void testChangeHoratioToTariq() {
|
|
30
|
+ String text = hamletText;
|
|
31
|
+ String str = "Horatio";
|
|
32
|
+ String actual = hamletParser.changeToTariq(str);
|
|
33
|
+ Assert.assertTrue(actual.contains("Tariq"));
|
25
|
34
|
}
|
26
|
35
|
|
27
|
36
|
@Test
|
28
|
37
|
public void testFindHoratio() {
|
29
|
|
- String Sentence = hamletText;
|
|
38
|
+ String text = hamletText;
|
30
|
39
|
|
31
|
40
|
String expected = "Horatio";
|
32
|
|
- String actual = HamletParser.findHoratio(Sentence, expected);
|
|
41
|
+ String actual = HamletParser.findHoratio(text, expected);
|
33
|
42
|
|
34
|
43
|
Assert.assertEquals(expected,actual);
|
35
|
44
|
}
|
36
|
45
|
@Test
|
37
|
46
|
public void testFindHamlet() {
|
38
|
|
- String Sentence = hamletText;
|
|
47
|
+ String text = hamletText;
|
39
|
48
|
|
40
|
49
|
String expected = "Hamlet";
|
41
|
|
- String actual = HamletParser.findHamlet(Sentence, expected);
|
|
50
|
+ String actual = HamletParser.findHamlet(text, expected);
|
42
|
51
|
|
43
|
52
|
Assert.assertEquals(expected,actual);
|
44
|
53
|
}
|