示例#1
0
        public void Render_NoArea_SetsSelectedView()
        {
            var reference = new ControllerViewReference(services, typeof(TestController), "", "Test", "Action");

            reference.Render();

            Assert.AreEqual(@"Test\Action", controller.SelectedViewName);
        }
		public void Render_NoArea_SetsSelectedView()
		{
			var reference = new ControllerViewReference(services, typeof (TestController), "", "Test", "Action");

			reference.Render();
			
			Assert.AreEqual(@"Test\Action", controller.SelectedViewName);
		}
示例#3
0
        public void Render_NoArea_SetsSelectedView()
        {
            Controller controller = new TestController();

            controller.ControllerContext = _mocks.Stub <IControllerContext>();
            ControllerViewReference reference =
                new ControllerViewReference(_services, typeof(TestController), "", "Test", "Action");

            using (_mocks.Unordered())
            {
                Expect.Call(_services.Controller).Return(controller).Repeat.Any();
            }

            _mocks.ReplayAll();
            reference.Render();
            _mocks.VerifyAll();

            Assert.AreEqual(@"Test\Action", controller.SelectedViewName);
        }
		public void Render_NoArea_SetsSelectedView()
		{
			Controller controller = new TestController();
			controller.ControllerContext = _mocks.Stub<IControllerContext>();
			ControllerViewReference reference =
				new ControllerViewReference(_services, typeof (TestController), "", "Test", "Action");

			using (_mocks.Unordered())
			{
				Expect.Call(_services.Controller).Return(controller).Repeat.Any();
			}

			_mocks.ReplayAll();
			reference.Render();
			_mocks.VerifyAll();

			Assert.AreEqual(@"Test\Action", controller.SelectedViewName);
		}