示例#1
0
        public async Task PricesUpdatedCorrectlyTest()
        {
            PricesUpdatedCorrectlyCalled = true;

            var allProducts = await shopRepository.GetProductsAsync();

            var full_price = shopRepository.CalculateProductsPrice(allProducts);

            Assert.Equal(3811, full_price);

            Assert.True(AddDataCalled);
            Assert.True(CalculatePriceCalled);
            Assert.True(UpdatePricesCalled);
        }
示例#2
0
 public decimal GetPrice([FromBody] IEnumerable <Product> products) => _shopRepository.CalculateProductsPrice(products);