public void Rock_UserWin_ShouldReturnUserWinView() { Mock<IBoard> board = new Mock<IBoard>(); board.Setup(b => b.PlayRock()).Returns(Winner.User); HomeController controller = new HomeController(board.Object); PartialViewResult result = (PartialViewResult) controller.Rock(); Assert.AreEqual(result.ViewName, "UserWin"); }
public void Rock_TheComputherShouldThrowItsSymbol() { Mock<IBoard> board = new Mock<IBoard>(); HomeController controller = new HomeController(board.Object); controller.Rock(); board.Verify(b => b.PlayRock()); }