diff options
author | slaws <slaws@13f79535-47bb-0310-9956-ffa450edef68> | 2009-07-22 20:22:55 +0000 |
---|---|---|
committer | slaws <slaws@13f79535-47bb-0310-9956-ffa450edef68> | 2009-07-22 20:22:55 +0000 |
commit | 396bdfd297b947cb7c665cecda3d9ef01948554e (patch) | |
tree | f0cc43316a42a9f2379df21845cffd0b1f816399 /java/sca/modules/implementation-web | |
parent | b4ccf4593343639b322b1b986af6489b8a0a24e9 (diff) |
TUSCANY-3175 don't build the model without a monitor. It's won't work in the future when we rely on a monitor being present in order to record context
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@796870 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca/modules/implementation-web')
-rw-r--r-- | java/sca/modules/implementation-web/src/test/java/org/apache/tuscany/sca/implementation/web/xml/ReadTestCase.java | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/java/sca/modules/implementation-web/src/test/java/org/apache/tuscany/sca/implementation/web/xml/ReadTestCase.java b/java/sca/modules/implementation-web/src/test/java/org/apache/tuscany/sca/implementation/web/xml/ReadTestCase.java index 4f195950a4..593a0d4bc9 100644 --- a/java/sca/modules/implementation-web/src/test/java/org/apache/tuscany/sca/implementation/web/xml/ReadTestCase.java +++ b/java/sca/modules/implementation-web/src/test/java/org/apache/tuscany/sca/implementation/web/xml/ReadTestCase.java @@ -34,7 +34,10 @@ import org.apache.tuscany.sca.contribution.processor.ExtensibleStAXArtifactProce 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.UtilityExtensionPoint; import org.apache.tuscany.sca.implementation.web.WebImplementation; +import org.apache.tuscany.sca.monitor.Monitor; +import org.apache.tuscany.sca.monitor.MonitorFactory; /** * Test reading Web implementations. @@ -44,6 +47,7 @@ public class ReadTestCase extends TestCase { private XMLInputFactory inputFactory; private StAXArtifactProcessor<Object> staxProcessor; private CompositeBuilder compositeBuilder; + private static Monitor monitor; @Override public void setUp() throws Exception { @@ -52,6 +56,10 @@ public class ReadTestCase extends TestCase { StAXArtifactProcessorExtensionPoint staxProcessors = new DefaultStAXArtifactProcessorExtensionPoint(extensionPoints); staxProcessor = new ExtensibleStAXArtifactProcessor(staxProcessors, inputFactory, null, null); compositeBuilder = extensionPoints.getExtensionPoint(CompositeBuilderExtensionPoint.class).getCompositeBuilder("org.apache.tuscany.sca.assembly.builder.CompositeBuilder"); + + UtilityExtensionPoint utilities = extensionPoints.getExtensionPoint(UtilityExtensionPoint.class); + MonitorFactory monitorFactory = utilities.getUtility(MonitorFactory.class); + monitor = monitorFactory.createMonitor(); } public void testReadComposite() throws Exception { @@ -60,7 +68,7 @@ public class ReadTestCase extends TestCase { Composite composite = (Composite) staxProcessor.read(reader); assertNotNull(composite); - compositeBuilder.build(composite, null, null); + compositeBuilder.build(composite, null, monitor); assertTrue(((WebImplementation) composite.getComponents().get(0).getImplementation()).getWebURI().equals("MyWebapp")); } |