use of com.sun.tck.lib.BeforeTestGroup in project jtharness by openjdk.
the class BeforeTestGroupActions method process.
/**
* {@inheritDoc}
*/
@Override
public void process(TestGroupContext.TestGroupLifePhase lifePhase, TestGroupContext context) throws Throwable {
BeforeTestGroup before = (BeforeTestGroup) 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 @BeforeTestGroup method \"{0}\"", methodName);
throw new RuntimeException(failedTryingToInvoke);
}
}
Aggregations