public static void Cleanup()
        {
            var azureBlobContainer = new AzureBlobContainer <string>(
                account,
                AzureBlobTestContainer);

            azureBlobContainer.DeleteContainerAsync().Wait();
        }
Ejemplo n.º 2
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();
            }
        }
Ejemplo n.º 3
0
        public async Task Create_Container_Put_File_Read_Back()
        {
            var blobContainer = new AzureBlobContainer(_context, "test-container");

            string srcFileName = "easy-query256.png";
            await blobContainer.UploadFromStreamAsync(srcFileName, GetResourceAsStream(srcFileName));

            string destFileName = "__fileFromBlob.png";

            using (var fileFromBlob = new FileStream(destFileName, FileMode.Create)) {
                await blobContainer.DownloadToStreamAsync(srcFileName, fileFromBlob);

                fileFromBlob.Flush();
            }

            Assert.IsTrue(File.Exists(destFileName));

            await blobContainer.DeleteContainerAsync();
        }
Ejemplo n.º 4
0
 public void TestCleanup()
 {
     azureBlobSurveyAnswerContainer.DeleteContainerAsync().Wait();
     azureBlogStringListContainer.DeleteContainerAsync().Wait();
 }
        public static void Cleanup()
        {
            var surveyStorage = new AzureBlobContainer <Survey>(account, SurveyContainer);

            surveyStorage.DeleteContainerAsync().Wait();
        }
 public void TestCleanup()
 {
     azureBlobContainer.DeleteContainerAsync().Wait();
 }