Fix the BlockDecorator to throw the AsssertionError, if any.
This commit is contained in:
@@ -28,6 +28,11 @@ public class BlockDecorator<T extends Test> extends AbstractDecorator<T> {
|
|||||||
method.invoke(getCommand().getObject());
|
method.invoke(getCommand().getObject());
|
||||||
return true;
|
return true;
|
||||||
} catch (InvocationTargetException e) {
|
} catch (InvocationTargetException e) {
|
||||||
|
Throwable exception = e.getCause();
|
||||||
|
|
||||||
|
if(exception instanceof AssertionError)
|
||||||
|
throw (AssertionError) exception;
|
||||||
|
|
||||||
System.err.println(e.getMessage());
|
System.err.println(e.getMessage());
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
} catch (IllegalAccessException e) {
|
} catch (IllegalAccessException e) {
|
||||||
|
|||||||
Reference in New Issue
Block a user