public void DefaultValues() { var sut = new MethodReference(); Assert.AreEqual(new VariableReference(), sut.Reference); Assert.AreEqual(Names.UnknownMethod, sut.MethodName); Assert.AreNotEqual(0, sut.GetHashCode()); Assert.AreNotEqual(1, sut.GetHashCode()); }
public void Equality_Default() { var a = new MethodReference(); var b = new MethodReference(); Assert.AreEqual(a, b); Assert.AreEqual(a.GetHashCode(), b.GetHashCode()); }
public void Equality_DifferentReference() { var a = new MethodReference { Reference = SomeRef }; var b = new MethodReference(); Assert.AreNotEqual(a, b); Assert.AreNotEqual(a.GetHashCode(), b.GetHashCode()); }
public void Equality_ReallyTheSame() { var a = new MethodReference { Reference = SomeRef, MethodName = SomeMethod }; var b = new MethodReference { Reference = SomeRef, MethodName = SomeMethod }; Assert.AreEqual(a, b); Assert.AreEqual(a.GetHashCode(), b.GetHashCode()); }
public int GetHashCode(MethodReference obj) => obj.GetHashCode();