19 lines
600 B
Java
19 lines
600 B
Java
package com.baeldung.junit;
|
|
|
|
import org.junit.runners.BlockJUnit4ClassRunner;
|
|
import org.junit.runners.model.FrameworkMethod;
|
|
import org.junit.runners.model.InitializationError;
|
|
import org.junit.runners.model.Statement;
|
|
|
|
public class BlockingTestRunner extends BlockJUnit4ClassRunner {
|
|
public BlockingTestRunner(Class<?> klass) throws InitializationError {
|
|
super(klass);
|
|
}
|
|
|
|
@Override
|
|
protected Statement methodInvoker(FrameworkMethod method, Object test) {
|
|
System.out.println("invoking: " + method.getName());
|
|
return super.methodInvoker(method, test);
|
|
}
|
|
}
|