public void Equals_SameEverythingButType_NotEqual() { var ms1 = new MethodSignature(GetType(), "Method", new[] {typeof (string)}); var ms2 = new MethodSignature(typeof (string), "Method", new[] {typeof (string)}); Assert.IsFalse(ms1.Equals(ms2)); Assert.AreNotEqual(ms1.GetHashCode(), ms2.GetHashCode()); Assert.AreNotEqual(ms1.ToString(), ms2.ToString()); }
public void Equals_DifferentNameSameTypes_NotEqual() { var ms1 = new MethodSignature(GetType(), "Method1", new[] {typeof (string)}); var ms2 = new MethodSignature(GetType(), "Method2", new[] {typeof (string)}); Assert.IsFalse(ms1.Equals(ms2)); Assert.AreNotEqual(ms1.GetHashCode(), ms2.GetHashCode()); Assert.AreNotEqual(ms1.ToString(), ms2.ToString()); }
public void Equals_SameNameSameTypes_Works() { var ms1 = new MethodSignature(GetType(), "Method", new[] {typeof (string)}); var ms2 = new MethodSignature(GetType(), "Method", new[] {typeof (string)}); Assert.IsTrue(ms1.Equals(ms2)); Assert.AreEqual(ms1.GetHashCode(), ms2.GetHashCode()); Assert.AreEqual(ms1.ToString(), ms2.ToString()); }
public void Equals_SameNameDifferentNumberOfTypes_NotEqual() { MethodSignature ms1 = new MethodSignature(GetType(), "Method", new Type[] { typeof(string) }); MethodSignature ms2 = new MethodSignature(GetType(), "Method", new Type[] { typeof(string), typeof(string) }); Assert.IsFalse(ms1.Equals(ms2)); Assert.AreNotEqual(ms1.GetHashCode(), ms2.GetHashCode()); Assert.AreNotEqual(ms1.ToString(), ms2.ToString()); }
public void Equals_SameEverythingButType_NotEqual() { var ms1 = new MethodSignature(GetType(), "Method", new[] { typeof(string) }); var ms2 = new MethodSignature(typeof(string), "Method", new[] { typeof(string) }); Assert.IsFalse(ms1.Equals(ms2)); Assert.AreNotEqual(ms1.GetHashCode(), ms2.GetHashCode()); Assert.AreNotEqual(ms1.ToString(), ms2.ToString()); }
public void Equals_DifferentNameSameTypes_NotEqual() { var ms1 = new MethodSignature(GetType(), "Method1", new[] { typeof(string) }); var ms2 = new MethodSignature(GetType(), "Method2", new[] { typeof(string) }); Assert.IsFalse(ms1.Equals(ms2)); Assert.AreNotEqual(ms1.GetHashCode(), ms2.GetHashCode()); Assert.AreNotEqual(ms1.ToString(), ms2.ToString()); }
public void Equals_SameNameSameTypes_Works() { var ms1 = new MethodSignature(GetType(), "Method", new[] { typeof(string) }); var ms2 = new MethodSignature(GetType(), "Method", new[] { typeof(string) }); Assert.IsTrue(ms1.Equals(ms2)); Assert.AreEqual(ms1.GetHashCode(), ms2.GetHashCode()); Assert.AreEqual(ms1.ToString(), ms2.ToString()); }
public void Equals_SameNameDifferentNumberOfTypes_NotEqual() { MethodSignature ms1 = new MethodSignature(GetType(), "Method", new Type[] { typeof(string) }); MethodSignature ms2 = new MethodSignature(GetType(), "Method", new Type[] { typeof(string), typeof(string) }); Assert.IsFalse(ms1.Equals(ms2)); Assert.AreNotEqual(ms1.GetHashCode(), ms2.GetHashCode()); Assert.AreNotEqual(ms1.ToString(), ms2.ToString()); }