Ejemplo n.º 1
0
        public void Equals_Test1()
        {
            PDFRect target = new PDFRect(10, 20, 30, 40);
            PDFRect other  = new PDFRect(10, 20, 30, 40);

            object obj      = null;
            bool   expected = false;
            bool   actual;

            actual = target.Equals(obj);
            Assert.AreEqual(expected, actual);

            obj      = other;
            expected = true;
            actual   = target.Equals(obj);
            Assert.AreEqual(expected, actual);
        }
Ejemplo n.º 2
0
        public void Equals_Test()
        {
            PDFRect target   = new PDFRect(10, 20, 30, 40);
            PDFRect other    = new PDFRect(10, 20, 30, 40);
            bool    expected = true;
            bool    actual;

            actual = target.Equals(other);
            Assert.AreEqual(expected, actual);

            other    = new PDFRect(20, 30, 40, 50);
            expected = false;
            actual   = target.Equals(other);
            Assert.AreEqual(expected, actual);

            other    = new PDFRect(0, 10, 20, 30);
            expected = false;
            actual   = target.Equals(other);
            Assert.AreEqual(expected, actual);
        }