Esempio n. 1
0
        public void CreateBattleArmy()
        {
            Unit angel    = new UnitAngel();
            Unit skeleton = new UnitSkeleton();

            UnitsStack stack1 = new UnitsStack(angel, 10);
            UnitsStack stack2 = new UnitsStack(skeleton, 42);

            List <UnitsStack> stacks = new List <UnitsStack> {
                stack1, stack2
            };

            Army       baseArmy = new Army(stacks);
            BattleArmy army     = new BattleArmy(baseArmy, null);

            Assert.AreEqual(baseArmy, army.GetBaseArmy());
            Assert.IsNull(army.GetBattle());
            Assert.AreEqual(stack1, army.GetBaseArmy().GetStacks()[0]);
            Assert.AreEqual(stack2, army.GetBaseArmy().GetStacks()[1]);
            Assert.AreEqual(stack1, army.GetStack(0).GetBaseStack());
            Assert.AreEqual(stack2, army.GetStack(1).GetBaseStack());
        }