diff options
author | unknown <crupest@outlook.com> | 2019-08-07 17:38:56 +0800 |
---|---|---|
committer | unknown <crupest@outlook.com> | 2019-08-07 17:38:56 +0800 |
commit | 29bd71cd93b03248254f341aff9252374abc74ec (patch) | |
tree | df5d1325c3b73b17f4f86b71097775e9ce3fa122 /Timeline.Tests/Helpers/MyWebApplicationFactory.cs | |
parent | 0c0e0c963458aae3ba9589622fc688388833fa9c (diff) | |
download | timeline-29bd71cd93b03248254f341aff9252374abc74ec.tar.gz timeline-29bd71cd93b03248254f341aff9252374abc74ec.tar.bz2 timeline-29bd71cd93b03248254f341aff9252374abc74ec.zip |
Add script to convert encoding and eof. And of course run it.
Diffstat (limited to 'Timeline.Tests/Helpers/MyWebApplicationFactory.cs')
-rw-r--r-- | Timeline.Tests/Helpers/MyWebApplicationFactory.cs | 46 |
1 files changed, 23 insertions, 23 deletions
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<TStartup> : WebApplicationFactory<TStartup> 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<TEntry> WithTestLogging<TEntry>(this WebApplicationFactory<TEntry> factory, ITestOutputHelper outputHelper) where TEntry : class - { - return factory.WithWebHostBuilder(builder => - { + }
+
+ public static class WebApplicationFactoryExtensions
+ {
+ public static WebApplicationFactory<TEntry> WithTestLogging<TEntry>(this WebApplicationFactory<TEntry> factory, ITestOutputHelper outputHelper) where TEntry : class
+ {
+ return factory.WithWebHostBuilder(builder =>
+ {
builder.ConfigureLogging(logging =>
{
logging.AddXunit(outputHelper);
- }); - }); - } - } -} + });
+ });
+ }
+ }
+}
|