public void Setup() { viewsUnderTest.AddView <_Views_TextPage_cshtml>("TextPage"); viewsUnderTest.AddPartial <_Views_Partials_Grid_Fanoe_cshtml>("Grid/fanoe"); viewsUnderTest.AddPartial <_Views_Partials_Grid_Editors_Base_cshtml>("grid/editors/base"); viewsUnderTest.AddPartial <_Views_Partials_Grid_Editors_Textstring_cshtml>("grid/editors/textstring"); viewsUnderTest.AddPartial <_Views_Partials_Grid_Editors_Rte_cshtml>("grid/editors/rte"); viewsUnderTest.AddPartial <_Views_Partials_Grid_Editors_Addition_cshtml>("grid/editors/addition"); }
public void WhenIPressAdd() { viewsUnderTest.AddPartial <_Views_Addition_Index_cshtml>("Index"); umbracoViewsUnderTest.LoadAtRoute("/learn/masterclasses"); umbracoViewsUnderTest.SetupView(); var routeData = new RouteData(); routeData.DataTokens.Add("ParentActionViewContext", viewsUnderTest.Instance.ViewContext); var controller = new AdditionController(); controller.ControllerContext = new ControllerContext(viewsUnderTest.HttpContextBase, routeData, controller); controller.Add(model); controllersUnderTest.Add("Addition", () => controller); UmbracoRouteBindings.EnsureRoutes(); ControllersUnderTestSteps.EnsureControllerFactory(controllersUnderTest); viewsUnderTest.RenderAsHtml(new RenderModel <IPublishedContent>(umbracoViewsUnderTest.Content, CultureInfo.CurrentCulture)); }
public void GivenIHaveRegisteredThePartialWithViewsUnderTest() { viewsUnderTest.AddPartial <_Views_Shared_ControlledPartial_cshtml>("~/Views/Shared/ControlledPartial.cshtml"); }
public void GivenIHaveRegisteredThePartialWithViewsUnderTest() { viewsUnderTest.AddPartial <_Views_Shared_SimplePartial_cshtml>("~/Views/Partials/SimplePartial.cshtml"); }