cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bimargul...@apache.org
Subject svn commit: r607352 [2/2] - in /incubator/cxf/trunk/rt/databinding/aegis/src: main/java/org/apache/cxf/aegis/ main/java/org/apache/cxf/aegis/databinding/ main/java/org/apache/cxf/aegis/type/ main/java/org/apache/cxf/aegis/type/basic/ main/java/org/apac...
Date Fri, 28 Dec 2007 22:52:48 GMT
Modified: incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/encoded/StructTypeTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/encoded/StructTypeTest.java?rev=607352&r1=607351&r2=607352&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/encoded/StructTypeTest.java
(original)
+++ incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/encoded/StructTypeTest.java
Fri Dec 28 14:52:46 2007
@@ -22,6 +22,8 @@
 import java.util.TreeMap;
 import javax.xml.namespace.QName;
 
+import org.apache.cxf.aegis.AegisContext;
+import org.apache.cxf.aegis.Context;
 import org.apache.cxf.aegis.type.basic.BeanTypeInfo;
 import org.apache.cxf.aegis.xml.jdom.JDOMWriter;
 import org.apache.cxf.aegis.xml.stax.ElementReader;
@@ -36,6 +38,11 @@
 public class StructTypeTest extends AbstractEncodedTest {
     private StructType addressType;
     private StructType purchaseOrderType;
+    
+    private Context getLocalContext() {
+        AegisContext aegisContext = new AegisContext();
+        return new Context(aegisContext);
+    }
 
     public void setUp() throws Exception {
         super.setUp();
@@ -64,20 +71,20 @@
     public void testSimpleStruct() throws Exception {
         // Test reading
         ElementReader reader = new ElementReader(getClass().getResourceAsStream("struct1.xml"));
-        Address address = (Address) addressType.readObject(reader, getContext());
+        Address address = (Address) addressType.readObject(reader, getLocalContext());
         validateShippingAddress(address);
         reader.getXMLStreamReader().close();
 
         // Test reading - no namespace on nested elements
         reader = new ElementReader(getClass().getResourceAsStream("struct2.xml"));
-        address = (Address) addressType.readObject(reader, getContext());
+        address = (Address) addressType.readObject(reader, getLocalContext());
         validateShippingAddress(address);
         reader.getXMLStreamReader().close();
 
         // Test writing
         Element element = new Element("root", "b", "urn:Bean");
         new Document(element);
-        addressType.writeObject(address, new JDOMWriter(element), getContext());
+        addressType.writeObject(address, new JDOMWriter(element), getLocalContext());
         validateShippingAddress(element);
     }
 
@@ -85,13 +92,13 @@
     public void testComplexStruct() throws Exception {
         // Test reading
         ElementReader reader = new ElementReader(getClass().getResourceAsStream("struct3.xml"));
-        PurchaseOrder po = (PurchaseOrder) purchaseOrderType.readObject(reader, getContext());
+        PurchaseOrder po = (PurchaseOrder) purchaseOrderType.readObject(reader, getLocalContext());
         validatePurchaseOrder(po);
         reader.getXMLStreamReader().close();
 
         // Test reading - no namespace on nested elements
         reader = new ElementReader(getClass().getResourceAsStream("struct4.xml"));
-        po = (PurchaseOrder) purchaseOrderType.readObject(reader, getContext());
+        po = (PurchaseOrder) purchaseOrderType.readObject(reader, getLocalContext());
         validatePurchaseOrder(po);
         reader.getXMLStreamReader().close();
 

Modified: incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/AnnotatedTypeTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/AnnotatedTypeTest.java?rev=607352&r1=607351&r2=607352&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/AnnotatedTypeTest.java
(original)
+++ incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/AnnotatedTypeTest.java
Fri Dec 28 14:52:46 2007
@@ -46,11 +46,11 @@
     public void setUp() throws Exception {
         super.setUp();
 
-        Server s = createService(AnnotatedService.class, null);
+        Server s = createService(AnnotatedService.class);
         service = s.getEndpoint().getService();
         databinding = (AegisDatabinding) service.getDataBinding();
 
-        tm = databinding.getServiceTypeMapping();
+        tm = databinding.getAegisContext().getTypeMapping();
     }
 
     @Test

Modified: incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/CollectionTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/CollectionTest.java?rev=607352&r1=607351&r2=607352&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/CollectionTest.java
(original)
+++ incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/CollectionTest.java
Fri Dec 28 14:52:46 2007
@@ -166,7 +166,7 @@
 
     @Test
     public void testCollectionDTOService() throws Exception {
-        createService(DTOService.class, null);
+        createService(DTOService.class);
         invoke("DTOService", "/org/apache/cxf/aegis/type/java5/dto/GetDTO.xml");
     }
 

Modified: incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/EnumTypeTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/EnumTypeTest.java?rev=607352&r1=607351&r2=607352&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/EnumTypeTest.java
(original)
+++ incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/EnumTypeTest.java
Fri Dec 28 14:52:46 2007
@@ -23,8 +23,6 @@
 import org.w3c.dom.Document;
 
 import org.apache.cxf.aegis.AbstractAegisTest;
-import org.apache.cxf.aegis.Context;
-import org.apache.cxf.aegis.databinding.AegisDatabinding;
 import org.apache.cxf.aegis.type.Configuration;
 import org.apache.cxf.aegis.type.CustomTypeMapping;
 import org.apache.cxf.aegis.type.Type;
@@ -39,7 +37,6 @@
 
 public class EnumTypeTest extends AbstractAegisTest {
     private CustomTypeMapping tm;
-    private AegisDatabinding databinding;
 
     private enum smallEnum {
         VALUE1, VALUE2
@@ -48,7 +45,6 @@
     @Before
     public void setUp() throws Exception {
         super.setUp();
-        databinding = new AegisDatabinding();
 
         tm = new CustomTypeMapping();
         Java5TypeCreator creator = new Java5TypeCreator();
@@ -56,10 +52,6 @@
         tm.setTypeCreator(creator);
     }
     
-    private Context getContext() {
-        return new Context(databinding);
-    }
-
     @Test
     public void testType() throws Exception {
         EnumType type = new EnumType();
@@ -116,7 +108,7 @@
 
     @Test
     public void testCurrencyService() throws Exception {
-        createService(CurrencyService.class, null);
+        createService(CurrencyService.class);
 
         Document wsdl = getWSDLDocument("CurrencyService");
 

Modified: incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/MapTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/MapTest.java?rev=607352&r1=607351&r2=607352&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/MapTest.java
(original)
+++ incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/java5/MapTest.java
Fri Dec 28 14:52:46 2007
@@ -149,14 +149,14 @@
 
     @Test
     public void testMapDTOService() throws Exception {
-        createService(MapDTOService.class, null);
+        createService(MapDTOService.class);
 
         invoke("MapDTOService", "/org/apache/cxf/aegis/type/java5/dto/GetDTO.xml");
     }
 
     @Test
     public void testMapServiceWSDL() throws Exception {
-        createService(MapDTOService.class, null);
+        createService(MapDTOService.class);
 
         getWSDLDocument("MapDTOService");
     }



Mime
View raw message