Exemplo n.º 1
0
        public void EqualsTests()
        {
            Facet target = new Facet(facetName, interfaceName, servant);
            Facet obj1   = new Facet(facetName, interfaceName, servant);
            Facet obj2   = new Facet("Equals", interfaceName, servant);

            bool actual = target.Equals(obj1);

            Assert.AreEqual(true, actual);
            actual = target.Equals(obj2);
            Assert.AreEqual(false, actual);

            actual = target.Equals(null);
            Assert.AreEqual(false, actual);
            actual = target.Equals(new Object());
            Assert.AreEqual(false, actual);
        }
Exemplo n.º 2
0
        public void TestEquals()
        {
            var vn = new Vertex(12.34f, -98.7f, 54);
            var vertices = new Vertex[] { new Vertex(), vn, new Vertex(3, 2, 1) };
            var facet = new Facet(vn, vertices);

            Assert.False(facet.Equals((object)null));
            Assert.False(facet.Equals(12345));

            var facet2 = new Facet();
            Assert.False(facet.Equals((object)facet2));

            facet2 = new Facet(new Vertex(12.34f, -98.7f, 54), null);
            Assert.False(facet.Equals((object)facet2));

            facet2 = new Facet(new Vertex(12.34f, -98.7f, 54), vertices);
            Assert.True(facet.Equals((object)facet2));

            Assert.True(facet.Equals((object)facet));
        }
Exemplo n.º 3
0
        public void TestEquals()
        {
            var vn       = new Vertex(12.34f, -98.7f, 54);
            var vertices = new Vertex[] { new Vertex(), vn, new Vertex(3, 2, 1) };
            var facet    = new Facet(vn, vertices);

            Assert.False(facet.Equals((object)null));
            Assert.False(facet.Equals(12345));

            var facet2 = new Facet();

            Assert.False(facet.Equals((object)facet2));

            facet2 = new Facet(new Vertex(12.34f, -98.7f, 54), null);
            Assert.False(facet.Equals((object)facet2));

            facet2 = new Facet(new Vertex(12.34f, -98.7f, 54), vertices);
            Assert.True(facet.Equals((object)facet2));

            Assert.True(facet.Equals((object)facet));
        }