Пример #1
0
        public void CollapseStoneTest()
        {
            Stone stone = new ValuableStone(5);

            stone = new CollapseStone(5, stone);

            Assert.AreEqual(stone.GetInfo(), "Cost: " + 7.5 + ", weight: " + 5 + ", description: Valuable stone, will destroy on every turn, stone health: " + 5);
            Assert.AreEqual(stone.Weight, 5);
            Assert.AreEqual(stone.StoneHealth, 5);
            Assert.AreEqual(stone.Collapses, true);
            Assert.AreEqual(stone.Decryption, false);
            Assert.AreEqual(stone.GetCost(), stone.Weight * 1.5);
            Assert.AreEqual(stone.Damage, 0);
            Assert.AreEqual(stone.Description, "Valuable stone, will destroy on every turn");

            stone.DecreaseHealth();

            Assert.AreEqual(stone.StoneHealth, 4);
        }
Пример #2
0
        public void PoisonedCollapsedStoneTest()
        {
            Stone stone = new ValuableStone(5);

            stone = new PoisonedStone(5, stone);
            stone = new CollapseStone(5, stone);

            Assert.AreEqual(stone.GetInfo(), "Cost: " + 15 + ", weight: " + 5 + ", description: Valuable stone" +
                            ", will harm on every turn (ciborgs only), will destroy on every turn, stone health: " + 5 + ", damage: " + 5);
            Assert.AreEqual(stone.Weight, 5);
            Assert.AreEqual(stone.StoneHealth, 5);
            Assert.AreEqual(stone.Collapses, true);
            Assert.AreEqual(stone.Decryption, false);
            Assert.AreEqual(stone.GetCost(), stone.Weight * 3);
            Assert.AreEqual(stone.Damage, 5);
            Assert.AreEqual(stone.Description, "Valuable stone, will harm on every turn (ciborgs only), will destroy on every turn");

            stone.DecreaseHealth();

            Assert.AreEqual(stone.StoneHealth, 4);
        }