From 6d463f91ecc078ddf5b674c76881182d1ebd991c Mon Sep 17 00:00:00 2001 From: nash Date: Thu, 24 Jul 2008 12:23:19 +0000 Subject: Renumber scenarios and update CompositeBuilderImplNonWiring git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@679385 13f79535-47bb-0310-9956-ffa450edef68 --- .../main/resources/scenario10/scenario10.composite | 6 +++- .../resources/scenario10/scenario10a.composite | 4 --- .../main/resources/scenario11/scenario11.composite | 3 +- .../resources/scenario11/scenario11a.composite | 7 +++-- .../main/resources/scenario12/scenario12.composite | 3 +- .../resources/scenario12/scenario12a.composite | 3 ++ .../main/resources/scenario9/scenario9.composite | 4 ++- .../main/resources/scenario9/scenario9a.composite | 3 -- .../tuscany/sca/itest/builder/BuilderTestCase.java | 32 ++++++++-------------- .../builder/CompositeBuilderNonWiringImpl.java | 8 +++--- 10 files changed, 33 insertions(+), 40 deletions(-) (limited to 'branches/sca-java-1.3/itest/builder') diff --git a/branches/sca-java-1.3/itest/builder/src/main/resources/scenario10/scenario10.composite b/branches/sca-java-1.3/itest/builder/src/main/resources/scenario10/scenario10.composite index ad1c6aa4c1..2d127a7bec 100644 --- a/branches/sca-java-1.3/itest/builder/src/main/resources/scenario10/scenario10.composite +++ b/branches/sca-java-1.3/itest/builder/src/main/resources/scenario10/scenario10.composite @@ -39,12 +39,16 @@ + - + + + + diff --git a/branches/sca-java-1.3/itest/builder/src/main/resources/scenario10/scenario10a.composite b/branches/sca-java-1.3/itest/builder/src/main/resources/scenario10/scenario10a.composite index b4e9c61ef5..98103e360e 100644 --- a/branches/sca-java-1.3/itest/builder/src/main/resources/scenario10/scenario10a.composite +++ b/branches/sca-java-1.3/itest/builder/src/main/resources/scenario10/scenario10a.composite @@ -33,8 +33,6 @@ - - @@ -44,11 +42,9 @@ - - diff --git a/branches/sca-java-1.3/itest/builder/src/main/resources/scenario11/scenario11.composite b/branches/sca-java-1.3/itest/builder/src/main/resources/scenario11/scenario11.composite index 776345062b..2f5ca96d07 100644 --- a/branches/sca-java-1.3/itest/builder/src/main/resources/scenario11/scenario11.composite +++ b/branches/sca-java-1.3/itest/builder/src/main/resources/scenario11/scenario11.composite @@ -39,14 +39,13 @@ + - - diff --git a/branches/sca-java-1.3/itest/builder/src/main/resources/scenario11/scenario11a.composite b/branches/sca-java-1.3/itest/builder/src/main/resources/scenario11/scenario11a.composite index 5811e80735..381ccddcc3 100644 --- a/branches/sca-java-1.3/itest/builder/src/main/resources/scenario11/scenario11a.composite +++ b/branches/sca-java-1.3/itest/builder/src/main/resources/scenario11/scenario11a.composite @@ -28,11 +28,14 @@ - + + + + @@ -42,11 +45,9 @@ - - diff --git a/branches/sca-java-1.3/itest/builder/src/main/resources/scenario12/scenario12.composite b/branches/sca-java-1.3/itest/builder/src/main/resources/scenario12/scenario12.composite index cc2ea5b0e2..23799f8487 100644 --- a/branches/sca-java-1.3/itest/builder/src/main/resources/scenario12/scenario12.composite +++ b/branches/sca-java-1.3/itest/builder/src/main/resources/scenario12/scenario12.composite @@ -30,7 +30,6 @@ - @@ -44,7 +43,7 @@ - + diff --git a/branches/sca-java-1.3/itest/builder/src/main/resources/scenario12/scenario12a.composite b/branches/sca-java-1.3/itest/builder/src/main/resources/scenario12/scenario12a.composite index 54eee7d657..a2b4f88dc3 100644 --- a/branches/sca-java-1.3/itest/builder/src/main/resources/scenario12/scenario12a.composite +++ b/branches/sca-java-1.3/itest/builder/src/main/resources/scenario12/scenario12a.composite @@ -42,12 +42,15 @@ + + + diff --git a/branches/sca-java-1.3/itest/builder/src/main/resources/scenario9/scenario9.composite b/branches/sca-java-1.3/itest/builder/src/main/resources/scenario9/scenario9.composite index dae3b3deb6..83584ed482 100644 --- a/branches/sca-java-1.3/itest/builder/src/main/resources/scenario9/scenario9.composite +++ b/branches/sca-java-1.3/itest/builder/src/main/resources/scenario9/scenario9.composite @@ -27,9 +27,11 @@ + + @@ -43,7 +45,7 @@ - + diff --git a/branches/sca-java-1.3/itest/builder/src/main/resources/scenario9/scenario9a.composite b/branches/sca-java-1.3/itest/builder/src/main/resources/scenario9/scenario9a.composite index b521bbe01d..0021ec242b 100644 --- a/branches/sca-java-1.3/itest/builder/src/main/resources/scenario9/scenario9a.composite +++ b/branches/sca-java-1.3/itest/builder/src/main/resources/scenario9/scenario9a.composite @@ -42,15 +42,12 @@ - - - diff --git a/branches/sca-java-1.3/itest/builder/src/test/java/org/apache/tuscany/sca/itest/builder/BuilderTestCase.java b/branches/sca-java-1.3/itest/builder/src/test/java/org/apache/tuscany/sca/itest/builder/BuilderTestCase.java index f3ffd44cdb..5f16bc0bea 100644 --- a/branches/sca-java-1.3/itest/builder/src/test/java/org/apache/tuscany/sca/itest/builder/BuilderTestCase.java +++ b/branches/sca-java-1.3/itest/builder/src/test/java/org/apache/tuscany/sca/itest/builder/BuilderTestCase.java @@ -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 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 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 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 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 { diff --git a/branches/sca-java-1.3/itest/builder/src/test/java/org/apache/tuscany/sca/itest/builder/CompositeBuilderNonWiringImpl.java b/branches/sca-java-1.3/itest/builder/src/test/java/org/apache/tuscany/sca/itest/builder/CompositeBuilderNonWiringImpl.java index 05b5596076..6ec2ea849e 100644 --- a/branches/sca-java-1.3/itest/builder/src/test/java/org/apache/tuscany/sca/itest/builder/CompositeBuilderNonWiringImpl.java +++ b/branches/sca-java-1.3/itest/builder/src/test/java/org/apache/tuscany/sca/itest/builder/CompositeBuilderNonWiringImpl.java @@ -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); -- cgit v1.2.3