"<module>",
" <inherits name='some.id'/>",
"</module>"});
assertThat(m_module.getChildren()).hasSize(1);
// prepare single "<inherits>" element
InheritsElement inheritsElement;
{
List<InheritsElement> inheritsElements = m_module.getInheritsElements();
assertThat(inheritsElements).hasSize(1);
inheritsElement = inheritsElements.get(0);
}
//
assertSame(inheritsElement, m_module.getInheritsElement("some.id"));
assertNull(m_module.getInheritsElement("other.id"));
// current "name" value
assertEquals("some.id", inheritsElement.getName());
// set new "name" value
{
inheritsElement.setName("new.id");
assertUpdatedModuleFile(StringUtils.replace(m_moduleContent, "some.id", "new.id"));
}
}