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 aj...@apache.org on 2007/04/06 09:07:27 UTC

svn commit: r526076 - in /webservices/commons/trunk/modules/XmlSchema/src/test/java/tests: AttributeGroupTest.java GroupTest.java NotationTest.java

Author: ajith
Date: Fri Apr  6 00:07:26 2007
New Revision: 526076

URL: http://svn.apache.org/viewvc?view=rev&rev=526076
Log:
1. Fixed the test cases to work with the last change

Modified:
    webservices/commons/trunk/modules/XmlSchema/src/test/java/tests/AttributeGroupTest.java
    webservices/commons/trunk/modules/XmlSchema/src/test/java/tests/GroupTest.java
    webservices/commons/trunk/modules/XmlSchema/src/test/java/tests/NotationTest.java

Modified: webservices/commons/trunk/modules/XmlSchema/src/test/java/tests/AttributeGroupTest.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/XmlSchema/src/test/java/tests/AttributeGroupTest.java?view=diff&rev=526076&r1=526075&r2=526076
==============================================================================
--- webservices/commons/trunk/modules/XmlSchema/src/test/java/tests/AttributeGroupTest.java (original)
+++ webservices/commons/trunk/modules/XmlSchema/src/test/java/tests/AttributeGroupTest.java Fri Apr  6 00:07:26 2007
@@ -83,7 +83,7 @@
         assertEquals(1, attG.getCount());
         
         for (Iterator i = attG.getNames(); i.hasNext(); ) {
-            assertEquals("department", (String)i.next());
+            assertEquals("department", ((QName)i.next()).getLocalPart());
         }
 
         for (Iterator i = attG.getValues(); i.hasNext(); ) {

Modified: webservices/commons/trunk/modules/XmlSchema/src/test/java/tests/GroupTest.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/XmlSchema/src/test/java/tests/GroupTest.java?view=diff&rev=526076&r1=526075&r2=526076
==============================================================================
--- webservices/commons/trunk/modules/XmlSchema/src/test/java/tests/GroupTest.java (original)
+++ webservices/commons/trunk/modules/XmlSchema/src/test/java/tests/GroupTest.java Fri Apr  6 00:07:26 2007
@@ -97,7 +97,7 @@
         Set s = new HashSet();
         s.add("priceGroup");
         for (Iterator i = t.getNames(); i.hasNext(); ) {
-            String name = (String)i.next();
+            String name = ((QName)i.next()).getLocalPart();
             assertEquals("priceGroup", name);
             s.remove(name);
         }

Modified: webservices/commons/trunk/modules/XmlSchema/src/test/java/tests/NotationTest.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/XmlSchema/src/test/java/tests/NotationTest.java?view=diff&rev=526076&r1=526075&r2=526076
==============================================================================
--- webservices/commons/trunk/modules/XmlSchema/src/test/java/tests/NotationTest.java (original)
+++ webservices/commons/trunk/modules/XmlSchema/src/test/java/tests/NotationTest.java Fri Apr  6 00:07:26 2007
@@ -78,10 +78,18 @@
 
         QName ELEMENT_QNAME = new QName("http://soapinterop.org/types",
                                         "demoNotation");
+        QName notationName = new QName("http://soapinterop.org/types",
+                                                "teamLogo");
+
+
+
         InputStream is = new FileInputStream(Resources.asURI("notation.xsd"));
         XmlSchemaCollection schemaCol = new XmlSchemaCollection();
         XmlSchema schema = schemaCol.read(new StreamSource(is), null);
 
+        XmlSchemaObjectTable notations = schema.getNotations();
+        assertNotNull(notations.getItem(notationName));
+
         XmlSchemaElement elem = schemaCol.getElementByQName(ELEMENT_QNAME);
         assertNotNull(elem);
         assertEquals("demoNotation", elem.getName());
@@ -124,7 +132,7 @@
         s.add("teamMascot");
         s.add("teamLogo");
         for (Iterator i = xsot.getNames(); i.hasNext(); ) {
-            String name = (String)i.next();
+            String name = ((QName)i.next()).getLocalPart();
             if (!(name.equals("teamLogo")
                    || name.equals("teamMascot"))) {
                 fail("An unexpected name of \"" + name



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: commons-dev-help@ws.apache.org