|
1 | 1 | using Microsoft.Extensions.DependencyInjection; |
2 | 2 | using System; |
3 | 3 |
|
4 | | -namespace Ninject.Web.AspNetCore.ComplianceTests |
| 4 | +namespace Ninject.Web.AspNetCore.ComplianceTest; |
| 5 | + |
| 6 | +/// <summary> |
| 7 | +/// See https://github.com/dotnet/runtime/tree/main/src/libraries/Microsoft.Extensions.DependencyInjection.Specification.Tests/src - the dotnet/runtime |
| 8 | +/// project which contains the dependency injection library code also contains a set of "compliance tests" that can be run against a potential alternative |
| 9 | +/// implementation to check if it is compliant. This class here is doing just that. |
| 10 | +/// |
| 11 | +/// The project also contains a separate test project that includes these compliance tests for a set of compliant third party DI implementations like |
| 12 | +/// Autofac and Lightinject under https://github.com/dotnet/runtime/tree/main/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.External.Tests. |
| 13 | +/// |
| 14 | +/// All of this is part of the https://github.com/dotnet/runtime/blob/main/src/libraries/Microsoft.Extensions.DependencyInjection/Microsoft.Extensions.DependencyInjection.sln |
| 15 | +/// solution of dotnet/runtime. |
| 16 | +/// </summary> |
| 17 | +public class DependencyInjectionComplianceTests : Microsoft.Extensions.DependencyInjection.Specification.DependencyInjectionSpecificationTests |
5 | 18 | { |
6 | | - /// <summary> |
7 | | - /// See https://github.com/dotnet/runtime/tree/main/src/libraries/Microsoft.Extensions.DependencyInjection.Specification.Tests/src - the dotnet/runtime |
8 | | - /// project which contains the dependency injection library code also contains a set of "compliance tests" that can be run against a potential alternative |
9 | | - /// implementation to check if it is compliant. This class here is doing just that. |
10 | | - /// |
11 | | - /// The project also contains a separate test project that includes these compliance tests for a set of compliant third party DI implementations like |
12 | | - /// Autofac and Lightinject under https://github.com/dotnet/runtime/tree/main/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.External.Tests. |
13 | | - /// |
14 | | - /// All of this is part of the https://github.com/dotnet/runtime/blob/main/src/libraries/Microsoft.Extensions.DependencyInjection/Microsoft.Extensions.DependencyInjection.sln |
15 | | - /// solution of dotnet/runtime. |
16 | | - /// </summary> |
17 | | - public class DependencyInjectionComplianceTests : Microsoft.Extensions.DependencyInjection.Specification.DependencyInjectionSpecificationTests |
| 19 | + protected override IServiceProvider CreateServiceProvider(IServiceCollection serviceCollection) |
18 | 20 | { |
19 | | - protected override IServiceProvider CreateServiceProvider(IServiceCollection serviceCollection) |
20 | | - { |
21 | | - var kernel = new AspNetCoreKernel(); |
22 | | - var factory = new NinjectServiceProviderFactory(kernel); |
| 21 | + var kernel = new AspNetCoreKernel(); |
| 22 | + var factory = new NinjectServiceProviderFactory(kernel); |
23 | 23 |
|
24 | | - return factory.CreateBuilder(serviceCollection).Build(); |
25 | | - } |
| 24 | + return factory.CreateBuilder(serviceCollection).Build(); |
26 | 25 | } |
27 | 26 | } |
0 commit comments