コード例 #1
0
        public void TestToString()
        {
            ChessboardManager chessboardManager = new ChessboardManager();

            string expectedString =
                "    0 1 2 3 4 5 6 7\r\n" +
                "   -----------------\r\n" +
                "0 | A - B - C - D - |\r\n" +
                "1 | - + - + - + - + |\r\n" +
                "2 | + - + - + - + - |\r\n" +
                "3 | - + - + - + - + |\r\n" +
                "4 | + - + - + - + - |\r\n" +
                "5 | - + - + - + - + |\r\n" +
                "6 | + - + - + - + - |\r\n" +
                "7 | - + - K - + - + |\r\n" +
                "   -----------------\r\n";

            Assert.AreEqual(
                expectedString,
                chessboardManager.ToString(),
                "Converting to string doesn't work correctly.");
        }