}
@Test
public void testCleanUpLinkTypeOrphansProject()
{
LinkType t1 = LinkModelFactory.eINSTANCE.createLinkType();
LinkType t2 = LinkModelFactory.eINSTANCE.createLinkType();
accessLayer.addElement(project, t1);
accessLayer.addElement(project, t2);
LinkTypeCatalog c1 = LinkModelFactory.eINSTANCE.createLinkTypeCatalog();
accessLayer.addElement(project, c1);
c1.getLinkTypes().add(t1);
assertEquals(1, c1.getLinkTypes().size());
assertEquals(1, accessLayer.getElements(project, "LinkTypeCatalog").size());
assertEquals(2, accessLayer.getElements(project, "LinkType").size());
projectCleaner.cleanUpLinkTypeOrphans(project);
assertEquals(1, c1.getLinkTypes().size());
assertEquals(2, accessLayer.getElements(project, "LinkType").size());
assertEquals(2, accessLayer.getElements(project, "LinkTypeCatalog").size());
LinkType t3 = LinkModelFactory.eINSTANCE.createLinkType();
accessLayer.addElement(project, t3);
assertEquals(3, accessLayer.getElements(project, "LinkType").size());
projectCleaner.cleanUpLinkTypeOrphans(project);
assertEquals(3, accessLayer.getElements(project, "LinkType").size());