@Retention(value=RUNTIME)
@Target(value=METHOD)
public @interface KOTest
visual test compatibility kit
or headless test compatibility kit
and should be executed in appropriate environment. The method annotated by
this annotation will be public instance method of its class
with no arguments. A typical way to enumerate such methods is:
public final class ScriptEngineJavaScriptTCK extendsand then one can execute such methods asJavaScriptTCK
{ static <R> void collectTckTests(List
<R> res,Function
<Method
, R> factory) { for (Class
c : testClasses()) { for (Method
m : c.getMethods()) { if (m.getAnnotation(KOTest
.class) != null) { res.add(factory.apply(m)); } } } } }
Object
instance = method.getDeclaringClass().newInstance();
method.invoke(instance);
Copyright © 2021 The Apache Software Foundation. All rights reserved.