|
|
@@ -3,6 +3,7 @@ import org.junit.Rule;
|
|
3
|
3
|
import org.junit.Test;
|
|
4
|
4
|
import org.junit.rules.ExpectedException;
|
|
5
|
5
|
|
|
|
6
|
+import static org.junit.Assert.assertFalse;
|
|
6
|
7
|
import static org.junit.Assert.assertTrue;
|
|
7
|
8
|
|
|
8
|
9
|
public final class QueenAttackCalculatorTest {
|
|
|
@@ -69,6 +70,14 @@ public final class QueenAttackCalculatorTest {
|
|
69
|
70
|
new QueenAttackCalculator(new BoardCoordinate(2, 2), new BoardCoordinate(2, 2));
|
|
70
|
71
|
}
|
|
71
|
72
|
|
|
|
73
|
+ @Test
|
|
|
74
|
+ public void testQueensThatDoNotShareRankFileOrDiagonalCannotAttack() {
|
|
|
75
|
+ final QueenAttackCalculator calculator
|
|
|
76
|
+ = new QueenAttackCalculator(new BoardCoordinate(2, 4), new BoardCoordinate(6, 6));
|
|
|
77
|
+
|
|
|
78
|
+ assertFalse(calculator.canQueensAttackOneAnother());
|
|
|
79
|
+ }
|
|
|
80
|
+
|
|
72
|
81
|
@Ignore
|
|
73
|
82
|
@Test
|
|
74
|
83
|
public void testQueensCanAttackOnTheSameRank() {
|