protected void setup()
        {
            Host = new InMemoryHost(startup: new StartupProperties
            {
                OpenRasta =
                {
                    Errors                           =
                    {
                        HandleAllExceptions          = false,
                        HandleCatastrophicExceptions = false
                    }
                }
            });

            Pipeline = null;
            _actions = new Dictionary <Type, Func <ICommunicationContext, Task <PipelineContinuation> > >();
            var manager = Host.HostManager;

            Resolver.AddDependencyInstance(typeof(IErrorCollector), Errors = new TestErrorCollector());
            Resolver.AddDependency <IPathManager, PathManager>();

            _ambientContext = new ContextScope(new AmbientContext());
            _requestScope   = Resolver.CreateRequestScope();
            manager.SetupCommunicationContext(Context = new WriteTrackingResponseCommunicationContext(InnerContext = new InMemoryCommunicationContext()));
        }
Ejemplo n.º 2
0
        protected override void SetUp()
        {
            base.SetUp();
            Host     = new InMemoryHost();
            Pipeline = null;
            _actions = new Dictionary <Type, Func <ICommunicationContext, Task <PipelineContinuation> > >();
            var manager = Host.HostManager;

            Resolver.AddDependencyInstance(typeof(IErrorCollector), Errors = new TestErrorCollector());
            Resolver.AddDependency <IPathManager, PathManager>();

            manager.SetupCommunicationContext(Context = new InMemoryCommunicationContext());
            DependencyManager.SetResolver(Resolver);
        }