public void ExportProviderResolvesServiceRegisteredByTypeTest()
        {
            // Setup
            var builder = new ContainerBuilder();
            builder.RegisterType<AutofacOnlyComponent1>().As<IAutofacOnlyComponent>();
            var autofacContainer = builder.Build();
            var adapter = new AutofacContainerAdapter(autofacContainer);
            var provider = new ContainerExportProvider(adapter);

            var component = provider.GetExportedValue<IAutofacOnlyComponent>();
            Assert.That(component, Is.Not.Null);
            Assert.That(component.GetType(), Is.EqualTo(typeof(AutofacOnlyComponent1)));
        }
        public void ExportProviderResolvesServiceRegisteredByTypeAndRegistrationNameTest()
        {
            // Setup
            var unityContainer = new UnityContainer();
            var adapter = new UnityContainerAdapter(unityContainer);
            var provider = new ContainerExportProvider(adapter);

            // Registration
            unityContainer.RegisterType<IUnityOnlyComponent, UnityOnlyComponent2>("unityComponent2");

            var component = provider.GetExportedValue<IUnityOnlyComponent>("unityComponent2");
            Assert.That(component, Is.Not.Null);
            Assert.That(component.GetType(), Is.EqualTo(typeof(UnityOnlyComponent2)));
        }