コード例 #1
0
        public void IntegrationTestPutAndGetPageBlob()
        {
            IBlobService blobService = new BlobService(StorageAccount.Name, StorageAccount.Key);

            // Create a container.
            bool createSucess = blobService.CreateContainer("test7");
            Assert.IsTrue(createSucess, "The container was not created as expected.");

            // Put a blob in the container.
            bool putSuccess = blobService.PutPageBlob("test7", "blobName", 2048);
            Assert.IsTrue(putSuccess, "The put was not successful.");

            // Now delete the container.
            bool deleteSuccess = blobService.DeleteContainer("test7");
            Assert.IsTrue(deleteSuccess, "The container was not deleted as expected.");
        }