Example #1
0
        public void TestNewStartCommand()
        {
            StartCommand command = MvcFactory.NewStartCommand();

            Assert.IsNotNull(command);
            Assert.IsInstanceOf(typeof(StartCommandImpl), command);
        }
Example #2
0
        public void TestRun()
        {
            Controller         mockController     = MockMvcFactory.NewMockController(MvcFactory);
            MockControllerImpl mockControllerImpl = (MockControllerImpl)mockController;
            StartCommand       command            = MvcFactory.NewStartCommand();

            command.Process(mockController);
            Assert.IsTrue(mockControllerImpl.StartCommandsProcessed.Contains(command));
        }
Example #3
0
        public void TestProcess()
        {
            Controller         mockController     = MockMvcFactory.NewMockController(this.MvcFactory);
            MockControllerImpl mockControllerImpl = (MockControllerImpl)mockController;
            StartCommand       startCommand       = MvcFactory.NewStartCommand();
            FinishCommand      finishCommand      = MvcFactory.NewFinishCommand();

            mockController.Process(startCommand);
            mockController.Process(finishCommand);
            Assert.IsTrue(mockControllerImpl.StartCommandsProcessed.Contains(startCommand));
            Assert.IsTrue(mockControllerImpl.FinishCommandsProcessed.Contains(finishCommand));
        }
Example #4
0
        public void TestToString()
        {
            StartCommand command = MvcFactory.NewStartCommand();

            Assert.AreEqual("StartCommand", command.ToString());
        }