mirror of
https://github.com/ow-mods/owml.git
synced 2025-12-11 20:15:48 +01:00
* New "SDK style" projects * C# 9.0 * .Net Framework 4.7.2 -> 4.8 * Sexy C# 8/9 code * Fixed OWML Nuget package
42 lines
615 B
C#
42 lines
615 B
C#
using OWML.ModHelper;
|
|
using OWML.Tests.Setup;
|
|
using Xunit;
|
|
using Xunit.Abstractions;
|
|
|
|
namespace OWML.Utils.Tests
|
|
{
|
|
public class TypeExtensionTests : OWMLTests
|
|
{
|
|
public TypeExtensionTests(ITestOutputHelper outputHelper)
|
|
: base(outputHelper)
|
|
{
|
|
}
|
|
|
|
[Fact]
|
|
public void GetValue()
|
|
{
|
|
var config = new ModConfig
|
|
{
|
|
Enabled = true
|
|
};
|
|
|
|
var value = config.GetValue<bool>("Enabled");
|
|
|
|
Assert.True(value);
|
|
}
|
|
|
|
[Fact]
|
|
public void SetValue()
|
|
{
|
|
var config = new ModConfig
|
|
{
|
|
Enabled = false
|
|
};
|
|
|
|
config.SetValue("Enabled", true);
|
|
|
|
Assert.True(config.Enabled);
|
|
}
|
|
}
|
|
}
|