Concern c1 = URNModelFactory.eINSTANCE.createConcern();
Concern c2 = URNModelFactory.eINSTANCE.createConcern();
accessLayer.addElement(project, c1);
accessLayer.addElement(project, c2);
AtomicChangeType type = ChangeModelFactory.eINSTANCE.createAtomicChangeType();
accessLayer.addElement(project, type);
List<List<EObject>> result = new ArrayList<List<EObject>>();
result.add(new ArrayList<EObject>());
result.add(new ArrayList<EObject>());
result.add(new ArrayList<EObject>());
result.get(0).add(c1);
result.get(1).add(c2);
result.get(2).add(type);
List<EObject[]> tuples = new ArrayList<EObject[]>();
tuples.add(new EObject[3]);
tuples.get(0)[0] = c1;
tuples.get(0)[1] = c2;
tuples.get(0)[2] = type;
Rule rule = RuleModelFactory.eINSTANCE.createRule();
accessLayer.addElement(project, rule);
ActionDefinition action = RuleModelFactory.eINSTANCE.createActionDefinition();
accessLayer.addElement(project, action);
rule.getActions().add(action);
action.setSourceElement("e1");
action.setImpactedElement("e2");
action.setResultType("Test");
action.setActionType(ActionType.REPORT_IMPACT);
ElementDefinition e1 = RuleModelFactory.eINSTANCE.createElementDefinition();
ElementDefinition e2 = RuleModelFactory.eINSTANCE.createElementDefinition();
ElementDefinition e3 = RuleModelFactory.eINSTANCE.createElementDefinition();
accessLayer.addElement(project, e1);
accessLayer.addElement(project, e2);
accessLayer.addElement(project, e3);
e1.setAlias("e1");
e2.setAlias("e2");
e3.setAlias("e3");
e1.setType("Concern");
e2.setType("Concern");
e3.setType("AtomicChangeType");
rule.getElements().add(e1);
rule.getElements().add(e2);
rule.getElements().add(e3);
rule.setRuleID("TestRule");
type.setName("Test");
assertEquals(0, resultProcessor.getImpactSet().size());
resultProcessor.processReportImpactResult(project, rule, result, tuples, 0);
assertEquals(1, resultProcessor.getImpactSet().size());
}