Преглед изворни кода

Merge pull request #508 from mraediaz/issue-445

Clock : add hint to @Ignore annotations
FridaTveit пре 9 година
родитељ
комит
fec5cd541a

+ 16
- 16
exercises/clock/src/test/java/ClockAddTest.java Прегледај датотеку

@@ -5,7 +5,7 @@ import static org.junit.Assert.assertEquals;
5 5
 
6 6
 public class ClockAddTest {
7 7
 
8
-    @Ignore
8
+    @Ignore("Remove to run test")
9 9
     @Test
10 10
     public void addMinutes() {
11 11
         Clock clock = new Clock(10, 0);
@@ -13,7 +13,7 @@ public class ClockAddTest {
13 13
         assertEquals("10:03", clock.toString());
14 14
     }
15 15
 
16
-    @Ignore
16
+    @Ignore("Remove to run test")
17 17
     @Test
18 18
     public void addNoMinutes() {
19 19
         Clock clock = new Clock(6, 41);
@@ -21,7 +21,7 @@ public class ClockAddTest {
21 21
         assertEquals("06:41", clock.toString());
22 22
     }
23 23
 
24
-    @Ignore
24
+    @Ignore("Remove to run test")
25 25
     @Test
26 26
     public void addToNextHour() {
27 27
         Clock clock = new Clock(0, 45);
@@ -29,7 +29,7 @@ public class ClockAddTest {
29 29
         assertEquals("01:25", clock.toString());
30 30
     }
31 31
 
32
-    @Ignore
32
+    @Ignore("Remove to run test")
33 33
     @Test
34 34
     public void addMoreThanOneHour() {
35 35
         Clock clock = new Clock(10, 0);
@@ -37,7 +37,7 @@ public class ClockAddTest {
37 37
         assertEquals("11:01", clock.toString());
38 38
     }
39 39
 
40
-    @Ignore
40
+    @Ignore("Remove to run test")
41 41
     @Test
42 42
     public void addMoreThanTwoHoursWithCarry() {
43 43
         Clock clock = new Clock(0, 45);
@@ -45,7 +45,7 @@ public class ClockAddTest {
45 45
         assertEquals("03:25", clock.toString());
46 46
     }
47 47
 
48
-    @Ignore
48
+    @Ignore("Remove to run test")
49 49
     @Test
50 50
     public void addAcrossMidnight() {
51 51
         Clock clock = new Clock(23, 59);
@@ -53,7 +53,7 @@ public class ClockAddTest {
53 53
         assertEquals("00:01", clock.toString());
54 54
     }
55 55
 
56
-    @Ignore
56
+    @Ignore("Remove to run test")
57 57
     @Test
58 58
     public void addMoreThanOneDay() {
59 59
         Clock clock = new Clock(5, 32);
@@ -61,7 +61,7 @@ public class ClockAddTest {
61 61
         assertEquals("06:32", clock.toString());
62 62
     }
63 63
 
64
-    @Ignore
64
+    @Ignore("Remove to run test")
65 65
     @Test
66 66
     public void addMoreThanTwoDays() {
67 67
         Clock clock = new Clock(1, 1);
@@ -69,7 +69,7 @@ public class ClockAddTest {
69 69
         assertEquals("11:21", clock.toString());
70 70
     }
71 71
 
72
-    @Ignore
72
+    @Ignore("Remove to run test")
73 73
     @Test
74 74
     public void subtractMinutes() {
75 75
         Clock clock = new Clock(10, 3);
@@ -77,7 +77,7 @@ public class ClockAddTest {
77 77
         assertEquals("10:00", clock.toString());
78 78
     }
79 79
 
80
-    @Ignore
80
+    @Ignore("Remove to run test")
81 81
     @Test
82 82
     public void subtractToPreviousHour() {
83 83
         Clock clock = new Clock(10, 3);
@@ -85,7 +85,7 @@ public class ClockAddTest {
85 85
         assertEquals("09:33", clock.toString());
86 86
     }
87 87
 
88
-    @Ignore
88
+    @Ignore("Remove to run test")
89 89
     @Test
90 90
     public void subtractMoreThanAnHour() {
91 91
         Clock clock = new Clock(10, 3);
@@ -93,7 +93,7 @@ public class ClockAddTest {
93 93
         assertEquals("08:53", clock.toString());
94 94
     }
95 95
 
96
-    @Ignore
96
+    @Ignore("Remove to run test")
97 97
     @Test
98 98
     public void subtractAcrossMidnight() {
99 99
         Clock clock = new Clock(0, 3);
@@ -101,7 +101,7 @@ public class ClockAddTest {
101 101
         assertEquals("23:59", clock.toString());
102 102
     }
103 103
 
104
-    @Ignore
104
+    @Ignore("Remove to run test")
105 105
     @Test
106 106
     public void subtractMoreThanTwoHours() {
107 107
         Clock clock = new Clock(0, 0);
@@ -109,7 +109,7 @@ public class ClockAddTest {
109 109
         assertEquals("21:20", clock.toString());
110 110
     }
111 111
 
112
-    @Ignore
112
+    @Ignore("Remove to run test")
113 113
     @Test
114 114
     public void subtractMoreThanTwoHoursWithBorrow() {
115 115
         Clock clock = new Clock(6, 15);
@@ -117,7 +117,7 @@ public class ClockAddTest {
117 117
         assertEquals("03:35", clock.toString());
118 118
     }
119 119
 
120
-    @Ignore
120
+    @Ignore("Remove to run test")
121 121
     @Test
122 122
     public void subtractMoreThanOneDay() {
123 123
         Clock clock = new Clock(5, 32);
@@ -125,7 +125,7 @@ public class ClockAddTest {
125 125
         assertEquals("04:32", clock.toString());
126 126
     }
127 127
 
128
-    @Ignore
128
+    @Ignore("Remove to run test")
129 129
     @Test
130 130
     public void subtractMoreThanTwoDays() {
131 131
         Clock clock = new Clock(2, 20);

+ 18
- 18
exercises/clock/src/test/java/ClockCreationTest.java Прегледај датотеку

@@ -10,109 +10,109 @@ public class ClockCreationTest {
10 10
         assertEquals("08:00", new Clock(8, 0).toString());
11 11
     }
12 12
 
13
-    @Ignore
13
+    @Ignore("Remove to run test")
14 14
     @Test
15 15
     public void canPrintTimeWithMinutes() {
16 16
         assertEquals("11:09", new Clock(11, 9).toString());
17 17
     }
18 18
 
19
-    @Ignore
19
+    @Ignore("Remove to run test")
20 20
     @Test
21 21
     public void midnightPrintsAsZero() {
22 22
         assertEquals("00:00", new Clock(24, 0).toString());
23 23
     }
24 24
 
25
-    @Ignore
25
+    @Ignore("Remove to run test")
26 26
     @Test
27 27
     public void hourRollsOver() {
28 28
         assertEquals("01:00", new Clock(25, 0).toString());
29 29
     }
30 30
 
31
-    @Ignore
31
+    @Ignore("Remove to run test")
32 32
     @Test
33 33
     public void hourRollsOverContinuously() {
34 34
         assertEquals("04:00", new Clock(100, 0).toString());
35 35
     }
36 36
 
37
-    @Ignore
37
+    @Ignore("Remove to run test")
38 38
     @Test
39 39
     public void sixtyMinutesIsNextHour() {
40 40
         assertEquals("02:00", new Clock(1, 60).toString());
41 41
     }
42 42
 
43
-    @Ignore
43
+    @Ignore("Remove to run test")
44 44
     @Test
45 45
     public void minutesRollOver() {
46 46
         assertEquals("02:40", new Clock(0, 160).toString());
47 47
     }
48 48
 
49
-    @Ignore
49
+    @Ignore("Remove to run test")
50 50
     @Test
51 51
     public void minutesRollOverContinuously() {
52 52
         assertEquals("04:43", new Clock(0, 1723).toString());
53 53
     }
54 54
 
55
-    @Ignore
55
+    @Ignore("Remove to run test")
56 56
     @Test
57 57
     public void hourAndMinutesRollOver() {
58 58
         assertEquals("03:40", new Clock(25, 160).toString());
59 59
     }
60 60
 
61
-    @Ignore
61
+    @Ignore("Remove to run test")
62 62
     @Test
63 63
     public void hourAndMinutesRollOverContinuously() {
64 64
         assertEquals("11:01", new Clock(201, 3001).toString());
65 65
     }
66 66
 
67
-    @Ignore
67
+    @Ignore("Remove to run test")
68 68
     @Test
69 69
     public void hourAndMinutesRollOverToExactlyMidnight() {
70 70
         assertEquals("00:00", new Clock(72, 8640).toString());
71 71
     }
72 72
 
73
-    @Ignore
73
+    @Ignore("Remove to run test")
74 74
     @Test
75 75
     public void negativeHour() {
76 76
         assertEquals("23:15", new Clock(-1, 15).toString());
77 77
     }
78 78
 
79
-    @Ignore
79
+    @Ignore("Remove to run test")
80 80
     @Test
81 81
     public void negativeHourRollsOver() {
82 82
         assertEquals("23:00", new Clock(-25, 0).toString());
83 83
     }
84 84
 
85
-    @Ignore
85
+    @Ignore("Remove to run test")
86 86
     @Test
87 87
     public void negativeHourRollsOverContinuously() {
88 88
         assertEquals("05:00", new Clock(-91, 0).toString());
89 89
     }
90 90
 
91
-    @Ignore
91
+    @Ignore("Remove to run test")
92 92
     @Test
93 93
     public void negativeMinutes() {
94 94
         assertEquals("00:20", new Clock(1, -40).toString());
95 95
     }
96 96
 
97
-    @Ignore
97
+    @Ignore("Remove to run test")
98 98
     @Test
99 99
     public void negativeMinutesRollOver() {
100 100
         assertEquals("22:20", new Clock(1, -160).toString());
101 101
     }
102 102
 
103
-    @Ignore
103
+    @Ignore("Remove to run test")
104 104
     @Test
105 105
     public void negativeMinutesRollOverContinuously() {
106 106
         assertEquals("16:40", new Clock(1, -4820).toString());
107 107
     }
108 108
 
109
-    @Ignore
109
+    @Ignore("Remove to run test")
110 110
     @Test
111 111
     public void negativeHourAndMinutesBothRollOver() {
112 112
         assertEquals("20:20", new Clock(-25, -160).toString());
113 113
     }
114 114
 
115
-    @Ignore
115
+    @Ignore("Remove to run test")
116 116
     @Test
117 117
     public void negativeHourAndMinutesBothRollOverContinuously() {
118 118
         assertEquals("22:10", new Clock(-121, -5810).toString());

+ 15
- 15
exercises/clock/src/test/java/ClockEqualTest.java Прегледај датотеку

@@ -6,91 +6,91 @@ import static org.junit.Assert.assertTrue;
6 6
 
7 7
 public class ClockEqualTest {
8 8
 
9
-    @Ignore
9
+    @Ignore("Remove to run test")
10 10
     @Test
11 11
     public void clocksWithSameTimeAreEqual() {
12 12
         assertTrue(new Clock(15, 37).equals(new Clock(15, 37)));
13 13
     }
14 14
 
15
-    @Ignore
15
+    @Ignore("Remove to run test")
16 16
     @Test
17 17
     public void clocksAMinuteApartAreNotEqual() {
18 18
         assertFalse(new Clock(15, 36).equals(new Clock(15, 37)));
19 19
     }
20 20
 
21
-    @Ignore
21
+    @Ignore("Remove to run test")
22 22
     @Test
23 23
     public void clocksAnHourApartAreNotEqual() {
24 24
         assertFalse(new Clock(14, 37).equals(new Clock(15, 37)));
25 25
     }
26 26
 
27
-    @Ignore
27
+    @Ignore("Remove to run test")
28 28
     @Test
29 29
     public void clocksWithHourOverflow() {
30 30
         assertTrue(new Clock(10, 37).equals(new Clock(34, 37)));
31 31
     }
32 32
 
33
-    @Ignore
33
+    @Ignore("Remove to run test")
34 34
     @Test
35 35
     public void clocksWithHourOverflowBySeveralDays() {
36 36
         assertTrue(new Clock(3, 11).equals(new Clock(99, 11)));
37 37
     }
38 38
 
39
-    @Ignore
39
+    @Ignore("Remove to run test")
40 40
     @Test
41 41
     public void clocksWithNegateHour() {
42 42
         assertTrue(new Clock(22, 40).equals(new Clock(-2, 40)));
43 43
     }
44 44
 
45
-    @Ignore
45
+    @Ignore("Remove to run test")
46 46
     @Test
47 47
     public void clocksWithNegativeHourThatWraps() {
48 48
         assertTrue(new Clock(17, 3).equals(new Clock(-31, 3)));
49 49
     }
50 50
 
51
-    @Ignore
51
+    @Ignore("Remove to run test")
52 52
     @Test
53 53
     public void clocksWithNegativeHourThatWrapsMultipleTimes() {
54 54
         assertTrue(new Clock(13, 49).equals(new Clock(-83, 49)));
55 55
     }
56 56
 
57
-    @Ignore
57
+    @Ignore("Remove to run test")
58 58
     @Test
59 59
     public void clocksWithMinuteOverflow() {
60 60
         assertTrue(new Clock(0, 1).equals(new Clock(0, 1441)));
61 61
     }
62 62
 
63
-    @Ignore
63
+    @Ignore("Remove to run test")
64 64
     @Test
65 65
     public void clocksWithMinuteOverflowBySeveralDays() {
66 66
         assertTrue(new Clock(2, 2).equals(new Clock(2, 4322)));
67 67
     }
68 68
 
69
-    @Ignore
69
+    @Ignore("Remove to run test")
70 70
     @Test
71 71
     public void clocksWithNegativeMinutes() {
72 72
         assertTrue(new Clock(2, 40).equals(new Clock(3, -20)));
73 73
     }
74 74
 
75
-    @Ignore
75
+    @Ignore("Remove to run test")
76 76
     @Test
77 77
     public void clocksWithNegativeMinutesThatWraps() {
78 78
         assertTrue(new Clock(4, 10).equals(new Clock(5, -1490)));
79 79
     }
80 80
 
81
-    @Ignore
81
+    @Ignore("Remove to run test")
82 82
     @Test
83 83
     public void clocksWithNegativeMinutesThatWrapsMultipleTimes() {
84 84
         assertTrue(new Clock(6, 15).equals(new Clock(6, -4305)));
85 85
     }
86 86
 
87
-    @Ignore
87
+    @Ignore("Remove to run test")
88 88
     @Test
89 89
     public void clocksWithNegativeHoursAndMinutes() {
90 90
         assertTrue(new Clock(7, 32).equals(new Clock(-12, -268)));
91 91
     }
92 92
 
93
-    @Ignore
93
+    @Ignore("Remove to run test")
94 94
     @Test
95 95
     public void clocksWithNegativeHoursAndMinutesThatWrap() {
96 96
         assertTrue(new Clock(18, 7).equals(new Clock(-54, -11513)));