예제 #1
0
        public Inventory CreateInventory(string title, ApplicationUser owner)
        {
            Inventory my_Inventory = new Inventory ( title, owner );
            context.Inventories.Add(my_Inventory);
            context.SaveChanges();

            return my_Inventory;
        }
예제 #2
0
 public void DeleteInventory(Inventory removed_inventory)
 {
     Inventory my_inventory = removed_inventory;
     context.Inventories.Remove(my_inventory);
     context.SaveChanges();
 }
예제 #3
0
        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
        }
예제 #4
0
 public void InventoryEnsureIcanCreateAnInventory()
 {
     Inventory inventory = new Inventory();
     Assert.IsNotNull(inventory);
 }