Beispiel #1
0
 public void SetUp()
 {
     _module = new FakeModule();
 }
 private Response ResolveAndInvokeRoute(JessModule module, HttpContext context)
 {
     var route = module.Routes.Single(r => r.Route == _route);
     var method = context.Request.HttpMethod.ToUpper();
     return route.Actions.ContainsKey(method) ? route.Actions[method].Invoke(BuildParameterObject(context)) : 405;
 }
Beispiel #3
0
        public void Constructor_WithBasePathModule_ShouldContainRouteWithBasePathPrepended()
        {
            _module = new BasePathModule();

            Assert.That(_module.Routes.Count(r => r.Url == "base/route"), Is.EqualTo(1));
        }
 private Response InvokeBeforeFilters(JessModule module)
 {
     return module.Before != null ? module.Before.Invoke(_requestContext) : null;
 }