/// <summary> /// Initializes a new instance of the <see cref="RequestProcessor"/> class. /// </summary> /// <param name="bootstrapper">Contains application settings.</param> protected RequestProcessor(Bootstrapper bootstrapper) { Check.IsNotNull(bootstrapper, nameof(bootstrapper)); this.bootstrapper = bootstrapper; this.mapper = bootstrapper.GetService <IRouteMapper>(); }
public void SetUp() { this.bootstrapper = Substitute.For <Bootstrapper>(); this.mapper = Substitute.For <IRouteMapper>(); this.bootstrapper.GetService <IRouteMapper>().Returns(this.mapper); this.processor = new HttpContextProcessor(this.bootstrapper); }
public void SetUp() { this.bootstrapper = Substitute.For <Bootstrapper>(); this.mapper = Substitute.For <IRouteMapper>(); this.request = Substitute.For <IRequestData>(); this.bootstrapper.GetService <IRouteMapper>().Returns(this.mapper); // NOTE: We're using ForPartsOf - make sure that all setup calls // in tests use an argument matcher to avoid calling the real // code: http://nsubstitute.github.io/help/partial-subs/ this.processor = Substitute.ForPartsOf <RequestProcessor>(this.bootstrapper); }
public IdentifyContactViaAlias(IRouteMapper routeMapper) { Assert.ArgumentNotNull(routeMapper, nameof(routeMapper)); RouteMapper = routeMapper; }
public CustomContextItemResolver(IItemResolver itemResolver, IRouteMapper routeMapper) : base(itemResolver, routeMapper) { }
public void AddRoute(IRouteMapper route) { Routes.Add(route); }
public SkipLayoutServiceRequest(IRouteMapper routeMapper) { Assert.ArgumentNotNull(routeMapper, "routeMapper"); RouteMapper = routeMapper; }
public void TestInitialise() { _Environment = new MockOwinEnvironment(); _RouteMapper = Factory.Resolve <IRouteMapper>(); }
public RouteController(IRouteMapper mapper, IRouteService routeService) { _mapper = mapper; }