Esempio n. 1
0
        public void WillFindOrderByStartDateAndEndDate(string startDate, string endDate, int expectedNumOfOrdersFound)
        {
            bool startDateParsed = DateParser.ParseDate(startDate, out DateTime startDatePassed);
            bool endDateParsed   = DateParser.ParseDate(endDate, out DateTime endDatePassed);
            IQueryable <PurchaseOrderDetail> ordersFound = purchaseOrderDetailService.SearchPurchaseOrderDetails(
                startDateParsed ? startDatePassed as DateTime? : null,
                endDateParsed ? endDatePassed as DateTime? : null);

            Assert.NotNull(ordersFound);
            Assert.Equal(expectedNumOfOrdersFound, ordersFound.Count());
        }
 public IQueryable <PurchaseOrderDetail> SearchPurchaseOrderDetails(DateTime?startDate, DateTime?endDate)
 {
     return(purhcaseOrderDetailService.SearchPurchaseOrderDetails(startDate, endDate));
 }