Beispiel #1
0
        private IBaseTestBuilderWithCaughtException RedirectTo <TController>(LambdaExpression actionCall)
            where TController : ApiController
        {
            var redirectToRouteResult = this.GetRedirectResult <RedirectToRouteResult>(RouteName);

            RouteValidator.Validate <TController>(
                redirectToRouteResult.Request,
                redirectToRouteResult.RouteName,
                redirectToRouteResult.RouteValues,
                actionCall,
                this.ThrowNewRedirectResultAssertionException);

            return(this);
        }
Beispiel #2
0
        private IAndCreatedTestBuilder AtRoute <TController>(LambdaExpression actionCall)
            where TController : ApiController
        {
            RuntimeBinderValidator.ValidateBinding(() =>
            {
                var createdAtRouteResult = this.GetActionResultAsDynamic();
                RouteValidator.Validate <TController>(
                    createdAtRouteResult.Request,
                    createdAtRouteResult.RouteName,
                    createdAtRouteResult.RouteValues,
                    actionCall,
                    new Action <string, string, string>(this.ThrowNewCreatedResultAssertionException));
            });

            return(this);
        }
 public void RouteValidatorTest()
 {
     var routeValidator = new RouteValidator();
     var route = new Route();
     ValidationResults result = routeValidator.Validate(route);
 }
 public void RouteValidatorTest()
 {
     var routeValidator       = new RouteValidator();
     var route                = new Route();
     ValidationResults result = routeValidator.Validate(route);
 }