project.addModelElement(EMFfitModelFactory.eINSTANCE
.createInfluencingFactor());
//test without exclude
AccessLayerContentProvider cp = new AccessLayerContentProvider(
"Factor", "foo", accessLayer);
assertEquals(false, cp.getExecuted());
cp.run();
assertEquals(true, cp.getExecuted());
List<ContentProviderResultItem> res = cp.getResult();
assertEquals(4, res.size());
//test with exclude
List<EObject> excludeList = new ArrayList<EObject>();
excludeList.add(factor2);
excludeList.add(factor3);
excludeList.add(factor4);
AccessLayerContentProvider cpWithExclude = new AccessLayerContentProvider( "Factor", "foo", excludeList, accessLayer);
assertEquals(false, cpWithExclude.getExecuted());
cpWithExclude.run();
assertEquals(true, cpWithExclude.getExecuted());
res = cpWithExclude.getResult();
assertEquals(1, res.size());
assertEquals(factor1.getIdentifier(), res.get(0).getId());
assertEquals(11, res.get(0).getContent().size());
assertEquals(factor1.getName(), res.get(0).getContent().get("name"));