public void Create() { var Database = new Utilities.ORM.Manager.Schema.Default.Database.Database("TestDatabase"); Utilities.ORM.Manager.Schema.Interfaces.ITable View = Database.AddView("TestView"); Assert.Equal(View, Database.Views.First()); Assert.Equal("TestView", View.Name); }
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 AddColumn() { var Database = new Utilities.ORM.Manager.Schema.Default.Database.Database("TestDatabase"); var Function = Database.AddStoredProcedure("TestStoredProcedure", "Definition"); Function.AddColumn<int>("Column1", DbType.Int32, 0); Assert.Equal(1, Function.Columns.Count); }
public void AddColumn() { var Database = new Utilities.ORM.Manager.Schema.Default.Database.Database("TestDatabase"); Utilities.ORM.Manager.Schema.Interfaces.ITable View = Database.AddView("TestView"); View.AddColumn<int>("Column1", DbType.Int32, 0, true); Assert.Equal(1, View.Columns.Count); }
public void AddView() { var Database = new Utilities.ORM.Manager.Schema.Default.Database.Database("TestDatabase"); Database.AddView("TestTable"); Assert.Equal(1, Database.Views.Count); Assert.Equal("TestTable", Database.Views.First().Name); Assert.Equal(Database, Database.Views.First().Source); }
public void Create() { var Database = new Utilities.ORM.Manager.Schema.Default.Database.Database("TestDatabase"); Utilities.ORM.Manager.Schema.Interfaces.ITable View = Database.AddView("TestView"); Assert.Equal(View, Database.Views.First()); Assert.Equal("TestView", View.Name); }
public void AddColumn() { var Database = new Utilities.ORM.Manager.Schema.Default.Database.Database("TestDatabase"); Utilities.ORM.Manager.Schema.Interfaces.ITable View = Database.AddView("TestView"); View.AddColumn <int>("Column1", DbType.Int32, 0, true); Assert.Equal(1, View.Columns.Count); }
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 AddColumn() { var Database = new Utilities.ORM.Manager.Schema.Default.Database.Database("TestDatabase"); var Function = Database.AddStoredProcedure("TestStoredProcedure", "Definition"); Function.AddColumn <int>("Column1", DbType.Int32, 0); Assert.Equal(1, Function.Columns.Count); }
public void AddView() { var Database = new Utilities.ORM.Manager.Schema.Default.Database.Database("TestDatabase"); Database.AddView("TestTable"); Assert.Equal(1, Database.Views.Count); Assert.Equal("TestTable", Database.Views.First().Name); Assert.Equal(Database, Database.Views.First().Source); }
public void AddFunction() { var Database = new Utilities.ORM.Manager.Schema.Default.Database.Database("TestDatabase"); Database.AddFunction("TestFunction", "FunctionDefinition"); Assert.Equal(1, Database.Functions.Count); Assert.Equal("TestFunction", Database.Functions.First().Name); Assert.Equal("FunctionDefinition", Database.Functions.First().Definition); Assert.Equal(Database, Database.Functions.First().Source); }
public void Create() { var Database = new Utilities.ORM.Manager.Schema.Default.Database.Database("TestDatabase"); var Function = Database.AddFunction("TestFunction", "Definition"); Assert.Equal(Function, Database.Functions.First()); Assert.Equal("TestFunction", Function.Name); Assert.Equal("Definition", Function.Definition); Assert.Equal(Database, Function.Source); }
public void Create() { var Database = new Utilities.ORM.Manager.Schema.Default.Database.Database("TestDatabase"); Assert.Equal("TestDatabase", Database.Name); Assert.Equal(0, Database.Functions.Count); Assert.Equal(0, Database.StoredProcedures.Count); Assert.Equal(0, Database.Tables.Count); Assert.Equal(0, Database.Views.Count); }
public void Create() { var Database = new Utilities.ORM.Manager.Schema.Default.Database.Database("TestDatabase"); var Function = Database.AddStoredProcedure("TestStoredProcedure", "Definition"); Assert.Equal(Function, Database.StoredProcedures.First()); Assert.Equal("TestStoredProcedure", Function.Name); Assert.Equal("Definition", ((Utilities.ORM.Manager.Schema.Interfaces.IFunction)Function).Definition); Assert.Equal(Database, Function.Source); }
public void AddStoredProcedures() { var Database = new Utilities.ORM.Manager.Schema.Default.Database.Database("TestDatabase"); Database.AddStoredProcedure("TestFunction", "FunctionDefinition"); Assert.Equal(1, Database.StoredProcedures.Count); Assert.Equal("TestFunction", Database.StoredProcedures.First().Name); Assert.Equal("FunctionDefinition", ((Utilities.ORM.Manager.Schema.Interfaces.IFunction)Database.StoredProcedures.First()).Definition); Assert.Equal(Database, Database.StoredProcedures.First().Source); }
public void Create() { var Database = new Utilities.ORM.Manager.Schema.Default.Database.Database("TestDatabase"); var Function = Database.AddStoredProcedure("TestStoredProcedure", "Definition"); Assert.Equal(Function, Database.StoredProcedures.First()); Assert.Equal("TestStoredProcedure", Function.Name); Assert.Equal("Definition", ((Utilities.ORM.Manager.Schema.Interfaces.IFunction)Function).Definition); Assert.Equal(Database, Function.Source); }
public void Create() { var Database = new Utilities.ORM.Manager.Schema.Default.Database.Database("TestDatabase"); var Function = Database.AddFunction("TestFunction", "Definition"); Assert.Equal(Function, Database.Functions.First()); Assert.Equal("TestFunction", Function.Name); Assert.Equal("Definition", Function.Definition); Assert.Equal(Database, Function.Source); }
public void AddFunction() { var Database = new Utilities.ORM.Manager.Schema.Default.Database.Database("TestDatabase"); Database.AddFunction("TestFunction", "FunctionDefinition"); Assert.Equal(1, Database.Functions.Count); Assert.Equal("TestFunction", Database.Functions.First().Name); Assert.Equal("FunctionDefinition", Database.Functions.First().Definition); Assert.Equal(Database, Database.Functions.First().Source); }
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 AddStoredProcedures() { var Database = new Utilities.ORM.Manager.Schema.Default.Database.Database("TestDatabase"); Database.AddStoredProcedure("TestFunction", "FunctionDefinition"); Assert.Equal(1, Database.StoredProcedures.Count); Assert.Equal("TestFunction", Database.StoredProcedures.First().Name); Assert.Equal("FunctionDefinition", ((Utilities.ORM.Manager.Schema.Interfaces.IFunction)Database.StoredProcedures.First()).Definition); Assert.Equal(Database, Database.StoredProcedures.First().Source); }
public void Create() { var Database = new Utilities.ORM.Manager.Schema.Default.Database.Database("TestDatabase"); Assert.Equal("TestDatabase", Database.Name); Assert.Equal(0, Database.Functions.Count); Assert.Equal(0, Database.StoredProcedures.Count); Assert.Equal(0, Database.Tables.Count); Assert.Equal(0, Database.Views.Count); }
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); }
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); }
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); }