public Inventory CreateInventory(string title, ApplicationUser owner) { Inventory my_Inventory = new Inventory ( title, owner ); context.Inventories.Add(my_Inventory); context.SaveChanges(); return my_Inventory; }
public void DeleteInventory(Inventory removed_inventory) { Inventory my_inventory = removed_inventory; context.Inventories.Remove(my_inventory); context.SaveChanges(); }
public void InventorEnsureInventoryPropertiresWork() { //Begin Arrange Inventory InventoryContent = new Inventory { FabricType = "linen", FabricColor = "tan", FabricAmount = 5, FabricUnit = "yards" }; //Inventory.Project.Add(ProjectItems); //End Arrange //Begin Act //End Act //Begin Assert Assert.AreEqual("linen", InventoryContent.FabricType); Assert.AreEqual("tan", InventoryContent.FabricColor); Assert.AreEqual(5, InventoryContent.FabricAmount); Assert.AreEqual("yards", InventoryContent.FabricUnit); //End Assert }
public void InventoryEnsureIcanCreateAnInventory() { Inventory inventory = new Inventory(); Assert.IsNotNull(inventory); }