Repository navigation
Expand file tree
/
Copy pathClockEqualTest.java
More file actions
98 lines (81 loc) · 2.32 KB
/
Copy pathClockEqualTest.java
File metadata and controls
98 lines (81 loc) · 2.32 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
import org.junit.Ignore;
import org.junit.Test;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
public class ClockEqualTest {
@Ignore
@Test
public void clocksWithSameTimeAreEqual() {
assertTrue(new Clock(15, 37).equals(new Clock(15, 37)));
}
@Ignore
@Test
public void clocksAMinuteApartAreNotEqual() {
assertFalse(new Clock(15, 36).equals(new Clock(15, 37)));
}
@Ignore
@Test
public void clocksAnHourApartAreNotEqual() {
assertFalse(new Clock(14, 37).equals(new Clock(15, 37)));
}
@Ignore
@Test
public void clocksWithHourOverflow() {
assertTrue(new Clock(10, 37).equals(new Clock(34, 37)));
}
@Ignore
@Test
public void clocksWithHourOverflowBySeveralDays() {
assertTrue(new Clock(3, 11).equals(new Clock(99, 11)));
}
@Ignore
@Test
public void clocksWithNegateHour() {
assertTrue(new Clock(22, 40).equals(new Clock(-2, 40)));
}
@Ignore
@Test
public void clocksWithNegativeHourThatWraps() {
assertTrue(new Clock(17, 3).equals(new Clock(-31, 3)));
}
@Ignore
@Test
public void clocksWithNegativeHourThatWrapsMultipleTimes() {
assertTrue(new Clock(13, 49).equals(new Clock(-83, 49)));
}
@Ignore
@Test
public void clocksWithMinuteOverflow() {
assertTrue(new Clock(0, 1).equals(new Clock(0, 1441)));
}
@Ignore
@Test
public void clocksWithMinuteOverflowBySeveralDays() {
assertTrue(new Clock(2, 2).equals(new Clock(2, 4322)));
}
@Ignore
@Test
public void clocksWithNegativeMinutes() {
assertTrue(new Clock(2, 40).equals(new Clock(3, -20)));
}
@Ignore
@Test
public void clocksWithNegativeMinutesThatWraps() {
assertTrue(new Clock(4, 10).equals(new Clock(5, -1490)));
}
@Ignore
@Test
public void clocksWithNegativeMinutesThatWrapsMultipleTimes() {
assertTrue(new Clock(6, 15).equals(new Clock(6, -4305)));
}
@Ignore
@Test
public void clocksWithNegativeHoursAndMinutes() {
assertTrue(new Clock(7, 32).equals(new Clock(-12, -268)));
}
@Ignore
@Test
public void clocksWithNegativeHoursAndMinutesThatWrap() {
assertTrue(new Clock(18, 7).equals(new Clock(-54, -11513)));
}
}