Author: dkulp
Date: Thu Jan 14 19:41:24 2010
New Revision: 899373
URL: http://svn.apache.org/viewvc?rev=899373&view=rev
Log:
Merged revisions 898831 via svnmerge from
https://svn.apache.org/repos/asf/cxf/trunk
........
r898831 | bimargulies | 2010-01-13 11:43:43 -0500 (Wed, 13 Jan 2010) | 1 line
Leftover test improvements?
........
Modified:
cxf/branches/2.2.x-fixes/ (props changed)
cxf/branches/2.2.x-fixes/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/CollectionService.java
cxf/branches/2.2.x-fixes/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/CollectionServiceInterface.java
cxf/branches/2.2.x-fixes/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/CollectionTestsWithService.java
Propchange: cxf/branches/2.2.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.
Modified:
cxf/branches/2.2.x-fixes/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/CollectionService.java
URL:
http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/CollectionService.java?rev=899373&r1=899372&r2=899373&view=diff
==============================================================================
---
cxf/branches/2.2.x-fixes/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/CollectionService.java
(original)
+++
cxf/branches/2.2.x-fixes/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/CollectionService.java
Thu Jan 14 19:41:24 2010
@@ -27,7 +27,12 @@
import java.util.SortedSet;
import java.util.Stack;
-import org.w3c.dom.DocumentFragment;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
public class CollectionService implements CollectionServiceInterface {
@@ -96,8 +101,26 @@
return data;
}
- public Collection<DocumentFragment[]> returnCollectionOfDOMFragments() {
- return null;
+ public Collection<Document[]> returnCollectionOfDOMFragments() {
+ try {
+ DocumentBuilder builder =
DocumentBuilderFactory.newInstance().newDocumentBuilder();
+ Document d1 = builder.newDocument();
+ Element e = d1.createElement("Horse");
+ e.setAttribute("cover", "feathers");
+ d1.appendChild(e);
+ Document d2 = builder.newDocument();
+ e = d2.createElement("Cantelope");
+ d2.appendChild(e);
+ e.setAttribute("not-an", "ungulate");
+ Document[] da = new Document[] {d1, d2};
+ List<Document[]> l = new ArrayList<Document[]>();
+ l.add(da);
+ da = new Document[] {d2, d1};
+ l.add(da);
+ return l;
+ } catch (ParserConfigurationException e) {
+ throw new RuntimeException(e);
+ }
}
}
\ No newline at end of file
Modified:
cxf/branches/2.2.x-fixes/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/CollectionServiceInterface.java
URL:
http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/CollectionServiceInterface.java?rev=899373&r1=899372&r2=899373&view=diff
==============================================================================
---
cxf/branches/2.2.x-fixes/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/CollectionServiceInterface.java
(original)
+++
cxf/branches/2.2.x-fixes/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/CollectionServiceInterface.java
Thu Jan 14 19:41:24 2010
@@ -18,6 +18,7 @@
*/
package org.apache.cxf.aegis.type.java5;
+
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashSet;
@@ -26,7 +27,7 @@
import java.util.SortedSet;
import java.util.Stack;
-import org.w3c.dom.DocumentFragment;
+import org.w3c.dom.Document;
public interface CollectionServiceInterface {
@@ -54,5 +55,5 @@
Collection<double[]> returnCollectionOfPrimitiveArrays();
- Collection<DocumentFragment[]> returnCollectionOfDOMFragments();
+ Collection<Document[]> returnCollectionOfDOMFragments();
}
Modified:
cxf/branches/2.2.x-fixes/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/CollectionTestsWithService.java
URL:
http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/CollectionTestsWithService.java?rev=899373&r1=899372&r2=899373&view=diff
==============================================================================
---
cxf/branches/2.2.x-fixes/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/CollectionTestsWithService.java
(original)
+++
cxf/branches/2.2.x-fixes/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/CollectionTestsWithService.java
Thu Jan 14 19:41:24 2010
@@ -26,6 +26,8 @@
import java.util.SortedSet;
import java.util.TreeSet;
+import org.w3c.dom.Document;
+
import org.apache.cxf.aegis.AbstractAegisTest;
import org.apache.cxf.aegis.databinding.AegisDatabinding;
import org.apache.cxf.aegis.databinding.XFireCompatibilityServiceConfiguration;
@@ -121,5 +123,11 @@
assertEquals(3.14, data[1][1], .0001);
assertEquals(2.0, data[1][2], .0001);
}
+
+ @Test
+ public void returnValueIsCollectionOfArraysOfAny() {
+ Collection<Document[]> r = csi.returnCollectionOfDOMFragments();
+ assertEquals(2, r.size());
+ }
}