Просмотр исходного кода

Move "@Rule"

Moved the ExpectedException declaration back to the top, where it was
before.
Colin Mullikin 9 лет назад
Родитель
Сommit
3aeb8ccfd6
1 измененных файлов: 7 добавлений и 7 удалений
  1. 7
    7
      exercises/queen-attack/src/test/java/QueenAttackCalculatorTest.java

+ 7
- 7
exercises/queen-attack/src/test/java/QueenAttackCalculatorTest.java Просмотреть файл

@@ -8,6 +8,13 @@ import static org.junit.Assert.assertTrue;
8 8
 
9 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 18
     @Test
12 19
     public void testQueensThatDoNotShareRankFileOrDiagonalCannotAttack() {
13 20
         final QueenAttackCalculator calculator
@@ -70,13 +77,6 @@ public final class QueenAttackCalculatorTest {
70 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 80
     @Ignore
81 81
     @Test
82 82
     public void testCoordinateWithNegativeRankNotAllowed() {