Exemplo n.º 1
0
        public void PutPiece_Should_ThrowException_When_ThereIsTwoKingOfTheSameColor()
        {
            //	Arrange
            SUT board = new SUT();

            //	Act
            board.PutPiece(new ChessPiece(ChessPieceKind.King, ChessColor.Black), new ChessSquare("e5"));
        }
Exemplo n.º 2
0
        public void PutPiece_Should_ThrowException_When_PieceIsNull()
        {
            //	Arrange
            SUT board = new SUT();

            //	Act
            board.PutPiece(null, new ChessSquare("a1"));
        }
Exemplo n.º 3
0
        public void PutPiece_Should_ThrowException_When_SquareIsNull()
        {
            //	Arrange
            SUT board = new SUT();

            //	Act
            board.PutPiece(new ChessPiece(ChessPieceKind.Rook, ChessColor.Black), null);
        }
Exemplo n.º 4
0
        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)));
        }