public void NonSelfScanningContainerAdapters() { ContainerAdapterAccessor.Clear(); IContainerManager containerManager = new ContainerManager(); Assert.IsNull(containerManager.Resolve <IDependantClass>()); }
public void SelfScanningContainerAdapters() { ContainerAdapterAccessor.Clear(); IContainerManager containerManager = new ContainerManager(TestConstants.AutofacContainerName); Assert.IsNotNull(containerManager.Resolve <IDependantClass>()); }
public void PreRegisteredContainerAdapter() { ContainerAdapterAccessor.Clear(); var adapter = new AutofacContainerAdapter(); adapter.Register <IDependantClass, DependantClass2>(); IContainerManager containerManager = new ContainerManager(adapter); Assert.IsNotNull(containerManager.Resolve <IDependantClass>()); var containerManager2 = new ContainerManager(); Assert.IsNotNull(containerManager2.Resolve <IDependantClass>()); }