예제 #1
0
 public void Create()
 {
     var Database = new Utilities.ORM.Manager.Schema.Default.Database.Database("TestDatabase");
     Utilities.ORM.Manager.Schema.Interfaces.ITable Table = Database.AddTable("TestTable");
     Assert.Equal(Table, Database.Tables.First());
     Assert.Equal("TestTable", Table.Name);
 }
        public void Create()
        {
            var Database = new Utilities.ORM.Manager.Schema.Default.Database.Database("TestDatabase");
            var Table    = Database.AddTable("TestTable");

            Assert.Equal(Table, Database.Tables.First());
            Assert.Equal("TestTable", Table.Name);
        }
 public void AddTable()
 {
     var Database = new Utilities.ORM.Manager.Schema.Default.Database.Database("TestDatabase");
     Database.AddTable("TestTable");
     Assert.Equal(1, Database.Tables.Count);
     Assert.Equal("TestTable", Database.Tables.First().Name);
     Assert.Equal(Database, Database.Tables.First().Source);
 }
        public void AddTable()
        {
            var Database = new Utilities.ORM.Manager.Schema.Default.Database.Database("TestDatabase");

            Database.AddTable("TestTable");
            Assert.Equal(1, Database.Tables.Count);
            Assert.Equal("TestTable", Database.Tables.First().Name);
            Assert.Equal(Database, Database.Tables.First().Source);
        }
예제 #5
0
 public void AddColumns()
 {
     var Database = new Utilities.ORM.Manager.Schema.Default.Database.Database("TestDatabase");
     Utilities.ORM.Manager.Schema.Interfaces.ITable Table = Database.AddTable("TestTable");
     Utilities.ORM.Manager.Schema.Interfaces.IColumn Column = Table.AddColumn<int>("Column1", DbType.Int32);
     Assert.Equal(Column, Table.Columns.First());
     Assert.Equal("Column1", Column.Name);
     Assert.Equal(DbType.Int32, Column.DataType);
     Assert.Equal("", Column.Default);
 }
        public void AddColumns()
        {
            var Database = new Utilities.ORM.Manager.Schema.Default.Database.Database("TestDatabase");
            var Table    = Database.AddTable("TestTable");
            var Column   = Table.AddColumn <int>("Column1", DbType.Int32);

            Assert.Equal(Column, Table.Columns.First());
            Assert.Equal("Column1", Column.Name);
            Assert.Equal(DbType.Int32, Column.DataType);
            Assert.Equal("", Column.Default);
        }
예제 #7
0
 public void Create()
 {
     var Database = new Utilities.ORM.Manager.Schema.Default.Database.Database("TestDatabase");
     var Table = Database.AddTable("TestTable");
     var TempTrigger = Table.AddTrigger("Trigger", "Definition", TriggerType.Insert);
     Assert.Equal(TempTrigger, Table.Triggers.First());
     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 Create()
        {
            var Database = new Utilities.ORM.Manager.Schema.Default.Database.Database("TestDatabase");

            Utilities.ORM.Manager.Schema.Interfaces.ITable   Table       = Database.AddTable("TestTable");
            Utilities.ORM.Manager.Schema.Interfaces.ITrigger TempTrigger = Table.AddTrigger("Trigger", "Definition", TriggerType.Insert);
            Assert.Equal(TempTrigger, Table.Triggers.First());
            Assert.Equal("Trigger", TempTrigger.Name);
            Assert.Equal("Definition", TempTrigger.Definition);
            Assert.Equal(TriggerType.Insert, TempTrigger.Type);
            Assert.Equal(Table, TempTrigger.ParentTable);
        }