|
@@ -1,3 +1,4 @@
|
|
1
|
+import org.junit.Assert;
|
1
|
2
|
import org.junit.Before;
|
2
|
3
|
import org.junit.Test;
|
3
|
4
|
|
|
@@ -15,17 +16,31 @@ public class HamletParserTest {
|
15
|
16
|
|
16
|
17
|
@Test
|
17
|
18
|
public void testChangeHamletToLeon() {
|
|
19
|
+ HamletParser hamletParser = new HamletParser();
|
|
20
|
+ hamletParser.changeToName("Hamlet","Leon");
|
|
21
|
+
|
|
22
|
+ Assert.assertTrue(hamletParser.findName("Leon"));
|
18
|
23
|
}
|
19
|
24
|
|
20
|
25
|
@Test
|
21
|
26
|
public void testChangeHoratioToTariq() {
|
|
27
|
+ HamletParser hamletParser = new HamletParser();
|
|
28
|
+ hamletParser.changeToName("Horatio","Tariq");
|
|
29
|
+
|
|
30
|
+ Assert.assertTrue(hamletParser.findName("Tariq"));
|
22
|
31
|
}
|
23
|
32
|
|
24
|
33
|
@Test
|
25
|
34
|
public void testFindHoratio() {
|
|
35
|
+ HamletParser hamletParser = new HamletParser();
|
|
36
|
+
|
|
37
|
+ Assert.assertTrue(hamletParser.findName("Horatio"));
|
26
|
38
|
}
|
27
|
39
|
|
28
|
40
|
@Test
|
29
|
41
|
public void testFindHamlet() {
|
|
42
|
+ HamletParser hamletParser = new HamletParser();
|
|
43
|
+
|
|
44
|
+ Assert.assertTrue(hamletParser.findName("Hamlet"));
|
30
|
45
|
}
|
31
|
46
|
}
|