use of org.codehaus.plexus.metadata.merge.support.AbstractMergeableElementList in project plexus-containers by codehaus-plexus.
the class ComponentsXmlMergerTest method testInvalidMergeableElements.
public void testInvalidMergeableElements() throws Exception {
// dominant Component Element
AbstractMergeableElement dCE = new ComponentElement(new Element("component"));
Element roleElt = new Element("role");
roleElt.setText("org.codehaus.plexus.ISampleRole");
dCE.addContent(roleElt);
AbstractMergeableElementList reqElt = new RequirementsElement(new Element("requirement"));
// attempt and invalid merge
try {
dCE.merge(reqElt);
fail("Expected MergeException!");
} catch (MergeException e) {
// do nothing.
}
}
Aggregations