Exemplo n.º 1
0
        void TestCompareTo_ObjNotFace_Helper()
        {
            Face     face = Auxilaries.RandomFace();
            HalfEdge edge = Auxilaries.RandomHalfEdge();

            face.CompareTo(edge);
        }
Exemplo n.º 2
0
        public void YIsNull()
        {
            Face x = Auxilaries.RandomFace();
            Face y = null;

            Assert.IsFalse(comparer.Equals(x, y));
            Assert.AreNotEqual(comparer.GetHashCode(x), comparer.GetHashCode(y));
        }
Exemplo n.º 3
0
        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));
        }
Exemplo n.º 4
0
        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));
        }
Exemplo n.º 5
0
        public void TestCompareTo_ObjNull()
        {
            Face face = Auxilaries.RandomFace();

            int expected = 1;
            int actual   = face.CompareTo(null);

            Assert.AreEqual(expected, actual);
        }
Exemplo n.º 6
0
        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));
        }