Exemplo n.º 1
0
        public void AfterScenario()
        {
            //iocContainer.Teardown();
            var applicationModules = iocContainer.ResolveAll <IDynamicApplicationModule>();

            foreach (var applicationModule in applicationModules)
            {
                applicationModule.Stop();
            }
        }
        public void ResolveAll_CollectionOfTypesIsRegisteredByInterface_ColelctionOfImplementationsIsResolved()
        {
            var container = new ObjectContainerAdapter(new ObjectContainer());

            container.RegisterCollection <IDependency>(new[]
                                                       { typeof(DependencyA), typeof(DependencyB) }, true);

            var dependencies = container.ResolveAll <IDependency>().ToArray();

            dependencies[0].Should().BeOfType <DependencyA>();
            dependencies[1].Should().BeOfType <DependencyB>();
        }