public async Task CanInsertAndGetBackMetadat() { var store = new AzureKeyValueStore(ConnectionString, ContainerName); var simpleBlob = new SimpleBlob() { Body = new MemoryStream(new byte[4096]), Id = Guid.NewGuid().ToString("N"), Metadata = new Dictionary <string, string>() { { "a", "b" }, { "c", "d" }, { "Content-Type", "image/png" } } }; await store.InsertAsync(simpleBlob); var metadata = await store.GetMetadataAsync(simpleBlob.Id); var blob2 = await store.GetAsync(simpleBlob.Id); var blockBlob = (CloudBlockBlob)blob2.UnderlyingBlob; Assert.Equal("b", metadata["a"]); Assert.Equal("d", metadata["c"]); Assert.Equal("image/png", blockBlob.Properties.ContentType); }
public void CanInsertAndGetBackMetadat() { var store = new AzureKeyValueStore(ConnectionString, ContainerName); var simpleBlob = new SimpleBlob() { Body = new MemoryStream(new byte[4096]), Id = Guid.NewGuid().ToString("N"), Metadata = new Dictionary<string, string>() { {"a", "b"}, {"c", "d"} } }; store.InsertAsync(simpleBlob).Wait(); var metadata = store.GetMetadataAsync(simpleBlob.Id).Result; Assert.Equal("b", metadata["a"]); Assert.Equal("d", metadata["c"]); }
public void CanInsertAndGetBackMetadat() { var store = new AzureKeyValueStore(ConnectionString, ContainerName); var simpleBlob = new SimpleBlob() { Body = new MemoryStream(new byte[4096]), Id = Guid.NewGuid().ToString("N"), Metadata = new Dictionary <string, string>() { { "a", "b" }, { "c", "d" } } }; store.InsertAsync(simpleBlob).Wait(); var metadata = store.GetMetadataAsync(simpleBlob.Id).Result; Assert.Equal("b", metadata["a"]); Assert.Equal("d", metadata["c"]); }
public void CanInsertAndGetBackMetadat() { var store = new AzureKeyValueStore(ConnectionString, ContainerName); var simpleBlob = new SimpleBlob() { Body = new MemoryStream(new byte[4096]), Id = Guid.NewGuid().ToString("N"), Metadata = new Dictionary<string, string>() { {"a", "b"}, {"c", "d"}, {"Content-Type", "image/png"} } }; store.InsertAsync(simpleBlob).Wait(); var metadata = store.GetMetadataAsync(simpleBlob.Id).Result; var blob2 = store.GetAsync(simpleBlob.Id).Result; var blockBlob = (CloudBlockBlob) blob2.UnderlyingBlob; Assert.Equal("b", metadata["a"]); Assert.Equal("d", metadata["c"]); Assert.Equal("image/png", blockBlob.Properties.ContentType); }