public void Cache_2SharedComponents_Dummies()
        {
            var dummyCache = new DummyCache <string>();
            var cache      = new TestCache2(dummyCache, dummyCache);

            var s    = new[] { "s1", "s2", "s3", "s4" };
            var ref1 = cache.Create(s);

            Assert.IsTrue(s.SequenceEqual(ref1.Value));
        }
Esempio n. 2
0
        public void TryGetValueTest()
        {
            var cache = new DummyCache();

            cache.CreateEntry("key", "value", null);
            var tryGetResult = cache.TryGetValue("key", out object value);

            // TryGetValue is always false
            Assert.IsFalse(tryGetResult);
            Assert.IsNull(value);
        }
Esempio n. 3
0
        public void CreateEntryTest()
        {
            var cache = new DummyCache();

            cache.CreateEntry("key", "value", null);
        }