@Override protected void after() { super.after(); } }
@Override public Statement apply(Statement base, Description description) { currentTest = description; return super.apply(base, description); }
@Override protected void before() throws Throwable { super.before(); }
public Statement apply(Statement base, Description description) { return statement(base); }
@Override protected void before() throws Throwable { super.before(); clear(); }
public Statement apply(Statement base, Description description) { return statement(base); }
@Override protected void after() { super.after(); clear(); }
@Override protected void before() throws Throwable { logger.info( "Begin test:" + testName ); super.before(); }
@Override public Statement apply( final Statement statement, final Description description ) { Statement testMethod = new Statement() { @Override public void evaluate() throws Throwable { // If this is used as class rule then getMethodName() returns null, so use // getClassName() instead. String name = description.getMethodName() != null ? description.getMethodName() : description.getClassName(); workingDirectory = testDirectory.directory( name ); ensureDatabase( settings -> {} ); try { statement.evaluate(); } finally { shutdownDatabase(); } } }; Statement testMethodWithBeforeAndAfter = super.apply( testMethod, description ); return testDirectory.apply( testMethodWithBeforeAndAfter, description ); }
public Statement apply(Statement base, Description description) { return statement(base); }
@Override protected void after() { super.after(); logger.info( "Finished test:" + testName ); }
@Override protected synchronized void before() throws Throwable { if ( null == thunk ) { super.before(); thunk = executor.schedule( (Callable<Void>) () -> { dump(); return null; }, duration, timeUnit ); } else { throw new IllegalStateException( "process dumping thunk already started" ); } }
@Override public Statement apply( Statement base, Description description ) final Statement externalRuleStatement = super.apply( base, description ); return new Statement()
public Statement apply(Statement base, Description description) { return statement(base); }
@Override protected synchronized void after() { if ( null != thunk && !thunk.isDone() ) { thunk.cancel( true ); } thunk = null; super.after(); }
@Override protected void before() throws Throwable { batcher.setBlockingSubmit( true ); batcher.setBatchSize( 1 ); super.before(); }