aboutsummaryrefslogtreecommitdiff
path: root/BackEnd/Timeline.Tests/Services/DatabaseBasedTest.cs
diff options
context:
space:
mode:
Diffstat (limited to 'BackEnd/Timeline.Tests/Services/DatabaseBasedTest.cs')
-rw-r--r--BackEnd/Timeline.Tests/Services/DatabaseBasedTest.cs12
1 files changed, 7 insertions, 5 deletions
diff --git a/BackEnd/Timeline.Tests/Services/DatabaseBasedTest.cs b/BackEnd/Timeline.Tests/Services/DatabaseBasedTest.cs
index 838787e9..7c97158c 100644
--- a/BackEnd/Timeline.Tests/Services/DatabaseBasedTest.cs
+++ b/BackEnd/Timeline.Tests/Services/DatabaseBasedTest.cs
@@ -1,7 +1,4 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Threading.Tasks;
+using System.Threading.Tasks;
using Timeline.Entities;
using Timeline.Tests.Helpers;
using Xunit;
@@ -10,9 +7,14 @@ namespace Timeline.Tests.Services
{
public abstract class DatabaseBasedTest : IAsyncLifetime
{
- protected TestDatabase TestDatabase { get; } = new TestDatabase();
+ protected TestDatabase TestDatabase { get; }
protected DatabaseContext Database { get; private set; }
+ protected DatabaseBasedTest(bool databaseCreateUsers = true)
+ {
+ TestDatabase = new TestDatabase(databaseCreateUsers);
+ }
+
public async Task InitializeAsync()
{
await TestDatabase.InitializeAsync();