Ejemplo n.º 1
0
        public void testTwoLinkSwitchToInteractable()
        {
            bool passed = false;

            targetObject = new Door();
            lever = new Switch(targetObject);

            if (lever.target != null)
            {
                passed = true;
            }

            if (!passed)
            {
                throw new System.ArgumentException("Switch did not link to object", "testTwoLinkSwitchToInteractable");
            }
        }
Ejemplo n.º 2
0
        public void testThreeActOnSwichToObject()
        {
            bool passed = false;
            bob = new Mage();
            targetObject = new Door(Direction.UP);
            lever = new Switch(targetObject);

            Direction first = targetObject.directionFacing;
            lever.actOn(bob);
            Direction second = targetObject.directionFacing;

            if (first != second)
            {
                passed = true;
            }

            if (!passed)
            {
                throw new System.ArgumentException("Switch acting on object", "testThreeActOnSwichToObject");
            }
        }