From 5575ba3e47ff0c656c0a89ca2db04a54f39c1714 Mon Sep 17 00:00:00 2001 From: scottkurz Date: Thu, 8 Sep 2011 20:43:56 +0000 Subject: Commit commented out test for TUSCANY-3943. git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1166896 13f79535-47bb-0310-9956-ffa450edef68 --- .../introspect/WrapperStyleOperationTestCase.java | 20 ++++++- .../wsdl/xml/disabledwrapped-stockquote.wsdl | 66 ++++++++++++++++++++++ 2 files changed, 85 insertions(+), 1 deletion(-) create mode 100644 sca-java-2.x/trunk/modules/interface-wsdl/src/test/resources/org/apache/tuscany/sca/interfacedef/wsdl/xml/disabledwrapped-stockquote.wsdl (limited to 'sca-java-2.x/trunk/modules/interface-wsdl/src/test') diff --git a/sca-java-2.x/trunk/modules/interface-wsdl/src/test/java/org/apache/tuscany/sca/interfacedef/wsdl/introspect/WrapperStyleOperationTestCase.java b/sca-java-2.x/trunk/modules/interface-wsdl/src/test/java/org/apache/tuscany/sca/interfacedef/wsdl/introspect/WrapperStyleOperationTestCase.java index ea02d8c3d6..c2d6f40416 100644 --- a/sca-java-2.x/trunk/modules/interface-wsdl/src/test/java/org/apache/tuscany/sca/interfacedef/wsdl/introspect/WrapperStyleOperationTestCase.java +++ b/sca-java-2.x/trunk/modules/interface-wsdl/src/test/java/org/apache/tuscany/sca/interfacedef/wsdl/introspect/WrapperStyleOperationTestCase.java @@ -31,6 +31,7 @@ import org.apache.tuscany.sca.interfacedef.wsdl.WSDLInterface; import org.apache.tuscany.sca.interfacedef.wsdl.WSDLOperation; import org.apache.tuscany.sca.interfacedef.wsdl.xml.AbstractWSDLTestCase; import org.junit.Assert; +import org.junit.Ignore; import org.junit.Test; /** @@ -65,10 +66,27 @@ public class WrapperStyleOperationTestCase extends AbstractWSDLTestCase { definition = resolver.resolveModel(WSDLDefinition.class, definition, context); PortType portType = definition.getDefinition().getPortType(PORTTYPE_NAME); WSDLInterface wi = wsdlFactory.createWSDLInterface(portType, definition, resolver, context.getMonitor()); - WSDLOperation op = (WSDLOperation) wi.getOperations().get(1); + WSDLOperation op = (WSDLOperation) wi.getOperations().get(0); + Assert.assertTrue(op.isWrapperStyle()); + op = (WSDLOperation) wi.getOperations().get(1); Assert.assertFalse(op.isWrapperStyle()); op = (WSDLOperation) wi.getOperations().get(2); Assert.assertFalse(op.isWrapperStyle()); } + + @Test + @Ignore("TUSCANY-3943") + public final void testDisabledWrappedOperation() throws Exception { + ProcessorContext context = new ProcessorContext(); + URL url = getClass().getResource("../xml/disabledwrapped-stockquote.wsdl"); + WSDLDefinition definition = (WSDLDefinition)documentProcessor.read(null, new URI("disabledwrapped-stockquote.wsdl"), url, context); + resolver.addModel(definition, context); + definition = resolver.resolveModel(WSDLDefinition.class, definition, context); + PortType portType = definition.getDefinition().getPortType(PORTTYPE_NAME); + WSDLInterface wi = wsdlFactory.createWSDLInterface(portType, definition, resolver, context.getMonitor()); + WSDLOperation op = (WSDLOperation) wi.getOperations().get(0); + Assert.assertFalse(op.isWrapperStyle()); + } + } diff --git a/sca-java-2.x/trunk/modules/interface-wsdl/src/test/resources/org/apache/tuscany/sca/interfacedef/wsdl/xml/disabledwrapped-stockquote.wsdl b/sca-java-2.x/trunk/modules/interface-wsdl/src/test/resources/org/apache/tuscany/sca/interfacedef/wsdl/xml/disabledwrapped-stockquote.wsdl new file mode 100644 index 0000000000..1d8d7ec097 --- /dev/null +++ b/sca-java-2.x/trunk/modules/interface-wsdl/src/test/resources/org/apache/tuscany/sca/interfacedef/wsdl/xml/disabledwrapped-stockquote.wsdl @@ -0,0 +1,66 @@ + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- cgit v1.2.3