public void PostToIndexShouldStoreCoffeeRequests()
        {
            var requestRepository = new CoffeeRequestRepository();
            var controller = new HomeController(requestRepository);
            var expectedRequest = new CoffeeRequest();

            controller.Index(expectedRequest);

            Assert.That(requestRepository.Contains(expectedRequest));
        }
Example #2
0
 public HomeController(CoffeeRequestRepository requestRepository)
 {
     _requestRepository = requestRepository;
 }