public void Equals_store() { string str = "hello"; CacheObject <string> cacheObject1 = new CacheObject <string>(str); Assert.IsTrue(cacheObject1.Equals(str)); }
public void Equals_notequal() { CacheObject <string> cacheObject1 = new CacheObject <string>("hello"); CacheObject <string> cacheObject2 = new CacheObject <string>("world"); Assert.IsFalse(cacheObject1.Equals(cacheObject2)); }
public void Equals_content() { string str = "hello"; CacheObject <string> cacheObject1 = new CacheObject <string>(str); CacheObject <string> cacheObject2 = new CacheObject <string>(str); Assert.IsTrue(cacheObject1.Equals(cacheObject2)); }
public void Equals_notequal_nontype() { CacheObject <string> cacheObject1 = new CacheObject <string>("hello"); List <string> list = new List <string> { "hello" }; Assert.IsFalse(cacheObject1.Equals(list)); }