Search in sources :

Example 1 with AfterTestGroup

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);
    }
}
Also used : SomethingIsWrong(com.sun.tck.lib.tgf.SomethingIsWrong) AfterTestGroup(com.sun.tck.lib.AfterTestGroup)

Aggregations

AfterTestGroup (com.sun.tck.lib.AfterTestGroup)1 SomethingIsWrong (com.sun.tck.lib.tgf.SomethingIsWrong)1