Sfoglia il codice sorgente

Move "@Rule"

Moved the ExpectedException declaration back to the top, where it was
before.
Colin Mullikin 9 anni fa
parent
commit
3aeb8ccfd6

+ 7
- 7
exercises/queen-attack/src/test/java/QueenAttackCalculatorTest.java Vedi File

8
 
8
 
9
 public final class QueenAttackCalculatorTest {
9
 public final class QueenAttackCalculatorTest {
10
 
10
 
11
+    /*
12
+     * See https://github.com/junit-team/junit4/wiki/Rules for information on JUnit Rules in general and
13
+     * ExpectedExceptions in particular.
14
+     */
15
+    @Rule
16
+    public ExpectedException expectedException = ExpectedException.none();
17
+
11
     @Test
18
     @Test
12
     public void testQueensThatDoNotShareRankFileOrDiagonalCannotAttack() {
19
     public void testQueensThatDoNotShareRankFileOrDiagonalCannotAttack() {
13
         final QueenAttackCalculator calculator
20
         final QueenAttackCalculator calculator
70
         assertTrue(calculator.canQueensAttackOneAnother());
77
         assertTrue(calculator.canQueensAttackOneAnother());
71
     }
78
     }
72
 
79
 
73
-    /*
74
-     * See https://github.com/junit-team/junit4/wiki/Rules for information on JUnit Rules in general and
75
-     * ExpectedExceptions in particular.
76
-     */
77
-    @Rule
78
-    public ExpectedException expectedException = ExpectedException.none();
79
-
80
     @Ignore
80
     @Ignore
81
     @Test
81
     @Test
82
     public void testCoordinateWithNegativeRankNotAllowed() {
82
     public void testCoordinateWithNegativeRankNotAllowed() {