use of com.sun.tck.lib.AfterTestGroup in project jtharness by openjdk.
the class AfterTestGroupActions method process.
/**
* {@inheritDoc}
*/
@Override
public void process(TestGroupContext.TestGroupLifePhase lifePhase, TestGroupContext context) throws Throwable {
AfterTestGroup before = (AfterTestGroup) getTheOnlyTestGroupAnnotationInterestedIn(context);
String methodName = before.value();
try {
searchAndInvoke(methodName, context.getTestGroupInstance().getClass(), context.getTestGroupInstance(), context.getLog());
} catch (SomethingIsWrong e) {
final String message = e.getMessage();
context.printlnToLog(message);
final String failedTryingToInvoke = MessageFormat.format("Failed trying to invoke @AfterTestGroup method \"{0}\"", methodName);
throw new RuntimeException(failedTryingToInvoke);
}
}
Aggregations