Expand integration coverage and fix settings UI
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
using Jellyfin.Plugin.Multilang.Data;
|
||||
using Jellyfin.Plugin.Multilang.Services.Providers;
|
||||
using Jellyfin.Plugin.Multilang.Services.Refresh;
|
||||
using MediaBrowser.Common.Configuration;
|
||||
|
||||
namespace Jellyfin.Plugin.Multilang.Tests;
|
||||
|
||||
@@ -10,7 +9,7 @@ public sealed class TranslationStoreImportTests
|
||||
[Fact]
|
||||
public void ImportTranslationDatabaseKeepsOnlyLiveItemsAndAllowedLanguages()
|
||||
{
|
||||
var root = Path.Combine(Path.GetTempPath(), "multilang-test-" + Guid.NewGuid().ToString("N"));
|
||||
var root = TestPaths.CreateRoot();
|
||||
try
|
||||
{
|
||||
var source = new TranslationStore(new TestApplicationPaths(Path.Combine(root, "source")));
|
||||
@@ -38,8 +37,7 @@ public sealed class TranslationStoreImportTests
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (Directory.Exists(root))
|
||||
Directory.Delete(root, recursive: true);
|
||||
TestPaths.DeleteRoot(root);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -69,31 +67,4 @@ public sealed class TranslationStoreImportTests
|
||||
.GetValueOrDefault(itemId)?
|
||||
.GetValueOrDefault(lang)?
|
||||
.GetValueOrDefault(field);
|
||||
|
||||
private sealed class TestApplicationPaths(string root) : IApplicationPaths
|
||||
{
|
||||
public string ProgramDataPath { get; } = root;
|
||||
public string WebPath { get; } = Path.Combine(root, "web");
|
||||
public string ProgramSystemPath { get; } = Path.Combine(root, "system");
|
||||
public string DataPath { get; } = Path.Combine(root, "data");
|
||||
public string ImageCachePath { get; } = Path.Combine(root, "images");
|
||||
public string PluginsPath { get; } = Path.Combine(root, "plugins");
|
||||
public string PluginConfigurationsPath { get; } = Path.Combine(root, "plugin-configs");
|
||||
public string LogDirectoryPath { get; } = Path.Combine(root, "logs");
|
||||
public string ConfigurationDirectoryPath { get; } = Path.Combine(root, "config");
|
||||
public string SystemConfigurationFilePath { get; } = Path.Combine(root, "config", "system.xml");
|
||||
public string CachePath { get; } = Path.Combine(root, "cache");
|
||||
public string TempDirectory { get; } = Path.Combine(root, "temp");
|
||||
public string VirtualDataPath { get; } = "%AppDataPath%";
|
||||
public string TrickplayPath { get; } = Path.Combine(root, "trickplay");
|
||||
public string BackupPath { get; } = Path.Combine(root, "backups");
|
||||
|
||||
public void MakeSanityCheckOrThrow()
|
||||
{
|
||||
}
|
||||
|
||||
public void CreateAndCheckMarker(string path, string marker, bool isTemporary = false)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user