コード例 #1
0
ファイル: OrderedTests.cs プロジェクト: VitaliyNazarets/Store
        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);