Exemple #1
0
        public void PutAnInterceptorIntoTheInterceptionChainOfAPluginFamilyInTheDSL()
        {
            var lifecycle = new StubbedLifecycle();

            var registry = new Registry();

            registry.For <IGateway>().LifecycleIs(lifecycle);

            var pluginGraph = registry.Build();

            pluginGraph.Families[typeof(IGateway)].Lifecycle.ShouldBeTheSameAs(lifecycle);
        }
        public void PutAnInterceptorIntoTheInterceptionChainOfAPluginFamilyInTheDSL()
        {
            var lifecycle = new StubbedLifecycle();

            var registry = new Registry();
            registry.BuildInstancesOf<IGateway>().LifecycleIs(lifecycle);

            PluginGraph pluginGraph = registry.Build();

            pluginGraph.FindFamily(typeof (IGateway)).Lifecycle.ShouldBeTheSameAs(lifecycle);
        }