Procházet zdrojové kódy

Merge pull request #1030 from sjwarner-bp/bowling-test-exceptions

bowling: remove unnecessary exceptions from test method signatures
FridaTveit před 8 roky
rodič
revize
d6100ad41a
No account linked to committer's email
1 změnil soubory, kde provedl 11 přidání a 11 odebrání
  1. 11
    11
      exercises/bowling/src/test/java/BowlingTest.java

+ 11
- 11
exercises/bowling/src/test/java/BowlingTest.java Zobrazit soubor

@@ -150,7 +150,7 @@ public class BowlingTest {
150 150
 
151 151
     @Ignore("Remove to run test")
152 152
     @Test
153
-    public void rollsCanNotScoreNegativePoints() throws IllegalStateException {
153
+    public void rollsCanNotScoreNegativePoints() {
154 154
         int[] rolls = {-1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
155 155
 
156 156
         playGame(rolls);
@@ -163,7 +163,7 @@ public class BowlingTest {
163 163
 
164 164
     @Ignore("Remove to run test")
165 165
     @Test
166
-    public void aRollCanNotScoreMoreThan10Points() throws IllegalStateException {
166
+    public void aRollCanNotScoreMoreThan10Points() {
167 167
         int[] rolls = {11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
168 168
 
169 169
         playGame(rolls);
@@ -176,7 +176,7 @@ public class BowlingTest {
176 176
 
177 177
     @Ignore("Remove to run test")
178 178
     @Test
179
-    public void twoRollsInAFrameCanNotScoreMoreThan10Points() throws IllegalStateException {
179
+    public void twoRollsInAFrameCanNotScoreMoreThan10Points() {
180 180
         int[] rolls = {5, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
181 181
 
182 182
         playGame(rolls);
@@ -189,7 +189,7 @@ public class BowlingTest {
189 189
 
190 190
     @Ignore("Remove to run test")
191 191
     @Test
192
-    public void twoBonusRollsAfterAStrikeInTheLastFrameCanNotScoreMoreThan10Points() throws IllegalStateException {
192
+    public void twoBonusRollsAfterAStrikeInTheLastFrameCanNotScoreMoreThan10Points() {
193 193
         int[] rolls = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 5, 6};
194 194
 
195 195
         playGame(rolls);
@@ -202,7 +202,7 @@ public class BowlingTest {
202 202
 
203 203
     @Ignore("Remove to run test")
204 204
     @Test
205
-    public void twoBonusRollsAfterAStrikeInTheLastFrameCanScoreMoreThan10PointsIfOneIsAStrike() throws IllegalStateException {
205
+    public void twoBonusRollsAfterAStrikeInTheLastFrameCanScoreMoreThan10PointsIfOneIsAStrike() {
206 206
         int[] rolls = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 6};
207 207
 
208 208
         playGame(rolls);
@@ -212,7 +212,7 @@ public class BowlingTest {
212 212
 
213 213
     @Ignore("Remove to run test")
214 214
     @Test
215
-    public void anUnstartedGameCanNotBeScored() throws IllegalStateException {
215
+    public void anUnstartedGameCanNotBeScored() {
216 216
         int[] rolls = new int[0];
217 217
 
218 218
         playGame(rolls);
@@ -225,7 +225,7 @@ public class BowlingTest {
225 225
 
226 226
     @Ignore("Remove to run test")
227 227
     @Test
228
-    public void anIncompleteGameCanNotBeScored() throws IllegalStateException {
228
+    public void anIncompleteGameCanNotBeScored() {
229 229
         int[] rolls = {0, 0};
230 230
 
231 231
         playGame(rolls);
@@ -238,7 +238,7 @@ public class BowlingTest {
238 238
 
239 239
     @Ignore("Remove to run test")
240 240
     @Test
241
-    public void aGameWithMoreThanTenFramesCanNotBeScored() throws IllegalStateException {
241
+    public void aGameWithMoreThanTenFramesCanNotBeScored() {
242 242
         int[] rolls = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
243 243
 
244 244
         playGame(rolls);
@@ -251,7 +251,7 @@ public class BowlingTest {
251 251
 
252 252
     @Ignore("Remove to run test")
253 253
     @Test
254
-    public void bonusRollsForAStrikeInTheLastFrameMustBeRolledBeforeScoreCanBeCalculated() throws IllegalStateException {
254
+    public void bonusRollsForAStrikeInTheLastFrameMustBeRolledBeforeScoreCanBeCalculated() {
255 255
         int[] rolls = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10};
256 256
 
257 257
         playGame(rolls);
@@ -264,7 +264,7 @@ public class BowlingTest {
264 264
 
265 265
     @Ignore("Remove to run test")
266 266
     @Test
267
-    public void bothBonusRollsForAStrikeInTheLastFrameMustBeRolledBeforeScoreCanBeCalculated() throws IllegalStateException {
267
+    public void bothBonusRollsForAStrikeInTheLastFrameMustBeRolledBeforeScoreCanBeCalculated() {
268 268
         int[] rolls = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10};
269 269
 
270 270
         playGame(rolls);
@@ -277,7 +277,7 @@ public class BowlingTest {
277 277
 
278 278
     @Ignore("Remove to run test")
279 279
     @Test
280
-    public void bonusRollForASpareInTheLastFrameMustBeRolledBeforeScoreCanBeCalculated() throws IllegalStateException {
280
+    public void bonusRollForASpareInTheLastFrameMustBeRolledBeforeScoreCanBeCalculated() {
281 281
         int[] rolls = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 3};
282 282
 
283 283
         playGame(rolls);