Esempio n. 1
0
        public void TestCancelMapMenu()
        {
            session.StartTurn(session.PlayerTeam);

            //select empty space
            session.OnConfirmationInputReceived(0, 0);

            MenuClosedAction menData = session.OnNegationInputReceived()[0] as MenuClosedAction;

            Assert.IsNotNull(menData, "Did not pop a menu");
            Assert.IsTrue(menData.ClosedMenu.MenuType == MenuTypes.Map, "Wasn't the map menu");
        }
Esempio n. 2
0
        public void TestCancelUnitOrderMenu()
        {
            session.StartTurn(session.PlayerTeam);

            //select Hector
            session.OnConfirmationInputReceived(20, 13);

            //move one square to the right
            session.OnPositionHover(21, 13);

            //select the square to move him there.
            session.OnConfirmationInputReceived(21, 13);

            MenuClosedAction menData = session.OnNegationInputReceived()[0] as MenuClosedAction;

            Assert.IsNotNull(menData, "Did not pop a menu");
            Assert.IsTrue(!session.MenuOpen && session.UnitSelected, "Closed both selection & unit actions at once");

            session.OnNegationInputReceived();
            Assert.IsFalse(session.MenuOpen, "Failed to close all open windows");
        }