forked from exercism/java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathClockEqualTest.java
More file actions
99 lines (81 loc) · 2.58 KB
/
ClockEqualTest.java
File metadata and controls
99 lines (81 loc) · 2.58 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
import org.junit.Ignore;
import org.junit.Test;
import static org.junit.Assert.assertNotEquals;
import static org.junit.Assert.assertEquals;
public class ClockEqualTest {
@Ignore("Remove to run test")
@Test
public void clocksWithSameTimeAreEqual() {
assertEquals(new Clock(15, 37), new Clock(15, 37));
}
@Ignore("Remove to run test")
@Test
public void clocksAMinuteApartAreNotEqual() {
assertNotEquals(new Clock(15, 36), new Clock(15, 37));
}
@Ignore("Remove to run test")
@Test
public void clocksAnHourApartAreNotEqual() {
assertNotEquals(new Clock(14, 37), new Clock(15, 37));
}
@Ignore("Remove to run test")
@Test
public void clocksWithHourOverflow() {
assertEquals(new Clock(10, 37), new Clock(34, 37));
}
@Ignore("Remove to run test")
@Test
public void clocksWithHourOverflowBySeveralDays() {
assertEquals(new Clock(3, 11), new Clock(99, 11));
}
@Ignore("Remove to run test")
@Test
public void clocksWithNegateHour() {
assertEquals(new Clock(22, 40), new Clock(-2, 40));
}
@Ignore("Remove to run test")
@Test
public void clocksWithNegativeHourThatWraps() {
assertEquals(new Clock(17, 3), new Clock(-31, 3));
}
@Ignore("Remove to run test")
@Test
public void clocksWithNegativeHourThatWrapsMultipleTimes() {
assertEquals(new Clock(13, 49), new Clock(-83, 49));
}
@Ignore("Remove to run test")
@Test
public void clocksWithMinuteOverflow() {
assertEquals(new Clock(0, 1), new Clock(0, 1441));
}
@Ignore("Remove to run test")
@Test
public void clocksWithMinuteOverflowBySeveralDays() {
assertEquals(new Clock(2, 2), new Clock(2, 4322));
}
@Ignore("Remove to run test")
@Test
public void clocksWithNegativeMinutes() {
assertEquals(new Clock(2, 40), new Clock(3, -20));
}
@Ignore("Remove to run test")
@Test
public void clocksWithNegativeMinutesThatWraps() {
assertEquals(new Clock(4, 10), new Clock(5, -1490));
}
@Ignore("Remove to run test")
@Test
public void clocksWithNegativeMinutesThatWrapsMultipleTimes() {
assertEquals(new Clock(6, 15), new Clock(6, -4305));
}
@Ignore("Remove to run test")
@Test
public void clocksWithNegativeHoursAndMinutes() {
assertEquals(new Clock(7, 32), new Clock(-12, -268));
}
@Ignore("Remove to run test")
@Test
public void clocksWithNegativeHoursAndMinutesThatWrap() {
assertEquals(new Clock(18, 7), new Clock(-54, -11513));
}
}