-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTimeTest.java
More file actions
49 lines (38 loc) · 1.15 KB
/
Copy pathTimeTest.java
File metadata and controls
49 lines (38 loc) · 1.15 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
import static org.junit.jupiter.api.Assertions.*;
import java.nio.file.PathMatcher;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
class TimeTest {
//assertEquals(val1,val2)
//assertFalse(val)
//assertTrue(val)
//assertSame(val1,val2)
//assertNotSame(val1,val2)
//assertNull(val)
//assertNotNull(val)
@Test
public void checkAMHourTest() {
// AM
assertEquals(true, Time.checkAMHour(4));
// PM
assertEquals(false, Time.checkAMHour(15));
// AM
assertEquals(true, Time.checkAMHour(24));
}
@Test
public void checkBelow10Test() {
assertEquals(true, Time.checkBelow10(4));
assertEquals(false, Time.checkBelow10(10));
assertEquals(false, Time.checkBelow10(15));
}
@Test
public void makeTimeStringTest() {
assertEquals("01:15", Time.makeTimeString(1, 15));
assertEquals("03:45", Time.makeTimeString(15, 45));
assertEquals("12:05", Time.makeTimeString(24, 05));
assertEquals("12:10", Time.makeTimeString(0, 10));
}
}