Search in sources :

Example 1 with RunRules

use of org.junit.rules.RunRules in project pact-jvm by DiUS.

the class InteractionRunner method withRules.

protected Statement withRules(final Interaction interaction, final Object target, final Statement statement) {
    final List<TestRule> testRules = testClass.getAnnotatedMethodValues(target, Rule.class, TestRule.class);
    testRules.addAll(testClass.getAnnotatedFieldValues(target, Rule.class, TestRule.class));
    return testRules.isEmpty() ? statement : new RunRules(statement, testRules, describeChild(interaction));
}
Also used : TestRule(org.junit.rules.TestRule) RunRules(org.junit.rules.RunRules) TestRule(org.junit.rules.TestRule) Rule(org.junit.Rule)

Aggregations

Rule (org.junit.Rule)1 RunRules (org.junit.rules.RunRules)1 TestRule (org.junit.rules.TestRule)1