aboutsummaryrefslogtreecommitdiff
path: root/BackEnd/Timeline.Tests
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2021-04-23 17:36:50 +0800
committercrupest <crupest@outlook.com>2021-04-23 17:37:37 +0800
commitb71bb7216d5d815df34cbb3b9e9cfd5a8018d1b0 (patch)
tree9ea0216ef6cf1092e38c4605eded614a82f7b4ab /BackEnd/Timeline.Tests
parent5b9f8cfb458bdefaa82c326e03ded7a678034346 (diff)
downloadtimeline-b71bb7216d5d815df34cbb3b9e9cfd5a8018d1b0.tar.gz
timeline-b71bb7216d5d815df34cbb3b9e9cfd5a8018d1b0.tar.bz2
timeline-b71bb7216d5d815df34cbb3b9e9cfd5a8018d1b0.zip
test: Add database backup test.
Diffstat (limited to 'BackEnd/Timeline.Tests')
-rw-r--r--BackEnd/Timeline.Tests/IntegratedTests/DatabaseManagementTest.cs19
1 files changed, 19 insertions, 0 deletions
diff --git a/BackEnd/Timeline.Tests/IntegratedTests/DatabaseManagementTest.cs b/BackEnd/Timeline.Tests/IntegratedTests/DatabaseManagementTest.cs
new file mode 100644
index 00000000..eaffbe2d
--- /dev/null
+++ b/BackEnd/Timeline.Tests/IntegratedTests/DatabaseManagementTest.cs
@@ -0,0 +1,19 @@
+using FluentAssertions;
+using Microsoft.Extensions.DependencyInjection;
+using System.IO;
+using Timeline.Services;
+using Xunit;
+
+namespace Timeline.Tests.IntegratedTests
+{
+ public class DatabaseManagementTest : IntegratedTestBase
+ {
+ [Fact]
+ public void Backup_Should_Work()
+ {
+ var pathProvider = TestApp.Host.Services.GetRequiredService<IPathProvider>();
+ var backupDir = pathProvider.GetDatabaseBackupDirectory();
+ Directory.GetFiles(backupDir).Should().NotBeEmpty();
+ }
+ }
+}