Ejemplo n.º 1
0
        public void Try_getting_a_value_that_exists()
        {
            var sut = new FilesystemCache(CACHE_PATH);
            sut.ReplaceOrAdd("mykey", "hello");

            var value = "";
            Assert.IsTrue(sut.TryGet("mykey", out value));
            Assert.AreEqual("hello", value);
        }
Ejemplo n.º 2
0
        public void Try_getting_a_non_existent_value()
        {
            var sut = new FilesystemCache(CACHE_PATH);

            var value = "";
            Assert.IsFalse(sut.TryGet("non existent key", out value));
        }