public void AutofacContainerRegistryShouldReturnFalseForIsRegisteredDuringRegistration() { var registry = new AutofacContainerRegistry(new ContainerBuilder()); registry.Register <IService, Service>(); registry.IsRegistered <IService>().Should().BeFalse(); }
public void AutofacContainerRegistryShouldReturnTrueForIsRegisteredOnExistingRegistrations() { var builder = new ContainerBuilder(); builder.RegisterType <Service>().As <IService>(); var container = new MutableContainer(builder); var registry = new AutofacContainerRegistry(new ContainerBuilder(), container); registry.IsRegistered <IService>().Should().BeTrue(); }