Package com.oltpbenchmark.api

Source Code of com.oltpbenchmark.api.TestCreateDialects

package com.oltpbenchmark.api;

import junit.framework.TestCase;

import com.oltpbenchmark.catalog.Catalog;
import com.oltpbenchmark.catalog.Table;
import com.oltpbenchmark.types.DatabaseType;

public class TestCreateDialects extends TestCase {
   
//    static {
//        org.apache.log4j.PropertyConfigurator.configure("/home/pavlo/Documents/OLTPBenchmark/OLTPBenchmark/log4j.properties");
//    }
   
    private BenchmarkModule benchmark;
    private Catalog catalog;
   
    @Override
    protected void setUp() throws Exception {
        super.setUp();
       
        // Get our catalog information
        this.benchmark = new MockBenchmark();
        this.catalog = new Catalog(this.benchmark);
        assertNotNull(this.catalog);
    }
   
    /**
     * testMySQL
     */
    public void testMySQL() throws Exception {
        CreateDialects convertor = new CreateDialects(DatabaseType.MYSQL, this.catalog);
       
        for (Table catalog_tbl : this.catalog.getTables()) {
            assertNotNull(catalog_tbl);
           
            StringBuilder sb = new StringBuilder();
            convertor.createMySQL(catalog_tbl, sb);
            assertFalse(sb.length() == 0);
            System.err.println(sb + "\n");
        } // FOR
       
    }

}
TOP

Related Classes of com.oltpbenchmark.api.TestCreateDialects

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.