Java 类org.junit.jupiter.api.TestInstance 实例源码

项目:weld-junit    文件:WeldJunit5Extension.java   
private TestInstance.Lifecycle determineTestLifecycle(ExtensionContext ec) {
    // check the test for import org.junit.jupiter.api.TestInstance annotation
    TestInstance annotation = ec.getRequiredTestClass().getAnnotation(TestInstance.class);
    if (annotation != null) {
        return annotation.value();
    } else {
        return TestInstance.Lifecycle.PER_METHOD;
    }
}