public void Get_OnExistingValue_ShouldReturnStoredObject() { var cache = new InProcessCache(); cache.Set("abc", this); var actualStoredItem = cache.Get <InProcessCacheTests>("abc"); Assert.AreEqual(this, actualStoredItem); }
public void basic_put_and_get() { const string testKey = "TestKey"; const string testValue = "TestValue"; ICache cache = new InProcessCache(); cache.Remove(testKey); cache.Set(testKey, testValue); var actual = (string)cache.Get(testKey); Assert.AreEqual(testValue, actual); Assert.IsTrue(cache.Exists(testKey)); }