cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r830688 - /cxf/trunk/tools/corba/src/test/java/org/apache/cxf/tools/corba/processors/WSDLToCorbaBindingTypeTest.java
Date Wed, 28 Oct 2009 17:32:49 GMT
Author: dkulp
Date: Wed Oct 28 17:32:49 2009
New Revision: 830688

URL: http://svn.apache.org/viewvc?rev=830688&view=rev
Log:
[CXF-1919] Update test to workaround issues in DOM

Modified:
    cxf/trunk/tools/corba/src/test/java/org/apache/cxf/tools/corba/processors/WSDLToCorbaBindingTypeTest.java

Modified: cxf/trunk/tools/corba/src/test/java/org/apache/cxf/tools/corba/processors/WSDLToCorbaBindingTypeTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/tools/corba/src/test/java/org/apache/cxf/tools/corba/processors/WSDLToCorbaBindingTypeTest.java?rev=830688&r1=830687&r2=830688&view=diff
==============================================================================
--- cxf/trunk/tools/corba/src/test/java/org/apache/cxf/tools/corba/processors/WSDLToCorbaBindingTypeTest.java
(original)
+++ cxf/trunk/tools/corba/src/test/java/org/apache/cxf/tools/corba/processors/WSDLToCorbaBindingTypeTest.java
Wed Oct 28 17:32:49 2009
@@ -48,6 +48,7 @@
 import org.apache.cxf.binding.corba.wsdl.TypeMappingType;
 import org.apache.cxf.binding.corba.wsdl.Union;
 import org.apache.cxf.binding.corba.wsdl.Unionbranch;
+import org.apache.cxf.helpers.DOMUtils;
 import org.apache.cxf.tools.corba.common.WSDLCorbaFactory;
 import org.apache.cxf.tools.corba.processors.wsdl.WSDLToCorbaBinding;
 import org.apache.cxf.tools.corba.processors.wsdl.WSDLToIDLAction;
@@ -95,10 +96,13 @@
 
             Element typemap = getElementNode(document, "corba:typeMapping");            
             assertNotNull(typemap);
-            assertEquals(1, typemap.getElementsByTagName("corba:sequence").getLength());
-            int objectCount = typemap.getElementsByTagName("corba:object").getLength();
-            // With XmlSchema 1.4.3, this comes out as 1, and it seems correct by examination
of the wsdl.
-            assertTrue(objectCount == 1 || objectCount == 2);
+            
+            assertEquals(1, DOMUtils.findAllElementsByTagNameNS(typemap, 
+                                                                "http://cxf.apache.org/bindings/corba",

+                                                                "sequence").size());
+            assertEquals(2, DOMUtils.findAllElementsByTagNameNS(typemap, 
+                                                                "http://cxf.apache.org/bindings/corba",

+                                                                "object").size());
 
             WSDLToIDLAction idlgen = new WSDLToIDLAction();
             idlgen.setBindingName("BankCORBABinding");



Mime
View raw message