From e283a3e745bad05a55c572646d7b20fbaaeb522d Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 7 Aug 2019 17:38:56 +0800 Subject: Add script to convert encoding and eof. And of course run it. --- Timeline.Tests/Helpers/MyWebApplicationFactory.cs | 46 +++++++++++------------ 1 file changed, 23 insertions(+), 23 deletions(-) (limited to 'Timeline.Tests/Helpers/MyWebApplicationFactory.cs') diff --git a/Timeline.Tests/Helpers/MyWebApplicationFactory.cs b/Timeline.Tests/Helpers/MyWebApplicationFactory.cs index 903cd670..d9503526 100644 --- a/Timeline.Tests/Helpers/MyWebApplicationFactory.cs +++ b/Timeline.Tests/Helpers/MyWebApplicationFactory.cs @@ -1,16 +1,16 @@ -using Microsoft.AspNetCore.Hosting; -using Microsoft.AspNetCore.Mvc.Testing; +using Microsoft.AspNetCore.Hosting; +using Microsoft.AspNetCore.Mvc.Testing; using Microsoft.AspNetCore.TestHost; using Microsoft.Data.Sqlite; -using Microsoft.EntityFrameworkCore; -using Microsoft.Extensions.DependencyInjection; -using Microsoft.Extensions.Logging; -using Timeline.Models; +using Microsoft.EntityFrameworkCore; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Logging; +using Timeline.Models; using Timeline.Services; -using Xunit.Abstractions; - -namespace Timeline.Tests.Helpers -{ +using Xunit.Abstractions; + +namespace Timeline.Tests.Helpers +{ public class MyWebApplicationFactory : WebApplicationFactory where TStartup : class { // We should keep the connection, so the database is persisted but not recreate every time. @@ -65,19 +65,19 @@ namespace Timeline.Tests.Helpers base.Dispose(disposing); } - } - - public static class WebApplicationFactoryExtensions - { - public static WebApplicationFactory WithTestLogging(this WebApplicationFactory factory, ITestOutputHelper outputHelper) where TEntry : class - { - return factory.WithWebHostBuilder(builder => - { + } + + public static class WebApplicationFactoryExtensions + { + public static WebApplicationFactory WithTestLogging(this WebApplicationFactory factory, ITestOutputHelper outputHelper) where TEntry : class + { + return factory.WithWebHostBuilder(builder => + { builder.ConfigureLogging(logging => { logging.AddXunit(outputHelper); - }); - }); - } - } -} + }); + }); + } + } +} -- cgit v1.2.3