public override void Flush() { underlying.Position = 0; var readToEnd = new StreamReader(underlying).ReadToEnd(); testFileSystem.WriteAllText(path, readToEnd); }