use of org.junit.jupiter.api.extension.ExtensionConfigurationException in project junit5 by junit-team.
the class ScriptExecutionConditionTests method throwingEvaluatorExceptionMessage.
@Test
void throwingEvaluatorExceptionMessage() {
String message = "Mock for message";
ReflectiveOperationException cause = new ReflectiveOperationException("Mock for ReflectiveOperationException");
ScriptExecutionCondition.Evaluator evaluator = new ScriptExecutionCondition.ThrowingEvaluator(message, cause);
Exception e = assertThrows(Exception.class, () -> evaluator.evaluate(null, null));
assertTrue(e instanceof ExtensionConfigurationException);
assertEquals(message, e.getMessage());
}
Aggregations