Esempio n. 1
0
        /// <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>();
        }
Esempio n. 2
0
        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);
        }
Esempio n. 3
0
        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;
 }
Esempio n. 5
0
 public CustomContextItemResolver(IItemResolver itemResolver, IRouteMapper routeMapper) : base(itemResolver, routeMapper)
 {
 }
Esempio n. 6
0
 public void AddRoute(IRouteMapper route)
 {
     Routes.Add(route);
 }
 public SkipLayoutServiceRequest(IRouteMapper routeMapper)
 {
     Assert.ArgumentNotNull(routeMapper, "routeMapper");
     RouteMapper = routeMapper;
 }
Esempio n. 8
0
 public void TestInitialise()
 {
     _Environment = new MockOwinEnvironment();
     _RouteMapper = Factory.Resolve <IRouteMapper>();
 }
 public RouteController(IRouteMapper mapper, IRouteService routeService)
 {
     _mapper = mapper;
 }
Esempio n. 10
0
 public RouteController(IRouteMapper mapper, IRouteService routeService)
 {
     _mapper = mapper;
 }