eu.drus.jpa.unit.rule.MethodRuleRegistrar Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jpa-unit4 Show documentation
Show all versions of jpa-unit4 Show documentation
JUnit 4 extension to run tests for JPA entities using EntityManagerFactory or EntityManager
package eu.drus.jpa.unit.rule;
import java.util.List;
import org.junit.rules.MethodRule;
import eu.drus.jpa.unit.spi.ExecutionContext;
import eu.drus.jpa.unit.spi.DecoratorExecutor;
public final class MethodRuleRegistrar {
private MethodRuleRegistrar() {}
public static List registerRules(final List rules, final DecoratorExecutor executor, final ExecutionContext ctx) {
rules.add((base, method, target) -> new TestMethodStatement(ctx, executor, base, method, target));
rules.add((base, method, target) -> new TestClassStatement(ctx, executor, base, target));
return rules;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy