public void GetAssemblyScannedAdapter()
        {
            IContainerAdapterAccessor adapterAccessor = new ContainerAdapterAccessor(true);
            IContainerAdapter         adapter         = adapterAccessor.GetAdapter(TestConstants.AutofacContainerName);

            Assert.IsNotNull(adapter);
        }
        public void AddAdapterTwice()
        {
            IContainerAdapterAccessor adapterAccessor = new ContainerAdapterAccessor();
            string newAdapterKey = Guid.NewGuid().ToString();

            IContainerAdapter adapter = adapterAccessor.GetAdapter(newAdapterKey);
            Assert.IsNull(adapter);

            IWindsorContainer container = new WindsorContainer();
            IContainerAdapter addedAdapter = new WindsorContainerAdapter(container);
            adapterAccessor.AddAdapter(newAdapterKey, addedAdapter);

            IWindsorContainer newContainer = new WindsorContainer();
            IContainerAdapter newAdapter = new WindsorContainerAdapter(newContainer);
            adapterAccessor.AddAdapter(newAdapterKey, addedAdapter);
            IContainerAdapter retrievedAdapter = adapterAccessor.GetAdapter(newAdapterKey);
            Assert.IsNotNull(newAdapter);
            Assert.AreEqual(retrievedAdapter, newAdapter);
        }
        public void AddAdapterTwice()
        {
            IContainerAdapterAccessor adapterAccessor = new ContainerAdapterAccessor();
            string newAdapterKey = Guid.NewGuid().ToString();

            IContainerAdapter adapter = adapterAccessor.GetAdapter(newAdapterKey);

            Assert.IsNull(adapter);

            IWindsorContainer container    = new WindsorContainer();
            IContainerAdapter addedAdapter = new WindsorContainerAdapter(container);

            adapterAccessor.AddAdapter(newAdapterKey, addedAdapter);

            IWindsorContainer newContainer = new WindsorContainer();
            IContainerAdapter newAdapter   = new WindsorContainerAdapter(newContainer);

            adapterAccessor.AddAdapter(newAdapterKey, addedAdapter);
            IContainerAdapter retrievedAdapter = adapterAccessor.GetAdapter(newAdapterKey);

            Assert.IsNotNull(newAdapter);
            Assert.AreEqual(retrievedAdapter, newAdapter);
        }
 public void GetAssemblyScannedAdapter()
 {
     IContainerAdapterAccessor adapterAccessor = new ContainerAdapterAccessor(true);
     IContainerAdapter adapter = adapterAccessor.GetAdapter(TestConstants.AutofacContainerName);
     Assert.IsNotNull(adapter);
 }