public void When_Player_X_puts_three_in_a_row_it_should_win() { // Arrange var row1 = new[] { "X", "X", "O" }; var row2 = new[] { "X", "O", "O" }; var row3 = new[] { " ", " ", " " }; var game = new Game(row1, row2, row3); // Act game.PlayAt(2, 0); // Assert Assert.AreEqual("X", game.Winner); }
public void When_9_rows_are_filled_and_there_is_no_winner_It_should_be_Cats() { // Arrange var row1 = new[] { "X", "X", "O" }; var row2 = new[] { "O", "O", "X" }; var row3 = new[] { " ", "O", "X" }; var game = new Game(row1, row2, row3); // Act game.PlayAt(2, 0); // Assert Assert.AreEqual(null, game.Winner); }