Пример #1
0
        public async Task Create_Container_And_SaveToIt_Immetiately()
        {
            var blobContainer = new AzureBlobContainer(_context, "new-test-container");

            try {
                var blobName     = "test-blob";
                var dataToUpload = "Some testing data";
                await blobContainer.UploadStringAsync(blobName, dataToUpload);

                var downloadedData = await blobContainer.DownloadStringAsync(blobName);

                Assert.AreEqual(dataToUpload, downloadedData);
            }
            finally {
                await blobContainer.DeleteContainerAsync();
            }
        }