private static IEnumerable <string> ReadLines(params string[] lines) { WrappedMemoryStream s = Lines(lines); Task <BasicLine[]> task = BasicStream.ReadAsync(s); task.IsCompletedSuccessfully.Should().BeTrue(); s.DisposeCount.Should().Be(1); return(task.Result.Select(l => l.ToString())); }