예제 #1
0
 public void Create()
 {
     Utilities.SQL.DataClasses.Database Database = new Utilities.SQL.DataClasses.Database("TestDatabase");
     Utilities.SQL.DataClasses.Table Table = Database.AddTable("TestTable");
     Assert.Equal(Table, Database.Tables[0]);
     Assert.Equal("TestTable", Table.Name);
 }
예제 #2
0
 public void Create()
 {
     Utilities.SQL.DataClasses.Database Database = new Utilities.SQL.DataClasses.Database("TestDatabase");
     Utilities.SQL.DataClasses.Table    Table    = Database.AddTable("TestTable");
     Assert.Equal(Table, Database.Tables[0]);
     Assert.Equal("TestTable", Table.Name);
 }
 public void AddTable()
 {
     Utilities.SQL.DataClasses.Database Database = new Utilities.SQL.DataClasses.Database("TestDatabase");
     Database.AddTable("TestTable");
     Assert.Equal(1, Database.Tables.Count);
     Assert.Equal("TestTable", Database.Tables.First().Name);
     Assert.Equal(Database, Database.Tables.First().ParentDatabase);
 }
 public void AddTable()
 {
     Utilities.SQL.DataClasses.Database Database = new Utilities.SQL.DataClasses.Database("TestDatabase");
     Database.AddTable("TestTable");
     Assert.Equal(1, Database.Tables.Count);
     Assert.Equal("TestTable", Database.Tables[0].Name);
     Assert.Equal(Database, Database.Tables[0].ParentDatabase);
 }
예제 #5
0
 public void AddColumns()
 {
     Utilities.SQL.DataClasses.Database Database = new Utilities.SQL.DataClasses.Database("TestDatabase");
     Utilities.SQL.DataClasses.Table Table = Database.AddTable("TestTable");
     IColumn Column = Table.AddColumn<int>("Column1", DbType.Int32);
     Assert.Equal(Column, Table.Columns[0]);
     Assert.Equal("Column1", Column.Name);
     Assert.Equal(DbType.Int32, Column.DataType);
     Assert.Equal("", Column.Default);
 }
 public void Create()
 {
     Utilities.SQL.DataClasses.Database Database = new Utilities.SQL.DataClasses.Database("TestDatabase");
     Utilities.SQL.DataClasses.Table Table = Database.AddTable("TestTable");
     Utilities.SQL.DataClasses.Trigger TempTrigger = Table.AddTrigger("Trigger", "Definition", TriggerType.INSERT);
     Assert.Equal(TempTrigger, Table.Triggers[0]);
     Assert.Equal("Trigger", TempTrigger.Name);
     Assert.Equal("Definition", TempTrigger.Definition);
     Assert.Equal(TriggerType.INSERT, TempTrigger.Type);
     Assert.Equal(Table, TempTrigger.ParentTable);
 }
예제 #7
0
 public void Create()
 {
     Utilities.SQL.DataClasses.Database Database    = new Utilities.SQL.DataClasses.Database("TestDatabase");
     Utilities.SQL.DataClasses.Table    Table       = Database.AddTable("TestTable");
     Utilities.SQL.DataClasses.Trigger  TempTrigger = Table.AddTrigger("Trigger", "Definition", TriggerType.INSERT);
     Assert.Equal(TempTrigger, Table.Triggers[0]);
     Assert.Equal("Trigger", TempTrigger.Name);
     Assert.Equal("Definition", TempTrigger.Definition);
     Assert.Equal(TriggerType.INSERT, TempTrigger.Type);
     Assert.Equal(Table, TempTrigger.ParentTable);
 }
예제 #8
0
        public void AddColumns()
        {
            Utilities.SQL.DataClasses.Database Database = new Utilities.SQL.DataClasses.Database("TestDatabase");
            Utilities.SQL.DataClasses.Table    Table    = Database.AddTable("TestTable");
            IColumn Column = Table.AddColumn <int>("Column1", DbType.Int32);

            Assert.Equal(Column, Table.Columns[0]);
            Assert.Equal("Column1", Column.Name);
            Assert.Equal(DbType.Int32, Column.DataType);
            Assert.Equal("", Column.Default);
        }