public void SetUp()
 {
     Factory = new Db2DbFactory();
     Connection = Factory.CreateConnection(IntegrationTestOptions.Db2.ConnectionString);
     Quoter = new Db2Quoter();
     Processor = new Db2Processor(Connection, new Db2Generator(), new TextWriterAnnouncer(System.Console.Out), new ProcessorOptions(), Factory);
     Connection.Open();
 }
Ejemplo n.º 2
0
        public Db2TestTable(string table, Db2Processor processor, string schema, params string[] columnDefinitions)
        {
            Connection = processor.Connection;
            Transaction = processor.Transaction;
            Processor = processor;
            Factory = new Db2DbFactory();
            _schema = schema;

            if (Connection.State != ConnectionState.Open)
                Connection.Open();

            Name = quoter.UnQuote(table);
            NameWithSchema = !string.IsNullOrEmpty(_schema) ? string.Format("{0}.{1}", quoter.QuoteSchemaName(_schema), quoter.QuoteTableName(Name)) : quoter.QuoteTableName(Name);
            Create(columnDefinitions);
        }