public NancyEngineFixture() { this.modules = new[] { new FakeNancyModuleWithBasePath() }; this.locator = A.Fake<INancyModuleLocator>(); this.resolver = A.Fake<IRouteResolver>(); this.engine = new NancyEngine(this.locator, this.resolver); }
public NancyEngineFixture() { this.modules = new[] { new FakeNancyModuleWithBasePath() }; this.locator = A.Fake <INancyModuleLocator>(); this.resolver = A.Fake <IRouteResolver>(); this.engine = new NancyEngine(this.locator, this.resolver); }
public NancyEngineFixture() { this.modules = new NancyApplication(new DefaultModuleActivator()).GetModules(); this.locator = A.Fake<INancyModuleLocator>(); this.resolver = A.Fake<IRouteResolver>(); this.application = A.Fake<INancyApplication>(); this.engine = new NancyEngine(this.locator, this.resolver, this.application); }
/// <summary> /// Initializes a new instance of the <see cref="NancyEngine"/> class. /// </summary> /// <param name="locator">An <see cref="INancyModuleLocator"/> instance, that will be used to locate <see cref="NancyModule"/> instances</param> /// <param name="resolver">An <see cref="IRouteResolver"/> instance that will be used to resolve a route, from the modules, that matches the incoming <see cref="Request"/>.</param> public NancyEngine(INancyModuleLocator locator, IRouteResolver resolver) { if (locator == null) { throw new ArgumentNullException("locator", "The locator parameter cannot be null."); } if (resolver == null) { throw new ArgumentNullException("resolver", "The resolver parameter cannot be null."); } this.locator = locator; this.resolver = resolver; }
/// <summary> /// Initializes a new instance of the <see cref="NancyWcfGenericService"/> class. /// </summary> /// <param name="moduleLocator">An <see cref="INancyModuleLocator"/> instance that will be used by Nancy to decect available modules.</param> public NancyWcfGenericService(INancyModuleLocator moduleLocator) { engine = new NancyEngine(moduleLocator, new RouteResolver(), new NancyApplication()); }