Example #1
0
        public void UnitThatWasUnableToMoveCanNowMove()
        {
            Unit mageOne = new Mage(Team.RED);
            // Make sure the mage can move
            bool expectedResult = true;
            bool actualResult   = mageOne.CanTakeAction();

            Assert.AreEqual(expectedResult, actualResult);

            // Tell the mage it is unable to move
            mageOne.isNowUnableToTakeAction();

            // Make sure the mage cannot move
            expectedResult = false;
            actualResult   = mageOne.CanTakeAction();
            Assert.AreEqual(expectedResult, actualResult);

            // Tell the mage it is able to
            mageOne.isNowAbleToTakeAction();

            // check if the mage is unable to move
            expectedResult = true;
            actualResult   = mageOne.CanTakeAction();
            Assert.AreEqual(expectedResult, actualResult);
        }