aboutsummaryrefslogtreecommitdiff
path: root/Timeline.Tests/Helpers
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2020-01-05 23:19:56 +0800
committercrupest <crupest@outlook.com>2020-01-05 23:19:56 +0800
commitb629695c7c28fb89b91f2f7e09f7eea632c21aba (patch)
tree5c884cc6752341a4dde274f6fafd79ffcb4fb972 /Timeline.Tests/Helpers
parent24f5c10f5c96b07bc8c1280a1198024c0f00c101 (diff)
downloadtimeline-b629695c7c28fb89b91f2f7e09f7eea632c21aba.tar.gz
timeline-b629695c7c28fb89b91f2f7e09f7eea632c21aba.tar.bz2
timeline-b629695c7c28fb89b91f2f7e09f7eea632c21aba.zip
Use sqlite development database.
Diffstat (limited to 'Timeline.Tests/Helpers')
-rw-r--r--Timeline.Tests/Helpers/TestApplication.cs2
-rw-r--r--Timeline.Tests/Helpers/TestDatabase.cs4
2 files changed, 3 insertions, 3 deletions
diff --git a/Timeline.Tests/Helpers/TestApplication.cs b/Timeline.Tests/Helpers/TestApplication.cs
index a624da6b..d18f2848 100644
--- a/Timeline.Tests/Helpers/TestApplication.cs
+++ b/Timeline.Tests/Helpers/TestApplication.cs
@@ -18,7 +18,7 @@ namespace Timeline.Tests.Helpers
builder.ConfigureServices(services =>
{
services.AddEntityFrameworkSqlite();
- services.AddDbContext<DatabaseContext>(options =>
+ services.AddDbContext<DatabaseContext, DevelopmentDatabaseContext>(options =>
{
options.UseSqlite(Database.Connection);
});
diff --git a/Timeline.Tests/Helpers/TestDatabase.cs b/Timeline.Tests/Helpers/TestDatabase.cs
index 10224c27..9560f353 100644
--- a/Timeline.Tests/Helpers/TestDatabase.cs
+++ b/Timeline.Tests/Helpers/TestDatabase.cs
@@ -47,11 +47,11 @@ namespace Timeline.Tests.Helpers
Connection = new SqliteConnection("Data Source=:memory:;");
Connection.Open();
- var options = new DbContextOptionsBuilder<DatabaseContext>()
+ var options = new DbContextOptionsBuilder<DevelopmentDatabaseContext>()
.UseSqlite(Connection)
.Options;
- Context = new DatabaseContext(options);
+ Context = new DevelopmentDatabaseContext(options);
InitDatabase(Context);
}