54 lines
1.2 KiB
C#
54 lines
1.2 KiB
C#
using StellaOps.Plugin.Hosting;
|
|
using Xunit;
|
|
|
|
namespace StellaOps.Plugin.Tests;
|
|
|
|
public sealed partial class PluginHostOptionsTests
|
|
{
|
|
[Trait("Category", "Unit")]
|
|
[Fact]
|
|
public void PrimaryPrefix_AffectsDefaultDirectory()
|
|
{
|
|
var options = new PluginHostOptions
|
|
{
|
|
PrimaryPrefix = "MyModule"
|
|
};
|
|
|
|
Assert.Equal("MyModule", options.PrimaryPrefix);
|
|
}
|
|
|
|
[Trait("Category", "Unit")]
|
|
[Fact]
|
|
public void AdditionalPrefixes_CanBeConfigured()
|
|
{
|
|
var options = new PluginHostOptions();
|
|
|
|
options.AdditionalPrefixes.Add("Prefix1");
|
|
options.AdditionalPrefixes.Add("Prefix2");
|
|
|
|
Assert.Equal(2, options.AdditionalPrefixes.Count);
|
|
}
|
|
|
|
[Trait("Category", "Unit")]
|
|
[Fact]
|
|
public void SignatureVerification_CanBeEnforced()
|
|
{
|
|
var options = new PluginHostOptions();
|
|
|
|
options.EnforceSignatureVerification = true;
|
|
|
|
Assert.True(options.EnforceSignatureVerification);
|
|
}
|
|
|
|
[Trait("Category", "Unit")]
|
|
[Fact]
|
|
public void RecursiveSearch_CanBeEnabled()
|
|
{
|
|
var options = new PluginHostOptions();
|
|
|
|
options.RecursiveSearch = true;
|
|
|
|
Assert.True(options.RecursiveSearch);
|
|
}
|
|
}
|