From cdf9b141765f5397bfd8927c8c8454fa8157ad65 Mon Sep 17 00:00:00 2001 From: edwardsmj Date: Fri, 28 Nov 2008 09:43:41 +0000 Subject: New Folder for OASIS Specification conformance tests git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@721404 13f79535-47bb-0310-9956-ffa450edef68 --- java/sca/stest/sampleTest/pom.xml | 91 +++++++++++++++ .../src/main/java/test/ASM_0001_Client.java | 49 +++++++++ .../src/main/java/test/ASM_0002_Client.java | 57 ++++++++++ .../src/main/java/test/ASM_0003_Client.java | 61 +++++++++++ .../sampleTest/src/main/java/test/Service1.java | 17 +++ .../src/main/java/test/TestInvocation.java | 17 +++ .../src/main/java/test/service1Impl.java | 20 ++++ .../src/main/resources/Test_ASM_0001.composite | 40 +++++++ .../src/main/resources/Test_ASM_0002.composite | 42 +++++++ .../src/main/resources/Test_ASM_0003.composite | 59 ++++++++++ .../src/main/resources/Test_ASM_0004.composite | 61 +++++++++++ .../src/test/java/client/BaseJAXWSTest.java | 122 +++++++++++++++++++++ .../sampleTest/src/test/java/client/BaseTest.java | 122 +++++++++++++++++++++ .../src/test/java/client/TestConfiguration.java | 30 +++++ .../src/test/java/client/Test_ASM_0002.java | 43 ++++++++ .../src/test/java/client/Test_ASM_0003.java | 44 ++++++++ .../src/test/java/client/Test_ASM_0004.java | 43 ++++++++ 17 files changed, 918 insertions(+) create mode 100644 java/sca/stest/sampleTest/pom.xml create mode 100644 java/sca/stest/sampleTest/src/main/java/test/ASM_0001_Client.java create mode 100644 java/sca/stest/sampleTest/src/main/java/test/ASM_0002_Client.java create mode 100644 java/sca/stest/sampleTest/src/main/java/test/ASM_0003_Client.java create mode 100644 java/sca/stest/sampleTest/src/main/java/test/Service1.java create mode 100644 java/sca/stest/sampleTest/src/main/java/test/TestInvocation.java create mode 100644 java/sca/stest/sampleTest/src/main/java/test/service1Impl.java create mode 100644 java/sca/stest/sampleTest/src/main/resources/Test_ASM_0001.composite create mode 100644 java/sca/stest/sampleTest/src/main/resources/Test_ASM_0002.composite create mode 100644 java/sca/stest/sampleTest/src/main/resources/Test_ASM_0003.composite create mode 100644 java/sca/stest/sampleTest/src/main/resources/Test_ASM_0004.composite create mode 100644 java/sca/stest/sampleTest/src/test/java/client/BaseJAXWSTest.java create mode 100644 java/sca/stest/sampleTest/src/test/java/client/BaseTest.java create mode 100644 java/sca/stest/sampleTest/src/test/java/client/TestConfiguration.java create mode 100644 java/sca/stest/sampleTest/src/test/java/client/Test_ASM_0002.java create mode 100644 java/sca/stest/sampleTest/src/test/java/client/Test_ASM_0003.java create mode 100644 java/sca/stest/sampleTest/src/test/java/client/Test_ASM_0004.java diff --git a/java/sca/stest/sampleTest/pom.xml b/java/sca/stest/sampleTest/pom.xml new file mode 100644 index 0000000000..2e396d9ff7 --- /dev/null +++ b/java/sca/stest/sampleTest/pom.xml @@ -0,0 +1,91 @@ + + + + 4.0.0 + + org.apache.tuscany.sca + tuscany-sca + 2.0-SNAPSHOT + ../../pom.xml + + stest-sampleTest + Apache Tuscany SCA Specification Sample Testcase + + + + apache.incubator + http://people.apache.org/repo/m2-incubating-repository + + + + + + org.apache.tuscany.sca + tuscany-node-api + 2.0-SNAPSHOT + + + + org.apache.tuscany.sca + tuscany-node-launcher-equinox + 2.0-SNAPSHOT + + + + org.apache.tuscany.sca + tuscany-node-impl + 2.0-SNAPSHOT + runtime + + + + org.apache.tuscany.sca + tuscany-implementation-java-runtime + 2.0-SNAPSHOT + runtime + + + + org.apache.tuscany.sca + tuscany-implementation-node-runtime + 2.0-SNAPSHOT + runtime + + + + org.apache.tuscany.sca + tuscany-extensibility-equinox + 2.0-SNAPSHOT + runtime + + + + junit + junit + 4.5 + test + + + + + + ${artifactId} + + diff --git a/java/sca/stest/sampleTest/src/main/java/test/ASM_0001_Client.java b/java/sca/stest/sampleTest/src/main/java/test/ASM_0001_Client.java new file mode 100644 index 0000000000..5f35b31380 --- /dev/null +++ b/java/sca/stest/sampleTest/src/main/java/test/ASM_0001_Client.java @@ -0,0 +1,49 @@ +package test; + +import org.osoa.sca.annotations.Service; + +/** + * Basic test initiation class + * @author MikeEdwards + * + */ +@Service(TestInvocation.class) +public class ASM_0001_Client implements TestInvocation { + + private String testName = "ASM_0001"; + + /** + * This method is offered as a service and is + * invoked by the test client to run the test + */ + public String invokeTest( String input ) { + String response = null; + + response = runTest( input ); + + return response; + } // end method invokeTest + + /** + * This method actually runs the test - and is subclassed by classes that run other tests. + * @param input - an input string + * @return - a response string = "ASM_0001 inputString invoked ok"; + * + */ + public String runTest( String input ){ + String response = null; + + response = testName + " " + input + " invoked ok"; + + return response; + } // end method runTest + + /** + * Sets the name of the test + * @param name - the test name + */ + protected void setTestName( String name ) { + testName = name; + } + +} // diff --git a/java/sca/stest/sampleTest/src/main/java/test/ASM_0002_Client.java b/java/sca/stest/sampleTest/src/main/java/test/ASM_0002_Client.java new file mode 100644 index 0000000000..1e10cc9024 --- /dev/null +++ b/java/sca/stest/sampleTest/src/main/java/test/ASM_0002_Client.java @@ -0,0 +1,57 @@ +package test; + +import org.osoa.sca.annotations.Service; +import org.osoa.sca.annotations.Reference; +import org.osoa.sca.annotations.Property; + +/** + * Test initiation class with a single reference of multiplicity 1..1 + * @author MikeEdwards + * + */ +@Service(TestInvocation.class) +public class ASM_0002_Client implements TestInvocation { + + @Property + private String testName = "ASM_xxxx"; + + @Reference + public Service1 reference1; + + /** + * This method is offered as a service and is + * invoked by the test client to run the test + */ + public String invokeTest( String input ) { + String response = null; + + response = runTest( input ); + + return response; + } // end method invokeTest + + /** + * This method actually runs the test - and is subclassed by classes that run other tests. + * @param input - an input string + * @return - a response string = "ASM_0001 inputString invoked ok"; + * + */ + public String runTest( String input ){ + String response = null; + + String response1 = reference1.operation1(input); + + response = testName + " " + input + " " + response1; + + return response; + } // end method runTest + + /** + * Sets the name of the test + * @param name - the test name + */ + protected void setTestName( String name ) { + testName = name; + } + +} // diff --git a/java/sca/stest/sampleTest/src/main/java/test/ASM_0003_Client.java b/java/sca/stest/sampleTest/src/main/java/test/ASM_0003_Client.java new file mode 100644 index 0000000000..437ded8cea --- /dev/null +++ b/java/sca/stest/sampleTest/src/main/java/test/ASM_0003_Client.java @@ -0,0 +1,61 @@ +package test; + +import org.osoa.sca.annotations.Service; +import org.osoa.sca.annotations.Reference; +import org.osoa.sca.annotations.Property; + +import java.util.List; + +/** + * Basic test initiation class + * @author MikeEdwards + * + */ +@Service(TestInvocation.class) +public class ASM_0003_Client implements TestInvocation { + + @Property + private String testName = "ASM_xxxx"; + + @Reference + public List reference1; + + /** + * This method is offered as a service and is + * invoked by the test client to run the test + */ + public String invokeTest( String input ) { + String response = null; + + response = runTest( input ); + + return response; + } // end method invokeTest + + /** + * This method actually runs the test - and is subclassed by classes that run other tests. + * @param input - an input string + * @return - a response string = "ASM_0001 inputString invoked ok"; + * + */ + public String runTest( String input ){ + String response = ""; + + for( Service1 reference : reference1 ) { + response += reference.operation1(input); + } // end for + + response = testName + " " + input + " " + response; + + return response; + } // end method runTest + + /** + * Sets the name of the test + * @param name - the test name + */ + protected void setTestName( String name ) { + testName = name; + } + +} // diff --git a/java/sca/stest/sampleTest/src/main/java/test/Service1.java b/java/sca/stest/sampleTest/src/main/java/test/Service1.java new file mode 100644 index 0000000000..303a4f1cdd --- /dev/null +++ b/java/sca/stest/sampleTest/src/main/java/test/Service1.java @@ -0,0 +1,17 @@ +package test; + +/** + * A test service interface + * @author MikeEdwards + * + */ +public interface Service1 { + + /** + * Method for invoking testcase service + * @param input - input parameter(s) as a String + * @return - output data as a String + */ + public String operation1( String input ); + +} diff --git a/java/sca/stest/sampleTest/src/main/java/test/TestInvocation.java b/java/sca/stest/sampleTest/src/main/java/test/TestInvocation.java new file mode 100644 index 0000000000..e33ab66bf6 --- /dev/null +++ b/java/sca/stest/sampleTest/src/main/java/test/TestInvocation.java @@ -0,0 +1,17 @@ +package test; + +/** + * Basic interface to invoke testcases + * @author MikeEdwards + * + */ +public interface TestInvocation { + + /** + * Method for invoking testcase + * @param input - input parameter(s) as a String + * @return - output data as a String + */ + public String invokeTest( String input ); + +} diff --git a/java/sca/stest/sampleTest/src/main/java/test/service1Impl.java b/java/sca/stest/sampleTest/src/main/java/test/service1Impl.java new file mode 100644 index 0000000000..98000e28f7 --- /dev/null +++ b/java/sca/stest/sampleTest/src/main/java/test/service1Impl.java @@ -0,0 +1,20 @@ +package test; + +import org.osoa.sca.annotations.*; + +/** + * Simple Java component implementation for business interface Service1 + * @author MikeEdwards + * + */ +@Service(Service1.class) +public class service1Impl implements Service1 { + + @Property + public String serviceName = "service1"; + + public String operation1(String input) { + return serviceName + " operation1 invoked"; + } + +} diff --git a/java/sca/stest/sampleTest/src/main/resources/Test_ASM_0001.composite b/java/sca/stest/sampleTest/src/main/resources/Test_ASM_0001.composite new file mode 100644 index 0000000000..ac9bb3ea00 --- /dev/null +++ b/java/sca/stest/sampleTest/src/main/resources/Test_ASM_0001.composite @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + diff --git a/java/sca/stest/sampleTest/src/main/resources/Test_ASM_0002.composite b/java/sca/stest/sampleTest/src/main/resources/Test_ASM_0002.composite new file mode 100644 index 0000000000..28e4b56ef3 --- /dev/null +++ b/java/sca/stest/sampleTest/src/main/resources/Test_ASM_0002.composite @@ -0,0 +1,42 @@ + + + + + + + + + + + ASM_0002 + + + + + + + + + + + diff --git a/java/sca/stest/sampleTest/src/main/resources/Test_ASM_0003.composite b/java/sca/stest/sampleTest/src/main/resources/Test_ASM_0003.composite new file mode 100644 index 0000000000..577d4eb049 --- /dev/null +++ b/java/sca/stest/sampleTest/src/main/resources/Test_ASM_0003.composite @@ -0,0 +1,59 @@ + + + + + + + + + + + ASM_0003 + + + + + + + + + service1 + + + + + + + + service2 + + + + + + + + service3 + + + diff --git a/java/sca/stest/sampleTest/src/main/resources/Test_ASM_0004.composite b/java/sca/stest/sampleTest/src/main/resources/Test_ASM_0004.composite new file mode 100644 index 0000000000..c5cc0494a3 --- /dev/null +++ b/java/sca/stest/sampleTest/src/main/resources/Test_ASM_0004.composite @@ -0,0 +1,61 @@ + + + + + + + + + + + + ASM_0004 + + + + + + + + + service1 + + + + + + + + service2 + + + + + + + + service3 + + + diff --git a/java/sca/stest/sampleTest/src/test/java/client/BaseJAXWSTest.java b/java/sca/stest/sampleTest/src/test/java/client/BaseJAXWSTest.java new file mode 100644 index 0000000000..cedf2e1992 --- /dev/null +++ b/java/sca/stest/sampleTest/src/test/java/client/BaseJAXWSTest.java @@ -0,0 +1,122 @@ +/* + * 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 static org.junit.Assert.*; + +import org.apache.tuscany.sca.node.Node; +import org.apache.tuscany.sca.node.equinox.launcher.Contribution; +import org.apache.tuscany.sca.node.equinox.launcher.ContributionLocationHelper; +import org.apache.tuscany.sca.node.equinox.launcher.NodeLauncher; +import org.junit.After; +import org.junit.Before; +import org.junit.Test; +import org.osoa.sca.annotations.Reference; + +import test.ASM_0001_Client; +import test.TestInvocation; + +/** + * A generic test client based on JAX-WS APIs + */ +public class BaseJAXWSTest { + + protected NodeLauncher launcher; + protected Node node; + protected TestConfiguration testConfiguration = getTestConfiguration(); + + public static void main(String[] args) throws Exception { + BaseJAXWSTest test = new BaseJAXWSTest(); + test.setUp(); + test.tearDown(); + } + + @Before + public void setUp() throws Exception { + startContribution(); + } + + @After + public void tearDown() throws Exception { + stopContribution(); + } + + @Test + public void testDummy() throws Exception { + // System.out.println("Test " + testName + " starting"); + try { + String output = invokeTest( testConfiguration.getInput() ); + assertEquals( output, testConfiguration.getExpectedOutput() ); + } catch (Exception e) { + assertEquals( "exception", testConfiguration.getExpectedOutput() ); + System.out.println( "Expected exception - detail: " + e.getMessage() ); + } + System.out.println("Test " + testConfiguration.getTestName() + " completed successfully"); + } + + public String invokeTest( String input ) { + + TestInvocation service = (TestInvocation) getService( testConfiguration.getServiceInterface(), + testConfiguration.getTestServiceName() ); + + return service.invokeTest( input ); + } // end method invokeTest + + protected T getService( Class interfaze, String serviceName ) { + T service = node.getService( interfaze, serviceName ); + return service; + } // end getService + + protected void startContribution() throws Exception { + // Tuscany specific code which starts the contribution holding the test + launcher = NodeLauncher.newInstance(); + node = launcher.createNode(testConfiguration.getComposite(), + new Contribution(testConfiguration.getTestName(), getContributionURI())); + System.out.println("SCA Node API ClassLoader: " + node.getClass().getClassLoader()); + node.start(); + } // end method startContribution + + protected void stopContribution() throws Exception { + if (node != null) { + node.stop(); + node.destroy(); + } + if (launcher != null) { + launcher.destroy(); + } + } // end method stopContribution + + protected String getContributionURI() { + String location = ContributionLocationHelper.getContributionLocation(testConfiguration.getTestClass()); + return location; + } + + protected TestConfiguration getTestConfiguration() { + TestConfiguration config = new TestConfiguration(); + config.testName = "ASM_0001"; + config.input = "request"; + config.output = config.testName + " " + config.input + " invoked ok"; + config.composite = "Test_ASM_0001.composite"; + config.testServiceName = "TestClient"; + config.testClass = ASM_0001_Client.class; + config.serviceInterface = TestInvocation.class; + return config; + } + +} // end class BaseTest diff --git a/java/sca/stest/sampleTest/src/test/java/client/BaseTest.java b/java/sca/stest/sampleTest/src/test/java/client/BaseTest.java new file mode 100644 index 0000000000..8c373beb61 --- /dev/null +++ b/java/sca/stest/sampleTest/src/test/java/client/BaseTest.java @@ -0,0 +1,122 @@ +/* + * 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 static org.junit.Assert.*; + +import org.apache.tuscany.sca.node.Node; +import org.apache.tuscany.sca.node.equinox.launcher.Contribution; +import org.apache.tuscany.sca.node.equinox.launcher.ContributionLocationHelper; +import org.apache.tuscany.sca.node.equinox.launcher.NodeLauncher; +import org.junit.After; +import org.junit.Before; +import org.junit.Test; +import org.osoa.sca.annotations.Reference; + +import test.ASM_0001_Client; +import test.TestInvocation; + +/** + * A generic test client based on Tuscany APIs + */ +public class BaseTest { + + protected NodeLauncher launcher; + protected Node node; + protected TestConfiguration testConfiguration = getTestConfiguration(); + + public static void main(String[] args) throws Exception { + BaseTest test = new BaseTest(); + test.setUp(); + test.tearDown(); + } + + @Before + public void setUp() throws Exception { + startContribution(); + } + + @After + public void tearDown() throws Exception { + stopContribution(); + } + + @Test + public void testDummy() throws Exception { + // System.out.println("Test " + testName + " starting"); + try { + String output = invokeTest( testConfiguration.getInput() ); + assertEquals( output, testConfiguration.getExpectedOutput() ); + } catch (Exception e) { + assertEquals( "exception", testConfiguration.getExpectedOutput() ); + System.out.println( "Expected exception - detail: " + e.getMessage() ); + } + System.out.println("Test " + testConfiguration.getTestName() + " completed successfully"); + } + + public String invokeTest( String input ) { + + TestInvocation service = (TestInvocation) getService( testConfiguration.getServiceInterface(), + testConfiguration.getTestServiceName() ); + + return service.invokeTest( input ); + } // end method invokeTest + + protected T getService( Class interfaze, String serviceName ) { + T service = node.getService( interfaze, serviceName ); + return service; + } // end getService + + protected void startContribution() throws Exception { + // Tuscany specific code which starts the contribution holding the test + launcher = NodeLauncher.newInstance(); + node = launcher.createNode(testConfiguration.getComposite(), + new Contribution(testConfiguration.getTestName(), getContributionURI())); + System.out.println("SCA Node API ClassLoader: " + node.getClass().getClassLoader()); + node.start(); + } // end method startContribution + + protected void stopContribution() throws Exception { + if (node != null) { + node.stop(); + node.destroy(); + } + if (launcher != null) { + launcher.destroy(); + } + } // end method stopContribution + + protected String getContributionURI() { + String location = ContributionLocationHelper.getContributionLocation(testConfiguration.getTestClass()); + return location; + } + + protected TestConfiguration getTestConfiguration() { + TestConfiguration config = new TestConfiguration(); + config.testName = "ASM_0001"; + config.input = "request"; + config.output = config.testName + " " + config.input + " invoked ok"; + config.composite = "Test_ASM_0001.composite"; + config.testServiceName = "TestClient"; + config.testClass = ASM_0001_Client.class; + config.serviceInterface = TestInvocation.class; + return config; + } + +} // end class BaseTest diff --git a/java/sca/stest/sampleTest/src/test/java/client/TestConfiguration.java b/java/sca/stest/sampleTest/src/test/java/client/TestConfiguration.java new file mode 100644 index 0000000000..43df1366df --- /dev/null +++ b/java/sca/stest/sampleTest/src/test/java/client/TestConfiguration.java @@ -0,0 +1,30 @@ +package client; + +import test.ASM_0001_Client; +import test.TestInvocation; + +/** + * A class to hold the metadata about the test + * @author MikeEdwards + * + */ +class TestConfiguration { + + public String testName; + public String input; + public String output; + public String composite; + public String testServiceName; + public Class testClass; //TODO - does the client need this?? + public Class serviceInterface; + + public TestConfiguration() { } + + public String getTestName() { return testName; } + public String getInput() { return input; } + public String getExpectedOutput() { return output; } + public String getComposite() { return composite; } + public String getTestServiceName() { return testServiceName; } + public Class getTestClass() { return testClass; } + public Class getServiceInterface() { return serviceInterface; } +} \ No newline at end of file diff --git a/java/sca/stest/sampleTest/src/test/java/client/Test_ASM_0002.java b/java/sca/stest/sampleTest/src/test/java/client/Test_ASM_0002.java new file mode 100644 index 0000000000..10c1b78608 --- /dev/null +++ b/java/sca/stest/sampleTest/src/test/java/client/Test_ASM_0002.java @@ -0,0 +1,43 @@ +/* + * 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 test.TestInvocation; + +/** + * A generic test client based on Tuscany APIs + */ +public class Test_ASM_0002 extends BaseTest { + + + protected TestConfiguration getTestConfiguration() { + TestConfiguration config = new TestConfiguration(); + config.testName = "ASM_0002"; + config.input = "request"; + config.output = config.testName + " " + config.input + " service1 operation1 invoked"; + config.composite = "Test_ASM_0002.composite"; + config.testServiceName = "TestClient"; + config.testClass = ASM_0002_Client.class; + config.serviceInterface = TestInvocation.class; + return config; + } + +} // end class Test_ASM_0002 diff --git a/java/sca/stest/sampleTest/src/test/java/client/Test_ASM_0003.java b/java/sca/stest/sampleTest/src/test/java/client/Test_ASM_0003.java new file mode 100644 index 0000000000..e68c2acbbb --- /dev/null +++ b/java/sca/stest/sampleTest/src/test/java/client/Test_ASM_0003.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_0003_Client; +import test.TestInvocation; + +/** + * A generic test client based on Tuscany APIs + */ +public class Test_ASM_0003 extends BaseTest { + + + protected TestConfiguration getTestConfiguration() { + TestConfiguration config = new TestConfiguration(); + config.testName = "ASM_0003"; + config.input = "request"; + config.output = config.testName + " " + config.input + " service1 operation1 invoked" + + "service2 operation1 invoked" + "service3 operation1 invoked"; + config.composite = "Test_ASM_0003.composite"; + config.testServiceName = "TestClient"; + config.testClass = ASM_0003_Client.class; + config.serviceInterface = TestInvocation.class; + return config; + } + +} // end class Test_ASM_0003 diff --git a/java/sca/stest/sampleTest/src/test/java/client/Test_ASM_0004.java b/java/sca/stest/sampleTest/src/test/java/client/Test_ASM_0004.java new file mode 100644 index 0000000000..78a9cac2ab --- /dev/null +++ b/java/sca/stest/sampleTest/src/test/java/client/Test_ASM_0004.java @@ -0,0 +1,43 @@ +/* + * 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 test.TestInvocation; + +/** + * A generic test client based on Tuscany APIs + */ +public class Test_ASM_0004 extends BaseTest { + + + protected TestConfiguration getTestConfiguration() { + TestConfiguration config = new TestConfiguration(); + config.testName = "ASM_0004"; + config.input = "request"; + config.output = "exception"; + config.composite = "Test_ASM_0004.composite"; + config.testServiceName = "TestClient"; + config.testClass = ASM_0002_Client.class; + config.serviceInterface = TestInvocation.class; + return config; + } + +} // end class Test_ASM_0003 -- cgit v1.2.3