public async Task TestFromStagingArea() { Task putTask = _bufferedDiskCache.Put(_cacheKey, _encodedImage); EncodedImage image = _stagingArea.Get(_cacheKey); Assert.AreSame( _closeableReference.GetUnderlyingReferenceTestOnly(), image.GetByteBufferRef().GetUnderlyingReferenceTestOnly()); await putTask; }
public void TestDoesntContainInvalid() { _encodedImage.Dispose(); Assert.IsTrue(_stagingArea.ContainsKey(_cacheKey)); Assert.IsTrue(EncodedImage.IsValid(_stagingArea.Get(_cacheKey))); }