use of org.apache.cxf.tools.common.model.JAnnotation in project cxf by apache.
the class WebParamAnnotatorTest method testAnnotateDOCWrapped.
@Test
public void testAnnotateDOCWrapped() throws Exception {
init(method, parameter, SOAPBinding.Style.DOCUMENT, true);
parameter.annotate(new WebParamAnnotator());
JAnnotation annotation = parameter.getAnnotation("WebParam");
assertEquals("@WebParam(name = \"x\", targetNamespace = \"http://apache.org/cxf\")", annotation.toString());
List<JAnnotationElement> elements = annotation.getElements();
assertEquals(2, elements.size());
assertEquals("http://apache.org/cxf", elements.get(1).getValue());
assertEquals("x", elements.get(0).getValue());
}
use of org.apache.cxf.tools.common.model.JAnnotation in project cxf by apache.
the class WebParamAnnotatorTest method testAnnotateRPC.
@Test
public void testAnnotateRPC() throws Exception {
init(method, parameter, SOAPBinding.Style.RPC, true);
parameter.annotate(new WebParamAnnotator());
JAnnotation annotation = parameter.getAnnotation("WebParam");
assertEquals(2, annotation.getElements().size());
assertEquals("@WebParam(partName = \"y\", name = \"y\")", annotation.toString());
}
Aggregations