public void MVC_Index_AngularJS_Json_ViewResult_ModelReturnedNull() { // Arrange _controller = new HomeController(); // Act var actual = _controller.Index_AngularJS() as ViewResult; // Assert Assert.IsNull(actual.Model); }
public void MVC_Index_ViewResult_ViewExists() { // Arrange _controller = new HomeController(); string expectedView = "Index"; // Act var actual = _controller.Index() as ViewResult; // Assert Assert.AreEqual(expectedView, actual.ViewName); }
public void MVC_Index_ViewResult_ModelReturned() { // Arrange _controller = new HomeController(); string expectedView = "Index"; // Act var actual = _controller.Index() as ViewResult; var actualModel = actual.Model as BillModel; // Assert Assert.IsNotNull(actualModel); Assert.AreEqual(expectedView, actual.ViewName); }