You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by lr...@apache.org on 2009/10/03 18:44:34 UTC

svn commit: r821361 - /tuscany/java/sca/modules/interface-java/src/test/java/org/apache/tuscany/sca/interfacedef/java/impl/JavaInterfaceUtilDuplicateRemotableTestCase.java

Author: lresende
Date: Sat Oct  3 16:44:34 2009
New Revision: 821361

URL: http://svn.apache.org/viewvc?rev=821361&view=rev
Log:
Minor formatting

Modified:
    tuscany/java/sca/modules/interface-java/src/test/java/org/apache/tuscany/sca/interfacedef/java/impl/JavaInterfaceUtilDuplicateRemotableTestCase.java

Modified: tuscany/java/sca/modules/interface-java/src/test/java/org/apache/tuscany/sca/interfacedef/java/impl/JavaInterfaceUtilDuplicateRemotableTestCase.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/interface-java/src/test/java/org/apache/tuscany/sca/interfacedef/java/impl/JavaInterfaceUtilDuplicateRemotableTestCase.java?rev=821361&r1=821360&r2=821361&view=diff
==============================================================================
--- tuscany/java/sca/modules/interface-java/src/test/java/org/apache/tuscany/sca/interfacedef/java/impl/JavaInterfaceUtilDuplicateRemotableTestCase.java (original)
+++ tuscany/java/sca/modules/interface-java/src/test/java/org/apache/tuscany/sca/interfacedef/java/impl/JavaInterfaceUtilDuplicateRemotableTestCase.java Sat Oct  3 16:44:34 2009
@@ -97,7 +97,7 @@
         assertEquals("getTime", method.getName());
         assertEquals(1, method.getParameterTypes().length);
         assertEquals(String.class, method.getParameterTypes()[0]);
-        }
+    }
 
     /**
      * Test to get the getTime(int) method from the GMTTimeService
@@ -126,7 +126,6 @@
         assertEquals(Integer.TYPE, method.getParameterTypes()[0]);
     }
 
-
     /**
      * Test to get the getTime() method from the LocalTimeService on the
      * TimeServiceImpl class
@@ -160,37 +159,6 @@
     }
 
     /**
-     * Creates a new operation with the specified name and parameter types
-     *
-     * @param name The name of the operation
-     * @param operationInterface The interface to which the operation belongs
-     * @param parameterTypes The types of the parameters for this operation
-     * @return An operation with the specified name and parameter types
-     */
-    private static Operation newOperation(String name, Class<?> operationInterface, Class<?>... parameterTypes) {
-        // Create and set the operation name
-        Operation operation = new OperationImpl();
-        operation.setName(name);
-
-        // Make the operation remotable
-        Interface iface = new InterfaceImpl();
-        iface.setRemotable(true);
-        operation.setInterface(iface);
-
-        // Construct the parameters
-        List<DataType> types = new ArrayList<DataType>();
-        DataType<List<DataType>> inputType = new DataTypeImpl<List<DataType>>(Object[].class, types);
-        for (Class<?> parameterType : parameterTypes) {
-            DataType type = new DataTypeImpl<Class>(parameterType, Object.class);
-            types.add(type);
-        }
-        operation.setInputType(inputType);
-
-        // Return the created operation
-        return operation;
-    }
-
-    /**
      * Test case that validates that a @Remotable interface with Overloaded operations
      * is detected.
      * 
@@ -219,7 +187,37 @@
         }
     }
 
+    /**
+     * Creates a new operation with the specified name and parameter types
+     *
+     * @param name The name of the operation
+     * @param operationInterface The interface to which the operation belongs
+     * @param parameterTypes The types of the parameters for this operation
+     * @return An operation with the specified name and parameter types
+     */
+    private static Operation newOperation(String name, Class<?> operationInterface, Class<?>... parameterTypes) {
+        // Create and set the operation name
+        Operation operation = new OperationImpl();
+        operation.setName(name);
 
+        // Make the operation remotable
+        Interface iface = new InterfaceImpl();
+        iface.setRemotable(true);
+        operation.setInterface(iface);
+
+        // Construct the parameters
+        List<DataType> types = new ArrayList<DataType>();
+        DataType<List<DataType>> inputType = new DataTypeImpl<List<DataType>>(Object[].class, types);
+        for (Class<?> parameterType : parameterTypes) {
+            DataType type = new DataTypeImpl<Class>(parameterType, Object.class);
+            types.add(type);
+        }
+        operation.setInputType(inputType);
+
+        // Return the created operation
+        return operation;
+    }
+    
     /**
      * Sample @Remotable interface that has an overloaded operation which is not 
      * allowed according to the SCA Assembly Specification.