public void NoFindItemTest() { Item TestItem = new Item(new string[] { "potato", "baked" }, "baked potato", "a baked potato"); Inventory TestInventory = new Inventory(); TestInventory.PutItem(TestItem); Assert.IsFalse(TestInventory.HasItem("chicken")); }
public void NoFindItemTest() { Item TestItem = new Item (new string[] { "potato", "baked" }, "baked potato", "a baked potato"); Inventory TestInventory = new Inventory (); TestInventory.PutItem (TestItem); Assert.IsFalse (TestInventory.HasItem ("chicken")); }
public void ListItemTest() { Item TestItem = new Item(new string[] { "potato", "baked" }, "baked potato", "a baked potato"); Item TestItem2 = new Item(new string[] { "chicken", "baked" }, "baked chicken", "a baked chicken"); Inventory TestInventory = new Inventory(); TestInventory.PutItem(TestItem); TestInventory.PutItem(TestItem2); //Assert.IsTrue (TestItem.ShortDesc == ("A baked potato potato.")); //ItemList.Add (Check.Name + "\t" + Check.ShortDesc + "\n"); //"baked potato" + "\t" + "A baked potato potato." + "\n" Assert.IsTrue(TestInventory.HasItem("potato")); Assert.IsTrue(TestInventory.HasItem("chicken")); Assert.IsTrue(TestInventory.ItemList().Contains("baked potato" + "\t" + "A baked potato potato." + "\n")); Assert.IsTrue(TestInventory.ItemList().Contains("baked chicken" + "\t" + "A baked chicken chicken." + "\n")); }
public void FetchItemTest() { Item TestItem = new Item(new string[] { "potato", "baked" }, "baked potato", "a baked potato"); Inventory TestInventory = new Inventory(); TestInventory.PutItem(TestItem); Assert.IsTrue(TestInventory.FetchItem("baked") == TestItem); Assert.IsTrue(TestInventory.HasItem("baked")); }
public void ListItemTest() { Item TestItem = new Item (new string[] { "potato", "baked" }, "baked potato", "a baked potato"); Item TestItem2 = new Item (new string[] { "chicken", "baked" }, "baked chicken", "a baked chicken"); Inventory TestInventory = new Inventory (); TestInventory.PutItem (TestItem); TestInventory.PutItem (TestItem2); //Assert.IsTrue (TestItem.ShortDesc == ("A baked potato potato.")); //ItemList.Add (Check.Name + "\t" + Check.ShortDesc + "\n"); //"baked potato" + "\t" + "A baked potato potato." + "\n" Assert.IsTrue (TestInventory.HasItem ("potato")); Assert.IsTrue (TestInventory.HasItem ("chicken")); Assert.IsTrue (TestInventory.ItemList ().Contains("baked potato" + "\t" + "A baked potato potato." + "\n")); Assert.IsTrue (TestInventory.ItemList ().Contains("baked chicken" + "\t" + "A baked chicken chicken." + "\n")); }
public void FetchItemTest() { Item TestItem = new Item (new string[] { "potato", "baked" }, "baked potato", "a baked potato"); Inventory TestInventory = new Inventory (); TestInventory.PutItem (TestItem); Assert.IsTrue (TestInventory.FetchItem ("baked") == TestItem); Assert.IsTrue (TestInventory.HasItem ("baked")); }