public void PostToIndexShouldStoreCoffeeRequests() { var requestRepository = new CoffeeRequestRepository(); var controller = new HomeController(requestRepository); var expectedRequest = new CoffeeRequest(); controller.Index(expectedRequest); Assert.That(requestRepository.Contains(expectedRequest)); }
public HomeController(CoffeeRequestRepository requestRepository) { _requestRepository = requestRepository; }