public void Should_Copy_Object() { var azureClient = new WindowsAzureStorageService(CreateCmsConfigurationMock()); var source = new Uri("http://bettercms.blob.core.windows.net/temp/newFile4.jpg"); GetUploadRequest(source, azureClient); var destination = new Uri("http://bettercms.blob.core.windows.net/temp/newFile4 copy.jpg"); azureClient.CopyObject(new Uri("http://bettercms.blob.core.windows.net/temp/newFile4.jpg"), destination); Assert.IsTrue(azureClient.ObjectExists(destination)); azureClient.RemoveObject(source); azureClient.RemoveObject(destination); }
public void Should_Remove_Object() { var azureClient = new WindowsAzureStorageService(CreateCmsConfigurationMock()); var uri = new Uri("http://bettercms.blob.core.windows.net/temp/newFile4copy.jpg"); GetUploadRequest(uri, azureClient); azureClient.RemoveObject(uri); Assert.IsFalse(azureClient.ObjectExists(uri)); }
public void Should_Download_Object() { var azureClient = new WindowsAzureStorageService(CreateCmsConfigurationMock()); var uri = new Uri("http://bettercms.blob.core.windows.net/temp/newFile4.jpg"); GetUploadRequest(uri, azureClient); var file = azureClient.DownloadObject(uri); Assert.IsTrue(file.ResponseStream.Length > 0); azureClient.RemoveObject(uri); }