Add 3 additional scenarios

git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@674100 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
nash 2008-07-04 17:27:55 +00:00
parent ba1633c629
commit 37f723b991
13 changed files with 239 additions and 4 deletions

View file

@ -19,6 +19,6 @@
-->
<contribution xmlns="http://www.osoa.org/xmlns/sca/1.0"
targetNamespace="http://scenario1"
xmlns:tns="http://scenario1">
<deployable composite="tns:CompositeA" />
xmlns:ns1="http://scenario1">
<deployable composite="ns1:CompositeA" />
</contribution>

View file

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
* 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.
-->
<contribution xmlns="http://www.osoa.org/xmlns/sca/1.0"
targetNamespace="http://scenario2"
xmlns:ns2="http://scenario2">
<deployable composite="ns2:CompositeA" />
</contribution>

View file

@ -0,0 +1,21 @@
<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
targetNamespace="http://scenario2"
xmlns:tns="http://scenario2"
name="CompositeA">
<service name="Service1" promote="ComponentB/Service2">
<!-- bindings and/or interfaces may or may not be specified explicitly here -->
</service>
<component name="ComponentB">
<implementation.composite name="tns:CompositeC" />
<service name="Service2">
<!-- bindings and/or interfaces may or may not be specified explicitly here -->
</service>
<service name="Service2a">
<!-- bindings and/or interfaces may or may not be specified explicitly here -->
</service>
</component>
</composite>

View file

@ -0,0 +1,25 @@
<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
targetNamespace="http://scenario2"
xmlns:tns="http://scenario2"
name="CompositeC">
<service name="Service2" promote="ComponentD/Service3">
<!-- bindings and/or interfaces may or may not be specified explicitly here -->
<binding.ws />
</service>
<service name="Service2a" promote="ComponentD/Service3a">
<!-- bindings and/or interfaces may or may not be specified explicitly here -->
</service>
<component name="ComponentD">
<implementation.java class="org.apache.tuscany.sca.itest.builder.ComponentDImpl"/>
<service name="Service3">
<!-- bindings and/or interfaces may or may not be specified explicitly here -->
</service>
<service name="Service3a">
<!-- bindings and/or interfaces may or may not be specified explicitly here -->
</service>
</component>
</composite>

View file

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
* 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.
-->
<contribution xmlns="http://www.osoa.org/xmlns/sca/1.0"
targetNamespace="http://scenario3"
xmlns:ns3="http://scenario3">
<deployable composite="ns3:CompositeA" />
</contribution>

View file

@ -0,0 +1,22 @@
<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
targetNamespace="http://scenario3"
xmlns:tns="http://scenario3"
name="CompositeA">
<service name="Service1" promote="ComponentB/Service2">
<!-- bindings and/or interfaces may or may not be specified explicitly here -->
</service>
<component name="ComponentB">
<implementation.composite name="tns:CompositeC" />
<service name="Service2">
<!-- bindings and/or interfaces may or may not be specified explicitly here -->
<binding.ws />
</service>
<service name="Service2a">
<!-- bindings and/or interfaces may or may not be specified explicitly here -->
</service>
</component>
</composite>

View file

@ -0,0 +1,24 @@
<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
targetNamespace="http://scenario3"
xmlns:tns="http://scenario3"
name="CompositeC">
<service name="Service2" promote="ComponentD/Service3">
<!-- bindings and/or interfaces may or may not be specified explicitly here -->
</service>
<service name="Service2a" promote="ComponentD/Service3a">
<!-- bindings and/or interfaces may or may not be specified explicitly here -->
</service>
<component name="ComponentD">
<implementation.java class="org.apache.tuscany.sca.itest.builder.ComponentDImpl"/>
<service name="Service3">
<!-- bindings and/or interfaces may or may not be specified explicitly here -->
</service>
<service name="Service3a">
<!-- bindings and/or interfaces may or may not be specified explicitly here -->
</service>
</component>
</composite>

View file

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
* 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.
-->
<contribution xmlns="http://www.osoa.org/xmlns/sca/1.0"
targetNamespace="http://scenario4"
xmlns:ns4="http://scenario4">
<deployable composite="ns4:CompositeA" />
</contribution>

View file

@ -0,0 +1,21 @@
<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
targetNamespace="http://scenario4"
xmlns:tns="http://scenario4"
name="CompositeA">
<service name="Service1" promote="ComponentB/Service2">
<!-- bindings and/or interfaces may or may not be specified explicitly here -->
</service>
<component name="ComponentB">
<implementation.composite name="tns:CompositeC" />
<service name="Service2">
<!-- bindings and/or interfaces may or may not be specified explicitly here -->
</service>
<service name="Service2a">
<!-- bindings and/or interfaces may or may not be specified explicitly here -->
</service>
</component>
</composite>

View file

@ -0,0 +1,25 @@
<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
targetNamespace="http://scenario4"
xmlns:tns="http://scenario4"
name="CompositeC">
<service name="Service2" promote="ComponentD/Service3">
<!-- bindings and/or interfaces may or may not be specified explicitly here -->
</service>
<service name="Service2a" promote="ComponentD/Service3a">
<!-- bindings and/or interfaces may or may not be specified explicitly here -->
</service>
<component name="ComponentD">
<implementation.java class="org.apache.tuscany.sca.itest.builder.ComponentDImpl"/>
<service name="Service3">
<!-- bindings and/or interfaces may or may not be specified explicitly here -->
<binding.ws />
</service>
<service name="Service3a">
<!-- bindings and/or interfaces may or may not be specified explicitly here -->
</service>
</component>
</composite>

View file

@ -58,9 +58,34 @@ public class BuilderTestCase extends TestCase {
}
public void testScenario1() throws Exception {
System.out.println("====>Running testScenario1");
customBuilder = new CustomCompositeBuilder();
customBuilder.loadContribution("src/main/resources/scenario1.composite",
"TestContribution", "src/main/resources/");
customBuilder.loadContribution("src/main/resources/scenario1/scenario1.composite",
"TestContribution", "src/main/resources/scenario1/");
printResults();
}
public void testScenario2() throws Exception {
System.out.println("====>Running testScenario2");
customBuilder = new CustomCompositeBuilder();
customBuilder.loadContribution("src/main/resources/scenario2/scenario2.composite",
"TestContribution", "src/main/resources/scenario2/");
printResults();
}
public void testScenario3() throws Exception {
System.out.println("====>Running testScenario3");
customBuilder = new CustomCompositeBuilder();
customBuilder.loadContribution("src/main/resources/scenario3/scenario3.composite",
"TestContribution", "src/main/resources/scenario3/");
printResults();
}
public void testScenario4() throws Exception {
System.out.println("====>Running testScenario4");
customBuilder = new CustomCompositeBuilder();
customBuilder.loadContribution("src/main/resources/scenario4/scenario4.composite",
"TestContribution", "src/main/resources/scenario4/");
printResults();
}