aboutsummaryrefslogtreecommitdiff
path: root/Timeline.Tests/IntegratedTests/TimelineTest.cs
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2020-06-15 00:05:02 +0800
committercrupest <crupest@outlook.com>2020-06-15 00:05:02 +0800
commite0b4c538228864c314900affae08df72edc9cd60 (patch)
treefc07d6d2622140f82a2c7e3c50aecf759c144043 /Timeline.Tests/IntegratedTests/TimelineTest.cs
parentcf2cfa4853944ce0af6b6c22a089b937dd59ccaf (diff)
downloadtimeline-e0b4c538228864c314900affae08df72edc9cd60.tar.gz
timeline-e0b4c538228864c314900affae08df72edc9cd60.tar.bz2
timeline-e0b4c538228864c314900affae08df72edc9cd60.zip
refactor(back): Use generic host.
Diffstat (limited to 'Timeline.Tests/IntegratedTests/TimelineTest.cs')
-rw-r--r--Timeline.Tests/IntegratedTests/TimelineTest.cs6
1 files changed, 2 insertions, 4 deletions
diff --git a/Timeline.Tests/IntegratedTests/TimelineTest.cs b/Timeline.Tests/IntegratedTests/TimelineTest.cs
index d8017b8a..b6a56e94 100644
--- a/Timeline.Tests/IntegratedTests/TimelineTest.cs
+++ b/Timeline.Tests/IntegratedTests/TimelineTest.cs
@@ -1,5 +1,4 @@
using FluentAssertions;
-using Microsoft.AspNetCore.Mvc.Testing;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.DependencyInjection;
using SixLabors.ImageSharp;
@@ -45,8 +44,7 @@ namespace Timeline.Tests.IntegratedTests
public class TimelineTest : IntegratedTestBase
{
- public TimelineTest(WebApplicationFactory<Startup> factory)
- : base(factory, 3)
+ public TimelineTest() : base(3)
{
}
@@ -1112,7 +1110,7 @@ namespace Timeline.Tests.IntegratedTests
}
{
- using var scope = TestApp.Factory.Services.CreateScope();
+ using var scope = TestApp.Host.Services.CreateScope();
var database = scope.ServiceProvider.GetRequiredService<DatabaseContext>();
var count = await database.Data.CountAsync();
count.Should().Be(0);