コード例 #1
0
		public void ActionIsExecuted()
		{
			ControllerExecutor executor = new ControllerExecutor(controller, testContext);

			executor.Execute(executor.SelectAction());

			Assert.IsTrue(controller.wasRun, "ControllerExecutor failed to execute the action");
		}
コード例 #2
0
		public void ActionIsSelectedBasedOnUrlActionPiece()
		{
			ControllerExecutor executor = new ControllerExecutor(controller, testContext);

			ActionExecutor actionExec = executor.SelectAction();

			Assert.IsNotNull(actionExec);
			Assert.AreEqual(ActionType.Method, actionExec.ActionType);
			Assert.AreEqual("Index", actionExec.Name);
		}
コード例 #3
0
		public void ActionIsSelectedAndRun()
		{
			ControllerExecutor executor = new ControllerExecutor(controller, testContext);

			ActionExecutor actionExec = executor.SelectAction();

			Assert.IsNotNull(actionExec);
			Assert.AreEqual(ActionType.Method, actionExec.ActionType);
			Assert.AreEqual("Index", actionExec.Name);

			executor.Execute(actionExec);

			Assert.IsTrue(controller.wasRun);
		}