Ejemplo n.º 1
0
        public void Equals()
        {
            DataTableCollection tbcol1 = _dataset[0].Tables;
            DataTableCollection tbcol2 = _dataset[1].Tables;
            DataTableCollection tbcol3;

            tbcol1.Add(_tables[0]);
            tbcol2.Add(_tables[1]);
            tbcol3 = tbcol1;

            AssertEquals("test#1", true, tbcol1.Equals(tbcol1));
            AssertEquals("test#2", true, tbcol1.Equals(tbcol3));
            AssertEquals("test#3", true, tbcol3.Equals(tbcol1));

            AssertEquals("test#4", false, tbcol1.Equals(tbcol2));
            AssertEquals("test#5", false, tbcol2.Equals(tbcol1));

            AssertEquals("test#6", true, Object.Equals(tbcol1, tbcol3));
            AssertEquals("test#7", true, Object.Equals(tbcol1, tbcol1));
            AssertEquals("test#8", false, Object.Equals(tbcol1, tbcol2));
        }
Ejemplo n.º 2
0
        public void Equals()
        {
            DataTableCollection tbcol1 = _dataset[0].Tables;
            DataTableCollection tbcol2 = _dataset[1].Tables;
            DataTableCollection tbcol3;

            tbcol1.Add(_tables[0]);
            tbcol2.Add(_tables[1]);
            tbcol3 = tbcol1;

            Assert.Equal(true, tbcol1.Equals(tbcol1));
            Assert.Equal(true, tbcol1.Equals(tbcol3));
            Assert.Equal(true, tbcol3.Equals(tbcol1));

            Assert.Equal(false, tbcol1.Equals(tbcol2));
            Assert.Equal(false, tbcol2.Equals(tbcol1));

            Assert.Equal(true, object.Equals(tbcol1, tbcol3));
            Assert.Equal(true, object.Equals(tbcol1, tbcol1));
            Assert.Equal(false, object.Equals(tbcol1, tbcol2));
        }
        public void Equals()
        {
            DataTableCollection tbcol1 = _dataset[0].Tables;
            DataTableCollection tbcol2 = _dataset[1].Tables;
            DataTableCollection tbcol3;

            tbcol1.Add(_tables[0]);
            tbcol2.Add(_tables[1]);
            tbcol3 = tbcol1;

            Assert.AreEqual(true, tbcol1.Equals(tbcol1), "test#1");
            Assert.AreEqual(true, tbcol1.Equals(tbcol3), "test#2");
            Assert.AreEqual(true, tbcol3.Equals(tbcol1), "test#3");

            Assert.AreEqual(false, tbcol1.Equals(tbcol2), "test#4");
            Assert.AreEqual(false, tbcol2.Equals(tbcol1), "test#5");

            Assert.AreEqual(true, Object.Equals(tbcol1, tbcol3), "test#6");
            Assert.AreEqual(true, Object.Equals(tbcol1, tbcol1), "test#7");
            Assert.AreEqual(false, Object.Equals(tbcol1, tbcol2), "test#8");
        }