Ejemplo n.º 1
0
        public void StorageAndItem_GrowAndSellToShop_ShopItemAmountIncrease()
        {
            IContainer FirstTrousers = new Trousers();
            IChronic   GanjaTest     = new MasterKush();
            IContainer MasonJar      = new SmallMasonJar();

            for (int i = 0; i < GanjaTest.SeedingAge; i++)
            {
                GanjaTest.Grow(Water.Low, Light.None, Food.None);
            }

            for (int i = 0; i < GanjaTest.FloweringAge; i++)
            {
                GanjaTest.Grow(Water.Low, Light.Spring, Food.None);
            }

            for (int i = 0; i < 20; i++)
            {
                GanjaTest.Grow(Water.Medium, Light.Summer, Food.None);
            }

            IChronic SellTest = GanjaTest.Harvest().Harvest;

            for (int i = 0; i < SellTest.DryingAge; i++)
            {
                SellTest.Dry();
            }

            SellTest.Weck();
            for (int i = 0; i < 14; i++)
            {
                SellTest.Cure(MasonJar);
            }

            SellTest.Finish();
            FirstTrousers.Add((IItem)SellTest);

            IShop shop = new Shop();

            shop.Sell((IItem)SellTest);

            Assert.IsTrue(shop.ItemAmount == 1);
        }