コード例 #1
0
        public async Task IfTextIsSaved_ThenItCanBeGot()
        {
            var sampleXml = "<document><empty /></document>";

            var taskOutputStorage = new TaskOutputStorage(StorageAccount, _jobId, _taskId);
            await taskOutputStorage.SaveTextAsync(TaskOutputKind.TaskOutput, sampleXml, "TextNotFromFile.xml");

            var blob = await taskOutputStorage.GetOutputAsync(TaskOutputKind.TaskOutput, "TextNotFromFile.xml");

            var blobContent = Encoding.UTF8.GetString(await blob.ReadAsByteArrayAsync());

            Assert.Equal(sampleXml, blobContent);
        }