Added async factory to VFSTests, so deletion can be awaited

This commit is contained in:
Justin Swanson 2020-04-10 14:35:47 -05:00
parent 165b857709
commit f8d692afd0

View File

@ -20,16 +20,21 @@ namespace Wabbajack.VirtualFileSystem.Test
private readonly ITestOutputHelper _helper;
private WorkQueue Queue { get; }
public VFSTests(ITestOutputHelper helper)
private VFSTests(ITestOutputHelper helper)
{
_helper = helper;
Utils.LogMessages.Subscribe(f => _helper.WriteLine(f.ShortDescription));
VFS_TEST_DIR.DeleteDirectory();
VFS_TEST_DIR.CreateDirectory();
Queue = new WorkQueue();
context = new Context(Queue);
}
public static async Task<VFSTests> Factory(ITestOutputHelper helper)
{
await VFS_TEST_DIR.DeleteDirectory();
VFS_TEST_DIR.CreateDirectory();
return new VFSTests(helper);
}
[Fact]
public async Task FilesAreIndexed()
{