You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xmlbeans.apache.org by ra...@apache.org on 2008/09/13 21:21:09 UTC

svn commit: r695011 - in /xmlbeans/trunk/test: cases/xbean/ValidatingStream/foo-inv.xml cases/xbean/ValidatingStream/foo.xsd src/ValidatingXSRTests/detailed/ValidatingXmlStreamReaderTests.java

Author: radup
Date: Sat Sep 13 12:21:09 2008
New Revision: 695011

URL: http://svn.apache.org/viewvc?rev=695011&view=rev
Log:
Contributed by Wing Yew Poon. Test for Cezar's ValidatingXMLStreamReader bug fix.

Added:
    xmlbeans/trunk/test/cases/xbean/ValidatingStream/foo-inv.xml
    xmlbeans/trunk/test/cases/xbean/ValidatingStream/foo.xsd
Modified:
    xmlbeans/trunk/test/src/ValidatingXSRTests/detailed/ValidatingXmlStreamReaderTests.java

Added: xmlbeans/trunk/test/cases/xbean/ValidatingStream/foo-inv.xml
URL: http://svn.apache.org/viewvc/xmlbeans/trunk/test/cases/xbean/ValidatingStream/foo-inv.xml?rev=695011&view=auto
==============================================================================
--- xmlbeans/trunk/test/cases/xbean/ValidatingStream/foo-inv.xml (added)
+++ xmlbeans/trunk/test/cases/xbean/ValidatingStream/foo-inv.xml Sat Sep 13 12:21:09 2008
@@ -0,0 +1 @@
+<heading name="adsf" xmlns="http://www.foo.com/sample"/>
\ No newline at end of file

Added: xmlbeans/trunk/test/cases/xbean/ValidatingStream/foo.xsd
URL: http://svn.apache.org/viewvc/xmlbeans/trunk/test/cases/xbean/ValidatingStream/foo.xsd?rev=695011&view=auto
==============================================================================
--- xmlbeans/trunk/test/cases/xbean/ValidatingStream/foo.xsd (added)
+++ xmlbeans/trunk/test/cases/xbean/ValidatingStream/foo.xsd Sat Sep 13 12:21:09 2008
@@ -0,0 +1,15 @@
+<xs:schema
+  attributeFormDefault="unqualified"
+  elementFormDefault="qualified"
+  xmlns="http://www.foo.com/sample"
+  targetNamespace="http://www.foo.com/sample"
+  xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+  <xs:element name="heading">
+    <xs:complexType>
+      <xs:attribute name="code" type="xs:string" use="required"/>
+      <xs:attribute name="name" type="xs:string" use="required"/>
+    </xs:complexType>
+  </xs:element>
+
+</xs:schema>

Modified: xmlbeans/trunk/test/src/ValidatingXSRTests/detailed/ValidatingXmlStreamReaderTests.java
URL: http://svn.apache.org/viewvc/xmlbeans/trunk/test/src/ValidatingXSRTests/detailed/ValidatingXmlStreamReaderTests.java?rev=695011&r1=695010&r2=695011&view=diff
==============================================================================
--- xmlbeans/trunk/test/src/ValidatingXSRTests/detailed/ValidatingXmlStreamReaderTests.java (original)
+++ xmlbeans/trunk/test/src/ValidatingXSRTests/detailed/ValidatingXmlStreamReaderTests.java Sat Sep 13 12:21:09 2008
@@ -37,7 +37,7 @@
 import org.openuri.test.person.*;
 import org.openuri.test.mixedContent.LetterDocument;
 import org.openuri.test.mixedContent.NoMixedDocument;
-
+import com.foo.sample.HeadingDocument;
 
 
 public class ValidatingXmlStreamReaderTests
@@ -66,7 +66,7 @@
         throws Exception
     {
         checkDocIsInvalid(getCasesFile(casesLoc + "po.xml"),
-                        null);
+                          null);
     }
 
     public void testValidLocationDoc()
@@ -94,7 +94,7 @@
         throws Exception
     {
         checkDocIsInvalid(getCasesFile(casesLoc + "person-inv.xml"),
-                        PersonDocument.type);
+                          PersonDocument.type);
     }
 
 
@@ -109,7 +109,14 @@
         throws Exception
     {
         checkDocIsInvalid(getCasesFile(casesLoc + "nomixed-content-inv.xml"),
-                        NoMixedDocument.type);
+                          NoMixedDocument.type);
+    }
+
+    public void testInvalidMissingAttributeDoc()
+        throws Exception
+    {
+        checkDocIsInvalid(getCasesFile(casesLoc + "foo-inv.xml"),
+                          HeadingDocument.type);
     }
 
 
@@ -393,7 +400,7 @@
         throws java.io.IOException
     {
         if (path.length()==0)
-        throw new IOException("getCasesFile was called with path of len 0");
+            throw new IOException("getCasesFile was called with path of len 0");
         return JarUtil.getResourceFromJarasFile(path);
         //return new File(casesRoot + path);
     }



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: commits-help@xmlbeans.apache.org