diff options
author | crupest <crupest@outlook.com> | 2021-04-23 17:36:50 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2021-04-23 17:37:37 +0800 |
commit | b71bb7216d5d815df34cbb3b9e9cfd5a8018d1b0 (patch) | |
tree | 9ea0216ef6cf1092e38c4605eded614a82f7b4ab | |
parent | 5b9f8cfb458bdefaa82c326e03ded7a678034346 (diff) | |
download | timeline-b71bb7216d5d815df34cbb3b9e9cfd5a8018d1b0.tar.gz timeline-b71bb7216d5d815df34cbb3b9e9cfd5a8018d1b0.tar.bz2 timeline-b71bb7216d5d815df34cbb3b9e9cfd5a8018d1b0.zip |
test: Add database backup test.
-rw-r--r-- | BackEnd/Timeline.Tests/IntegratedTests/DatabaseManagementTest.cs | 19 |
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();
+ }
+ }
+}
|