public async Task CreateFromSourceTest1() { VirtualDisk h = null; try { var cts = new CancellationTokenSource(); var rpt = new Reporter(); var lastVal = 0; rpt.NewVal += (o, e) => TestContext.WriteLine($"{DateTime.Now:o} NewVal={lastVal = e}"); h = await VirtualDisk.CreateFromSource(tmpfn, fn, cts.Token, rpt); Assert.That(lastVal, Is.EqualTo(100)); Assert.That(System.IO.File.Exists(tmpfn)); TestContext.WriteLine($"New file sz: {new System.IO.FileInfo(tmpfn).Length}"); } finally { h?.Close(); System.IO.File.Delete(tmpfn); } }