diff options
Diffstat (limited to 'branches/sca-equinox/itest/validation/src/test/java/impl')
20 files changed, 52 insertions, 42 deletions
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()); |