summaryrefslogtreecommitdiffstats
path: root/java/sca/itest/validation/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'java/sca/itest/validation/src/test')
-rw-r--r--java/sca/itest/validation/src/test/java/assembly/xml/ContributionReadException.java3
-rw-r--r--java/sca/itest/validation/src/test/java/assembly/xml/PolicyImplValidationException.java3
-rw-r--r--java/sca/itest/validation/src/test/java/assembly/xml/PolicyServiceValidationException.java3
-rw-r--r--java/sca/itest/validation/src/test/java/assembly/xml/UnexpectedBindingElement.java3
-rw-r--r--java/sca/itest/validation/src/test/java/assembly/xml/UnexpectedImplementationElement.java3
-rw-r--r--java/sca/itest/validation/src/test/java/assembly/xml/UnexpectedInterfaceElement.java3
-rw-r--r--java/sca/itest/validation/src/test/java/binding/ejb/UnknownEJBSessionTypeTestCase.java3
-rw-r--r--java/sca/itest/validation/src/test/java/binding/ejb/UnknownEJBVersionTestCase.java3
-rw-r--r--java/sca/itest/validation/src/test/java/binding/jms/DoesntProcessActivationSpecTestCase.java3
-rw-r--r--java/sca/itest/validation/src/test/java/binding/jms/DoesntProcessDestinationTypeTestCase.java3
-rw-r--r--java/sca/itest/validation/src/test/java/binding/jms/DoesntProcessHeadersTestCase.java3
-rw-r--r--java/sca/itest/validation/src/test/java/binding/jms/DoesntProcessResourceAdapterTestCase.java3
-rw-r--r--java/sca/itest/validation/src/test/java/binding/jms/DoesntProcessResponseActivationSpecTestCase.java3
-rw-r--r--java/sca/itest/validation/src/test/java/binding/jms/DoesntProcessResponseConnectionFactoryTestCase.java3
-rw-r--r--java/sca/itest/validation/src/test/java/binding/jms/DoesntProcessResponseDestinationTypeTestCase.java3
-rw-r--r--java/sca/itest/validation/src/test/java/binding/jms/InvalidCorrelationSchemeTestCase.java3
-rw-r--r--java/sca/itest/validation/src/test/java/binding/jms/InvalidJMSDeliveryModeTestCase.java3
-rw-r--r--java/sca/itest/validation/src/test/java/binding/jms/InvalidJMSPriorityTestCase.java3
-rw-r--r--java/sca/itest/validation/src/test/java/binding/jms/InvalidResponseDestinationTypeTestCase.java3
-rw-r--r--java/sca/itest/validation/src/test/java/binding/jms/MissingActivationSpecNameTestCase.java3
-rw-r--r--java/sca/itest/validation/src/test/java/binding/jms/MissingConnectionFactoryNameTestCase.java3
-rw-r--r--java/sca/itest/validation/src/test/java/binding/jms/MissingResponseActivationSpecTestCase.java3
-rw-r--r--java/sca/itest/validation/src/test/java/binding/jms/MissingResponseConnectionFactoryTestCase.java3
-rw-r--r--java/sca/itest/validation/src/test/java/binding/jms/MustStartWithSchemaTestCase.java3
-rw-r--r--java/sca/itest/validation/src/test/java/binding/jms/UnexpectedElementTestCase.java3
-rw-r--r--java/sca/itest/validation/src/test/java/binding/jms/UnexpectedResponseElementTestCase.java3
-rw-r--r--java/sca/itest/validation/src/test/java/binding/jms/UnknownTokenInURITestCase.java3
-rw-r--r--java/sca/itest/validation/src/test/java/binding/wsxml/InvalidWsdlElementAttrTestCase.java3
-rw-r--r--java/sca/itest/validation/src/test/java/binding/wsxml/MustUseWsdlBindingTestCase.java3
-rw-r--r--java/sca/itest/validation/src/test/java/binding/wsxml/WsdlBindingDoesNotMatchTestCase.java3
-rw-r--r--java/sca/itest/validation/src/test/java/binding/wsxml/WsdlPortTypeDoesNotMatchTestCase.java3
-rw-r--r--java/sca/itest/validation/src/test/java/binding/wsxml/WsdlServiceDoesNotMatchTestCase.java3
-rw-r--r--java/sca/itest/validation/src/test/java/calculator/warning/ComponentReferenceTargetNotFoundTestCase.java21
-rw-r--r--java/sca/itest/validation/src/test/java/calculator/warning/DuplicateComponentNameTestCase.java3
-rw-r--r--java/sca/itest/validation/src/test/java/calculator/warning/DuplicateImplementationPropertyNameTestCase.java17
-rw-r--r--java/sca/itest/validation/src/test/java/calculator/warning/DuplicateImplementationReferenceNameTestCase.java17
-rw-r--r--java/sca/itest/validation/src/test/java/calculator/warning/DuplicatePropertyNameTestCase.java21
-rw-r--r--java/sca/itest/validation/src/test/java/calculator/warning/DuplicateReferenceNameTestCase.java21
-rw-r--r--java/sca/itest/validation/src/test/java/calculator/warning/MultipleBindingsForServiceTestCase.java21
-rw-r--r--java/sca/itest/validation/src/test/java/calculator/warning/NoComponentImplementationTestCase.java17
-rw-r--r--java/sca/itest/validation/src/test/java/calculator/warning/NoCompositeNamespaceTestCase.java21
-rw-r--r--java/sca/itest/validation/src/test/java/calculator/warning/NoMatchingBindingTestCase.java19
-rw-r--r--java/sca/itest/validation/src/test/java/calculator/warning/PromotedReferenceNotFoundTestCase.java21
-rw-r--r--java/sca/itest/validation/src/test/java/calculator/warning/PromotedServiceNotFoundTestCase.java21
-rw-r--r--java/sca/itest/validation/src/test/java/calculator/warning/PropertyAttributeMustSupplyNullTestCase.java21
-rw-r--r--java/sca/itest/validation/src/test/java/calculator/warning/PropertyAttributeTestCase.java21
-rw-r--r--java/sca/itest/validation/src/test/java/calculator/warning/PropertyNotFoundTestCase.java21
-rw-r--r--java/sca/itest/validation/src/test/java/calculator/warning/PropertyOverrideManyAttributeTestCase.java21
-rw-r--r--java/sca/itest/validation/src/test/java/calculator/warning/ReferenceIncompatibleComponentInterfaceTestCase.java21
-rw-r--r--java/sca/itest/validation/src/test/java/calculator/warning/ReferenceIncompatibleInterfaceTestCase.java21
-rw-r--r--java/sca/itest/validation/src/test/java/calculator/warning/ReferenceIncompatibleMultiplicityTestCase.java21
-rw-r--r--java/sca/itest/validation/src/test/java/calculator/warning/ReferenceNotFoundTestCase.java13
-rw-r--r--java/sca/itest/validation/src/test/java/calculator/warning/ReferenceWithoutTargetsTestCase.java21
-rw-r--r--java/sca/itest/validation/src/test/java/calculator/warning/ServiceNotFoundForComponentServiceTestCase.java21
-rw-r--r--java/sca/itest/validation/src/test/java/calculator/warning/UnresolvedComponentImplementationTestCase.java17
-rw-r--r--java/sca/itest/validation/src/test/java/calculator/warning/XSDValidationTestCase.java18
-rw-r--r--java/sca/itest/validation/src/test/java/contribution/java/AttributePackageMissingTestCase.java3
-rw-r--r--java/sca/itest/validation/src/test/java/contribution/namespace/AttributeNameSpaceMissingTestCase.java3
-rw-r--r--java/sca/itest/validation/src/test/java/contribution/resource/AttributeURIMissingTestCase.java3
-rw-r--r--java/sca/itest/validation/src/test/java/contribution/xml/AttributeCompositeMissingTestCase.java3
-rw-r--r--java/sca/itest/validation/src/test/java/domain/CustomCompositeBuilder.java31
-rw-r--r--java/sca/itest/validation/src/test/java/impl/bpel/AttributeUnrecognizedNamespaceTestCase.java3
-rw-r--r--java/sca/itest/validation/src/test/java/impl/bpel/AttributeWithoutNamespaceTestCase.java3
-rw-r--r--java/sca/itest/validation/src/test/java/impl/bpel/BPELProcessNotFoundTestCase.java3
-rw-r--r--java/sca/itest/validation/src/test/java/impl/bpel/CannotResolveWSDLReferenceTestCase.java3
-rw-r--r--java/sca/itest/validation/src/test/java/impl/bpel/MyRolePartnerRoleNullTestCase.java3
-rw-r--r--java/sca/itest/validation/src/test/java/impl/bpel/PartnerLinkHasBothAttrTestCase.java15
-rw-r--r--java/sca/itest/validation/src/test/java/impl/bpel/PartnerLinkNoMatchingTypeTestCase.java3
-rw-r--r--java/sca/itest/validation/src/test/java/impl/bpel/PartnerLinkTypeNoRolesTestCase.java15
-rw-r--r--java/sca/itest/validation/src/test/java/impl/ejb/EJBLinkAttributeMissingTestCase.java3
-rw-r--r--java/sca/itest/validation/src/test/java/impl/java/ClassNotFoundExceptionTestCase.java3
-rw-r--r--java/sca/itest/validation/src/test/java/impl/java/ContributionResolveExceptionTestCase.java3
-rw-r--r--java/sca/itest/validation/src/test/java/impl/osgi/CouldNotLocateOSGiBundleTestCase.java64
-rw-r--r--java/sca/itest/validation/src/test/java/impl/osgi/MissingComponentTypeFileTestCase.java64
-rw-r--r--java/sca/itest/validation/src/test/java/impl/osgi/OSGiTestBundles.java111
-rw-r--r--java/sca/itest/validation/src/test/java/impl/osgi/PropertyShouldSpecifySRTestCase.java64
-rw-r--r--java/sca/itest/validation/src/test/java/impl/resource/CouldNotResolveLocationTestCase.java3
-rw-r--r--java/sca/itest/validation/src/test/java/impl/resource/LocationAttributeMissingTestCase.java3
-rw-r--r--java/sca/itest/validation/src/test/java/impl/spring/ContributionResolveExceptionTestCase.java13
-rw-r--r--java/sca/itest/validation/src/test/java/impl/spring/LocationAttributeMissingTestCase.java3
-rw-r--r--java/sca/itest/validation/src/test/java/impl/spring/UnableToResolveComponentTypeTestCase.java3
-rw-r--r--java/sca/itest/validation/src/test/java/impl/widget/CouldNotResolveLocationTestCase.java3
-rw-r--r--java/sca/itest/validation/src/test/java/impl/widget/LocationAttributeMissingTestCase.java3
-rw-r--r--java/sca/itest/validation/src/test/java/impl/xquery/CouldNotLocateFileTestCase.java3
-rw-r--r--java/sca/itest/validation/src/test/java/impl/xquery/LocationAttributeMissingTestCase.java3
-rw-r--r--java/sca/itest/validation/src/test/java/interfacejava/xml/ClassNotFoundTestCase.java3
-rw-r--r--java/sca/itest/validation/src/test/java/interfacejava/xml/ContributionResolveExceptionTestCase.java3
-rw-r--r--java/sca/itest/validation/src/test/java/interfacewsdl/xml/InvalidWSDLInterfaceAttrTestCase.java3
-rw-r--r--java/sca/itest/validation/src/test/java/interfacewsdl/xml/WsdlInterfaceDoesNotMatchTestCase.java3
-rw-r--r--java/sca/itest/validation/src/test/java/policy/xml/AlwaysProvidedIntentNotFoundTestCase.java3
-rw-r--r--java/sca/itest/validation/src/test/java/policy/xml/ErrorInPolicyIntentDefinitionTestCase.java3
-rw-r--r--java/sca/itest/validation/src/test/java/policy/xml/IntentNotSpecifiedTestCase.java15
-rw-r--r--java/sca/itest/validation/src/test/java/policy/xml/MayProvideIntentNotFoundTestCase.java3
-rw-r--r--java/sca/itest/validation/src/test/java/policy/xml/RequiredAttributeMissingTestCase.java3
-rw-r--r--java/sca/itest/validation/src/test/java/policy/xml/UnableToMapPoliciesTestCase.java7
-rw-r--r--java/sca/itest/validation/src/test/java/policy/xml/UnrecognizedIntentAttachPointTypeTestCase.java3
96 files changed, 339 insertions, 703 deletions
diff --git a/java/sca/itest/validation/src/test/java/assembly/xml/ContributionReadException.java b/java/sca/itest/validation/src/test/java/assembly/xml/ContributionReadException.java
index 9b0d51eb59..55999fe27d 100644
--- a/java/sca/itest/validation/src/test/java/assembly/xml/ContributionReadException.java
+++ b/java/sca/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/java/sca/itest/validation/src/test/java/assembly/xml/PolicyImplValidationException.java b/java/sca/itest/validation/src/test/java/assembly/xml/PolicyImplValidationException.java
index e8476991a9..5ab65b2f64 100644
--- a/java/sca/itest/validation/src/test/java/assembly/xml/PolicyImplValidationException.java
+++ b/java/sca/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/java/sca/itest/validation/src/test/java/assembly/xml/PolicyServiceValidationException.java b/java/sca/itest/validation/src/test/java/assembly/xml/PolicyServiceValidationException.java
index 8ae156d63e..52803411cf 100644
--- a/java/sca/itest/validation/src/test/java/assembly/xml/PolicyServiceValidationException.java
+++ b/java/sca/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/java/sca/itest/validation/src/test/java/assembly/xml/UnexpectedBindingElement.java b/java/sca/itest/validation/src/test/java/assembly/xml/UnexpectedBindingElement.java
index d757ff98dd..8adf1aa2aa 100644
--- a/java/sca/itest/validation/src/test/java/assembly/xml/UnexpectedBindingElement.java
+++ b/java/sca/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/java/sca/itest/validation/src/test/java/assembly/xml/UnexpectedImplementationElement.java b/java/sca/itest/validation/src/test/java/assembly/xml/UnexpectedImplementationElement.java
index 9a231a18c7..2790cd0a6c 100644
--- a/java/sca/itest/validation/src/test/java/assembly/xml/UnexpectedImplementationElement.java
+++ b/java/sca/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/java/sca/itest/validation/src/test/java/assembly/xml/UnexpectedInterfaceElement.java b/java/sca/itest/validation/src/test/java/assembly/xml/UnexpectedInterfaceElement.java
index 4ae88b9ba3..c6daaebfe5 100644
--- a/java/sca/itest/validation/src/test/java/assembly/xml/UnexpectedInterfaceElement.java
+++ b/java/sca/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/java/sca/itest/validation/src/test/java/binding/ejb/UnknownEJBSessionTypeTestCase.java b/java/sca/itest/validation/src/test/java/binding/ejb/UnknownEJBSessionTypeTestCase.java
index ff94ad7b93..204034737b 100644
--- a/java/sca/itest/validation/src/test/java/binding/ejb/UnknownEJBSessionTypeTestCase.java
+++ b/java/sca/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/java/sca/itest/validation/src/test/java/binding/ejb/UnknownEJBVersionTestCase.java b/java/sca/itest/validation/src/test/java/binding/ejb/UnknownEJBVersionTestCase.java
index a192674aeb..ff2e413ab7 100644
--- a/java/sca/itest/validation/src/test/java/binding/ejb/UnknownEJBVersionTestCase.java
+++ b/java/sca/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/java/sca/itest/validation/src/test/java/binding/jms/DoesntProcessActivationSpecTestCase.java b/java/sca/itest/validation/src/test/java/binding/jms/DoesntProcessActivationSpecTestCase.java
index e0e5347d96..1632f95689 100644
--- a/java/sca/itest/validation/src/test/java/binding/jms/DoesntProcessActivationSpecTestCase.java
+++ b/java/sca/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/java/sca/itest/validation/src/test/java/binding/jms/DoesntProcessDestinationTypeTestCase.java b/java/sca/itest/validation/src/test/java/binding/jms/DoesntProcessDestinationTypeTestCase.java
index 9e08afec09..054f5a6035 100644
--- a/java/sca/itest/validation/src/test/java/binding/jms/DoesntProcessDestinationTypeTestCase.java
+++ b/java/sca/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/java/sca/itest/validation/src/test/java/binding/jms/DoesntProcessHeadersTestCase.java b/java/sca/itest/validation/src/test/java/binding/jms/DoesntProcessHeadersTestCase.java
index ed96072780..f3f61ec04b 100644
--- a/java/sca/itest/validation/src/test/java/binding/jms/DoesntProcessHeadersTestCase.java
+++ b/java/sca/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/java/sca/itest/validation/src/test/java/binding/jms/DoesntProcessResourceAdapterTestCase.java b/java/sca/itest/validation/src/test/java/binding/jms/DoesntProcessResourceAdapterTestCase.java
index a2a5b0b872..76d8a63b51 100644
--- a/java/sca/itest/validation/src/test/java/binding/jms/DoesntProcessResourceAdapterTestCase.java
+++ b/java/sca/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/java/sca/itest/validation/src/test/java/binding/jms/DoesntProcessResponseActivationSpecTestCase.java b/java/sca/itest/validation/src/test/java/binding/jms/DoesntProcessResponseActivationSpecTestCase.java
index 64b41623de..95c108e6db 100644
--- a/java/sca/itest/validation/src/test/java/binding/jms/DoesntProcessResponseActivationSpecTestCase.java
+++ b/java/sca/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/java/sca/itest/validation/src/test/java/binding/jms/DoesntProcessResponseConnectionFactoryTestCase.java b/java/sca/itest/validation/src/test/java/binding/jms/DoesntProcessResponseConnectionFactoryTestCase.java
index 86fbe51dad..2f66bbfe0c 100644
--- a/java/sca/itest/validation/src/test/java/binding/jms/DoesntProcessResponseConnectionFactoryTestCase.java
+++ b/java/sca/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/java/sca/itest/validation/src/test/java/binding/jms/DoesntProcessResponseDestinationTypeTestCase.java b/java/sca/itest/validation/src/test/java/binding/jms/DoesntProcessResponseDestinationTypeTestCase.java
index 6e884c41cd..decf234753 100644
--- a/java/sca/itest/validation/src/test/java/binding/jms/DoesntProcessResponseDestinationTypeTestCase.java
+++ b/java/sca/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/java/sca/itest/validation/src/test/java/binding/jms/InvalidCorrelationSchemeTestCase.java b/java/sca/itest/validation/src/test/java/binding/jms/InvalidCorrelationSchemeTestCase.java
index c237f8af18..445a41700b 100644
--- a/java/sca/itest/validation/src/test/java/binding/jms/InvalidCorrelationSchemeTestCase.java
+++ b/java/sca/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/java/sca/itest/validation/src/test/java/binding/jms/InvalidJMSDeliveryModeTestCase.java b/java/sca/itest/validation/src/test/java/binding/jms/InvalidJMSDeliveryModeTestCase.java
index 52dc7e5795..531573a0aa 100644
--- a/java/sca/itest/validation/src/test/java/binding/jms/InvalidJMSDeliveryModeTestCase.java
+++ b/java/sca/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/java/sca/itest/validation/src/test/java/binding/jms/InvalidJMSPriorityTestCase.java b/java/sca/itest/validation/src/test/java/binding/jms/InvalidJMSPriorityTestCase.java
index a93df290c3..758e19d264 100644
--- a/java/sca/itest/validation/src/test/java/binding/jms/InvalidJMSPriorityTestCase.java
+++ b/java/sca/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/java/sca/itest/validation/src/test/java/binding/jms/InvalidResponseDestinationTypeTestCase.java b/java/sca/itest/validation/src/test/java/binding/jms/InvalidResponseDestinationTypeTestCase.java
index 949ec02134..96319438b6 100644
--- a/java/sca/itest/validation/src/test/java/binding/jms/InvalidResponseDestinationTypeTestCase.java
+++ b/java/sca/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/java/sca/itest/validation/src/test/java/binding/jms/MissingActivationSpecNameTestCase.java b/java/sca/itest/validation/src/test/java/binding/jms/MissingActivationSpecNameTestCase.java
index d38a88744f..a2a4caa0b0 100644
--- a/java/sca/itest/validation/src/test/java/binding/jms/MissingActivationSpecNameTestCase.java
+++ b/java/sca/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).getProblems().get(1);
+ Problem problem = monitor.getLastProblem();
assertNotNull(problem);
assertEquals("MissingActivationSpecName", problem.getMessageId());
diff --git a/java/sca/itest/validation/src/test/java/binding/jms/MissingConnectionFactoryNameTestCase.java b/java/sca/itest/validation/src/test/java/binding/jms/MissingConnectionFactoryNameTestCase.java
index 6999ae7969..0d91afd7e6 100644
--- a/java/sca/itest/validation/src/test/java/binding/jms/MissingConnectionFactoryNameTestCase.java
+++ b/java/sca/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).getProblems().get(1);
+ Problem problem = monitor.getLastProblem();
assertNotNull(problem);
assertEquals("MissingConnectionFactoryName", problem.getMessageId());
diff --git a/java/sca/itest/validation/src/test/java/binding/jms/MissingResponseActivationSpecTestCase.java b/java/sca/itest/validation/src/test/java/binding/jms/MissingResponseActivationSpecTestCase.java
index 7333fc0f1e..048fcc7d43 100644
--- a/java/sca/itest/validation/src/test/java/binding/jms/MissingResponseActivationSpecTestCase.java
+++ b/java/sca/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).getProblems().get(1);
+ Problem problem = monitor.getLastProblem();
assertNotNull(problem);
assertEquals("MissingResponseActivationSpec", problem.getMessageId());
diff --git a/java/sca/itest/validation/src/test/java/binding/jms/MissingResponseConnectionFactoryTestCase.java b/java/sca/itest/validation/src/test/java/binding/jms/MissingResponseConnectionFactoryTestCase.java
index ca0ef9a294..856c9f3b27 100644
--- a/java/sca/itest/validation/src/test/java/binding/jms/MissingResponseConnectionFactoryTestCase.java
+++ b/java/sca/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).getProblems().get(1);
+ Problem problem = monitor.getLastProblem();
assertNotNull(problem);
assertEquals("MissingResponseConnectionFactory", problem.getMessageId());
diff --git a/java/sca/itest/validation/src/test/java/binding/jms/MustStartWithSchemaTestCase.java b/java/sca/itest/validation/src/test/java/binding/jms/MustStartWithSchemaTestCase.java
index d9e1c782a8..b584cb8d94 100644
--- a/java/sca/itest/validation/src/test/java/binding/jms/MustStartWithSchemaTestCase.java
+++ b/java/sca/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/java/sca/itest/validation/src/test/java/binding/jms/UnexpectedElementTestCase.java b/java/sca/itest/validation/src/test/java/binding/jms/UnexpectedElementTestCase.java
index 3e4e36d839..ae26008564 100644
--- a/java/sca/itest/validation/src/test/java/binding/jms/UnexpectedElementTestCase.java
+++ b/java/sca/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/java/sca/itest/validation/src/test/java/binding/jms/UnexpectedResponseElementTestCase.java b/java/sca/itest/validation/src/test/java/binding/jms/UnexpectedResponseElementTestCase.java
index 60ea47a85f..fedc1f7530 100644
--- a/java/sca/itest/validation/src/test/java/binding/jms/UnexpectedResponseElementTestCase.java
+++ b/java/sca/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/java/sca/itest/validation/src/test/java/binding/jms/UnknownTokenInURITestCase.java b/java/sca/itest/validation/src/test/java/binding/jms/UnknownTokenInURITestCase.java
index 6a75a35f99..d94643cbc9 100644
--- a/java/sca/itest/validation/src/test/java/binding/jms/UnknownTokenInURITestCase.java
+++ b/java/sca/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/java/sca/itest/validation/src/test/java/binding/wsxml/InvalidWsdlElementAttrTestCase.java b/java/sca/itest/validation/src/test/java/binding/wsxml/InvalidWsdlElementAttrTestCase.java
index c0f60a848f..4cbe3def2d 100644
--- a/java/sca/itest/validation/src/test/java/binding/wsxml/InvalidWsdlElementAttrTestCase.java
+++ b/java/sca/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/java/sca/itest/validation/src/test/java/binding/wsxml/MustUseWsdlBindingTestCase.java b/java/sca/itest/validation/src/test/java/binding/wsxml/MustUseWsdlBindingTestCase.java
index 5a74194796..2fe8af318c 100644
--- a/java/sca/itest/validation/src/test/java/binding/wsxml/MustUseWsdlBindingTestCase.java
+++ b/java/sca/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/java/sca/itest/validation/src/test/java/binding/wsxml/WsdlBindingDoesNotMatchTestCase.java b/java/sca/itest/validation/src/test/java/binding/wsxml/WsdlBindingDoesNotMatchTestCase.java
index 7991de7176..09865ab855 100644
--- a/java/sca/itest/validation/src/test/java/binding/wsxml/WsdlBindingDoesNotMatchTestCase.java
+++ b/java/sca/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/java/sca/itest/validation/src/test/java/binding/wsxml/WsdlPortTypeDoesNotMatchTestCase.java b/java/sca/itest/validation/src/test/java/binding/wsxml/WsdlPortTypeDoesNotMatchTestCase.java
index 1ef5f7b00a..3be31d5994 100644
--- a/java/sca/itest/validation/src/test/java/binding/wsxml/WsdlPortTypeDoesNotMatchTestCase.java
+++ b/java/sca/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/java/sca/itest/validation/src/test/java/binding/wsxml/WsdlServiceDoesNotMatchTestCase.java b/java/sca/itest/validation/src/test/java/binding/wsxml/WsdlServiceDoesNotMatchTestCase.java
index a0a7d12b9f..303b8299ad 100644
--- a/java/sca/itest/validation/src/test/java/binding/wsxml/WsdlServiceDoesNotMatchTestCase.java
+++ b/java/sca/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/java/sca/itest/validation/src/test/java/calculator/warning/ComponentReferenceTargetNotFoundTestCase.java b/java/sca/itest/validation/src/test/java/calculator/warning/ComponentReferenceTargetNotFoundTestCase.java
index 555810f453..f4ba8eb4e6 100644
--- a/java/sca/itest/validation/src/test/java/calculator/warning/ComponentReferenceTargetNotFoundTestCase.java
+++ b/java/sca/itest/validation/src/test/java/calculator/warning/ComponentReferenceTargetNotFoundTestCase.java
@@ -27,11 +27,10 @@ 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.Client;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
import org.apache.tuscany.sca.node.impl.NodeImpl;
/**
@@ -40,13 +39,13 @@ import org.apache.tuscany.sca.node.impl.NodeImpl;
public class ComponentReferenceTargetNotFoundTestCase extends TestCase {
private CalculatorService calculatorService;
- private SCANode node;
+ private Node node;
@Override
protected void setUp() throws Exception {
- SCANodeFactory nodeFactory = SCANodeFactory.newInstance();
- node = nodeFactory.createSCANode(new File("src/main/resources/ComponentReferenceTargetNotFound/Calculator.composite").toURL().toString(),
- new SCAContribution("TestContribution",
+ NodeFactory nodeFactory = NodeFactory.newInstance();
+ node = nodeFactory.createNode(new File("src/main/resources/ComponentReferenceTargetNotFound/Calculator.composite").toURL().toString(),
+ new Contribution("TestContribution",
new File("src/main/resources/ComponentReferenceTargetNotFound").toURL().toString()));
try {
@@ -55,7 +54,7 @@ public class ComponentReferenceTargetNotFoundTestCase extends TestCase {
// do nothing - the SCA binding throws and exception here
// because the interface for the reference is not remotable
}
- calculatorService = ((SCAClient)node).getService(CalculatorService.class, "CalculatorServiceComponent");
+ calculatorService = ((Client)node).getService(CalculatorService.class, "CalculatorServiceComponent");
}
@Override
@@ -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/java/sca/itest/validation/src/test/java/calculator/warning/DuplicateComponentNameTestCase.java b/java/sca/itest/validation/src/test/java/calculator/warning/DuplicateComponentNameTestCase.java
index 4d70df1102..a7b23ed10f 100644
--- a/java/sca/itest/validation/src/test/java/calculator/warning/DuplicateComponentNameTestCase.java
+++ b/java/sca/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/java/sca/itest/validation/src/test/java/calculator/warning/DuplicateImplementationPropertyNameTestCase.java b/java/sca/itest/validation/src/test/java/calculator/warning/DuplicateImplementationPropertyNameTestCase.java
index 7593f39991..96d8debd4a 100644
--- a/java/sca/itest/validation/src/test/java/calculator/warning/DuplicateImplementationPropertyNameTestCase.java
+++ b/java/sca/itest/validation/src/test/java/calculator/warning/DuplicateImplementationPropertyNameTestCase.java
@@ -27,23 +27,22 @@ 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;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
import org.apache.tuscany.sca.node.impl.NodeImpl;
/**
* This shows how to test the Calculator service component.
*/
public class DuplicateImplementationPropertyNameTestCase extends TestCase {
- private SCANode node;
+ private Node node;
@Override
protected void setUp() throws Exception {
- SCANodeFactory nodeFactory = SCANodeFactory.newInstance();
- node = nodeFactory.createSCANode(new File("src/main/resources/DuplicateImplementationPropertyName/Calculator.composite").toURL().toString(),
- new SCAContribution("TestContribution",
+ NodeFactory nodeFactory = NodeFactory.newInstance();
+ node = nodeFactory.createNode(new File("src/main/resources/DuplicateImplementationPropertyName/Calculator.composite").toURL().toString(),
+ new Contribution("TestContribution",
new File("src/main/resources/DuplicateImplementationPropertyName").toURL().toString()));
}
@@ -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/java/sca/itest/validation/src/test/java/calculator/warning/DuplicateImplementationReferenceNameTestCase.java b/java/sca/itest/validation/src/test/java/calculator/warning/DuplicateImplementationReferenceNameTestCase.java
index 0a711175dc..7246d6e0a3 100644
--- a/java/sca/itest/validation/src/test/java/calculator/warning/DuplicateImplementationReferenceNameTestCase.java
+++ b/java/sca/itest/validation/src/test/java/calculator/warning/DuplicateImplementationReferenceNameTestCase.java
@@ -27,10 +27,9 @@ 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;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
import org.apache.tuscany.sca.node.impl.NodeImpl;
/**
@@ -38,13 +37,13 @@ import org.apache.tuscany.sca.node.impl.NodeImpl;
*/
public class DuplicateImplementationReferenceNameTestCase extends TestCase {
- private SCANode node;
+ private Node node;
@Override
protected void setUp() throws Exception {
- SCANodeFactory nodeFactory = SCANodeFactory.newInstance();
- node = nodeFactory.createSCANode(new File("src/main/resources/DuplicateImplementationReferenceName/Calculator.composite").toURL().toString(),
- new SCAContribution("TestContribution",
+ NodeFactory nodeFactory = NodeFactory.newInstance();
+ node = nodeFactory.createNode(new File("src/main/resources/DuplicateImplementationReferenceName/Calculator.composite").toURL().toString(),
+ new Contribution("TestContribution",
new File("src/main/resources/DuplicateImplementationReferenceName").toURL().toString()));
}
@@ -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/java/sca/itest/validation/src/test/java/calculator/warning/DuplicatePropertyNameTestCase.java b/java/sca/itest/validation/src/test/java/calculator/warning/DuplicatePropertyNameTestCase.java
index 10660795a7..3ffd10f36f 100644
--- a/java/sca/itest/validation/src/test/java/calculator/warning/DuplicatePropertyNameTestCase.java
+++ b/java/sca/itest/validation/src/test/java/calculator/warning/DuplicatePropertyNameTestCase.java
@@ -27,11 +27,10 @@ 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.Client;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
import org.apache.tuscany.sca.node.impl.NodeImpl;
/**
@@ -40,16 +39,16 @@ import org.apache.tuscany.sca.node.impl.NodeImpl;
public class DuplicatePropertyNameTestCase extends TestCase {
private CalculatorService calculatorService;
- private SCANode node;
+ private Node node;
@Override
protected void setUp() throws Exception {
- SCANodeFactory nodeFactory = SCANodeFactory.newInstance();
- node = nodeFactory.createSCANode(new File("src/main/resources/DuplicatePropertyName/Calculator.composite").toURL().toString(),
- new SCAContribution("TestContribution",
+ NodeFactory nodeFactory = NodeFactory.newInstance();
+ node = nodeFactory.createNode(new File("src/main/resources/DuplicatePropertyName/Calculator.composite").toURL().toString(),
+ new Contribution("TestContribution",
new File("src/main/resources/DuplicatePropertyName").toURL().toString()));
node.start();
- calculatorService = ((SCAClient)node).getService(CalculatorService.class, "CalculatorServiceComponent");
+ calculatorService = ((Client)node).getService(CalculatorService.class, "CalculatorServiceComponent");
}
@Override
@@ -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/java/sca/itest/validation/src/test/java/calculator/warning/DuplicateReferenceNameTestCase.java b/java/sca/itest/validation/src/test/java/calculator/warning/DuplicateReferenceNameTestCase.java
index 15b4b15989..0e0e4cd2bd 100644
--- a/java/sca/itest/validation/src/test/java/calculator/warning/DuplicateReferenceNameTestCase.java
+++ b/java/sca/itest/validation/src/test/java/calculator/warning/DuplicateReferenceNameTestCase.java
@@ -27,11 +27,10 @@ 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.Client;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
import org.apache.tuscany.sca.node.impl.NodeImpl;
/**
@@ -40,16 +39,16 @@ import org.apache.tuscany.sca.node.impl.NodeImpl;
public class DuplicateReferenceNameTestCase extends TestCase {
private CalculatorService calculatorService;
- private SCANode node;
+ private Node node;
@Override
protected void setUp() throws Exception {
- SCANodeFactory nodeFactory = SCANodeFactory.newInstance();
- node = nodeFactory.createSCANode(new File("src/main/resources/DuplicateReferenceName/Calculator.composite").toURL().toString(),
- new SCAContribution("TestContribution",
+ NodeFactory nodeFactory = NodeFactory.newInstance();
+ node = nodeFactory.createNode(new File("src/main/resources/DuplicateReferenceName/Calculator.composite").toURL().toString(),
+ new Contribution("TestContribution",
new File("src/main/resources/DuplicateReferenceName").toURL().toString()));
node.start();
- calculatorService = ((SCAClient)node).getService(CalculatorService.class, "CalculatorServiceComponent");
+ calculatorService = ((Client)node).getService(CalculatorService.class, "CalculatorServiceComponent");
}
@Override
@@ -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/java/sca/itest/validation/src/test/java/calculator/warning/MultipleBindingsForServiceTestCase.java b/java/sca/itest/validation/src/test/java/calculator/warning/MultipleBindingsForServiceTestCase.java
index 55741ec2ef..45c7af3d1f 100644
--- a/java/sca/itest/validation/src/test/java/calculator/warning/MultipleBindingsForServiceTestCase.java
+++ b/java/sca/itest/validation/src/test/java/calculator/warning/MultipleBindingsForServiceTestCase.java
@@ -27,11 +27,10 @@ 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.Client;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
import org.apache.tuscany.sca.node.impl.NodeImpl;
/**
@@ -40,16 +39,16 @@ import org.apache.tuscany.sca.node.impl.NodeImpl;
public class MultipleBindingsForServiceTestCase extends TestCase {
private CalculatorService calculatorService;
- private SCANode node;
+ private Node node;
@Override
protected void setUp() throws Exception {
- SCANodeFactory nodeFactory = SCANodeFactory.newInstance();
- node = nodeFactory.createSCANode(new File("src/main/resources/MultipleBindingsForService/Calculator.composite").toURL().toString(),
- new SCAContribution("TestContribution",
+ NodeFactory nodeFactory = NodeFactory.newInstance();
+ node = nodeFactory.createNode(new File("src/main/resources/MultipleBindingsForService/Calculator.composite").toURL().toString(),
+ new Contribution("TestContribution",
new File("src/main/resources/MultipleBindingsForService").toURL().toString()));
node.start();
- calculatorService = ((SCAClient)node).getService(CalculatorService.class, "CalculatorServiceComponent");
+ calculatorService = ((Client)node).getService(CalculatorService.class, "CalculatorServiceComponent");
}
@Override
@@ -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/java/sca/itest/validation/src/test/java/calculator/warning/NoComponentImplementationTestCase.java b/java/sca/itest/validation/src/test/java/calculator/warning/NoComponentImplementationTestCase.java
index 7f8bd68e5e..ef2d13aaaa 100644
--- a/java/sca/itest/validation/src/test/java/calculator/warning/NoComponentImplementationTestCase.java
+++ b/java/sca/itest/validation/src/test/java/calculator/warning/NoComponentImplementationTestCase.java
@@ -27,10 +27,9 @@ 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;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
import org.apache.tuscany.sca.node.impl.NodeImpl;
/**
@@ -39,13 +38,13 @@ import org.apache.tuscany.sca.node.impl.NodeImpl;
public class NoComponentImplementationTestCase extends TestCase {
private CalculatorService calculatorService;
- private SCANode node;
+ private Node node;
@Override
protected void setUp() throws Exception {
- SCANodeFactory nodeFactory = SCANodeFactory.newInstance();
- node = nodeFactory.createSCANode(new File("src/main/resources/NoComponentImplementation/Calculator.composite").toURL().toString(),
- new SCAContribution("TestContribution",
+ NodeFactory nodeFactory = NodeFactory.newInstance();
+ node = nodeFactory.createNode(new File("src/main/resources/NoComponentImplementation/Calculator.composite").toURL().toString(),
+ new Contribution("TestContribution",
new File("src/main/resources/NoComponentImplementation").toURL().toString()));
}
@@ -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/java/sca/itest/validation/src/test/java/calculator/warning/NoCompositeNamespaceTestCase.java b/java/sca/itest/validation/src/test/java/calculator/warning/NoCompositeNamespaceTestCase.java
index 1f26d3a7d6..9014fb00e5 100644
--- a/java/sca/itest/validation/src/test/java/calculator/warning/NoCompositeNamespaceTestCase.java
+++ b/java/sca/itest/validation/src/test/java/calculator/warning/NoCompositeNamespaceTestCase.java
@@ -27,11 +27,10 @@ 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.Client;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
import org.apache.tuscany.sca.node.impl.NodeImpl;
/**
@@ -40,16 +39,16 @@ import org.apache.tuscany.sca.node.impl.NodeImpl;
public class NoCompositeNamespaceTestCase extends TestCase {
private CalculatorService calculatorService;
- private SCANode node;
+ private Node node;
@Override
protected void setUp() throws Exception {
- SCANodeFactory nodeFactory = SCANodeFactory.newInstance();
- node = nodeFactory.createSCANode(new File("src/main/resources/NoCompositeNamespace/Calculator.composite").toURL().toString(),
- new SCAContribution("TestContribution",
+ NodeFactory nodeFactory = NodeFactory.newInstance();
+ node = nodeFactory.createNode(new File("src/main/resources/NoCompositeNamespace/Calculator.composite").toURL().toString(),
+ new Contribution("TestContribution",
new File("src/main/resources/NoCompositeNamespace").toURL().toString()));
node.start();
- calculatorService = ((SCAClient)node).getService(CalculatorService.class, "CalculatorServiceComponent");
+ calculatorService = ((Client)node).getService(CalculatorService.class, "CalculatorServiceComponent");
}
@Override
@@ -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/java/sca/itest/validation/src/test/java/calculator/warning/NoMatchingBindingTestCase.java b/java/sca/itest/validation/src/test/java/calculator/warning/NoMatchingBindingTestCase.java
index d398efc9ea..69382b0456 100644
--- a/java/sca/itest/validation/src/test/java/calculator/warning/NoMatchingBindingTestCase.java
+++ b/java/sca/itest/validation/src/test/java/calculator/warning/NoMatchingBindingTestCase.java
@@ -27,11 +27,10 @@ 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.Client;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
import org.apache.tuscany.sca.node.impl.NodeImpl;
/**
@@ -40,17 +39,17 @@ import org.apache.tuscany.sca.node.impl.NodeImpl;
public class NoMatchingBindingTestCase extends TestCase {
private CalculatorService calculatorService;
- private SCANode node;
+ private Node node;
@Override
protected void setUp() throws Exception {
- SCANodeFactory nodeFactory = SCANodeFactory.newInstance();
+ NodeFactory nodeFactory = NodeFactory.newInstance();
node =
- nodeFactory.createSCANode("Calculator.composite", new SCAContribution("TestContribution", new File("src/main/resources/NoMatchingBinding")
+ nodeFactory.createNode("Calculator.composite", new Contribution("TestContribution", new File("src/main/resources/NoMatchingBinding")
.toURL().toString()));
node.start();
- calculatorService = ((SCAClient)node).getService(CalculatorService.class, "CalculatorServiceComponent");
+ calculatorService = ((Client)node).getService(CalculatorService.class, "CalculatorServiceComponent");
}
@Override
@@ -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/java/sca/itest/validation/src/test/java/calculator/warning/PromotedReferenceNotFoundTestCase.java b/java/sca/itest/validation/src/test/java/calculator/warning/PromotedReferenceNotFoundTestCase.java
index 9d2f028dea..057039b4df 100644
--- a/java/sca/itest/validation/src/test/java/calculator/warning/PromotedReferenceNotFoundTestCase.java
+++ b/java/sca/itest/validation/src/test/java/calculator/warning/PromotedReferenceNotFoundTestCase.java
@@ -27,11 +27,10 @@ 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.Client;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
import org.apache.tuscany.sca.node.impl.NodeImpl;
/**
@@ -40,16 +39,16 @@ import org.apache.tuscany.sca.node.impl.NodeImpl;
public class PromotedReferenceNotFoundTestCase extends TestCase {
private CalculatorService calculatorService;
- private SCANode node;
+ private Node node;
@Override
protected void setUp() throws Exception {
- SCANodeFactory nodeFactory = SCANodeFactory.newInstance();
- node = nodeFactory.createSCANode(new File("src/main/resources/PromotedReferenceNotFound/Calculator.composite").toURL().toString(),
- new SCAContribution("TestContribution",
+ NodeFactory nodeFactory = NodeFactory.newInstance();
+ node = nodeFactory.createNode(new File("src/main/resources/PromotedReferenceNotFound/Calculator.composite").toURL().toString(),
+ new Contribution("TestContribution",
new File("src/main/resources/PromotedReferenceNotFound").toURL().toString()));
node.start();
- calculatorService = ((SCAClient)node).getService(CalculatorService.class, "CalculatorServiceComponent");
+ calculatorService = ((Client)node).getService(CalculatorService.class, "CalculatorServiceComponent");
}
@Override
@@ -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/java/sca/itest/validation/src/test/java/calculator/warning/PromotedServiceNotFoundTestCase.java b/java/sca/itest/validation/src/test/java/calculator/warning/PromotedServiceNotFoundTestCase.java
index 7f836e4b01..cda4f9cb57 100644
--- a/java/sca/itest/validation/src/test/java/calculator/warning/PromotedServiceNotFoundTestCase.java
+++ b/java/sca/itest/validation/src/test/java/calculator/warning/PromotedServiceNotFoundTestCase.java
@@ -27,11 +27,10 @@ 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.Client;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
import org.apache.tuscany.sca.node.impl.NodeImpl;
/**
@@ -40,16 +39,16 @@ import org.apache.tuscany.sca.node.impl.NodeImpl;
public class PromotedServiceNotFoundTestCase extends TestCase {
private CalculatorService calculatorService;
- private SCANode node;
+ private Node node;
@Override
protected void setUp() throws Exception {
- SCANodeFactory nodeFactory = SCANodeFactory.newInstance();
- node = nodeFactory.createSCANode(new File("src/main/resources/PromotedServiceNotFound/Calculator.composite").toURL().toString(),
- new SCAContribution("TestContribution",
+ NodeFactory nodeFactory = NodeFactory.newInstance();
+ node = nodeFactory.createNode(new File("src/main/resources/PromotedServiceNotFound/Calculator.composite").toURL().toString(),
+ new Contribution("TestContribution",
new File("src/main/resources/PromotedServiceNotFound").toURL().toString()));
node.start();
- calculatorService = ((SCAClient)node).getService(CalculatorService.class, "CalculatorServiceComponent");
+ calculatorService = ((Client)node).getService(CalculatorService.class, "CalculatorServiceComponent");
}
@Override
@@ -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/java/sca/itest/validation/src/test/java/calculator/warning/PropertyAttributeMustSupplyNullTestCase.java b/java/sca/itest/validation/src/test/java/calculator/warning/PropertyAttributeMustSupplyNullTestCase.java
index 04c2594cd3..e8475bb865 100644
--- a/java/sca/itest/validation/src/test/java/calculator/warning/PropertyAttributeMustSupplyNullTestCase.java
+++ b/java/sca/itest/validation/src/test/java/calculator/warning/PropertyAttributeMustSupplyNullTestCase.java
@@ -27,11 +27,10 @@ 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.Client;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
import org.apache.tuscany.sca.node.impl.NodeImpl;
/**
@@ -40,16 +39,16 @@ import org.apache.tuscany.sca.node.impl.NodeImpl;
public class PropertyAttributeMustSupplyNullTestCase extends TestCase {
private CalculatorService calculatorService;
- private SCANode node;
+ private Node node;
@Override
protected void setUp() throws Exception {
- SCANodeFactory nodeFactory = SCANodeFactory.newInstance();
- node = nodeFactory.createSCANode(new File("src/main/resources/PropertyAttribute/CalculatorNullMustSupply.composite").toURL().toString(),
- new SCAContribution("TestContribution",
+ NodeFactory nodeFactory = NodeFactory.newInstance();
+ node = nodeFactory.createNode(new File("src/main/resources/PropertyAttribute/CalculatorNullMustSupply.composite").toURL().toString(),
+ new Contribution("TestContribution",
new File("src/main/resources/PropertyAttribute").toURL().toString()));
node.start();
- calculatorService = ((SCAClient)node).getService(CalculatorService.class, "CalculatorServiceComponent");
+ calculatorService = ((Client)node).getService(CalculatorService.class, "CalculatorServiceComponent");
}
@Override
@@ -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/java/sca/itest/validation/src/test/java/calculator/warning/PropertyAttributeTestCase.java b/java/sca/itest/validation/src/test/java/calculator/warning/PropertyAttributeTestCase.java
index 3dabfecbb6..88721a18e2 100644
--- a/java/sca/itest/validation/src/test/java/calculator/warning/PropertyAttributeTestCase.java
+++ b/java/sca/itest/validation/src/test/java/calculator/warning/PropertyAttributeTestCase.java
@@ -27,11 +27,10 @@ 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.Client;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
import org.apache.tuscany.sca.node.impl.NodeImpl;
/**
@@ -40,16 +39,16 @@ import org.apache.tuscany.sca.node.impl.NodeImpl;
public class PropertyAttributeTestCase extends TestCase {
private CalculatorService calculatorService;
- private SCANode node;
+ private Node node;
@Override
protected void setUp() throws Exception {
- SCANodeFactory nodeFactory = SCANodeFactory.newInstance();
- node = nodeFactory.createSCANode(new File("src/main/resources/PropertyAttribute/Calculator.composite").toURL().toString(),
- new SCAContribution("TestContribution",
+ NodeFactory nodeFactory = NodeFactory.newInstance();
+ node = nodeFactory.createNode(new File("src/main/resources/PropertyAttribute/Calculator.composite").toURL().toString(),
+ new Contribution("TestContribution",
new File("src/main/resources/PropertyAttribute").toURL().toString()));
node.start();
- calculatorService = ((SCAClient)node).getService(CalculatorService.class, "CalculatorServiceComponent");
+ calculatorService = ((Client)node).getService(CalculatorService.class, "CalculatorServiceComponent");
}
@Override
@@ -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/java/sca/itest/validation/src/test/java/calculator/warning/PropertyNotFoundTestCase.java b/java/sca/itest/validation/src/test/java/calculator/warning/PropertyNotFoundTestCase.java
index 0dca8ed1df..1a0739eaa5 100644
--- a/java/sca/itest/validation/src/test/java/calculator/warning/PropertyNotFoundTestCase.java
+++ b/java/sca/itest/validation/src/test/java/calculator/warning/PropertyNotFoundTestCase.java
@@ -27,11 +27,10 @@ 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.Client;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
import org.apache.tuscany.sca.node.impl.NodeImpl;
/**
@@ -40,16 +39,16 @@ import org.apache.tuscany.sca.node.impl.NodeImpl;
public class PropertyNotFoundTestCase extends TestCase {
private CalculatorService calculatorService;
- private SCANode node;
+ private Node node;
@Override
protected void setUp() throws Exception {
- SCANodeFactory nodeFactory = SCANodeFactory.newInstance();
- node = nodeFactory.createSCANode(new File("src/main/resources/PropertyNotFound/Calculator.composite").toURL().toString(),
- new SCAContribution("TestContribution",
+ NodeFactory nodeFactory = NodeFactory.newInstance();
+ node = nodeFactory.createNode(new File("src/main/resources/PropertyNotFound/Calculator.composite").toURL().toString(),
+ new Contribution("TestContribution",
new File("src/main/resources/PropertyNotFound").toURL().toString()));
node.start();
- calculatorService = ((SCAClient)node).getService(CalculatorService.class, "CalculatorServiceComponent");
+ calculatorService = ((Client)node).getService(CalculatorService.class, "CalculatorServiceComponent");
}
@Override
@@ -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/java/sca/itest/validation/src/test/java/calculator/warning/PropertyOverrideManyAttributeTestCase.java b/java/sca/itest/validation/src/test/java/calculator/warning/PropertyOverrideManyAttributeTestCase.java
index 37f7ef352e..c20c551d92 100644
--- a/java/sca/itest/validation/src/test/java/calculator/warning/PropertyOverrideManyAttributeTestCase.java
+++ b/java/sca/itest/validation/src/test/java/calculator/warning/PropertyOverrideManyAttributeTestCase.java
@@ -27,11 +27,10 @@ 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.Client;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
import org.apache.tuscany.sca.node.impl.NodeImpl;
/**
@@ -40,16 +39,16 @@ import org.apache.tuscany.sca.node.impl.NodeImpl;
public class PropertyOverrideManyAttributeTestCase extends TestCase {
private CalculatorService calculatorService;
- private SCANode node;
+ private Node node;
@Override
protected void setUp() throws Exception {
- SCANodeFactory nodeFactory = SCANodeFactory.newInstance();
- node = nodeFactory.createSCANode(new File("src/main/resources/PropertyAttribute/CalculatorOverrideManyAttribute.composite").toURL().toString(),
- new SCAContribution("TestContribution",
+ NodeFactory nodeFactory = NodeFactory.newInstance();
+ node = nodeFactory.createNode(new File("src/main/resources/PropertyAttribute/CalculatorOverrideManyAttribute.composite").toURL().toString(),
+ new Contribution("TestContribution",
new File("src/main/resources/PropertyAttribute").toURL().toString()));
node.start();
- calculatorService = ((SCAClient)node).getService(CalculatorService.class, "CalculatorServiceComponent");
+ calculatorService = ((Client)node).getService(CalculatorService.class, "CalculatorServiceComponent");
}
@Override
@@ -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/java/sca/itest/validation/src/test/java/calculator/warning/ReferenceIncompatibleComponentInterfaceTestCase.java b/java/sca/itest/validation/src/test/java/calculator/warning/ReferenceIncompatibleComponentInterfaceTestCase.java
index ab57283a9e..7ae97638ce 100644
--- a/java/sca/itest/validation/src/test/java/calculator/warning/ReferenceIncompatibleComponentInterfaceTestCase.java
+++ b/java/sca/itest/validation/src/test/java/calculator/warning/ReferenceIncompatibleComponentInterfaceTestCase.java
@@ -27,11 +27,10 @@ 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.Client;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
import org.apache.tuscany.sca.node.impl.NodeImpl;
/**
@@ -40,16 +39,16 @@ import org.apache.tuscany.sca.node.impl.NodeImpl;
public class ReferenceIncompatibleComponentInterfaceTestCase extends TestCase {
private CalculatorService calculatorService;
- private SCANode node;
+ private Node node;
@Override
protected void setUp() throws Exception {
- SCANodeFactory nodeFactory = SCANodeFactory.newInstance();
- node = nodeFactory.createSCANode(new File("src/main/resources/ReferenceIncompatibleComponentInterface/Calculator.composite").toURL().toString(),
- new SCAContribution("TestContribution",
+ NodeFactory nodeFactory = NodeFactory.newInstance();
+ node = nodeFactory.createNode(new File("src/main/resources/ReferenceIncompatibleComponentInterface/Calculator.composite").toURL().toString(),
+ new Contribution("TestContribution",
new File("src/main/resources/ReferenceIncompatibleComponentInterface").toURL().toString()));
node.start();
- calculatorService = ((SCAClient)node).getService(CalculatorService.class, "CalculatorServiceComponent");
+ calculatorService = ((Client)node).getService(CalculatorService.class, "CalculatorServiceComponent");
}
@Override
@@ -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/java/sca/itest/validation/src/test/java/calculator/warning/ReferenceIncompatibleInterfaceTestCase.java b/java/sca/itest/validation/src/test/java/calculator/warning/ReferenceIncompatibleInterfaceTestCase.java
index 4c3cc3856a..6e5eb41ba0 100644
--- a/java/sca/itest/validation/src/test/java/calculator/warning/ReferenceIncompatibleInterfaceTestCase.java
+++ b/java/sca/itest/validation/src/test/java/calculator/warning/ReferenceIncompatibleInterfaceTestCase.java
@@ -27,11 +27,10 @@ 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.Client;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
import org.apache.tuscany.sca.node.impl.NodeImpl;
/**
@@ -40,16 +39,16 @@ import org.apache.tuscany.sca.node.impl.NodeImpl;
public class ReferenceIncompatibleInterfaceTestCase extends TestCase {
private CalculatorService calculatorService;
- private SCANode node;
+ private Node node;
@Override
protected void setUp() throws Exception {
- SCANodeFactory nodeFactory = SCANodeFactory.newInstance();
- node = nodeFactory.createSCANode(new File("src/main/resources/ReferenceIncompatibleInterface/Calculator.composite").toURL().toString(),
- new SCAContribution("TestContribution",
+ NodeFactory nodeFactory = NodeFactory.newInstance();
+ node = nodeFactory.createNode(new File("src/main/resources/ReferenceIncompatibleInterface/Calculator.composite").toURL().toString(),
+ new Contribution("TestContribution",
new File("src/main/resources/ReferenceIncompatibleInterface").toURL().toString()));
node.start();
- calculatorService = ((SCAClient)node).getService(CalculatorService.class, "CalculatorServiceComponent");
+ calculatorService = ((Client)node).getService(CalculatorService.class, "CalculatorServiceComponent");
}
@Override
@@ -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/java/sca/itest/validation/src/test/java/calculator/warning/ReferenceIncompatibleMultiplicityTestCase.java b/java/sca/itest/validation/src/test/java/calculator/warning/ReferenceIncompatibleMultiplicityTestCase.java
index 06fb06f6ad..2eec73f815 100644
--- a/java/sca/itest/validation/src/test/java/calculator/warning/ReferenceIncompatibleMultiplicityTestCase.java
+++ b/java/sca/itest/validation/src/test/java/calculator/warning/ReferenceIncompatibleMultiplicityTestCase.java
@@ -27,11 +27,10 @@ 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.Client;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
import org.apache.tuscany.sca.node.impl.NodeImpl;
/**
@@ -40,16 +39,16 @@ import org.apache.tuscany.sca.node.impl.NodeImpl;
public class ReferenceIncompatibleMultiplicityTestCase extends TestCase {
private CalculatorService calculatorService;
- private SCANode node;
+ private Node node;
@Override
protected void setUp() throws Exception {
- SCANodeFactory nodeFactory = SCANodeFactory.newInstance();
- node = nodeFactory.createSCANode(new File("src/main/resources/ReferenceIncompatibleMultiplicity/Calculator.composite").toURL().toString(),
- new SCAContribution("TestContribution",
+ NodeFactory nodeFactory = NodeFactory.newInstance();
+ node = nodeFactory.createNode(new File("src/main/resources/ReferenceIncompatibleMultiplicity/Calculator.composite").toURL().toString(),
+ new Contribution("TestContribution",
new File("src/main/resources/ReferenceIncompatibleMultiplicity").toURL().toString()));
node.start();
- calculatorService = ((SCAClient)node).getService(CalculatorService.class, "CalculatorServiceComponent");
+ calculatorService = ((Client)node).getService(CalculatorService.class, "CalculatorServiceComponent");
}
@Override
@@ -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/java/sca/itest/validation/src/test/java/calculator/warning/ReferenceNotFoundTestCase.java b/java/sca/itest/validation/src/test/java/calculator/warning/ReferenceNotFoundTestCase.java
index 6bacc8b05e..ab2c373486 100644
--- a/java/sca/itest/validation/src/test/java/calculator/warning/ReferenceNotFoundTestCase.java
+++ b/java/sca/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/java/sca/itest/validation/src/test/java/calculator/warning/ReferenceWithoutTargetsTestCase.java b/java/sca/itest/validation/src/test/java/calculator/warning/ReferenceWithoutTargetsTestCase.java
index d615857105..9b5adee7e6 100644
--- a/java/sca/itest/validation/src/test/java/calculator/warning/ReferenceWithoutTargetsTestCase.java
+++ b/java/sca/itest/validation/src/test/java/calculator/warning/ReferenceWithoutTargetsTestCase.java
@@ -27,11 +27,10 @@ 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.Client;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
import org.apache.tuscany.sca.node.impl.NodeImpl;
/**
@@ -40,16 +39,16 @@ import org.apache.tuscany.sca.node.impl.NodeImpl;
public class ReferenceWithoutTargetsTestCase extends TestCase {
private CalculatorService calculatorService;
- private SCANode node;
+ private Node node;
@Override
protected void setUp() throws Exception {
- SCANodeFactory nodeFactory = SCANodeFactory.newInstance();
- node = nodeFactory.createSCANode(new File("src/main/resources/ReferenceWithoutTargets/Calculator.composite").toURL().toString(),
- new SCAContribution("TestContribution",
+ NodeFactory nodeFactory = NodeFactory.newInstance();
+ node = nodeFactory.createNode(new File("src/main/resources/ReferenceWithoutTargets/Calculator.composite").toURL().toString(),
+ new Contribution("TestContribution",
new File("src/main/resources/ReferenceWithoutTargets").toURL().toString()));
node.start();
- calculatorService = ((SCAClient)node).getService(CalculatorService.class, "CalculatorServiceComponent");
+ calculatorService = ((Client)node).getService(CalculatorService.class, "CalculatorServiceComponent");
}
@Override
@@ -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/java/sca/itest/validation/src/test/java/calculator/warning/ServiceNotFoundForComponentServiceTestCase.java b/java/sca/itest/validation/src/test/java/calculator/warning/ServiceNotFoundForComponentServiceTestCase.java
index e9b920119a..1b8116a469 100644
--- a/java/sca/itest/validation/src/test/java/calculator/warning/ServiceNotFoundForComponentServiceTestCase.java
+++ b/java/sca/itest/validation/src/test/java/calculator/warning/ServiceNotFoundForComponentServiceTestCase.java
@@ -27,11 +27,10 @@ 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.Client;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
import org.apache.tuscany.sca.node.impl.NodeImpl;
/**
@@ -40,16 +39,16 @@ import org.apache.tuscany.sca.node.impl.NodeImpl;
public class ServiceNotFoundForComponentServiceTestCase extends TestCase {
private CalculatorService calculatorService;
- private SCANode node;
+ private Node node;
@Override
protected void setUp() throws Exception {
- SCANodeFactory nodeFactory = SCANodeFactory.newInstance();
- node = nodeFactory.createSCANode(new File("src/main/resources/ServiceNotFoundForComponentService/Calculator.composite").toURL().toString(),
- new SCAContribution("TestContribution",
+ NodeFactory nodeFactory = NodeFactory.newInstance();
+ node = nodeFactory.createNode(new File("src/main/resources/ServiceNotFoundForComponentService/Calculator.composite").toURL().toString(),
+ new Contribution("TestContribution",
new File("src/main/resources/ServiceNotFoundForComponentService").toURL().toString()));
node.start();
- calculatorService = ((SCAClient)node).getService(CalculatorService.class, "CalculatorServiceComponent");
+ calculatorService = ((Client)node).getService(CalculatorService.class, "CalculatorServiceComponent");
}
@Override
@@ -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/java/sca/itest/validation/src/test/java/calculator/warning/UnresolvedComponentImplementationTestCase.java b/java/sca/itest/validation/src/test/java/calculator/warning/UnresolvedComponentImplementationTestCase.java
index 4d950e30ff..c848cbb243 100644
--- a/java/sca/itest/validation/src/test/java/calculator/warning/UnresolvedComponentImplementationTestCase.java
+++ b/java/sca/itest/validation/src/test/java/calculator/warning/UnresolvedComponentImplementationTestCase.java
@@ -27,10 +27,9 @@ 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;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
import org.apache.tuscany.sca.node.impl.NodeImpl;
/**
@@ -39,13 +38,13 @@ import org.apache.tuscany.sca.node.impl.NodeImpl;
public class UnresolvedComponentImplementationTestCase extends TestCase {
private CalculatorService calculatorService;
- private SCANode node;
+ private Node node;
@Override
protected void setUp() throws Exception {
- SCANodeFactory nodeFactory = SCANodeFactory.newInstance();
- node = nodeFactory.createSCANode(new File("src/main/resources/UnresolvedComponentImplementation/Calculator.composite").toURL().toString(),
- new SCAContribution("TestContribution",
+ NodeFactory nodeFactory = NodeFactory.newInstance();
+ node = nodeFactory.createNode(new File("src/main/resources/UnresolvedComponentImplementation/Calculator.composite").toURL().toString(),
+ new Contribution("TestContribution",
new File("src/main/resources/UnresolvedComponentImplementation").toURL().toString()));
}
@@ -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/java/sca/itest/validation/src/test/java/calculator/warning/XSDValidationTestCase.java b/java/sca/itest/validation/src/test/java/calculator/warning/XSDValidationTestCase.java
index 60b08764c1..bcd6637a03 100644
--- a/java/sca/itest/validation/src/test/java/calculator/warning/XSDValidationTestCase.java
+++ b/java/sca/itest/validation/src/test/java/calculator/warning/XSDValidationTestCase.java
@@ -22,10 +22,10 @@ import java.io.File;
import junit.framework.TestCase;
-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.Client;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
/**
* This shows how to test the Calculator service component.
@@ -33,18 +33,18 @@ import org.apache.tuscany.sca.node.SCANodeFactory;
public class XSDValidationTestCase extends TestCase {
private CalculatorService calculatorService;
- private SCANode node;
+ private Node node;
private Exception startUpException;
@Override
protected void setUp() throws Exception {
- SCANodeFactory nodeFactory = SCANodeFactory.newInstance();
+ NodeFactory nodeFactory = NodeFactory.newInstance();
try {
- node = nodeFactory.createSCANode(new File("src/main/resources/XsdValidation/Calculator.composite").toURL().toString(),
- new SCAContribution("TestContribution",
+ node = nodeFactory.createNode(new File("src/main/resources/XsdValidation/Calculator.composite").toURL().toString(),
+ new Contribution("TestContribution",
new File("src/main/resources/XsdValidation").toURL().toString()));
node.start();
- calculatorService = ((SCAClient)node).getService(CalculatorService.class, "CalculatorServiceComponent");
+ calculatorService = ((Client)node).getService(CalculatorService.class, "CalculatorServiceComponent");
} catch (Exception ex){
startUpException = ex;
}
diff --git a/java/sca/itest/validation/src/test/java/contribution/java/AttributePackageMissingTestCase.java b/java/sca/itest/validation/src/test/java/contribution/java/AttributePackageMissingTestCase.java
index 04135ab2cc..60b0c51fef 100644
--- a/java/sca/itest/validation/src/test/java/contribution/java/AttributePackageMissingTestCase.java
+++ b/java/sca/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/java/sca/itest/validation/src/test/java/contribution/namespace/AttributeNameSpaceMissingTestCase.java b/java/sca/itest/validation/src/test/java/contribution/namespace/AttributeNameSpaceMissingTestCase.java
index ab0afc6f65..dd38802bbe 100644
--- a/java/sca/itest/validation/src/test/java/contribution/namespace/AttributeNameSpaceMissingTestCase.java
+++ b/java/sca/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/java/sca/itest/validation/src/test/java/contribution/resource/AttributeURIMissingTestCase.java b/java/sca/itest/validation/src/test/java/contribution/resource/AttributeURIMissingTestCase.java
index b01ec2a254..d83a4bfed9 100644
--- a/java/sca/itest/validation/src/test/java/contribution/resource/AttributeURIMissingTestCase.java
+++ b/java/sca/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(2);
+ Problem problem = monitor.getProblems().get(0);
assertNotNull(problem);
assertEquals("AttributeURIMissing", problem.getMessageId());
diff --git a/java/sca/itest/validation/src/test/java/contribution/xml/AttributeCompositeMissingTestCase.java b/java/sca/itest/validation/src/test/java/contribution/xml/AttributeCompositeMissingTestCase.java
index 32c1a8b3a8..b64de39c80 100644
--- a/java/sca/itest/validation/src/test/java/contribution/xml/AttributeCompositeMissingTestCase.java
+++ b/java/sca/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/java/sca/itest/validation/src/test/java/domain/CustomCompositeBuilder.java b/java/sca/itest/validation/src/test/java/domain/CustomCompositeBuilder.java
index 65814470a4..6fd5c04671 100644
--- a/java/sca/itest/validation/src/test/java/domain/CustomCompositeBuilder.java
+++ b/java/sca/itest/validation/src/test/java/domain/CustomCompositeBuilder.java
@@ -35,9 +35,9 @@ import org.apache.tuscany.sca.assembly.AssemblyFactory;
import org.apache.tuscany.sca.assembly.Composite;
import org.apache.tuscany.sca.assembly.SCABindingFactory;
import org.apache.tuscany.sca.assembly.builder.CompositeBuilder;
+import org.apache.tuscany.sca.assembly.builder.impl.CompositeBindingConfigurationBuilderImpl;
import org.apache.tuscany.sca.assembly.builder.impl.CompositeBuilderImpl;
import org.apache.tuscany.sca.contribution.Contribution;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
import org.apache.tuscany.sca.contribution.processor.DefaultValidatingXMLInputFactory;
import org.apache.tuscany.sca.contribution.processor.DefaultValidationSchemaExtensionPoint;
import org.apache.tuscany.sca.contribution.processor.ExtensibleStAXArtifactProcessor;
@@ -50,10 +50,11 @@ import org.apache.tuscany.sca.contribution.resolver.ExtensibleModelResolver;
import org.apache.tuscany.sca.contribution.resolver.ModelResolverExtensionPoint;
import org.apache.tuscany.sca.core.DefaultExtensionPointRegistry;
import org.apache.tuscany.sca.core.ExtensionPointRegistry;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.core.ModuleActivator;
import org.apache.tuscany.sca.core.ModuleActivatorExtensionPoint;
import org.apache.tuscany.sca.core.UtilityExtensionPoint;
-import org.apache.tuscany.sca.definitions.SCADefinitions;
+import org.apache.tuscany.sca.definitions.Definitions;
import org.apache.tuscany.sca.implementation.node.NodeImplementationFactory;
import org.apache.tuscany.sca.implementation.node.builder.impl.NodeCompositeBuilderImpl;
import org.apache.tuscany.sca.interfacedef.InterfaceContractMapper;
@@ -62,24 +63,24 @@ import org.apache.tuscany.sca.monitor.MonitorFactory;
import org.apache.tuscany.sca.policy.IntentAttachPointTypeFactory;
import org.apache.tuscany.sca.workspace.Workspace;
import org.apache.tuscany.sca.workspace.WorkspaceFactory;
-import org.apache.tuscany.sca.workspace.builder.ContributionDependencyBuilder;
+import org.apache.tuscany.sca.workspace.builder.ContributionBuilder;
import org.apache.tuscany.sca.workspace.builder.impl.ContributionDependencyBuilderImpl;
public class CustomCompositeBuilder {
private URLArtifactProcessor<Contribution> contributionProcessor;
private ModelResolverExtensionPoint modelResolvers;
- private ModelFactoryExtensionPoint modelFactories;
+ private FactoryExtensionPoint modelFactories;
private WorkspaceFactory workspaceFactory;
private AssemblyFactory assemblyFactory;
private XMLOutputFactory outputFactory;
private StAXArtifactProcessor<Object> xmlProcessor;
- private ContributionDependencyBuilder contributionDependencyBuilder;
+ private ContributionBuilder contributionDependencyBuilder;
private CompositeBuilder domainCompositeBuilder;
private CompositeBuilder nodeCompositeBuilder;
private NodeImplementationFactory nodeFactory;
//private AtomBindingFactory atomBindingFactory;
private static Workspace workspace;
- private List<SCADefinitions> policyDefinitions;
+ private List<Definitions> policyDefinitions;
private Monitor monitor;
private CustomCompositeBuilder() {
@@ -112,7 +113,7 @@ public class CustomCompositeBuilder {
}
// Get XML input/output factories
- modelFactories = extensionPoints.getExtensionPoint(ModelFactoryExtensionPoint.class);
+ modelFactories = extensionPoints.getExtensionPoint(FactoryExtensionPoint.class);
XMLInputFactory inputFactory = modelFactories.getFactory(XMLInputFactory.class);
outputFactory = modelFactories.getFactory(XMLOutputFactory.class);
@@ -140,16 +141,17 @@ public class CustomCompositeBuilder {
modelResolvers = extensionPoints.getExtensionPoint(ModelResolverExtensionPoint.class);
// Create a contribution dependency builder
- contributionDependencyBuilder = new ContributionDependencyBuilderImpl(monitor);
+ contributionDependencyBuilder = new ContributionDependencyBuilderImpl(null);
// Create a composite builder
SCABindingFactory scaBindingFactory = modelFactories.getFactory(SCABindingFactory.class);
IntentAttachPointTypeFactory attachPointTypeFactory = modelFactories.getFactory(IntentAttachPointTypeFactory.class);
InterfaceContractMapper contractMapper = utilities.getUtility(InterfaceContractMapper.class);
- domainCompositeBuilder = new CompositeBuilderImpl(assemblyFactory, scaBindingFactory, attachPointTypeFactory, contractMapper, monitor);
+ domainCompositeBuilder = new CompositeBuilderImpl(assemblyFactory, scaBindingFactory, attachPointTypeFactory, contractMapper);
// Create a node composite builder
- nodeCompositeBuilder = new NodeCompositeBuilderImpl(assemblyFactory, scaBindingFactory, contractMapper, null, monitor);
+ CompositeBuilder bindingConfigurationBuilder = new CompositeBindingConfigurationBuilderImpl(assemblyFactory, scaBindingFactory, contractMapper);
+ nodeCompositeBuilder = new NodeCompositeBuilderImpl(assemblyFactory, scaBindingFactory, contractMapper, bindingConfigurationBuilder);
}
public void loadContribution(String compositeURL, String sourceURI, String sourceURL) throws Exception {
@@ -168,20 +170,17 @@ public class CustomCompositeBuilder {
workspace.getContributions().add(storeContribution);
// Build the contribution dependencies
- Map<Contribution, List<Contribution>> contributionDependencies = new HashMap<Contribution, List<Contribution>>();
Set<Contribution> resolved = new HashSet<Contribution>();
for (Contribution contribution: workspace.getContributions()) {
- List<Contribution> dependencies = contributionDependencyBuilder.buildContributionDependencies(contribution, workspace);
+ contributionDependencyBuilder.build(contribution, workspace, monitor);
// Resolve contributions
- for (Contribution dependency: dependencies) {
+ for (Contribution dependency: contribution.getDependencies()) {
if (!resolved.contains(dependency)) {
resolved.add(dependency);
contributionProcessor.resolve(dependency, workspace.getModelResolver());
}
}
-
- contributionDependencies.put(contribution, dependencies);
}
// Create a composite model for the domain
@@ -210,7 +209,7 @@ public class CustomCompositeBuilder {
domainComposite.getIncludes().addAll(workspace.getDeployables());
// Build the domain composite and wire the components included in it
- domainCompositeBuilder.build(domainComposite);
+ domainCompositeBuilder.build(domainComposite, null, monitor);
}
public void readContribution(String compositeURL, String sourceURI, String sourceURL) throws Exception {
diff --git a/java/sca/itest/validation/src/test/java/impl/bpel/AttributeUnrecognizedNamespaceTestCase.java b/java/sca/itest/validation/src/test/java/impl/bpel/AttributeUnrecognizedNamespaceTestCase.java
index 9d97e3611a..690fb97a31 100644
--- a/java/sca/itest/validation/src/test/java/impl/bpel/AttributeUnrecognizedNamespaceTestCase.java
+++ b/java/sca/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/java/sca/itest/validation/src/test/java/impl/bpel/AttributeWithoutNamespaceTestCase.java b/java/sca/itest/validation/src/test/java/impl/bpel/AttributeWithoutNamespaceTestCase.java
index 80c15dc444..a768535fde 100644
--- a/java/sca/itest/validation/src/test/java/impl/bpel/AttributeWithoutNamespaceTestCase.java
+++ b/java/sca/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/java/sca/itest/validation/src/test/java/impl/bpel/BPELProcessNotFoundTestCase.java b/java/sca/itest/validation/src/test/java/impl/bpel/BPELProcessNotFoundTestCase.java
index 81e8aecfeb..64d41bdb48 100644
--- a/java/sca/itest/validation/src/test/java/impl/bpel/BPELProcessNotFoundTestCase.java
+++ b/java/sca/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/java/sca/itest/validation/src/test/java/impl/bpel/CannotResolveWSDLReferenceTestCase.java b/java/sca/itest/validation/src/test/java/impl/bpel/CannotResolveWSDLReferenceTestCase.java
index fb0c525aea..585bd62027 100644
--- a/java/sca/itest/validation/src/test/java/impl/bpel/CannotResolveWSDLReferenceTestCase.java
+++ b/java/sca/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/java/sca/itest/validation/src/test/java/impl/bpel/MyRolePartnerRoleNullTestCase.java b/java/sca/itest/validation/src/test/java/impl/bpel/MyRolePartnerRoleNullTestCase.java
index 445629457e..aab3529fba 100644
--- a/java/sca/itest/validation/src/test/java/impl/bpel/MyRolePartnerRoleNullTestCase.java
+++ b/java/sca/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/java/sca/itest/validation/src/test/java/impl/bpel/PartnerLinkHasBothAttrTestCase.java b/java/sca/itest/validation/src/test/java/impl/bpel/PartnerLinkHasBothAttrTestCase.java
index 00b904ae65..4c3226f4c8 100644
--- a/java/sca/itest/validation/src/test/java/impl/bpel/PartnerLinkHasBothAttrTestCase.java
+++ b/java/sca/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/java/sca/itest/validation/src/test/java/impl/bpel/PartnerLinkNoMatchingTypeTestCase.java b/java/sca/itest/validation/src/test/java/impl/bpel/PartnerLinkNoMatchingTypeTestCase.java
index b7a4ee6fef..b9c0b68f7e 100644
--- a/java/sca/itest/validation/src/test/java/impl/bpel/PartnerLinkNoMatchingTypeTestCase.java
+++ b/java/sca/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/java/sca/itest/validation/src/test/java/impl/bpel/PartnerLinkTypeNoRolesTestCase.java b/java/sca/itest/validation/src/test/java/impl/bpel/PartnerLinkTypeNoRolesTestCase.java
index 32d3211f36..fc32e96b52 100644
--- a/java/sca/itest/validation/src/test/java/impl/bpel/PartnerLinkTypeNoRolesTestCase.java
+++ b/java/sca/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/java/sca/itest/validation/src/test/java/impl/ejb/EJBLinkAttributeMissingTestCase.java b/java/sca/itest/validation/src/test/java/impl/ejb/EJBLinkAttributeMissingTestCase.java
index b31451c433..4b367f85ef 100644
--- a/java/sca/itest/validation/src/test/java/impl/ejb/EJBLinkAttributeMissingTestCase.java
+++ b/java/sca/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/java/sca/itest/validation/src/test/java/impl/java/ClassNotFoundExceptionTestCase.java b/java/sca/itest/validation/src/test/java/impl/java/ClassNotFoundExceptionTestCase.java
index 3a7745722a..969690acaf 100644
--- a/java/sca/itest/validation/src/test/java/impl/java/ClassNotFoundExceptionTestCase.java
+++ b/java/sca/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/java/sca/itest/validation/src/test/java/impl/java/ContributionResolveExceptionTestCase.java b/java/sca/itest/validation/src/test/java/impl/java/ContributionResolveExceptionTestCase.java
index 59fc3ce79c..eef964e274 100644
--- a/java/sca/itest/validation/src/test/java/impl/java/ContributionResolveExceptionTestCase.java
+++ b/java/sca/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/java/sca/itest/validation/src/test/java/impl/osgi/CouldNotLocateOSGiBundleTestCase.java b/java/sca/itest/validation/src/test/java/impl/osgi/CouldNotLocateOSGiBundleTestCase.java
deleted file mode 100644
index 6f54ad140c..0000000000
--- a/java/sca/itest/validation/src/test/java/impl/osgi/CouldNotLocateOSGiBundleTestCase.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * 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.
- */
-package impl.osgi;
-
-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.apache.tuscany.sca.osgi.runtime.OSGiRuntime;
-
-import domain.CustomCompositeBuilder;
-
-/**
- * This shows how to test the Calculator service component.
- */
-public class CouldNotLocateOSGiBundleTestCase extends TestCase {
-
- private CustomCompositeBuilder customDomain;
-
- @Override
- protected void setUp() throws Exception
- {
- //OSGiTestBundles.createBundle("src/main/resources/impl/osgi/MissingComponentTypeFile/OSGiTestService.jar", OSGiTestInterface.class, OSGiTestImpl.class);
-
- customDomain = CustomCompositeBuilder.getInstance();
- try {
- customDomain.loadContribution("src/main/resources/impl/osgi/CouldNotLocateOSGiBundle/osgitest.composite",
- "TestContribution", "src/main/resources/impl/osgi/CouldNotLocateOSGiBundle/");
- } catch (Exception ex){
- //throw ex;
- }
- }
-
- @Override
- protected void tearDown() throws Exception {
- //nothing to do
- OSGiRuntime.stop();
- }
-
- public void testCalculator() {
- Monitor monitor = customDomain.getMonitorInstance();
- Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
-
- assertNotNull(problem);
- assertEquals("CouldNotLocateOSGiBundle", problem.getMessageId());
- }
-}
diff --git a/java/sca/itest/validation/src/test/java/impl/osgi/MissingComponentTypeFileTestCase.java b/java/sca/itest/validation/src/test/java/impl/osgi/MissingComponentTypeFileTestCase.java
deleted file mode 100644
index 3d75fa8ccc..0000000000
--- a/java/sca/itest/validation/src/test/java/impl/osgi/MissingComponentTypeFileTestCase.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * 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.
- */
-package impl.osgi;
-
-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.apache.tuscany.sca.osgi.runtime.OSGiRuntime;
-
-import domain.CustomCompositeBuilder;
-
-/**
- * This shows how to test the Calculator service component.
- */
-public class MissingComponentTypeFileTestCase extends TestCase {
-
- private CustomCompositeBuilder customDomain;
-
- @Override
- protected void setUp() throws Exception
- {
- OSGiTestBundles.createBundle("src/main/resources/impl/osgi/MissingComponentTypeFile/OSGiTestService.jar", OSGiTestInterface.class, OSGiTestImpl.class);
-
- customDomain = CustomCompositeBuilder.getInstance();
- try {
- customDomain.loadContribution("src/main/resources/impl/osgi/MissingComponentTypeFile/osgitest.composite",
- "TestContribution", "src/main/resources/impl/osgi/MissingComponentTypeFile/");
- } catch (Exception ex){
- //throw ex;
- }
- }
-
- @Override
- protected void tearDown() throws Exception {
- //nothing to do
- OSGiRuntime.stop();
- }
-
- public void testCalculator() {
- Monitor monitor = customDomain.getMonitorInstance();
- Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
-
- assertNotNull(problem);
- assertEquals("MissingComponentTypeFile", problem.getMessageId());
- }
-}
diff --git a/java/sca/itest/validation/src/test/java/impl/osgi/OSGiTestBundles.java b/java/sca/itest/validation/src/test/java/impl/osgi/OSGiTestBundles.java
deleted file mode 100644
index 398c028dd8..0000000000
--- a/java/sca/itest/validation/src/test/java/impl/osgi/OSGiTestBundles.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- * 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.
- */
-
-package impl.osgi;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.net.URL;
-import java.util.jar.JarOutputStream;
-import java.util.jar.Manifest;
-import java.util.zip.ZipEntry;
-
-
-/**
- *
- * Utility class to create OSGi bundles
- *
- * @version $Rev$ $Date$
- */
-public class OSGiTestBundles {
-
- public static void createBundle(String jarName,
- Class<?> interfaceClass, Class<?> implClass) throws Exception {
-
- ByteArrayOutputStream out = new ByteArrayOutputStream();
-
- String EOL = System.getProperty("line.separator");
-
- String packageName = interfaceClass.getPackage().getName();
- String bundleName = interfaceClass.getName();
-
- String manifestStr = "Manifest-Version: 1.0" + EOL
- + "Bundle-ManifestVersion: 2" + EOL + "Bundle-Name: "
- + bundleName + EOL + "Bundle-SymbolicName: " + bundleName + EOL
- + "Bundle-Version: " + "1.0.0" + EOL
- + "Bundle-Localization: plugin" + EOL;
-
- StringBuilder manifestBuf = new StringBuilder();
- manifestBuf.append(manifestStr);
- manifestBuf.append("Export-Package: " + packageName + EOL);
- manifestBuf.append("Import-Package: org.osgi.framework" + EOL);
- manifestBuf.append("Bundle-Activator: " + implClass.getName() + EOL);
-
- ByteArrayInputStream manifestStream = new ByteArrayInputStream(manifestBuf.toString().getBytes());
- Manifest manifest = new Manifest();
- manifest.read(manifestStream);
-
-
- JarOutputStream jarOut = new JarOutputStream(out, manifest);
-
- String interfaceClassName = interfaceClass.getName().replaceAll("\\.",
- "/")
- + ".class";
-
- URL url = interfaceClass.getClassLoader().getResource(
- interfaceClassName);
- String path = url.getPath();
-
- ZipEntry ze = new ZipEntry(interfaceClassName);
-
- jarOut.putNextEntry(ze);
- FileInputStream file = new FileInputStream(path);
- byte[] fileContents = new byte[file.available()];
- file.read(fileContents);
- jarOut.write(fileContents);
-
- String implClassName = implClass.getName().replaceAll("\\.",
- "/")
- + ".class";
-
- url = implClass.getClassLoader().getResource(implClassName);
- path = url.getPath();
-
- ze = new ZipEntry(implClassName);
-
- jarOut.putNextEntry(ze);
- file = new FileInputStream(path);
- fileContents = new byte[file.available()];
- file.read(fileContents);
- jarOut.write(fileContents);
-
- file.close();
-
- jarOut.close();
- out.close();
-
- FileOutputStream fileOut = new FileOutputStream(jarName);
- fileOut.write(out.toByteArray());
- fileOut.close();
-
-
- }
-}
diff --git a/java/sca/itest/validation/src/test/java/impl/osgi/PropertyShouldSpecifySRTestCase.java b/java/sca/itest/validation/src/test/java/impl/osgi/PropertyShouldSpecifySRTestCase.java
deleted file mode 100644
index 117a94337a..0000000000
--- a/java/sca/itest/validation/src/test/java/impl/osgi/PropertyShouldSpecifySRTestCase.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * 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.
- */
-package impl.osgi;
-
-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.apache.tuscany.sca.osgi.runtime.OSGiRuntime;
-
-import domain.CustomCompositeBuilder;
-
-/**
- * This shows how to test the Calculator service component.
- */
-public class PropertyShouldSpecifySRTestCase extends TestCase {
-
- private CustomCompositeBuilder customDomain;
-
- @Override
- protected void setUp() throws Exception
- {
- OSGiTestBundles.createBundle("src/main/resources/impl/osgi/PropertyShouldSpecifySR/OSGiTestService.jar", OSGiTestInterface.class, OSGiTestImpl.class);
-
- customDomain = CustomCompositeBuilder.getInstance();
- try {
- customDomain.loadContribution("src/main/resources/impl/osgi/PropertyShouldSpecifySR/osgitest.composite",
- "TestContribution", "src/main/resources/impl/osgi/PropertyShouldSpecifySR/");
- } catch (Exception ex){
- //throw ex;
- }
- }
-
- @Override
- protected void tearDown() throws Exception {
- //nothing to do
- OSGiRuntime.stop();
- }
-
- public void testCalculator() {
- Monitor monitor = customDomain.getMonitorInstance();
- Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
-
- assertNotNull(problem);
- assertEquals("PropertyShouldSpecifySR", problem.getMessageId());
- }
-}
diff --git a/java/sca/itest/validation/src/test/java/impl/resource/CouldNotResolveLocationTestCase.java b/java/sca/itest/validation/src/test/java/impl/resource/CouldNotResolveLocationTestCase.java
index 14ba8e992e..c2fd7b3410 100644
--- a/java/sca/itest/validation/src/test/java/impl/resource/CouldNotResolveLocationTestCase.java
+++ b/java/sca/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/java/sca/itest/validation/src/test/java/impl/resource/LocationAttributeMissingTestCase.java b/java/sca/itest/validation/src/test/java/impl/resource/LocationAttributeMissingTestCase.java
index 461895f824..c6a58d2b88 100644
--- a/java/sca/itest/validation/src/test/java/impl/resource/LocationAttributeMissingTestCase.java
+++ b/java/sca/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/java/sca/itest/validation/src/test/java/impl/spring/ContributionResolveExceptionTestCase.java b/java/sca/itest/validation/src/test/java/impl/spring/ContributionResolveExceptionTestCase.java
index 9b7dbef3dd..ff0b2f3589 100644
--- a/java/sca/itest/validation/src/test/java/impl/spring/ContributionResolveExceptionTestCase.java
+++ b/java/sca/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/java/sca/itest/validation/src/test/java/impl/spring/LocationAttributeMissingTestCase.java b/java/sca/itest/validation/src/test/java/impl/spring/LocationAttributeMissingTestCase.java
index cd38b53f66..7b445960f1 100644
--- a/java/sca/itest/validation/src/test/java/impl/spring/LocationAttributeMissingTestCase.java
+++ b/java/sca/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/java/sca/itest/validation/src/test/java/impl/spring/UnableToResolveComponentTypeTestCase.java b/java/sca/itest/validation/src/test/java/impl/spring/UnableToResolveComponentTypeTestCase.java
index 83550ae58d..6b4521cdc9 100644
--- a/java/sca/itest/validation/src/test/java/impl/spring/UnableToResolveComponentTypeTestCase.java
+++ b/java/sca/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/java/sca/itest/validation/src/test/java/impl/widget/CouldNotResolveLocationTestCase.java b/java/sca/itest/validation/src/test/java/impl/widget/CouldNotResolveLocationTestCase.java
index d098bb4bf8..f46e9e4035 100644
--- a/java/sca/itest/validation/src/test/java/impl/widget/CouldNotResolveLocationTestCase.java
+++ b/java/sca/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/java/sca/itest/validation/src/test/java/impl/widget/LocationAttributeMissingTestCase.java b/java/sca/itest/validation/src/test/java/impl/widget/LocationAttributeMissingTestCase.java
index 2f85d8ed4a..ed95bcdcf0 100644
--- a/java/sca/itest/validation/src/test/java/impl/widget/LocationAttributeMissingTestCase.java
+++ b/java/sca/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/java/sca/itest/validation/src/test/java/impl/xquery/CouldNotLocateFileTestCase.java b/java/sca/itest/validation/src/test/java/impl/xquery/CouldNotLocateFileTestCase.java
index f90fc3b83f..bd5a6d9601 100644
--- a/java/sca/itest/validation/src/test/java/impl/xquery/CouldNotLocateFileTestCase.java
+++ b/java/sca/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/java/sca/itest/validation/src/test/java/impl/xquery/LocationAttributeMissingTestCase.java b/java/sca/itest/validation/src/test/java/impl/xquery/LocationAttributeMissingTestCase.java
index 01450a8836..390eeb7e95 100644
--- a/java/sca/itest/validation/src/test/java/impl/xquery/LocationAttributeMissingTestCase.java
+++ b/java/sca/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/java/sca/itest/validation/src/test/java/interfacejava/xml/ClassNotFoundTestCase.java b/java/sca/itest/validation/src/test/java/interfacejava/xml/ClassNotFoundTestCase.java
index a03e056298..e2bee4d2ac 100644
--- a/java/sca/itest/validation/src/test/java/interfacejava/xml/ClassNotFoundTestCase.java
+++ b/java/sca/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/java/sca/itest/validation/src/test/java/interfacejava/xml/ContributionResolveExceptionTestCase.java b/java/sca/itest/validation/src/test/java/interfacejava/xml/ContributionResolveExceptionTestCase.java
index e0524f57b7..3b567da717 100644
--- a/java/sca/itest/validation/src/test/java/interfacejava/xml/ContributionResolveExceptionTestCase.java
+++ b/java/sca/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/java/sca/itest/validation/src/test/java/interfacewsdl/xml/InvalidWSDLInterfaceAttrTestCase.java b/java/sca/itest/validation/src/test/java/interfacewsdl/xml/InvalidWSDLInterfaceAttrTestCase.java
index e212477c61..fc03bc25eb 100644
--- a/java/sca/itest/validation/src/test/java/interfacewsdl/xml/InvalidWSDLInterfaceAttrTestCase.java
+++ b/java/sca/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/java/sca/itest/validation/src/test/java/interfacewsdl/xml/WsdlInterfaceDoesNotMatchTestCase.java b/java/sca/itest/validation/src/test/java/interfacewsdl/xml/WsdlInterfaceDoesNotMatchTestCase.java
index df2a2671df..d41d72585f 100644
--- a/java/sca/itest/validation/src/test/java/interfacewsdl/xml/WsdlInterfaceDoesNotMatchTestCase.java
+++ b/java/sca/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/java/sca/itest/validation/src/test/java/policy/xml/AlwaysProvidedIntentNotFoundTestCase.java b/java/sca/itest/validation/src/test/java/policy/xml/AlwaysProvidedIntentNotFoundTestCase.java
index 361e2f2bfb..2d4bb3d499 100644
--- a/java/sca/itest/validation/src/test/java/policy/xml/AlwaysProvidedIntentNotFoundTestCase.java
+++ b/java/sca/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/java/sca/itest/validation/src/test/java/policy/xml/ErrorInPolicyIntentDefinitionTestCase.java b/java/sca/itest/validation/src/test/java/policy/xml/ErrorInPolicyIntentDefinitionTestCase.java
index a85dc334f4..5b5bfe7b37 100644
--- a/java/sca/itest/validation/src/test/java/policy/xml/ErrorInPolicyIntentDefinitionTestCase.java
+++ b/java/sca/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/java/sca/itest/validation/src/test/java/policy/xml/IntentNotSpecifiedTestCase.java b/java/sca/itest/validation/src/test/java/policy/xml/IntentNotSpecifiedTestCase.java
index 3f98757ce5..8ef3cacc4e 100644
--- a/java/sca/itest/validation/src/test/java/policy/xml/IntentNotSpecifiedTestCase.java
+++ b/java/sca/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/java/sca/itest/validation/src/test/java/policy/xml/MayProvideIntentNotFoundTestCase.java b/java/sca/itest/validation/src/test/java/policy/xml/MayProvideIntentNotFoundTestCase.java
index 3b8d075165..38d59196dd 100644
--- a/java/sca/itest/validation/src/test/java/policy/xml/MayProvideIntentNotFoundTestCase.java
+++ b/java/sca/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/java/sca/itest/validation/src/test/java/policy/xml/RequiredAttributeMissingTestCase.java b/java/sca/itest/validation/src/test/java/policy/xml/RequiredAttributeMissingTestCase.java
index bcf1f82392..9671f9c983 100644
--- a/java/sca/itest/validation/src/test/java/policy/xml/RequiredAttributeMissingTestCase.java
+++ b/java/sca/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/java/sca/itest/validation/src/test/java/policy/xml/UnableToMapPoliciesTestCase.java b/java/sca/itest/validation/src/test/java/policy/xml/UnableToMapPoliciesTestCase.java
index 5683d54e64..c2ede5cd41 100644
--- a/java/sca/itest/validation/src/test/java/policy/xml/UnableToMapPoliciesTestCase.java
+++ b/java/sca/itest/validation/src/test/java/policy/xml/UnableToMapPoliciesTestCase.java
@@ -20,8 +20,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.junit.Ignore;
import org.junit.Ignore;
import domain.CustomCompositeBuilder;
@@ -56,9 +55,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/java/sca/itest/validation/src/test/java/policy/xml/UnrecognizedIntentAttachPointTypeTestCase.java b/java/sca/itest/validation/src/test/java/policy/xml/UnrecognizedIntentAttachPointTypeTestCase.java
index eec39d711e..08c27ee011 100644
--- a/java/sca/itest/validation/src/test/java/policy/xml/UnrecognizedIntentAttachPointTypeTestCase.java
+++ b/java/sca/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());