wabbajack/Wabbajack.App.Test/SettingsTests.cs

25 lines
585 B
C#
Raw Normal View History

2020-04-23 04:02:50 +00:00
using System.Threading.Tasks;
using Xunit;
namespace Wabbajack.Test
{
public class SettingsTests
{
[Fact]
public async Task CanSaveAndLoadSettings()
{
var (settings, loadedSettings) = await MainSettings.TryLoadTypicalSettings();
2020-04-23 04:02:50 +00:00
if (settings == null || !loadedSettings)
2020-04-23 04:02:50 +00:00
{
settings = new MainSettings();
}
await MainSettings.SaveSettings(settings);
2020-04-23 04:02:50 +00:00
Assert.True((await MainSettings.TryLoadTypicalSettings()).loaded);
2020-04-23 04:02:50 +00:00
}
}
}