summaryrefslogtreecommitdiffstats
path: root/sandbox/axis2-1.4/itest/validation/src/test/java/interfacewsdl/xml
diff options
context:
space:
mode:
Diffstat (limited to 'sandbox/axis2-1.4/itest/validation/src/test/java/interfacewsdl/xml')
-rw-r--r--sandbox/axis2-1.4/itest/validation/src/test/java/interfacewsdl/xml/InvalidWSDLInterfaceAttrTestCase.java58
-rw-r--r--sandbox/axis2-1.4/itest/validation/src/test/java/interfacewsdl/xml/WsdlInterfaceDoesNotMatchTestCase.java58
2 files changed, 116 insertions, 0 deletions
diff --git a/sandbox/axis2-1.4/itest/validation/src/test/java/interfacewsdl/xml/InvalidWSDLInterfaceAttrTestCase.java b/sandbox/axis2-1.4/itest/validation/src/test/java/interfacewsdl/xml/InvalidWSDLInterfaceAttrTestCase.java
new file mode 100644
index 0000000000..ce6178c022
--- /dev/null
+++ b/sandbox/axis2-1.4/itest/validation/src/test/java/interfacewsdl/xml/InvalidWSDLInterfaceAttrTestCase.java
@@ -0,0 +1,58 @@
+/*
+ * 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 interfacewsdl.xml;
+
+import junit.framework.TestCase;
+import org.apache.tuscany.sca.monitor.Monitor;
+import org.apache.tuscany.sca.monitor.Problem;
+import org.apache.tuscany.sca.monitor.impl.DefaultLoggingMonitorImpl;
+import domain.CustomCompositeBuilder;
+
+/**
+ * This shows how to test the Calculator service component.
+ */
+public class InvalidWSDLInterfaceAttrTestCase extends TestCase {
+
+ private CustomCompositeBuilder customDomain;
+
+ @Override
+ protected void setUp() throws Exception
+ {
+ customDomain = CustomCompositeBuilder.getInstance();
+ try {
+ customDomain.loadContribution("src/main/resources/interfacewsdl/xml/InvalidWSDLInterfaceAttr/Calculator.composite",
+ "TestContribution", "src/main/resources/interfacewsdl/xml/InvalidWSDLInterfaceAttr/");
+ } catch (Exception ex){
+ //throw ex;
+ }
+ }
+
+ @Override
+ protected void tearDown() throws Exception {
+ //node.stop();
+ }
+
+ public void testCalculator() {
+ Monitor monitor = customDomain.getMonitorInstance();
+ Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
+
+ assertNotNull(problem);
+ assertEquals("InvalidWSDLInterfaceAttr", problem.getMessageId());
+ }
+}
diff --git a/sandbox/axis2-1.4/itest/validation/src/test/java/interfacewsdl/xml/WsdlInterfaceDoesNotMatchTestCase.java b/sandbox/axis2-1.4/itest/validation/src/test/java/interfacewsdl/xml/WsdlInterfaceDoesNotMatchTestCase.java
new file mode 100644
index 0000000000..32f2e9751b
--- /dev/null
+++ b/sandbox/axis2-1.4/itest/validation/src/test/java/interfacewsdl/xml/WsdlInterfaceDoesNotMatchTestCase.java
@@ -0,0 +1,58 @@
+/*
+ * 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 interfacewsdl.xml;
+
+import junit.framework.TestCase;
+import org.apache.tuscany.sca.monitor.Monitor;
+import org.apache.tuscany.sca.monitor.Problem;
+import org.apache.tuscany.sca.monitor.impl.DefaultLoggingMonitorImpl;
+import domain.CustomCompositeBuilder;
+
+/**
+ * This shows how to test the Calculator service component.
+ */
+public class WsdlInterfaceDoesNotMatchTestCase extends TestCase {
+
+ private CustomCompositeBuilder customDomain;
+
+ @Override
+ protected void setUp() throws Exception
+ {
+ customDomain = CustomCompositeBuilder.getInstance();
+ try {
+ customDomain.loadContribution("src/main/resources/interfacewsdl/xml/WsdlInterfaceDoesNotMatch/helloworldwsjms.composite",
+ "TestContribution", "src/main/resources/interfacewsdl/xml/WsdlInterfaceDoesNotMatch/");
+ } catch (Exception ex){
+ //throw ex;
+ }
+ }
+
+ @Override
+ protected void tearDown() throws Exception {
+ //node.stop();
+ }
+
+ public void testCalculator() {
+ Monitor monitor = customDomain.getMonitorInstance();
+ Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem();
+
+ assertNotNull(problem);
+ assertEquals("WsdlInterfaceDoesNotMatch", problem.getMessageId());
+ }
+}