-
Notifications
You must be signed in to change notification settings - Fork 0
/
CabinTest.java
48 lines (36 loc) · 1.08 KB
/
CabinTest.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
import static org.junit.jupiter.api.Assertions.*;
import org.junit.jupiter.api.Test;
/**
* @author Bryan Munoz-Romero
*/
public class CabinTest {
private Cabin cabin;
@Test
public void testNegativeNumOfCamps() { // Bryan Munoz-Romero
cabin = new Cabin(-3);
assertFalse(cabin.getCabinNum() < 0);
}
@Test
public void testSetScheduleToNullCamps() { // Bryan Munoz-Romero
cabin = new Cabin(3);
cabin.setSchedule(null);
assertNull(cabin.getSchedule().toString());
}
@Test
public void testSetCounselorToNull() { // Bryan Munoz-Romero
cabin = new Cabin(5);
cabin.setCounselor(null);
assertNull(cabin.getCounselor().toString());
}
@Test
public void testSetCamperToNull() { // Bryan Munoz-Romero
cabin = new Cabin(5);
cabin.addCamper(null);
assertNull(cabin.getCampers().toString());
}
@Test
public void testPrintScheduleDayToNeg() { // Bryan Munoz-Romero
cabin = new Cabin(5);
assertNull(cabin.printScheduleDay(-1, -1, -1));
}
}