コード例 #1
0
        public void DecreaseStockCount_By_One_Stock_Is_Not_Empty()
        {
            // Arrange
            Drug drug = new Drug("Ibuprophen");
            Fakes.FakeStockProvider stockProvider = new Fakes.FakeStockProvider(10);

            Stock stock = new Stock(stockProvider);

            Assert.That(stock.StockCount(drug), Is.EqualTo(10));

            // Act
            stock.DecreaseStock(drug, 1);

            // Assert
            Assert.That(stock.StockCount(drug), Is.EqualTo(9));
        }