public void TestCleanup()
        {
            // Delete DeliveryOrders
            var deliveryOrderRepository = new DeliveryOrderRepository(context);

            if (deliveryOrderRepository.FindAll().Where(x => x.InvoiceFileName == "IDSERVICETEST").Count() > 0)
            {
                deliveryOrderRepository.FindAll().Where(x => x.InvoiceFileName == "IDSERVICETEST").ToList().ForEach(x => deliveryOrderRepository.Delete(x));
            }

            // Delete Disbursements
            var disbursementRepository = new DisbursementRepository(context);

            if (disbursementRepository.FindAll().Where(x => x.Remarks == "IDSERVICETEST").Count() > 0)
            {
                disbursementRepository.FindAll().Where(x => x.Remarks == "IDSERVICETEST").ToList().ForEach(x => disbursementRepository.Delete(x));
            }

            // Delete Purchase Orders
            var purchaseOrderRepository = new PurchaseOrderRepository(context);

            if (purchaseOrderRepository.FindAll().Where(x => x.Status.StatusId == 16).Count() > 0)
            {
                purchaseOrderRepository.FindAll().Where(x => x.Status.StatusId == 16).ToList().ForEach(x => purchaseOrderRepository.Delete(x));
            }

            // Delete Requisitions
            var requisitionRepository = new RequisitionRepository(context);

            if (requisitionRepository.FindAll().Where(x => x.EmployeeRemarks == "IDSERVICETEST").Count() > 0)
            {
                requisitionRepository.FindAll().Where(x => x.EmployeeRemarks == "IDSERVICETEST").ToList().ForEach(x => requisitionRepository.Delete(x));
            }

            // Delete Retrievals
            var retrievalRepository = new RetrievalRepository(context);

            if (retrievalRepository.FindAll().Where(x => x.Status.StatusId == 16).Count() > 0)
            {
                retrievalRepository.FindAll().Where(x => x.Status.StatusId == 16).ToList().ForEach(x => retrievalRepository.Delete(x));
            }

            // Delete StockAdjustments
            var stockAdjustmentRepository = new StockAdjustmentRepository(context);

            if (stockAdjustmentRepository.FindAll().Where(x => x.Remarks == "IDSERVICETEST").Count() > 0)
            {
                stockAdjustmentRepository.FindAll().Where(x => x.Remarks == "IDSERVICETEST").ToList().ForEach(x => stockAdjustmentRepository.Delete(x));
            }
        }
        public void FindAllTestNotNull()
        {
            // Act
            int result = deliveryOrderRepository.FindAll().Count();

            // Assert
            Assert.IsTrue(result >= 0, "Unable to find all properly");
        }
 public List <DeliveryOrder> FindAllDeliveryOrders()
 {
     return(deliveryOrderRepository.FindAll().ToList());
 }