incubator-yoko-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject svn commit: r523310 - in /incubator/yoko/trunk/bindings/src: main/java/org/apache/yoko/bindings/corba/utils/ test/java/org/apache/yoko/bindings/corba/ test/resources/idl/type_test/
Date Wed, 28 Mar 2007 13:12:33 GMT
Author: bravi
Date: Wed Mar 28 06:12:32 2007
New Revision: 523310

URL: http://svn.apache.org/viewvc?view=rev&rev=523310
Log:
[YOKO-314] - Adding alias test case.

Modified:
    incubator/yoko/trunk/bindings/src/main/java/org/apache/yoko/bindings/corba/utils/CorbaUtils.java
    incubator/yoko/trunk/bindings/src/test/java/org/apache/yoko/bindings/corba/AbstractIdlToWsdlTypeTestClient.java
    incubator/yoko/trunk/bindings/src/test/java/org/apache/yoko/bindings/corba/IdlToWsdlTypeTestImpl.java
    incubator/yoko/trunk/bindings/src/test/resources/idl/type_test/idltowsdl_type_test.idl

Modified: incubator/yoko/trunk/bindings/src/main/java/org/apache/yoko/bindings/corba/utils/CorbaUtils.java
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/bindings/src/main/java/org/apache/yoko/bindings/corba/utils/CorbaUtils.java?view=diff&rev=523310&r1=523309&r2=523310
==============================================================================
--- incubator/yoko/trunk/bindings/src/main/java/org/apache/yoko/bindings/corba/utils/CorbaUtils.java
(original)
+++ incubator/yoko/trunk/bindings/src/main/java/org/apache/yoko/bindings/corba/utils/CorbaUtils.java
Wed Mar 28 06:12:32 2007
@@ -148,7 +148,7 @@
             if (obj instanceof Alias) {
                 Alias aliasType = (Alias)obj;
                 tc = orb.create_alias_tc(aliasType.getRepositoryID(), 
-                                         aliasType.getName(), 
+                                         getTypeCodeName(aliasType.getName()), 
                                          getTypeCode(orb, aliasType.getBasetype(), typeMaps));
       
             } else if (obj instanceof Array) {
                 Array arrayType = (Array)obj;

Modified: incubator/yoko/trunk/bindings/src/test/java/org/apache/yoko/bindings/corba/AbstractIdlToWsdlTypeTestClient.java
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/bindings/src/test/java/org/apache/yoko/bindings/corba/AbstractIdlToWsdlTypeTestClient.java?view=diff&rev=523310&r1=523309&r2=523310
==============================================================================
--- incubator/yoko/trunk/bindings/src/test/java/org/apache/yoko/bindings/corba/AbstractIdlToWsdlTypeTestClient.java
(original)
+++ incubator/yoko/trunk/bindings/src/test/java/org/apache/yoko/bindings/corba/AbstractIdlToWsdlTypeTestClient.java
Wed Mar 28 06:12:32 2007
@@ -48,6 +48,26 @@
     
     ////
     // base_type
+    public void testAlias() throws Exception {
+        int valueSets[][] = {
+	    {10, 100},
+	    {1000, 2000}
+        };
+
+        for (int i = 0; i < valueSets.length; i++) {
+            int in = valueSets[i][0];
+            Holder<Integer> inoutOrig = new Holder<Integer>(valueSets[i][1]);
+            Holder<Integer> inout = new Holder<Integer>(valueSets[i][1]);
+            Holder<Integer> out = new Holder<Integer>();
+
+            long ret = client.testAlias(in, inout, out);
+            
+            assertEquals("testAlias(): Incorrect value for out param", inoutOrig.value, out.value);
+            assertEquals("testAlias(): Incorrect value for inout param", Integer.valueOf(in),
inout.value);
+            assertEquals("testAlias(): Incorrect return value", in, ret);
+        }
+    }
+
     
     public void testFloat() {
         float valueSets[][] = {

Modified: incubator/yoko/trunk/bindings/src/test/java/org/apache/yoko/bindings/corba/IdlToWsdlTypeTestImpl.java
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/bindings/src/test/java/org/apache/yoko/bindings/corba/IdlToWsdlTypeTestImpl.java?view=diff&rev=523310&r1=523309&r2=523310
==============================================================================
--- incubator/yoko/trunk/bindings/src/test/java/org/apache/yoko/bindings/corba/IdlToWsdlTypeTestImpl.java
(original)
+++ incubator/yoko/trunk/bindings/src/test/java/org/apache/yoko/bindings/corba/IdlToWsdlTypeTestImpl.java
Wed Mar 28 06:12:32 2007
@@ -37,6 +37,14 @@
     }
 
     // base
+
+    public int testAlias(int inDuration,
+			 javax.xml.ws.Holder<java.lang.Integer> inoutDuration,
+			 javax.xml.ws.Holder<java.lang.Integer> outDuration) {
+        outDuration.value = inoutDuration.value;
+        inoutDuration.value = inDuration;
+        return inDuration;
+    }
     
     public float testFloat(float inFloat,
                            javax.xml.ws.Holder<java.lang.Float> inoutFloat,

Modified: incubator/yoko/trunk/bindings/src/test/resources/idl/type_test/idltowsdl_type_test.idl
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/bindings/src/test/resources/idl/type_test/idltowsdl_type_test.idl?view=diff&rev=523310&r1=523309&r2=523310
==============================================================================
--- incubator/yoko/trunk/bindings/src/test/resources/idl/type_test/idltowsdl_type_test.idl
(original)
+++ incubator/yoko/trunk/bindings/src/test/resources/idl/type_test/idltowsdl_type_test.idl
Wed Mar 28 06:12:32 2007
@@ -22,7 +22,16 @@
     string greetMe(in string name);
 
     ////
-    // base_type_spec
+    // base_type_spec
+
+    typedef long TpInt32;
+
+    typedef TpInt32 TpDuration;
+
+    TpDuration testAlias(in TpDuration inDuration,
+	                     inout TpDuration inoutDuration,
+						 out TpDuration outDuration);
+
 
     // floating point types
     float testFloat(in float inFloat,



Mime
View raw message