diff options
author | 杨宇千 <crupest@outlook.com> | 2019-08-18 18:07:50 +0800 |
---|---|---|
committer | 杨宇千 <crupest@outlook.com> | 2019-08-18 18:07:50 +0800 |
commit | 39aa54bb10da8b76a4021feb984b8aad0df6269b (patch) | |
tree | 21b4c77e48f34e1a72858209e4d4d6d7978b663a /Timeline.Tests/Helpers/MyWebApplicationFactory.cs | |
parent | 2d672de8ea109c923d5a8697e44d5cbbf976ead2 (diff) | |
download | timeline-39aa54bb10da8b76a4021feb984b8aad0df6269b.tar.gz timeline-39aa54bb10da8b76a4021feb984b8aad0df6269b.tar.bz2 timeline-39aa54bb10da8b76a4021feb984b8aad0df6269b.zip |
Add avatar service.
Diffstat (limited to 'Timeline.Tests/Helpers/MyWebApplicationFactory.cs')
-rw-r--r-- | Timeline.Tests/Helpers/MyWebApplicationFactory.cs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Timeline.Tests/Helpers/MyWebApplicationFactory.cs b/Timeline.Tests/Helpers/MyWebApplicationFactory.cs index dfadd1ae..e96d11fe 100644 --- a/Timeline.Tests/Helpers/MyWebApplicationFactory.cs +++ b/Timeline.Tests/Helpers/MyWebApplicationFactory.cs @@ -3,6 +3,7 @@ using Microsoft.AspNetCore.Mvc.Testing; using Microsoft.AspNetCore.TestHost;
using Microsoft.Data.Sqlite;
using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Diagnostics;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using System;
@@ -37,6 +38,10 @@ namespace Timeline.Tests.Helpers {
var options = new DbContextOptionsBuilder<DatabaseContext>()
.UseSqlite(_databaseConnection)
+ .ConfigureWarnings(builder =>
+ {
+ builder.Throw(RelationalEventId.QueryClientEvaluationWarning);
+ })
.Options;
using (var context = new DatabaseContext(options))
|