Esempio n. 1
0
        public void testAddColumnValues(TestTableNamesReal TestTableName, TestColumnNamesFake TestColumnName)
        {
            Int32          TotalUpdated    = 0;
            CswTableUpdate TestTableUpdate = _CswNbtSchemaModTrnsctn.makeCswTableUpdate("testAddColumnValues_update", _TestTableNamesReal[TestTableName]);
            DataTable      TestTable       = TestTableUpdate.getTable();

            foreach (DataRow CurrentRow in TestTable.Rows)
            {
                CurrentRow[_TestColumnNamesFake[TestColumnName]] = "Test val " + TestTable.Rows.IndexOf(CurrentRow).ToString();
                TotalUpdated++;
            }

            TestTableUpdate.update(TestTable);

            Int32 TotalUpdatedInfact = 0;

            TestTable = TestTableUpdate.getTable();
            foreach (DataRow CurrentRow in TestTable.Rows)
            {
                if ((getTestNameStem(TestNameStem.TestVal) + TestTable.Rows.IndexOf(CurrentRow)) == CurrentRow[_TestColumnNamesFake[TestColumnName]].ToString())
                {
                    TotalUpdatedInfact++;
                }
            }

            if (TotalUpdatedInfact != TotalUpdated)
            {
                throw (new CswDniException("Error adding column " + _TestColumnNamesFake[TestColumnName] + ": updated " + TotalUpdated.ToString() + " rows but retrieved " + TotalUpdatedInfact.ToString() + " with that value"));
            }
        }//_testAddColumnValues()
Esempio n. 2
0
 public string getRealTestTableName(TestTableNamesReal TestTableName)
 {
     return(_TestTableNamesReal[TestTableName]);
 }