This commit is contained in:
alincojanu
2017-10-04 21:08:28 +03:00
committed by Grzegorz Piwowarek
parent 8a77746e4d
commit eaba521fdf
7 changed files with 127 additions and 0 deletions
@@ -0,0 +1,18 @@
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);
}
}