-
Notifications
You must be signed in to change notification settings - Fork 42
Expand file tree
/
Copy pathHamletParserTest.java
More file actions
56 lines (45 loc) · 1.28 KB
/
HamletParserTest.java
File metadata and controls
56 lines (45 loc) · 1.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import static org.junit.Assert.*;
public class HamletParserTest {
private String hamletText;
private HamletParser hamletParser;
@Before
public void setUp() {
this.hamletParser = new HamletParser();
this.hamletText = hamletParser.getHamletData();
}
@Test
public void testChangeHamletToLeon() {
//Action
String actual = hamletParser.changeHamletToLeon();
System.out.println(actual);
//Assert
Assert.assertFalse(actual.contains("Hamlet"));
Assert.assertFalse(actual.contains("hamlet"));
}
@Test
public void testChangeHoratioToTariq() {
//Action
String actual = hamletParser.changeHoratioToTariq();
System.out.println(actual);
//Assert
Assert.assertFalse(actual.contains("Horatio"));
Assert.assertFalse(actual.contains("horatio"));
}
@Test
public void testFindHoratio() {
//Action
boolean actual = hamletParser.findHoratio();
//Assert
Assert.assertTrue(actual);
}
@Test
public void testFindHamlet() {
//Action
boolean actual = hamletParser.findHamlet();
//
Assert.assertTrue(actual);
}
}