public void SetUp()
        {
            lifecycle = new SingletonLifecycle();

            disposable1 = new StubDisposable();
            disposable2 = new StubDisposable();


            lifecycle.FindCache().Set(typeof(IGateway), new StubInstance("a"), disposable1);
            lifecycle.FindCache().Set(typeof(IGateway), new StubInstance("b"), disposable2);
            lifecycle.FindCache().Set(typeof(IGateway), new StubInstance("c"), new object());


            lifecycle.EjectAll();
        }
Пример #2
0
        public void SetUp()
        {
            lifecycle = new SingletonLifecycle();

            disposable1 = new StubDisposable();
            disposable2 = new StubDisposable();

            pipeline = new RootPipelineGraph(new PluginGraph());

            lifecycle.FindCache(pipeline).As <LifecycleObjectCache>().Set(typeof(IGateway), new StubInstance("a"), disposable1);
            lifecycle.FindCache(pipeline).As <LifecycleObjectCache>().Set(typeof(IGateway), new StubInstance("b"), disposable2);
            lifecycle.FindCache(pipeline).As <LifecycleObjectCache>().Set(typeof(IGateway), new StubInstance("c"), new object());


            lifecycle.EjectAll(pipeline);
        }
        public when_the_singleton_Lifecycle_ejects_all()
        {
            lifecycle = new SingletonLifecycle();

            disposable1 = new StubDisposable();
            disposable2 = new StubDisposable();

            pipeline = PipelineGraph.BuildRoot(PluginGraph.CreateRoot());

            lifecycle.FindCache(pipeline)
            .As <LifecycleObjectCache>()
            .Set(typeof(IGateway), new StubInstance("a"), disposable1);
            lifecycle.FindCache(pipeline)
            .As <LifecycleObjectCache>()
            .Set(typeof(IGateway), new StubInstance("b"), disposable2);
            lifecycle.FindCache(pipeline)
            .As <LifecycleObjectCache>()
            .Set(typeof(IGateway), new StubInstance("c"), new object());

            lifecycle.EjectAll(pipeline);
        }
Пример #4
0
        public void SetUp()
        {
            lifecycle = new SingletonLifecycle();

            disposable1 = new StubDisposable();
            disposable2 = new StubDisposable();

            pipeline = PipelineGraph.BuildRoot(PluginGraph.CreateRoot());

            lifecycle.FindCache(pipeline)
                .As<LifecycleObjectCache>()
                .Set(typeof (IGateway), new StubInstance("a"), disposable1);
            lifecycle.FindCache(pipeline)
                .As<LifecycleObjectCache>()
                .Set(typeof (IGateway), new StubInstance("b"), disposable2);
            lifecycle.FindCache(pipeline)
                .As<LifecycleObjectCache>()
                .Set(typeof (IGateway), new StubInstance("c"), new object());


            lifecycle.EjectAll(pipeline);
        }
Пример #5
0
        public void SetUp()
        {
            lifecycle = new SingletonLifecycle();

            disposable1 = new StubDisposable();
            disposable2 = new StubDisposable();

            lifecycle.FindCache().Set(typeof (IGateway), new StubInstance("a"), disposable1);
            lifecycle.FindCache().Set(typeof (IGateway), new StubInstance("b"), disposable2);
            lifecycle.FindCache().Set(typeof (IGateway), new StubInstance("c"), new object());

            lifecycle.EjectAll();
        }