Search in sources :

Example 6 with ConditionEvaluationResult

use of org.junit.jupiter.api.extension.ConditionEvaluationResult in project junit5 by junit-team.

the class ScriptExecutionEvaluatorTests method defaultConditionEvaluationResultProperties.

@Test
void defaultConditionEvaluationResultProperties() {
    Script script = script(EnabledIf.class, "true");
    ConditionEvaluationResult result = evaluate(script);
    assertFalse(result.isDisabled());
    assertThat(result.toString()).contains("ConditionEvaluationResult", "enabled", "true", "reason");
}
Also used : Script(org.junit.jupiter.engine.script.Script) ConditionEvaluationResult(org.junit.jupiter.api.extension.ConditionEvaluationResult) Test(org.junit.jupiter.api.Test) DynamicTest.dynamicTest(org.junit.jupiter.api.DynamicTest.dynamicTest) DynamicTest(org.junit.jupiter.api.DynamicTest)

Aggregations

ConditionEvaluationResult (org.junit.jupiter.api.extension.ConditionEvaluationResult)6 Test (org.junit.jupiter.api.Test)5 DynamicTest (org.junit.jupiter.api.DynamicTest)3 DynamicTest.dynamicTest (org.junit.jupiter.api.DynamicTest.dynamicTest)3 Script (org.junit.jupiter.engine.script.Script)3 ExtensionContext (org.junit.jupiter.api.extension.ExtensionContext)2 AnnotatedElement (java.lang.reflect.AnnotatedElement)1