5 instantiations of TestService
Microsoft.AspNetCore.TestHost.Tests (5)
TestServerTests.cs (5)
128
.ConfigureTestContainer<ThirdPartyContainer>(container => container.Services.AddSingleton(new
TestService
{ Message = "OverridesConfigureContainer" }));
143
container.Services.AddSingleton(new
TestService
{ Message = "ConfigureContainer" });
179
var testService = new
TestService
();
326
var testService = new
TestService
();
342
var testService = new
TestService
();
13 references to TestService
Microsoft.AspNetCore.TestHost.Tests (13)
TestServerTests.cs (13)
147
$"{ctx.RequestServices.GetRequiredService<SimpleService>().Message}, {ctx.RequestServices.GetRequiredService<
TestService
>().Message}"));
179
var
testService = new TestService();
188
Assert.Equal(testService, server.Host.Services.GetRequiredService<
TestService
>());
326
var
testService = new TestService();
335
Assert.Equal(testService, testServer.Services.GetService<
TestService
>());
342
var
testService = new TestService();
358
Assert.Equal(testService, testServer.Services.GetService<
TestService
>());
404
services.AddTransient<
TestService
>();
430
var
service = context.RequestServices.GetService<
TestService
>();
452
.AddTransient<
TestService
>()
455
var
s = context.RequestServices.GetRequiredService<
TestService
>();