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 | 67ed852e56696cee15763c9a2b92acf36e7409c0 (patch) | |
tree | 983080e9ea05c02f9d7be38bbce73209c51ce870 /BackEnd/Timeline.Tests/IntegratedTests | |
parent | 6e067a28d8527726a2a17045bef0f0e3d3430ed5 (diff) | |
download | timeline-67ed852e56696cee15763c9a2b92acf36e7409c0.tar.gz timeline-67ed852e56696cee15763c9a2b92acf36e7409c0.tar.bz2 timeline-67ed852e56696cee15763c9a2b92acf36e7409c0.zip |
test: Add database backup test.
Diffstat (limited to 'BackEnd/Timeline.Tests/IntegratedTests')
-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();
+ }
+ }
+}
|