forked from Zipcoder/aliceandbob.bluej
-
Notifications
You must be signed in to change notification settings - Fork 0
/
AliceAndBobEngineTest.java
63 lines (47 loc) · 2.03 KB
/
AliceAndBobEngineTest.java
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
57
58
59
60
61
62
63
import static org.junit.Assert.*;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
/**
* The test class AliceAndBobEngineTest.
*
* @author (your name)
* @version (a version number or a date)
*/
public class AliceAndBobEngineTest
{
public AliceAndBobEngineTest()
{
}
@Before
public void setUp()
{
}
@After
public void tearDown()
{
}
@Test
public void evaluateAliceOrBobTestAlice(){
AliceAndBobEngine aliceAndBobEngineTest = new AliceAndBobEngine();
assertEquals("Hello Alice", aliceAndBobEngineTest.evaluateAliceOrBob("Alice"));
assertNotEquals("Hello Alice", aliceAndBobEngineTest.evaluateAliceOrBob("Jeff. Jeff the Elephant."));
assertEquals("I DON'T KNOW YOU, YOU ARE SCARY", aliceAndBobEngineTest.evaluateAliceOrBob("Alicia"));
assertNotEquals("I DON'T KNOW YOU, YOU ARE SCARY", aliceAndBobEngineTest.evaluateAliceOrBob("Alice"));
}
@Test
public void evaluateAliceOrBobTestBob(){
AliceAndBobEngine aliceAndBobEngineTest = new AliceAndBobEngine();
assertEquals("Hello Bob", aliceAndBobEngineTest.evaluateAliceOrBob("Bob"));
assertNotEquals("Hello Alice", aliceAndBobEngineTest.evaluateAliceOrBob("Pamela. Pamela the tropical citrus tree."));
assertEquals("I DON'T KNOW YOU, YOU ARE SCARY", aliceAndBobEngineTest.evaluateAliceOrBob("Bobert"));
assertNotEquals("I DON'T KNOW YOU, YOU ARE SCARY", aliceAndBobEngineTest.evaluateAliceOrBob("Bob"));
}
@Test
public void evaluateAliceOrBobTestScary(){
AliceAndBobEngine aliceAndBobEngineTest = new AliceAndBobEngine();
assertNotEquals("I don't know you, you are scary?", aliceAndBobEngineTest.evaluateAliceOrBob("Cynthia"));
assertNotEquals("I don't know you, you are scary!", aliceAndBobEngineTest.evaluateAliceOrBob("Simba"));
assertNotEquals("New method, who dis?", aliceAndBobEngineTest.evaluateAliceOrBob("Luna"));
}
}