assertGenerated(onAccess);
Operation init = assertHasOperation(target, "init");
assertGenerated(init);
ECARule run = assertHasRunAction(root, onAccess, init, new Filter<ECARule>() {
@Override
public boolean accept(ECARule r) {
if (r.getInParameterEdges().size() != 1)
return false;
ParameterEdgesSource paramSource = r.getInParameterEdges().get(0).getParameterValue();
if (paramSource.eContainer().equals(changed))
return true;
return false;
}
});
assertGenerated(run);
Value sourceValue = assertHasFieldValue(changed);
assertGenerated(sourceValue);
// parameter
assertGenerated(assertHasParameter(root, sourceValue, run));
// but there should only be one
assertEquals(run.getInParameterEdges().toString(), 1, run.getInParameterEdges().size());
BuiltinProperty cond = assertHasBuiltinProperty(changed, "fieldValue is set");
assertGenerated(cond);
assertGenerated(assertHasSimpleCondition(root, cond, run));