I'm writing unit tests and trying to use ExecutionCondition
for enabling the test only when specific profile activated exclusively.
I created my ExecutionCondition
.
class EnabledWithH2ExclusiveExecutionCondition implements ExecutionCondition {
@Override
public ConditionEvaluationResult evaluateExecutionCondition(
final ExtensionContext context) {
// check the environment
}
@Autowired
private Environment environment;
}
But the environment
is not injected.
How can I do that?