public void testCreatedErrors_06() { maxCallCount = 1; ImmutableList<ENamedElement> elements = ImmutableList.of(createEPackage(), createEDataType(), createEPackage()); for (ENamedElement classifier : elements) { classifier.setName("Same"); } helper.checkUniqueNames(Scopes.scopedElementsFor(elements), this, this); assertEquals(1, callCount); }
public void testCreatedErrors_04() { maxCallCount = 0; ImmutableList<ENamedElement> elements = ImmutableList.of(createEClass(), createEDataType(), createEPackage(), createEPackage()); for (ENamedElement classifier : elements) { classifier.setName("Same"); } expected.addAll(elements); helper.checkUniqueNames(Scopes.scopedElementsFor(elements), this, this); assertEquals(elements.size(), callCount); assertTrue(expected.isEmpty()); }
public void testCreatedErrors_07() { maxCallCount = 0; ImmutableList<ENamedElement> elements = ImmutableList.of( createEPackage(), createEDataType(), EcoreFactory.eINSTANCE.createEEnumLiteral()); for (ENamedElement classifier : elements) { classifier.setName("Same"); } expected.add(elements.get(0)); expected.add(elements.get(2)); helper.checkUniqueNames(Scopes.scopedElementsFor(elements), this, this); assertEquals(elements.size(), callCount); assertTrue(expected.isEmpty()); }