You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commons-dev@ws.apache.org by ch...@apache.org on 2006/03/20 10:46:50 UTC

svn commit: r387173 - /webservices/commons/modules/axiom/test/org/apache/ws/commons/om/AttrNsTest.java

Author: chinthaka
Date: Mon Mar 20 01:46:48 2006
New Revision: 387173

URL: http://svn.apache.org/viewcvs?rev=387173&view=rev
Log:
Added one more test

Modified:
    webservices/commons/modules/axiom/test/org/apache/ws/commons/om/AttrNsTest.java

Modified: webservices/commons/modules/axiom/test/org/apache/ws/commons/om/AttrNsTest.java
URL: http://svn.apache.org/viewcvs/webservices/commons/modules/axiom/test/org/apache/ws/commons/om/AttrNsTest.java?rev=387173&r1=387172&r2=387173&view=diff
==============================================================================
--- webservices/commons/modules/axiom/test/org/apache/ws/commons/om/AttrNsTest.java (original)
+++ webservices/commons/modules/axiom/test/org/apache/ws/commons/om/AttrNsTest.java Mon Mar 20 01:46:48 2006
@@ -25,6 +25,7 @@
 import javax.xml.parsers.ParserConfigurationException;
 import java.io.ByteArrayInputStream;
 import java.io.IOException;
+import java.util.Iterator;
 
 public class AttrNsTest extends AbstractOMSerializationTest {
 
@@ -102,6 +103,13 @@
             omElement.addAttribute(omFactory.createOMAttribute("attrNumber", attrNS1, "1"));
             omElement.addAttribute(omFactory.createOMAttribute("attrNumber", attrNS2, "2"));
 
+            int nsCount = 0;
+            for (Iterator iterator = omElement.getAllDeclaredNamespaces(); iterator.hasNext();) {
+                iterator.next();
+                nsCount++;
+            }
+            assertTrue(nsCount == 2);
+
             Document document1 = newDocument(expectedXML);
             Document document2 = newDocument(omElement.toString());
 
@@ -117,5 +125,4 @@
 
 
     }
-
 }