Ejemplo n.º 1
0
        public void SaveReceivedBatch(ReceivedBatch receivedBatch)
        {
            Entity <ReceivedBatch> entity = new Entity <ReceivedBatch>(receivedBatch);
            ITransaction           adder  = new AddReceivedBatchToReceivingLedgerTransaction(entity, sqliteStore);

            adder.Execute();
            inventorySource.AddReceivedBatchToInventory(receivedBatch);
            UpdateRepositoryAndMappings();
        }
        public void AddingBatchToImplementationLedgerWorksIfBatchExistsInInventory()
        {
            int expectedCount = 1;

            inventorySource.AddReceivedBatchToInventory(receivedBatch);
            implementedBatchSource.AddBatchToImplementationLedger(receivedBatch.BatchNumber, date, batchOperator);

            Assert.AreEqual(expectedCount, implementedBatchSource.ImplementedBatchLedger.Count);
        }
        public void AddingReceivedBatchToActiveInventory()
        {
            int           expectedCount = 1;
            ReceivedBatch batch         = SetupReceivedBatch();

            inventorySource.AddReceivedBatchToInventory(batch);

            Assert.AreEqual(expectedCount, inventorySource.CurrentInventory.Count);
        }