예제 #1
0
        public void PostToIndexShouldStoreCoffeeRequests()
        {
            var requestRepository = new CoffeeRequestRepository();
            var controller = new HomeController(requestRepository);
            var expectedRequest = new CoffeeRequest();

            controller.Index(expectedRequest);

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