public void GetWithMetadataImmortalTest() { String key = UniqueKey.NextKey(); /* Created immortal entry. */ cache.Put(key, "uranium"); IMetadataValue <String> metadata = cache.GetWithMetadata(key); Assert.AreEqual("uranium", metadata.GetValue()); Assert.IsTrue(metadata.GetLifespan() < 0); Assert.AreEqual(-1, metadata.GetCreated()); Assert.IsTrue(metadata.GetMaxIdle() < 0); Assert.AreEqual(-1, metadata.GetLastUsed()); }
protected void TestPutGetWithMetadata(IRemoteCache <string, string> cache) { cache.Put(K1, V1); Assert.NotNull(cache.GetWithMetadata(K1)); }
protected void TestGetWithMetadata(IRemoteCache <string, string> cache) { Assert.IsNull(cache.GetWithMetadata(NON_EXISTENT_KEY)); }