-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathTigerTest.java
37 lines (30 loc) · 869 Bytes
/
TigerTest.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
import static org.junit.Assert.*;
import org.junit.Test;
public class TigerTest {
@Test
public void testMeeple() throws Exception {
Tiger m = new Tiger();
assertEquals(-1, m.owner);
assertTrue(m.location.isEqual(new Location(-1,-1)));
assertEquals(TigerStatusEnum.onNone, m.status);
}
@Test
public void testMeepleInt() throws Exception {
Tiger m = new Tiger(1, 1);
assertEquals(1, m.owner);
assertTrue(m.location.isEqual(new Location(-1,-1)));
assertEquals(TigerStatusEnum.onNone, m.status);
}
@Test
public void testUpdateLocation() throws Exception {
Tiger m = new Tiger(1, 1);
m.updateLocation(new Location(1,1));
assertTrue(m.location.isEqual(new Location(1,1)));
}
@Test
public void testUpdateStatus() throws Exception {
Tiger m = new Tiger(1, 1);
m.setStatus(1);
assertEquals(TigerStatusEnum.onTrail, m.status);
}
}