public void TestTryRead() { cache.Write("foo", ToStream("foo")); Assert.AreEqual(true, cache.TryRead("foo", out Stream stream)); using (stream) { Assert.AreEqual("foo", stream.ToText()); } }
public void TestTryRead() { cache.Write("foo", "foo"); Assert.IsTrue(cache.TryRead("foo", out string _)); Assert.IsFalse(cache.TryRead("cache-not-exists", out _)); }