void TestCompareTo_ObjNotFace_Helper() { Face face = Auxilaries.RandomFace(); HalfEdge edge = Auxilaries.RandomHalfEdge(); face.CompareTo(edge); }
public void YIsNull() { Face x = Auxilaries.RandomFace(); Face y = null; Assert.IsFalse(comparer.Equals(x, y)); Assert.AreNotEqual(comparer.GetHashCode(x), comparer.GetHashCode(y)); }
public void XAndyAreNotEqual_ValueDifferent() { int idx = 2; KeyValuePair <int, Face> x = new KeyValuePair <int, Face>(idx, Auxilaries.RandomFace()); KeyValuePair <int, Face> y = new KeyValuePair <int, Face>(idx, Auxilaries.RandomFace()); Assert.IsFalse(comparer.Equals(x, y)); Assert.AreNotEqual(comparer.GetHashCode(x), comparer.GetHashCode(y)); }
public void XAndyAreNotEqual_KeyDifferent() { Face face = Auxilaries.RandomFace(); KeyValuePair <int, Face> x = new KeyValuePair <int, Face>(0, face); KeyValuePair <int, Face> y = new KeyValuePair <int, Face>(1, face); Assert.IsFalse(comparer.Equals(x, y)); Assert.AreNotEqual(comparer.GetHashCode(x), comparer.GetHashCode(y)); }
public void TestCompareTo_ObjNull() { Face face = Auxilaries.RandomFace(); int expected = 1; int actual = face.CompareTo(null); Assert.AreEqual(expected, actual); }
public void XAndyAreEqual_IncidentFaceDifferent() { Vertex origin = Auxilaries.RandomVertex(); Vertex destination = Auxilaries.RandomVertex(); HalfEdge x = new HalfEdge(origin); HalfEdge y = new HalfEdge(origin); x.Twin = new HalfEdge(destination); y.Twin = new HalfEdge(destination); x.IncidentFace = Auxilaries.RandomFace(); y.IncidentFace = Auxilaries.RandomFace(); Assert.IsTrue(comparer.Equals(x, y)); Assert.AreEqual(comparer.GetHashCode(x), comparer.GetHashCode(y)); }