stabilizaiton work - projects rework for maintenanceability and ui livening
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using StellaOps.Plugin.Hosting;
|
||||
using Xunit;
|
||||
|
||||
namespace StellaOps.Plugin.Tests;
|
||||
|
||||
public sealed partial class PluginHostTests
|
||||
{
|
||||
[Trait("Category", "Unit")]
|
||||
[Fact]
|
||||
public void LoadPlugins_WithPluginOrder_AcceptsOrderConfiguration()
|
||||
{
|
||||
var tempDir = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString());
|
||||
Directory.CreateDirectory(tempDir);
|
||||
|
||||
try
|
||||
{
|
||||
var options = new PluginHostOptions
|
||||
{
|
||||
PluginsDirectory = tempDir,
|
||||
EnsureDirectoryExists = false
|
||||
};
|
||||
options.PluginOrder.Add("PluginA");
|
||||
options.PluginOrder.Add("PluginB");
|
||||
|
||||
var result = PluginHost.LoadPlugins(options);
|
||||
|
||||
Assert.Empty(result.Plugins);
|
||||
Assert.NotNull(result.MissingOrderedPlugins);
|
||||
}
|
||||
finally
|
||||
{
|
||||
Directory.Delete(tempDir, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user