public void From <TController>(Expression <Func <TController, ActionResult> > action) where TController : Controller { var expressionReader = new ExpressionReader(); var fromProps = expressionReader.Read(action); WebRouteAssert.GeneratesActionUrl(Routes, HttpMethod.Get, Url, fromProps, appPath: requestAppPath, requestBody: requestBody); }
public static void GeneratesActionUrl(RouteCollection routes, HttpMethod httpMethod, string expectedUrl, IDictionary <string, string> fromProps, string appPath = null, string requestBody = null) { var fromRouteValues = new RouteValues(fromProps); WebRouteAssert.GeneratesActionUrl(routes, httpMethod, expectedUrl, fromRouteValues, appPath, requestBody); }
public static void GeneratesActionUrl(RouteCollection routes, string expectedUrl, string action, HttpMethod httpMethod = null, string appPath = null, string requestBody = null) { if (httpMethod == null) { httpMethod = HttpMethod.Get; } WebRouteAssert.GeneratesActionUrl(routes, httpMethod, expectedUrl, action, null, appPath, new RouteValueDictionary(), requestBody); }
public static void GeneratesActionUrl(RouteCollection routes, string expectedUrl, object fromProps, HttpMethod httpMethod = null, string appPath = "/", string requestBody = null) { if (httpMethod == null) { httpMethod = HttpMethod.Get; } var propertyReader = new PropertyReader(); var expectedProps = propertyReader.Properties(fromProps); WebRouteAssert.GeneratesActionUrl(routes, httpMethod, expectedUrl, expectedProps, appPath, requestBody); }
public static void GeneratesActionUrl(RouteCollection routes, string expectedUrl, IDictionary <string, string> fromProps, string appPath = "/") { WebRouteAssert.GeneratesActionUrl(routes, HttpMethod.Get, expectedUrl, fromProps, appPath, null); }