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); }
public decimal GetPrice([FromBody] IEnumerable <Product> products) => _shopRepository.CalculateProductsPrice(products);