Browse Source

Merge pull request #481 from morrme/ignorelsp

largest-series-product: add hint to @Ignore annotations
FridaTveit 9 years ago
parent
commit
d45ec1a097

+ 17
- 17
exercises/largest-series-product/src/test/java/LargestSeriesProductCalculatorTest.java View File

24
         assertEquals(expectedProduct, actualProduct);
24
         assertEquals(expectedProduct, actualProduct);
25
     }
25
     }
26
 
26
 
27
-    @Ignore
27
+    @Ignore("Remove to run test")
28
     @Test
28
     @Test
29
     public void testCorrectlyCalculatesLargestProductOfLengthTwoWithNumbersNotInOrder() {
29
     public void testCorrectlyCalculatesLargestProductOfLengthTwoWithNumbersNotInOrder() {
30
         final LargestSeriesProductCalculator calculator = new LargestSeriesProductCalculator("576802143");
30
         final LargestSeriesProductCalculator calculator = new LargestSeriesProductCalculator("576802143");
35
         assertEquals(expectedProduct, actualProduct);
35
         assertEquals(expectedProduct, actualProduct);
36
     }
36
     }
37
 
37
 
38
-    @Ignore
38
+    @Ignore("Remove to run test")
39
     @Test
39
     @Test
40
     public void testCorrectlyCalculatesLargestProductWhenSeriesLengthEqualsStringToSearchLength() {
40
     public void testCorrectlyCalculatesLargestProductWhenSeriesLengthEqualsStringToSearchLength() {
41
         final LargestSeriesProductCalculator calculator = new LargestSeriesProductCalculator("29");
41
         final LargestSeriesProductCalculator calculator = new LargestSeriesProductCalculator("29");
46
         assertEquals(expectedProduct, actualProduct);
46
         assertEquals(expectedProduct, actualProduct);
47
     }
47
     }
48
 
48
 
49
-    @Ignore
49
+    @Ignore("Remove to run test")
50
     @Test
50
     @Test
51
     public void testCorrectlyCalculatesLargestProductOfLengthThreeWithNumbersInOrder() {
51
     public void testCorrectlyCalculatesLargestProductOfLengthThreeWithNumbersInOrder() {
52
         final LargestSeriesProductCalculator calculator = new LargestSeriesProductCalculator("0123456789");
52
         final LargestSeriesProductCalculator calculator = new LargestSeriesProductCalculator("0123456789");
57
         assertEquals(expectedProduct, actualProduct);
57
         assertEquals(expectedProduct, actualProduct);
58
     }
58
     }
59
 
59
 
60
-    @Ignore
60
+    @Ignore("Remove to run test")
61
     @Test
61
     @Test
62
     public void testCorrectlyCalculatesLargestProductOfLengthThreeWithNumbersNotInOrder() {
62
     public void testCorrectlyCalculatesLargestProductOfLengthThreeWithNumbersNotInOrder() {
63
         final LargestSeriesProductCalculator calculator = new LargestSeriesProductCalculator("1027839564");
63
         final LargestSeriesProductCalculator calculator = new LargestSeriesProductCalculator("1027839564");
68
         assertEquals(expectedProduct, actualProduct);
68
         assertEquals(expectedProduct, actualProduct);
69
     }
69
     }
70
 
70
 
71
-    @Ignore
71
+    @Ignore("Remove to run test")
72
     @Test
72
     @Test
73
     public void testCorrectlyCalculatesLargestProductOfLengthFiveWithNumbersInOrder() {
73
     public void testCorrectlyCalculatesLargestProductOfLengthFiveWithNumbersInOrder() {
74
         final LargestSeriesProductCalculator calculator = new LargestSeriesProductCalculator("0123456789");
74
         final LargestSeriesProductCalculator calculator = new LargestSeriesProductCalculator("0123456789");
79
         assertEquals(expectedProduct, actualProduct);
79
         assertEquals(expectedProduct, actualProduct);
80
     }
80
     }
81
 
81
 
82
-    @Ignore
82
+    @Ignore("Remove to run test")
83
     @Test
83
     @Test
84
     public void testCorrectlyCalculatesLargestProductInLongStringToSearchV1() {
84
     public void testCorrectlyCalculatesLargestProductInLongStringToSearchV1() {
85
         final LargestSeriesProductCalculator calculator
85
         final LargestSeriesProductCalculator calculator
92
         assertEquals(expectedProduct, actualProduct);
92
         assertEquals(expectedProduct, actualProduct);
93
     }
93
     }
94
 
94
 
95
-    @Ignore
95
+    @Ignore("Remove to run test")
96
     @Test
96
     @Test
97
     public void testCorrectlyCalculatesLargestProductInLongStringToSearchV2() {
97
     public void testCorrectlyCalculatesLargestProductInLongStringToSearchV2() {
98
         final LargestSeriesProductCalculator calculator
98
         final LargestSeriesProductCalculator calculator
105
         assertEquals(expectedProduct, actualProduct);
105
         assertEquals(expectedProduct, actualProduct);
106
     }
106
     }
107
 
107
 
108
-    @Ignore
108
+    @Ignore("Remove to run test")
109
     @Test
109
     @Test
110
     public void testCorrectlyCalculatesLargestProductInLongStringToSearchFromProjectEuler() {
110
     public void testCorrectlyCalculatesLargestProductInLongStringToSearchFromProjectEuler() {
111
         final LargestSeriesProductCalculator calculator
111
         final LargestSeriesProductCalculator calculator
118
         assertEquals(expectedProduct, actualProduct);
118
         assertEquals(expectedProduct, actualProduct);
119
     }
119
     }
120
 
120
 
121
-    @Ignore
121
+    @Ignore("Remove to run test")
122
     @Test
122
     @Test
123
     public void testCorrectlyCalculatesLargestProductOfZeroIfAllDigitsAreZeroes() {
123
     public void testCorrectlyCalculatesLargestProductOfZeroIfAllDigitsAreZeroes() {
124
         final LargestSeriesProductCalculator calculator = new LargestSeriesProductCalculator("0000");
124
         final LargestSeriesProductCalculator calculator = new LargestSeriesProductCalculator("0000");
129
         assertEquals(expectedProduct, actualProduct);
129
         assertEquals(expectedProduct, actualProduct);
130
     }
130
     }
131
 
131
 
132
-    @Ignore
132
+    @Ignore("Remove to run test")
133
     @Test
133
     @Test
134
     public void testCorrectlyCalculatesLargestProductOfZeroIfAllSeriesOfGivenLengthContainZero() {
134
     public void testCorrectlyCalculatesLargestProductOfZeroIfAllSeriesOfGivenLengthContainZero() {
135
         final LargestSeriesProductCalculator calculator = new LargestSeriesProductCalculator("99099");
135
         final LargestSeriesProductCalculator calculator = new LargestSeriesProductCalculator("99099");
140
         assertEquals(expectedProduct, actualProduct);
140
         assertEquals(expectedProduct, actualProduct);
141
     }
141
     }
142
 
142
 
143
-    @Ignore
143
+    @Ignore("Remove to run test")
144
     @Test
144
     @Test
145
     public void testSeriesLengthLongerThanLengthOfStringToTestIsRejected() {
145
     public void testSeriesLengthLongerThanLengthOfStringToTestIsRejected() {
146
         final LargestSeriesProductCalculator calculator = new LargestSeriesProductCalculator("123");
146
         final LargestSeriesProductCalculator calculator = new LargestSeriesProductCalculator("123");
152
         calculator.calculateLargestProductForSeriesLength(4);
152
         calculator.calculateLargestProductForSeriesLength(4);
153
     }
153
     }
154
 
154
 
155
-    @Ignore
155
+    @Ignore("Remove to run test")
156
     @Test
156
     @Test
157
     public void testCorrectlyCalculatesLargestProductOfLength0ForEmptyStringToSearch() {
157
     public void testCorrectlyCalculatesLargestProductOfLength0ForEmptyStringToSearch() {
158
         final LargestSeriesProductCalculator calculator = new LargestSeriesProductCalculator("");
158
         final LargestSeriesProductCalculator calculator = new LargestSeriesProductCalculator("");
163
         assertEquals(expectedProduct, actualProduct);
163
         assertEquals(expectedProduct, actualProduct);
164
     }
164
     }
165
 
165
 
166
-    @Ignore
166
+    @Ignore("Remove to run test")
167
     @Test
167
     @Test
168
     public void testCorrectlyCalculatesLargestProductOfLength0ForNonEmptyStringToSearch() {
168
     public void testCorrectlyCalculatesLargestProductOfLength0ForNonEmptyStringToSearch() {
169
         final LargestSeriesProductCalculator calculator = new LargestSeriesProductCalculator("123");
169
         final LargestSeriesProductCalculator calculator = new LargestSeriesProductCalculator("123");
174
         assertEquals(expectedProduct, actualProduct);
174
         assertEquals(expectedProduct, actualProduct);
175
     }
175
     }
176
 
176
 
177
-    @Ignore
177
+    @Ignore("Remove to run test")
178
     @Test
178
     @Test
179
     public void testEmptyStringToSearchAndSeriesOfNonZeroLengthIsRejected() {
179
     public void testEmptyStringToSearchAndSeriesOfNonZeroLengthIsRejected() {
180
         final LargestSeriesProductCalculator calculator = new LargestSeriesProductCalculator("");
180
         final LargestSeriesProductCalculator calculator = new LargestSeriesProductCalculator("");
186
         calculator.calculateLargestProductForSeriesLength(1);
186
         calculator.calculateLargestProductForSeriesLength(1);
187
     }
187
     }
188
 
188
 
189
-    @Ignore
189
+    @Ignore("Remove to run test")
190
     @Test
190
     @Test
191
     public void testStringToSearchContainingNonDigitCharacterIsRejected() {
191
     public void testStringToSearchContainingNonDigitCharacterIsRejected() {
192
         expectedException.expect(IllegalArgumentException.class);
192
         expectedException.expect(IllegalArgumentException.class);
195
         new LargestSeriesProductCalculator("1234a5");
195
         new LargestSeriesProductCalculator("1234a5");
196
     }
196
     }
197
 
197
 
198
-    @Ignore
198
+    @Ignore("Remove to run test")
199
     @Test
199
     @Test
200
     public void testNegativeSeriesLengthIsRejected() {
200
     public void testNegativeSeriesLengthIsRejected() {
201
         final LargestSeriesProductCalculator calculator = new LargestSeriesProductCalculator("12345");
201
         final LargestSeriesProductCalculator calculator = new LargestSeriesProductCalculator("12345");
206
         calculator.calculateLargestProductForSeriesLength(-1);
206
         calculator.calculateLargestProductForSeriesLength(-1);
207
     }
207
     }
208
 
208
 
209
-    @Ignore
209
+    @Ignore("Remove to run test")
210
     @Test
210
     @Test
211
     public void testNullStringToSearchIsRejected() {
211
     public void testNullStringToSearchIsRejected() {
212
         expectedException.expect(IllegalArgumentException.class);
212
         expectedException.expect(IllegalArgumentException.class);