Exemplo n.º 1
0
        public void Equals_TwoOppositeColorKnights_AreNotEqual()
        {
            Knight knight1 = new Knight(new Board(), PieceColor.White);
            Knight knight2 = new Knight(new Board(), PieceColor.Black);

            Assert.AreNotEqual(knight1, knight2);
        }
Exemplo n.º 2
0
        public void Equals_TwoSameColorKnights_AreEqual()
        {
            Knight knight1 = new Knight(new Board(), PieceColor.White);
            Knight knight2 = new Knight(new Board(), PieceColor.White);
            Knight knight3 = new Knight(new Board(), PieceColor.Black);
            Knight knight4 = new Knight(new Board(), PieceColor.Black);

            Assert.AreEqual(knight1, knight2);
            Assert.AreEqual(knight3, knight4);
        }
Exemplo n.º 3
0
        public void Setup_WhenBoardIsSetup_SecondAndSeventhFilePositionsOnTheFirstRankReturnWhiteKnights()
        {
            var expected = new Knight(Board, PieceColor.White);

            Board.Setup();

            Assert.AreEqual(expected, GetSquare(2, 1).Occupier);
            Assert.AreEqual(expected, GetSquare(7, 1).Occupier);
        }
Exemplo n.º 4
0
        public void Setup_WhenBoardIsSetup_SecondAndSeventhFilePositionsOnTheEightRankReturnBlackKnights()
        {
            var expected = new Knight(Board, PieceColor.Black);

            Board.Setup();

            Assert.AreEqual(expected, GetSquare(2, 8).Occupier);
            Assert.AreEqual(expected, GetSquare(7, 8).Occupier);
        }