public void FormatNineDotsGivenEmptyBoard() { // Arrange var board = new Board(3, 3); // Act var actual = BoardFormatter.Format(board); // Assert const string expected = ". . . \n. . . \n. . . "; Assert.Equal(expected, actual); }
public void FormatOInBottomRightCorner() { // Arrange var board = new Board(3, 3); var cell = board.Cells.FirstOrDefault(c => c.X == 2 && c.Y == 2); if (cell != null) { cell.Piece = BoardPiece.O; } // Act var actual = BoardFormatter.Format(board); // Assert const string expected = ". . . \n. . . \n. . O "; Assert.Equal(expected, actual); }
public void FormatXInTopLeftCorner() { // Arrange var board = new Board(3, 3); var cell = board.Cells.FirstOrDefault(c => c.X == 0 && c.Y == 0); if (cell != null) { cell.Piece = BoardPiece.X; } // Act var actual = BoardFormatter.Format(board); // Assert const string expected = "X . . \n. . . \n. . . "; Assert.Equal(expected, actual); }