public void GetItem() { var fakeInventoryRepository = new FakeInventoryRepository(); var fridge = new FridgeService(fakeInventoryRepository); var result = fridge.GetInventoryItem("Gorgonzola"); Assert.AreEqual(null, result); }
public void GetNonExistingItem() { var fakeInventoryRepository = new FakeInventoryRepository(); var fridge = new FridgeService(fakeInventoryRepository); var inventoryItem = new InventoryItem(inventoryName, 10); fridge.AddIngredientToFridge(inventoryItem); var result = fridge.GetInventoryItem("Gorgonzola"); Assert.AreEqual(null, result); }
public void GetExistingItem() { var fakeInventoryRepository = new FakeInventoryRepository(); var fridge = new FridgeService(fakeInventoryRepository); var inventoryItem = new InventoryItem(inventoryName, 10); fridge.AddIngredientToFridge(inventoryItem); var result = fridge.GetInventoryItem(inventoryName); Assert.AreEqual(inventoryName, result.Name); Assert.AreEqual(10, result.Quantity); }