Beispiel #1
0
        public void CheckRenderOfEmptyBoard()
        {
            const string cellsString = "   " +
                                       "   " +
                                       "   ";

            const string expectedRender = "   |   |   \n" +
                                          "-----------\n" +
                                          "   |   |   \n" +
                                          "-----------\n" +
                                          "   |   |   \n";

            var cells = CommonMethods.CreateMockBoardCells(cellsString);

            var actualRender = _boardRenderer.RenderAsText(cells.Object);

            Assert.AreEqual(expectedRender, actualRender);
        }
 /// <summary>
 /// Render the board in text format - simple pass-thru to IBoardRenderer
 /// </summary>
 /// <returns>String with the formatted text of the board</returns>
 public string RenderAsText()
 {
     return(_boardRenderer.RenderAsText(_boardCells));
 }