From e0ff67c0b32813ea48734c770a5ffc1952644e29 Mon Sep 17 00:00:00 2001 From: lresende Date: Wed, 11 Nov 2009 23:08:02 +0000 Subject: Moving 1.x branches git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@835128 13f79535-47bb-0310-9956-ffa450edef68 --- .../bpel/BPELDocumentProcessorTestCase.java | 59 ----------- .../bpel/BPELImplementationProcessorTestCase.java | 117 --------------------- .../src/test/resources/helloworld/helloworld.bpel | 66 ------------ .../src/test/resources/helloworld/helloworld.wsdl | 82 --------------- 4 files changed, 324 deletions(-) delete mode 100644 branches/sca-java-1.3.1/modules/implementation-bpel/src/test/java/org/apache/tuscany/sca/implementation/bpel/BPELDocumentProcessorTestCase.java delete mode 100644 branches/sca-java-1.3.1/modules/implementation-bpel/src/test/java/org/apache/tuscany/sca/implementation/bpel/BPELImplementationProcessorTestCase.java delete mode 100644 branches/sca-java-1.3.1/modules/implementation-bpel/src/test/resources/helloworld/helloworld.bpel delete mode 100644 branches/sca-java-1.3.1/modules/implementation-bpel/src/test/resources/helloworld/helloworld.wsdl (limited to 'branches/sca-java-1.3.1/modules/implementation-bpel/src/test') diff --git a/branches/sca-java-1.3.1/modules/implementation-bpel/src/test/java/org/apache/tuscany/sca/implementation/bpel/BPELDocumentProcessorTestCase.java b/branches/sca-java-1.3.1/modules/implementation-bpel/src/test/java/org/apache/tuscany/sca/implementation/bpel/BPELDocumentProcessorTestCase.java deleted file mode 100644 index 76644e5209..0000000000 --- a/branches/sca-java-1.3.1/modules/implementation-bpel/src/test/java/org/apache/tuscany/sca/implementation/bpel/BPELDocumentProcessorTestCase.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.implementation.bpel; - -import java.net.URI; -import java.net.URL; - -import javax.xml.namespace.QName; - -import junit.framework.TestCase; - -import org.apache.tuscany.sca.contribution.processor.ExtensibleURLArtifactProcessor; -import org.apache.tuscany.sca.contribution.processor.URLArtifactProcessor; -import org.apache.tuscany.sca.contribution.processor.URLArtifactProcessorExtensionPoint; -import org.apache.tuscany.sca.core.DefaultExtensionPointRegistry; - -/** - * @version $Rev$ $Date$ - */ -public class BPELDocumentProcessorTestCase extends TestCase { - - protected static final String BPEL_PROCESS_FILE = "helloworld/helloworld.bpel"; - - private URLArtifactProcessor documentProcessor; - - @Override - protected void setUp() throws Exception { - DefaultExtensionPointRegistry extensionPoints = new DefaultExtensionPointRegistry(); - URLArtifactProcessorExtensionPoint documentProcessors = extensionPoints.getExtensionPoint(URLArtifactProcessorExtensionPoint.class); - documentProcessor = new ExtensibleURLArtifactProcessor(documentProcessors, null); - } - - public void testLoadBPELProcessDefinition() throws Exception { - URI processURI = getClass().getClassLoader().getResource(BPEL_PROCESS_FILE).toURI(); - URL processLocation = getClass().getClassLoader().getResource(BPEL_PROCESS_FILE); - BPELProcessDefinition bpelProcessDefinition = (BPELProcessDefinition)documentProcessor.read(null, processURI, processLocation); - - assertNotNull(bpelProcessDefinition); - assertEquals(new QName("http://tuscany.apache.org/implementation/bpel/example/helloworld", "HelloWorld"), bpelProcessDefinition.getName()); - assertEquals(processLocation, bpelProcessDefinition.getLocation()); - } -} diff --git a/branches/sca-java-1.3.1/modules/implementation-bpel/src/test/java/org/apache/tuscany/sca/implementation/bpel/BPELImplementationProcessorTestCase.java b/branches/sca-java-1.3.1/modules/implementation-bpel/src/test/java/org/apache/tuscany/sca/implementation/bpel/BPELImplementationProcessorTestCase.java deleted file mode 100644 index 14500f6e14..0000000000 --- a/branches/sca-java-1.3.1/modules/implementation-bpel/src/test/java/org/apache/tuscany/sca/implementation/bpel/BPELImplementationProcessorTestCase.java +++ /dev/null @@ -1,117 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.tuscany.sca.implementation.bpel; - -import java.io.StringReader; - -import javax.xml.namespace.QName; -import javax.xml.stream.XMLInputFactory; -import javax.xml.stream.XMLStreamReader; - -import junit.framework.TestCase; - -import org.apache.tuscany.sca.assembly.Composite; -import org.apache.tuscany.sca.assembly.xml.Constants; -import org.apache.tuscany.sca.contribution.processor.DefaultStAXArtifactProcessorExtensionPoint; -import org.apache.tuscany.sca.contribution.processor.ExtensibleStAXArtifactProcessor; -import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor; -import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessorExtensionPoint; -import org.apache.tuscany.sca.core.DefaultExtensionPointRegistry; -import org.apache.tuscany.sca.core.UtilityExtensionPoint; -import org.apache.tuscany.sca.monitor.Monitor; -import org.apache.tuscany.sca.monitor.MonitorFactory; -import org.apache.tuscany.sca.monitor.Problem; -import org.apache.tuscany.sca.monitor.impl.DefaultMonitorFactoryImpl; -import org.apache.tuscany.sca.monitor.impl.DefaultMonitorImpl; - -/** - * @version $Rev$ $Date$ - */ -public class BPELImplementationProcessorTestCase extends TestCase { - - protected static final QName IMPLEMENTATION_BPEL = new QName(Constants.SCA10_NS, "implementation.bpel"); - - private static final String COMPOSITE = - "" - + "" - + " " - + " " - + " " - + ""; - - private static final String COMPOSITE_INVALID = - "" - + "" - + " " - + " " - + " " - + ""; - - private XMLInputFactory inputFactory; - private StAXArtifactProcessor staxProcessor; - private Monitor monitor; - - @Override - protected void setUp() throws Exception { - DefaultExtensionPointRegistry extensionPoints = new DefaultExtensionPointRegistry(); - inputFactory = XMLInputFactory.newInstance(); - // Create a monitor - UtilityExtensionPoint utilities = extensionPoints.getExtensionPoint(UtilityExtensionPoint.class); - MonitorFactory monitorFactory = new DefaultMonitorFactoryImpl(); - if (monitorFactory != null) { - monitor = monitorFactory.createMonitor(); - utilities.addUtility(monitorFactory); - } - StAXArtifactProcessorExtensionPoint staxProcessors = new DefaultStAXArtifactProcessorExtensionPoint(extensionPoints); - staxProcessor = new ExtensibleStAXArtifactProcessor(staxProcessors, inputFactory, null, null); - } - - /** - * Test parsing valid composite definition. Valid composite populated with correct values expected. - * @throws Exception - */ - public void testLoadValidComposite() throws Exception { - XMLStreamReader reader = inputFactory.createXMLStreamReader(new StringReader(COMPOSITE)); - - Composite composite = (Composite)staxProcessor.read(reader); - BPELImplementation implementation = (BPELImplementation)composite.getComponents().get(0).getImplementation(); - - assertNotNull(implementation); - assertEquals(new QName("http://tuscany.apache.org/implementation/bpel/example/helloworld", "HelloWorld"), implementation.getProcess()); - } - - /** - * Test parsing invalid composite definition. Exception should be thrown - * @throws Exception - */ - public void testLoadInvalidComposite() throws Exception { - XMLStreamReader reader = inputFactory.createXMLStreamReader(new StringReader(COMPOSITE_INVALID)); - /*try { - staxProcessor.read(reader); - fail("InvalidException should have been thrown"); - } catch(Exception e) { - assertTrue(true); - }*/ - staxProcessor.read(reader); - Problem problem = ((DefaultMonitorImpl)monitor).getLastLoggedProblem(); - assertNotNull(problem); - assertEquals("AttributeProcessMissing", problem.getMessageId()); - } -} diff --git a/branches/sca-java-1.3.1/modules/implementation-bpel/src/test/resources/helloworld/helloworld.bpel b/branches/sca-java-1.3.1/modules/implementation-bpel/src/test/resources/helloworld/helloworld.bpel deleted file mode 100644 index 8cf91adc2c..0000000000 --- a/branches/sca-java-1.3.1/modules/implementation-bpel/src/test/resources/helloworld/helloworld.bpel +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - concat($tmpVar,' World') - - - - - - diff --git a/branches/sca-java-1.3.1/modules/implementation-bpel/src/test/resources/helloworld/helloworld.wsdl b/branches/sca-java-1.3.1/modules/implementation-bpel/src/test/resources/helloworld/helloworld.wsdl deleted file mode 100644 index 1d71727b2d..0000000000 --- a/branches/sca-java-1.3.1/modules/implementation-bpel/src/test/resources/helloworld/helloworld.wsdl +++ /dev/null @@ -1,82 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file -- cgit v1.2.3