forked from Devolutions/UniGetUI
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCoreTests.cs
More file actions
33 lines (30 loc) · 1.25 KB
/
CoreTests.cs
File metadata and controls
33 lines (30 loc) · 1.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
namespace UniGetUI.Core.Data.Tests
{
public class CoreTests
{
public static object[][] Data =>
[
[CoreData.UniGetUIDataDirectory],
[CoreData.UniGetUIInstallationOptionsDirectory ],
[CoreData.UniGetUICacheDirectory_Data ],
[CoreData.UniGetUICacheDirectory_Icons ],
[CoreData.UniGetUICacheDirectory_Lang ],
[CoreData.UniGetUI_DefaultBackupDirectory ]
];
[Theory]
[MemberData(nameof(Data))]
public void CheckDirectoryAttributes(string directory)
{
Assert.True(Directory.Exists(directory), $"Directory ${directory} does not exist, but it should have been created automatically");
}
[Fact]
public void CheckOtherAttributes()
{
Assert.NotEmpty(CoreData.VersionName);
Assert.NotEqual(0, CoreData.BuildNumber);
Assert.NotEqual(0, CoreData.UpdatesAvailableNotificationTag);
Assert.True(Directory.Exists(CoreData.UniGetUIExecutableDirectory), "Directory where the executable is located does not exist");
Assert.True(File.Exists(CoreData.UniGetUIExecutableFile), "The executable file does not exist");
}
}
}