You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by di...@apache.org on 2007/02/17 01:00:13 UTC

svn commit: r508662 - in /webservices/axis2/trunk/java/modules/json: pom.xml test/org/apache/axis2/json/JSONDataSourceTest.java

Author: dims
Date: Fri Feb 16 16:00:12 2007
New Revision: 508662

URL: http://svn.apache.org/viewvc?view=rev&rev=508662
Log:
fix build break on java6/maven2.0.5

Modified:
    webservices/axis2/trunk/java/modules/json/pom.xml
    webservices/axis2/trunk/java/modules/json/test/org/apache/axis2/json/JSONDataSourceTest.java

Modified: webservices/axis2/trunk/java/modules/json/pom.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/json/pom.xml?view=diff&rev=508662&r1=508661&r2=508662
==============================================================================
--- webservices/axis2/trunk/java/modules/json/pom.xml (original)
+++ webservices/axis2/trunk/java/modules/json/pom.xml Fri Feb 16 16:00:12 2007
@@ -45,6 +45,10 @@
             <artifactId>jettison</artifactId>
             <version>1.0-alpha-2-SNAPSHOT</version>
         </dependency>
+        <dependency>
+     	 <groupId>xmlunit</groupId>
+     	 <artifactId>xmlunit</artifactId>
+   	    </dependency>
 	</dependencies>
 
 	<build>

Modified: webservices/axis2/trunk/java/modules/json/test/org/apache/axis2/json/JSONDataSourceTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/json/test/org/apache/axis2/json/JSONDataSourceTest.java?view=diff&rev=508662&r1=508661&r2=508662
==============================================================================
--- webservices/axis2/trunk/java/modules/json/test/org/apache/axis2/json/JSONDataSourceTest.java (original)
+++ webservices/axis2/trunk/java/modules/json/test/org/apache/axis2/json/JSONDataSourceTest.java Fri Feb 16 16:00:12 2007
@@ -23,13 +23,16 @@
 
 import javax.xml.stream.XMLStreamException;
 import javax.xml.stream.XMLStreamWriter;
+import javax.xml.parsers.ParserConfigurationException;
 
 import junit.framework.TestCase;
 
 import org.apache.axiom.om.util.StAXUtils;
 import org.json.JSONException;
+import org.custommonkey.xmlunit.XMLTestCase;
+import org.xml.sax.SAXException;
 
-public class JSONDataSourceTest extends TestCase {
+public class JSONDataSourceTest extends XMLTestCase {
 
     public void testMappedSerialize1() throws XMLStreamException {
         String jsonString = getMappedJSONString();
@@ -79,14 +82,14 @@
         assertEquals(jsonString, new String(outStream.toByteArray()));
     }
 
-    public void testBadgerfishSerialize3() throws XMLStreamException, JSONException {
+    public void testBadgerfishSerialize3() throws XMLStreamException, JSONException, IOException, ParserConfigurationException, SAXException {
         String jsonString = getBadgerfishJSONString();
         ByteArrayOutputStream outStream = new ByteArrayOutputStream();
         XMLStreamWriter writer = StAXUtils.createXMLStreamWriter(outStream);
         JSONBadgerfishDataSource source = getBadgerfishDataSource(jsonString);
         source.serialize(writer);
         writer.flush();
-        assertEquals("<?xml version='1.0' encoding='UTF-8'?><p xmlns=\"http://def.ns\" xmlns:bb=\"http://other.nsb\" xmlns:aa=\"http://other.ns\"><sam att=\"lets\">555</sam></p>", new String(outStream.toByteArray()));
+        assertXMLEqual("<?xml version='1.0' encoding='UTF-8'?><p xmlns=\"http://def.ns\" xmlns:bb=\"http://other.nsb\" xmlns:aa=\"http://other.ns\"><sam att=\"lets\">555</sam></p>", new String(outStream.toByteArray()));
     }
 
     private JSONBadgerfishDataSource getBadgerfishDataSource(String jsonString) {



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