diff options
author | lresende <lresende@13f79535-47bb-0310-9956-ffa450edef68> | 2009-10-08 05:38:23 +0000 |
---|---|---|
committer | lresende <lresende@13f79535-47bb-0310-9956-ffa450edef68> | 2009-10-08 05:38:23 +0000 |
commit | 1c8acb6b6a3c4a4266bd492577fd4dfb32fe8b27 (patch) | |
tree | 392c242da52b350210a6245e721e3e5f3dddf203 /java/sca/modules/binding-atom/src | |
parent | 045dd1198ce46b36d1944e922aaf4370be8b479d (diff) |
Modifying testcase to use extension point to retrieve monitor factory and avoid instantiating impl class
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@823028 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to '')
-rw-r--r-- | java/sca/modules/binding-atom/src/test/java/org/apache/tuscany/sca/binding/atom/AtomBindingProcessorTestCase.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/java/sca/modules/binding-atom/src/test/java/org/apache/tuscany/sca/binding/atom/AtomBindingProcessorTestCase.java b/java/sca/modules/binding-atom/src/test/java/org/apache/tuscany/sca/binding/atom/AtomBindingProcessorTestCase.java index 63dffd5522..dfdc5b4c56 100644 --- a/java/sca/modules/binding-atom/src/test/java/org/apache/tuscany/sca/binding/atom/AtomBindingProcessorTestCase.java +++ b/java/sca/modules/binding-atom/src/test/java/org/apache/tuscany/sca/binding/atom/AtomBindingProcessorTestCase.java @@ -32,10 +32,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.FactoryExtensionPoint; import org.apache.tuscany.sca.core.UtilityExtensionPoint; import org.apache.tuscany.sca.monitor.Monitor; import org.apache.tuscany.sca.monitor.MonitorFactory; -import org.apache.tuscany.sca.monitor.impl.DefaultMonitorFactoryImpl; /** * @version $Rev$ $Date$ @@ -62,8 +62,10 @@ public class AtomBindingProcessorTestCase extends TestCase { DefaultExtensionPointRegistry extensionPoints = new DefaultExtensionPointRegistry(); inputFactory = XMLInputFactory.newInstance(); // Create a monitor + FactoryExtensionPoint factories = extensionPoints.getExtensionPoint(FactoryExtensionPoint.class); UtilityExtensionPoint utilities = extensionPoints.getExtensionPoint(UtilityExtensionPoint.class); - MonitorFactory monitorFactory = new DefaultMonitorFactoryImpl(); + + MonitorFactory monitorFactory = factories.getFactory(MonitorFactory.class); if (monitorFactory != null) { monitor = monitorFactory.createMonitor(); utilities.addUtility(monitorFactory); |