-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathContestantInfoTest.java
More file actions
41 lines (38 loc) · 968 Bytes
/
ContestantInfoTest.java
File metadata and controls
41 lines (38 loc) · 968 Bytes
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
/**
* Lab 8
*
* Test suite for the ContestantInfo class.
*
* @author Stephen
* @version 2018-03-12
*
*/
public class ContestantInfoTest
{
/**
* The ContestantInfo instance to test.
*/
private static ContestantInfo info;
/**
* Creates a ContestantInfo instance for testing.
*/
public static void initialize() throws AssertException
{
info = new ContestantInfo(Region.SOUTH, HandChoice.ROCK);
}
/**
* Tests the ContestantInfo constructor.
*/
public void contestantInfoConstructorTest() throws AssertException
{
Assert.assertEquals(Region.SOUTH, info.getRegion());
Assert.assertEquals(HandChoice.ROCK, info.getChoice());
}
/**
* Tests that ContestantInfo.toString() returns the expected value.
*/
public void contestantInfoToStringTest() throws AssertException
{
Assert.assertEquals("contestant from south throwing rock", info.toString());
}
}