public async Task ShouldWrite() { using (var stream = fileStreamFactory.CreateOutputStream("output.properties", OutputType.yaml)) { stream.ShouldBeOfType <FileStream>(); using (var writer = new StreamWriter(stream)) await writer.WriteAsync("asdfgh"); } var text = await File.ReadAllTextAsync(Path.Combine(tempDirectoryName, "output.properties")); text.ShouldBe("asdfgh"); }