You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beehive.apache.org by cs...@apache.org on 2006/01/10 18:28:53 UTC
svn commit: r367702 -
/beehive/trunk/system-controls/test/webservice/junit/src/org/apache/beehive/controls/system/webservice/tests/wscgen/
Author: cschoett
Date: Tue Jan 10 09:28:42 2006
New Revision: 367702
URL: http://svn.apache.org/viewcvs?rev=367702&view=rev
Log:
Some additional test clean, removed jcx from test names, removed redundant tests.
Added:
beehive/trunk/system-controls/test/webservice/junit/src/org/apache/beehive/controls/system/webservice/tests/wscgen/WscGenFromDocLitBareWsdlTest.java (contents, props changed)
- copied, changed from r367696, beehive/trunk/system-controls/test/webservice/junit/src/org/apache/beehive/controls/system/webservice/tests/wscgen/JcxGenFromDocLitBareWsdlTest.java
beehive/trunk/system-controls/test/webservice/junit/src/org/apache/beehive/controls/system/webservice/tests/wscgen/WscGenFromDocLitWrapWsdlTest.java (contents, props changed)
- copied, changed from r367696, beehive/trunk/system-controls/test/webservice/junit/src/org/apache/beehive/controls/system/webservice/tests/wscgen/JcxGenFromDocLitWrapWsdlTest.java
beehive/trunk/system-controls/test/webservice/junit/src/org/apache/beehive/controls/system/webservice/tests/wscgen/WscGenFromRpcLitWsdlTest.java (contents, props changed)
- copied, changed from r367696, beehive/trunk/system-controls/test/webservice/junit/src/org/apache/beehive/controls/system/webservice/tests/wscgen/JcxGenFromRpcLitWsdlTest.java
Removed:
beehive/trunk/system-controls/test/webservice/junit/src/org/apache/beehive/controls/system/webservice/tests/wscgen/JcxGenFromDocLitBareWsdlTest.java
beehive/trunk/system-controls/test/webservice/junit/src/org/apache/beehive/controls/system/webservice/tests/wscgen/JcxGenFromDocLitWrapWsdlTest.java
beehive/trunk/system-controls/test/webservice/junit/src/org/apache/beehive/controls/system/webservice/tests/wscgen/JcxGenFromRpcLitWsdlTest.java
Copied: beehive/trunk/system-controls/test/webservice/junit/src/org/apache/beehive/controls/system/webservice/tests/wscgen/WscGenFromDocLitBareWsdlTest.java (from r367696, beehive/trunk/system-controls/test/webservice/junit/src/org/apache/beehive/controls/system/webservice/tests/wscgen/JcxGenFromDocLitBareWsdlTest.java)
URL: http://svn.apache.org/viewcvs/beehive/trunk/system-controls/test/webservice/junit/src/org/apache/beehive/controls/system/webservice/tests/wscgen/WscGenFromDocLitBareWsdlTest.java?p2=beehive/trunk/system-controls/test/webservice/junit/src/org/apache/beehive/controls/system/webservice/tests/wscgen/WscGenFromDocLitBareWsdlTest.java&p1=beehive/trunk/system-controls/test/webservice/junit/src/org/apache/beehive/controls/system/webservice/tests/wscgen/JcxGenFromDocLitBareWsdlTest.java&r1=367696&r2=367702&rev=367702&view=diff
==============================================================================
--- beehive/trunk/system-controls/test/webservice/junit/src/org/apache/beehive/controls/system/webservice/tests/wscgen/JcxGenFromDocLitBareWsdlTest.java (original)
+++ beehive/trunk/system-controls/test/webservice/junit/src/org/apache/beehive/controls/system/webservice/tests/wscgen/WscGenFromDocLitBareWsdlTest.java Tue Jan 10 09:28:42 2006
@@ -25,24 +25,17 @@
import org.apache.beehive.controls.system.webservice.ServiceControl;
import org.apache.beehive.wsm.util.GenericHolder;
-public class JcxGenFromDocLitBareWsdlTest
+/**
+ * Test wsc generation from a doc/lit/bar web service wsdl.
+ */
+public class WscGenFromDocLitBareWsdlTest
extends TestCase {
- private final Class genJcx = doclitbar.web.complex.DocumentLiteralBareSampleService.class;
-
- public void testLocationAnnotation() throws Exception {
- ServiceControl.Location loc =
- (ServiceControl.Location) genJcx.getAnnotation(ServiceControl.Location.class);
-
- assertEquals(1, loc.urls().length);
- assertEquals("http://localhost:8080/wsm-samplesWS/web/complex/DocumentLiteralBareSample.jws", loc.urls()[0]);
- }
-
- public void testWSDLAnnotation() throws Exception {
- ServiceControl.WSDL wsdl =
- (ServiceControl.WSDL) genJcx.getAnnotation(ServiceControl.WSDL.class);
- assertEquals("DocumentLiteralBareSampleService", wsdl.service());
- }
+ private final Class genWsc = doclitbar.web.complex.DocumentLiteralBareSampleService.class;
+ /**
+ * Test all of the method signatures.
+ * @throws Exception
+ */
public void testMethodSignatures() throws Exception {
testMethodSignature("changeAddressInBody", "int", GenericHolder.class);
testMethodSignature("changeAddressInHeader", "int", GenericHolder.class);
@@ -56,20 +49,15 @@
private void testMethodSignature(String methodName, String returnClassName, Class... params) throws Exception {
Method m = null;
try {
- m = genJcx.getMethod(methodName, params);
+ m = genWsc.getMethod(methodName, params);
} catch (NoSuchMethodException e) {
fail("Could not find method '" + methodName + "(" + params + ")");
}
assertEquals(returnClassName, m.getReturnType().getName());
}
- public JcxGenFromDocLitBareWsdlTest(String name)
- throws Exception {
- super(name);
- }
-
public static Test suite() {
- return new TestSuite(JcxGenFromDocLitBareWsdlTest.class);
+ return new TestSuite(WscGenFromDocLitBareWsdlTest.class);
}
public static void main(String[] args) {
Propchange: beehive/trunk/system-controls/test/webservice/junit/src/org/apache/beehive/controls/system/webservice/tests/wscgen/WscGenFromDocLitBareWsdlTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Copied: beehive/trunk/system-controls/test/webservice/junit/src/org/apache/beehive/controls/system/webservice/tests/wscgen/WscGenFromDocLitWrapWsdlTest.java (from r367696, beehive/trunk/system-controls/test/webservice/junit/src/org/apache/beehive/controls/system/webservice/tests/wscgen/JcxGenFromDocLitWrapWsdlTest.java)
URL: http://svn.apache.org/viewcvs/beehive/trunk/system-controls/test/webservice/junit/src/org/apache/beehive/controls/system/webservice/tests/wscgen/WscGenFromDocLitWrapWsdlTest.java?p2=beehive/trunk/system-controls/test/webservice/junit/src/org/apache/beehive/controls/system/webservice/tests/wscgen/WscGenFromDocLitWrapWsdlTest.java&p1=beehive/trunk/system-controls/test/webservice/junit/src/org/apache/beehive/controls/system/webservice/tests/wscgen/JcxGenFromDocLitWrapWsdlTest.java&r1=367696&r2=367702&rev=367702&view=diff
==============================================================================
--- beehive/trunk/system-controls/test/webservice/junit/src/org/apache/beehive/controls/system/webservice/tests/wscgen/JcxGenFromDocLitWrapWsdlTest.java (original)
+++ beehive/trunk/system-controls/test/webservice/junit/src/org/apache/beehive/controls/system/webservice/tests/wscgen/WscGenFromDocLitWrapWsdlTest.java Tue Jan 10 09:28:42 2006
@@ -26,24 +26,17 @@
import javax.xml.rpc.holders.IntHolder;
import java.lang.reflect.Method;
-public class JcxGenFromDocLitWrapWsdlTest extends TestCase {
-
- private final Class genJcx = doclitwrap.web.complex.DocumentLiteralWrappedSampleService.class;
-
- public void testLocationAnnotation() throws Exception {
- ServiceControl.Location loc =
- (ServiceControl.Location) genJcx.getAnnotation(ServiceControl.Location.class);
-
- assertEquals(1, loc.urls().length);
- assertEquals("http://localhost:8080/wsm-samplesWS/web/complex/DocumentLiteralWrappedSample.jws", loc.urls()[0]);
- }
-
- public void testWSDLAnnotation() throws Exception {
- ServiceControl.WSDL wsdl =
- (ServiceControl.WSDL) genJcx.getAnnotation(ServiceControl.WSDL.class);
- assertEquals("DocumentLiteralWrappedSampleService", wsdl.service());
- }
-
+/**
+ * Test wsc generation from a doc/lit/wrapped web service wsdl.
+ */
+public class WscGenFromDocLitWrapWsdlTest extends TestCase {
+
+ private final Class genWsc = doclitwrap.web.complex.DocumentLiteralWrappedSampleService.class;
+
+ /**
+ * Test all of the method signatures.
+ * @throws Exception
+ */
public void testMethodSignatures() throws Exception {
testMethodSignature("changeAddressInBody", "int", GenericHolder.class);
testMethodSignature("changeAddressInHeader", "int", GenericHolder.class);
@@ -58,20 +51,15 @@
private void testMethodSignature(String methodName, String returnClassName, Class... params) throws Exception {
Method m = null;
try {
- m = genJcx.getMethod(methodName, params);
+ m = genWsc.getMethod(methodName, params);
} catch (NoSuchMethodException e) {
fail("Could not find method '" + methodName + "(" + params + ")");
}
assertEquals(returnClassName, m.getReturnType().getName());
}
-
- public JcxGenFromDocLitWrapWsdlTest(String name) throws Exception {
- super(name);
- }
-
public static Test suite() {
- return new TestSuite(JcxGenFromDocLitWrapWsdlTest.class);
+ return new TestSuite(WscGenFromDocLitWrapWsdlTest.class);
}
public static void main(String[] args) {
Propchange: beehive/trunk/system-controls/test/webservice/junit/src/org/apache/beehive/controls/system/webservice/tests/wscgen/WscGenFromDocLitWrapWsdlTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Copied: beehive/trunk/system-controls/test/webservice/junit/src/org/apache/beehive/controls/system/webservice/tests/wscgen/WscGenFromRpcLitWsdlTest.java (from r367696, beehive/trunk/system-controls/test/webservice/junit/src/org/apache/beehive/controls/system/webservice/tests/wscgen/JcxGenFromRpcLitWsdlTest.java)
URL: http://svn.apache.org/viewcvs/beehive/trunk/system-controls/test/webservice/junit/src/org/apache/beehive/controls/system/webservice/tests/wscgen/WscGenFromRpcLitWsdlTest.java?p2=beehive/trunk/system-controls/test/webservice/junit/src/org/apache/beehive/controls/system/webservice/tests/wscgen/WscGenFromRpcLitWsdlTest.java&p1=beehive/trunk/system-controls/test/webservice/junit/src/org/apache/beehive/controls/system/webservice/tests/wscgen/JcxGenFromRpcLitWsdlTest.java&r1=367696&r2=367702&rev=367702&view=diff
==============================================================================
--- beehive/trunk/system-controls/test/webservice/junit/src/org/apache/beehive/controls/system/webservice/tests/wscgen/JcxGenFromRpcLitWsdlTest.java (original)
+++ beehive/trunk/system-controls/test/webservice/junit/src/org/apache/beehive/controls/system/webservice/tests/wscgen/WscGenFromRpcLitWsdlTest.java Tue Jan 10 09:28:42 2006
@@ -22,27 +22,19 @@
import org.apache.beehive.controls.system.webservice.ServiceControl;
import org.apache.beehive.wsm.util.GenericHolder;
-import javax.xml.rpc.holders.IntHolder;
import java.lang.reflect.Method;
-public class JcxGenFromRpcLitWsdlTest extends TestCase {
-
- private final Class genJcx = org.apache.beehive.web.webservice.rpc_examples.RpcLiteralSampleService.class;
-
- public void testLocationAnnotation() throws Exception {
- ServiceControl.Location loc =
- (ServiceControl.Location) genJcx.getAnnotation(ServiceControl.Location.class);
-
- assertEquals(1, loc.urls().length);
- assertEquals("http://localhost:8080/wsm-samplesWS/web/complex/RpcLiteralSample.jws", loc.urls()[0]);
- }
-
- public void testWSDLAnnotation() throws Exception {
- ServiceControl.WSDL wsdl =
- (ServiceControl.WSDL) genJcx.getAnnotation(ServiceControl.WSDL.class);
- assertEquals("RpcLiteralSampleService", wsdl.service());
- }
-
+/**
+ * Test the generation of a wsc from a rpc/lit service's wsdl.
+ */
+public class WscGenFromRpcLitWsdlTest extends TestCase {
+
+ private final Class genWsc = org.apache.beehive.web.webservice.rpc_examples.RpcLiteralSampleService.class;
+
+ /**
+ * Test all of the method signatures.
+ * @throws Exception
+ */
public void testMethodSignatures() throws Exception {
testMethodSignature("changeAddressInBody", "int", GenericHolder.class);
testMethodSignature("changeAddressInHeader", "int", GenericHolder.class);
@@ -53,23 +45,25 @@
testMethodSignature("throwAddressException", "int", int.class);
}
+ /**
+ * Test a method signature.
+ * @param methodName
+ * @param returnClassName
+ * @param params
+ * @throws Exception
+ */
private void testMethodSignature(String methodName, String returnClassName, Class... params) throws Exception {
Method m = null;
try {
- m = genJcx.getMethod(methodName, params);
+ m = genWsc.getMethod(methodName, params);
} catch (NoSuchMethodException e) {
fail("Could not find method '" + methodName + "(" + params + ")");
}
assertEquals(returnClassName, m.getReturnType().getName());
}
-
- public JcxGenFromRpcLitWsdlTest(String name) throws Exception {
- super(name);
- }
-
public static Test suite() {
- return new TestSuite(JcxGenFromRpcLitWsdlTest.class);
+ return new TestSuite(WscGenFromRpcLitWsdlTest.class);
}
public static void main(String[] args) {
Propchange: beehive/trunk/system-controls/test/webservice/junit/src/org/apache/beehive/controls/system/webservice/tests/wscgen/WscGenFromRpcLitWsdlTest.java
------------------------------------------------------------------------------
svn:eol-style = native