Ejemplo n.º 1
0
        public async Task TestDownload()
        {
            CloudBlobContainer container = _blobClient.GetContainerReference("container");

            container.CreateIfNotExists();
            await CreateEmptyBlob(container.GetBlockBlobReference("blob"));

            AzureBlobContainer azureBlobContainer = new AzureBlobContainer(container);

            string path = Path.Combine(Path.GetTempPath(), "azureblobcontainertest");

            if (Directory.Exists(path))
            {
                Directory.Delete(path, recursive: true);
            }

            await azureBlobContainer.Download(path);

            Assert.IsTrue(Directory.Exists(path));
        }