public void OrderLogic_Get_ShouldReturnAllOrders_WhenRequested()
        {
            var orderLogicIns = new OrderLogic(_orderRepo.Object, _pricingCalculator.Object);

            _orderRepo.Setup(x => x.GetAll()).Returns(GetOrders);
            var result = orderLogicIns.Get();

            Assert.IsNotNull(result);
            Assert.AreEqual(2, result.Count());
        }
Exemple #2
0
 public ActionResult GetApplicantEducation(Guid orderId)
 {
     try
     {
         var poco = _logic.Get(orderId);
         return(poco != null?Ok(poco) : (ActionResult)NotFound());
     }
     catch (Exception ex)
     {
         return(BadRequest(ex.Message));
     }
 }
        public ActionResult GetApplicantEducation(Guid id)
        {
            OrderPoco poco = _logic.Get(id);

            if (poco == null)
            {
                return(NotFound());
            }
            else
            {
                return(Ok(poco));
            }
        }