Callable<Void> call = new Callable<Void>()
{
@Override
public Void call() throws Exception
{
ActionDefinition actionDef = RuleModelFactory.eINSTANCE.createActionDefinition();
actionDef.setActionType(ActionType.CREATE_LINK);
List<String> elements = new ArrayList<String>();
elements.add("e1");
assertFalse(ruleValidator.checkActionDefinition(project, actionDef, elements));
actionDef.setSourceElement("e2");
assertFalse(ruleValidator.checkActionDefinition(project, actionDef, elements));
actionDef.setSourceElement("e1");
assertFalse(ruleValidator.checkActionDefinition(project, actionDef, elements));
actionDef.setTargetElement("e2");
assertFalse(ruleValidator.checkActionDefinition(project, actionDef, elements));
elements.add("e2");
assertFalse(ruleValidator.checkActionDefinition(project, actionDef, elements));
actionDef.setResultType("test");
assertFalse(ruleValidator.checkActionDefinition(project, actionDef, elements));
LinkType linkType = LinkModelFactory.eINSTANCE.createLinkType();
accessLayer.addElement(project, linkType);
linkType.setName("test");
assertTrue(ruleValidator.checkActionDefinition(project, actionDef, elements));