public void addToSellTest()
        {
            AlchymyShoppe.Models.AlchymyShoppe     alchShoppe = new AlchymyShoppe.Models.AlchymyShoppe();
            List <AlchymyShoppe.Models.Ingredient> items      = new List <AlchymyShoppe.Models.Ingredient>();

            AlchymyShoppe.Models.Rarity         rarity    = new AlchymyShoppe.Models.Rarity();
            AlchymyShoppe.Models.AlchymicEffect effect    = new AlchymyShoppe.Models.AlchymicEffect();
            AlchymyShoppe.Models.Player         player    = new AlchymyShoppe.Models.Player("Bill", 456);
            AlchymyShoppe.Models.Potion         potion    = new AlchymyShoppe.Models.Potion("PotionX", "", 200, rarity, items, effect);
            AlchymyShoppe.Models.Inventory      inventory = new AlchymyShoppe.Models.Inventory();
            player.setInventory(inventory);

            player.addItemToInventory(potion);

            AlchymyShoppe.Models.Potion potion2 = new AlchymyShoppe.Models.Potion("PotionX", "", 200, rarity, items, effect);
            player.addItemToInventory(potion2);
            alchShoppe.addToSell(player, potion);
            Assert.IsFalse(player.getInventory().getItems().Contains(potion), "Item not removed from player inventory");
            Assert.IsTrue(player.getInventory().getItems().Contains(potion2), "Does not have potion2");
        }
Exemplo n.º 2
0
 public void setInventory(Inventory inventory)
 {
     this.inventory = inventory;
 }