assertEquals("bar", secondExtraInfoElement.getAttributes().get("attr2"));
assertEquals(0, secondExtraInfoElement.getNestedExtraInfoHolder().size());
}
public void testExtraInfosNested() throws Exception {
ModuleDescriptor md = XmlModuleDescriptorParser.getInstance().parseDescriptor(settings,
getClass().getResource("test-extrainfo-nested.xml"), true);
assertNotNull(md);
assertEquals(4, md.getExtraInfo().size());
assertEquals("56576", md.getExtraInfo().get("e:someExtra"));
assertEquals(2, md.getExtraInfos().size());
ExtraInfoHolder someExtraElement = md.getExtraInfos().get(0);
assertEquals("e:someExtra", someExtraElement.getName());
assertEquals("56576", someExtraElement.getContent());
assertEquals(0, someExtraElement.getAttributes().size());
assertEquals(0, someExtraElement.getNestedExtraInfoHolder().size());
ExtraInfoHolder someExtraElementWithAttributes = md.getExtraInfos().get(1);
assertEquals("e:someExtraWithAttributes", someExtraElementWithAttributes.getName());
assertEquals("", someExtraElementWithAttributes.getContent());
assertEquals(2, someExtraElementWithAttributes.getAttributes().size());
assertEquals("foo", someExtraElementWithAttributes.getAttributes().get("attr1"));
assertEquals("bar", someExtraElementWithAttributes.getAttributes().get("attr2"));