Browse Source

testSetup

Khalil Malik Saboor 6 years ago
parent
commit
d440fa9831
1 changed files with 13 additions and 4 deletions
  1. 13
    4
      src/test/java/HamletParserTest.java

+ 13
- 4
src/test/java/HamletParserTest.java View File

18
 
18
 
19
     @Test
19
     @Test
20
     public void testChangeHamletToLeon() {
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
     @Test
28
     @Test
24
     public void testChangeHoratioToTariq() {
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
     @Test
36
     @Test
28
     public void testFindHoratio() {
37
     public void testFindHoratio() {
29
-        String Sentence = hamletText;
38
+        String text = hamletText;
30
 
39
 
31
         String expected = "Horatio";
40
         String expected = "Horatio";
32
-        String actual = HamletParser.findHoratio(Sentence, expected);
41
+        String actual = HamletParser.findHoratio(text, expected);
33
 
42
 
34
         Assert.assertEquals(expected,actual);
43
         Assert.assertEquals(expected,actual);
35
     }
44
     }
36
     @Test
45
     @Test
37
     public void testFindHamlet() {
46
     public void testFindHamlet() {
38
-        String Sentence = hamletText;
47
+        String text = hamletText;
39
 
48
 
40
         String expected = "Hamlet";
49
         String expected = "Hamlet";
41
-        String actual = HamletParser.findHamlet(Sentence, expected);
50
+        String actual = HamletParser.findHamlet(text, expected);
42
 
51
 
43
         Assert.assertEquals(expected,actual);
52
         Assert.assertEquals(expected,actual);
44
     }
53
     }