public void GetPieceAt_Should_ThrowArgumentNullExecption() { // Arrange SUT board = new SUT(); // Act board.GetPieceAt(null); }
public void PutPiece_Should_PutThePieceOnTheBoard(ChessPieceKind kindOfPiece, ChessColor pieceColor, string square) { // Arrange SUT board = new SUT(); ChessPiece piece = new ChessPiece(kindOfPiece, pieceColor); // Act board.PutPiece(piece, new ChessSquare(square)); // Assert Assert.IsTrue(piece == board.GetPieceAt(new ChessSquare(square))); }
public void GetPieceAt_Should_ReturnThePiece() { // Arrange SUT board = new SUT(); // Assert Assert.IsTrue(new ChessPiece(ChessPieceKind.Rook, ChessColor.White) == board.GetPieceAt(new ChessSquare("a1"))); Assert.IsTrue(new ChessPiece(ChessPieceKind.Knight, ChessColor.White) == board.GetPieceAt(new ChessSquare("b1"))); Assert.IsTrue(new ChessPiece(ChessPieceKind.Bishop, ChessColor.White) == board.GetPieceAt(new ChessSquare("c1"))); Assert.IsTrue(new ChessPiece(ChessPieceKind.Queen, ChessColor.White) == board.GetPieceAt(new ChessSquare("d1"))); Assert.IsTrue(new ChessPiece(ChessPieceKind.King, ChessColor.White) == board.GetPieceAt(new ChessSquare("e1"))); Assert.IsTrue(new ChessPiece(ChessPieceKind.Bishop, ChessColor.White) == board.GetPieceAt(new ChessSquare("f1"))); Assert.IsTrue(new ChessPiece(ChessPieceKind.Knight, ChessColor.White) == board.GetPieceAt(new ChessSquare("g1"))); Assert.IsTrue(new ChessPiece(ChessPieceKind.Rook, ChessColor.White) == board.GetPieceAt(new ChessSquare("h1"))); Assert.IsTrue(new ChessPiece(ChessPieceKind.Rook, ChessColor.Black) == board.GetPieceAt(new ChessSquare("a8"))); Assert.IsTrue(new ChessPiece(ChessPieceKind.Knight, ChessColor.Black) == board.GetPieceAt(new ChessSquare("b8"))); Assert.IsTrue(new ChessPiece(ChessPieceKind.Bishop, ChessColor.Black) == board.GetPieceAt(new ChessSquare("c8"))); Assert.IsTrue(new ChessPiece(ChessPieceKind.Queen, ChessColor.Black) == board.GetPieceAt(new ChessSquare("d8"))); Assert.IsTrue(new ChessPiece(ChessPieceKind.King, ChessColor.Black) == board.GetPieceAt(new ChessSquare("e8"))); Assert.IsTrue(new ChessPiece(ChessPieceKind.Bishop, ChessColor.Black) == board.GetPieceAt(new ChessSquare("f8"))); Assert.IsTrue(new ChessPiece(ChessPieceKind.Knight, ChessColor.Black) == board.GetPieceAt(new ChessSquare("g8"))); Assert.IsTrue(new ChessPiece(ChessPieceKind.Rook, ChessColor.Black) == board.GetPieceAt(new ChessSquare("h8"))); }