cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r587247 - in /incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/map: MapsTest.java fortest/MapTest.java fortest/MapTestImpl.java fortest/ObjectWithAMap.java ns2/ ns2/ObjectWithAMapNs2.java
Date Mon, 22 Oct 2007 20:50:12 GMT
Author: dkulp
Date: Mon Oct 22 13:50:10 2007
New Revision: 587247

URL: http://svn.apache.org/viewvc?rev=587247&view=rev
Log:
Test case for CXF-1021

Added:
    incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/map/ns2/
    incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/map/ns2/ObjectWithAMapNs2.java
  (with props)
Modified:
    incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/map/MapsTest.java
    incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/map/fortest/MapTest.java
    incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/map/fortest/MapTestImpl.java
    incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/map/fortest/ObjectWithAMap.java

Modified: incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/map/MapsTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/map/MapsTest.java?rev=587247&r1=587246&r2=587247&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/map/MapsTest.java
(original)
+++ incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/map/MapsTest.java
Mon Oct 22 13:50:10 2007
@@ -31,6 +31,8 @@
 import org.apache.cxf.aegis.AbstractAegisTest;
 import org.apache.cxf.aegis.type.map.fortest.MapTest;
 import org.apache.cxf.aegis.type.map.fortest.MapTestImpl;
+import org.apache.cxf.aegis.type.map.fortest.ObjectWithAMap;
+import org.apache.cxf.aegis.type.map.ns2.ObjectWithAMapNs2;
 import org.apache.cxf.endpoint.Server;
 import org.apache.cxf.jaxws.JaxWsProxyFactoryBean;
 import org.apache.cxf.jaxws.JaxWsServerFactoryBean;
@@ -43,8 +45,8 @@
  */
 public class MapsTest extends AbstractAegisTest {
     
-    private MapTest clientInterface;
-    private Server server;
+    private static MapTest clientInterface;
+    private static Server server;
 
     @Before
     public void setUp() throws Exception {
@@ -87,5 +89,25 @@
     public void testInvocations() throws Exception {
         Map<Long, String> lts = clientInterface.getMapLongToString();
         assertEquals("twenty-seven", lts.get(Long.valueOf(27)));
+    }
+    
+    @Test
+    public void testObjectsWithMaps() throws Exception {
+        ObjectWithAMap obj1 = clientInterface.returnObjectWithAMap();
+        ObjectWithAMapNs2 obj2 = clientInterface.returnObjectWithAMapNs2();
+        assertNotNull(obj1);
+        assertNotNull(obj2);
+        
+        assertNotNull(obj1.getTheMap());
+        assertNotNull(obj2.getTheMap()); 
+        
+        assertEquals(2, obj1.getTheMap().size());
+        assertEquals(3, obj2.getTheMap().size());
+        
+        assertTrue(obj1.getTheMap().get("rainy"));
+        assertTrue(obj2.getTheMap().get("rainy"));
+        assertFalse(obj1.getTheMap().get("sunny"));
+        assertFalse(obj2.getTheMap().get("sunny"));
+        assertFalse(obj2.getTheMap().get("cloudy"));
     }
 }

Modified: incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/map/fortest/MapTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/map/fortest/MapTest.java?rev=587247&r1=587246&r2=587247&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/map/fortest/MapTest.java
(original)
+++ incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/map/fortest/MapTest.java
Mon Oct 22 13:50:10 2007
@@ -23,6 +23,8 @@
 
 import javax.jws.WebService;
 
+import org.apache.cxf.aegis.type.map.ns2.ObjectWithAMapNs2;
+
 /**
  * 
  */
@@ -33,4 +35,8 @@
     void takeMap(ObjectWithAMap map);
     Map<String, Long> getMapStringToLong();
     Map<Long, String> getMapLongToString();
+    
+    ObjectWithAMapNs2 returnObjectWithAMapNs2();
+    void takeMapNs2(ObjectWithAMapNs2 map);
+    
 }

Modified: incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/map/fortest/MapTestImpl.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/map/fortest/MapTestImpl.java?rev=587247&r1=587246&r2=587247&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/map/fortest/MapTestImpl.java
(original)
+++ incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/map/fortest/MapTestImpl.java
Mon Oct 22 13:50:10 2007
@@ -22,6 +22,8 @@
 import java.util.HashMap;
 import java.util.Map;
 
+import org.apache.cxf.aegis.type.map.ns2.ObjectWithAMapNs2;
+
 public class MapTestImpl implements MapTest {
 
     public Map<String, Long> getMapStringToLong() {
@@ -35,7 +37,10 @@
     }
 
     public ObjectWithAMap returnObjectWithAMap() {
-        return new ObjectWithAMap();
+        ObjectWithAMap ret = new ObjectWithAMap();
+        ret.getTheMap().put("rainy", Boolean.TRUE);
+        ret.getTheMap().put("sunny", Boolean.FALSE);
+        return ret;
     }
 
     public Map<Long, String> getMapLongToString() {
@@ -43,6 +48,17 @@
         map.put(Long.valueOf(1), "one");
         map.put(Long.valueOf(27), "twenty-seven");
         return map;
+    }
+
+    public ObjectWithAMapNs2 returnObjectWithAMapNs2() {
+        ObjectWithAMapNs2 ret = new ObjectWithAMapNs2();
+        ret.getTheMap().put("rainy", Boolean.TRUE);
+        ret.getTheMap().put("sunny", Boolean.FALSE);
+        ret.getTheMap().put("cloudy", Boolean.FALSE);
+        return ret;
+    }
+
+    public void takeMapNs2(ObjectWithAMapNs2 map) {
     }
 
 }

Modified: incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/map/fortest/ObjectWithAMap.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/map/fortest/ObjectWithAMap.java?rev=587247&r1=587246&r2=587247&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/map/fortest/ObjectWithAMap.java
(original)
+++ incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/map/fortest/ObjectWithAMap.java
Mon Oct 22 13:50:10 2007
@@ -30,8 +30,6 @@
     
     public ObjectWithAMap() {
         theMap = new HashMap<String, Boolean>();
-        theMap.put("rainy", Boolean.TRUE);
-        theMap.put("sunny", Boolean.FALSE);
     }
 
     public Map<String, Boolean> getTheMap() {

Added: incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/map/ns2/ObjectWithAMapNs2.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/map/ns2/ObjectWithAMapNs2.java?rev=587247&view=auto
==============================================================================
--- incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/map/ns2/ObjectWithAMapNs2.java
(added)
+++ incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/map/ns2/ObjectWithAMapNs2.java
Mon Oct 22 13:50:10 2007
@@ -0,0 +1,45 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.cxf.aegis.type.map.ns2;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * An object containing a property of map value.
+ */
+public class ObjectWithAMapNs2 {
+    private Map<String, Boolean> theMap;
+    
+    public ObjectWithAMapNs2() {
+        theMap = new HashMap<String, Boolean>();
+        theMap.put("rainy", Boolean.TRUE);
+        theMap.put("sunny", Boolean.FALSE);
+    }
+
+    public Map<String, Boolean> getTheMap() {
+        return theMap;
+    }
+
+    public void setTheMap(Map<String, Boolean> theMap) {
+        this.theMap = theMap;
+    }
+
+}

Propchange: incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/map/ns2/ObjectWithAMapNs2.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/map/ns2/ObjectWithAMapNs2.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date



Mime
View raw message