@Test public void testAppendClassTypeAssociations() { this.selectorDoc.appendClassTypeAssociations(stringBuffer, CLASS_TYPE, MODEL_INDEX); String part1 = String.format(SelectorDoc.FEATURE, SelectorDoc.ASSOCIATION, ASSOCIATION_END1_NAME); String part2 = String.format(SelectorDoc.FEATURE, SelectorDoc.ASSOCIATION, ASSOCIATION_END2_NAME); String expectedToString = part1 + part2; assertEquals(expectedToString, stringBuffer.toString()); }
protected void appendClassTypeAssociations(StringBuffer stringBuffer, ClassType classType, ModelIndex modelIndex) { for (AssociationEnd associationEnd : modelIndex.getAssociationEnds(classType.getId())) { stringBuffer.append(String.format(FEATURE, ASSOCIATION, associationEnd.getName())); } }
SelectorDoc { protected void appendClassTypeAssociations(StringBuffer stringBuffer, ClassType classType, ModelIndex modelIndex) { for (AssociationEnd associationEnd : modelIndex.getAssociationEnds(classType.getId())) { stringBuffer.append(String.format(FEATURE, ASSOCIATION, associationEnd.getName())); } } }
SelectorDoc { protected void appendClassTypeAssociations(StringBuffer stringBuffer, ClassType classType, ModelIndex modelIndex) { for (AssociationEnd associationEnd : modelIndex.getAssociationEnds(classType.getId())) { stringBuffer.append(String.format(FEATURE, ASSOCIATION, associationEnd.getName())); } } SelectorDoc(String inputXmiFilename, String outputXmlFilename); }
SelectorDoc { protected void appendClassTypeAssociations(StringBuffer stringBuffer, ClassType classType, ModelIndex modelIndex) { for (AssociationEnd associationEnd : modelIndex.getAssociationEnds(classType.getId())) { stringBuffer.append(String.format(FEATURE, ASSOCIATION, associationEnd.getName())); } } SelectorDoc(String inputXmiFilename, String outputXmlFilename); static void main(String[] args); }
SelectorDoc { protected void appendClassTypeAssociations(StringBuffer stringBuffer, ClassType classType, ModelIndex modelIndex) { for (AssociationEnd associationEnd : modelIndex.getAssociationEnds(classType.getId())) { stringBuffer.append(String.format(FEATURE, ASSOCIATION, associationEnd.getName())); } } SelectorDoc(String inputXmiFilename, String outputXmlFilename); static void main(String[] args); static final String ATTRIBUTE; static final String ASSOCIATION; }