public void testStoreInventory() { try { //week 3 //IInventorySvc ics = factory.getInventorySvc(); //week 4 IInventorySvc ics = (IInventorySvc)factory.getService("IInventorySvc"); // First let's store the Inventory Assert.True(ics.storeInventory(i)); // Then let's read it back in i = ics.getInventory(i.id); Assert.True(i.validate()); // Update Inventory i.BlackBeansQty = 3; i.CucumberQty = 17; i.SalsaVerdeQty = 12; Assert.True(ics.storeInventory(i)); // Finally, let's cleanup the file that was created Assert.True(ics.deleteInventory(i.id)); } catch (Exception e) { Console.WriteLine("Exception in testStoreInventory: " + e.Message + "\n" + e.StackTrace); Assert.Fail(e.Message + "\n" + e.StackTrace); } }
/// <summary> /// /// </summary> /// <param name="inventorySvc"></param> public void setInventorySvc(IInventorySvc inventorySvc) { this.inventorySvc = inventorySvc; }
public AvailabilityController(IInventorySvc iinventorySvc) { this.iinventorySvc = iinventorySvc; }