for (final Method method : type.getDeclaredMethods()) {
if (isIgnored(method)) {
continue;
}
testingMethod = method.getName();
final UML uml = method.getAnnotation(UML.class);
final XmlElement element = getXmlElement(impl, testingMethod, uml);
/*
* Just display the missing @XmlElement annotation for the method, since we know
* that some elements are not yet implemented (and consequently can not yet be
* annotated).
*/
if (element == null) {
// Note: lines with the "[WARNING]" string are highlighted by Jenkins.
warning("[WARNING] Missing @XmlElement annotation for ");
continue;
}
/*
* The UML annotation is mandatory in the default implementation of the
* 'testInterfaceAnnotations()' method, but we don't require the UML to
* be non-null here since this is not the job of this test method. This
* is because subclasses may choose to override the above test method.
*/
if (uml != null) {
assertEquals("Wrong @XmlElement.name().", uml.identifier(), element.name());
assertEquals("Wrong @XmlElement.required().", uml.obligation() == Obligation.MANDATORY, element.required());
}
/*
* Check that the namespace is the expected one (according subclass)
* and is not redundant with the package @XmlSchema annotation.
*/