Supress log errors in testing

This commit is contained in:
Timothy Baldridge 2020-09-09 05:28:34 -06:00
parent 4c6f34cae5
commit 2332af1252

View File

@ -19,12 +19,23 @@ namespace Wabbajack.VirtualFileSystem.Test
private Context context;
private readonly ITestOutputHelper _helper;
private IDisposable _unsub;
private WorkQueue Queue { get; } = new WorkQueue();
public VFSTests(ITestOutputHelper helper)
{
_helper = helper;
Utils.LogMessages.Subscribe(f => _helper.WriteLine(f.ShortDescription));
_unsub = Utils.LogMessages.Subscribe(f =>
{
try
{
_helper.WriteLine(f.ShortDescription);
}
catch (Exception ex)
{
// ignored
}
});
context = new Context(Queue);
}
@ -36,6 +47,7 @@ namespace Wabbajack.VirtualFileSystem.Test
public async Task DisposeAsync()
{
_unsub.Dispose();
await VFS_TEST_DIR.DeleteDirectory();
}