public void When_No_Customer_Is_In_The_Model_Then_View_Result_Should_Be_The_First_Page() { Customer customer = null; CustomerController controller = new CustomerController(customer); var result = controller.Index() as ViewResult; Assert.IsNotNull(result); //Assert.AreEqual("First", result); }
public void When_A_Customer_Is_Created_The_Index_Of_The_Customer_Controller_Should_Come_Up() { var customerController = new CustomerController(repo); foreach (var customer in model.Customers) repo.Context.Add(customer); repo.Context.Commit(); model.Customers = repo.Find(new FindAll<Customer>()).ToList(); var result = customerController.Index() as ViewResult; Assert.IsNotNull(result); }
public void SetUp() { customerController = new CustomerController(customer1); viewResult = customerController.Index() as ViewResult; }