Ejemplo n.º 1
0
 public void TablesCanCreateDataTablesWithSubsetOfColumns()
 {
     TestTable t = new TestTable();
     DataTable dt = t.CreateDataTable(t.StringColumn, t.IntColumn);
     Assert.AreEqual("TestTable", dt.TableName);
     Assert.AreEqual(2, dt.Columns.Count);
     AssertDataColumn(dt.Columns[0], "StringColumn", typeof(string));
     AssertDataColumn(dt.Columns[1], "IntColumn", typeof(int));
 }
Ejemplo n.º 2
0
 public void TablesCanCreateDataTablesWithCorrectNameAndColumns()
 {
     TestTable t = new TestTable();
     DataTable dt = t.CreateDataTable();
     Assert.AreEqual("TestTable", dt.TableName);
     Assert.AreEqual(3, dt.Columns.Count);
     AssertDataColumn(dt.Columns[0], "IntColumn", typeof(int));
     AssertDataColumn(dt.Columns[1], "StringColumn", typeof(string));
     AssertDataColumn(dt.Columns[2], "DateColumn", typeof(DateTime));
 }