Selaa lähdekoodia

Added Ignore annotation to all tests but the first one in all-your-base.

Frida Tveit 9 vuotta sitten
vanhempi
commit
2b916653e2
1 muutettua tiedostoa jossa 20 lisäystä ja 0 poistoa
  1. 20
    0
      exercises/all-your-base/src/test/java/BaseConverterTest.java

+ 20
- 0
exercises/all-your-base/src/test/java/BaseConverterTest.java Näytä tiedosto

1
+import org.junit.Ignore;
1
 import org.junit.Rule;
2
 import org.junit.Rule;
2
 import org.junit.Test;
3
 import org.junit.Test;
3
 import org.junit.rules.ExpectedException;
4
 import org.junit.rules.ExpectedException;
31
                 actualDigits);
32
                 actualDigits);
32
     }
33
     }
33
 
34
 
35
+    @Ignore
34
     @Test
36
     @Test
35
     public void testBinaryToSingleDecimal() {
37
     public void testBinaryToSingleDecimal() {
36
         final BaseConverter baseConverter = new BaseConverter(2, new int[]{1, 0, 1});
38
         final BaseConverter baseConverter = new BaseConverter(2, new int[]{1, 0, 1});
47
                 actualDigits);
49
                 actualDigits);
48
     }
50
     }
49
 
51
 
52
+    @Ignore
50
     @Test
53
     @Test
51
     public void testSingleDecimalToBinary() {
54
     public void testSingleDecimalToBinary() {
52
         final BaseConverter baseConverter = new BaseConverter(10, new int[]{5});
55
         final BaseConverter baseConverter = new BaseConverter(10, new int[]{5});
63
                 actualDigits);
66
                 actualDigits);
64
     }
67
     }
65
 
68
 
69
+    @Ignore
66
     @Test
70
     @Test
67
     public void testBinaryToMultipleDecimal() {
71
     public void testBinaryToMultipleDecimal() {
68
         final BaseConverter baseConverter = new BaseConverter(2, new int[]{1, 0, 1, 0, 1, 0});
72
         final BaseConverter baseConverter = new BaseConverter(2, new int[]{1, 0, 1, 0, 1, 0});
79
                 actualDigits);
83
                 actualDigits);
80
     }
84
     }
81
 
85
 
86
+    @Ignore
82
     @Test
87
     @Test
83
     public void testDecimalToBinary() {
88
     public void testDecimalToBinary() {
84
         final BaseConverter baseConverter = new BaseConverter(10, new int[]{4, 2});
89
         final BaseConverter baseConverter = new BaseConverter(10, new int[]{4, 2});
95
                 actualDigits);
100
                 actualDigits);
96
     }
101
     }
97
 
102
 
103
+    @Ignore
98
     @Test
104
     @Test
99
     public void testTrinaryToHexadecimal() {
105
     public void testTrinaryToHexadecimal() {
100
         final BaseConverter baseConverter = new BaseConverter(3, new int[]{1, 1, 2, 0});
106
         final BaseConverter baseConverter = new BaseConverter(3, new int[]{1, 1, 2, 0});
111
                 actualDigits);
117
                 actualDigits);
112
     }
118
     }
113
 
119
 
120
+    @Ignore
114
     @Test
121
     @Test
115
     public void testHexadecimalToTrinary() {
122
     public void testHexadecimalToTrinary() {
116
         final BaseConverter baseConverter = new BaseConverter(16, new int[]{2, 10});
123
         final BaseConverter baseConverter = new BaseConverter(16, new int[]{2, 10});
127
                 actualDigits);
134
                 actualDigits);
128
     }
135
     }
129
 
136
 
137
+    @Ignore
130
     @Test
138
     @Test
131
     public void test15BitInteger() {
139
     public void test15BitInteger() {
132
         final BaseConverter baseConverter = new BaseConverter(97, new int[]{3, 46, 60});
140
         final BaseConverter baseConverter = new BaseConverter(97, new int[]{3, 46, 60});
143
                 actualDigits);
151
                 actualDigits);
144
     }
152
     }
145
 
153
 
154
+    @Ignore
146
     @Test
155
     @Test
147
     public void testEmptyDigits() {
156
     public void testEmptyDigits() {
148
         expectedException.expect(IllegalArgumentException.class);
157
         expectedException.expect(IllegalArgumentException.class);
151
         new BaseConverter(2, new int[]{});
160
         new BaseConverter(2, new int[]{});
152
     }
161
     }
153
 
162
 
163
+    @Ignore
154
     @Test
164
     @Test
155
     public void testSingleZero() {
165
     public void testSingleZero() {
156
         final BaseConverter baseConverter = new BaseConverter(10, new int[]{0});
166
         final BaseConverter baseConverter = new BaseConverter(10, new int[]{0});
167
                 actualDigits);
177
                 actualDigits);
168
     }
178
     }
169
 
179
 
180
+    @Ignore
170
     @Test
181
     @Test
171
     public void testMultipleZeros() {
182
     public void testMultipleZeros() {
172
         expectedException.expect(IllegalArgumentException.class);
183
         expectedException.expect(IllegalArgumentException.class);
175
         new BaseConverter(10, new int[]{0, 0, 0});
186
         new BaseConverter(10, new int[]{0, 0, 0});
176
     }
187
     }
177
 
188
 
189
+    @Ignore
178
     @Test
190
     @Test
179
     public void testLeadingZeros() {
191
     public void testLeadingZeros() {
180
         expectedException.expect(IllegalArgumentException.class);
192
         expectedException.expect(IllegalArgumentException.class);
183
         new BaseConverter(7, new int[]{0, 6, 0});
195
         new BaseConverter(7, new int[]{0, 6, 0});
184
     }
196
     }
185
 
197
 
198
+    @Ignore
186
     @Test
199
     @Test
187
     public void testNegativeDigit() {
200
     public void testNegativeDigit() {
188
         expectedException.expect(IllegalArgumentException.class);
201
         expectedException.expect(IllegalArgumentException.class);
191
         new BaseConverter(2, new int[]{1, -1, 1, 0, 1, 0});
204
         new BaseConverter(2, new int[]{1, -1, 1, 0, 1, 0});
192
     }
205
     }
193
 
206
 
207
+    @Ignore
194
     @Test
208
     @Test
195
     public void testInvalidPositiveDigit() {
209
     public void testInvalidPositiveDigit() {
196
         expectedException.expect(IllegalArgumentException.class);
210
         expectedException.expect(IllegalArgumentException.class);
199
         new BaseConverter(2, new int[]{1, 2, 1, 0, 1, 0});
213
         new BaseConverter(2, new int[]{1, 2, 1, 0, 1, 0});
200
     }
214
     }
201
 
215
 
216
+    @Ignore
202
     @Test
217
     @Test
203
     public void testFirstBaseIsOne() {
218
     public void testFirstBaseIsOne() {
204
         expectedException.expect(IllegalArgumentException.class);
219
         expectedException.expect(IllegalArgumentException.class);
207
         new BaseConverter(1, new int[]{});
222
         new BaseConverter(1, new int[]{});
208
     }
223
     }
209
 
224
 
225
+    @Ignore
210
     @Test
226
     @Test
211
     public void testSecondBaseIsOne() {
227
     public void testSecondBaseIsOne() {
212
         final BaseConverter baseConverter = new BaseConverter(2, new int[]{1, 0, 1, 0, 1, 0});
228
         final BaseConverter baseConverter = new BaseConverter(2, new int[]{1, 0, 1, 0, 1, 0});
217
         baseConverter.convertToBase(1);
233
         baseConverter.convertToBase(1);
218
     }
234
     }
219
 
235
 
236
+    @Ignore
220
     @Test
237
     @Test
221
     public void testFirstBaseIsZero() {
238
     public void testFirstBaseIsZero() {
222
         expectedException.expect(IllegalArgumentException.class);
239
         expectedException.expect(IllegalArgumentException.class);
225
         new BaseConverter(0, new int[]{});
242
         new BaseConverter(0, new int[]{});
226
     }
243
     }
227
 
244
 
245
+    @Ignore
228
     @Test
246
     @Test
229
     public void testSecondBaseIsZero() {
247
     public void testSecondBaseIsZero() {
230
         final BaseConverter baseConverter = new BaseConverter(2, new int[]{1, 0, 1, 0, 1, 0});
248
         final BaseConverter baseConverter = new BaseConverter(2, new int[]{1, 0, 1, 0, 1, 0});
235
         baseConverter.convertToBase(0);
253
         baseConverter.convertToBase(0);
236
     }
254
     }
237
 
255
 
256
+    @Ignore
238
     @Test
257
     @Test
239
     public void testFirstBaseIsNegative() {
258
     public void testFirstBaseIsNegative() {
240
         expectedException.expect(IllegalArgumentException.class);
259
         expectedException.expect(IllegalArgumentException.class);
243
         new BaseConverter(-2, new int[]{});
262
         new BaseConverter(-2, new int[]{});
244
     }
263
     }
245
 
264
 
265
+    @Ignore
246
     @Test
266
     @Test
247
     public void testSecondBaseIsNegative() {
267
     public void testSecondBaseIsNegative() {
248
         final BaseConverter baseConverter = new BaseConverter(2, new int[]{1});
268
         final BaseConverter baseConverter = new BaseConverter(2, new int[]{1});