public void Test_BlobStream_Save_On_Flush()
 {
     BlobStream blobStream = new BlobStream(_cache, _key, _region);
     byte[] blob = Encoding.ASCII.GetBytes(LoremIpsum.OneThousandCharacters);
     blobStream.Write(blob, 0, blob.Length);
     Assert.IsNull(_cache.Get(_key, _region));
     blobStream.Flush();
     Assert.IsNotNull(_cache.Get(_key, _region));
 }
 public void Test_BlobStream_Write()
 {
     string loremIpsum = LoremIpsum.OneThousandCharacters;
     using (BlobStream blobStream = new BlobStream(_cache, _key, _region))
     {
         byte[] blob = Encoding.ASCII.GetBytes(LoremIpsum.OneThousandCharacters);
         blobStream.Write(blob, 0, blob.Length);
     }
     byte[] actual = _cache.Get(_key, _region) as byte[];
     Assert.IsNotNull(actual);
     Assert.AreEqual(loremIpsum, Encoding.ASCII.GetString(actual));
 }