Search in sources :

Example 1 with TextListener2

use of sdb.junit.TextListener2 in project jena by apache.

the class DBTest method execCmd.

@Override
protected void execCmd(List<String> args) {
    if (isVerbose()) {
        for (String k : params) System.out.printf("%-20s = %-20s\n", k, params.get(k));
        System.out.println();
    }
    Connection jdbc = getModStore().getConnection().getSqlConnection();
    // Hack to pass to calculated parameters to the test subsystem.
    sdb.test.Env.set(jdbc, params, false);
    JUnitCore x = new org.junit.runner.JUnitCore();
    //RunListener listener = new TextListener2() ;
    RunListener listener = new TextListener2(System.out);
    x.addListener(listener);
    //x.run(sdb.test.AllTests.class) ;
    System.out.println("String basic");
    x.run(TestStringBasic.class);
    System.out.println("String I18N");
    x.run(TestI18N.class);
// Better way of having parameters for a class than a @Parameterised test of one thing?
//        Request request = Request.aClass(sdb.test.T.class) ;
//        x.run(request) ;
}
Also used : JUnitCore(org.junit.runner.JUnitCore) Connection(java.sql.Connection) TextListener2(sdb.junit.TextListener2) RunListener(org.junit.runner.notification.RunListener)

Aggregations

Connection (java.sql.Connection)1 JUnitCore (org.junit.runner.JUnitCore)1 RunListener (org.junit.runner.notification.RunListener)1 TextListener2 (sdb.junit.TextListener2)1