summaryrefslogtreecommitdiffstats
path: root/java
diff options
context:
space:
mode:
authorlresende <lresende@13f79535-47bb-0310-9956-ffa450edef68>2009-10-03 16:44:34 +0000
committerlresende <lresende@13f79535-47bb-0310-9956-ffa450edef68>2009-10-03 16:44:34 +0000
commita84ffb33828cd6e74a3d1b03b6e831fb85a93e13 (patch)
tree0a591a05c237aee84ba6cb9e47186ea74e67414b /java
parentb4906233c19dffb664d1bf4f77f61418f20a146f (diff)
Minor formatting
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@821361 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java')
-rw-r--r--java/sca/modules/interface-java/src/test/java/org/apache/tuscany/sca/interfacedef/java/impl/JavaInterfaceUtilDuplicateRemotableTestCase.java64
1 files changed, 31 insertions, 33 deletions
diff --git a/java/sca/modules/interface-java/src/test/java/org/apache/tuscany/sca/interfacedef/java/impl/JavaInterfaceUtilDuplicateRemotableTestCase.java b/java/sca/modules/interface-java/src/test/java/org/apache/tuscany/sca/interfacedef/java/impl/JavaInterfaceUtilDuplicateRemotableTestCase.java
index c0b1443207..0879d00b12 100644
--- a/java/sca/modules/interface-java/src/test/java/org/apache/tuscany/sca/interfacedef/java/impl/JavaInterfaceUtilDuplicateRemotableTestCase.java
+++ b/java/sca/modules/interface-java/src/test/java/org/apache/tuscany/sca/interfacedef/java/impl/JavaInterfaceUtilDuplicateRemotableTestCase.java
@@ -97,7 +97,7 @@ public class JavaInterfaceUtilDuplicateRemotableTestCase {
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 @@ public class JavaInterfaceUtilDuplicateRemotableTestCase {
assertEquals(Integer.TYPE, method.getParameterTypes()[0]);
}
-
/**
* Test to get the getTime() method from the LocalTimeService on the
* TimeServiceImpl class
@@ -160,37 +159,6 @@ public class JavaInterfaceUtilDuplicateRemotableTestCase {
}
/**
- * 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 @@ public class JavaInterfaceUtilDuplicateRemotableTestCase {
}
}
+ /**
+ * 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.