Ejemplo n.º 1
0
            public void BasicTests()
            {
                // ChessBoard.BoardSquare encapsulates a File:Rank pair
                // Most of the unit level testing is verifying correctness of Properties
                // and since Equality tests are overloaded, testing those work
                // as expected
                PieceFile testFile = new PieceFile('c');
                int       testRank = 4;

                Trace.WriteLine(String.Format("Creating BoardSquare[{0}:{1}]", testFile.ToString(), testRank));
                BoardSquare testSquare = new BoardSquare(testFile, testRank);

                //testSquare.File
                Assert.AreEqual(testSquare.File, testFile);
                Assert.IsTrue(testSquare.File == testFile);

                // Various equality checks
                Assert.AreEqual(testSquare.Rank, testRank);
                Assert.IsTrue(testSquare.Rank == testRank);
                Assert.IsTrue(testFile.Equals(testSquare.File));
            }
Ejemplo n.º 2
0
 void IChessBoardView.HighlightSquare(PieceFile file, int rank)
 {
 }