예제 #1
0
 public void can_build_table2_schema()
 {
     var op = new SqlAddTableOperation { SchemaName = "dbo", TableName = "Foo" };
     op.AddColumn("Id", DbType.Int32, ColumnProperty.PrimaryKeyWithIdentity);
     op.AddColumn("BarId", DbType.Int32, ColumnProperty.NotNull);
     op.AddColumn("Name", DbType.String, 50, ColumnProperty.NotNull);
     op.AddColumn("Description", DbType.String, ColumnProperty.Null);
     Assert.AreEqual(TABLE2, op.ToString());
 }
예제 #2
0
 public void add_table_throws_exception_without_tablename()
 {
     var op = new SqlAddTableOperation { SchemaName = "dbo", TableName = null };
     op.ToString();
     Assert.Fail();
 }