You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xmlbeans.apache.org by da...@apache.org on 2004/11/04 01:50:30 UTC
cvs commit: xml-xmlbeans/v2/test/src/xmlcursor/detailed CopyTest.java
daveremy 2004/11/03 16:50:30
Modified: v2/test/src/xmlcursor/checkin CopyTest.java
Added: v2/test/src/xmlcursor/detailed CopyTest.java
Log:
Contributed by:Yana Kadiyska. Adding/fixing tests(broke checkin on prev commit)
Revision Changes Path
1.10 +1 -19 xml-xmlbeans/v2/test/src/xmlcursor/checkin/CopyTest.java
Index: CopyTest.java
===================================================================
RCS file: /home/cvs/xml-xmlbeans/v2/test/src/xmlcursor/checkin/CopyTest.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- CopyTest.java 4 Nov 2004 00:25:33 -0000 1.9
+++ CopyTest.java 4 Nov 2004 00:50:30 -0000 1.10
@@ -230,25 +230,7 @@
assertEquals("<po:city "+exp_ns+">Mill Valley</po:city>", m_xc.xmlText());
}
- //this is per CR128353
- public void testCopyNamespaceMigration()throws XmlException{
- String s1="<X xmlns=\"foo\" xmlns:xsi=\"bar\"><zzz>123</zzz></X>";
- String s2="<Y> ... [some content] ... </Y>";
- XmlCursor xc1=XmlObject.Factory.parse(s1).newCursor();
- xc1.toFirstContentToken();
- xc1.toFirstChild();
- XmlCursor xc2=XmlObject.Factory.parse(s2).newCursor();
- assertEquals(TokenType.START,xc2.toFirstContentToken());
- xc2.toNextToken();
- xc1.copyXml(xc2);
- xc2.toStartDoc();
- assertEquals("<Y>" +
- "<foo:zzz xmlns:foo=\"foo\" xmlns:xsi=\"bar\">123</foo:zzz>" +
- " ... [some content] ... </Y>",xc2.xmlText());
- xc1.dispose();
- xc2.dispose();
- }
-
+
}
1.1 xml-xmlbeans/v2/test/src/xmlcursor/detailed/CopyTest.java
Index: CopyTest.java
===================================================================
package xmlcursor.detailed;
import org.apache.xmlbeans.XmlException;
import org.apache.xmlbeans.XmlCursor;
import org.apache.xmlbeans.XmlObject;
import junit.framework.TestCase;
/**
* Date: Nov 3, 2004
* Time: 4:41:07 PM
*
* @owner ykadiysk
*/
public class CopyTest extends TestCase{
//this is per CR128353
public void testCopyNamespaceMigration()throws XmlException{
String s1="<X xmlns=\"foo\" xmlns:xsi=\"bar\"><zzz>123</zzz></X>";
String s2="<Y> ... [some content] ... </Y>";
XmlCursor xc1=XmlObject.Factory.parse(s1).newCursor();
xc1.toFirstContentToken();
xc1.toFirstChild();
XmlCursor xc2=XmlObject.Factory.parse(s2).newCursor();
assertEquals(XmlCursor.TokenType.START,xc2.toFirstContentToken());
xc2.toNextToken();
xc1.copyXml(xc2);
xc2.toStartDoc();
assertEquals("<Y>" +
"<foo:zzz xmlns:foo=\"foo\" xmlns:xsi=\"bar\">123</foo:zzz>" +
" ... [some content] ... </Y>",xc2.xmlText());
xc1.dispose();
xc2.dispose();
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: commits-help@xmlbeans.apache.org