Search in sources :

Example 1 with Namespace

use of org.junit.jupiter.api.extension.ExtensionContext.Namespace in project junit5 by junit-team.

the class TestRuleSupport method getRuleAnnotatedMembers.

@SuppressWarnings("unchecked")
private List<TestRuleAnnotatedMember> getRuleAnnotatedMembers(ExtensionContext context) {
    Object testInstance = context.getRequiredTestInstance();
    Namespace namespace = Namespace.create(TestRuleSupport.class, context.getRequiredTestClass());
    // @formatter:off
    return context.getStore(namespace).getOrComputeIfAbsent("rule-annotated-members", key -> findRuleAnnotatedMembers(testInstance), List.class);
// @formatter:on
}
Also used : Namespace(org.junit.jupiter.api.extension.ExtensionContext.Namespace)

Aggregations

Namespace (org.junit.jupiter.api.extension.ExtensionContext.Namespace)1