package org.junit.jupiter.engine.discovery.predicates;
import static org.apiguardian.api.API.Status.INTERNAL;
import static org.junit.platform.commons.util.AnnotationUtils.isAnnotated;
import java.util.function.Predicate;
import org.apiguardian.api.API;
import org.junit.jupiter.api.Nested;
@API(status = INTERNAL, since = "5.0")
public class IsNestedTestClass implements Predicate<Class<?>> {
private static final IsInnerClass isInnerClass = new IsInnerClass();
@Override
public boolean test(Class<?> candidate) {
if (!isInnerClass.test(candidate)) {
return false;
}
return isAnnotated(candidate, Nested.class);
}
}