public void should_log_the_first_url_policy_that_matches() { buildRoute(x => x.SomeMethod(null), c => { }); var log = observer.GetLog(lastCall); log.Where(s => s.Contains(": UrlPolicy")).Any().ShouldBeTrue(); }
public void should_log_when_default_route_found() { var call = new ActionCall(typeof(TestController), _method); _policy.Matches(call, _log); _log.GetLog(call).ShouldNotBeEmpty(); }
public void should_log_for_each_method_that_applies() { var call = ActionCall.For <SampleForConstraintPolicy>(c => c.QueryPartsAndAddCommand()); _policy.Apply(call, _routeDefinition, _observer); var log = _observer.GetLog(call); log.First().ShouldContain("GET"); log.Skip(1).First().ShouldContain("POST"); }