public async Task CreateOrAppendTextWorksWithExistingFile() { // --- Arrange const string BODY = "FirstSecond"; var wfs = new AzureFileStorage(ROOT); var file = new AbstractFileDescriptor("Container", null, "TestFile.txt"); using (var textFile = await wfs.CreateTextAsync(file)) { textFile.Writer.Write("First"); } // --- Act using (var textFile = await wfs.CreateOrAppendTextAsync(file)) { textFile.Writer.Write("Second"); } // --- Assert using (var savedFile = await wfs.OpenTextAsync(file)) { var text = savedFile.Reader.ReadToEnd(); text.ShouldBe(BODY); } }