You are viewing a plain text version of this content. The canonical link for it is here.
Posted to woden-dev@ws.apache.org by jk...@apache.org on 2006/03/06 19:12:02 UTC
svn commit: r383605 -
/incubator/woden/java/test/org/apache/woden/wsdl20/extensions/soap/SOAPBindingMessageReferenceExtensionsTest.java
Author: jkaputin
Date: Mon Mar 6 10:12:00 2006
New Revision: 383605
URL: http://svn.apache.org/viewcvs?rev=383605&view=rev
Log:
Improved javadoc, error messages and added asserts to
check that the underlying elements are <input> or <output>,
as appropriate.
Modified:
incubator/woden/java/test/org/apache/woden/wsdl20/extensions/soap/SOAPBindingMessageReferenceExtensionsTest.java
Modified: incubator/woden/java/test/org/apache/woden/wsdl20/extensions/soap/SOAPBindingMessageReferenceExtensionsTest.java
URL: http://svn.apache.org/viewcvs/incubator/woden/java/test/org/apache/woden/wsdl20/extensions/soap/SOAPBindingMessageReferenceExtensionsTest.java?rev=383605&r1=383604&r2=383605&view=diff
==============================================================================
--- incubator/woden/java/test/org/apache/woden/wsdl20/extensions/soap/SOAPBindingMessageReferenceExtensionsTest.java (original)
+++ incubator/woden/java/test/org/apache/woden/wsdl20/extensions/soap/SOAPBindingMessageReferenceExtensionsTest.java Mon Mar 6 10:12:00 2006
@@ -29,11 +29,13 @@
import org.apache.woden.wsdl20.BindingMessageReference;
import org.apache.woden.wsdl20.BindingOperation;
import org.apache.woden.wsdl20.Description;
+import org.apache.woden.wsdl20.enumeration.Direction;
import org.apache.woden.wsdl20.extensions.ComponentExtensions;
+import org.apache.woden.wsdl20.xml.BindingMessageReferenceElement;
import org.apache.woden.wsdl20.xml.DescriptionElement;
/**
- * Functional verification test of org.apache.woden.wsdl20.extensions.soap.SoapBindingFaultExtensions.
+ * Functional verification test of SoapBindingMessageReferenceExtensions.
* Checks that the expected API behaviour is supported by the implementation.
*
* @author jkaputin@apache.org
@@ -95,6 +97,10 @@
BindingMessageReference bindMsgRef = fBindOper.getBindingMessageReferences()[0];
assertNotNull("The BindingOperation does not contain a BindingMessageReference.", bindMsgRef);
+ BindingMessageReferenceElement bindMsgRefEl = bindMsgRef.toElement();
+ Direction direction = bindMsgRefEl.getDirection();
+ assertTrue("The BindingMessageReference does not represent an <input> element.", Direction.IN.equals(direction));
+
SOAPBindingMessageReferenceExtensions soapBindMsgRefExts =
(SOAPBindingMessageReferenceExtensions) bindMsgRef.getComponentExtensionsForNamespace(ComponentExtensions.URI_NS_SOAP);
SOAPModule[] actual = soapBindMsgRefExts.getSoapModules();
@@ -108,7 +114,11 @@
public void testGetSoapModules_output()
{
BindingMessageReference bindMsgRef = fBindOper.getBindingMessageReferences()[1];
- assertNotNull("The BindingOperation does not contain a BindingMessageReference.", bindMsgRef);
+ assertNotNull("The BindingOperation does not contain a second BindingMessageReference.", bindMsgRef);
+
+ BindingMessageReferenceElement bindMsgRefEl = bindMsgRef.toElement();
+ Direction direction = bindMsgRefEl.getDirection();
+ assertTrue("The BindingMessageReference does not represent an <output> element.", Direction.OUT.equals(direction));
SOAPBindingMessageReferenceExtensions soapBindMsgRefExts =
(SOAPBindingMessageReferenceExtensions) bindMsgRef.getComponentExtensionsForNamespace(ComponentExtensions.URI_NS_SOAP);
---------------------------------------------------------------------
To unsubscribe, e-mail: woden-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: woden-dev-help@ws.apache.org