Added RenderRouteHandlerTests
This commit is contained in:
@@ -51,12 +51,7 @@ namespace Umbraco.Web
|
||||
ModelBinders.Binders.Add(new KeyValuePair<Type, IModelBinder>(typeof(RenderModel), new RenderModelBinder()));
|
||||
|
||||
//set routes
|
||||
var route = RouteTable.Routes.MapRoute(
|
||||
"Umbraco_default",
|
||||
"Umbraco/RenderMvc/{action}/{id}",
|
||||
new { controller = "RenderMvc", action = "Index", id = UrlParameter.Optional }
|
||||
);
|
||||
route.RouteHandler = new RenderRouteHandler(ControllerBuilder.Current.GetControllerFactory());
|
||||
CreateRoutes();
|
||||
|
||||
//find and initialize the application startup handlers, we need to initialize this resolver here because
|
||||
//it is a special resolver where they need to be instantiated first before any other resolvers in order to bind to
|
||||
@@ -107,6 +102,20 @@ namespace Umbraco.Web
|
||||
return this;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates the routes
|
||||
/// </summary>
|
||||
protected internal void CreateRoutes()
|
||||
{
|
||||
//set routes
|
||||
var route = RouteTable.Routes.MapRoute(
|
||||
"Umbraco_default",
|
||||
"Umbraco/RenderMvc/{action}/{id}",
|
||||
new { controller = "RenderMvc", action = "Index", id = UrlParameter.Optional }
|
||||
);
|
||||
route.RouteHandler = new RenderRouteHandler(ControllerBuilder.Current.GetControllerFactory());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initializes all web based and core resolves
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user