Explorar el Código

bowling: remove unnecessary exceptions from test method signatures

Sam Warner hace 8 años
padre
commit
c77cdd19c8
Se han modificado 1 ficheros con 11 adiciones y 11 borrados
  1. 11
    11
      exercises/bowling/src/test/java/BowlingTest.java

+ 11
- 11
exercises/bowling/src/test/java/BowlingTest.java Ver fichero

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