public void SanityCheck_GivenInsaneDataDueToWrongNumberOfBlackAndWhiteSquares_ReturnsFalse() { // Arrange var board = new Board(TestBoardSize); var solver = new Solver(); var bogusPieceD = new Piece( new[] { // B // W // WW new Square(0, 0, Colour.White), new Square(1, 0, Colour.White), new Square(1, 1, Colour.White), new Square(1, 2, Colour.Black) }, 'D'); var pieceFeeder = new PieceFeeder(Piece.TestPieceA, Piece.TestPieceB, Piece.TestPieceC, bogusPieceD); // Act var actual = solver.SanityCheck(board, pieceFeeder); // Assert Assert.That(actual, Is.False); }
public void SanityCheck_GivenSaneData_ReturnsTrue() { // Arrange var board = new Board(TestBoardSize); var solver = new Solver(); var pieceFeeder = new PieceFeeder(Piece.TestPieceA, Piece.TestPieceB, Piece.TestPieceC, Piece.TestPieceD); // Act var actual = solver.SanityCheck(board, pieceFeeder); // Assert Assert.That(actual, Is.True); }
public void SanityCheck_GivenInsaneDataDueToWrongNumberOfSquares_ReturnsFalse() { // Arrange var board = new Board(TestBoardSize); var solver = new Solver(); var pieceFeeder = new PieceFeeder(Piece.TestPieceA, Piece.TestPieceB, Piece.TestPieceC); // Act var actual = solver.SanityCheck(board, pieceFeeder); // Assert Assert.That(actual, Is.False); }