From fcef778b4fb5b4ee7d828c1e9cfb62af2d48d869 Mon Sep 17 00:00:00 2001 From: jsdelfino Date: Mon, 29 Sep 2008 06:44:22 +0000 Subject: Fixed monitor module to avoid having to export monitor implementation classes. Removed dependencies on monitor-logging. git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@700000 13f79535-47bb-0310-9956-ffa450edef68 --- .../namespace/impl/NamespaceExportProcessorTestCase.java | 7 +++---- .../namespace/impl/NamespaceImportProcessorTestCase.java | 8 +++----- 2 files changed, 6 insertions(+), 9 deletions(-) (limited to 'branches/sca-equinox/modules/contribution-namespace/src/test/java') diff --git a/branches/sca-equinox/modules/contribution-namespace/src/test/java/org/apache/tuscany/sca/contribution/namespace/impl/NamespaceExportProcessorTestCase.java b/branches/sca-equinox/modules/contribution-namespace/src/test/java/org/apache/tuscany/sca/contribution/namespace/impl/NamespaceExportProcessorTestCase.java index 1f508d6a4a..b11933fbef 100644 --- a/branches/sca-equinox/modules/contribution-namespace/src/test/java/org/apache/tuscany/sca/contribution/namespace/impl/NamespaceExportProcessorTestCase.java +++ b/branches/sca-equinox/modules/contribution-namespace/src/test/java/org/apache/tuscany/sca/contribution/namespace/impl/NamespaceExportProcessorTestCase.java @@ -33,11 +33,10 @@ import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessorExtens import org.apache.tuscany.sca.core.DefaultExtensionPointRegistry; import org.apache.tuscany.sca.core.ExtensionPointRegistry; import org.apache.tuscany.sca.core.UtilityExtensionPoint; +import org.apache.tuscany.sca.monitor.DefaultMonitorFactory; import org.apache.tuscany.sca.monitor.Monitor; import org.apache.tuscany.sca.monitor.MonitorFactory; import org.apache.tuscany.sca.monitor.Problem; -import org.apache.tuscany.sca.monitor.impl.DefaultMonitorFactoryImpl; -import org.apache.tuscany.sca.monitor.impl.DefaultMonitorImpl; /** * Test NamespaceExportProcessorTestCase @@ -64,7 +63,7 @@ public class NamespaceExportProcessorTestCase extends TestCase { inputFactory = XMLInputFactory.newInstance(); // Create a monitor UtilityExtensionPoint utilities = extensionPoints.getExtensionPoint(UtilityExtensionPoint.class); - MonitorFactory monitorFactory = new DefaultMonitorFactoryImpl(); + MonitorFactory monitorFactory = new DefaultMonitorFactory(); if (monitorFactory != null) { monitor = monitorFactory.createMonitor(); utilities.addUtility(monitorFactory); @@ -96,7 +95,7 @@ public class NamespaceExportProcessorTestCase extends TestCase { assertTrue(true); }*/ staxProcessor.read(reader); - Problem problem = ((DefaultMonitorImpl)monitor).getLastLoggedProblem(); + Problem problem = monitor.getLastLoggedProblem(); assertNotNull(problem); assertEquals("AttributeNameSpaceMissing", problem.getMessageId()); } diff --git a/branches/sca-equinox/modules/contribution-namespace/src/test/java/org/apache/tuscany/sca/contribution/namespace/impl/NamespaceImportProcessorTestCase.java b/branches/sca-equinox/modules/contribution-namespace/src/test/java/org/apache/tuscany/sca/contribution/namespace/impl/NamespaceImportProcessorTestCase.java index 71ac33bf68..282c0cfbe7 100644 --- a/branches/sca-equinox/modules/contribution-namespace/src/test/java/org/apache/tuscany/sca/contribution/namespace/impl/NamespaceImportProcessorTestCase.java +++ b/branches/sca-equinox/modules/contribution-namespace/src/test/java/org/apache/tuscany/sca/contribution/namespace/impl/NamespaceImportProcessorTestCase.java @@ -32,15 +32,13 @@ import org.apache.tuscany.sca.contribution.namespace.NamespaceImport; 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.contribution.service.ContributionReadException; import org.apache.tuscany.sca.core.DefaultExtensionPointRegistry; import org.apache.tuscany.sca.core.ExtensionPointRegistry; import org.apache.tuscany.sca.core.UtilityExtensionPoint; +import org.apache.tuscany.sca.monitor.DefaultMonitorFactory; import org.apache.tuscany.sca.monitor.Monitor; import org.apache.tuscany.sca.monitor.MonitorFactory; import org.apache.tuscany.sca.monitor.Problem; -import org.apache.tuscany.sca.monitor.impl.DefaultMonitorFactoryImpl; -import org.apache.tuscany.sca.monitor.impl.DefaultMonitorImpl; /** * Test NamespaceImportProcessorTestCase @@ -67,7 +65,7 @@ public class NamespaceImportProcessorTestCase extends TestCase { inputFactory = XMLInputFactory.newInstance(); // Create a monitor UtilityExtensionPoint utilities = extensionPoints.getExtensionPoint(UtilityExtensionPoint.class); - MonitorFactory monitorFactory = new DefaultMonitorFactoryImpl(); + MonitorFactory monitorFactory = new DefaultMonitorFactory(); if (monitorFactory != null) { monitor = monitorFactory.createMonitor(); utilities.addUtility(monitorFactory); @@ -101,7 +99,7 @@ public class NamespaceImportProcessorTestCase extends TestCase { assertTrue(true); }*/ staxProcessor.read(reader); - Problem problem = ((DefaultMonitorImpl)monitor).getLastLoggedProblem(); + Problem problem = monitor.getLastLoggedProblem(); assertNotNull(problem); assertEquals("AttributeNameSpaceMissing", problem.getMessageId()); } -- cgit v1.2.3