From a40e527938d76ba71f211da7e327adb50384ba69 Mon Sep 17 00:00:00 2001 From: lresende Date: Wed, 11 Nov 2009 23:26:33 +0000 Subject: Moving 1.x tags git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@835157 13f79535-47bb-0310-9956-ffa450edef68 --- .../wsxml/InvalidWsdlElementAttrTestCase.java | 61 +++++++++++++++++++++ .../binding/wsxml/MissingImportedXSDTestCase.java | 64 ++++++++++++++++++++++ .../binding/wsxml/MustUseWsdlBindingTestCase.java | 61 +++++++++++++++++++++ .../wsxml/WsdlBindingDoesNotMatchTestCase.java | 61 +++++++++++++++++++++ .../wsxml/WsdlPortTypeDoesNotMatchTestCase.java | 60 ++++++++++++++++++++ .../wsxml/WsdlServiceDoesNotMatchTestCase.java | 61 +++++++++++++++++++++ 6 files changed, 368 insertions(+) create mode 100644 sca-java-1.x/tags/1.5.1/itest/validation/src/test/java/binding/wsxml/InvalidWsdlElementAttrTestCase.java create mode 100644 sca-java-1.x/tags/1.5.1/itest/validation/src/test/java/binding/wsxml/MissingImportedXSDTestCase.java create mode 100644 sca-java-1.x/tags/1.5.1/itest/validation/src/test/java/binding/wsxml/MustUseWsdlBindingTestCase.java create mode 100644 sca-java-1.x/tags/1.5.1/itest/validation/src/test/java/binding/wsxml/WsdlBindingDoesNotMatchTestCase.java create mode 100644 sca-java-1.x/tags/1.5.1/itest/validation/src/test/java/binding/wsxml/WsdlPortTypeDoesNotMatchTestCase.java create mode 100644 sca-java-1.x/tags/1.5.1/itest/validation/src/test/java/binding/wsxml/WsdlServiceDoesNotMatchTestCase.java (limited to 'sca-java-1.x/tags/1.5.1/itest/validation/src/test/java/binding/wsxml') diff --git a/sca-java-1.x/tags/1.5.1/itest/validation/src/test/java/binding/wsxml/InvalidWsdlElementAttrTestCase.java b/sca-java-1.x/tags/1.5.1/itest/validation/src/test/java/binding/wsxml/InvalidWsdlElementAttrTestCase.java new file mode 100644 index 0000000000..00e6873361 --- /dev/null +++ b/sca-java-1.x/tags/1.5.1/itest/validation/src/test/java/binding/wsxml/InvalidWsdlElementAttrTestCase.java @@ -0,0 +1,61 @@ +/* + * 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 binding.wsxml; + +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.DefaultMonitorImpl; + +import domain.CustomCompositeBuilder; + +/** + * This shows how to test the Calculator service component. + */ +public class InvalidWsdlElementAttrTestCase extends TestCase { + + private CustomCompositeBuilder customDomain; + + @Override + protected void setUp() throws Exception + { + customDomain = CustomCompositeBuilder.getInstance(); + try { + customDomain.loadContribution("src/main/resources/binding/wsxml/InvalidWsdlElementAttr/Calculator.composite", + "TestContribution", "src/main/resources/binding/wsxml/InvalidWsdlElementAttr/"); + } catch (Exception ex){ + //throw ex; + } + } + + @Override + protected void tearDown() throws Exception { + //node.stop(); + } + + public void testCalculator() { + Monitor monitor = customDomain.getMonitorInstance(); + Problem problem = ((DefaultMonitorImpl)monitor).getLastLoggedProblem(); + + assertNotNull(problem); + assertEquals("InvalidWsdlElementAttr", problem.getMessageId()); + + } +} diff --git a/sca-java-1.x/tags/1.5.1/itest/validation/src/test/java/binding/wsxml/MissingImportedXSDTestCase.java b/sca-java-1.x/tags/1.5.1/itest/validation/src/test/java/binding/wsxml/MissingImportedXSDTestCase.java new file mode 100644 index 0000000000..0ceae597fb --- /dev/null +++ b/sca-java-1.x/tags/1.5.1/itest/validation/src/test/java/binding/wsxml/MissingImportedXSDTestCase.java @@ -0,0 +1,64 @@ +/* + * 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 binding.wsxml; + +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.DefaultMonitorImpl; + +import domain.CustomCompositeBuilder; + +/** + * This shows how to test the Calculator service component. + */ +public class MissingImportedXSDTestCase extends TestCase { + + private CustomCompositeBuilder customDomain; + + @Override + protected void setUp() throws Exception + { + customDomain = CustomCompositeBuilder.getInstance(); + try { + customDomain.loadContribution("src/main/resources/binding/wsxml/MissingImportedXSD/helloworldwsjms.composite", + "TestContribution", "src/main/resources/binding/wsxml/MissingImportedXSD/"); + } catch (Exception ex) { + //throw ex; + } + } + + @Override + protected void tearDown() throws Exception { + //node.stop(); + } + + public void testCalculator() { + Monitor monitor = customDomain.getMonitorInstance(); + + Problem problem = ((DefaultMonitorImpl)monitor).getProblems().get(0); + assertNotNull(problem); + assertEquals("ContributionResolveException", problem.getMessageId()); + + problem = ((DefaultMonitorImpl)monitor).getLastLoggedProblem(); + assertNotNull(problem); + assertEquals("InvalidInterfaceException", problem.getMessageId()); + } +} diff --git a/sca-java-1.x/tags/1.5.1/itest/validation/src/test/java/binding/wsxml/MustUseWsdlBindingTestCase.java b/sca-java-1.x/tags/1.5.1/itest/validation/src/test/java/binding/wsxml/MustUseWsdlBindingTestCase.java new file mode 100644 index 0000000000..6b2bf20329 --- /dev/null +++ b/sca-java-1.x/tags/1.5.1/itest/validation/src/test/java/binding/wsxml/MustUseWsdlBindingTestCase.java @@ -0,0 +1,61 @@ +/* + * 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 binding.wsxml; + +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.DefaultMonitorImpl; + +import domain.CustomCompositeBuilder; + +/** + * This shows how to test the Calculator service component. + */ +public class MustUseWsdlBindingTestCase extends TestCase { + + private CustomCompositeBuilder customDomain; + + @Override + protected void setUp() throws Exception + { + customDomain = CustomCompositeBuilder.getInstance(); + try { + customDomain.loadContribution("src/main/resources/binding/wsxml/MustUseWsdlBinding/Calculator.composite", + "TestContribution", "src/main/resources/binding/wsxml/MustUseWsdlBinding/"); + } catch (Exception ex){ + //throw ex; + } + } + + @Override + protected void tearDown() throws Exception { + //node.stop(); + } + + public void testCalculator() { + Monitor monitor = customDomain.getMonitorInstance(); + Problem problem = ((DefaultMonitorImpl)monitor).getLastLoggedProblem(); + + assertNotNull(problem); + assertEquals("MustUseWsdlBinding", problem.getMessageId()); + + } +} diff --git a/sca-java-1.x/tags/1.5.1/itest/validation/src/test/java/binding/wsxml/WsdlBindingDoesNotMatchTestCase.java b/sca-java-1.x/tags/1.5.1/itest/validation/src/test/java/binding/wsxml/WsdlBindingDoesNotMatchTestCase.java new file mode 100644 index 0000000000..8c21abb896 --- /dev/null +++ b/sca-java-1.x/tags/1.5.1/itest/validation/src/test/java/binding/wsxml/WsdlBindingDoesNotMatchTestCase.java @@ -0,0 +1,61 @@ +/* + * 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 binding.wsxml; + +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.DefaultMonitorImpl; + +import domain.CustomCompositeBuilder; + +/** + * This shows how to test the Calculator service component. + */ +public class WsdlBindingDoesNotMatchTestCase extends TestCase { + + private CustomCompositeBuilder customDomain; + + @Override + protected void setUp() throws Exception + { + customDomain = CustomCompositeBuilder.getInstance(); + try { + customDomain.loadContribution("src/main/resources/binding/wsxml/WsdlBindingDoesNotMatch/helloworldwsjms.composite", + "TestContribution", "src/main/resources/binding/wsxml/WsdlBindingDoesNotMatch/"); + } catch (Exception ex){ + //throw ex; + } + } + + @Override + protected void tearDown() throws Exception { + //node.stop(); + } + + public void testCalculator() { + Monitor monitor = customDomain.getMonitorInstance(); + Problem problem = ((DefaultMonitorImpl)monitor).getLastLoggedProblem(); + + assertNotNull(problem); + assertEquals("WsdlBindingDoesNotMatch", problem.getMessageId()); + + } +} diff --git a/sca-java-1.x/tags/1.5.1/itest/validation/src/test/java/binding/wsxml/WsdlPortTypeDoesNotMatchTestCase.java b/sca-java-1.x/tags/1.5.1/itest/validation/src/test/java/binding/wsxml/WsdlPortTypeDoesNotMatchTestCase.java new file mode 100644 index 0000000000..83b4722b60 --- /dev/null +++ b/sca-java-1.x/tags/1.5.1/itest/validation/src/test/java/binding/wsxml/WsdlPortTypeDoesNotMatchTestCase.java @@ -0,0 +1,60 @@ +/* + * 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 binding.wsxml; + +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.DefaultMonitorImpl; + +import domain.CustomCompositeBuilder; + +/** + * This shows how to test the Calculator service component. + */ +public class WsdlPortTypeDoesNotMatchTestCase extends TestCase { + + private CustomCompositeBuilder customDomain; + + @Override + protected void setUp() throws Exception + { + customDomain = CustomCompositeBuilder.getInstance(); + try { + customDomain.loadContribution("src/main/resources/binding/wsxml/WsdlPortTypeDoesNotMatch/helloworldwsclient.composite", + "TestContribution", "src/main/resources/binding/wsxml/WsdlPortTypeDoesNotMatch/"); + } catch (Exception ex){ + //throw ex; + } + } + + @Override + protected void tearDown() throws Exception { + //node.stop(); + } + + public void testCalculator() { + Monitor monitor = customDomain.getMonitorInstance(); + Problem problem = ((DefaultMonitorImpl)monitor).getLastLoggedProblem(); + + assertNotNull(problem); + assertEquals("WsdlPortTypeDoesNotMatch", problem.getMessageId()); + } +} diff --git a/sca-java-1.x/tags/1.5.1/itest/validation/src/test/java/binding/wsxml/WsdlServiceDoesNotMatchTestCase.java b/sca-java-1.x/tags/1.5.1/itest/validation/src/test/java/binding/wsxml/WsdlServiceDoesNotMatchTestCase.java new file mode 100644 index 0000000000..8f7786f08a --- /dev/null +++ b/sca-java-1.x/tags/1.5.1/itest/validation/src/test/java/binding/wsxml/WsdlServiceDoesNotMatchTestCase.java @@ -0,0 +1,61 @@ +/* + * 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 binding.wsxml; + +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.DefaultMonitorImpl; + +import domain.CustomCompositeBuilder; + +/** + * This shows how to test the Calculator service component. + */ +public class WsdlServiceDoesNotMatchTestCase extends TestCase { + + private CustomCompositeBuilder customDomain; + + @Override + protected void setUp() throws Exception + { + customDomain = CustomCompositeBuilder.getInstance(); + try { + customDomain.loadContribution("src/main/resources/binding/wsxml/WsdlServiceDoesNotMatch/helloworldwsjms.composite", + "TestContribution", "src/main/resources/binding/wsxml/WsdlServiceDoesNotMatch/"); + } catch (Exception ex){ + //throw ex; + } + } + + @Override + protected void tearDown() throws Exception { + //node.stop(); + } + + public void testCalculator() { + Monitor monitor = customDomain.getMonitorInstance(); + Problem problem = ((DefaultMonitorImpl)monitor).getLastLoggedProblem(); + + assertNotNull(problem); + assertEquals("WsdlServiceDoesNotMatch", problem.getMessageId()); + + } +} -- cgit v1.2.3