public void ControllerHelpersCanBeUsedWhenRenderingMailView() { controller = new Helpers.HomeController(); controllerContext.ControllerDescriptor = serviceProvider.ControllerDescriptorProvider.BuildDescriptor(controller); controllerContext.Helpers.Add("bar", new Helpers.TestingHelper()); mocks.ReplayAll(); manager.Process(string.Format("Home{0}ControllerHelperAttributeCanBeUsed", Path.DirectorySeparatorChar), null, output, null); Assert.That(output.ToString().Contains("<p>Hello</p>")); }
public void ControllerHelpersCanBeUsedWhenRenderingMailView() { controller = new Helpers.HomeController(); controllerContext.ControllerDescriptor = serviceProvider.ControllerDescriptorProvider.BuildDescriptor(controller); controllerContext.Helpers.Add("bar", new Helpers.TestingHelper()); mocks.ReplayAll(); manager.Process("Home\\ControllerHelperAttributeCanBeUsed", null, output, null); Assert.That(output.ToString().Contains("<p>Hello</p>")); }
public void ControllerHelperAttributeCanBeUsed() { controller = new Helpers.HomeController(); controllerContext.ControllerDescriptor = serviceProvider.ControllerDescriptorProvider.BuildDescriptor(controller); controllerContext.Helpers.Add("bar", new Helpers.TestingHelper()); mocks.ReplayAll(); manager.Process("Home\\ControllerHelperAttributeCanBeUsed", output, engineContext, controller, controllerContext); Assert.That(output.ToString().Contains("<p>Hello</p>")); }