Repository navigation
Expand file tree
/
Copy pathClockEqualTest.java
More file actions
120 lines (101 loc) · 3.1 KB
/
Copy pathClockEqualTest.java
File metadata and controls
120 lines (101 loc) · 3.1 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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
import org.junit.Ignore;
import org.junit.Test;
import static org.assertj.core.api.Assertions.assertThat;
public class ClockEqualTest {
@Ignore("Remove to run test")
@Test
public void clocksWithSameTimeAreEqual() {
assertThat(new Clock(15, 37))
.isEqualTo(new Clock(15, 37));
}
@Ignore("Remove to run test")
@Test
public void clocksAMinuteApartAreNotEqual() {
assertThat(new Clock(15, 36))
.isNotEqualTo(new Clock(15, 37));
}
@Ignore("Remove to run test")
@Test
public void clocksAnHourApartAreNotEqual() {
assertThat(new Clock(14, 37))
.isNotEqualTo(new Clock(15, 37));
}
@Ignore("Remove to run test")
@Test
public void clocksWithHourOverflow() {
assertThat(new Clock(34, 37))
.isEqualTo(new Clock(10, 37));
}
@Ignore("Remove to run test")
@Test
public void clocksWithHourOverflowBySeveralDays() {
assertThat(new Clock(99, 11))
.isEqualTo(new Clock(3, 11));
}
@Ignore("Remove to run test")
@Test
public void clocksWithNegateHour() {
assertThat(new Clock(-2, 40))
.isEqualTo(new Clock(22, 40));
}
@Ignore("Remove to run test")
@Test
public void clocksWithNegativeHourThatWraps() {
assertThat(new Clock(-31, 3))
.isEqualTo(new Clock(17, 3));
}
@Ignore("Remove to run test")
@Test
public void clocksWithNegativeHourThatWrapsMultipleTimes() {
assertThat(new Clock(-83, 49))
.isEqualTo(new Clock(13, 49));
}
@Ignore("Remove to run test")
@Test
public void clocksWithMinuteOverflow() {
assertThat(new Clock(0, 1441))
.isEqualTo(new Clock(0, 1));
}
@Ignore("Remove to run test")
@Test
public void clocksWithMinuteOverflowBySeveralDays() {
assertThat(new Clock(2, 4322))
.isEqualTo(new Clock(2, 2));
}
@Ignore("Remove to run test")
@Test
public void clocksWithNegativeMinutes() {
assertThat(new Clock(3, -20))
.isEqualTo(new Clock(2, 40));
}
@Ignore("Remove to run test")
@Test
public void clocksWithNegativeMinutesThatWraps() {
assertThat(new Clock(5, -1490))
.isEqualTo(new Clock(4, 10));
}
@Ignore("Remove to run test")
@Test
public void clocksWithNegativeMinutesThatWrapsMultipleTimes() {
assertThat(new Clock(6, -4305))
.isEqualTo(new Clock(6, 15));
}
@Ignore("Remove to run test")
@Test
public void clocksWithNegativeHoursAndMinutes() {
assertThat(new Clock(-12, -268))
.isEqualTo(new Clock(7, 32));
}
@Ignore("Remove to run test")
@Test
public void clocksWithNegativeHoursAndMinutesThatWrap() {
assertThat(new Clock(-54, -11513))
.isEqualTo(new Clock(18, 7));
}
@Ignore("Remove to run test")
@Test
public void clocksWithFullClockAndZeroedClockAreEqual() {
assertThat(new Clock(24, 0))
.isEqualTo(new Clock(0, 0));
}
}