Datei: IntegrationTests/IntegrationTests/NDOTest.cs
Last Commit (182cfd7)
| 1 | using Microsoft.Extensions.DependencyInjection; |
| 2 | using Microsoft.Extensions.Hosting; |
| 3 | using H = Microsoft.Extensions.Hosting; |
| 4 | using Microsoft.Extensions.Logging; |
| 5 | using NDO.Application; |
| 6 | |
| 7 | namespace NdoUnitTests |
| 8 | { |
| 9 | ····public class NDOTest |
| 10 | ····{ |
| 11 | ········public IHost Host { get; private set; } |
| 12 | ········public NDOTest() |
| 13 | ········{ |
| 14 | ············var builder = H.Host.CreateDefaultBuilder(); |
| 15 | ············builder.ConfigureServices( services => |
| 16 | ············{ |
| 17 | //services. AddLogging( b => |
| 18 | //{ |
| 19 | // b. ClearProviders( ) ; |
| 20 | // b. AddConsole( ) ; |
| 21 | //} ) ; |
| 22 | |
| 23 | ················services.AddSingleton<ILoggerFactory, LoggerFactory>(); |
| 24 | ················services.AddNdo( null, null ); |
| 25 | ············} ); |
| 26 | |
| 27 | ············this.Host = builder.Build(); |
| 28 | ············this.Host.Services.UseNdo(); |
| 29 | ········} |
| 30 | ····} |
| 31 | } |
| 32 |
New Commit (a04c7be)
| 1 | using Formfakten.TestLogger; |
| 2 | using Microsoft.Extensions.DependencyInjection; |
| 3 | using Microsoft.Extensions.Hosting; |
| 4 | using Microsoft.Extensions.Logging; |
| 5 | using NDO.Application; |
| 6 | using H = Microsoft.Extensions.Hosting; |
| 7 | |
| 8 | namespace NdoUnitTests |
| 9 | { |
| 10 | ····public class NDOTest |
| 11 | ····{ |
| 12 | ········public IHost Host { get; private set; } |
| 13 | ········public NDOTest() |
| 14 | ········{ |
| 15 | ············var builder = H.Host.CreateDefaultBuilder(); |
| 16 | ············builder.ConfigureServices( services => |
| 17 | ············{ |
| 18 | services. AddLogging( b => |
| 19 | { |
| 20 | b. ClearProviders( ) ; |
| 21 | b. AddFormfaktenLogger( ) ; |
| 22 | } ) ; |
| 23 | |
| 24 | ················services.AddNdo( null, null ); |
| 25 | ············} ); |
| 26 | |
| 27 | ············this.Host = builder.Build(); |
| 28 | ············this.Host.Services.UseNdo(); |
| 29 | ········} |
| 30 | ····} |
| 31 | } |
| 32 |