예제 #1
0
            public void IsItemAvailable()
            {
                var fakeInventoryRepository = new FakeInventoryRepository();
                var fridge = new FridgeService(fakeInventoryRepository);

                Assert.AreEqual(false, fridge.IsItemAvailable(inventoryName, 7));
            }
예제 #2
0
            public void IsItemAvailable()
            {
                var fakeInventoryRepository = new FakeInventoryRepository();
                var fridge        = new FridgeService(fakeInventoryRepository);
                var inventoryItem = new InventoryItem(inventoryName, 10);

                fridge.AddIngredientToFridge(inventoryItem);
                Assert.AreEqual(true, fridge.IsItemAvailable(inventoryName, 7));
            }
예제 #3
0
 public bool IsAvailable(string name, double quantity)
 {
     return(_fridgeService.IsItemAvailable(name, quantity));
 }