Renumber scenarios and update CompositeBuilderImplNonWiring
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@679385 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
6acbfc42b0
commit
6d463f91ec
10 changed files with 33 additions and 40 deletions
|
@ -39,12 +39,16 @@
|
|||
</service>
|
||||
<service name="Service2a">
|
||||
<!-- bindings and/or interfaces may or may not be specified explicitly here -->
|
||||
<binding.ws uri="http://foo.com/bar" />
|
||||
</service>
|
||||
<reference name="reference2">
|
||||
<reference name="reference2" target="ComponentB/Service2a">
|
||||
<!-- bindings and/or interfaces may or may not be specified explicitly here -->
|
||||
<binding.ws />
|
||||
</reference>
|
||||
<reference name="reference2a" target="ComponentF">
|
||||
<!-- bindings and/or interfaces may or may not be specified explicitly here -->
|
||||
<interface.wsdl interface="http://scenarios#wsdl.interface(Service3)" />
|
||||
<binding.ws />
|
||||
</reference>
|
||||
</component>
|
||||
|
||||
|
|
|
@ -33,8 +33,6 @@
|
|||
</reference>
|
||||
<reference name="reference2a" promote="ComponentD/reference3a">
|
||||
<!-- bindings and/or interfaces may or may not be specified explicitly here -->
|
||||
<interface.wsdl interface="http://scenarios#wsdl.interface(Service3)" />
|
||||
<binding.ws />
|
||||
</reference>
|
||||
|
||||
<component name="ComponentD">
|
||||
|
@ -44,11 +42,9 @@
|
|||
</service>
|
||||
<service name="Service3a">
|
||||
<!-- bindings and/or interfaces may or may not be specified explicitly here -->
|
||||
<binding.ws uri="http://foo.com/bar" />
|
||||
</service>
|
||||
<reference name="reference3" target="ComponentD/Service3a">
|
||||
<!-- bindings and/or interfaces may or may not be specified explicitly here -->
|
||||
<binding.ws/>
|
||||
</reference>
|
||||
<reference name="reference3a" target="ComponentE">
|
||||
<!-- bindings and/or interfaces may or may not be specified explicitly here -->
|
||||
|
|
|
@ -39,14 +39,13 @@
|
|||
</service>
|
||||
<service name="Service2a">
|
||||
<!-- bindings and/or interfaces may or may not be specified explicitly here -->
|
||||
<binding.ws uri="http://foo.com/bar" />
|
||||
</service>
|
||||
<reference name="reference2">
|
||||
<!-- bindings and/or interfaces may or may not be specified explicitly here -->
|
||||
</reference>
|
||||
<reference name="reference2a" target="ComponentF">
|
||||
<!-- bindings and/or interfaces may or may not be specified explicitly here -->
|
||||
<interface.wsdl interface="http://scenarios#wsdl.interface(Service3)" />
|
||||
<binding.ws />
|
||||
</reference>
|
||||
</component>
|
||||
|
||||
|
|
|
@ -28,11 +28,14 @@
|
|||
<service name="Service2a" promote="ComponentD/Service3a">
|
||||
<!-- bindings and/or interfaces may or may not be specified explicitly here -->
|
||||
</service>
|
||||
<reference name="reference2" promote="ComponentD/reference3">
|
||||
<reference name="reference2" promote="ComponentD/reference3" target="ComponentB/Service2a">
|
||||
<!-- bindings and/or interfaces may or may not be specified explicitly here -->
|
||||
<binding.ws />
|
||||
</reference>
|
||||
<reference name="reference2a" promote="ComponentD/reference3a">
|
||||
<!-- bindings and/or interfaces may or may not be specified explicitly here -->
|
||||
<interface.wsdl interface="http://scenarios#wsdl.interface(Service3)" />
|
||||
<binding.ws />
|
||||
</reference>
|
||||
|
||||
<component name="ComponentD">
|
||||
|
@ -42,11 +45,9 @@
|
|||
</service>
|
||||
<service name="Service3a">
|
||||
<!-- bindings and/or interfaces may or may not be specified explicitly here -->
|
||||
<binding.ws uri="http://foo.com/bar" />
|
||||
</service>
|
||||
<reference name="reference3" target="ComponentD/Service3a">
|
||||
<!-- bindings and/or interfaces may or may not be specified explicitly here -->
|
||||
<binding.ws/>
|
||||
</reference>
|
||||
<reference name="reference3a" target="ComponentE">
|
||||
<!-- bindings and/or interfaces may or may not be specified explicitly here -->
|
||||
|
|
|
@ -30,7 +30,6 @@
|
|||
</reference>
|
||||
<reference name="reference1a" promote="ComponentB/reference2a">
|
||||
<!-- bindings and/or interfaces may or may not be specified explicitly here -->
|
||||
<binding.ws uri="http://foo.com/bar"/>
|
||||
</reference>
|
||||
|
||||
<component name="ComponentB">
|
||||
|
@ -44,7 +43,7 @@
|
|||
<reference name="reference2">
|
||||
<!-- bindings and/or interfaces may or may not be specified explicitly here -->
|
||||
</reference>
|
||||
<reference name="reference2a">
|
||||
<reference name="reference2a" target="ComponentF">
|
||||
<!-- bindings and/or interfaces may or may not be specified explicitly here -->
|
||||
</reference>
|
||||
</component>
|
||||
|
|
|
@ -42,12 +42,15 @@
|
|||
</service>
|
||||
<service name="Service3a">
|
||||
<!-- bindings and/or interfaces may or may not be specified explicitly here -->
|
||||
<binding.ws uri="http://foo.com/bar" />
|
||||
</service>
|
||||
<reference name="reference3" target="ComponentD/Service3a">
|
||||
<!-- bindings and/or interfaces may or may not be specified explicitly here -->
|
||||
<binding.ws/>
|
||||
</reference>
|
||||
<reference name="reference3a" target="ComponentE">
|
||||
<!-- bindings and/or interfaces may or may not be specified explicitly here -->
|
||||
<binding.ws />
|
||||
</reference>
|
||||
</component>
|
||||
|
||||
|
|
|
@ -27,9 +27,11 @@
|
|||
</service>
|
||||
<reference name="reference1" promote="ComponentB/reference2">
|
||||
<!-- bindings and/or interfaces may or may not be specified explicitly here -->
|
||||
<binding.ws uri="http://foo.com/bar"/>
|
||||
</reference>
|
||||
<reference name="reference1a" promote="ComponentB/reference2a">
|
||||
<!-- bindings and/or interfaces may or may not be specified explicitly here -->
|
||||
<binding.ws uri="http://foo.com/bar"/>
|
||||
</reference>
|
||||
|
||||
<component name="ComponentB">
|
||||
|
@ -43,7 +45,7 @@
|
|||
<reference name="reference2">
|
||||
<!-- bindings and/or interfaces may or may not be specified explicitly here -->
|
||||
</reference>
|
||||
<reference name="reference2a" target="ComponentF">
|
||||
<reference name="reference2a">
|
||||
<!-- bindings and/or interfaces may or may not be specified explicitly here -->
|
||||
</reference>
|
||||
</component>
|
||||
|
|
|
@ -42,15 +42,12 @@
|
|||
</service>
|
||||
<service name="Service3a">
|
||||
<!-- bindings and/or interfaces may or may not be specified explicitly here -->
|
||||
<binding.ws uri="http://foo.com/bar" />
|
||||
</service>
|
||||
<reference name="reference3" target="ComponentD/Service3a">
|
||||
<!-- bindings and/or interfaces may or may not be specified explicitly here -->
|
||||
<binding.ws/>
|
||||
</reference>
|
||||
<reference name="reference3a" target="ComponentE">
|
||||
<!-- bindings and/or interfaces may or may not be specified explicitly here -->
|
||||
<binding.ws />
|
||||
</reference>
|
||||
</component>
|
||||
|
||||
|
|
|
@ -167,9 +167,7 @@ public class BuilderTestCase extends TestCase {
|
|||
assert "/ComponentB/Service2".equals(TestUtils.getPortAddress(port));
|
||||
|
||||
Component componentD = TestUtils.getComponent(domainComposite, "ComponentD");
|
||||
/*
|
||||
if (!nonWiring) {
|
||||
*/
|
||||
// Should create component service $promoted$.ComponentB.Service2 on innermost component
|
||||
// ComponentD, with <binding.ws> and uri="/ComponentB/Service2"
|
||||
wsBinding = null;
|
||||
|
@ -185,14 +183,12 @@ public class BuilderTestCase extends TestCase {
|
|||
svc = def.getService(new QName("http://builder.itest.sca.tuscany.apache.org/", "Service3Service"));
|
||||
port = svc.getPort("Service3Port");
|
||||
assert "/ComponentB/Service2".equals(TestUtils.getPortAddress(port));
|
||||
/*
|
||||
} else {
|
||||
// Should not create component service $promoted$.ComponentB.Service2 on innermost component ComponentD
|
||||
for (ComponentService service : componentD.getServices()) {
|
||||
assert !"$promoted$.ComponentB.Service2".equals(service.getName());
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
// Should add <binding.ws> to outer composite service CompositeA/Service1
|
||||
wsBinding = null;
|
||||
|
@ -337,9 +333,7 @@ public class BuilderTestCase extends TestCase {
|
|||
port = svc.getPort("Service3Port");
|
||||
assert "/ComponentB/Service2".equals(TestUtils.getPortAddress(port));
|
||||
|
||||
/*
|
||||
if (!nonWiring) {
|
||||
*/
|
||||
// Should create component service $promoted$.ComponentB.Service2 on innermost component
|
||||
// ComponentD, with <binding.ws> and uri="/ComponentB/Service2"
|
||||
wsBinding = null;
|
||||
|
@ -355,14 +349,12 @@ public class BuilderTestCase extends TestCase {
|
|||
svc = def.getService(new QName("http://builder.itest.sca.tuscany.apache.org/", "Service3Service"));
|
||||
port = svc.getPort("Service3Port");
|
||||
assert "/ComponentB/Service2".equals(TestUtils.getPortAddress(port));
|
||||
/*
|
||||
} else {
|
||||
// Should not create component service $promoted$.ComponentB.Service2 on innermost component ComponentD
|
||||
for (ComponentService service : componentD.getServices()) {
|
||||
assert !"$promoted$.ComponentB.Service2".equals(service.getName());
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
// Should add <binding.ws> to outer composite service CompositeA/Service1
|
||||
wsBinding = null;
|
||||
|
@ -693,7 +685,7 @@ public class BuilderTestCase extends TestCase {
|
|||
assert wsBinding.getWSDLDocument() == null;
|
||||
}
|
||||
|
||||
// Scenario 9: targets in references CBR2A and CDR3A and binding.ws at CDR3A
|
||||
// Scenario 9: target in reference CDR3A and binding.ws uri= at CAR1A
|
||||
public void testScenario9() throws Exception {
|
||||
System.out.println("====>Running testScenario9");
|
||||
customBuilder = new CustomCompositeBuilder(false);
|
||||
|
@ -701,7 +693,7 @@ public class BuilderTestCase extends TestCase {
|
|||
//TestUtils.printResults(customBuilder);
|
||||
TestUtils.checkProblems(customBuilder);
|
||||
checkScenario9Results();
|
||||
}
|
||||
}
|
||||
|
||||
private void checkScenario9Results() {
|
||||
Composite domainComposite = customBuilder.getDomainComposite();
|
||||
|
@ -712,14 +704,14 @@ public class BuilderTestCase extends TestCase {
|
|||
if ("reference3a".equals(reference.getName())) {
|
||||
componentRef = reference;
|
||||
assertTrue(reference.getBindings().size() == 2);
|
||||
assertTrue(reference.getBindings().get(0) instanceof WebServiceBinding);
|
||||
assertTrue(reference.getBindings().get(0) instanceof SCABinding);
|
||||
assertTrue(reference.getBindings().get(1) instanceof WebServiceBinding);
|
||||
}
|
||||
}
|
||||
assertTrue(componentRef != null);
|
||||
}
|
||||
}
|
||||
|
||||
// Scenario 10: targets in references CBR2A and CDR3A and binding.ws at CCR2A
|
||||
// Scenario 10: targets in references CBR2A and CDR3A and binding.ws at CBR2A
|
||||
public void testScenario10() throws Exception {
|
||||
System.out.println("====>Running testScenario10");
|
||||
customBuilder = new CustomCompositeBuilder(false);
|
||||
|
@ -727,9 +719,9 @@ public class BuilderTestCase extends TestCase {
|
|||
//TestUtils.printResults(customBuilder);
|
||||
TestUtils.checkProblems(customBuilder);
|
||||
checkScenario10And11Results();
|
||||
}
|
||||
}
|
||||
|
||||
// Scenario 11: targets in references CBR2A and CDR3A and binding.ws at CBR2A
|
||||
// Scenario 11: targets in references CBR2A and CDR3A and binding.ws at CCR2A
|
||||
public void testScenario11() throws Exception {
|
||||
System.out.println("====>Running testScenario11");
|
||||
customBuilder = new CustomCompositeBuilder(false);
|
||||
|
@ -737,7 +729,7 @@ public class BuilderTestCase extends TestCase {
|
|||
//TestUtils.printResults(customBuilder);
|
||||
TestUtils.checkProblems(customBuilder);
|
||||
checkScenario10And11Results();
|
||||
}
|
||||
}
|
||||
|
||||
private void checkScenario10And11Results() {
|
||||
Composite domainComposite = customBuilder.getDomainComposite();
|
||||
|
@ -759,7 +751,7 @@ public class BuilderTestCase extends TestCase {
|
|||
assertTrue(componentRef != null);
|
||||
}
|
||||
|
||||
// Scenario 12: target in reference CDR3A and binding.ws uri= at CAR1A
|
||||
// Scenario 12: targets in references CBR2A and CDR3A and binding.ws at CDR3A
|
||||
public void testScenario12() throws Exception {
|
||||
System.out.println("====>Running testScenario12");
|
||||
customBuilder = new CustomCompositeBuilder(false);
|
||||
|
@ -767,7 +759,7 @@ public class BuilderTestCase extends TestCase {
|
|||
//TestUtils.printResults(customBuilder);
|
||||
TestUtils.checkProblems(customBuilder);
|
||||
checkScenario12Results();
|
||||
}
|
||||
}
|
||||
|
||||
private void checkScenario12Results() {
|
||||
Composite domainComposite = customBuilder.getDomainComposite();
|
||||
|
@ -778,12 +770,12 @@ public class BuilderTestCase extends TestCase {
|
|||
if ("reference3a".equals(reference.getName())) {
|
||||
componentRef = reference;
|
||||
assertTrue(reference.getBindings().size() == 2);
|
||||
assertTrue(reference.getBindings().get(0) instanceof SCABinding);
|
||||
assertTrue(reference.getBindings().get(0) instanceof WebServiceBinding);
|
||||
assertTrue(reference.getBindings().get(1) instanceof WebServiceBinding);
|
||||
}
|
||||
}
|
||||
assertTrue(componentRef != null);
|
||||
}
|
||||
}
|
||||
|
||||
// Scenario 13: target in reference CDR3A
|
||||
public void testScenario13() throws Exception {
|
||||
|
|
|
@ -106,14 +106,14 @@ public class CompositeBuilderNonWiringImpl implements CompositeBuilder {
|
|||
|
||||
compositeIncludeBuilder = new org.apache.tuscany.sca.assembly.builder.impl.CompositeIncludeBuilderImpl(monitor);
|
||||
//componentReferenceWireBuilder = new org.apache.tuscany.sca.assembly.builder.impl.ComponentReferenceWireBuilderImpl(assemblyFactory, endpointFactory, interfaceContractMapper, monitor);
|
||||
//componentReferencePromotionWireBuilder = new org.apache.tuscany.sca.assembly.builder.impl.ComponentReferencePromotionWireBuilderImpl(assemblyFactory, monitor);
|
||||
//compositeReferenceWireBuilder = new org.apache.tuscany.sca.assembly.builder.impl.CompositeReferenceWireBuilderImpl(assemblyFactory, monitor);
|
||||
//componentReferencePromotionWireBuilder = new org.apache.tuscany.sca.assembly.builder.impl.ComponentReferencePromotionWireBuilderImpl(assemblyFactory, endpointFactory, monitor);
|
||||
//compositeReferenceWireBuilder = new org.apache.tuscany.sca.assembly.builder.impl.CompositeReferenceWireBuilderImpl(assemblyFactory, endpointFactory, monitor);
|
||||
compositeCloneBuilder = new org.apache.tuscany.sca.assembly.builder.impl.CompositeCloneBuilderImpl(monitor);
|
||||
componentConfigurationBuilder = new org.apache.tuscany.sca.assembly.builder.impl.ComponentConfigurationBuilderImpl(assemblyFactory, scaBindingFactory, interfaceContractMapper, policyDefinitions, monitor);
|
||||
compositeServiceConfigurationBuilder = new org.apache.tuscany.sca.assembly.builder.impl.CompositeServiceConfigurationBuilderImpl(assemblyFactory);
|
||||
compositeReferenceConfigurationBuilder = new org.apache.tuscany.sca.assembly.builder.impl.CompositeReferenceConfigurationBuilderImpl(assemblyFactory);
|
||||
compositeBindingURIBuilder = new org.apache.tuscany.sca.assembly.builder.impl.CompositeBindingURIBuilderImpl(assemblyFactory, scaBindingFactory, interfaceContractMapper, policyDefinitions, monitor);
|
||||
componentServicePromotionBuilder = new org.apache.tuscany.sca.assembly.builder.impl.ComponentServicePromotionBuilderImpl(assemblyFactory);
|
||||
//componentServicePromotionBuilder = new org.apache.tuscany.sca.assembly.builder.impl.ComponentServicePromotionBuilderImpl(assemblyFactory);
|
||||
//compositeServicePromotionBuilder = new org.apache.tuscany.sca.assembly.builder.impl.CompositeServicePromotionBuilderImpl(assemblyFactory);
|
||||
compositePromotionBuilder = new org.apache.tuscany.sca.assembly.builder.impl.CompositePromotionBuilderImpl(assemblyFactory, endpointFactory, interfaceContractMapper, monitor);
|
||||
compositePolicyBuilder = new org.apache.tuscany.sca.assembly.builder.impl.CompositePolicyBuilderImpl(assemblyFactory, endpointFactory, interfaceContractMapper, monitor);
|
||||
|
@ -148,7 +148,7 @@ public class CompositeBuilderNonWiringImpl implements CompositeBuilder {
|
|||
compositeBindingURIBuilder.build(composite);
|
||||
|
||||
// Create promoted component services
|
||||
componentServicePromotionBuilder.build(composite);
|
||||
// componentServicePromotionBuilder.build(composite);
|
||||
|
||||
// Create promoted composite services
|
||||
// compositeServicePromotionBuilder.build(composite);
|
||||
|
|
Loading…
Add table
Reference in a new issue