|
|
@@ -12,7 +12,7 @@ public class QueenAttackCalculatorTest {
|
|
12
|
12
|
public ExpectedException expectedException = ExpectedException.none();
|
|
13
|
13
|
|
|
14
|
14
|
@Test
|
|
15
|
|
- public void testQueensThatDoNotShareRankFileOrDiagonalCannotAttack() {
|
|
|
15
|
+ public void testQueensThatDoNotShareRowColumnOrDiagonalCannotAttack() {
|
|
16
|
16
|
final QueenAttackCalculator calculator
|
|
17
|
17
|
= new QueenAttackCalculator(new BoardCoordinate(2, 4), new BoardCoordinate(6, 6));
|
|
18
|
18
|
|
|
|
@@ -21,7 +21,7 @@ public class QueenAttackCalculatorTest {
|
|
21
|
21
|
|
|
22
|
22
|
@Ignore("Remove to run test")
|
|
23
|
23
|
@Test
|
|
24
|
|
- public void testQueensCanAttackOnTheSameRank() {
|
|
|
24
|
+ public void testQueensCanAttackOnTheSameRow() {
|
|
25
|
25
|
final QueenAttackCalculator calculator
|
|
26
|
26
|
= new QueenAttackCalculator(new BoardCoordinate(2, 4), new BoardCoordinate(2, 6));
|
|
27
|
27
|
|
|
|
@@ -30,7 +30,7 @@ public class QueenAttackCalculatorTest {
|
|
30
|
30
|
|
|
31
|
31
|
@Ignore("Remove to run test")
|
|
32
|
32
|
@Test
|
|
33
|
|
- public void testQueensCanAttackOnTheSameFile() {
|
|
|
33
|
+ public void testQueensCanAttackOnTheSameColumn() {
|
|
34
|
34
|
final QueenAttackCalculator calculator
|
|
35
|
35
|
= new QueenAttackCalculator(new BoardCoordinate(4, 5), new BoardCoordinate(2, 5));
|
|
36
|
36
|
|
|
|
@@ -75,36 +75,36 @@ public class QueenAttackCalculatorTest {
|
|
75
|
75
|
|
|
76
|
76
|
@Ignore("Remove to run test")
|
|
77
|
77
|
@Test
|
|
78
|
|
- public void testCoordinateWithNegativeRankNotAllowed() {
|
|
|
78
|
+ public void testCoordinateWithNegativeRowNotAllowed() {
|
|
79
|
79
|
expectedException.expect(IllegalArgumentException.class);
|
|
80
|
|
- expectedException.expectMessage("Coordinate must have positive rank.");
|
|
|
80
|
+ expectedException.expectMessage("Coordinate must have positive row.");
|
|
81
|
81
|
|
|
82
|
82
|
new BoardCoordinate(-2, 2);
|
|
83
|
83
|
}
|
|
84
|
84
|
|
|
85
|
85
|
@Ignore("Remove to run test")
|
|
86
|
86
|
@Test
|
|
87
|
|
- public void testCoordinateWithRankGreaterThan7NotAllowed() {
|
|
|
87
|
+ public void testCoordinateWithRowGreaterThan7NotAllowed() {
|
|
88
|
88
|
expectedException.expect(IllegalArgumentException.class);
|
|
89
|
|
- expectedException.expectMessage("Coordinate must have rank <= 7.");
|
|
|
89
|
+ expectedException.expectMessage("Coordinate must have row <= 7.");
|
|
90
|
90
|
|
|
91
|
91
|
new BoardCoordinate(8, 4);
|
|
92
|
92
|
}
|
|
93
|
93
|
|
|
94
|
94
|
@Ignore("Remove to run test")
|
|
95
|
95
|
@Test
|
|
96
|
|
- public void testCoordinateWithNegativeFileNotAllowed() {
|
|
|
96
|
+ public void testCoordinateWithNegativeColumnNotAllowed() {
|
|
97
|
97
|
expectedException.expect(IllegalArgumentException.class);
|
|
98
|
|
- expectedException.expectMessage("Coordinate must have positive file.");
|
|
|
98
|
+ expectedException.expectMessage("Coordinate must have positive column.");
|
|
99
|
99
|
|
|
100
|
100
|
new BoardCoordinate(2, -2);
|
|
101
|
101
|
}
|
|
102
|
102
|
|
|
103
|
103
|
@Ignore("Remove to run test")
|
|
104
|
104
|
@Test
|
|
105
|
|
- public void testCoordinateWithFileGreaterThan7NotAllowed() {
|
|
|
105
|
+ public void testCoordinateWithColumnGreaterThan7NotAllowed() {
|
|
106
|
106
|
expectedException.expect(IllegalArgumentException.class);
|
|
107
|
|
- expectedException.expectMessage("Coordinate must have file <= 7.");
|
|
|
107
|
+ expectedException.expectMessage("Coordinate must have column <= 7.");
|
|
108
|
108
|
|
|
109
|
109
|
new BoardCoordinate(4, 8);
|
|
110
|
110
|
}
|