7 references to AddActivatedSingleton
Microsoft.Extensions.DependencyInjection.AutoActivation.Tests (7)
AcceptanceTest.cs (4)
68.AddActivatedSingleton(typeof(IFakeService), typeof(FakeService)) 111.AddActivatedSingleton(typeof(IFakeService), typeof(FakeService)) 112.AddActivatedSingleton(typeof(IFakeService), typeof(FakeOneMultipleService)) 113.AddActivatedSingleton(typeof(IFakeService), typeof(AnotherFakeService)))
AutoActivationExtensionsTests.cs (3)
42Assert.Throws<ArgumentNullException>(() => AutoActivationExtensions.AddActivatedSingleton(null!, typeof(IFakeService), typeof(FakeService))); 43Assert.Throws<ArgumentNullException>(() => AutoActivationExtensions.AddActivatedSingleton(serviceCollection, null!, typeof(FakeService))); 44Assert.Throws<ArgumentNullException>(() => AutoActivationExtensions.AddActivatedSingleton(serviceCollection, typeof(IFakeService), implementationType: null!));