From 6c7ad7c110656f47273dc23228b41e46023492f3 Mon Sep 17 00:00:00 2001 From: antelder Date: Sat, 18 Apr 2009 07:36:53 +0000 Subject: Create 1.5 branch git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@766260 13f79535-47bb-0310-9956-ffa450edef68 --- .../binding/ejb/UnknownEJBSessionTypeTestCase.java | 67 ++++++++++++++++++++++ .../binding/ejb/UnknownEJBVersionTestCase.java | 66 +++++++++++++++++++++ .../jms/DoesntProcessDestinationTypeTestCase.java | 60 +++++++++++++++++++ .../binding/jms/DoesntProcessHeadersTestCase.java | 62 ++++++++++++++++++++ ...esntProcessResponseDestinationTypeTestCase.java | 60 +++++++++++++++++++ .../jms/InvalidCorrelationSchemeTestCase.java | 60 +++++++++++++++++++ .../jms/InvalidJMSDeliveryModeTestCase.java | 60 +++++++++++++++++++ .../binding/jms/InvalidJMSPriorityTestCase.java | 60 +++++++++++++++++++ .../InvalidResponseDestinationTypeTestCase.java | 60 +++++++++++++++++++ .../jms/MissingActivationSpecNameTestCase.java | 60 +++++++++++++++++++ .../jms/MissingConnectionFactoryNameTestCase.java | 60 +++++++++++++++++++ .../jms/MissingResponseActivationSpecTestCase.java | 60 +++++++++++++++++++ .../MissingResponseConnectionFactoryTestCase.java | 60 +++++++++++++++++++ .../binding/jms/MustStartWithSchemaTestCase.java | 60 +++++++++++++++++++ .../binding/jms/UnexpectedElementTestCase.java | 60 +++++++++++++++++++ .../binding/jms/UnknownTokenInURITestCase.java | 60 +++++++++++++++++++ .../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 ++++++++++++++++++++ 22 files changed, 1343 insertions(+) create mode 100644 branches/sca-java-1.5/itest/validation/src/test/java/binding/ejb/UnknownEJBSessionTypeTestCase.java create mode 100644 branches/sca-java-1.5/itest/validation/src/test/java/binding/ejb/UnknownEJBVersionTestCase.java create mode 100644 branches/sca-java-1.5/itest/validation/src/test/java/binding/jms/DoesntProcessDestinationTypeTestCase.java create mode 100644 branches/sca-java-1.5/itest/validation/src/test/java/binding/jms/DoesntProcessHeadersTestCase.java create mode 100644 branches/sca-java-1.5/itest/validation/src/test/java/binding/jms/DoesntProcessResponseDestinationTypeTestCase.java create mode 100644 branches/sca-java-1.5/itest/validation/src/test/java/binding/jms/InvalidCorrelationSchemeTestCase.java create mode 100644 branches/sca-java-1.5/itest/validation/src/test/java/binding/jms/InvalidJMSDeliveryModeTestCase.java create mode 100644 branches/sca-java-1.5/itest/validation/src/test/java/binding/jms/InvalidJMSPriorityTestCase.java create mode 100644 branches/sca-java-1.5/itest/validation/src/test/java/binding/jms/InvalidResponseDestinationTypeTestCase.java create mode 100644 branches/sca-java-1.5/itest/validation/src/test/java/binding/jms/MissingActivationSpecNameTestCase.java create mode 100644 branches/sca-java-1.5/itest/validation/src/test/java/binding/jms/MissingConnectionFactoryNameTestCase.java create mode 100644 branches/sca-java-1.5/itest/validation/src/test/java/binding/jms/MissingResponseActivationSpecTestCase.java create mode 100644 branches/sca-java-1.5/itest/validation/src/test/java/binding/jms/MissingResponseConnectionFactoryTestCase.java create mode 100644 branches/sca-java-1.5/itest/validation/src/test/java/binding/jms/MustStartWithSchemaTestCase.java create mode 100644 branches/sca-java-1.5/itest/validation/src/test/java/binding/jms/UnexpectedElementTestCase.java create mode 100644 branches/sca-java-1.5/itest/validation/src/test/java/binding/jms/UnknownTokenInURITestCase.java create mode 100644 branches/sca-java-1.5/itest/validation/src/test/java/binding/wsxml/InvalidWsdlElementAttrTestCase.java create mode 100644 branches/sca-java-1.5/itest/validation/src/test/java/binding/wsxml/MissingImportedXSDTestCase.java create mode 100644 branches/sca-java-1.5/itest/validation/src/test/java/binding/wsxml/MustUseWsdlBindingTestCase.java create mode 100644 branches/sca-java-1.5/itest/validation/src/test/java/binding/wsxml/WsdlBindingDoesNotMatchTestCase.java create mode 100644 branches/sca-java-1.5/itest/validation/src/test/java/binding/wsxml/WsdlPortTypeDoesNotMatchTestCase.java create mode 100644 branches/sca-java-1.5/itest/validation/src/test/java/binding/wsxml/WsdlServiceDoesNotMatchTestCase.java (limited to 'branches/sca-java-1.5/itest/validation/src/test/java/binding') diff --git a/branches/sca-java-1.5/itest/validation/src/test/java/binding/ejb/UnknownEJBSessionTypeTestCase.java b/branches/sca-java-1.5/itest/validation/src/test/java/binding/ejb/UnknownEJBSessionTypeTestCase.java new file mode 100644 index 0000000000..773f347170 --- /dev/null +++ b/branches/sca-java-1.5/itest/validation/src/test/java/binding/ejb/UnknownEJBSessionTypeTestCase.java @@ -0,0 +1,67 @@ +/* + * 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.ejb; + +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 UnknownEJBSessionTypeTestCase extends TestCase { + + private CustomCompositeBuilder customDomain; + + @Override + protected void setUp() throws Exception { + System.setProperty("java.naming.factory.initial", "org.apache.openejb.client.RemoteInitialContextFactory"); + System.setProperty("java.naming.provider.url", "ejbd://localhost:8085"); + System.setProperty("managed", "false"); + + customDomain = CustomCompositeBuilder.getInstance(); + try { + customDomain.loadContribution("src/main/resources/bindingejb/UnknownEJBSessionType/account.composite", + "TestContribution", + "src/main/resources/bindingejb/UnknownEJBSessionType/"); + } catch (Exception ex) { + //throw ex; + } + } + + @Override + protected void tearDown() throws Exception { + System.clearProperty("java.naming.factory.initial"); + System.clearProperty("java.naming.provider.url"); + System.clearProperty("managed"); + //node.stop(); + } + + public void testCalculator() { + Monitor monitor = customDomain.getMonitorInstance(); + Problem problem = ((DefaultMonitorImpl)monitor).getLastLoggedProblem(); + + assertNotNull(problem); + assertEquals("UnknownEJBSessionType", problem.getMessageId()); + } +} diff --git a/branches/sca-java-1.5/itest/validation/src/test/java/binding/ejb/UnknownEJBVersionTestCase.java b/branches/sca-java-1.5/itest/validation/src/test/java/binding/ejb/UnknownEJBVersionTestCase.java new file mode 100644 index 0000000000..9ebfa0637b --- /dev/null +++ b/branches/sca-java-1.5/itest/validation/src/test/java/binding/ejb/UnknownEJBVersionTestCase.java @@ -0,0 +1,66 @@ +/* + * 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.ejb; + +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 UnknownEJBVersionTestCase extends TestCase { + + private CustomCompositeBuilder customDomain; + + @Override + protected void setUp() throws Exception { + System.setProperty("java.naming.factory.initial", "org.apache.openejb.client.RemoteInitialContextFactory"); + System.setProperty("java.naming.provider.url", "ejbd://localhost:8085"); + System.setProperty("managed", "false"); + + customDomain = CustomCompositeBuilder.getInstance(); + try { + customDomain.loadContribution("src/main/resources/bindingejb/UnknownEJBVersion/account.composite", + "TestContribution", "src/main/resources/bindingejb/UnknownEJBVersion/"); + } catch (Exception ex){ + //throw ex; + } + } + + @Override + protected void tearDown() throws Exception { + System.clearProperty("java.naming.factory.initial"); + System.clearProperty("java.naming.provider.url"); + System.clearProperty("managed"); + //node.stop(); + } + + public void testCalculator() { + Monitor monitor = customDomain.getMonitorInstance(); + Problem problem = ((DefaultMonitorImpl)monitor).getLastLoggedProblem(); + + assertNotNull(problem); + assertEquals("UnknownEJBVersion", problem.getMessageId()); + } +} diff --git a/branches/sca-java-1.5/itest/validation/src/test/java/binding/jms/DoesntProcessDestinationTypeTestCase.java b/branches/sca-java-1.5/itest/validation/src/test/java/binding/jms/DoesntProcessDestinationTypeTestCase.java new file mode 100644 index 0000000000..d32bb33d93 --- /dev/null +++ b/branches/sca-java-1.5/itest/validation/src/test/java/binding/jms/DoesntProcessDestinationTypeTestCase.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.jms; + +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 DoesntProcessDestinationTypeTestCase extends TestCase { + + private CustomCompositeBuilder customDomain; + + @Override + protected void setUp() throws Exception + { + customDomain = CustomCompositeBuilder.getInstance(); + try { + customDomain.loadContribution("src/main/resources/bindingjms/DoesntProcessDestinationType/service.composite", + "TestContribution", "src/main/resources/bindingjms/DoesntProcessDestinationType/"); + } 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("DoesntProcessDestinationType", problem.getMessageId()); + } +} diff --git a/branches/sca-java-1.5/itest/validation/src/test/java/binding/jms/DoesntProcessHeadersTestCase.java b/branches/sca-java-1.5/itest/validation/src/test/java/binding/jms/DoesntProcessHeadersTestCase.java new file mode 100644 index 0000000000..2ba2e6cd12 --- /dev/null +++ b/branches/sca-java-1.5/itest/validation/src/test/java/binding/jms/DoesntProcessHeadersTestCase.java @@ -0,0 +1,62 @@ +/* + * 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.jms; + +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 org.junit.Ignore; + +import domain.CustomCompositeBuilder; + +/** + * This shows how to test the Calculator service component. + */ +public class DoesntProcessHeadersTestCase extends TestCase { + + private CustomCompositeBuilder customDomain; + + @Override + protected void setUp() throws Exception + { + customDomain = CustomCompositeBuilder.getInstance(); + try { + customDomain.loadContribution("src/main/resources/bindingjms/DoesntProcessHeaders/service.composite", + "TestContribution", "src/main/resources/bindingjms/DoesntProcessHeaders/"); + } catch (Exception ex){ + //throw ex; + } + } + + @Override + protected void tearDown() throws Exception { + //node.stop(); + } + + @Ignore("TUSCANY-2532") + public void testCalculator() { + Monitor monitor = customDomain.getMonitorInstance(); + Problem problem = ((DefaultMonitorImpl)monitor).getLastLoggedProblem(); + + assertNotNull(problem); +// assertEquals("DoesntProcessHeaders", problem.getMessageId()); + } +} diff --git a/branches/sca-java-1.5/itest/validation/src/test/java/binding/jms/DoesntProcessResponseDestinationTypeTestCase.java b/branches/sca-java-1.5/itest/validation/src/test/java/binding/jms/DoesntProcessResponseDestinationTypeTestCase.java new file mode 100644 index 0000000000..011d9e427d --- /dev/null +++ b/branches/sca-java-1.5/itest/validation/src/test/java/binding/jms/DoesntProcessResponseDestinationTypeTestCase.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.jms; + +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 DoesntProcessResponseDestinationTypeTestCase extends TestCase { + + private CustomCompositeBuilder customDomain; + + @Override + protected void setUp() throws Exception + { + customDomain = CustomCompositeBuilder.getInstance(); + try { + customDomain.loadContribution("src/main/resources/bindingjms/DoesntProcessResponseDestinationType/service.composite", + "TestContribution", "src/main/resources/bindingjms/DoesntProcessResponseDestinationType/"); + } 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("DoesntProcessResponseDestinationType", problem.getMessageId()); + } +} diff --git a/branches/sca-java-1.5/itest/validation/src/test/java/binding/jms/InvalidCorrelationSchemeTestCase.java b/branches/sca-java-1.5/itest/validation/src/test/java/binding/jms/InvalidCorrelationSchemeTestCase.java new file mode 100644 index 0000000000..f0b798c2e4 --- /dev/null +++ b/branches/sca-java-1.5/itest/validation/src/test/java/binding/jms/InvalidCorrelationSchemeTestCase.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.jms; + +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 InvalidCorrelationSchemeTestCase extends TestCase { + + private CustomCompositeBuilder customDomain; + + @Override + protected void setUp() throws Exception + { + customDomain = CustomCompositeBuilder.getInstance(); + try { + customDomain.loadContribution("src/main/resources/bindingjms/InvalidCorrelationScheme/service.composite", + "TestContribution", "src/main/resources/bindingjms/InvalidCorrelationScheme/"); + } 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("InvalidCorrelationScheme", problem.getMessageId()); + } +} diff --git a/branches/sca-java-1.5/itest/validation/src/test/java/binding/jms/InvalidJMSDeliveryModeTestCase.java b/branches/sca-java-1.5/itest/validation/src/test/java/binding/jms/InvalidJMSDeliveryModeTestCase.java new file mode 100644 index 0000000000..a114501098 --- /dev/null +++ b/branches/sca-java-1.5/itest/validation/src/test/java/binding/jms/InvalidJMSDeliveryModeTestCase.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.jms; + +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 InvalidJMSDeliveryModeTestCase extends TestCase { + + private CustomCompositeBuilder customDomain; + + @Override + protected void setUp() throws Exception + { + customDomain = CustomCompositeBuilder.getInstance(); + try { + customDomain.loadContribution("src/main/resources/bindingjms/InvalidJMSDeliveryMode/service.composite", + "TestContribution", "src/main/resources/bindingjms/InvalidJMSDeliveryMode/"); + } 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("InvalidJMSDeliveryMode", problem.getMessageId()); + } +} diff --git a/branches/sca-java-1.5/itest/validation/src/test/java/binding/jms/InvalidJMSPriorityTestCase.java b/branches/sca-java-1.5/itest/validation/src/test/java/binding/jms/InvalidJMSPriorityTestCase.java new file mode 100644 index 0000000000..d31e02054a --- /dev/null +++ b/branches/sca-java-1.5/itest/validation/src/test/java/binding/jms/InvalidJMSPriorityTestCase.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.jms; + +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 InvalidJMSPriorityTestCase extends TestCase { + + private CustomCompositeBuilder customDomain; + + @Override + protected void setUp() throws Exception + { + customDomain = CustomCompositeBuilder.getInstance(); + try { + customDomain.loadContribution("src/main/resources/bindingjms/InvalidJMSPriority/service.composite", + "TestContribution", "src/main/resources/bindingjms/InvalidJMSPriority/"); + } 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("InvalidJMSPriority", problem.getMessageId()); + } +} diff --git a/branches/sca-java-1.5/itest/validation/src/test/java/binding/jms/InvalidResponseDestinationTypeTestCase.java b/branches/sca-java-1.5/itest/validation/src/test/java/binding/jms/InvalidResponseDestinationTypeTestCase.java new file mode 100644 index 0000000000..1727217fe0 --- /dev/null +++ b/branches/sca-java-1.5/itest/validation/src/test/java/binding/jms/InvalidResponseDestinationTypeTestCase.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.jms; + +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 InvalidResponseDestinationTypeTestCase extends TestCase { + + private CustomCompositeBuilder customDomain; + + @Override + protected void setUp() throws Exception + { + customDomain = CustomCompositeBuilder.getInstance(); + try { + customDomain.loadContribution("src/main/resources/bindingjms/InvalidResponseDestinationType/service.composite", + "TestContribution", "src/main/resources/bindingjms/InvalidResponseDestinationType/"); + } 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("InvalidResponseDestinationType", problem.getMessageId()); + } +} diff --git a/branches/sca-java-1.5/itest/validation/src/test/java/binding/jms/MissingActivationSpecNameTestCase.java b/branches/sca-java-1.5/itest/validation/src/test/java/binding/jms/MissingActivationSpecNameTestCase.java new file mode 100644 index 0000000000..33bf2882e5 --- /dev/null +++ b/branches/sca-java-1.5/itest/validation/src/test/java/binding/jms/MissingActivationSpecNameTestCase.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.jms; + +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 MissingActivationSpecNameTestCase extends TestCase { + + private CustomCompositeBuilder customDomain; + + @Override + protected void setUp() throws Exception + { + customDomain = CustomCompositeBuilder.getInstance(); + try { + customDomain.loadContribution("src/main/resources/bindingjms/MissingActivationSpecName/service.composite", + "TestContribution", "src/main/resources/bindingjms/MissingActivationSpecName/"); + } 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(1); + + assertNotNull(problem); + assertEquals("MissingActivationSpecName", problem.getMessageId()); + } +} diff --git a/branches/sca-java-1.5/itest/validation/src/test/java/binding/jms/MissingConnectionFactoryNameTestCase.java b/branches/sca-java-1.5/itest/validation/src/test/java/binding/jms/MissingConnectionFactoryNameTestCase.java new file mode 100644 index 0000000000..fcb4345293 --- /dev/null +++ b/branches/sca-java-1.5/itest/validation/src/test/java/binding/jms/MissingConnectionFactoryNameTestCase.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.jms; + +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 MissingConnectionFactoryNameTestCase extends TestCase { + + private CustomCompositeBuilder customDomain; + + @Override + protected void setUp() throws Exception + { + customDomain = CustomCompositeBuilder.getInstance(); + try { + customDomain.loadContribution("src/main/resources/bindingjms/MissingConnectionFactoryName/service.composite", + "TestContribution", "src/main/resources/bindingjms/MissingConnectionFactoryName/"); + } 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(1); + + assertNotNull(problem); + assertEquals("MissingConnectionFactoryName", problem.getMessageId()); + } +} diff --git a/branches/sca-java-1.5/itest/validation/src/test/java/binding/jms/MissingResponseActivationSpecTestCase.java b/branches/sca-java-1.5/itest/validation/src/test/java/binding/jms/MissingResponseActivationSpecTestCase.java new file mode 100644 index 0000000000..04d1ba1055 --- /dev/null +++ b/branches/sca-java-1.5/itest/validation/src/test/java/binding/jms/MissingResponseActivationSpecTestCase.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.jms; + +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 MissingResponseActivationSpecTestCase extends TestCase { + + private CustomCompositeBuilder customDomain; + + @Override + protected void setUp() throws Exception + { + customDomain = CustomCompositeBuilder.getInstance(); + try { + customDomain.loadContribution("src/main/resources/bindingjms/MissingResponseActivationSpec/service.composite", + "TestContribution", "src/main/resources/bindingjms/MissingResponseActivationSpec/"); + } 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(1); + + assertNotNull(problem); + assertEquals("MissingResponseActivationSpec", problem.getMessageId()); + } +} diff --git a/branches/sca-java-1.5/itest/validation/src/test/java/binding/jms/MissingResponseConnectionFactoryTestCase.java b/branches/sca-java-1.5/itest/validation/src/test/java/binding/jms/MissingResponseConnectionFactoryTestCase.java new file mode 100644 index 0000000000..8725a714e8 --- /dev/null +++ b/branches/sca-java-1.5/itest/validation/src/test/java/binding/jms/MissingResponseConnectionFactoryTestCase.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.jms; + +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 MissingResponseConnectionFactoryTestCase extends TestCase { + + private CustomCompositeBuilder customDomain; + + @Override + protected void setUp() throws Exception + { + customDomain = CustomCompositeBuilder.getInstance(); + try { + customDomain.loadContribution("src/main/resources/bindingjms/MissingResponseConnectionFactory/service.composite", + "TestContribution", "src/main/resources/bindingjms/MissingResponseConnectionFactory/"); + } 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(1); + + assertNotNull(problem); + assertEquals("MissingResponseConnectionFactory", problem.getMessageId()); + } +} diff --git a/branches/sca-java-1.5/itest/validation/src/test/java/binding/jms/MustStartWithSchemaTestCase.java b/branches/sca-java-1.5/itest/validation/src/test/java/binding/jms/MustStartWithSchemaTestCase.java new file mode 100644 index 0000000000..b62cd22d6f --- /dev/null +++ b/branches/sca-java-1.5/itest/validation/src/test/java/binding/jms/MustStartWithSchemaTestCase.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.jms; + +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 MustStartWithSchemaTestCase extends TestCase { + + private CustomCompositeBuilder customDomain; + + @Override + protected void setUp() throws Exception + { + customDomain = CustomCompositeBuilder.getInstance(); + try { + customDomain.loadContribution("src/main/resources/bindingjms/MustStartWithSchema/service.composite", + "TestContribution", "src/main/resources/bindingjms/MustStartWithSchema/"); + } 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("MustStartWithSchema", problem.getMessageId()); + } +} diff --git a/branches/sca-java-1.5/itest/validation/src/test/java/binding/jms/UnexpectedElementTestCase.java b/branches/sca-java-1.5/itest/validation/src/test/java/binding/jms/UnexpectedElementTestCase.java new file mode 100644 index 0000000000..90a82ebe1f --- /dev/null +++ b/branches/sca-java-1.5/itest/validation/src/test/java/binding/jms/UnexpectedElementTestCase.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.jms; + +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 UnexpectedElementTestCase extends TestCase { + + private CustomCompositeBuilder customDomain; + + @Override + protected void setUp() throws Exception + { + customDomain = CustomCompositeBuilder.getInstance(); + try { + customDomain.loadContribution("src/main/resources/bindingjms/UnexpectedElement/service.composite", + "TestContribution", "src/main/resources/bindingjms/UnexpectedElement/"); + } 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("UnexpectedElement", problem.getMessageId()); + } +} diff --git a/branches/sca-java-1.5/itest/validation/src/test/java/binding/jms/UnknownTokenInURITestCase.java b/branches/sca-java-1.5/itest/validation/src/test/java/binding/jms/UnknownTokenInURITestCase.java new file mode 100644 index 0000000000..df86fe1564 --- /dev/null +++ b/branches/sca-java-1.5/itest/validation/src/test/java/binding/jms/UnknownTokenInURITestCase.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.jms; + +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 UnknownTokenInURITestCase extends TestCase { + + private CustomCompositeBuilder customDomain; + + @Override + protected void setUp() throws Exception + { + customDomain = CustomCompositeBuilder.getInstance(); + try { + customDomain.loadContribution("src/main/resources/bindingjms/UnknownTokenInURI/service.composite", + "TestContribution", "src/main/resources/bindingjms/UnknownTokenInURI/"); + } 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("UnknownTokenInURI", problem.getMessageId()); + } +} diff --git a/branches/sca-java-1.5/itest/validation/src/test/java/binding/wsxml/InvalidWsdlElementAttrTestCase.java b/branches/sca-java-1.5/itest/validation/src/test/java/binding/wsxml/InvalidWsdlElementAttrTestCase.java new file mode 100644 index 0000000000..00e6873361 --- /dev/null +++ b/branches/sca-java-1.5/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/branches/sca-java-1.5/itest/validation/src/test/java/binding/wsxml/MissingImportedXSDTestCase.java b/branches/sca-java-1.5/itest/validation/src/test/java/binding/wsxml/MissingImportedXSDTestCase.java new file mode 100644 index 0000000000..0ceae597fb --- /dev/null +++ b/branches/sca-java-1.5/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/branches/sca-java-1.5/itest/validation/src/test/java/binding/wsxml/MustUseWsdlBindingTestCase.java b/branches/sca-java-1.5/itest/validation/src/test/java/binding/wsxml/MustUseWsdlBindingTestCase.java new file mode 100644 index 0000000000..6b2bf20329 --- /dev/null +++ b/branches/sca-java-1.5/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/branches/sca-java-1.5/itest/validation/src/test/java/binding/wsxml/WsdlBindingDoesNotMatchTestCase.java b/branches/sca-java-1.5/itest/validation/src/test/java/binding/wsxml/WsdlBindingDoesNotMatchTestCase.java new file mode 100644 index 0000000000..8c21abb896 --- /dev/null +++ b/branches/sca-java-1.5/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/branches/sca-java-1.5/itest/validation/src/test/java/binding/wsxml/WsdlPortTypeDoesNotMatchTestCase.java b/branches/sca-java-1.5/itest/validation/src/test/java/binding/wsxml/WsdlPortTypeDoesNotMatchTestCase.java new file mode 100644 index 0000000000..83b4722b60 --- /dev/null +++ b/branches/sca-java-1.5/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/branches/sca-java-1.5/itest/validation/src/test/java/binding/wsxml/WsdlServiceDoesNotMatchTestCase.java b/branches/sca-java-1.5/itest/validation/src/test/java/binding/wsxml/WsdlServiceDoesNotMatchTestCase.java new file mode 100644 index 0000000000..8f7786f08a --- /dev/null +++ b/branches/sca-java-1.5/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