public void GetCustomersReturnsCustomers() { //Arrange //Properties go here var customerController = new CustomersController(); //Act //Call the method in question that needs to be tested IEnumerable<CustomerModel> customers = customerController.GetCustomers(); //Assert //You assert that if the outcome is this, assert that. Assert.IsTrue(customers.Count() > 0); }
public void GetCustomersReturnsCustomers() { //Arrange: Instantiate CustomersController so its methods can be called var customerController = new CustomersController(); //Act: Call the GetCustomers method IEnumerable<CustomerModel> customers = customerController.GetCustomers(); //Assert: Verify that an array was returned with at least one element Assert.IsTrue(customers.Count() > 0); }