public void Setup() { Connection = new SQLiteConnection(IntegrationTestOptions.SqlLite.ConnectionString); Processor = new SqliteProcessor(Connection, new SqliteGenerator(), new TextWriterAnnouncer(System.Console.Out), new ProcessorOptions(), new SqliteDbFactory()); SchemaDumper = new SqliteSchemaDumper(Processor, new TextWriterAnnouncer(System.Console.Out)); Connection.Open(); }
public void CanGetTableDdlByName() { var tableName = "Author"; using (var conn = Processor.Connection) { using (var cmd = conn.CreateCommand()) { cmd.CommandText = CreateTableSql; cmd.ExecuteNonQuery(); } var schema = new SqliteSchemaDumper(Processor, new TextWriterAnnouncer(System.Console.Out)); var tableDDL = schema.GetTableDDL(tableName); Assert.IsFalse(string.IsNullOrEmpty(tableDDL)); Assert.IsTrue(SqliteSchemaDumper.HasValidSimpleTableDDL(ref tableDDL)); } }