public void Index_Passes_GreetModel_To_View() { var controller = new GreetController(); var result = controller.Index("ThisIsSPAARTAAAA!"); Assert.IsType <GreetModel>(result.Model); }
public void Greet_Index_Returns_ViewResult() { var controller = new GreetController(); var result = controller.Index("ThisIsAString"); Assert.IsType <ViewResult>(result); }
public void Index_Returns_GreetingModel_To_View() { var controller = new GreetController(); var result = controller.Index("ThisIsAString"); Assert.IsType <GreetingModel>(result.Model); }
public void Index_Sets_Name_On_Model() { var expectedName = "ExampleString"; var controller = new GreetController(); var result = controller.Index(expectedName); var model = (GreetModel)result.Model; Assert.Equal(expectedName, model.Name); }