public void CacheKey_GetHashCode_EqualKeys() { var key1 = new FastMemberInvokerCache.CacheKey(typeof(string), "Foo", new Type[0], new[] { typeof(int), typeof(string) }); var key2 = new FastMemberInvokerCache.CacheKey(typeof(string), "Foo", new Type[0], new[] { typeof(int), typeof(string) }); Assert.That(key1.GetHashCode(), Is.EqualTo(key2.GetHashCode())); }
public void CacheKey_Equals_NonEqualKeys_ArgumentTypes() { var key1 = new FastMemberInvokerCache.CacheKey(typeof(string), "Foo", new Type[0], new[] { typeof(int), typeof(string) }); var key2 = new FastMemberInvokerCache.CacheKey(typeof(string), "Foo", new Type[0], new[] { typeof(string), typeof(int) }); Assert.That(key1, Is.Not.EqualTo(key2)); }