Exemple #1
0
        // ----------------------------------------------------------------------------------------
        /// <!-- RichDataTable_Copy_test -->
        /// <summary>
        ///
        /// </summary>
        public void RichDataTable_Copy_test()
        {
            Assert.ThingsAbout("RichDataTable", "Copy");

            RichDataTable rt  = SimpleTestTable();
            RichDataTable rt2 = rt.Copy();
            int           row = rt.Count - 1;

            Assert.That(rt2.StrValue(row, 0, "b"), Is.equal_to, rt2.StrValue(row, 0, "a"));
            Assert.That(rt2.IntValue(row, 1, 1), Is.equal_to, rt2.IntValue(row, 1, 0));

            _result += Assert.Conclusion;
        }
Exemple #2
0
        // ----------------------------------------------------------------------------------------
        /// <!-- RichDataTable_Add_test -->
        /// <summary>
        ///
        /// </summary>
        public void RichDataTable_Add_test()
        {
            Assert.ThingsAbout("RichDataTable", "Add");

            RichDataTable rt  = SimpleTestTable();
            RichDataTable rt2 = rt.Clone();

            Assert.That(rt2.Columns[1].ColumnName, Is.equal_to, rt.Columns[1].ColumnName);

            rt2.Add(1, rt); // _CopyRowToTable(1, rt2);
            rt2.Add(0, rt); // _CopyRowToTable(0, rt2);
            int age1 = rt.IntValue(1, 1, 1);
            int age2 = rt2.IntValue(0, 1, 2);

            Assert.That(age2, Is.equal_to, age1);
            string name1 = rt.StrValue(0, 0, "a");
            string name2 = rt2.StrValue(1, 0, "b");

            Assert.That(name2, Is.equal_to, name1);

            _result += Assert.Conclusion;
        }