public async Task GetMeta_for_one_file_succeeds()
        {
            string content = RandomGenerator.GetRandomString(1000, false);
            string id      = RandomGenerator.RandomString;

            await _bs.WriteTextAsync(id, content);

            BlobMeta meta = (await _provider.GetMetaAsync(new[] { id })).First();

            long   size = Encoding.UTF8.GetBytes(content).Length;
            string md5  = content.GetHash(HashType.Md5);

            Assert.Equal(size, meta.Size);
            Assert.True(meta.MD5 == null || meta.MD5 == md5);
        }
Beispiel #2
0
 /// <summary>
 /// Gets basic blob metadata
 /// </summary>
 /// <param name="ids">Blob id</param>
 /// <param name="cancellationToken"></param>
 /// <returns>Blob metadata or null if blob doesn't exist</returns>
 public Task <IEnumerable <BlobMeta> > GetMetaAsync(IEnumerable <string> ids, CancellationToken cancellationToken = default(CancellationToken))
 {
     return(_provider.GetMetaAsync(ids, cancellationToken));
 }