public void Index() { ToysController controller = new ToysController(); ViewResult result = controller.Index() as ViewResult; Assert.IsNotNull(result); }
public void Index_Should_Return_A_View() { // Arrange Mock <IDataBase> IDataBaseMock = new Mock <IDataBase>(); ToysController controller = new ToysController(IDataBaseMock.Object); // Act ViewResult result = controller.Index() as ViewResult; // Assert Assert.IsNotNull(result); }