Exemplo n.º 1
0
 public void EqualsTest0()
 {
     Triangle t0 = new Triangle(new Vertex(), new Vertex(), new Vertex());
     Triangle t1 = new Triangle(new Vertex(), new Vertex(), new Vertex());
     Assert.IsTrue(t0.Equals(t1));
     Assert.IsTrue(t1.Equals(t0));
     Assert.IsTrue(t0.GetHashCode() == t1.GetHashCode());
 }
Exemplo n.º 2
0
        public void EqualsTest2()
        {
            Random random = new Random();
            Triangle[] triangles = GetRandomTrianglePair(random);
            Triangle triangleModified = new Triangle(new Vertex(), triangles[0][2], triangles[0][1]);

            Assert.IsFalse(triangles[0].Equals(triangleModified));
            Assert.IsFalse(triangleModified.Equals(triangles[0]));
        }
Exemplo n.º 3
0
        public void EqualsTest1()
        {
            Random random = new Random();
            Triangle[] triangles = GetRandomTrianglePair(random);
            Triangle triangleRotated = new Triangle(triangles[0][1], triangles[0][2], triangles[0][1]);

            Assert.IsFalse(triangles[0].Equals(triangleRotated));
            Assert.IsFalse(triangleRotated.Equals(triangles[0]));
        }