diff options
Diffstat (limited to 'branches/sca-equinox/modules/implementation-node/src/test')
2 files changed, 27 insertions, 24 deletions
diff --git a/branches/sca-equinox/modules/implementation-node/src/test/java/org/apache/tuscany/sca/implementation/node/builder/impl/CalculateBindingURITestCase.java b/branches/sca-equinox/modules/implementation-node/src/test/java/org/apache/tuscany/sca/implementation/node/builder/impl/CalculateBindingURITestCase.java index 74648701c6..68dbfaa406 100644 --- a/branches/sca-equinox/modules/implementation-node/src/test/java/org/apache/tuscany/sca/implementation/node/builder/impl/CalculateBindingURITestCase.java +++ b/branches/sca-equinox/modules/implementation-node/src/test/java/org/apache/tuscany/sca/implementation/node/builder/impl/CalculateBindingURITestCase.java @@ -37,6 +37,7 @@ import org.apache.tuscany.sca.assembly.DefaultAssemblyFactory; import org.apache.tuscany.sca.assembly.SCABinding; import org.apache.tuscany.sca.assembly.SCABindingFactory; import org.apache.tuscany.sca.assembly.builder.CompositeBuilder; +import org.apache.tuscany.sca.assembly.builder.impl.CompositeBindingConfigurationBuilderImpl; import org.apache.tuscany.sca.implementation.node.NodeImplementation; import org.apache.tuscany.sca.implementation.node.NodeImplementationFactory; import org.apache.tuscany.sca.implementation.node.impl.NodeImplementationFactoryImpl; @@ -52,7 +53,8 @@ public class CalculateBindingURITestCase extends TestCase { private SCABindingFactory scaBindingFactory; private NodeImplementationFactory nodeImplementationFactory; private Monitor monitor; - private CompositeBuilder configurationBuilder; + private CompositeBuilder bindingConfigurationBuilder; + private CompositeBuilder nodeConfigurationBuilder; private List<Binding> defaultBindings = new ArrayList<Binding>(); @Override @@ -60,7 +62,8 @@ public class CalculateBindingURITestCase extends TestCase { assemblyFactory = new DefaultAssemblyFactory(); scaBindingFactory = new TestBindingFactory(); nodeImplementationFactory = new NodeImplementationFactoryImpl(); - configurationBuilder = new NodeCompositeBuilderImpl(assemblyFactory, scaBindingFactory, null, null, monitor); + bindingConfigurationBuilder = new CompositeBindingConfigurationBuilderImpl(assemblyFactory, scaBindingFactory, null); + nodeConfigurationBuilder = new NodeCompositeBuilderImpl(assemblyFactory, scaBindingFactory, null, bindingConfigurationBuilder); Binding defaultBinding = new TestBindingImpl(); defaultBinding.setURI("http://myhost:8080/root"); defaultBindings.add(defaultBinding); @@ -238,7 +241,7 @@ public class CalculateBindingURITestCase extends TestCase { Binding b = composite.getComponents().get(0).getServices().get(0).getBindings().get(0); try { - configurationBuilder.build(nodeComposite(composite)); + nodeConfigurationBuilder.build(nodeComposite(composite), null, null); assertEquals("http://myhost:8080/root/c1", b.getURI()); } catch(Exception ex){ @@ -252,7 +255,7 @@ public class CalculateBindingURITestCase extends TestCase { Binding b = composite.getComponents().get(0).getServices().get(0).getBindings().get(0); try { - configurationBuilder.build(nodeComposite(composite)); + nodeConfigurationBuilder.build(nodeComposite(composite), null, null); assertEquals("http://myhost:8080/root/c1/s1", b.getURI()); } catch(Exception ex){ @@ -267,7 +270,7 @@ public class CalculateBindingURITestCase extends TestCase { b.setName("n"); try { - configurationBuilder.build(nodeComposite(composite)); + nodeConfigurationBuilder.build(nodeComposite(composite), null, null); assertEquals("http://myhost:8080/root/c1/n", b.getURI()); } catch(Exception ex){ @@ -283,7 +286,7 @@ public class CalculateBindingURITestCase extends TestCase { b.setURI("b"); try { - configurationBuilder.build(nodeComposite(composite)); + nodeConfigurationBuilder.build(nodeComposite(composite), null, null); assertEquals("http://myhost:8080/root/c1/b", b.getURI()); } catch(Exception ex){ @@ -299,7 +302,7 @@ public class CalculateBindingURITestCase extends TestCase { b.setURI("http://myhost:8080/b"); try { - configurationBuilder.build(nodeComposite(composite)); + nodeConfigurationBuilder.build(nodeComposite(composite), null, null); assertEquals("http://myhost:8080/b", b.getURI()); } catch(Exception ex){ @@ -315,7 +318,7 @@ public class CalculateBindingURITestCase extends TestCase { b.setURI("../../b"); try { - configurationBuilder.build(nodeComposite(composite)); + nodeConfigurationBuilder.build(nodeComposite(composite), null, null); assertEquals("http://myhost:8080/b", b.getURI()); } catch(Exception ex){ @@ -332,7 +335,7 @@ public class CalculateBindingURITestCase extends TestCase { Binding b = composite.getServices().get(0).getBindings().get(0); try { - configurationBuilder.build(nodeComposite(composite)); + nodeConfigurationBuilder.build(nodeComposite(composite), null, null); assertEquals("http://myhost:8080/root", b.getURI()); } catch(Exception ex){ @@ -346,7 +349,7 @@ public class CalculateBindingURITestCase extends TestCase { Binding b = composite.getServices().get(0).getBindings().get(0); try { - configurationBuilder.build(nodeComposite(composite)); + nodeConfigurationBuilder.build(nodeComposite(composite), null, null); assertEquals("http://myhost:8080/root/s1", b.getURI()); } catch(Exception ex){ @@ -361,7 +364,7 @@ public class CalculateBindingURITestCase extends TestCase { b.setName("n"); try { - configurationBuilder.build(nodeComposite(composite)); + nodeConfigurationBuilder.build(nodeComposite(composite), null, null); assertEquals("http://myhost:8080/root/n", b.getURI()); } catch(Exception ex){ @@ -377,7 +380,7 @@ public class CalculateBindingURITestCase extends TestCase { b.setURI("b"); try { - configurationBuilder.build(nodeComposite(composite)); + nodeConfigurationBuilder.build(nodeComposite(composite), null, null); assertEquals("http://myhost:8080/root/b", b.getURI()); } catch(Exception ex){ @@ -393,7 +396,7 @@ public class CalculateBindingURITestCase extends TestCase { b.setURI("http://myhost:8080/b"); try { - configurationBuilder.build(nodeComposite(composite)); + nodeConfigurationBuilder.build(nodeComposite(composite), null, null); assertEquals("http://myhost:8080/b", b.getURI()); } catch(Exception ex){ @@ -410,7 +413,7 @@ public class CalculateBindingURITestCase extends TestCase { Binding b = ((Composite)composite.getComponents().get(0).getImplementation()).getComponents().get(0).getServices().get(0).getBindings().get(0); try { - configurationBuilder.build(nodeComposite(composite)); + nodeConfigurationBuilder.build(nodeComposite(composite), null, null); assertEquals("http://myhost:8080/root/c1/c2", b.getURI()); } catch(Exception ex){ @@ -424,7 +427,7 @@ public class CalculateBindingURITestCase extends TestCase { Binding b = ((Composite)composite.getComponents().get(0).getImplementation()).getComponents().get(0).getServices().get(0).getBindings().get(0); try { - configurationBuilder.build(nodeComposite(composite)); + nodeConfigurationBuilder.build(nodeComposite(composite), null, null); assertEquals("http://myhost:8080/root/c1/c2/s1", b.getURI()); } catch(Exception ex){ @@ -439,7 +442,7 @@ public class CalculateBindingURITestCase extends TestCase { b.setName("n"); try { - configurationBuilder.build(nodeComposite(composite)); + nodeConfigurationBuilder.build(nodeComposite(composite), null, null); assertEquals("http://myhost:8080/root/c1/c2/n", b.getURI()); } catch(Exception ex){ @@ -455,7 +458,7 @@ public class CalculateBindingURITestCase extends TestCase { b.setURI("b"); try { - configurationBuilder.build(nodeComposite(composite)); + nodeConfigurationBuilder.build(nodeComposite(composite), null, null); assertEquals("http://myhost:8080/root/c1/c2/b", b.getURI()); } catch(Exception ex){ @@ -471,7 +474,7 @@ public class CalculateBindingURITestCase extends TestCase { b.setURI("http://myhost:8080/b"); try { - configurationBuilder.build(nodeComposite(composite)); + nodeConfigurationBuilder.build(nodeComposite(composite), null, null); assertEquals("http://myhost:8080/b", b.getURI()); } catch(Exception ex){ @@ -493,7 +496,7 @@ public class CalculateBindingURITestCase extends TestCase { try { - configurationBuilder.build(nodeComposite(composite)); + nodeConfigurationBuilder.build(nodeComposite(composite), null, null); fail(); } catch(Exception ex){ //System.out.println(ex.toString()); @@ -514,7 +517,7 @@ public class CalculateBindingURITestCase extends TestCase { try { - configurationBuilder.build(nodeComposite(composite)); + nodeConfigurationBuilder.build(nodeComposite(composite), null, null); fail(); } catch(Exception ex){ System.out.println(ex.toString()); diff --git a/branches/sca-equinox/modules/implementation-node/src/test/java/org/apache/tuscany/sca/implementation/node/xml/ReadTestCase.java b/branches/sca-equinox/modules/implementation-node/src/test/java/org/apache/tuscany/sca/implementation/node/xml/ReadTestCase.java index 6c08bbed0f..4033f9225c 100644 --- a/branches/sca-equinox/modules/implementation-node/src/test/java/org/apache/tuscany/sca/implementation/node/xml/ReadTestCase.java +++ b/branches/sca-equinox/modules/implementation-node/src/test/java/org/apache/tuscany/sca/implementation/node/xml/ReadTestCase.java @@ -31,12 +31,12 @@ import org.apache.tuscany.sca.assembly.Composite; import org.apache.tuscany.sca.assembly.SCABindingFactory; import org.apache.tuscany.sca.assembly.builder.CompositeBuilder; import org.apache.tuscany.sca.assembly.builder.impl.CompositeBuilderImpl; -import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint; import org.apache.tuscany.sca.contribution.processor.DefaultStAXArtifactProcessorExtensionPoint; import org.apache.tuscany.sca.contribution.processor.ExtensibleStAXArtifactProcessor; import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor; import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessorExtensionPoint; import org.apache.tuscany.sca.core.DefaultExtensionPointRegistry; +import org.apache.tuscany.sca.core.FactoryExtensionPoint; import org.apache.tuscany.sca.core.UtilityExtensionPoint; import org.apache.tuscany.sca.interfacedef.InterfaceContractMapper; import org.apache.tuscany.sca.policy.IntentAttachPointTypeFactory; @@ -59,13 +59,13 @@ public class ReadTestCase extends TestCase { StAXArtifactProcessorExtensionPoint staxProcessors = new DefaultStAXArtifactProcessorExtensionPoint(extensionPoints); staxProcessor = new ExtensibleStAXArtifactProcessor(staxProcessors, inputFactory, null, null); - ModelFactoryExtensionPoint modelFactories = extensionPoints.getExtensionPoint(ModelFactoryExtensionPoint.class); + FactoryExtensionPoint modelFactories = extensionPoints.getExtensionPoint(FactoryExtensionPoint.class); AssemblyFactory assemblyFactory = modelFactories.getFactory(AssemblyFactory.class); SCABindingFactory scaBindingFactory = modelFactories.getFactory(SCABindingFactory.class); UtilityExtensionPoint utilities = extensionPoints.getExtensionPoint(UtilityExtensionPoint.class); InterfaceContractMapper mapper = utilities.getUtility(InterfaceContractMapper.class); IntentAttachPointTypeFactory attachPointTypeFactory = modelFactories.getFactory(IntentAttachPointTypeFactory.class); - compositeBuilder = new CompositeBuilderImpl(assemblyFactory, scaBindingFactory, attachPointTypeFactory, mapper, null); + compositeBuilder = new CompositeBuilderImpl(assemblyFactory, scaBindingFactory, attachPointTypeFactory, mapper); } public void testReadComposite() throws Exception { @@ -74,7 +74,7 @@ public class ReadTestCase extends TestCase { Composite composite = (Composite)staxProcessor.read(reader); assertNotNull(composite); - compositeBuilder.build(composite); + compositeBuilder.build(composite, null, null); } } |