public void AutofacContainerRegistryShouldReturnFalseForIsRegisteredDuringRegistration() { var registry = new AutofacContainerRegistry(new ContainerBuilder()); registry.Register <IService, Service>(); registry.IsRegistered <IService>().Should().BeFalse(); }
public void AutofacContainerRegistryShouldReturnTrueForIsRegisteredAfterRegistration() { var container = new MutableContainer(new ContainerBuilder()); AutofacContainerRegistry registry = null; container.RegisterTypes(b => { registry = new AutofacContainerRegistry(b, container); registry.Register <IService, Service>(); registry.FinalizeRegistry(); }); registry.IsRegistered <IService>().Should().BeTrue(); }