Пример #1
0
        public void CanReturnWeekOrderById()
        {
            WeekOrder wo = MockWORepository.GetWeekOrderById(1);

            Assert.IsNotNull(wo);
            Assert.IsInstanceOf(typeof(WeekOrder), wo);
        }
Пример #2
0
        public IActionResult Index(int weekOrderId)
        {
            RetrieveWeekOrders();
            var weekOrder = weekOrderRepository.GetWeekOrderById(weekOrderId);

            var result = weekOrderRepository.CompleteOrder(weekOrder);

            if (!result)
            {
                ModelState.AddModelError("Payment", $"Checkout failed. You have to order for atleast 4 workdays");
            }
            return(View());
        }