diff options
Diffstat (limited to 'sca-java-1.x/branches/sca-java-1.5/itest/validation/src/test/java/impl/bpel')
8 files changed, 484 insertions, 0 deletions
diff --git a/sca-java-1.x/branches/sca-java-1.5/itest/validation/src/test/java/impl/bpel/AttributeUnrecognizedNamespaceTestCase.java b/sca-java-1.x/branches/sca-java-1.5/itest/validation/src/test/java/impl/bpel/AttributeUnrecognizedNamespaceTestCase.java new file mode 100644 index 0000000000..cbc9e199e3 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-1.5/itest/validation/src/test/java/impl/bpel/AttributeUnrecognizedNamespaceTestCase.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 impl.bpel; + +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 AttributeUnrecognizedNamespaceTestCase extends TestCase { + + private CustomCompositeBuilder customDomain; + + @Override + protected void setUp() throws Exception + { + customDomain = CustomCompositeBuilder.getInstance(); + try { + customDomain.loadContribution("src/main/resources/impl/bpel/AttributeUnrecognizedNamespace/helloworld.composite", + "TestContribution", "src/main/resources/impl/bpel/AttributeUnrecognizedNamespace/"); + } catch (Exception ex){ + //throw ex; + } + } + + @Override + protected void tearDown() throws Exception { + //nothing to do + } + + public void testCalculator() { + Monitor monitor = customDomain.getMonitorInstance(); + Problem problem = ((DefaultMonitorImpl)monitor).getLastLoggedProblem(); + + assertNotNull(problem); + System.out.println("AttributeUnrecognizedNamespaceTestCase problem:" + problem.getMessageId()); + assertEquals("AttributeUnrecognizedNamespace", problem.getMessageId()); + } +} diff --git a/sca-java-1.x/branches/sca-java-1.5/itest/validation/src/test/java/impl/bpel/AttributeWithoutNamespaceTestCase.java b/sca-java-1.x/branches/sca-java-1.5/itest/validation/src/test/java/impl/bpel/AttributeWithoutNamespaceTestCase.java new file mode 100644 index 0000000000..eb2eedb340 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-1.5/itest/validation/src/test/java/impl/bpel/AttributeWithoutNamespaceTestCase.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 impl.bpel; + +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 AttributeWithoutNamespaceTestCase extends TestCase { + + private CustomCompositeBuilder customDomain; + + @Override + protected void setUp() throws Exception + { + customDomain = CustomCompositeBuilder.getInstance(); + try { + customDomain.loadContribution("src/main/resources/impl/bpel/AttributeWithoutNamespace/helloworld.composite", + "TestContribution", "src/main/resources/impl/bpel/AttributeWithoutNamespace/"); + } catch (Exception ex){ + //throw ex; + } + } + + @Override + protected void tearDown() throws Exception { + //nothing to do + } + + public void testCalculator() { + Monitor monitor = customDomain.getMonitorInstance(); + Problem problem = ((DefaultMonitorImpl)monitor).getLastLoggedProblem(); + + assertNotNull(problem); + assertEquals("AttributeWithoutNamespace", problem.getMessageId()); + } +} diff --git a/sca-java-1.x/branches/sca-java-1.5/itest/validation/src/test/java/impl/bpel/BPELProcessNotFoundTestCase.java b/sca-java-1.x/branches/sca-java-1.5/itest/validation/src/test/java/impl/bpel/BPELProcessNotFoundTestCase.java new file mode 100644 index 0000000000..e93918a94c --- /dev/null +++ b/sca-java-1.x/branches/sca-java-1.5/itest/validation/src/test/java/impl/bpel/BPELProcessNotFoundTestCase.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 impl.bpel; + +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 BPELProcessNotFoundTestCase extends TestCase { + + private CustomCompositeBuilder customDomain; + + @Override + protected void setUp() throws Exception + { + customDomain = CustomCompositeBuilder.getInstance(); + try { + customDomain.loadContribution("src/main/resources/impl/bpel/BPELProcessNotFound/helloworld.composite", + "TestContribution", "src/main/resources/impl/bpel/BPELProcessNotFound/"); + } catch (Exception ex){ + //throw ex; + } + } + + @Override + protected void tearDown() throws Exception { + //nothing to do + } + + public void testCalculator() { + Monitor monitor = customDomain.getMonitorInstance(); + Problem problem = ((DefaultMonitorImpl)monitor).getLastLoggedProblem(); + + assertNotNull(problem); + assertEquals("BPELProcessNotFound", problem.getMessageId()); + } +} diff --git a/sca-java-1.x/branches/sca-java-1.5/itest/validation/src/test/java/impl/bpel/CannotResolveWSDLReferenceTestCase.java b/sca-java-1.x/branches/sca-java-1.5/itest/validation/src/test/java/impl/bpel/CannotResolveWSDLReferenceTestCase.java new file mode 100644 index 0000000000..d711758a21 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-1.5/itest/validation/src/test/java/impl/bpel/CannotResolveWSDLReferenceTestCase.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 impl.bpel; + +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 CannotResolveWSDLReferenceTestCase extends TestCase { + + private CustomCompositeBuilder customDomain; + + @Override + protected void setUp() throws Exception + { + customDomain = CustomCompositeBuilder.getInstance(); + try { + customDomain.loadContribution("src/main/resources/impl/bpel/CannotResolveWSDLReference/helloworld.composite", + "TestContribution", "src/main/resources/impl/bpel/CannotResolveWSDLReference/"); + } catch (Exception ex){ + //throw ex; + } + } + + @Override + protected void tearDown() throws Exception { + //nothing to do + } + + public void testCalculator() { +// TUSCANY-2970:tests don't work in continuum build + +// Monitor monitor = customDomain.getMonitorInstance(); +// Problem problem = ((DefaultMonitorImpl)monitor).getLastLoggedProblem(); + +// assertNotNull(problem); +// assertEquals("CannotResolveWSDLReference", problem.getMessageId()); + } +} diff --git a/sca-java-1.x/branches/sca-java-1.5/itest/validation/src/test/java/impl/bpel/MyRolePartnerRoleNullTestCase.java b/sca-java-1.x/branches/sca-java-1.5/itest/validation/src/test/java/impl/bpel/MyRolePartnerRoleNullTestCase.java new file mode 100644 index 0000000000..b6c3b6c7c9 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-1.5/itest/validation/src/test/java/impl/bpel/MyRolePartnerRoleNullTestCase.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 impl.bpel; + +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 MyRolePartnerRoleNullTestCase extends TestCase { + + private CustomCompositeBuilder customDomain; + + @Override + protected void setUp() throws Exception + { + customDomain = CustomCompositeBuilder.getInstance(); + try { + customDomain.loadContribution("src/main/resources/impl/bpel/MyRolePartnerRoleNull/helloworld.composite", + "TestContribution", "src/main/resources/impl/bpel/MyRolePartnerRoleNull/"); + } catch (Exception ex){ + //throw ex; + } + } + + @Override + protected void tearDown() throws Exception { + //nothing to do + } + + public void testCalculator() { + Monitor monitor = customDomain.getMonitorInstance(); + Problem problem = ((DefaultMonitorImpl)monitor).getLastLoggedProblem(); + + assertNotNull(problem); + assertEquals("MyRolePartnerRoleNull", problem.getMessageId()); + } +} diff --git a/sca-java-1.x/branches/sca-java-1.5/itest/validation/src/test/java/impl/bpel/PartnerLinkHasBothAttrTestCase.java b/sca-java-1.x/branches/sca-java-1.5/itest/validation/src/test/java/impl/bpel/PartnerLinkHasBothAttrTestCase.java new file mode 100644 index 0000000000..c623c2b157 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-1.5/itest/validation/src/test/java/impl/bpel/PartnerLinkHasBothAttrTestCase.java @@ -0,0 +1,59 @@ +/* + * 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.bpel; + +import junit.framework.TestCase; + +import org.apache.tuscany.sca.monitor.Monitor; +import org.apache.tuscany.sca.monitor.impl.DefaultMonitorImpl; + +import domain.CustomCompositeBuilder; + +/** + * This shows how to test the Calculator service component. + */ +public class PartnerLinkHasBothAttrTestCase extends TestCase { + + private CustomCompositeBuilder customDomain; + + @Override + protected void setUp() throws Exception + { + customDomain = CustomCompositeBuilder.getInstance(); + try { + customDomain.loadContribution("src/main/resources/impl/bpel/PartnerLinkHasBothAttr/helloworld.composite", + "TestContribution", "src/main/resources/impl/bpel/PartnerLinkHasBothAttr/"); + } catch (Exception ex){ + //throw ex; + } + } + + @Override + protected void tearDown() throws Exception { + //nothing to do + } + + public void testCalculator() { + Monitor monitor = customDomain.getMonitorInstance(); + assertTrue(((DefaultMonitorImpl)monitor).isMessageLogged("PartnerLinkHasBothAttr")); + /*Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem(); + assertNotNull(problem); + assertEquals("PartnerLinkHasBothAttr", problem.getMessageId());*/ + } +} diff --git a/sca-java-1.x/branches/sca-java-1.5/itest/validation/src/test/java/impl/bpel/PartnerLinkNoMatchingTypeTestCase.java b/sca-java-1.x/branches/sca-java-1.5/itest/validation/src/test/java/impl/bpel/PartnerLinkNoMatchingTypeTestCase.java new file mode 100644 index 0000000000..311a1fd8e7 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-1.5/itest/validation/src/test/java/impl/bpel/PartnerLinkNoMatchingTypeTestCase.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 impl.bpel; + +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 PartnerLinkNoMatchingTypeTestCase extends TestCase { + + private CustomCompositeBuilder customDomain; + + @Override + protected void setUp() throws Exception + { + customDomain = CustomCompositeBuilder.getInstance(); + try { + customDomain.loadContribution("src/main/resources/impl/bpel/PartnerLinkNoMatchingType/helloworld.composite", + "TestContribution", "src/main/resources/impl/bpel/PartnerLinkNoMatchingType/"); + } catch (Exception ex){ + //throw ex; + } + } + + @Override + protected void tearDown() throws Exception { + //nothing to do + } + + public void testCalculator() { +// TUSCANY-2970:tests don't work in continuum build +// Monitor monitor = customDomain.getMonitorInstance(); +// Problem problem = ((DefaultMonitorImpl)monitor).getLastLoggedProblem(); + +// assertNotNull(problem); +// assertEquals("PartnerLinkNoMatchingType", problem.getMessageId()); + } +} diff --git a/sca-java-1.x/branches/sca-java-1.5/itest/validation/src/test/java/impl/bpel/PartnerLinkTypeNoRolesTestCase.java b/sca-java-1.x/branches/sca-java-1.5/itest/validation/src/test/java/impl/bpel/PartnerLinkTypeNoRolesTestCase.java new file mode 100644 index 0000000000..999f4a4955 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-1.5/itest/validation/src/test/java/impl/bpel/PartnerLinkTypeNoRolesTestCase.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 impl.bpel; + +import junit.framework.TestCase; + +import org.apache.tuscany.sca.monitor.Monitor; +import org.apache.tuscany.sca.monitor.impl.DefaultMonitorImpl; + +import domain.CustomCompositeBuilder; + +/** + * This shows how to test the Calculator service component. + */ +public class PartnerLinkTypeNoRolesTestCase extends TestCase { + + private CustomCompositeBuilder customDomain; + + @Override + protected void setUp() throws Exception + { + customDomain = CustomCompositeBuilder.getInstance(); + try { + customDomain.loadContribution("src/main/resources/impl/bpel/PartnerLinkTypeNoRoles/helloworld.composite", + "TestContribution", "src/main/resources/impl/bpel/PartnerLinkTypeNoRoles/"); + } catch (Exception ex){ + //throw ex; + } + } + + @Override + protected void tearDown() throws Exception { + //nothing to do + } + + public void testCalculator() { +// TUSCANY-2970:tests don't work in continuum build +// Monitor monitor = customDomain.getMonitorInstance(); +// assertTrue(((DefaultMonitorImpl)monitor).isMessageLogged("PartnerLinkTypeNoRoles")); + /*Problem problem = ((DefaultLoggingMonitorImpl)monitor).getLastLoggedProblem(); + assertNotNull(problem); + assertEquals("PartnerLinkTypeNoRoles", problem.getMessageId());*/ + + } +} |