summaryrefslogtreecommitdiffstats
path: root/branches/sca-java-1.x/stest/sampleTest/src/test/java
diff options
context:
space:
mode:
Diffstat (limited to 'branches/sca-java-1.x/stest/sampleTest/src/test/java')
-rw-r--r--branches/sca-java-1.x/stest/sampleTest/src/test/java/client/ASM_0024_TestCase.java61
-rw-r--r--branches/sca-java-1.x/stest/sampleTest/src/test/java/client/ASM_0025_TestCase.java5
-rw-r--r--branches/sca-java-1.x/stest/sampleTest/src/test/java/client/ASM_0039_TestCase.java54
-rw-r--r--branches/sca-java-1.x/stest/sampleTest/src/test/java/client/ASM_0040_TestCase.java58
-rw-r--r--branches/sca-java-1.x/stest/sampleTest/src/test/java/client/ASM_0041_TestCase.java57
-rw-r--r--branches/sca-java-1.x/stest/sampleTest/src/test/java/client/ASM_0042_TestCase.java60
-rw-r--r--branches/sca-java-1.x/stest/sampleTest/src/test/java/client/ASM_0043_TestCase.java59
7 files changed, 354 insertions, 0 deletions
diff --git a/branches/sca-java-1.x/stest/sampleTest/src/test/java/client/ASM_0024_TestCase.java b/branches/sca-java-1.x/stest/sampleTest/src/test/java/client/ASM_0024_TestCase.java
new file mode 100644
index 0000000000..6f224a8951
--- /dev/null
+++ b/branches/sca-java-1.x/stest/sampleTest/src/test/java/client/ASM_0024_TestCase.java
@@ -0,0 +1,61 @@
+/*
+ * 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_0024_TestCase, which tests that where a <component/>
+ * <reference/> has @target set to some service, that the reference
+ * can have no child <binding/> elements
+ */
+public class ASM_0024_TestCase extends BaseJAXWSTestCase {
+
+
+ /**
+ * <p>
+ * OSOA
+ * Line 1379~1381
+ * Note that a binding element may specify an endpoint which is the target of that binding. A
+ * reference must not mix the use of endpoints specified via binding elements with target endpoints
+ * specified via the target attribute.
+ * <p>
+ * OASIS
+ * ASM50026
+ * If a reference has a value specified for one or more target services in its @target attribute,
+ * there MUST NOT be any child <binding/> elements declared for that reference.
+ * <p>
+ * Jira issue:
+ * https://issues.apache.org/jira/browse/TUSCANY-2920
+ */
+ protected TestConfiguration getTestConfiguration() {
+ TestConfiguration config = new TestConfiguration();
+ config.testName = "ASM_0024";
+ config.input = "request";
+ config.output = "exception";
+ config.composite = "Test_ASM_0024.composite";
+ config.testServiceName = "TestClient";
+ config.testClass = ASM_0002_Client.class;
+ config.serviceInterface = TestInvocation.class;
+ return config;
+ }
+
+} // end class Test_ASM_0003
diff --git a/branches/sca-java-1.x/stest/sampleTest/src/test/java/client/ASM_0025_TestCase.java b/branches/sca-java-1.x/stest/sampleTest/src/test/java/client/ASM_0025_TestCase.java
index 2a5e7afda6..9d79b3b472 100644
--- a/branches/sca-java-1.x/stest/sampleTest/src/test/java/client/ASM_0025_TestCase.java
+++ b/branches/sca-java-1.x/stest/sampleTest/src/test/java/client/ASM_0025_TestCase.java
@@ -30,6 +30,11 @@ import testClient.TestInvocation;
*/
public class ASM_0025_TestCase extends BaseJAXWSTestCase {
+ public static void main(String[] args) throws Exception {
+ ASM_0025_TestCase test = new ASM_0025_TestCase();
+ test.setUp();
+ test.tearDown();
+ }
/**
* <p>
diff --git a/branches/sca-java-1.x/stest/sampleTest/src/test/java/client/ASM_0039_TestCase.java b/branches/sca-java-1.x/stest/sampleTest/src/test/java/client/ASM_0039_TestCase.java
new file mode 100644
index 0000000000..5f7ef37f61
--- /dev/null
+++ b/branches/sca-java-1.x/stest/sampleTest/src/test/java/client/ASM_0039_TestCase.java
@@ -0,0 +1,54 @@
+/*
+ * 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;
+
+/**
+ *
+ */
+public class ASM_0039_TestCase extends BaseJAXWSTestCase {
+
+
+ /**
+ * <p>
+ * OSOA
+ * No corresponding statements in OSOA specification.
+ * <p>
+ * OASIS
+ * ASM50023
+ * Some reference multiplicity errors can be detected at deployment time,
+ * where the rules defined in ASM50018, ASM50019, ASM50020, ASM50021 are violated.
+ * In these cases, an error SHOULD be generated by the SCA runtime at deployment time.
+ */
+ protected TestConfiguration getTestConfiguration() {
+ TestConfiguration config = new TestConfiguration();
+ config.testName = "ASM_0039";
+ config.input = "request";
+ config.output = "ASM_0039 request service1 operation1 invoked service2 operation1 invokedservice2 operation1 invoked";
+ config.composite = "Test_ASM_0039.composite";
+ config.testServiceName = "TestClient";
+ config.testClass = ASM_0002_Client.class;
+ config.serviceInterface = TestInvocation.class;
+ return config;
+ }
+
+} // end class Test_ASM_0039
diff --git a/branches/sca-java-1.x/stest/sampleTest/src/test/java/client/ASM_0040_TestCase.java b/branches/sca-java-1.x/stest/sampleTest/src/test/java/client/ASM_0040_TestCase.java
new file mode 100644
index 0000000000..388508c209
--- /dev/null
+++ b/branches/sca-java-1.x/stest/sampleTest/src/test/java/client/ASM_0040_TestCase.java
@@ -0,0 +1,58 @@
+/*
+ * 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;
+
+/**
+ * For the cases where it is valid for the reference to have no target service specified,
+ * the component implementation language specification needs to define the programming model
+ * for interacting with an untargetted reference.
+ * So the SCA runtime should throw an exception if it is using an untargetted reference.
+ */
+public class ASM_0040_TestCase extends BaseJAXWSTestCase {
+
+
+ /**
+ * <p>
+ * OSOA
+ * No corresponding statements in OSOA specification.
+ * <p>
+ * OASIS
+ * ASM50024
+ * Some reference multiplicity errors can only be checked at runtime,
+ * where the rules defined in ASM50018, ASM50019, ASM50020, ASM50021 are violated.
+ * In these cases, the SCA runtime MUST generate an error no later than when the reference is
+ * invoked by the component implementation.
+ */
+ protected TestConfiguration getTestConfiguration() {
+ TestConfiguration config = new TestConfiguration();
+ config.testName = "ASM_0040";
+ config.input = "request";
+ config.output = "exception";
+ config.composite = "Test_ASM_0040.composite";
+ config.testServiceName = "TestClient";
+ config.testClass = ASM_0002_Client.class;
+ config.serviceInterface = TestInvocation.class;
+ return config;
+ }
+
+} // end class Test_ASM_0040
diff --git a/branches/sca-java-1.x/stest/sampleTest/src/test/java/client/ASM_0041_TestCase.java b/branches/sca-java-1.x/stest/sampleTest/src/test/java/client/ASM_0041_TestCase.java
new file mode 100644
index 0000000000..441cc61734
--- /dev/null
+++ b/branches/sca-java-1.x/stest/sampleTest/src/test/java/client/ASM_0041_TestCase.java
@@ -0,0 +1,57 @@
+/*
+ * 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;
+
+/**
+ *test if @wiredByImpl="true", <reference/> element has no <binding/> child elements.
+ */
+public class ASM_0041_TestCase extends BaseJAXWSTestCase {
+
+ /**
+ * <p>
+ * OSOA
+ * Line 220~221
+ * If "true" is set, then the reference should not be wired
+ * statically within a composite, but left unwired.
+ * <p>
+ * OASIS
+ * ASM50013
+ * If @wiredByImpl="true",
+ * other methods of specifying the target service MUST NOT be used.
+ * <p>
+ * Jira issue:
+ * https://issues.apache.org/jira/browse/TUSCANY-2913
+ */
+ protected TestConfiguration getTestConfiguration() {
+ TestConfiguration config = new TestConfiguration();
+ config.testName = "ASM_0041";
+ config.input = "request";
+ config.output = "exception";
+ config.composite = "Test_ASM_0041.composite";
+ config.testServiceName = "TestClient";
+ config.testClass = ASM_0002_Client.class;
+ config.serviceInterface = TestInvocation.class;
+ return config;
+ }
+
+} // end class Test_ASM_0041
diff --git a/branches/sca-java-1.x/stest/sampleTest/src/test/java/client/ASM_0042_TestCase.java b/branches/sca-java-1.x/stest/sampleTest/src/test/java/client/ASM_0042_TestCase.java
new file mode 100644
index 0000000000..d25fc1e270
--- /dev/null
+++ b/branches/sca-java-1.x/stest/sampleTest/src/test/java/client/ASM_0042_TestCase.java
@@ -0,0 +1,60 @@
+/*
+ * 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;
+
+/**
+ * test if @wiredByImpl="true",
+ * No <wire/> elements have the <reference/> element declared as the @source for the wire.
+ */
+@Ignore("TUSCANY-2925")
+public class ASM_0042_TestCase extends BaseJAXWSTestCase {
+
+
+ /**
+ * <p>
+ * OSOA
+ * Line 220~221
+ * If "true" is set, then the reference should not be wired
+ * statically within a composite, but left unwired.
+ * <p>
+ * OASIS
+ * ASM50013
+ * If @wiredByImpl="true",
+ * other methods of specifying the target service MUST NOT be used.
+ * <p>
+ * Jira issue:
+ * https://issues.apache.org/jira/browse/TUSCANY-2913
+ */
+ protected TestConfiguration getTestConfiguration() {
+ TestConfiguration config = new TestConfiguration();
+ config.testName = "ASM_0042";
+ config.input = "request";
+ config.output = "exception";
+ config.composite = "Test_ASM_0042.composite";
+ config.testServiceName = "TestClient";
+ config.testClass = ASM_0002_Client.class;
+ config.serviceInterface = TestInvocation.class;
+ return config;
+ }
+
+} // end class Test_ASM_0042
diff --git a/branches/sca-java-1.x/stest/sampleTest/src/test/java/client/ASM_0043_TestCase.java b/branches/sca-java-1.x/stest/sampleTest/src/test/java/client/ASM_0043_TestCase.java
new file mode 100644
index 0000000000..a554fa1ee6
--- /dev/null
+++ b/branches/sca-java-1.x/stest/sampleTest/src/test/java/client/ASM_0043_TestCase.java
@@ -0,0 +1,59 @@
+/*
+ * 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_0043_TestCase, it tests @uri and subelement of <binding> can't coexist,
+ * and some binding can use specific subelements more than a simple URI.
+ *
+ */
+public class ASM_0043_TestCase extends BaseJAXWSTestCase {
+
+
+ /**
+ * <p>
+ * OSOA
+ * <p>
+ * OASIS
+ * ASM50016
+ * It is possible that a particular binding type MAY require that the address of a target service
+ * uses more than a simple URI. In cases where a reference element has a binding subelement of such a type,
+ * the @uri attribute of the binding element MUST NOT be used to identify the target service -
+ * instead, binding specific attributes and/or child elements MUST be used.
+ * <p>
+ * Jira issue:
+ * https://issues.apache.org/jira/browse/TUSCANY-2921
+ */
+ protected TestConfiguration getTestConfiguration() {
+ TestConfiguration config = new TestConfiguration();
+ config.testName = "ASM_0043";
+ config.input = "request";
+ config.output = "exception";
+ config.composite = "Test_ASM_0043.composite";
+ config.testServiceName = "TestClient";
+ config.testClass = ASM_0002_Client.class;
+ config.serviceInterface = TestInvocation.class;
+ return config;
+ }
+
+} // end class Test_ASM_0043