public void AssociateCollectionsAndRepositories()
 {
     inventorySource.UpdateActiveInventory();
     CurrentInventory = inventorySource.CurrentInventory;
     implementedBatchSource.UpdateImplementationLedger();
     ImplementedBatchLedger = implementedBatchSource.ImplementedBatchLedger;
     OperatorRepository     = operatorSource.OperatorRepository;
     UpdateAverageBatchList();
     NotifyPropertyChanged("CurrentInventory");
     NotifyPropertyChanged("ImplementedBatchLedger");
     NotifyPropertyChanged("OperatorRepository");
     NotifyPropertyChanged("TotalInventoryCount");
 }
        public void GettingImplementationLedgerReturnsThirtyDaysWorthOfRecordsDescendingByLatestDate()
        {
            int      expectedCount       = 2;
            DateTime latest              = new DateTime(2020, 2, 14);
            DateTime thirtyDaysBefore    = latest.AddDays(-30);
            DateTime thirtyOneDaysBefore = latest.AddDays(-31);

            inventorySource.AddReceivedBatchToInventory(receivedBatch);
            implementedBatchSource.AddBatchToImplementationLedger(receivedBatch.BatchNumber, latest, receivedBatch.ReceivingOperator);
            implementedBatchSource.AddBatchToImplementationLedger(receivedBatch.BatchNumber, thirtyDaysBefore, receivedBatch.ReceivingOperator);
            implementedBatchSource.AddBatchToImplementationLedger(receivedBatch.BatchNumber, thirtyOneDaysBefore, receivedBatch.ReceivingOperator);

            implementedBatchSource.UpdateImplementationLedger();

            Assert.AreEqual(expectedCount, implementedBatchSource.ImplementedBatchLedger.Count);
        }