public void CanPersistMetadataASync() { var sourceBlob = new StandaloneAzureBlockBlob(BasePath, BlobName); CreateBlobContent(sourceBlob); sourceBlob.Metadata["thing"] = "something"; sourceBlob.SetMetadataAsync().Wait(); var loadedBlob = new StandaloneAzureBlockBlob(BasePath, BlobName); loadedBlob.FetchAttributes(); new { Metadata = new Dictionary<string, string> { { "thing", "something"} } }.ToExpectedObject().ShouldMatch(loadedBlob); }
public void WillThrowOnAsyncSaveOfMetadataIfBlobDoesNotExist(string blobName) { var blob = new StandaloneAzureBlockBlob(BasePath, blobName); AssertEx.Throws<StorageException>(() => blob.SetMetadataAsync()); }