public void TestNewStartCommand() { StartCommand command = MvcFactory.NewStartCommand(); Assert.IsNotNull(command); Assert.IsInstanceOf(typeof(StartCommandImpl), command); }
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)); }
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)); }
public void TestToString() { StartCommand command = MvcFactory.NewStartCommand(); Assert.AreEqual("StartCommand", command.ToString()); }