All Downloads are FREE. Search and download functionalities are using the official Maven repository.

uk.org.retep.test.RetepClassRunner Maven / Gradle / Ivy

There is a newer version: 10.6
Show newest version
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package uk.org.retep.test;

import org.apache.log4j.xml.DOMConfigurator;
import org.junit.runners.BlockJUnit4ClassRunner;
import org.junit.runners.model.InitializationError;

/**
 *
 * @author peter
 */
public class RetepClassRunner
        extends BlockJUnit4ClassRunner
{

    static
    {
        DOMConfigurator.configure( RetepClassRunner.class.getResource( "log4j.xml" ) );
    }

    public RetepClassRunner( final Class testClass )
            throws InitializationError
    {
        super( testClass );
    }

    @Override
    protected T createTest()
            throws Exception
    {
        @SuppressWarnings( "unchecked" )
        final T instance = (T) super.createTest();
        prepareInstance( instance );
        return instance;
    }

    protected void prepareInstance( T instance )
            throws Exception
    {
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy