@Override protected void setUp() throws Exception { super.setUp(); configureLogging(); }
/** * Enable trace logging for the given category name. * * @param name - the logging category to enable trace level logging for. */ protected void enableTrace(String name) { getDelegate().enableTrace(name); }
/** * Overriden to restore the old behavior where the log was initialized post ctor rather * than post setUp. */ @Override public Logger getLog() { Logger theLog; if( delegate == null ) { theLog = Logger.getLogger(getClass()); } else { theLog = super.getLog(); } return theLog; }
/** * Create a test with test's package visible and the packages * of the classes listed * * It exports everything * * @param clazz the test class * @param importAll whether to import all * @param packages the classes in packages that should also be included * @return the test */ public static Test suite(Class<?> clazz, boolean importAll, Class<?>... packages) { helper = new IsolatedClassLoaderTestHelper(); Class<?> newClass = helper.initializeClassLoader(clazz, importAll, packages); // Create the test based on the isolated class return AbstractTestCaseWithSetup.suite(newClass); }
@Override protected void tearDown() throws Exception { if (methodDeployment != null) undeploy(methodDeployment); if (autowireCandidate) clearAutowire(); super.tearDown(); }
/** * Create a test with test's package visible and the packages * of the classes listed * * It exports everything * * @param clazz the test class * @param importAll whether to import all * @param packages the classes in packages that should also be included * @return the test */ public static Test suite(Class<?> clazz, boolean importAll, Class<?>... packages) { helper = new IsolatedClassLoaderTestHelper(); Class<?> newClass = helper.initializeClassLoader(clazz, importAll, packages); // Create the test based on the isolated class return AbstractTestCaseWithSetup.suite(newClass); }
/** * Create a delegate by calling AbstractTestDelegate.getDelegate(clazz) * to allow for a test specific delegate. * This method then delegates to the AbstractTestDelegate.setUp method. * @throws Exception */ protected void setUp() throws Exception { super.setUp(); log = getLog(); delegate = (JBossTestServices) AbstractTestSetup.delegate; }
/** * Get the jboss logger. */ public Logger getLog() { return getDelegate().getLog(); }
/** * Overriden to restore the old behavior where the log was initialized post ctor rather * than post setUp. */ @Override public Logger getLog() { Logger theLog; if( delegate == null ) { theLog = Logger.getLogger(getClass()); } else { theLog = super.getLog(); } return theLog; }
/** * Create a delegate by calling AbstractTestDelegate.getDelegate(clazz) * to allow for a test specific delegate. * This method then delegates to the AbstractTestDelegate.setUp method. * @throws Exception */ protected void setUp() throws Exception { super.setUp(); log = getLog(); delegate = (JBossTestServices) AbstractTestSetup.delegate; }
/** * Enable trace logging for the given category name. * * @param name - the logging category to enable trace level logging for. */ protected void enableTrace(String name) { getDelegate().enableTrace(name); }
protected void setUp() throws Exception { super.setUp(); configureLogging(); }
/** * Get the jboss logger. */ public Logger getLog() { return getDelegate().getLog(); }
@Override protected void setUp() throws Exception { super.setUp(); configureLogging(); }
protected void setUp() throws Exception { super.setUp(); URL url = getMethodResource(); if (url != null) methodDeployment = deploy(url); else getLog().debug("No method specific deployment " + getMethodDeployment()); afterSetUp(); }