diff options
Diffstat (limited to 'branches/sca-equinox/itest/validation/src/test/java/impl/bpel/PartnerLinkHasBothAttrTestCase.java')
-rw-r--r-- | branches/sca-equinox/itest/validation/src/test/java/impl/bpel/PartnerLinkHasBothAttrTestCase.java | 15 |
1 files changed, 12 insertions, 3 deletions
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());*/ } |