|
@@ -1,6 +1,9 @@
|
|
1
|
+import org.junit.Assert;
|
1
|
2
|
import org.junit.Before;
|
2
|
3
|
import org.junit.Test;
|
3
|
4
|
|
|
5
|
+import java.util.regex.Pattern;
|
|
6
|
+
|
4
|
7
|
import static org.junit.Assert.*;
|
5
|
8
|
|
6
|
9
|
public class HamletParserTest {
|
|
@@ -15,17 +18,28 @@ public class HamletParserTest {
|
15
|
18
|
|
16
|
19
|
@Test
|
17
|
20
|
public void testChangeHamletToLeon() {
|
18
|
|
- }
|
19
|
21
|
|
|
22
|
+ }
|
20
|
23
|
@Test
|
21
|
24
|
public void testChangeHoratioToTariq() {
|
22
|
25
|
}
|
23
|
26
|
|
24
|
27
|
@Test
|
25
|
28
|
public void testFindHoratio() {
|
26
|
|
- }
|
|
29
|
+ String findHoratio = "Horatio Kim James, King Author";
|
27
|
30
|
|
|
31
|
+ String expected = "Horatio";
|
|
32
|
+ String actual = HamletParser.findHoratio(findHoratio);
|
|
33
|
+
|
|
34
|
+ Assert.assertEquals(expected,actual);
|
|
35
|
+ }
|
28
|
36
|
@Test
|
29
|
37
|
public void testFindHamlet() {
|
|
38
|
+ String findHamlet = "Hamlet Kim James, King Author";
|
|
39
|
+
|
|
40
|
+ String expected = "Hamlet";
|
|
41
|
+ String actual = HamletParser.findHamlet(findHamlet);
|
|
42
|
+
|
|
43
|
+ Assert.assertEquals(expected,actual);
|
30
|
44
|
}
|
31
|
45
|
}
|