use of com.buschmais.jqassistant.core.rule.api.model.Constraint in project jqa-core-framework by buschmais.
the class TransactionalVisitorTest method ruleException.
@Test
void ruleException() throws RuleException {
Constraint constraint = mock(Constraint.class);
doThrow(new RuleException("Test")).when(delegate).visitConstraint(constraint, MAJOR);
try {
visitor.visitConstraint(constraint, MAJOR);
fail("Expecting a " + RuleException.class);
} catch (RuleException e) {
verify(delegate).visitConstraint(constraint, MAJOR);
verifyFailedTransaction();
}
}
use of com.buschmais.jqassistant.core.rule.api.model.Constraint in project jqa-core-framework by buschmais.
the class TransactionalVisitorTest method visitConstraint.
@Test
void visitConstraint() throws RuleException {
Constraint constraint = mock(Constraint.class);
visitor.visitConstraint(constraint, MINOR);
verify(delegate).visitConstraint(constraint, MINOR);
verifySuccessfulTransaction();
}
Aggregations