public void DefaultValues() { var sut = new PropertyReference(); Assert.AreEqual(new VariableReference(), sut.Reference); Assert.AreEqual(Names.UnknownProperty, sut.PropertyName); Assert.AreNotEqual(0, sut.GetHashCode()); Assert.AreNotEqual(1, sut.GetHashCode()); }
public void Equality_Default() { var a = new PropertyReference(); var b = new PropertyReference(); Assert.AreEqual(a, b); Assert.AreEqual(a.GetHashCode(), b.GetHashCode()); }
public void Equality_DifferentReference() { var a = new PropertyReference { Reference = SomeRef }; var b = new PropertyReference(); Assert.AreNotEqual(a, b); Assert.AreNotEqual(a.GetHashCode(), b.GetHashCode()); }
public void Equality_ReallyTheSame() { var a = new PropertyReference { Reference = SomeRef, PropertyName = SomeProperty }; var b = new PropertyReference { Reference = SomeRef, PropertyName = SomeProperty }; Assert.AreEqual(a, b); Assert.AreEqual(a.GetHashCode(), b.GetHashCode()); }