public void should_add_an_HttpMethodConstraint_to_the_route_definition_for_the_method_that_applies() { _policy.Apply(ActionCall.For <SampleForConstraintPolicy>(c => c.QueryParts()), _routeDefinition, _observer); _argsToAddConstraint.First <string>().ShouldEqual(RouteConstraintPolicy.HTTP_METHOD_CONSTRAINT); _argsToAddConstraint.Second <IRouteConstraint>().ShouldBeOfType <HttpMethodConstraint>() .AllowedMethods.ShouldHaveTheSameElementsAs("GET"); }
public void should_add_an_HttpMethodConstraint_to_the_route_definition_for_multiple_methods_that_apply() { _policy.Apply(ActionCall.For <SampleForConstraintPolicy>(c => c.QueryPartsAndAddCommand()), _routeDefinition); _routeDefinition.AllowedHttpMethods.ShouldHaveTheSameElementsAs("GET", "POST"); }
public void should_add_an_HttpMethodConstraint_to_the_route_definition_for_the_method_that_applies() { _policy.Apply(ActionCall.For <SampleForConstraintPolicy>(c => c.QueryParts()), _routeDefinition, _observer); _routeDefinition.AllowedHttpMethods.ShouldHaveTheSameElementsAs("GET"); }