Beispiel #1
0
        public async Task AddAllProductsTest(int productsCount, int stocksCount)
        {
            InitializeMocks(productsCount, stocksCount);
            var service = new StockService(_stockRepoMock.Object, _productRepoMock.Object,
                                           _stockHistoryRepoMock.Object);
            await service.AddAllProduct(_testWarehouse);

            _stockRepoMock.Verify(m =>
                                  m.AddRange(It.Is <IEnumerable <Stock> >(arg => arg.Count() == productsCount - stocksCount)));
        }