Esempio n. 1
0
        public void PushCommand_DummyEventCommand_CommandStatusIsWorking()
        {
            Commander commander = new Commander();
            Command   command   = new DummyEventCommand();

            commander.PushCommand(command);
            Assert.Equal(Command.Status.Working, command.WorkingStatus);
        }
Esempio n. 2
0
        public void PushCommadEent_PushedRightEvent_CommandStatusIsExecuted()
        {
            Commander commander = new Commander();
            Command   command   = new DummyEventCommand();

            commander.PushCommand(command);

            commander.PushCommandEvent(new DummyCommandEvent());
            Assert.Equal(Command.Status.Execute, command.WorkingStatus);
        }
Esempio n. 3
0
        public void PushCommand_EventCommand_CurrentCommandHasValue()
        {
            Commander commander = new Commander();

            Command firstCommand = new DummyEventCommand();

            commander.PushCommand(firstCommand);

            Assert.Same(firstCommand, commander.CurrentCommand);
        }
Esempio n. 4
0
        public void PushCommand_CurrentCommandExist_SecondCommandIsBlocked()
        {
            Commander commander = new Commander();

            Command firstCommand  = new DummyEventCommand();
            Command secondCommand = new DummyEventCommand();

            commander.PushCommand(firstCommand);
            commander.PushCommand(secondCommand);

            Assert.Same(firstCommand, commander.CurrentCommand);
        }