コード例 #1
0
 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>"));
 }
コード例 #2
0
ファイル: SparkViewFactoryTests.cs プロジェクト: bbarry/spark
 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>"));
 }
コード例 #3
0
 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>"));
 }