public Trigger Build(Trigger trigger) { if (table == null) table = new TableBuilder().Build(); table.Triggers.Add(trigger); trigger.ParentObject = table; trigger.Schema = schema ?? new SchemaBuilder().Build(); trigger.Type = SqlObjectType.SqlDmlTrigger; return trigger; }
public void FixtureSetUp() { using (var session = SessionFactory.OpenSession()) { testedObject = session.CreateCriteria<Index>() .Add(Restrictions.Eq("Name", "PK_test_table")) .UniqueResult<Index>(); expectedTable = session.CreateCriteria<Table>() .Add(Restrictions.Eq("Name", "test_table")) .UniqueResult<Table>(); } }
public TriggerBuilder With(Table table) { this.table = table; return this; }
public void FixtureSetUp() { using (var session = SessionFactory.OpenSession()) { expectedTable = session.CreateCriteria<Table>() .Add(Restrictions.Eq("Name", "test_table")) .UniqueResult<Table>(); column = session.CreateCriteria<Column>() .Add(Restrictions.Eq("Name", "test")) .Add(Restrictions.Eq("ParentObject", expectedTable)) .UniqueResult<Column>(); expectedType = TypeMapTestBase.GetTypeByName("varchar", session); } }