diff options
author | jsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68> | 2008-09-29 07:32:09 +0000 |
---|---|---|
committer | jsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68> | 2008-09-29 07:32:09 +0000 |
commit | 023074370754b13a5bdd8a2c589225fb12275b20 (patch) | |
tree | f8aae48c347a545d97413cb89802768751da3a1e /branches/sca-equinox | |
parent | fcef778b4fb5b4ee7d828c1e9cfb62af2d48d869 (diff) |
More fixes to monitor. Removed remaining dependencies on DefaultLoggingMonitorImpl implementation class.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@700007 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'branches/sca-equinox')
104 files changed, 187 insertions, 236 deletions
diff --git a/branches/sca-equinox/itest/validation/src/test/java/assembly/xml/ContributionReadException.java b/branches/sca-equinox/itest/validation/src/test/java/assembly/xml/ContributionReadException.java index 9b0d51eb59..55999fe27d 100644 --- a/branches/sca-equinox/itest/validation/src/test/java/assembly/xml/ContributionReadException.java +++ b/branches/sca-equinox/itest/validation/src/test/java/assembly/xml/ContributionReadException.java @@ -22,7 +22,6 @@ import junit.framework.TestCase; import org.apache.tuscany.sca.monitor.Monitor; import org.apache.tuscany.sca.monitor.Problem; -import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl; import domain.CustomCompositeBuilder; @@ -52,7 +51,7 @@ public class ContributionReadException extends TestCase { public void testCalculator() { Monitor monitor = customDomain.getMonitorInstance(); - Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem(); + Problem problem = monitor.getLastProblem(); assertNotNull(problem); assertEquals("ContributionReadException", problem.getMessageId()); diff --git a/branches/sca-equinox/itest/validation/src/test/java/assembly/xml/PolicyImplValidationException.java b/branches/sca-equinox/itest/validation/src/test/java/assembly/xml/PolicyImplValidationException.java index e8476991a9..5ab65b2f64 100644 --- a/branches/sca-equinox/itest/validation/src/test/java/assembly/xml/PolicyImplValidationException.java +++ b/branches/sca-equinox/itest/validation/src/test/java/assembly/xml/PolicyImplValidationException.java @@ -22,7 +22,6 @@ import junit.framework.TestCase; import org.apache.tuscany.sca.monitor.Monitor; import org.apache.tuscany.sca.monitor.Problem; -import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl; import domain.CustomCompositeBuilder; @@ -52,7 +51,7 @@ public class PolicyImplValidationException extends TestCase { public void testCalculator() { Monitor monitor = customDomain.getMonitorInstance(); - Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem(); + Problem problem = monitor.getLastProblem(); assertNotNull(problem); assertEquals("PolicyImplValidationException", problem.getMessageId()); diff --git a/branches/sca-equinox/itest/validation/src/test/java/assembly/xml/PolicyServiceValidationException.java b/branches/sca-equinox/itest/validation/src/test/java/assembly/xml/PolicyServiceValidationException.java index 8ae156d63e..52803411cf 100644 --- a/branches/sca-equinox/itest/validation/src/test/java/assembly/xml/PolicyServiceValidationException.java +++ b/branches/sca-equinox/itest/validation/src/test/java/assembly/xml/PolicyServiceValidationException.java @@ -22,7 +22,6 @@ import junit.framework.TestCase; import org.apache.tuscany.sca.monitor.Monitor; import org.apache.tuscany.sca.monitor.Problem; -import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl; import domain.CustomCompositeBuilder; @@ -52,7 +51,7 @@ public class PolicyServiceValidationException extends TestCase { public void testCalculator() { Monitor monitor = customDomain.getMonitorInstance(); - Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem(); + Problem problem = monitor.getLastProblem(); assertNotNull(problem); assertEquals("PolicyServiceValidationException", problem.getMessageId()); diff --git a/branches/sca-equinox/itest/validation/src/test/java/assembly/xml/UnexpectedBindingElement.java b/branches/sca-equinox/itest/validation/src/test/java/assembly/xml/UnexpectedBindingElement.java index d757ff98dd..8adf1aa2aa 100644 --- a/branches/sca-equinox/itest/validation/src/test/java/assembly/xml/UnexpectedBindingElement.java +++ b/branches/sca-equinox/itest/validation/src/test/java/assembly/xml/UnexpectedBindingElement.java @@ -22,7 +22,6 @@ import junit.framework.TestCase; import org.apache.tuscany.sca.monitor.Monitor; import org.apache.tuscany.sca.monitor.Problem; -import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl; import domain.CustomCompositeBuilder; @@ -52,7 +51,7 @@ public class UnexpectedBindingElement extends TestCase { public void testCalculator() { Monitor monitor = customDomain.getMonitorInstance(); - Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem(); + Problem problem = monitor.getLastProblem(); assertNotNull(problem); assertEquals("UnexpectedBindingElement", problem.getMessageId()); diff --git a/branches/sca-equinox/itest/validation/src/test/java/assembly/xml/UnexpectedImplementationElement.java b/branches/sca-equinox/itest/validation/src/test/java/assembly/xml/UnexpectedImplementationElement.java index 9a231a18c7..2790cd0a6c 100644 --- a/branches/sca-equinox/itest/validation/src/test/java/assembly/xml/UnexpectedImplementationElement.java +++ b/branches/sca-equinox/itest/validation/src/test/java/assembly/xml/UnexpectedImplementationElement.java @@ -22,7 +22,6 @@ import junit.framework.TestCase; import org.apache.tuscany.sca.monitor.Monitor; import org.apache.tuscany.sca.monitor.Problem; -import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl; import domain.CustomCompositeBuilder; @@ -52,7 +51,7 @@ public class UnexpectedImplementationElement extends TestCase { public void testCalculator() { Monitor monitor = customDomain.getMonitorInstance(); - Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem(); + Problem problem = monitor.getLastProblem(); assertNotNull(problem); assertEquals("UnexpectedImplementationElement", problem.getMessageId()); diff --git a/branches/sca-equinox/itest/validation/src/test/java/assembly/xml/UnexpectedInterfaceElement.java b/branches/sca-equinox/itest/validation/src/test/java/assembly/xml/UnexpectedInterfaceElement.java index 4ae88b9ba3..c6daaebfe5 100644 --- a/branches/sca-equinox/itest/validation/src/test/java/assembly/xml/UnexpectedInterfaceElement.java +++ b/branches/sca-equinox/itest/validation/src/test/java/assembly/xml/UnexpectedInterfaceElement.java @@ -22,7 +22,6 @@ import junit.framework.TestCase; import org.apache.tuscany.sca.monitor.Monitor; import org.apache.tuscany.sca.monitor.Problem; -import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl; import domain.CustomCompositeBuilder; /** @@ -51,7 +50,7 @@ public class UnexpectedInterfaceElement extends TestCase { public void testCalculator() { Monitor monitor = customDomain.getMonitorInstance(); - Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem(); + Problem problem = monitor.getLastProblem(); assertNotNull(problem); assertEquals("UnexpectedInterfaceElement", problem.getMessageId()); diff --git a/branches/sca-equinox/itest/validation/src/test/java/binding/ejb/UnknownEJBSessionTypeTestCase.java b/branches/sca-equinox/itest/validation/src/test/java/binding/ejb/UnknownEJBSessionTypeTestCase.java index ff94ad7b93..204034737b 100644 --- a/branches/sca-equinox/itest/validation/src/test/java/binding/ejb/UnknownEJBSessionTypeTestCase.java +++ b/branches/sca-equinox/itest/validation/src/test/java/binding/ejb/UnknownEJBSessionTypeTestCase.java @@ -22,7 +22,6 @@ import junit.framework.TestCase; import org.apache.tuscany.sca.monitor.Monitor; import org.apache.tuscany.sca.monitor.Problem; -import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl; import domain.CustomCompositeBuilder; @@ -59,7 +58,7 @@ public class UnknownEJBSessionTypeTestCase extends TestCase { public void testCalculator() { Monitor monitor = customDomain.getMonitorInstance(); - Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem(); + Problem problem = monitor.getLastProblem(); assertNotNull(problem); assertEquals("UnknownEJBSessionType", problem.getMessageId()); diff --git a/branches/sca-equinox/itest/validation/src/test/java/binding/ejb/UnknownEJBVersionTestCase.java b/branches/sca-equinox/itest/validation/src/test/java/binding/ejb/UnknownEJBVersionTestCase.java index a192674aeb..ff2e413ab7 100644 --- a/branches/sca-equinox/itest/validation/src/test/java/binding/ejb/UnknownEJBVersionTestCase.java +++ b/branches/sca-equinox/itest/validation/src/test/java/binding/ejb/UnknownEJBVersionTestCase.java @@ -22,7 +22,6 @@ import junit.framework.TestCase; import org.apache.tuscany.sca.monitor.Monitor; import org.apache.tuscany.sca.monitor.Problem; -import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl; import domain.CustomCompositeBuilder; @@ -58,7 +57,7 @@ public class UnknownEJBVersionTestCase extends TestCase { public void testCalculator() { Monitor monitor = customDomain.getMonitorInstance(); - Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem(); + Problem problem = monitor.getLastProblem(); assertNotNull(problem); assertEquals("UnknownEJBVersion", problem.getMessageId()); diff --git a/branches/sca-equinox/itest/validation/src/test/java/binding/jms/DoesntProcessActivationSpecTestCase.java b/branches/sca-equinox/itest/validation/src/test/java/binding/jms/DoesntProcessActivationSpecTestCase.java index e0e5347d96..1632f95689 100644 --- a/branches/sca-equinox/itest/validation/src/test/java/binding/jms/DoesntProcessActivationSpecTestCase.java +++ b/branches/sca-equinox/itest/validation/src/test/java/binding/jms/DoesntProcessActivationSpecTestCase.java @@ -22,7 +22,6 @@ import junit.framework.TestCase; import org.apache.tuscany.sca.monitor.Monitor; import org.apache.tuscany.sca.monitor.Problem; -import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl; import domain.CustomCompositeBuilder; @@ -52,7 +51,7 @@ public class DoesntProcessActivationSpecTestCase extends TestCase { public void testCalculator() { Monitor monitor = customDomain.getMonitorInstance(); - Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem(); + Problem problem = monitor.getLastProblem(); assertNotNull(problem); assertEquals("DoesntProcessActivationSpec", problem.getMessageId()); diff --git a/branches/sca-equinox/itest/validation/src/test/java/binding/jms/DoesntProcessDestinationTypeTestCase.java b/branches/sca-equinox/itest/validation/src/test/java/binding/jms/DoesntProcessDestinationTypeTestCase.java index 9e08afec09..054f5a6035 100644 --- a/branches/sca-equinox/itest/validation/src/test/java/binding/jms/DoesntProcessDestinationTypeTestCase.java +++ b/branches/sca-equinox/itest/validation/src/test/java/binding/jms/DoesntProcessDestinationTypeTestCase.java @@ -22,7 +22,6 @@ import junit.framework.TestCase; import org.apache.tuscany.sca.monitor.Monitor; import org.apache.tuscany.sca.monitor.Problem; -import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl; import domain.CustomCompositeBuilder; @@ -52,7 +51,7 @@ public class DoesntProcessDestinationTypeTestCase extends TestCase { public void testCalculator() { Monitor monitor = customDomain.getMonitorInstance(); - Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem(); + Problem problem = monitor.getLastProblem(); assertNotNull(problem); assertEquals("DoesntProcessDestinationType", problem.getMessageId()); diff --git a/branches/sca-equinox/itest/validation/src/test/java/binding/jms/DoesntProcessHeadersTestCase.java b/branches/sca-equinox/itest/validation/src/test/java/binding/jms/DoesntProcessHeadersTestCase.java index ed96072780..f3f61ec04b 100644 --- a/branches/sca-equinox/itest/validation/src/test/java/binding/jms/DoesntProcessHeadersTestCase.java +++ b/branches/sca-equinox/itest/validation/src/test/java/binding/jms/DoesntProcessHeadersTestCase.java @@ -22,7 +22,6 @@ import junit.framework.TestCase; import org.apache.tuscany.sca.monitor.Monitor; import org.apache.tuscany.sca.monitor.Problem; -import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl; import org.junit.Ignore; import domain.CustomCompositeBuilder; @@ -54,7 +53,7 @@ public class DoesntProcessHeadersTestCase extends TestCase { @Ignore("TUSCANY-2532") public void testCalculator() { Monitor monitor = customDomain.getMonitorInstance(); - Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem(); + Problem problem = monitor.getLastProblem(); assertNotNull(problem); // assertEquals("DoesntProcessHeaders", problem.getMessageId()); diff --git a/branches/sca-equinox/itest/validation/src/test/java/binding/jms/DoesntProcessResourceAdapterTestCase.java b/branches/sca-equinox/itest/validation/src/test/java/binding/jms/DoesntProcessResourceAdapterTestCase.java index a2a5b0b872..76d8a63b51 100644 --- a/branches/sca-equinox/itest/validation/src/test/java/binding/jms/DoesntProcessResourceAdapterTestCase.java +++ b/branches/sca-equinox/itest/validation/src/test/java/binding/jms/DoesntProcessResourceAdapterTestCase.java @@ -22,7 +22,6 @@ import junit.framework.TestCase; import org.apache.tuscany.sca.monitor.Monitor; import org.apache.tuscany.sca.monitor.Problem; -import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl; import domain.CustomCompositeBuilder; @@ -52,7 +51,7 @@ public class DoesntProcessResourceAdapterTestCase extends TestCase { public void testCalculator() { Monitor monitor = customDomain.getMonitorInstance(); - Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem(); + Problem problem = monitor.getLastProblem(); assertNotNull(problem); assertEquals("DoesntProcessResourceAdapter", problem.getMessageId()); diff --git a/branches/sca-equinox/itest/validation/src/test/java/binding/jms/DoesntProcessResponseActivationSpecTestCase.java b/branches/sca-equinox/itest/validation/src/test/java/binding/jms/DoesntProcessResponseActivationSpecTestCase.java index 64b41623de..95c108e6db 100644 --- a/branches/sca-equinox/itest/validation/src/test/java/binding/jms/DoesntProcessResponseActivationSpecTestCase.java +++ b/branches/sca-equinox/itest/validation/src/test/java/binding/jms/DoesntProcessResponseActivationSpecTestCase.java @@ -22,7 +22,6 @@ import junit.framework.TestCase; import org.apache.tuscany.sca.monitor.Monitor; import org.apache.tuscany.sca.monitor.Problem; -import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl; import domain.CustomCompositeBuilder; @@ -52,7 +51,7 @@ public class DoesntProcessResponseActivationSpecTestCase extends TestCase { public void testCalculator() { Monitor monitor = customDomain.getMonitorInstance(); - Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem(); + Problem problem = monitor.getLastProblem(); assertNotNull(problem); assertEquals("DoesntProcessResponseActivationSpec", problem.getMessageId()); diff --git a/branches/sca-equinox/itest/validation/src/test/java/binding/jms/DoesntProcessResponseConnectionFactoryTestCase.java b/branches/sca-equinox/itest/validation/src/test/java/binding/jms/DoesntProcessResponseConnectionFactoryTestCase.java index 86fbe51dad..2f66bbfe0c 100644 --- a/branches/sca-equinox/itest/validation/src/test/java/binding/jms/DoesntProcessResponseConnectionFactoryTestCase.java +++ b/branches/sca-equinox/itest/validation/src/test/java/binding/jms/DoesntProcessResponseConnectionFactoryTestCase.java @@ -22,7 +22,6 @@ import junit.framework.TestCase; import org.apache.tuscany.sca.monitor.Monitor; import org.apache.tuscany.sca.monitor.Problem; -import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl; import domain.CustomCompositeBuilder; @@ -52,7 +51,7 @@ public class DoesntProcessResponseConnectionFactoryTestCase extends TestCase { public void testCalculator() { Monitor monitor = customDomain.getMonitorInstance(); - Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem(); + Problem problem = monitor.getLastProblem(); assertNotNull(problem); assertEquals("DoesntProcessResponseConnectionFactory", problem.getMessageId()); diff --git a/branches/sca-equinox/itest/validation/src/test/java/binding/jms/DoesntProcessResponseDestinationTypeTestCase.java b/branches/sca-equinox/itest/validation/src/test/java/binding/jms/DoesntProcessResponseDestinationTypeTestCase.java index 6e884c41cd..decf234753 100644 --- a/branches/sca-equinox/itest/validation/src/test/java/binding/jms/DoesntProcessResponseDestinationTypeTestCase.java +++ b/branches/sca-equinox/itest/validation/src/test/java/binding/jms/DoesntProcessResponseDestinationTypeTestCase.java @@ -22,7 +22,6 @@ import junit.framework.TestCase; import org.apache.tuscany.sca.monitor.Monitor; import org.apache.tuscany.sca.monitor.Problem; -import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl; import domain.CustomCompositeBuilder; @@ -52,7 +51,7 @@ public class DoesntProcessResponseDestinationTypeTestCase extends TestCase { public void testCalculator() { Monitor monitor = customDomain.getMonitorInstance(); - Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem(); + Problem problem = monitor.getLastProblem(); assertNotNull(problem); assertEquals("DoesntProcessResponseDestinationType", problem.getMessageId()); diff --git a/branches/sca-equinox/itest/validation/src/test/java/binding/jms/InvalidCorrelationSchemeTestCase.java b/branches/sca-equinox/itest/validation/src/test/java/binding/jms/InvalidCorrelationSchemeTestCase.java index c237f8af18..445a41700b 100644 --- a/branches/sca-equinox/itest/validation/src/test/java/binding/jms/InvalidCorrelationSchemeTestCase.java +++ b/branches/sca-equinox/itest/validation/src/test/java/binding/jms/InvalidCorrelationSchemeTestCase.java @@ -22,7 +22,6 @@ import junit.framework.TestCase; import org.apache.tuscany.sca.monitor.Monitor; import org.apache.tuscany.sca.monitor.Problem; -import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl; import domain.CustomCompositeBuilder; @@ -52,7 +51,7 @@ public class InvalidCorrelationSchemeTestCase extends TestCase { public void testCalculator() { Monitor monitor = customDomain.getMonitorInstance(); - Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem(); + Problem problem = monitor.getLastProblem(); assertNotNull(problem); assertEquals("InvalidCorrelationScheme", problem.getMessageId()); diff --git a/branches/sca-equinox/itest/validation/src/test/java/binding/jms/InvalidJMSDeliveryModeTestCase.java b/branches/sca-equinox/itest/validation/src/test/java/binding/jms/InvalidJMSDeliveryModeTestCase.java index 52dc7e5795..531573a0aa 100644 --- a/branches/sca-equinox/itest/validation/src/test/java/binding/jms/InvalidJMSDeliveryModeTestCase.java +++ b/branches/sca-equinox/itest/validation/src/test/java/binding/jms/InvalidJMSDeliveryModeTestCase.java @@ -22,7 +22,6 @@ import junit.framework.TestCase; import org.apache.tuscany.sca.monitor.Monitor;
import org.apache.tuscany.sca.monitor.Problem;
-import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl;
import domain.CustomCompositeBuilder;
@@ -52,7 +51,7 @@ public class InvalidJMSDeliveryModeTestCase extends TestCase { public void testCalculator() {
Monitor monitor = customDomain.getMonitorInstance();
- Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
+ Problem problem = monitor.getLastProblem();
assertNotNull(problem);
assertEquals("InvalidJMSDeliveryMode", problem.getMessageId());
diff --git a/branches/sca-equinox/itest/validation/src/test/java/binding/jms/InvalidJMSPriorityTestCase.java b/branches/sca-equinox/itest/validation/src/test/java/binding/jms/InvalidJMSPriorityTestCase.java index a93df290c3..758e19d264 100644 --- a/branches/sca-equinox/itest/validation/src/test/java/binding/jms/InvalidJMSPriorityTestCase.java +++ b/branches/sca-equinox/itest/validation/src/test/java/binding/jms/InvalidJMSPriorityTestCase.java @@ -22,7 +22,6 @@ import junit.framework.TestCase; import org.apache.tuscany.sca.monitor.Monitor;
import org.apache.tuscany.sca.monitor.Problem;
-import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl;
import domain.CustomCompositeBuilder;
@@ -52,7 +51,7 @@ public class InvalidJMSPriorityTestCase extends TestCase { public void testCalculator() {
Monitor monitor = customDomain.getMonitorInstance();
- Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
+ Problem problem = monitor.getLastProblem();
assertNotNull(problem);
assertEquals("InvalidJMSPriority", problem.getMessageId());
diff --git a/branches/sca-equinox/itest/validation/src/test/java/binding/jms/InvalidResponseDestinationTypeTestCase.java b/branches/sca-equinox/itest/validation/src/test/java/binding/jms/InvalidResponseDestinationTypeTestCase.java index 949ec02134..96319438b6 100644 --- a/branches/sca-equinox/itest/validation/src/test/java/binding/jms/InvalidResponseDestinationTypeTestCase.java +++ b/branches/sca-equinox/itest/validation/src/test/java/binding/jms/InvalidResponseDestinationTypeTestCase.java @@ -22,7 +22,6 @@ import junit.framework.TestCase; import org.apache.tuscany.sca.monitor.Monitor; import org.apache.tuscany.sca.monitor.Problem; -import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl; import domain.CustomCompositeBuilder; @@ -52,7 +51,7 @@ public class InvalidResponseDestinationTypeTestCase extends TestCase { public void testCalculator() { Monitor monitor = customDomain.getMonitorInstance(); - Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem(); + Problem problem = monitor.getLastProblem(); assertNotNull(problem); assertEquals("InvalidResponseDestinationType", problem.getMessageId()); diff --git a/branches/sca-equinox/itest/validation/src/test/java/binding/jms/MissingActivationSpecNameTestCase.java b/branches/sca-equinox/itest/validation/src/test/java/binding/jms/MissingActivationSpecNameTestCase.java index a974ef0db4..a2a4caa0b0 100644 --- a/branches/sca-equinox/itest/validation/src/test/java/binding/jms/MissingActivationSpecNameTestCase.java +++ b/branches/sca-equinox/itest/validation/src/test/java/binding/jms/MissingActivationSpecNameTestCase.java @@ -22,7 +22,6 @@ import junit.framework.TestCase; import org.apache.tuscany.sca.monitor.Monitor; import org.apache.tuscany.sca.monitor.Problem; -import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl; import domain.CustomCompositeBuilder; @@ -52,7 +51,7 @@ public class MissingActivationSpecNameTestCase extends TestCase { public void testCalculator() { Monitor monitor = customDomain.getMonitorInstance(); - Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem(); + Problem problem = monitor.getLastProblem(); assertNotNull(problem); assertEquals("MissingActivationSpecName", problem.getMessageId()); diff --git a/branches/sca-equinox/itest/validation/src/test/java/binding/jms/MissingConnectionFactoryNameTestCase.java b/branches/sca-equinox/itest/validation/src/test/java/binding/jms/MissingConnectionFactoryNameTestCase.java index adbaa50dc0..0d91afd7e6 100644 --- a/branches/sca-equinox/itest/validation/src/test/java/binding/jms/MissingConnectionFactoryNameTestCase.java +++ b/branches/sca-equinox/itest/validation/src/test/java/binding/jms/MissingConnectionFactoryNameTestCase.java @@ -22,7 +22,6 @@ import junit.framework.TestCase; import org.apache.tuscany.sca.monitor.Monitor; import org.apache.tuscany.sca.monitor.Problem; -import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl; import domain.CustomCompositeBuilder; @@ -52,7 +51,7 @@ public class MissingConnectionFactoryNameTestCase extends TestCase { public void testCalculator() { Monitor monitor = customDomain.getMonitorInstance(); - Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem(); + Problem problem = monitor.getLastProblem(); assertNotNull(problem); assertEquals("MissingConnectionFactoryName", problem.getMessageId()); diff --git a/branches/sca-equinox/itest/validation/src/test/java/binding/jms/MissingResponseActivationSpecTestCase.java b/branches/sca-equinox/itest/validation/src/test/java/binding/jms/MissingResponseActivationSpecTestCase.java index 4bba6b74de..048fcc7d43 100644 --- a/branches/sca-equinox/itest/validation/src/test/java/binding/jms/MissingResponseActivationSpecTestCase.java +++ b/branches/sca-equinox/itest/validation/src/test/java/binding/jms/MissingResponseActivationSpecTestCase.java @@ -22,7 +22,6 @@ import junit.framework.TestCase; import org.apache.tuscany.sca.monitor.Monitor; import org.apache.tuscany.sca.monitor.Problem; -import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl; import domain.CustomCompositeBuilder; @@ -52,7 +51,7 @@ public class MissingResponseActivationSpecTestCase extends TestCase { public void testCalculator() { Monitor monitor = customDomain.getMonitorInstance(); - Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem(); + Problem problem = monitor.getLastProblem(); assertNotNull(problem); assertEquals("MissingResponseActivationSpec", problem.getMessageId()); diff --git a/branches/sca-equinox/itest/validation/src/test/java/binding/jms/MissingResponseConnectionFactoryTestCase.java b/branches/sca-equinox/itest/validation/src/test/java/binding/jms/MissingResponseConnectionFactoryTestCase.java index 8f4fc1a739..856c9f3b27 100644 --- a/branches/sca-equinox/itest/validation/src/test/java/binding/jms/MissingResponseConnectionFactoryTestCase.java +++ b/branches/sca-equinox/itest/validation/src/test/java/binding/jms/MissingResponseConnectionFactoryTestCase.java @@ -22,7 +22,6 @@ import junit.framework.TestCase; import org.apache.tuscany.sca.monitor.Monitor; import org.apache.tuscany.sca.monitor.Problem; -import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl; import domain.CustomCompositeBuilder; @@ -52,7 +51,7 @@ public class MissingResponseConnectionFactoryTestCase extends TestCase { public void testCalculator() { Monitor monitor = customDomain.getMonitorInstance(); - Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem(); + Problem problem = monitor.getLastProblem(); assertNotNull(problem); assertEquals("MissingResponseConnectionFactory", problem.getMessageId()); diff --git a/branches/sca-equinox/itest/validation/src/test/java/binding/jms/MustStartWithSchemaTestCase.java b/branches/sca-equinox/itest/validation/src/test/java/binding/jms/MustStartWithSchemaTestCase.java index d9e1c782a8..b584cb8d94 100644 --- a/branches/sca-equinox/itest/validation/src/test/java/binding/jms/MustStartWithSchemaTestCase.java +++ b/branches/sca-equinox/itest/validation/src/test/java/binding/jms/MustStartWithSchemaTestCase.java @@ -22,7 +22,6 @@ import junit.framework.TestCase; import org.apache.tuscany.sca.monitor.Monitor; import org.apache.tuscany.sca.monitor.Problem; -import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl; import domain.CustomCompositeBuilder; @@ -52,7 +51,7 @@ public class MustStartWithSchemaTestCase extends TestCase { public void testCalculator() { Monitor monitor = customDomain.getMonitorInstance(); - Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem(); + Problem problem = monitor.getLastProblem(); assertNotNull(problem); assertEquals("MustStartWithSchema", problem.getMessageId()); diff --git a/branches/sca-equinox/itest/validation/src/test/java/binding/jms/UnexpectedElementTestCase.java b/branches/sca-equinox/itest/validation/src/test/java/binding/jms/UnexpectedElementTestCase.java index 3e4e36d839..ae26008564 100644 --- a/branches/sca-equinox/itest/validation/src/test/java/binding/jms/UnexpectedElementTestCase.java +++ b/branches/sca-equinox/itest/validation/src/test/java/binding/jms/UnexpectedElementTestCase.java @@ -22,7 +22,6 @@ import junit.framework.TestCase; import org.apache.tuscany.sca.monitor.Monitor; import org.apache.tuscany.sca.monitor.Problem; -import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl; import domain.CustomCompositeBuilder; @@ -52,7 +51,7 @@ public class UnexpectedElementTestCase extends TestCase { public void testCalculator() { Monitor monitor = customDomain.getMonitorInstance(); - Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem(); + Problem problem = monitor.getLastProblem(); assertNotNull(problem); assertEquals("UnexpectedElement", problem.getMessageId()); diff --git a/branches/sca-equinox/itest/validation/src/test/java/binding/jms/UnexpectedResponseElementTestCase.java b/branches/sca-equinox/itest/validation/src/test/java/binding/jms/UnexpectedResponseElementTestCase.java index 60ea47a85f..fedc1f7530 100644 --- a/branches/sca-equinox/itest/validation/src/test/java/binding/jms/UnexpectedResponseElementTestCase.java +++ b/branches/sca-equinox/itest/validation/src/test/java/binding/jms/UnexpectedResponseElementTestCase.java @@ -22,7 +22,6 @@ import junit.framework.TestCase; import org.apache.tuscany.sca.monitor.Monitor; import org.apache.tuscany.sca.monitor.Problem; -import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl; import domain.CustomCompositeBuilder; @@ -52,7 +51,7 @@ public class UnexpectedResponseElementTestCase extends TestCase { public void testCalculator() { Monitor monitor = customDomain.getMonitorInstance(); - Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem(); + Problem problem = monitor.getLastProblem(); assertNotNull(problem); assertEquals("UnexpectedResponseElement", problem.getMessageId()); diff --git a/branches/sca-equinox/itest/validation/src/test/java/binding/jms/UnknownTokenInURITestCase.java b/branches/sca-equinox/itest/validation/src/test/java/binding/jms/UnknownTokenInURITestCase.java index 6a75a35f99..d94643cbc9 100644 --- a/branches/sca-equinox/itest/validation/src/test/java/binding/jms/UnknownTokenInURITestCase.java +++ b/branches/sca-equinox/itest/validation/src/test/java/binding/jms/UnknownTokenInURITestCase.java @@ -22,7 +22,6 @@ import junit.framework.TestCase; import org.apache.tuscany.sca.monitor.Monitor; import org.apache.tuscany.sca.monitor.Problem; -import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl; import domain.CustomCompositeBuilder; @@ -52,7 +51,7 @@ public class UnknownTokenInURITestCase extends TestCase { public void testCalculator() { Monitor monitor = customDomain.getMonitorInstance(); - Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem(); + Problem problem = monitor.getLastProblem(); assertNotNull(problem); assertEquals("UnknownTokenInURI", problem.getMessageId()); diff --git a/branches/sca-equinox/itest/validation/src/test/java/binding/wsxml/InvalidWsdlElementAttrTestCase.java b/branches/sca-equinox/itest/validation/src/test/java/binding/wsxml/InvalidWsdlElementAttrTestCase.java index c0f60a848f..4cbe3def2d 100644 --- a/branches/sca-equinox/itest/validation/src/test/java/binding/wsxml/InvalidWsdlElementAttrTestCase.java +++ b/branches/sca-equinox/itest/validation/src/test/java/binding/wsxml/InvalidWsdlElementAttrTestCase.java @@ -22,7 +22,6 @@ import junit.framework.TestCase; import org.apache.tuscany.sca.monitor.Monitor; import org.apache.tuscany.sca.monitor.Problem; -import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl; import domain.CustomCompositeBuilder; @@ -52,7 +51,7 @@ public class InvalidWsdlElementAttrTestCase extends TestCase { public void testCalculator() { Monitor monitor = customDomain.getMonitorInstance(); - Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem(); + Problem problem = monitor.getLastProblem(); assertNotNull(problem); assertEquals("InvalidWsdlElementAttr", problem.getMessageId()); diff --git a/branches/sca-equinox/itest/validation/src/test/java/binding/wsxml/MustUseWsdlBindingTestCase.java b/branches/sca-equinox/itest/validation/src/test/java/binding/wsxml/MustUseWsdlBindingTestCase.java index 5a74194796..2fe8af318c 100644 --- a/branches/sca-equinox/itest/validation/src/test/java/binding/wsxml/MustUseWsdlBindingTestCase.java +++ b/branches/sca-equinox/itest/validation/src/test/java/binding/wsxml/MustUseWsdlBindingTestCase.java @@ -22,7 +22,6 @@ import junit.framework.TestCase; import org.apache.tuscany.sca.monitor.Monitor; import org.apache.tuscany.sca.monitor.Problem; -import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl; import domain.CustomCompositeBuilder; @@ -52,7 +51,7 @@ public class MustUseWsdlBindingTestCase extends TestCase { public void testCalculator() { Monitor monitor = customDomain.getMonitorInstance(); - Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem(); + Problem problem = monitor.getLastProblem(); assertNotNull(problem); assertEquals("MustUseWsdlBinding", problem.getMessageId()); diff --git a/branches/sca-equinox/itest/validation/src/test/java/binding/wsxml/WsdlBindingDoesNotMatchTestCase.java b/branches/sca-equinox/itest/validation/src/test/java/binding/wsxml/WsdlBindingDoesNotMatchTestCase.java index 7991de7176..09865ab855 100644 --- a/branches/sca-equinox/itest/validation/src/test/java/binding/wsxml/WsdlBindingDoesNotMatchTestCase.java +++ b/branches/sca-equinox/itest/validation/src/test/java/binding/wsxml/WsdlBindingDoesNotMatchTestCase.java @@ -22,7 +22,6 @@ import junit.framework.TestCase; import org.apache.tuscany.sca.monitor.Monitor; import org.apache.tuscany.sca.monitor.Problem; -import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl; import domain.CustomCompositeBuilder; @@ -52,7 +51,7 @@ public class WsdlBindingDoesNotMatchTestCase extends TestCase { public void testCalculator() { Monitor monitor = customDomain.getMonitorInstance(); - Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem(); + Problem problem = monitor.getLastProblem(); assertNotNull(problem); assertEquals("WsdlBindingDoesNotMatch", problem.getMessageId()); diff --git a/branches/sca-equinox/itest/validation/src/test/java/binding/wsxml/WsdlPortTypeDoesNotMatchTestCase.java b/branches/sca-equinox/itest/validation/src/test/java/binding/wsxml/WsdlPortTypeDoesNotMatchTestCase.java index 1ef5f7b00a..3be31d5994 100644 --- a/branches/sca-equinox/itest/validation/src/test/java/binding/wsxml/WsdlPortTypeDoesNotMatchTestCase.java +++ b/branches/sca-equinox/itest/validation/src/test/java/binding/wsxml/WsdlPortTypeDoesNotMatchTestCase.java @@ -22,7 +22,6 @@ import junit.framework.TestCase; import org.apache.tuscany.sca.monitor.Monitor;
import org.apache.tuscany.sca.monitor.Problem;
-import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl;
import domain.CustomCompositeBuilder;
@@ -52,7 +51,7 @@ public class WsdlPortTypeDoesNotMatchTestCase extends TestCase { public void testCalculator() {
Monitor monitor = customDomain.getMonitorInstance();
- Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
+ Problem problem = monitor.getLastProblem();
assertNotNull(problem);
assertEquals("WsdlPortTypeDoesNotMatch", problem.getMessageId());
diff --git a/branches/sca-equinox/itest/validation/src/test/java/binding/wsxml/WsdlServiceDoesNotMatchTestCase.java b/branches/sca-equinox/itest/validation/src/test/java/binding/wsxml/WsdlServiceDoesNotMatchTestCase.java index a0a7d12b9f..303b8299ad 100644 --- a/branches/sca-equinox/itest/validation/src/test/java/binding/wsxml/WsdlServiceDoesNotMatchTestCase.java +++ b/branches/sca-equinox/itest/validation/src/test/java/binding/wsxml/WsdlServiceDoesNotMatchTestCase.java @@ -22,7 +22,6 @@ import junit.framework.TestCase; import org.apache.tuscany.sca.monitor.Monitor; import org.apache.tuscany.sca.monitor.Problem; -import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl; import domain.CustomCompositeBuilder; @@ -52,7 +51,7 @@ public class WsdlServiceDoesNotMatchTestCase extends TestCase { public void testCalculator() { Monitor monitor = customDomain.getMonitorInstance(); - Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem(); + Problem problem = monitor.getLastProblem(); assertNotNull(problem); assertEquals("WsdlServiceDoesNotMatch", problem.getMessageId()); diff --git a/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/ComponentReferenceTargetNotFoundTestCase.java b/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/ComponentReferenceTargetNotFoundTestCase.java index 555810f453..18809f6af2 100644 --- a/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/ComponentReferenceTargetNotFoundTestCase.java +++ b/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/ComponentReferenceTargetNotFoundTestCase.java @@ -27,7 +27,6 @@ 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.Problem; -import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl; import org.apache.tuscany.sca.node.SCAClient; import org.apache.tuscany.sca.node.SCAContribution; import org.apache.tuscany.sca.node.SCANode; @@ -68,7 +67,7 @@ public class ComponentReferenceTargetNotFoundTestCase extends TestCase { UtilityExtensionPoint utilities = registry.getExtensionPoint(UtilityExtensionPoint.class); MonitorFactory monitorFactory = utilities.getUtility(MonitorFactory.class); Monitor monitor = monitorFactory.createMonitor(); - Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem(); + Problem problem = monitor.getLastProblem(); assertNotNull(problem); assertEquals("ComponentReferenceTargetNotFound", problem.getMessageId()); diff --git a/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/DuplicateComponentNameTestCase.java b/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/DuplicateComponentNameTestCase.java index 4d70df1102..a7b23ed10f 100644 --- a/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/DuplicateComponentNameTestCase.java +++ b/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/DuplicateComponentNameTestCase.java @@ -22,7 +22,6 @@ import junit.framework.TestCase; import org.apache.tuscany.sca.monitor.Monitor; import org.apache.tuscany.sca.monitor.Problem; -import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl; import domain.CustomCompositeBuilder; @@ -53,7 +52,7 @@ public class DuplicateComponentNameTestCase extends TestCase { public void testCalculator() { Monitor monitor = customDomain.getMonitorInstance(); - Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem(); + Problem problem = monitor.getLastProblem(); assertNotNull(problem); assertEquals("DuplicateComponentName", problem.getMessageId()); diff --git a/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/DuplicateImplementationPropertyNameTestCase.java b/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/DuplicateImplementationPropertyNameTestCase.java index 7593f39991..83d3064381 100644 --- a/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/DuplicateImplementationPropertyNameTestCase.java +++ b/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/DuplicateImplementationPropertyNameTestCase.java @@ -27,7 +27,6 @@ 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.Problem; -import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl; import org.apache.tuscany.sca.node.SCAContribution; import org.apache.tuscany.sca.node.SCANode; import org.apache.tuscany.sca.node.SCANodeFactory; @@ -56,7 +55,7 @@ public class DuplicateImplementationPropertyNameTestCase extends TestCase { UtilityExtensionPoint utilities = registry.getExtensionPoint(UtilityExtensionPoint.class); MonitorFactory monitorFactory = utilities.getUtility(MonitorFactory.class); Monitor monitor = monitorFactory.createMonitor(); - Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem(); + Problem problem = monitor.getLastProblem(); assertNotNull(problem); assertEquals("DuplicateImplementationPropertyName", problem.getMessageId()); diff --git a/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/DuplicateImplementationReferenceNameTestCase.java b/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/DuplicateImplementationReferenceNameTestCase.java index 0a711175dc..5b59a69f86 100644 --- a/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/DuplicateImplementationReferenceNameTestCase.java +++ b/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/DuplicateImplementationReferenceNameTestCase.java @@ -27,7 +27,6 @@ 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.Problem; -import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl; import org.apache.tuscany.sca.node.SCAContribution; import org.apache.tuscany.sca.node.SCANode; import org.apache.tuscany.sca.node.SCANodeFactory; @@ -57,7 +56,7 @@ public class DuplicateImplementationReferenceNameTestCase extends TestCase { UtilityExtensionPoint utilities = registry.getExtensionPoint(UtilityExtensionPoint.class); MonitorFactory monitorFactory = utilities.getUtility(MonitorFactory.class); Monitor monitor = monitorFactory.createMonitor(); - Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem(); + Problem problem = monitor.getLastProblem(); assertNotNull(problem); assertEquals("DuplicateImplementationReferenceName", problem.getMessageId()); diff --git a/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/DuplicatePropertyNameTestCase.java b/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/DuplicatePropertyNameTestCase.java index 10660795a7..13534d698d 100644 --- a/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/DuplicatePropertyNameTestCase.java +++ b/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/DuplicatePropertyNameTestCase.java @@ -27,7 +27,6 @@ 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.Problem; -import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl; import org.apache.tuscany.sca.node.SCAClient; import org.apache.tuscany.sca.node.SCAContribution; import org.apache.tuscany.sca.node.SCANode; @@ -62,7 +61,7 @@ public class DuplicatePropertyNameTestCase extends TestCase { UtilityExtensionPoint utilities = registry.getExtensionPoint(UtilityExtensionPoint.class); MonitorFactory monitorFactory = utilities.getUtility(MonitorFactory.class); Monitor monitor = monitorFactory.createMonitor(); - Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem(); + Problem problem = monitor.getLastProblem(); assertNotNull(problem); assertEquals("DuplicateComponentPropertyName", problem.getMessageId()); diff --git a/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/DuplicateReferenceNameTestCase.java b/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/DuplicateReferenceNameTestCase.java index 15b4b15989..627e1e975e 100644 --- a/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/DuplicateReferenceNameTestCase.java +++ b/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/DuplicateReferenceNameTestCase.java @@ -27,7 +27,6 @@ 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.Problem; -import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl; import org.apache.tuscany.sca.node.SCAClient; import org.apache.tuscany.sca.node.SCAContribution; import org.apache.tuscany.sca.node.SCANode; @@ -62,7 +61,7 @@ public class DuplicateReferenceNameTestCase extends TestCase { UtilityExtensionPoint utilities = registry.getExtensionPoint(UtilityExtensionPoint.class); MonitorFactory monitorFactory = utilities.getUtility(MonitorFactory.class); Monitor monitor = monitorFactory.createMonitor(); - Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem(); + Problem problem = monitor.getLastProblem(); assertNotNull(problem); assertEquals("DuplicateComponentReferenceName", problem.getMessageId()); diff --git a/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/MultipleBindingsForServiceTestCase.java b/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/MultipleBindingsForServiceTestCase.java index 55741ec2ef..2f66235684 100644 --- a/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/MultipleBindingsForServiceTestCase.java +++ b/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/MultipleBindingsForServiceTestCase.java @@ -27,7 +27,6 @@ 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.Problem; -import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl; import org.apache.tuscany.sca.node.SCAClient; import org.apache.tuscany.sca.node.SCAContribution; import org.apache.tuscany.sca.node.SCANode; @@ -62,7 +61,7 @@ public class MultipleBindingsForServiceTestCase extends TestCase { UtilityExtensionPoint utilities = registry.getExtensionPoint(UtilityExtensionPoint.class); MonitorFactory monitorFactory = utilities.getUtility(MonitorFactory.class); Monitor monitor = monitorFactory.createMonitor(); - Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem(); + Problem problem = monitor.getLastProblem(); assertNotNull(problem); assertEquals("MultipleBindingsForService", problem.getMessageId()); diff --git a/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/NoComponentImplementationTestCase.java b/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/NoComponentImplementationTestCase.java index 7f8bd68e5e..48c165ab99 100644 --- a/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/NoComponentImplementationTestCase.java +++ b/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/NoComponentImplementationTestCase.java @@ -27,7 +27,6 @@ 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.Problem; -import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl; import org.apache.tuscany.sca.node.SCAContribution; import org.apache.tuscany.sca.node.SCANode; import org.apache.tuscany.sca.node.SCANodeFactory; @@ -58,7 +57,7 @@ public class NoComponentImplementationTestCase extends TestCase { UtilityExtensionPoint utilities = registry.getExtensionPoint(UtilityExtensionPoint.class); MonitorFactory monitorFactory = utilities.getUtility(MonitorFactory.class); Monitor monitor = monitorFactory.createMonitor(); - Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem(); + Problem problem = monitor.getLastProblem(); assertNotNull(problem); assertEquals("NoComponentImplementation", problem.getMessageId()); diff --git a/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/NoCompositeNamespaceTestCase.java b/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/NoCompositeNamespaceTestCase.java index 1f26d3a7d6..35789fbd43 100644 --- a/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/NoCompositeNamespaceTestCase.java +++ b/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/NoCompositeNamespaceTestCase.java @@ -27,7 +27,6 @@ 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.Problem; -import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl; import org.apache.tuscany.sca.node.SCAClient; import org.apache.tuscany.sca.node.SCAContribution; import org.apache.tuscany.sca.node.SCANode; @@ -62,7 +61,7 @@ public class NoCompositeNamespaceTestCase extends TestCase { UtilityExtensionPoint utilities = registry.getExtensionPoint(UtilityExtensionPoint.class); MonitorFactory monitorFactory = utilities.getUtility(MonitorFactory.class); Monitor monitor = monitorFactory.createMonitor(); - Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem(); + Problem problem = monitor.getLastProblem(); assertNotNull(problem); assertEquals("NoCompositeNamespace", problem.getMessageId()); diff --git a/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/NoMatchingBindingTestCase.java b/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/NoMatchingBindingTestCase.java index d398efc9ea..94d0e50312 100644 --- a/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/NoMatchingBindingTestCase.java +++ b/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/NoMatchingBindingTestCase.java @@ -27,7 +27,6 @@ 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.Problem; -import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl; import org.apache.tuscany.sca.node.SCAClient; import org.apache.tuscany.sca.node.SCAContribution; import org.apache.tuscany.sca.node.SCANode; @@ -64,7 +63,7 @@ public class NoMatchingBindingTestCase extends TestCase { UtilityExtensionPoint utilities = registry.getExtensionPoint(UtilityExtensionPoint.class); MonitorFactory monitorFactory = utilities.getUtility(MonitorFactory.class); Monitor monitor = monitorFactory.createMonitor(); - Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem(); + Problem problem = monitor.getLastProblem(); assertNotNull(problem); assertEquals("NoMatchingBinding", problem.getMessageId()); diff --git a/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/PromotedReferenceNotFoundTestCase.java b/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/PromotedReferenceNotFoundTestCase.java index 9d2f028dea..afd533bcf4 100644 --- a/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/PromotedReferenceNotFoundTestCase.java +++ b/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/PromotedReferenceNotFoundTestCase.java @@ -27,7 +27,6 @@ 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.Problem; -import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl; import org.apache.tuscany.sca.node.SCAClient; import org.apache.tuscany.sca.node.SCAContribution; import org.apache.tuscany.sca.node.SCANode; @@ -62,7 +61,7 @@ public class PromotedReferenceNotFoundTestCase extends TestCase { UtilityExtensionPoint utilities = registry.getExtensionPoint(UtilityExtensionPoint.class); MonitorFactory monitorFactory = utilities.getUtility(MonitorFactory.class); Monitor monitor = monitorFactory.createMonitor(); - Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem(); + Problem problem = monitor.getLastProblem(); assertNotNull(problem); assertEquals("PromotedReferenceNotFound", problem.getMessageId()); diff --git a/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/PromotedServiceNotFoundTestCase.java b/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/PromotedServiceNotFoundTestCase.java index 7f836e4b01..6ca4348f26 100644 --- a/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/PromotedServiceNotFoundTestCase.java +++ b/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/PromotedServiceNotFoundTestCase.java @@ -27,7 +27,6 @@ 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.Problem; -import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl; import org.apache.tuscany.sca.node.SCAClient; import org.apache.tuscany.sca.node.SCAContribution; import org.apache.tuscany.sca.node.SCANode; @@ -62,7 +61,7 @@ public class PromotedServiceNotFoundTestCase extends TestCase { UtilityExtensionPoint utilities = registry.getExtensionPoint(UtilityExtensionPoint.class); MonitorFactory monitorFactory = utilities.getUtility(MonitorFactory.class); Monitor monitor = monitorFactory.createMonitor(); - Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem(); + Problem problem = monitor.getLastProblem(); assertNotNull(problem); assertEquals("PromotedServiceNotFound", problem.getMessageId()); diff --git a/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/PropertyAttributeMustSupplyNullTestCase.java b/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/PropertyAttributeMustSupplyNullTestCase.java index 04c2594cd3..616d2743e2 100644 --- a/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/PropertyAttributeMustSupplyNullTestCase.java +++ b/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/PropertyAttributeMustSupplyNullTestCase.java @@ -27,7 +27,6 @@ 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.Problem; -import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl; import org.apache.tuscany.sca.node.SCAClient; import org.apache.tuscany.sca.node.SCAContribution; import org.apache.tuscany.sca.node.SCANode; @@ -62,7 +61,7 @@ public class PropertyAttributeMustSupplyNullTestCase extends TestCase { UtilityExtensionPoint utilities = registry.getExtensionPoint(UtilityExtensionPoint.class); MonitorFactory monitorFactory = utilities.getUtility(MonitorFactory.class); Monitor monitor = monitorFactory.createMonitor(); - Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem(); + Problem problem = monitor.getLastProblem(); assertNotNull(problem); assertEquals("PropertyMustSupplyNull", problem.getMessageId()); diff --git a/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/PropertyAttributeTestCase.java b/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/PropertyAttributeTestCase.java index 3dabfecbb6..c5b3026322 100644 --- a/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/PropertyAttributeTestCase.java +++ b/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/PropertyAttributeTestCase.java @@ -27,7 +27,6 @@ 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.Problem; -import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl; import org.apache.tuscany.sca.node.SCAClient; import org.apache.tuscany.sca.node.SCAContribution; import org.apache.tuscany.sca.node.SCANode; @@ -62,7 +61,7 @@ public class PropertyAttributeTestCase extends TestCase { UtilityExtensionPoint utilities = registry.getExtensionPoint(UtilityExtensionPoint.class); MonitorFactory monitorFactory = utilities.getUtility(MonitorFactory.class); Monitor monitor = monitorFactory.createMonitor(); - Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem(); + Problem problem = monitor.getLastProblem(); assertNotNull(problem); assertEquals("PropertyMustSupplyIncompatible", problem.getMessageId()); diff --git a/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/PropertyNotFoundTestCase.java b/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/PropertyNotFoundTestCase.java index 0dca8ed1df..a096cfd41c 100644 --- a/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/PropertyNotFoundTestCase.java +++ b/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/PropertyNotFoundTestCase.java @@ -27,7 +27,6 @@ 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.Problem; -import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl; import org.apache.tuscany.sca.node.SCAClient; import org.apache.tuscany.sca.node.SCAContribution; import org.apache.tuscany.sca.node.SCANode; @@ -62,7 +61,7 @@ public class PropertyNotFoundTestCase extends TestCase { UtilityExtensionPoint utilities = registry.getExtensionPoint(UtilityExtensionPoint.class); MonitorFactory monitorFactory = utilities.getUtility(MonitorFactory.class); Monitor monitor = monitorFactory.createMonitor(); - Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem(); + Problem problem = monitor.getLastProblem(); assertNotNull(problem); assertEquals("PropertyNotFound", problem.getMessageId()); diff --git a/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/PropertyOverrideManyAttributeTestCase.java b/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/PropertyOverrideManyAttributeTestCase.java index 37f7ef352e..4558bc7df3 100644 --- a/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/PropertyOverrideManyAttributeTestCase.java +++ b/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/PropertyOverrideManyAttributeTestCase.java @@ -27,7 +27,6 @@ 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.Problem; -import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl; import org.apache.tuscany.sca.node.SCAClient; import org.apache.tuscany.sca.node.SCAContribution; import org.apache.tuscany.sca.node.SCANode; @@ -62,7 +61,7 @@ public class PropertyOverrideManyAttributeTestCase extends TestCase { UtilityExtensionPoint utilities = registry.getExtensionPoint(UtilityExtensionPoint.class); MonitorFactory monitorFactory = utilities.getUtility(MonitorFactory.class); Monitor monitor = monitorFactory.createMonitor(); - Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem(); + Problem problem = monitor.getLastProblem(); assertNotNull(problem); assertEquals("PropertyOverrideManyAttribute", problem.getMessageId()); diff --git a/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/ReferenceIncompatibleComponentInterfaceTestCase.java b/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/ReferenceIncompatibleComponentInterfaceTestCase.java index ab57283a9e..cff24f6616 100644 --- a/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/ReferenceIncompatibleComponentInterfaceTestCase.java +++ b/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/ReferenceIncompatibleComponentInterfaceTestCase.java @@ -27,7 +27,6 @@ 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.Problem; -import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl; import org.apache.tuscany.sca.node.SCAClient; import org.apache.tuscany.sca.node.SCAContribution; import org.apache.tuscany.sca.node.SCANode; @@ -62,7 +61,7 @@ public class ReferenceIncompatibleComponentInterfaceTestCase extends TestCase { UtilityExtensionPoint utilities = registry.getExtensionPoint(UtilityExtensionPoint.class); MonitorFactory monitorFactory = utilities.getUtility(MonitorFactory.class); Monitor monitor = monitorFactory.createMonitor(); - Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem(); + Problem problem = monitor.getLastProblem(); assertNotNull(problem); assertEquals("ReferenceIncompatibleComponentInterface", problem.getMessageId()); diff --git a/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/ReferenceIncompatibleInterfaceTestCase.java b/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/ReferenceIncompatibleInterfaceTestCase.java index 4c3cc3856a..c6b4c65235 100644 --- a/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/ReferenceIncompatibleInterfaceTestCase.java +++ b/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/ReferenceIncompatibleInterfaceTestCase.java @@ -27,7 +27,6 @@ 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.Problem; -import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl; import org.apache.tuscany.sca.node.SCAClient; import org.apache.tuscany.sca.node.SCAContribution; import org.apache.tuscany.sca.node.SCANode; @@ -62,7 +61,7 @@ public class ReferenceIncompatibleInterfaceTestCase extends TestCase { UtilityExtensionPoint utilities = registry.getExtensionPoint(UtilityExtensionPoint.class); MonitorFactory monitorFactory = utilities.getUtility(MonitorFactory.class); Monitor monitor = monitorFactory.createMonitor(); - Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem(); + Problem problem = monitor.getLastProblem(); assertNotNull(problem); assertEquals("ReferenceIncompatibleInterface", problem.getMessageId()); diff --git a/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/ReferenceIncompatibleMultiplicityTestCase.java b/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/ReferenceIncompatibleMultiplicityTestCase.java index 06fb06f6ad..c4ba0ecbcd 100644 --- a/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/ReferenceIncompatibleMultiplicityTestCase.java +++ b/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/ReferenceIncompatibleMultiplicityTestCase.java @@ -27,7 +27,6 @@ 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.Problem; -import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl; import org.apache.tuscany.sca.node.SCAClient; import org.apache.tuscany.sca.node.SCAContribution; import org.apache.tuscany.sca.node.SCANode; @@ -62,7 +61,7 @@ public class ReferenceIncompatibleMultiplicityTestCase extends TestCase { UtilityExtensionPoint utilities = registry.getExtensionPoint(UtilityExtensionPoint.class); MonitorFactory monitorFactory = utilities.getUtility(MonitorFactory.class); Monitor monitor = monitorFactory.createMonitor(); - Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem(); + Problem problem = monitor.getLastProblem(); assertNotNull(problem); assertEquals("ReferenceIncompatibleMultiplicity", problem.getMessageId()); diff --git a/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/ReferenceNotFoundTestCase.java b/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/ReferenceNotFoundTestCase.java index 6bacc8b05e..ab2c373486 100644 --- a/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/ReferenceNotFoundTestCase.java +++ b/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/ReferenceNotFoundTestCase.java @@ -18,21 +18,10 @@ */ package calculator.warning; -import java.io.File; - import junit.framework.TestCase; -import org.apache.tuscany.sca.core.ExtensionPointRegistry; -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.Problem; -import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl; -import org.apache.tuscany.sca.node.SCAClient; -import org.apache.tuscany.sca.node.SCAContribution; -import org.apache.tuscany.sca.node.SCANode; -import org.apache.tuscany.sca.node.SCANodeFactory; -import org.apache.tuscany.sca.node.impl.NodeImpl; import domain.CustomCompositeBuilder; @@ -73,7 +62,7 @@ public class ReferenceNotFoundTestCase extends TestCase { public void testCalculator() throws Exception { Monitor monitor = customDomain.getMonitorInstance(); - Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem(); + Problem problem = monitor.getLastProblem(); assertNotNull(problem); assertEquals("ReferenceNotFound", problem.getMessageId()); diff --git a/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/ReferenceWithoutTargetsTestCase.java b/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/ReferenceWithoutTargetsTestCase.java index d615857105..c75d2a0e9d 100644 --- a/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/ReferenceWithoutTargetsTestCase.java +++ b/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/ReferenceWithoutTargetsTestCase.java @@ -27,7 +27,6 @@ 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.Problem; -import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl; import org.apache.tuscany.sca.node.SCAClient; import org.apache.tuscany.sca.node.SCAContribution; import org.apache.tuscany.sca.node.SCANode; @@ -62,7 +61,7 @@ public class ReferenceWithoutTargetsTestCase extends TestCase { UtilityExtensionPoint utilities = registry.getExtensionPoint(UtilityExtensionPoint.class); MonitorFactory monitorFactory = utilities.getUtility(MonitorFactory.class); Monitor monitor = monitorFactory.createMonitor(); - Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem(); + Problem problem = monitor.getLastProblem(); assertNotNull(problem); assertEquals("ReferenceWithoutTargets", problem.getMessageId()); diff --git a/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/ServiceNotFoundForComponentServiceTestCase.java b/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/ServiceNotFoundForComponentServiceTestCase.java index e9b920119a..1215ddf06a 100644 --- a/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/ServiceNotFoundForComponentServiceTestCase.java +++ b/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/ServiceNotFoundForComponentServiceTestCase.java @@ -27,7 +27,6 @@ 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.Problem; -import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl; import org.apache.tuscany.sca.node.SCAClient; import org.apache.tuscany.sca.node.SCAContribution; import org.apache.tuscany.sca.node.SCANode; @@ -62,7 +61,7 @@ public class ServiceNotFoundForComponentServiceTestCase extends TestCase { UtilityExtensionPoint utilities = registry.getExtensionPoint(UtilityExtensionPoint.class); MonitorFactory monitorFactory = utilities.getUtility(MonitorFactory.class); Monitor monitor = monitorFactory.createMonitor(); - Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem(); + Problem problem = monitor.getLastProblem(); assertNotNull(problem); assertEquals("ServiceNotFoundForComponentService", problem.getMessageId()); diff --git a/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/UnresolvedComponentImplementationTestCase.java b/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/UnresolvedComponentImplementationTestCase.java index 4d950e30ff..31cf0779b0 100644 --- a/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/UnresolvedComponentImplementationTestCase.java +++ b/branches/sca-equinox/itest/validation/src/test/java/calculator/warning/UnresolvedComponentImplementationTestCase.java @@ -27,7 +27,6 @@ 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.Problem; -import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl; import org.apache.tuscany.sca.node.SCAContribution; import org.apache.tuscany.sca.node.SCANode; import org.apache.tuscany.sca.node.SCANodeFactory; @@ -58,7 +57,7 @@ public class UnresolvedComponentImplementationTestCase extends TestCase { UtilityExtensionPoint utilities = registry.getExtensionPoint(UtilityExtensionPoint.class); MonitorFactory monitorFactory = utilities.getUtility(MonitorFactory.class); Monitor monitor = monitorFactory.createMonitor(); - Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem(); + Problem problem = monitor.getLastProblem(); assertNotNull(problem); assertEquals("UnresolvedComponentImplementation", problem.getMessageId()); diff --git a/branches/sca-equinox/itest/validation/src/test/java/contribution/java/AttributePackageMissingTestCase.java b/branches/sca-equinox/itest/validation/src/test/java/contribution/java/AttributePackageMissingTestCase.java index 04135ab2cc..60b0c51fef 100644 --- a/branches/sca-equinox/itest/validation/src/test/java/contribution/java/AttributePackageMissingTestCase.java +++ b/branches/sca-equinox/itest/validation/src/test/java/contribution/java/AttributePackageMissingTestCase.java @@ -22,7 +22,6 @@ import junit.framework.TestCase; import org.apache.tuscany.sca.monitor.Monitor; import org.apache.tuscany.sca.monitor.Problem; -import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl; import domain.CustomCompositeBuilder; @@ -52,7 +51,7 @@ public class AttributePackageMissingTestCase extends TestCase { public void testCalculator() { Monitor monitor = customDomain.getMonitorInstance(); - Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem(); + Problem problem = monitor.getLastProblem(); assertNotNull(problem); assertEquals("AttributePackageMissing", problem.getMessageId()); diff --git a/branches/sca-equinox/itest/validation/src/test/java/contribution/namespace/AttributeNameSpaceMissingTestCase.java b/branches/sca-equinox/itest/validation/src/test/java/contribution/namespace/AttributeNameSpaceMissingTestCase.java index ab0afc6f65..dd38802bbe 100644 --- a/branches/sca-equinox/itest/validation/src/test/java/contribution/namespace/AttributeNameSpaceMissingTestCase.java +++ b/branches/sca-equinox/itest/validation/src/test/java/contribution/namespace/AttributeNameSpaceMissingTestCase.java @@ -22,7 +22,6 @@ import junit.framework.TestCase; import org.apache.tuscany.sca.monitor.Monitor; import org.apache.tuscany.sca.monitor.Problem; -import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl; import domain.CustomCompositeBuilder; @@ -52,7 +51,7 @@ public class AttributeNameSpaceMissingTestCase extends TestCase { public void testCalculator() { Monitor monitor = customDomain.getMonitorInstance(); - Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem(); + Problem problem = monitor.getLastProblem(); assertNotNull(problem); assertEquals("AttributeNameSpaceMissing", problem.getMessageId()); diff --git a/branches/sca-equinox/itest/validation/src/test/java/contribution/resource/AttributeURIMissingTestCase.java b/branches/sca-equinox/itest/validation/src/test/java/contribution/resource/AttributeURIMissingTestCase.java index 69c4d40bc7..d83a4bfed9 100644 --- a/branches/sca-equinox/itest/validation/src/test/java/contribution/resource/AttributeURIMissingTestCase.java +++ b/branches/sca-equinox/itest/validation/src/test/java/contribution/resource/AttributeURIMissingTestCase.java @@ -22,7 +22,6 @@ import junit.framework.TestCase; import org.apache.tuscany.sca.monitor.Monitor; import org.apache.tuscany.sca.monitor.Problem; -import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl; import domain.CustomCompositeBuilder; @@ -52,7 +51,7 @@ public class AttributeURIMissingTestCase extends TestCase { public void testCalculator() { Monitor monitor = customDomain.getMonitorInstance(); - Problem problem = ((DefaultLoggingMonitorImpl)monitor).getProblems().get(0); + Problem problem = monitor.getProblems().get(0); assertNotNull(problem); assertEquals("AttributeURIMissing", problem.getMessageId()); diff --git a/branches/sca-equinox/itest/validation/src/test/java/contribution/xml/AttributeCompositeMissingTestCase.java b/branches/sca-equinox/itest/validation/src/test/java/contribution/xml/AttributeCompositeMissingTestCase.java index 32c1a8b3a8..b64de39c80 100644 --- a/branches/sca-equinox/itest/validation/src/test/java/contribution/xml/AttributeCompositeMissingTestCase.java +++ b/branches/sca-equinox/itest/validation/src/test/java/contribution/xml/AttributeCompositeMissingTestCase.java @@ -22,7 +22,6 @@ import junit.framework.TestCase; import org.apache.tuscany.sca.monitor.Monitor; import org.apache.tuscany.sca.monitor.Problem; -import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl; import domain.CustomCompositeBuilder; @@ -52,7 +51,7 @@ public class AttributeCompositeMissingTestCase extends TestCase { public void testCalculator() { Monitor monitor = customDomain.getMonitorInstance(); - Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem(); + Problem problem = monitor.getLastProblem(); assertNotNull(problem); assertEquals("AttributeCompositeMissing", problem.getMessageId()); diff --git a/branches/sca-equinox/itest/validation/src/test/java/impl/bpel/AttributeUnrecognizedNamespaceTestCase.java b/branches/sca-equinox/itest/validation/src/test/java/impl/bpel/AttributeUnrecognizedNamespaceTestCase.java index 9d97e3611a..690fb97a31 100644 --- a/branches/sca-equinox/itest/validation/src/test/java/impl/bpel/AttributeUnrecognizedNamespaceTestCase.java +++ b/branches/sca-equinox/itest/validation/src/test/java/impl/bpel/AttributeUnrecognizedNamespaceTestCase.java @@ -22,7 +22,6 @@ import junit.framework.TestCase; import org.apache.tuscany.sca.monitor.Monitor; import org.apache.tuscany.sca.monitor.Problem; -import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl; import domain.CustomCompositeBuilder; @@ -52,7 +51,7 @@ public class AttributeUnrecognizedNamespaceTestCase extends TestCase { public void testCalculator() { Monitor monitor = customDomain.getMonitorInstance(); - Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem(); + Problem problem = monitor.getLastProblem(); assertNotNull(problem); assertEquals("AttributeUnrecognizedNamespace", problem.getMessageId()); diff --git a/branches/sca-equinox/itest/validation/src/test/java/impl/bpel/AttributeWithoutNamespaceTestCase.java b/branches/sca-equinox/itest/validation/src/test/java/impl/bpel/AttributeWithoutNamespaceTestCase.java index 80c15dc444..a768535fde 100644 --- a/branches/sca-equinox/itest/validation/src/test/java/impl/bpel/AttributeWithoutNamespaceTestCase.java +++ b/branches/sca-equinox/itest/validation/src/test/java/impl/bpel/AttributeWithoutNamespaceTestCase.java @@ -22,7 +22,6 @@ import junit.framework.TestCase; import org.apache.tuscany.sca.monitor.Monitor; import org.apache.tuscany.sca.monitor.Problem; -import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl; import domain.CustomCompositeBuilder; @@ -52,7 +51,7 @@ public class AttributeWithoutNamespaceTestCase extends TestCase { public void testCalculator() { Monitor monitor = customDomain.getMonitorInstance(); - Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem(); + Problem problem = monitor.getLastProblem(); assertNotNull(problem); assertEquals("AttributeWithoutNamespace", problem.getMessageId()); diff --git a/branches/sca-equinox/itest/validation/src/test/java/impl/bpel/BPELProcessNotFoundTestCase.java b/branches/sca-equinox/itest/validation/src/test/java/impl/bpel/BPELProcessNotFoundTestCase.java index 81e8aecfeb..64d41bdb48 100644 --- a/branches/sca-equinox/itest/validation/src/test/java/impl/bpel/BPELProcessNotFoundTestCase.java +++ b/branches/sca-equinox/itest/validation/src/test/java/impl/bpel/BPELProcessNotFoundTestCase.java @@ -22,7 +22,6 @@ import junit.framework.TestCase; import org.apache.tuscany.sca.monitor.Monitor; import org.apache.tuscany.sca.monitor.Problem; -import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl; import domain.CustomCompositeBuilder; @@ -52,7 +51,7 @@ public class BPELProcessNotFoundTestCase extends TestCase { public void testCalculator() { Monitor monitor = customDomain.getMonitorInstance(); - Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem(); + Problem problem = monitor.getLastProblem(); assertNotNull(problem); assertEquals("BPELProcessNotFound", problem.getMessageId()); diff --git a/branches/sca-equinox/itest/validation/src/test/java/impl/bpel/CannotResolveWSDLReferenceTestCase.java b/branches/sca-equinox/itest/validation/src/test/java/impl/bpel/CannotResolveWSDLReferenceTestCase.java index fb0c525aea..585bd62027 100644 --- a/branches/sca-equinox/itest/validation/src/test/java/impl/bpel/CannotResolveWSDLReferenceTestCase.java +++ b/branches/sca-equinox/itest/validation/src/test/java/impl/bpel/CannotResolveWSDLReferenceTestCase.java @@ -22,7 +22,6 @@ import junit.framework.TestCase; import org.apache.tuscany.sca.monitor.Monitor; import org.apache.tuscany.sca.monitor.Problem; -import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl; import domain.CustomCompositeBuilder; @@ -52,7 +51,7 @@ public class CannotResolveWSDLReferenceTestCase extends TestCase { public void testCalculator() { Monitor monitor = customDomain.getMonitorInstance(); - Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem(); + Problem problem = monitor.getLastProblem(); assertNotNull(problem); assertEquals("CannotResolveWSDLReference", problem.getMessageId()); diff --git a/branches/sca-equinox/itest/validation/src/test/java/impl/bpel/MyRolePartnerRoleNullTestCase.java b/branches/sca-equinox/itest/validation/src/test/java/impl/bpel/MyRolePartnerRoleNullTestCase.java index 445629457e..aab3529fba 100644 --- a/branches/sca-equinox/itest/validation/src/test/java/impl/bpel/MyRolePartnerRoleNullTestCase.java +++ b/branches/sca-equinox/itest/validation/src/test/java/impl/bpel/MyRolePartnerRoleNullTestCase.java @@ -22,7 +22,6 @@ import junit.framework.TestCase; import org.apache.tuscany.sca.monitor.Monitor; import org.apache.tuscany.sca.monitor.Problem; -import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl; import domain.CustomCompositeBuilder; @@ -52,7 +51,7 @@ public class MyRolePartnerRoleNullTestCase extends TestCase { public void testCalculator() { Monitor monitor = customDomain.getMonitorInstance(); - Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem(); + Problem problem = monitor.getLastProblem(); assertNotNull(problem); assertEquals("MyRolePartnerRoleNull", problem.getMessageId()); diff --git a/branches/sca-equinox/itest/validation/src/test/java/impl/bpel/PartnerLinkHasBothAttrTestCase.java b/branches/sca-equinox/itest/validation/src/test/java/impl/bpel/PartnerLinkHasBothAttrTestCase.java index 00b904ae65..4c3226f4c8 100644 --- a/branches/sca-equinox/itest/validation/src/test/java/impl/bpel/PartnerLinkHasBothAttrTestCase.java +++ b/branches/sca-equinox/itest/validation/src/test/java/impl/bpel/PartnerLinkHasBothAttrTestCase.java @@ -21,7 +21,7 @@ package impl.bpel; import junit.framework.TestCase; import org.apache.tuscany.sca.monitor.Monitor; -import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl; +import org.apache.tuscany.sca.monitor.Problem; import domain.CustomCompositeBuilder; @@ -49,10 +49,19 @@ public class PartnerLinkHasBothAttrTestCase extends TestCase { //nothing to do } + private static boolean isMessageLogged(Monitor monitor, String messageId) { + for (Problem problem : monitor.getProblems()){ + if (problem.getMessageId().equals(messageId)){ + return true; + } + } + return false; + } + public void testCalculator() { Monitor monitor = customDomain.getMonitorInstance(); - assertTrue(((DefaultLoggingMonitorImpl)monitor).isMessageLogged("PartnerLinkHasBothAttr")); - /*Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem(); + assertTrue(isMessageLogged(monitor, "PartnerLinkHasBothAttr")); + /*Problem problem = monitor.getLastLoggedProblem(); assertNotNull(problem); assertEquals("PartnerLinkHasBothAttr", problem.getMessageId());*/ } diff --git a/branches/sca-equinox/itest/validation/src/test/java/impl/bpel/PartnerLinkNoMatchingTypeTestCase.java b/branches/sca-equinox/itest/validation/src/test/java/impl/bpel/PartnerLinkNoMatchingTypeTestCase.java index b7a4ee6fef..b9c0b68f7e 100644 --- a/branches/sca-equinox/itest/validation/src/test/java/impl/bpel/PartnerLinkNoMatchingTypeTestCase.java +++ b/branches/sca-equinox/itest/validation/src/test/java/impl/bpel/PartnerLinkNoMatchingTypeTestCase.java @@ -22,7 +22,6 @@ import junit.framework.TestCase; import org.apache.tuscany.sca.monitor.Monitor; import org.apache.tuscany.sca.monitor.Problem; -import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl; import domain.CustomCompositeBuilder; @@ -52,7 +51,7 @@ public class PartnerLinkNoMatchingTypeTestCase extends TestCase { public void testCalculator() { Monitor monitor = customDomain.getMonitorInstance(); - Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem(); + Problem problem = monitor.getLastProblem(); assertNotNull(problem); assertEquals("PartnerLinkNoMatchingType", problem.getMessageId()); diff --git a/branches/sca-equinox/itest/validation/src/test/java/impl/bpel/PartnerLinkTypeNoRolesTestCase.java b/branches/sca-equinox/itest/validation/src/test/java/impl/bpel/PartnerLinkTypeNoRolesTestCase.java index 32d3211f36..fc32e96b52 100644 --- a/branches/sca-equinox/itest/validation/src/test/java/impl/bpel/PartnerLinkTypeNoRolesTestCase.java +++ b/branches/sca-equinox/itest/validation/src/test/java/impl/bpel/PartnerLinkTypeNoRolesTestCase.java @@ -21,7 +21,7 @@ package impl.bpel; import junit.framework.TestCase; import org.apache.tuscany.sca.monitor.Monitor; -import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl; +import org.apache.tuscany.sca.monitor.Problem; import domain.CustomCompositeBuilder; @@ -49,10 +49,19 @@ public class PartnerLinkTypeNoRolesTestCase extends TestCase { //nothing to do } + private static boolean isMessageLogged(Monitor monitor, String messageId) { + for (Problem problem : monitor.getProblems()){ + if (problem.getMessageId().equals(messageId)){ + return true; + } + } + return false; + } + public void testCalculator() { Monitor monitor = customDomain.getMonitorInstance(); - assertTrue(((DefaultLoggingMonitorImpl)monitor).isMessageLogged("PartnerLinkTypeNoRoles")); - /*Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem(); + assertTrue(isMessageLogged(monitor, "PartnerLinkTypeNoRoles")); + /*Problem problem = monitor.getLastLoggedProblem(); assertNotNull(problem); assertEquals("PartnerLinkTypeNoRoles", problem.getMessageId());*/ diff --git a/branches/sca-equinox/itest/validation/src/test/java/impl/ejb/EJBLinkAttributeMissingTestCase.java b/branches/sca-equinox/itest/validation/src/test/java/impl/ejb/EJBLinkAttributeMissingTestCase.java index b31451c433..4b367f85ef 100644 --- a/branches/sca-equinox/itest/validation/src/test/java/impl/ejb/EJBLinkAttributeMissingTestCase.java +++ b/branches/sca-equinox/itest/validation/src/test/java/impl/ejb/EJBLinkAttributeMissingTestCase.java @@ -22,7 +22,6 @@ import junit.framework.TestCase; import org.apache.tuscany.sca.monitor.Monitor; import org.apache.tuscany.sca.monitor.Problem; -import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl; import domain.CustomCompositeBuilder; @@ -52,7 +51,7 @@ public class EJBLinkAttributeMissingTestCase extends TestCase { public void testCalculator() { Monitor monitor = customDomain.getMonitorInstance(); - Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem(); + Problem problem = monitor.getLastProblem(); assertNotNull(problem); assertEquals("EJBLinkAttributeMissing", problem.getMessageId()); diff --git a/branches/sca-equinox/itest/validation/src/test/java/impl/java/ClassNotFoundExceptionTestCase.java b/branches/sca-equinox/itest/validation/src/test/java/impl/java/ClassNotFoundExceptionTestCase.java index 3a7745722a..969690acaf 100644 --- a/branches/sca-equinox/itest/validation/src/test/java/impl/java/ClassNotFoundExceptionTestCase.java +++ b/branches/sca-equinox/itest/validation/src/test/java/impl/java/ClassNotFoundExceptionTestCase.java @@ -22,7 +22,6 @@ import junit.framework.TestCase; import org.apache.tuscany.sca.monitor.Monitor; import org.apache.tuscany.sca.monitor.Problem; -import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl; import domain.CustomCompositeBuilder; @@ -52,7 +51,7 @@ public class ClassNotFoundExceptionTestCase extends TestCase { public void testCalculator() { Monitor monitor = customDomain.getMonitorInstance(); - Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem(); + Problem problem = monitor.getLastProblem(); assertNotNull(problem); assertEquals("ClassNotFoundException", problem.getMessageId()); diff --git a/branches/sca-equinox/itest/validation/src/test/java/impl/java/ContributionResolveExceptionTestCase.java b/branches/sca-equinox/itest/validation/src/test/java/impl/java/ContributionResolveExceptionTestCase.java index 59fc3ce79c..eef964e274 100644 --- a/branches/sca-equinox/itest/validation/src/test/java/impl/java/ContributionResolveExceptionTestCase.java +++ b/branches/sca-equinox/itest/validation/src/test/java/impl/java/ContributionResolveExceptionTestCase.java @@ -22,7 +22,6 @@ import junit.framework.TestCase; import org.apache.tuscany.sca.monitor.Monitor; import org.apache.tuscany.sca.monitor.Problem; -import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl; import domain.CustomCompositeBuilder; @@ -52,7 +51,7 @@ public class ContributionResolveExceptionTestCase extends TestCase { public void testCalculator() { Monitor monitor = customDomain.getMonitorInstance(); - Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem(); + Problem problem = monitor.getLastProblem(); assertNotNull(problem); diff --git a/branches/sca-equinox/itest/validation/src/test/java/impl/resource/CouldNotResolveLocationTestCase.java b/branches/sca-equinox/itest/validation/src/test/java/impl/resource/CouldNotResolveLocationTestCase.java index 14ba8e992e..c2fd7b3410 100644 --- a/branches/sca-equinox/itest/validation/src/test/java/impl/resource/CouldNotResolveLocationTestCase.java +++ b/branches/sca-equinox/itest/validation/src/test/java/impl/resource/CouldNotResolveLocationTestCase.java @@ -23,7 +23,6 @@ import junit.framework.TestCase; import org.apache.tuscany.sca.monitor.Monitor; import org.apache.tuscany.sca.monitor.Problem; -import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl; import domain.CustomCompositeBuilder; @@ -51,7 +50,7 @@ public class CouldNotResolveLocationTestCase extends TestCase { public void testCalculator() { Monitor monitor = customDomain.getMonitorInstance(); - Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem(); + Problem problem = monitor.getLastProblem(); Assert.assertNotNull(problem); Assert.assertEquals("CouldNotResolveLocation", problem.getMessageId()); diff --git a/branches/sca-equinox/itest/validation/src/test/java/impl/resource/LocationAttributeMissingTestCase.java b/branches/sca-equinox/itest/validation/src/test/java/impl/resource/LocationAttributeMissingTestCase.java index 461895f824..c6a58d2b88 100644 --- a/branches/sca-equinox/itest/validation/src/test/java/impl/resource/LocationAttributeMissingTestCase.java +++ b/branches/sca-equinox/itest/validation/src/test/java/impl/resource/LocationAttributeMissingTestCase.java @@ -22,7 +22,6 @@ import junit.framework.TestCase; import org.apache.tuscany.sca.monitor.Monitor; import org.apache.tuscany.sca.monitor.Problem; -import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl; import domain.CustomCompositeBuilder; @@ -52,7 +51,7 @@ public class LocationAttributeMissingTestCase extends TestCase { public void testCalculator() { Monitor monitor = customDomain.getMonitorInstance(); - Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem(); + Problem problem = monitor.getLastProblem(); assertNotNull(problem); assertEquals("LocationAttributeMissing", problem.getMessageId()); diff --git a/branches/sca-equinox/itest/validation/src/test/java/impl/spring/ContributionResolveExceptionTestCase.java b/branches/sca-equinox/itest/validation/src/test/java/impl/spring/ContributionResolveExceptionTestCase.java index 9b7dbef3dd..ff0b2f3589 100644 --- a/branches/sca-equinox/itest/validation/src/test/java/impl/spring/ContributionResolveExceptionTestCase.java +++ b/branches/sca-equinox/itest/validation/src/test/java/impl/spring/ContributionResolveExceptionTestCase.java @@ -21,7 +21,7 @@ package impl.spring; import junit.framework.TestCase; import org.apache.tuscany.sca.monitor.Monitor; -import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl; +import org.apache.tuscany.sca.monitor.Problem; import domain.CustomCompositeBuilder; @@ -48,10 +48,19 @@ public class ContributionResolveExceptionTestCase extends TestCase { protected void tearDown() throws Exception { //node.stop(); } + + private static boolean isMessageLogged(Monitor monitor, String messageId) { + for (Problem problem : monitor.getProblems()){ + if (problem.getMessageId().equals(messageId)){ + return true; + } + } + return false; + } public void testCalculator() { Monitor monitor = customDomain.getMonitorInstance(); - assertTrue(((DefaultLoggingMonitorImpl)monitor).isMessageLogged("ContributionResolveException")); + assertTrue(isMessageLogged(monitor, "ContributionResolveException")); //assertEquals("ContributionResolveException", problem.getMessageId()); } } diff --git a/branches/sca-equinox/itest/validation/src/test/java/impl/spring/LocationAttributeMissingTestCase.java b/branches/sca-equinox/itest/validation/src/test/java/impl/spring/LocationAttributeMissingTestCase.java index cd38b53f66..7b445960f1 100644 --- a/branches/sca-equinox/itest/validation/src/test/java/impl/spring/LocationAttributeMissingTestCase.java +++ b/branches/sca-equinox/itest/validation/src/test/java/impl/spring/LocationAttributeMissingTestCase.java @@ -22,7 +22,6 @@ import junit.framework.TestCase; import org.apache.tuscany.sca.monitor.Monitor; import org.apache.tuscany.sca.monitor.Problem; -import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl; import domain.CustomCompositeBuilder; @@ -52,7 +51,7 @@ public class LocationAttributeMissingTestCase extends TestCase { public void testCalculator() { Monitor monitor = customDomain.getMonitorInstance(); - Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem(); + Problem problem = monitor.getLastProblem(); assertNotNull(problem); assertEquals("LocationAttributeMissing", problem.getMessageId()); diff --git a/branches/sca-equinox/itest/validation/src/test/java/impl/spring/UnableToResolveComponentTypeTestCase.java b/branches/sca-equinox/itest/validation/src/test/java/impl/spring/UnableToResolveComponentTypeTestCase.java index 83550ae58d..6b4521cdc9 100644 --- a/branches/sca-equinox/itest/validation/src/test/java/impl/spring/UnableToResolveComponentTypeTestCase.java +++ b/branches/sca-equinox/itest/validation/src/test/java/impl/spring/UnableToResolveComponentTypeTestCase.java @@ -22,7 +22,6 @@ import junit.framework.TestCase; import org.apache.tuscany.sca.monitor.Monitor; import org.apache.tuscany.sca.monitor.Problem; -import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl; import domain.CustomCompositeBuilder; @@ -52,7 +51,7 @@ public class UnableToResolveComponentTypeTestCase extends TestCase { public void testCalculator() { Monitor monitor = customDomain.getMonitorInstance(); - Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem(); + Problem problem = monitor.getLastProblem(); //assertNotNull(problem); //assertEquals("UnableToResolveComponentType", problem.getMessageId()); diff --git a/branches/sca-equinox/itest/validation/src/test/java/impl/widget/CouldNotResolveLocationTestCase.java b/branches/sca-equinox/itest/validation/src/test/java/impl/widget/CouldNotResolveLocationTestCase.java index d098bb4bf8..f46e9e4035 100644 --- a/branches/sca-equinox/itest/validation/src/test/java/impl/widget/CouldNotResolveLocationTestCase.java +++ b/branches/sca-equinox/itest/validation/src/test/java/impl/widget/CouldNotResolveLocationTestCase.java @@ -23,7 +23,6 @@ import junit.framework.TestCase; import org.apache.tuscany.sca.monitor.Monitor; import org.apache.tuscany.sca.monitor.Problem; -import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl; import domain.CustomCompositeBuilder; @@ -51,7 +50,7 @@ public class CouldNotResolveLocationTestCase extends TestCase { public void testCalculator() { Monitor monitor = customDomain.getMonitorInstance(); - Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem(); + Problem problem = monitor.getLastProblem(); Assert.assertNotNull(problem); Assert.assertEquals("CouldNotResolveLocation", problem.getMessageId()); diff --git a/branches/sca-equinox/itest/validation/src/test/java/impl/widget/LocationAttributeMissingTestCase.java b/branches/sca-equinox/itest/validation/src/test/java/impl/widget/LocationAttributeMissingTestCase.java index 2f85d8ed4a..ed95bcdcf0 100644 --- a/branches/sca-equinox/itest/validation/src/test/java/impl/widget/LocationAttributeMissingTestCase.java +++ b/branches/sca-equinox/itest/validation/src/test/java/impl/widget/LocationAttributeMissingTestCase.java @@ -22,7 +22,6 @@ import junit.framework.TestCase; import org.apache.tuscany.sca.monitor.Monitor; import org.apache.tuscany.sca.monitor.Problem; -import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl; import domain.CustomCompositeBuilder; @@ -52,7 +51,7 @@ public class LocationAttributeMissingTestCase extends TestCase { public void testCalculator() { Monitor monitor = customDomain.getMonitorInstance(); - Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem(); + Problem problem = monitor.getLastProblem(); assertNotNull(problem); assertEquals("LocationAttributeMissing", problem.getMessageId()); diff --git a/branches/sca-equinox/itest/validation/src/test/java/impl/xquery/CouldNotLocateFileTestCase.java b/branches/sca-equinox/itest/validation/src/test/java/impl/xquery/CouldNotLocateFileTestCase.java index f90fc3b83f..bd5a6d9601 100644 --- a/branches/sca-equinox/itest/validation/src/test/java/impl/xquery/CouldNotLocateFileTestCase.java +++ b/branches/sca-equinox/itest/validation/src/test/java/impl/xquery/CouldNotLocateFileTestCase.java @@ -22,7 +22,6 @@ import junit.framework.TestCase; import org.apache.tuscany.sca.monitor.Monitor; import org.apache.tuscany.sca.monitor.Problem; -import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl; import domain.CustomCompositeBuilder; @@ -52,7 +51,7 @@ public class CouldNotLocateFileTestCase extends TestCase { public void testCalculator() { Monitor monitor = customDomain.getMonitorInstance(); - Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem(); + Problem problem = monitor.getLastProblem(); assertNotNull(problem); assertEquals("CouldNotLocateFile", problem.getMessageId()); diff --git a/branches/sca-equinox/itest/validation/src/test/java/impl/xquery/LocationAttributeMissingTestCase.java b/branches/sca-equinox/itest/validation/src/test/java/impl/xquery/LocationAttributeMissingTestCase.java index 01450a8836..390eeb7e95 100644 --- a/branches/sca-equinox/itest/validation/src/test/java/impl/xquery/LocationAttributeMissingTestCase.java +++ b/branches/sca-equinox/itest/validation/src/test/java/impl/xquery/LocationAttributeMissingTestCase.java @@ -22,7 +22,6 @@ import junit.framework.TestCase; import org.apache.tuscany.sca.monitor.Monitor; import org.apache.tuscany.sca.monitor.Problem; -import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl; import domain.CustomCompositeBuilder; @@ -52,7 +51,7 @@ public class LocationAttributeMissingTestCase extends TestCase { public void testCalculator() { Monitor monitor = customDomain.getMonitorInstance(); - Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem(); + Problem problem = monitor.getLastProblem(); assertNotNull(problem); assertEquals("LocationAttributeMissing", problem.getMessageId()); diff --git a/branches/sca-equinox/itest/validation/src/test/java/interfacejava/xml/ClassNotFoundTestCase.java b/branches/sca-equinox/itest/validation/src/test/java/interfacejava/xml/ClassNotFoundTestCase.java index a03e056298..e2bee4d2ac 100644 --- a/branches/sca-equinox/itest/validation/src/test/java/interfacejava/xml/ClassNotFoundTestCase.java +++ b/branches/sca-equinox/itest/validation/src/test/java/interfacejava/xml/ClassNotFoundTestCase.java @@ -22,7 +22,6 @@ import junit.framework.TestCase; import org.apache.tuscany.sca.monitor.Monitor; import org.apache.tuscany.sca.monitor.Problem; -import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl; import domain.CustomCompositeBuilder; @@ -52,7 +51,7 @@ public class ClassNotFoundTestCase extends TestCase { public void testCalculator() { Monitor monitor = customDomain.getMonitorInstance(); - Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem(); + Problem problem = monitor.getLastProblem(); assertNotNull(problem); assertEquals("ClassNotFoundException", problem.getMessageId()); diff --git a/branches/sca-equinox/itest/validation/src/test/java/interfacejava/xml/ContributionResolveExceptionTestCase.java b/branches/sca-equinox/itest/validation/src/test/java/interfacejava/xml/ContributionResolveExceptionTestCase.java index e0524f57b7..3b567da717 100644 --- a/branches/sca-equinox/itest/validation/src/test/java/interfacejava/xml/ContributionResolveExceptionTestCase.java +++ b/branches/sca-equinox/itest/validation/src/test/java/interfacejava/xml/ContributionResolveExceptionTestCase.java @@ -22,7 +22,6 @@ import junit.framework.TestCase; import org.apache.tuscany.sca.monitor.Monitor; import org.apache.tuscany.sca.monitor.Problem; -import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl; import domain.CustomCompositeBuilder; @@ -52,7 +51,7 @@ public class ContributionResolveExceptionTestCase extends TestCase { public void testCalculator() { Monitor monitor = customDomain.getMonitorInstance(); - Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem(); + Problem problem = monitor.getLastProblem(); //assertNotNull(problem); //assertEquals("ContributionResolveException", problem.getMessageId()); diff --git a/branches/sca-equinox/itest/validation/src/test/java/interfacewsdl/xml/InvalidWSDLInterfaceAttrTestCase.java b/branches/sca-equinox/itest/validation/src/test/java/interfacewsdl/xml/InvalidWSDLInterfaceAttrTestCase.java index e212477c61..fc03bc25eb 100644 --- a/branches/sca-equinox/itest/validation/src/test/java/interfacewsdl/xml/InvalidWSDLInterfaceAttrTestCase.java +++ b/branches/sca-equinox/itest/validation/src/test/java/interfacewsdl/xml/InvalidWSDLInterfaceAttrTestCase.java @@ -22,7 +22,6 @@ import junit.framework.TestCase; import org.apache.tuscany.sca.monitor.Monitor; import org.apache.tuscany.sca.monitor.Problem; -import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl; import domain.CustomCompositeBuilder; @@ -52,7 +51,7 @@ public class InvalidWSDLInterfaceAttrTestCase extends TestCase { public void testCalculator() { Monitor monitor = customDomain.getMonitorInstance(); - Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem(); + Problem problem = monitor.getLastProblem(); assertNotNull(problem); assertEquals("InvalidWSDLInterfaceAttr", problem.getMessageId()); diff --git a/branches/sca-equinox/itest/validation/src/test/java/interfacewsdl/xml/WsdlInterfaceDoesNotMatchTestCase.java b/branches/sca-equinox/itest/validation/src/test/java/interfacewsdl/xml/WsdlInterfaceDoesNotMatchTestCase.java index df2a2671df..d41d72585f 100644 --- a/branches/sca-equinox/itest/validation/src/test/java/interfacewsdl/xml/WsdlInterfaceDoesNotMatchTestCase.java +++ b/branches/sca-equinox/itest/validation/src/test/java/interfacewsdl/xml/WsdlInterfaceDoesNotMatchTestCase.java @@ -22,7 +22,6 @@ import junit.framework.TestCase; import org.apache.tuscany.sca.monitor.Monitor; import org.apache.tuscany.sca.monitor.Problem; -import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl; import domain.CustomCompositeBuilder; @@ -52,7 +51,7 @@ public class WsdlInterfaceDoesNotMatchTestCase extends TestCase { public void testCalculator() { Monitor monitor = customDomain.getMonitorInstance(); - Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem(); + Problem problem = monitor.getLastProblem(); assertNotNull(problem); assertEquals("WsdlInterfaceDoesNotMatch", problem.getMessageId()); diff --git a/branches/sca-equinox/itest/validation/src/test/java/policy/xml/AlwaysProvidedIntentNotFoundTestCase.java b/branches/sca-equinox/itest/validation/src/test/java/policy/xml/AlwaysProvidedIntentNotFoundTestCase.java index 361e2f2bfb..2d4bb3d499 100644 --- a/branches/sca-equinox/itest/validation/src/test/java/policy/xml/AlwaysProvidedIntentNotFoundTestCase.java +++ b/branches/sca-equinox/itest/validation/src/test/java/policy/xml/AlwaysProvidedIntentNotFoundTestCase.java @@ -22,7 +22,6 @@ import junit.framework.TestCase; import org.apache.tuscany.sca.monitor.Monitor; import org.apache.tuscany.sca.monitor.Problem; -import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl; import domain.CustomCompositeBuilder; @@ -52,7 +51,7 @@ public class AlwaysProvidedIntentNotFoundTestCase extends TestCase { public void testCalculator() { Monitor monitor = customDomain.getMonitorInstance(); - Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem(); + Problem problem = monitor.getLastProblem(); assertNotNull(problem); assertEquals("AlwaysProvidedIntentNotFound", problem.getMessageId()); diff --git a/branches/sca-equinox/itest/validation/src/test/java/policy/xml/ErrorInPolicyIntentDefinitionTestCase.java b/branches/sca-equinox/itest/validation/src/test/java/policy/xml/ErrorInPolicyIntentDefinitionTestCase.java index a85dc334f4..5b5bfe7b37 100644 --- a/branches/sca-equinox/itest/validation/src/test/java/policy/xml/ErrorInPolicyIntentDefinitionTestCase.java +++ b/branches/sca-equinox/itest/validation/src/test/java/policy/xml/ErrorInPolicyIntentDefinitionTestCase.java @@ -22,7 +22,6 @@ import junit.framework.TestCase; import org.apache.tuscany.sca.monitor.Monitor; import org.apache.tuscany.sca.monitor.Problem; -import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl; import domain.CustomCompositeBuilder; @@ -52,7 +51,7 @@ public class ErrorInPolicyIntentDefinitionTestCase extends TestCase { public void testCalculator() { Monitor monitor = customDomain.getMonitorInstance(); - Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem(); + Problem problem = monitor.getLastProblem(); assertNotNull(problem); assertEquals("ErrorInPolicyIntentDefinition", problem.getMessageId()); diff --git a/branches/sca-equinox/itest/validation/src/test/java/policy/xml/IntentNotSpecifiedTestCase.java b/branches/sca-equinox/itest/validation/src/test/java/policy/xml/IntentNotSpecifiedTestCase.java index 3f98757ce5..8ef3cacc4e 100644 --- a/branches/sca-equinox/itest/validation/src/test/java/policy/xml/IntentNotSpecifiedTestCase.java +++ b/branches/sca-equinox/itest/validation/src/test/java/policy/xml/IntentNotSpecifiedTestCase.java @@ -21,7 +21,7 @@ package policy.xml; import junit.framework.TestCase; import org.apache.tuscany.sca.monitor.Monitor; -import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl; +import org.apache.tuscany.sca.monitor.Problem; import domain.CustomCompositeBuilder; @@ -49,10 +49,19 @@ public class IntentNotSpecifiedTestCase extends TestCase { //node.stop(); } + private static boolean isMessageLogged(Monitor monitor, String messageId) { + for (Problem problem : monitor.getProblems()){ + if (problem.getMessageId().equals(messageId)){ + return true; + } + } + return false; + } + public void testCalculator() { Monitor monitor = customDomain.getMonitorInstance(); - assertTrue(((DefaultLoggingMonitorImpl)monitor).isMessageLogged("IntentNotSpecified")); - /*Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem(); + assertTrue(isMessageLogged(monitor, "IntentNotSpecified")); + /*Problem problem = monitor.getLastLoggedProblem(); assertNotNull(problem); assertEquals("IntentNotSpecified", problem.getMessageId());*/ } diff --git a/branches/sca-equinox/itest/validation/src/test/java/policy/xml/MayProvideIntentNotFoundTestCase.java b/branches/sca-equinox/itest/validation/src/test/java/policy/xml/MayProvideIntentNotFoundTestCase.java index 3b8d075165..38d59196dd 100644 --- a/branches/sca-equinox/itest/validation/src/test/java/policy/xml/MayProvideIntentNotFoundTestCase.java +++ b/branches/sca-equinox/itest/validation/src/test/java/policy/xml/MayProvideIntentNotFoundTestCase.java @@ -22,7 +22,6 @@ import junit.framework.TestCase; import org.apache.tuscany.sca.monitor.Monitor; import org.apache.tuscany.sca.monitor.Problem; -import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl; import domain.CustomCompositeBuilder; @@ -52,7 +51,7 @@ public class MayProvideIntentNotFoundTestCase extends TestCase { public void testCalculator() { Monitor monitor = customDomain.getMonitorInstance(); - Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem(); + Problem problem = monitor.getLastProblem(); assertNotNull(problem); assertEquals("MayProvideIntentNotFound", problem.getMessageId()); diff --git a/branches/sca-equinox/itest/validation/src/test/java/policy/xml/RequiredAttributeMissingTestCase.java b/branches/sca-equinox/itest/validation/src/test/java/policy/xml/RequiredAttributeMissingTestCase.java index bcf1f82392..9671f9c983 100644 --- a/branches/sca-equinox/itest/validation/src/test/java/policy/xml/RequiredAttributeMissingTestCase.java +++ b/branches/sca-equinox/itest/validation/src/test/java/policy/xml/RequiredAttributeMissingTestCase.java @@ -22,7 +22,6 @@ import junit.framework.TestCase; import org.apache.tuscany.sca.monitor.Monitor; import org.apache.tuscany.sca.monitor.Problem; -import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl; import domain.CustomCompositeBuilder; @@ -52,7 +51,7 @@ public class RequiredAttributeMissingTestCase extends TestCase { public void testCalculator() { Monitor monitor = customDomain.getMonitorInstance(); - Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem(); + Problem problem = monitor.getLastProblem(); assertNotNull(problem); assertEquals("RequiredAttributeMissing", problem.getMessageId()); diff --git a/branches/sca-equinox/itest/validation/src/test/java/policy/xml/UnableToMapPoliciesTestCase.java b/branches/sca-equinox/itest/validation/src/test/java/policy/xml/UnableToMapPoliciesTestCase.java index 5683d54e64..b3ccb8b278 100644 --- a/branches/sca-equinox/itest/validation/src/test/java/policy/xml/UnableToMapPoliciesTestCase.java +++ b/branches/sca-equinox/itest/validation/src/test/java/policy/xml/UnableToMapPoliciesTestCase.java @@ -20,8 +20,6 @@ package policy.xml; import junit.framework.TestCase; -import org.apache.tuscany.sca.monitor.Monitor; -import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl; import org.junit.Ignore; import domain.CustomCompositeBuilder; @@ -56,9 +54,9 @@ public class UnableToMapPoliciesTestCase extends TestCase { //elements... /* Monitor monitor = customDomain.getMonitorInstance(); - assertTrue(((DefaultLoggingMonitorImpl)monitor).isMessageLogged("UnableToMapPolicies")); + assertTrue(monitor.isMessageLogged("UnableToMapPolicies")); */ - /*Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem(); + /*Problem problem = monitor.getLastLoggedProblem(); assertNotNull(problem); assertEquals("UnableToMapPolicies", problem.getMessageId());*/ } diff --git a/branches/sca-equinox/itest/validation/src/test/java/policy/xml/UnrecognizedIntentAttachPointTypeTestCase.java b/branches/sca-equinox/itest/validation/src/test/java/policy/xml/UnrecognizedIntentAttachPointTypeTestCase.java index eec39d711e..08c27ee011 100644 --- a/branches/sca-equinox/itest/validation/src/test/java/policy/xml/UnrecognizedIntentAttachPointTypeTestCase.java +++ b/branches/sca-equinox/itest/validation/src/test/java/policy/xml/UnrecognizedIntentAttachPointTypeTestCase.java @@ -22,7 +22,6 @@ import junit.framework.TestCase; import org.apache.tuscany.sca.monitor.Monitor; import org.apache.tuscany.sca.monitor.Problem; -import org.apache.tuscany.sca.monitor.logging.impl.DefaultLoggingMonitorImpl; import domain.CustomCompositeBuilder; @@ -52,7 +51,7 @@ public class UnrecognizedIntentAttachPointTypeTestCase extends TestCase { public void testCalculator() { Monitor monitor = customDomain.getMonitorInstance(); - Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem(); + Problem problem = monitor.getLastProblem(); assertNotNull(problem); assertEquals("UnrecognizedIntentAttachPointType", problem.getMessageId()); diff --git a/branches/sca-equinox/modules/contribution-java/src/test/java/org/apache/tuscany/sca/contribution/java/impl/JavaExportProcessorTestCase.java b/branches/sca-equinox/modules/contribution-java/src/test/java/org/apache/tuscany/sca/contribution/java/impl/JavaExportProcessorTestCase.java index 53993cf39a..6528124a2a 100644 --- a/branches/sca-equinox/modules/contribution-java/src/test/java/org/apache/tuscany/sca/contribution/java/impl/JavaExportProcessorTestCase.java +++ b/branches/sca-equinox/modules/contribution-java/src/test/java/org/apache/tuscany/sca/contribution/java/impl/JavaExportProcessorTestCase.java @@ -95,7 +95,7 @@ public class JavaExportProcessorTestCase extends TestCase { assertTrue(true); }*/ staxProcessor.read(reader); - Problem problem = monitor.getLastLoggedProblem(); + Problem problem = monitor.getLastProblem(); assertNotNull(problem); assertEquals("AttributePackageMissing", problem.getMessageId()); } diff --git a/branches/sca-equinox/modules/contribution-java/src/test/java/org/apache/tuscany/sca/contribution/java/impl/JavaImportProcessorTestCase.java b/branches/sca-equinox/modules/contribution-java/src/test/java/org/apache/tuscany/sca/contribution/java/impl/JavaImportProcessorTestCase.java index 684e9b01f4..bd2911b60b 100644 --- a/branches/sca-equinox/modules/contribution-java/src/test/java/org/apache/tuscany/sca/contribution/java/impl/JavaImportProcessorTestCase.java +++ b/branches/sca-equinox/modules/contribution-java/src/test/java/org/apache/tuscany/sca/contribution/java/impl/JavaImportProcessorTestCase.java @@ -97,7 +97,7 @@ public class JavaImportProcessorTestCase extends TestCase { assertTrue(true); }*/ staxProcessor.read(reader); - Problem problem = monitor.getLastLoggedProblem(); + Problem problem = monitor.getLastProblem(); assertNotNull(problem); assertEquals("AttributePackageMissing", problem.getMessageId()); } 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 b11933fbef..369460b280 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 @@ -95,7 +95,7 @@ public class NamespaceExportProcessorTestCase extends TestCase { assertTrue(true); }*/ staxProcessor.read(reader); - Problem problem = monitor.getLastLoggedProblem(); + Problem problem = monitor.getLastProblem(); 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 282c0cfbe7..7163876339 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 @@ -99,7 +99,7 @@ public class NamespaceImportProcessorTestCase extends TestCase { assertTrue(true); }*/ staxProcessor.read(reader); - Problem problem = monitor.getLastLoggedProblem(); + Problem problem = monitor.getLastProblem(); assertNotNull(problem); assertEquals("AttributeNameSpaceMissing", problem.getMessageId()); } diff --git a/branches/sca-equinox/modules/contribution-resource/src/test/java/org/apache/tuscany/sca/contribution/resource/impl/ResourceExportProcessorTestCase.java b/branches/sca-equinox/modules/contribution-resource/src/test/java/org/apache/tuscany/sca/contribution/resource/impl/ResourceExportProcessorTestCase.java index 371af3ae54..e43d705ec3 100644 --- a/branches/sca-equinox/modules/contribution-resource/src/test/java/org/apache/tuscany/sca/contribution/resource/impl/ResourceExportProcessorTestCase.java +++ b/branches/sca-equinox/modules/contribution-resource/src/test/java/org/apache/tuscany/sca/contribution/resource/impl/ResourceExportProcessorTestCase.java @@ -96,7 +96,7 @@ public class ResourceExportProcessorTestCase extends TestCase { assertTrue(true); }*/ staxProcessor.read(reader); - Problem problem = monitor.getLastLoggedProblem(); + Problem problem = monitor.getLastProblem(); assertNotNull(problem); assertEquals("AttributeURIMissing", problem.getMessageId()); } diff --git a/branches/sca-equinox/modules/contribution-resource/src/test/java/org/apache/tuscany/sca/contribution/resource/impl/ResourceImportProcessorTestCase.java b/branches/sca-equinox/modules/contribution-resource/src/test/java/org/apache/tuscany/sca/contribution/resource/impl/ResourceImportProcessorTestCase.java index 42ca5709d2..1e99b0b01b 100644 --- a/branches/sca-equinox/modules/contribution-resource/src/test/java/org/apache/tuscany/sca/contribution/resource/impl/ResourceImportProcessorTestCase.java +++ b/branches/sca-equinox/modules/contribution-resource/src/test/java/org/apache/tuscany/sca/contribution/resource/impl/ResourceImportProcessorTestCase.java @@ -98,7 +98,7 @@ public class ResourceImportProcessorTestCase extends TestCase { assertTrue(true); }*/ staxProcessor.read(reader); - Problem problem = monitor.getLastLoggedProblem(); + Problem problem = monitor.getLastProblem(); assertNotNull(problem); assertEquals("AttributeURIMissing", problem.getMessageId()); } diff --git a/branches/sca-equinox/modules/contribution-xml/src/test/java/org/apache/tuscany/sca/contribution/xml/ContributionMetadataProcessorTestCase.java b/branches/sca-equinox/modules/contribution-xml/src/test/java/org/apache/tuscany/sca/contribution/xml/ContributionMetadataProcessorTestCase.java index b6fb7a0d2e..8dc6ab7ab1 100644 --- a/branches/sca-equinox/modules/contribution-xml/src/test/java/org/apache/tuscany/sca/contribution/xml/ContributionMetadataProcessorTestCase.java +++ b/branches/sca-equinox/modules/contribution-xml/src/test/java/org/apache/tuscany/sca/contribution/xml/ContributionMetadataProcessorTestCase.java @@ -103,7 +103,7 @@ public class ContributionMetadataProcessorTestCase extends TestCase { assertTrue(true); }*/ staxProcessor.read(reader); - Problem problem = monitor.getLastLoggedProblem(); + Problem problem = monitor.getLastProblem(); assertNotNull(problem); assertEquals("AttributeCompositeMissing", problem.getMessageId()); } diff --git a/branches/sca-equinox/modules/domain-manager/src/main/java/org/apache/tuscany/sca/domain/manager/impl/ContributionCollectionImpl.java b/branches/sca-equinox/modules/domain-manager/src/main/java/org/apache/tuscany/sca/domain/manager/impl/ContributionCollectionImpl.java index 0b304a0854..d642244f2c 100644 --- a/branches/sca-equinox/modules/domain-manager/src/main/java/org/apache/tuscany/sca/domain/manager/impl/ContributionCollectionImpl.java +++ b/branches/sca-equinox/modules/domain-manager/src/main/java/org/apache/tuscany/sca/domain/manager/impl/ContributionCollectionImpl.java @@ -77,6 +77,7 @@ import org.apache.tuscany.sca.domain.manager.impl.ContributionCollectionImpl.Cac 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.Problem.Severity; import org.apache.tuscany.sca.workspace.Workspace; import org.apache.tuscany.sca.workspace.WorkspaceFactory; import org.apache.tuscany.sca.workspace.builder.ContributionDependencyBuilder; @@ -181,7 +182,7 @@ public class ContributionCollectionImpl implements ItemCollection, LocalItemColl if (contribution.getURI().equals(DEPLOYMENT_CONTRIBUTION_URI)) { continue; } - entries.add(entry(workspace, contribution)); + entries.add(entry(workspace, contribution, monitor)); } return entries.toArray(new Entry[entries.size()]); } @@ -193,7 +194,7 @@ public class ContributionCollectionImpl implements ItemCollection, LocalItemColl Workspace workspace = readContributions(readWorkspace()); for (Contribution contribution: workspace.getContributions()) { if (key.equals(contribution.getURI())) { - return item(workspace, contribution); + return item(workspace, contribution, monitor); } } throw new NotFoundException(key); @@ -292,7 +293,7 @@ public class ContributionCollectionImpl implements ItemCollection, LocalItemColl // Skip the specified contribution continue; } - entries.add(entry(workspace, dependency)); + entries.add(entry(workspace, dependency, monitor)); } break; } @@ -362,7 +363,7 @@ public class ContributionCollectionImpl implements ItemCollection, LocalItemColl Contribution contribution = contributionFactory.createContribution(); contribution.setURI(uri); contribution.setLocation(locationPath); - entries.add(entry(suggestionWorkspace, contribution)); + entries.add(entry(suggestionWorkspace, contribution, monitor)); } } @@ -378,20 +379,22 @@ public class ContributionCollectionImpl implements ItemCollection, LocalItemColl * @param contribution * @return */ - private static Entry<String, Item> entry(Workspace workspace, Contribution contribution) { + private static Entry<String, Item> entry(Workspace workspace, Contribution contribution, Monitor monitor) { Entry<String, Item> entry = new Entry<String, Item>(); entry.setKey(contribution.getURI()); - entry.setData(item(workspace, contribution)); + entry.setData(item(workspace, contribution, monitor)); return entry; } /** * Returns an item representing a contribution. * + * @param workspace * @param contribution + * @param monitor * @return */ - private static Item item(Workspace workspace, Contribution contribution) { + private static Item item(Workspace workspace, Contribution contribution, final Monitor monitor) { String contributionURI = contribution.getURI(); Item item = new Item(); item.setTitle(title(contributionURI)); @@ -400,7 +403,7 @@ public class ContributionCollectionImpl implements ItemCollection, LocalItemColl // List the contribution dependencies in the item contents final List<String> problems = new ArrayList<String>(); - Monitor monitor = new Monitor() { + Monitor recordingMonitor = new Monitor() { public void problem(Problem problem) { problems.add(problem.getMessageId() + " " + problem.getProblemObject().toString()); } @@ -408,10 +411,23 @@ public class ContributionCollectionImpl implements ItemCollection, LocalItemColl public List<Problem> getProblems() { return null; } + + public Problem getLastProblem() { + // TODO Auto-generated method stub + return null; + } + + public Problem createProblem(String sourceClassName, String bundleName, Severity severity, Object problemObject, String messageId, Exception cause) { + return monitor.createProblem(sourceClassName, bundleName, severity, problemObject, messageId, cause); + } + + public Problem createProblem(String sourceClassName, String bundleName, Severity severity, Object problemObject, String messageId, Object... messageParams) { + return monitor.createProblem(sourceClassName, bundleName, severity, problemObject, messageId, messageParams); + } }; StringBuffer sb = new StringBuffer(); - ContributionDependencyBuilderImpl analyzer = new ContributionDependencyBuilderImpl(monitor); + ContributionDependencyBuilderImpl analyzer = new ContributionDependencyBuilderImpl(recordingMonitor); List<Contribution> dependencies = analyzer.buildContributionDependencies(contribution, workspace); if (dependencies.size() > 1) { sb.append("Dependencies: <span id=\"dependencies\">"); diff --git a/branches/sca-equinox/modules/implementation-bpel/src/test/java/org/apache/tuscany/sca/implementation/bpel/BPELImplementationProcessorTestCase.java b/branches/sca-equinox/modules/implementation-bpel/src/test/java/org/apache/tuscany/sca/implementation/bpel/BPELImplementationProcessorTestCase.java index f5a898465a..9e19788112 100644 --- a/branches/sca-equinox/modules/implementation-bpel/src/test/java/org/apache/tuscany/sca/implementation/bpel/BPELImplementationProcessorTestCase.java +++ b/branches/sca-equinox/modules/implementation-bpel/src/test/java/org/apache/tuscany/sca/implementation/bpel/BPELImplementationProcessorTestCase.java @@ -103,7 +103,7 @@ public class BPELImplementationProcessorTestCase extends TestCase { public void testLoadInvalidComposite() throws Exception { XMLStreamReader reader = inputFactory.createXMLStreamReader(new StringReader(COMPOSITE_INVALID)); staxProcessor.read(reader); - Problem problem = monitor.getLastLoggedProblem(); + Problem problem = monitor.getLastProblem(); assertNotNull(problem); assertEquals("AttributeProcessMissing", problem.getMessageId()); } 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 1dc397659b..74648701c6 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 @@ -21,7 +21,6 @@ package org.apache.tuscany.sca.implementation.node.builder.impl; import java.util.ArrayList; import java.util.List; -import java.util.logging.Level; import java.util.logging.Logger; import javax.xml.namespace.QName; @@ -42,8 +41,6 @@ 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; import org.apache.tuscany.sca.monitor.Monitor; -import org.apache.tuscany.sca.monitor.Problem; -import org.apache.tuscany.sca.monitor.Problem.Severity; /** * @@ -63,24 +60,6 @@ public class CalculateBindingURITestCase extends TestCase { assemblyFactory = new DefaultAssemblyFactory(); scaBindingFactory = new TestBindingFactory(); nodeImplementationFactory = new NodeImplementationFactoryImpl(); - monitor = new Monitor() { - public void problem(Problem problem) { - if (problem.getSeverity() == Severity.INFO) { - logger.info(problem.toString()); - } else if (problem.getSeverity() == Severity.WARNING) { - logger.warning(problem.toString()); - } else if (problem.getSeverity() == Severity.ERROR) { - if (problem.getCause() != null) { - logger.log(Level.SEVERE, problem.toString(), problem.getCause()); - } else { - logger.severe(problem.toString()); - } - } - } - public List<Problem> getProblems() { - return null; - } - }; configurationBuilder = new NodeCompositeBuilderImpl(assemblyFactory, scaBindingFactory, null, null, monitor); Binding defaultBinding = new TestBindingImpl(); defaultBinding.setURI("http://myhost:8080/root"); 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 bc0c3b1507..6c08bbed0f 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 @@ -39,7 +39,6 @@ import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessorExtens import org.apache.tuscany.sca.core.DefaultExtensionPointRegistry; import org.apache.tuscany.sca.core.UtilityExtensionPoint; import org.apache.tuscany.sca.interfacedef.InterfaceContractMapper; -import org.apache.tuscany.sca.interfacedef.impl.InterfaceContractMapperImpl; import org.apache.tuscany.sca.policy.IntentAttachPointTypeFactory; /** diff --git a/branches/sca-equinox/modules/monitor/src/main/java/org/apache/tuscany/sca/monitor/Monitor.java b/branches/sca-equinox/modules/monitor/src/main/java/org/apache/tuscany/sca/monitor/Monitor.java index ef49ddd323..f0ac8a6dbb 100644 --- a/branches/sca-equinox/modules/monitor/src/main/java/org/apache/tuscany/sca/monitor/Monitor.java +++ b/branches/sca-equinox/modules/monitor/src/main/java/org/apache/tuscany/sca/monitor/Monitor.java @@ -48,7 +48,7 @@ public interface Monitor { * * @return */ - public Problem getLastLoggedProblem(); + public Problem getLastProblem(); /** * Create a new problem. diff --git a/branches/sca-equinox/modules/monitor/src/main/java/org/apache/tuscany/sca/monitor/impl/MonitorImpl.java b/branches/sca-equinox/modules/monitor/src/main/java/org/apache/tuscany/sca/monitor/impl/MonitorImpl.java index 585e616632..fa562a5f23 100644 --- a/branches/sca-equinox/modules/monitor/src/main/java/org/apache/tuscany/sca/monitor/impl/MonitorImpl.java +++ b/branches/sca-equinox/modules/monitor/src/main/java/org/apache/tuscany/sca/monitor/impl/MonitorImpl.java @@ -75,7 +75,7 @@ public class MonitorImpl implements Monitor { return problemCache; } - public Problem getLastLoggedProblem(){ + public Problem getLastProblem(){ if (problemCache.isEmpty()) { return null; } diff --git a/branches/sca-equinox/modules/monitor/src/main/resources/META-INF/services/org.apache.tuscany.sca.monitor.MonitorFactory b/branches/sca-equinox/modules/monitor/src/main/resources/META-INF/services/org.apache.tuscany.sca.monitor.MonitorFactory new file mode 100644 index 0000000000..ae81aef136 --- /dev/null +++ b/branches/sca-equinox/modules/monitor/src/main/resources/META-INF/services/org.apache.tuscany.sca.monitor.MonitorFactory @@ -0,0 +1,18 @@ +# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+org.apache.tuscany.sca.monitor.DefaultMonitorFactory
|