summaryrefslogtreecommitdiffstats
path: root/java/sca/stest/sampleTest/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'java/sca/stest/sampleTest/src/test')
-rw-r--r--java/sca/stest/sampleTest/src/test/java/client/ASM_0028_TestCase.java2
-rw-r--r--java/sca/stest/sampleTest/src/test/java/client/ASM_0029_TestCase.java44
-rw-r--r--java/sca/stest/sampleTest/src/test/java/client/ASM_0030_TestCase.java44
-rw-r--r--java/sca/stest/sampleTest/src/test/java/client/ASM_0031_TestCase.java47
-rw-r--r--java/sca/stest/sampleTest/src/test/java/client/ASM_0032_TestCase.java47
-rw-r--r--java/sca/stest/sampleTest/src/test/java/client/ASM_0033_TestCase.java46
-rw-r--r--java/sca/stest/sampleTest/src/test/java/client/ASM_0034_TestCase.java45
-rw-r--r--java/sca/stest/sampleTest/src/test/java/client/ASM_6001_TestCase.java46
-rw-r--r--java/sca/stest/sampleTest/src/test/java/client/ASM_6002_TestCase.java45
-rw-r--r--java/sca/stest/sampleTest/src/test/java/client/ASM_6003_TestCase.java45
-rw-r--r--java/sca/stest/sampleTest/src/test/java/client/ASM_6004_TestCase.java46
-rw-r--r--java/sca/stest/sampleTest/src/test/java/client/BaseJAXWSTestCase.java7
12 files changed, 460 insertions, 4 deletions
diff --git a/java/sca/stest/sampleTest/src/test/java/client/ASM_0028_TestCase.java b/java/sca/stest/sampleTest/src/test/java/client/ASM_0028_TestCase.java
index 3bbf78f2ba..b5eb110aaa 100644
--- a/java/sca/stest/sampleTest/src/test/java/client/ASM_0028_TestCase.java
+++ b/java/sca/stest/sampleTest/src/test/java/client/ASM_0028_TestCase.java
@@ -42,4 +42,4 @@ public class ASM_0028_TestCase extends BaseJAXWSTestCase {
return config;
}
-} // end class Test_ASM_0003
+} // end class Test_ASM_0028
diff --git a/java/sca/stest/sampleTest/src/test/java/client/ASM_0029_TestCase.java b/java/sca/stest/sampleTest/src/test/java/client/ASM_0029_TestCase.java
new file mode 100644
index 0000000000..13a3986135
--- /dev/null
+++ b/java/sca/stest/sampleTest/src/test/java/client/ASM_0029_TestCase.java
@@ -0,0 +1,44 @@
+/*
+ * 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 client;
+
+
+import test.ASM_0002_Client;
+import testClient.TestInvocation;
+
+/**
+ * Client for ASM_0029_TestCase, which tests that where a <component/> <property/>
+ * has @many=false that there is only one <value/> child element of the <property/>
+ */
+public class ASM_0029_TestCase extends BaseJAXWSTestCase {
+
+
+ protected TestConfiguration getTestConfiguration() {
+ TestConfiguration config = new TestConfiguration();
+ config.testName = "ASM_0029";
+ config.input = "request";
+ config.output = "exception";
+ config.composite = "Test_ASM_0029.composite";
+ config.testServiceName = "TestClient";
+ config.testClass = ASM_0002_Client.class;
+ config.serviceInterface = TestInvocation.class;
+ return config;
+ }
+
+} // end class Test_ASM_0029
diff --git a/java/sca/stest/sampleTest/src/test/java/client/ASM_0030_TestCase.java b/java/sca/stest/sampleTest/src/test/java/client/ASM_0030_TestCase.java
new file mode 100644
index 0000000000..3916cc397e
--- /dev/null
+++ b/java/sca/stest/sampleTest/src/test/java/client/ASM_0030_TestCase.java
@@ -0,0 +1,44 @@
+/*
+ * 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 client;
+
+
+import test.ASM_0002_Client;
+import testClient.TestInvocation;
+
+/**
+ * Client for ASM_0030_TestCase, which tests that a <component/> <property/>
+ * with a @value attribute set does not have any <value/> child elements
+ */
+public class ASM_0030_TestCase extends BaseJAXWSTestCase {
+
+
+ protected TestConfiguration getTestConfiguration() {
+ TestConfiguration config = new TestConfiguration();
+ config.testName = "ASM_0030";
+ config.input = "request";
+ config.output = "exception";
+ config.composite = "Test_ASM_0030.composite";
+ config.testServiceName = "TestClient";
+ config.testClass = ASM_0002_Client.class;
+ config.serviceInterface = TestInvocation.class;
+ return config;
+ }
+
+} // end class Test_ASM_0030
diff --git a/java/sca/stest/sampleTest/src/test/java/client/ASM_0031_TestCase.java b/java/sca/stest/sampleTest/src/test/java/client/ASM_0031_TestCase.java
new file mode 100644
index 0000000000..32c7afca85
--- /dev/null
+++ b/java/sca/stest/sampleTest/src/test/java/client/ASM_0031_TestCase.java
@@ -0,0 +1,47 @@
+/*
+ * 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 client;
+
+
+import test.ASM_0002_Client;
+import testClient.TestInvocation;
+
+/**
+ * Client for ASM_0031_TestCase, which tests that where a <component/> <reference/>
+ * has its @target attribute set to a valid service and the <composite/> also
+ * contains a <wire/> element with @source set to the <component/> <reference/>
+ * and @target set to a second valid service and has @replace=true, the <reference/>
+ * is wired to the second service only
+ */
+public class ASM_0031_TestCase extends BaseJAXWSTestCase {
+
+
+ protected TestConfiguration getTestConfiguration() {
+ TestConfiguration config = new TestConfiguration();
+ config.testName = "ASM_0031";
+ config.input = "request";
+ config.output = "ASM_0031 request service1 operation1 invoked service3 operation1 invoked";
+ config.composite = "Test_ASM_0031.composite";
+ config.testServiceName = "TestClient";
+ config.testClass = ASM_0002_Client.class;
+ config.serviceInterface = TestInvocation.class;
+ return config;
+ }
+
+} // end class Test_ASM_0031
diff --git a/java/sca/stest/sampleTest/src/test/java/client/ASM_0032_TestCase.java b/java/sca/stest/sampleTest/src/test/java/client/ASM_0032_TestCase.java
new file mode 100644
index 0000000000..0601cab2ee
--- /dev/null
+++ b/java/sca/stest/sampleTest/src/test/java/client/ASM_0032_TestCase.java
@@ -0,0 +1,47 @@
+/*
+ * 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 client;
+
+
+import test.ASM_0002_Client;
+import testClient.TestInvocation;
+
+/**
+ * Client for ASM_0032_TestCase, which tests where a <component/> <service/>
+ * has no <binding/> subelements and the corresponding <service/> element of
+ * the <componentType/> of the <component/> <implementation/> has one or more
+ * <binding/> subelements, the <component/> <service/> is made available with
+ * all the bindings declared on the <service/> element of the <componentType/>
+ */
+public class ASM_0032_TestCase extends BaseJAXWSTestCase {
+
+
+ protected TestConfiguration getTestConfiguration() {
+ TestConfiguration config = new TestConfiguration();
+ config.testName = "ASM_0032";
+ config.input = "request";
+ config.output = "ASM_0032 request service1 operation1 invoked service2 operation1 invokedservice2 operation1 invoked";
+ config.composite = "Test_ASM_0032.composite";
+ config.testServiceName = "TestClient";
+ config.testClass = ASM_0002_Client.class;
+ config.serviceInterface = TestInvocation.class;
+ return config;
+ }
+
+} // end class Test_ASM_0032
diff --git a/java/sca/stest/sampleTest/src/test/java/client/ASM_0033_TestCase.java b/java/sca/stest/sampleTest/src/test/java/client/ASM_0033_TestCase.java
new file mode 100644
index 0000000000..ffc1dcaa33
--- /dev/null
+++ b/java/sca/stest/sampleTest/src/test/java/client/ASM_0033_TestCase.java
@@ -0,0 +1,46 @@
+/*
+ * 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 client;
+
+
+import test.ASM_0002_Client;
+import testClient.TestInvocation;
+
+/**
+ * Client for ASM_0033_TestCase, which tests that where a <component/> <service/>
+ * has no <binding/> subelements and the corresponding <service/> element of the
+ * <componentType/> of the <component/> <implementation/> has no <binding/> subelements,
+ * the <component/> <service/> is made available with binding.sca
+ */
+public class ASM_0033_TestCase extends BaseJAXWSTestCase {
+
+
+ protected TestConfiguration getTestConfiguration() {
+ TestConfiguration config = new TestConfiguration();
+ config.testName = "ASM_0033";
+ config.input = "request";
+ config.output = "ASM_0033 request service1 operation1 invoked service2 operation1 invokedservice2 operation1 invoked";
+ config.composite = "Test_ASM_0033.composite";
+ config.testServiceName = "TestClient";
+ config.testClass = ASM_0002_Client.class;
+ config.serviceInterface = TestInvocation.class;
+ return config;
+ }
+
+} // end class Test_ASM_0032
diff --git a/java/sca/stest/sampleTest/src/test/java/client/ASM_0034_TestCase.java b/java/sca/stest/sampleTest/src/test/java/client/ASM_0034_TestCase.java
new file mode 100644
index 0000000000..9f54b0d3df
--- /dev/null
+++ b/java/sca/stest/sampleTest/src/test/java/client/ASM_0034_TestCase.java
@@ -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 client;
+
+
+import test.ASM_0002_Client;
+import testClient.TestInvocation;
+
+/**
+ * Client for ASM_0034_TestCase, which tests that where a <component/> <service/>
+ * has 1 or more <binding/> subelements the <component/> <service/> is made
+ * available with all the bindings declared on the <service/> element
+ */
+public class ASM_0034_TestCase extends BaseJAXWSTestCase {
+
+
+ protected TestConfiguration getTestConfiguration() {
+ TestConfiguration config = new TestConfiguration();
+ config.testName = "ASM_0034";
+ config.input = "request";
+ config.output = "ASM_0034 request service1 operation1 invoked service2 operation1 invokedservice2 operation1 invoked";
+ config.composite = "Test_ASM_0034.composite";
+ config.testServiceName = "TestClient";
+ config.testClass = ASM_0002_Client.class;
+ config.serviceInterface = TestInvocation.class;
+ return config;
+ }
+
+} // end class Test_ASM_0034
diff --git a/java/sca/stest/sampleTest/src/test/java/client/ASM_6001_TestCase.java b/java/sca/stest/sampleTest/src/test/java/client/ASM_6001_TestCase.java
new file mode 100644
index 0000000000..0f6ca04682
--- /dev/null
+++ b/java/sca/stest/sampleTest/src/test/java/client/ASM_6001_TestCase.java
@@ -0,0 +1,46 @@
+/*
+ * 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 client;
+
+
+import test.ASM_0002_Client;
+import testClient.TestInvocation;
+
+/**
+ * Client for ASM_6001_TestCase, which tests that where an SCA contribution
+ * contains two <composite/> elements with the same name and same
+ * targetNamespace that an SCA application using that composite does not run
+ * and that the SCA runtime reports an error
+ */
+public class ASM_6001_TestCase extends BaseJAXWSTestCase {
+
+
+ protected TestConfiguration getTestConfiguration() {
+ TestConfiguration config = new TestConfiguration();
+ config.testName = "ASM_6001";
+ config.input = "request";
+ config.output = "exception";
+ config.composite = "Test_ASM_6001.composite";
+ config.testServiceName = "TestClient";
+ config.testClass = ASM_0002_Client.class;
+ config.serviceInterface = TestInvocation.class;
+ return config;
+ }
+
+} // end class Test_ASM_6001
diff --git a/java/sca/stest/sampleTest/src/test/java/client/ASM_6002_TestCase.java b/java/sca/stest/sampleTest/src/test/java/client/ASM_6002_TestCase.java
new file mode 100644
index 0000000000..e53a3cde1b
--- /dev/null
+++ b/java/sca/stest/sampleTest/src/test/java/client/ASM_6002_TestCase.java
@@ -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 client;
+
+
+import test.ASM_0002_Client;
+import testClient.TestInvocation;
+
+/**
+ * Client for ASM_6002_TestCase, which tests that where a <composite/> has
+ * multiple <service/> subelements that the @name attributes are unique
+ * across those subelements
+ */
+public class ASM_6002_TestCase extends BaseJAXWSTestCase {
+
+
+ protected TestConfiguration getTestConfiguration() {
+ TestConfiguration config = new TestConfiguration();
+ config.testName = "ASM_6002";
+ config.input = "request";
+ config.output = "exception";
+ config.composite = "Test_ASM_6002.composite";
+ config.testServiceName = "TestClient";
+ config.testClass = ASM_0002_Client.class;
+ config.serviceInterface = TestInvocation.class;
+ return config;
+ }
+
+} // end class Test_ASM_6002
diff --git a/java/sca/stest/sampleTest/src/test/java/client/ASM_6003_TestCase.java b/java/sca/stest/sampleTest/src/test/java/client/ASM_6003_TestCase.java
new file mode 100644
index 0000000000..153bb3fcea
--- /dev/null
+++ b/java/sca/stest/sampleTest/src/test/java/client/ASM_6003_TestCase.java
@@ -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 client;
+
+
+import test.ASM_0002_Client;
+import testClient.TestInvocation;
+
+/**
+ * Client for ASM_6003_TestCase, which tests that where a <composite/> has a
+ * <service/> subelement that the @promote attribute identifies a <service/>
+ * of a <component/> in the <composite/>
+ */
+public class ASM_6003_TestCase extends BaseJAXWSTestCase {
+
+
+ protected TestConfiguration getTestConfiguration() {
+ TestConfiguration config = new TestConfiguration();
+ config.testName = "ASM_6003";
+ config.input = "request";
+ config.output = "exception";
+ config.composite = "Test_ASM_6003.composite";
+ config.testServiceName = "TestClient";
+ config.testClass = ASM_0002_Client.class;
+ config.serviceInterface = TestInvocation.class;
+ return config;
+ }
+
+} // end class Test_ASM_6003
diff --git a/java/sca/stest/sampleTest/src/test/java/client/ASM_6004_TestCase.java b/java/sca/stest/sampleTest/src/test/java/client/ASM_6004_TestCase.java
new file mode 100644
index 0000000000..d5b6fb3771
--- /dev/null
+++ b/java/sca/stest/sampleTest/src/test/java/client/ASM_6004_TestCase.java
@@ -0,0 +1,46 @@
+/*
+ * 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 client;
+
+
+import test.ASM_0002_Client;
+import testClient.TestInvocation;
+
+/**
+ * Client for ASM_6004_TestCase, which tests that the <interface/> declared
+ * on a <service/> subelement of a <composite/> is a compatible subset of the
+ * <interface/> declared on the <component/> <service/> reference by the
+ * @promote attribute
+ */
+public class ASM_6004_TestCase extends BaseJAXWSTestCase {
+
+
+ protected TestConfiguration getTestConfiguration() {
+ TestConfiguration config = new TestConfiguration();
+ config.testName = "ASM_6004";
+ config.input = "request";
+ config.output = "ASM_6004 request service1 operation1 invoked";
+ config.composite = "Test_ASM_6004.composite";
+ config.testServiceName = "TestClient";
+ config.testClass = ASM_0002_Client.class;
+ config.serviceInterface = TestInvocation.class;
+ return config;
+ }
+
+} // end class Test_ASM_6004
diff --git a/java/sca/stest/sampleTest/src/test/java/client/BaseJAXWSTestCase.java b/java/sca/stest/sampleTest/src/test/java/client/BaseJAXWSTestCase.java
index 17344525df..ede2658ac0 100644
--- a/java/sca/stest/sampleTest/src/test/java/client/BaseJAXWSTestCase.java
+++ b/java/sca/stest/sampleTest/src/test/java/client/BaseJAXWSTestCase.java
@@ -83,19 +83,20 @@ public class BaseJAXWSTestCase {
// System.out.println("Test " + testName + " starting");
String output = null;
try {
- // Just requires input to proceed
- // System.in.read();
- //
output = invokeTest( testConfiguration.getInput() );
} catch ( TestException_Exception e ) {
TestException exceptionContent = e.getFaultInfo();
System.out.println("Service fault received - detail: " + exceptionContent.getMessage() );
assertEquals( testConfiguration.getExpectedOutput(), "exception" );
+ System.out.println("Test " + testConfiguration.getTestName() + " completed successfully");
+ return;
} catch (Throwable e) {
e.printStackTrace();
System.out.println( "Exception received - detail: " + e.getMessage() );
assertEquals( testConfiguration.getExpectedOutput(), "exception" );
+ System.out.println("Test " + testConfiguration.getTestName() + " completed successfully");
+ return;
}
assertEquals( testConfiguration.getExpectedOutput(), output );
System.out.println("Test " + testConfiguration.getTestName() + " completed successfully");