24 references to Services
Microsoft.AspNetCore.Mvc.FunctionalTests (22)
AsyncDisposalTest.cs (3)
44var sink = Factory.Services.GetRequiredService<ControllerTestDisposeAsync>(); 56var sink = Factory.Services.GetRequiredService<ControllerTestDisposeAsync>(); 68var sink = Factory.Services.GetRequiredService<ControllerTestDisposeAsync>();
PageAsyncDisposalTest.cs (1)
42var sink = Factory.Services.GetRequiredService<PageTestDisposeAsync>();
RealServerBackedIntegrationTests.cs (1)
59var server = Factory.Services.GetRequiredService<IServer>();
RealServerUsingMinimalBackedIntegrationTests.cs (1)
56var server = Factory.Services.GetRequiredService<IServer>();
SimpleWithWebApplicationBuilderTests.cs (2)
266var antiforgery = Factory.Services.GetRequiredService<IAntiforgery>(); 267var antiforgeryOptions = Factory.Services.GetRequiredService<IOptions<AntiforgeryOptions>>();
TestingInfrastructureInheritanceTests.cs (5)
64Assert.NotNull(factory.Services); 65Assert.NotNull(factory.Services.GetService(typeof(IConfiguration))); 75var lifetimeService = (IHostApplicationLifetime)factory.Services.GetService(typeof(IHostApplicationLifetime)); 88using var scope = factory.Services.CreateAsyncScope(); 103using var scope = factory.Services.CreateScope();
TestingInfrastructureTests.cs (8)
199Assert.NotNull(factory.Services); 200Assert.NotNull(factory.Services.GetService(typeof(IConfiguration))); 208Assert.NotNull(factory.Services); 209Assert.NotNull(factory.Services.GetService(typeof(IConfiguration))); 217Assert.NotNull(factory.Services); 218Assert.NotNull(factory.Services.GetService(typeof(IConfiguration))); 226Assert.NotNull(factory.Services); 227Assert.NotNull(factory.Services.GetService(typeof(IConfiguration)));
WebApplicationFactorySlnxTests.cs (1)
58var environment = factory.Services.GetRequiredService<IWebHostEnvironment>();
Microsoft.AspNetCore.OpenApi.Tests (2)
Integration\OpenApiDocumentIntegrationTests.cs (2)
101var documentService = fixture.Services.GetRequiredKeyedService<OpenApiDocumentService>(documentName); 102var scopedServiceProvider = fixture.Services.CreateScope();