You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by js...@apache.org on 2007/02/13 21:54:08 UTC

svn commit: r507211 - in /incubator/tuscany/branches/sca-java-integration/testing/sca/itest: ./ callBackBasicTest/ callBackBasicTest/src/main/resources/META-INF/sca/ callBackBasicTest/src/test/java/org/apache/tuscany/sca/test/ exceptionTests/ exception...

Author: jsdelfino
Date: Tue Feb 13 12:54:06 2007
New Revision: 507211

URL: http://svn.apache.org/viewvc?view=rev&rev=507211
Log:
Changes to simplify the test environment, adjusted test cases so that they can run standalone from the command line, in an IDE, in a debugger

Added:
    incubator/tuscany/branches/sca-java-integration/testing/sca/itest/callBackBasicTest/src/main/resources/META-INF/sca/application.composite   (with props)
    incubator/tuscany/branches/sca-java-integration/testing/sca/itest/callBackBasicTest/src/test/java/org/apache/tuscany/sca/test/CallBackBasicTestCase.java   (with props)
    incubator/tuscany/branches/sca-java-integration/testing/sca/itest/exceptionTests/src/main/resources/META-INF/sca/application.composite   (with props)
    incubator/tuscany/branches/sca-java-integration/testing/sca/itest/exceptionTests/src/test/java/org/apache/tuscany/sca/test/exceptions/IntraCompositeTestCase.java   (with props)
Removed:
    incubator/tuscany/branches/sca-java-integration/testing/sca/itest/callBackBasicTest/src/main/resources/META-INF/sca/default.scdl
    incubator/tuscany/branches/sca-java-integration/testing/sca/itest/callBackBasicTest/src/test/java/org/apache/tuscany/sca/test/CallBackBasicITest.java
    incubator/tuscany/branches/sca-java-integration/testing/sca/itest/exceptionTests/src/main/resources/META-INF/sca/default.scdl
    incubator/tuscany/branches/sca-java-integration/testing/sca/itest/exceptionTests/src/test/java/org/apache/tuscany/sca/test/exceptions/IntraCompositeTest.java
Modified:
    incubator/tuscany/branches/sca-java-integration/testing/sca/itest/callBackBasicTest/pom.xml
    incubator/tuscany/branches/sca-java-integration/testing/sca/itest/exceptionTests/pom.xml
    incubator/tuscany/branches/sca-java-integration/testing/sca/itest/pom.xml

Modified: incubator/tuscany/branches/sca-java-integration/testing/sca/itest/callBackBasicTest/pom.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/testing/sca/itest/callBackBasicTest/pom.xml?view=diff&rev=507211&r1=507210&r2=507211
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/testing/sca/itest/callBackBasicTest/pom.xml (original)
+++ incubator/tuscany/branches/sca-java-integration/testing/sca/itest/callBackBasicTest/pom.xml Tue Feb 13 12:54:06 2007
@@ -34,8 +34,8 @@
 
     <dependencies>
         <dependency>
-            <groupId>org.osoa</groupId>
-            <artifactId>sca-api-r${scaSpecVersion}</artifactId>
+            <groupId>org.apache.tuscany.sca.kernel</groupId>
+            <artifactId>tuscany-core</artifactId>
         </dependency>
         <dependency>
             <groupId>junit</groupId>
@@ -43,20 +43,4 @@
             <scope>compile</scope>
         </dependency>
     </dependencies>
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-compiler-plugin</artifactId>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.tuscany.sca.plugins</groupId>
-                <artifactId>tuscany-itest-plugin</artifactId>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-surefire-plugin</artifactId>
-            </plugin>
-        </plugins>
-    </build>
 </project>

Added: incubator/tuscany/branches/sca-java-integration/testing/sca/itest/callBackBasicTest/src/main/resources/META-INF/sca/application.composite
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/testing/sca/itest/callBackBasicTest/src/main/resources/META-INF/sca/application.composite?view=auto&rev=507211
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/testing/sca/itest/callBackBasicTest/src/main/resources/META-INF/sca/application.composite (added)
+++ incubator/tuscany/branches/sca-java-integration/testing/sca/itest/callBackBasicTest/src/main/resources/META-INF/sca/application.composite Tue Feb 13 12:54:06 2007
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * 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.
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+       name="CallBackBasicTest">
+ 	      
+    <component name="CallBackBasicClient">
+		<implementation.java class="org.apache.tuscany.sca.test.CallBackBasicClientImpl"/>
+		<reference name="aCallBackService"> 
+		   CallBackBasicService 
+		</reference>
+    </component> 
+    
+    <component name="CallBackBasicService">
+      <implementation.java class="org.apache.tuscany.sca.test.CallBackBasicServiceImpl"/>
+    </component>  
+  
+</composite>

Propchange: incubator/tuscany/branches/sca-java-integration/testing/sca/itest/callBackBasicTest/src/main/resources/META-INF/sca/application.composite
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/branches/sca-java-integration/testing/sca/itest/callBackBasicTest/src/main/resources/META-INF/sca/application.composite
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/branches/sca-java-integration/testing/sca/itest/callBackBasicTest/src/test/java/org/apache/tuscany/sca/test/CallBackBasicTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/testing/sca/itest/callBackBasicTest/src/test/java/org/apache/tuscany/sca/test/CallBackBasicTestCase.java?view=auto&rev=507211
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/testing/sca/itest/callBackBasicTest/src/test/java/org/apache/tuscany/sca/test/CallBackBasicTestCase.java (added)
+++ incubator/tuscany/branches/sca-java-integration/testing/sca/itest/callBackBasicTest/src/test/java/org/apache/tuscany/sca/test/CallBackBasicTestCase.java Tue Feb 13 12:54:06 2007
@@ -0,0 +1,33 @@
+package org.apache.tuscany.sca.test;
+
+import junit.framework.TestCase;
+
+import org.apache.tuscany.api.TuscanyContainer;
+import org.osoa.sca.CurrentCompositeContext;
+import org.osoa.sca.annotations.Reference;
+
+public class CallBackBasicTestCase extends TestCase  {
+
+    private CallBackBasicClient aCallBackClient;
+	
+    public void testCallBackBasic() {
+    	aCallBackClient.run(); 
+    }
+
+    protected void setUp() throws Exception {
+      super.setUp();
+      
+      TuscanyContainer.start();
+      
+      aCallBackClient = CurrentCompositeContext.getContext().locateService(CallBackBasicClient.class, "CallBackBasicClient");
+    }
+   
+    @Override
+    protected void tearDown() throws Exception {
+    	TuscanyContainer.stop();
+    	
+    	super.tearDown();
+    }
+       
+   
+}

Propchange: incubator/tuscany/branches/sca-java-integration/testing/sca/itest/callBackBasicTest/src/test/java/org/apache/tuscany/sca/test/CallBackBasicTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/branches/sca-java-integration/testing/sca/itest/callBackBasicTest/src/test/java/org/apache/tuscany/sca/test/CallBackBasicTestCase.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: incubator/tuscany/branches/sca-java-integration/testing/sca/itest/exceptionTests/pom.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/testing/sca/itest/exceptionTests/pom.xml?view=diff&rev=507211&r1=507210&r2=507211
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/testing/sca/itest/exceptionTests/pom.xml (original)
+++ incubator/tuscany/branches/sca-java-integration/testing/sca/itest/exceptionTests/pom.xml Tue Feb 13 12:54:06 2007
@@ -31,8 +31,8 @@
 
     <dependencies>
         <dependency>
-            <groupId>org.osoa</groupId>
-            <artifactId>sca-api-r${scaSpecVersion}</artifactId>
+            <groupId>org.apache.tuscany.sca.kernel</groupId>
+            <artifactId>tuscany-core</artifactId>
         </dependency>
         <dependency>
             <groupId>junit</groupId>
@@ -40,50 +40,4 @@
         </dependency>
     </dependencies>
 
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-compiler-plugin</artifactId>
-            </plugin>
-                <plugin>
-                    <groupId>org.apache.tuscany.sca.plugins</groupId>
-                    <artifactId>tuscany-itest-plugin</artifactId>
-                    <executions>
-                        <execution>
-                            <id>start</id>
-                            <goals>
-                                <goal>start</goal>
-                            </goals>
-                        </execution>
-                        <execution>
-                            <id>test</id>
-                            <goals>
-                                <goal>test</goal>
-                            </goals>
-                            <configuration>
-                                <includes>
-                                    <include>**/*Test.java</include>
-                                </includes>
-                            </configuration>
-                        </execution>
-                        <execution>
-                            <id>stop</id>
-                            <goals>
-                                <goal>stop</goal>
-                            </goals>
-                        </execution>
-                    </executions>
-                </plugin>
-                <plugin>
-                    <groupId>org.apache.maven.plugins</groupId>
-                    <artifactId>maven-surefire-plugin</artifactId>
-                    <configuration>
-                        <excludes>
-                            <exclude>**/*Test.java</exclude>
-                        </excludes>
-                    </configuration>
-                </plugin>
-        </plugins>
-    </build>
 </project>

Added: incubator/tuscany/branches/sca-java-integration/testing/sca/itest/exceptionTests/src/main/resources/META-INF/sca/application.composite
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/testing/sca/itest/exceptionTests/src/main/resources/META-INF/sca/application.composite?view=auto&rev=507211
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/testing/sca/itest/exceptionTests/src/main/resources/META-INF/sca/application.composite (added)
+++ incubator/tuscany/branches/sca-java-integration/testing/sca/itest/exceptionTests/src/main/resources/META-INF/sca/application.composite Tue Feb 13 12:54:06 2007
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * 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.
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+	   xmlns:foo="http://foo" 
+           name="ExceptionTest">
+   
+    <include name="intracomposite" scdlLocation="intracomposite.scdl"/>
+     
+</composite>

Propchange: incubator/tuscany/branches/sca-java-integration/testing/sca/itest/exceptionTests/src/main/resources/META-INF/sca/application.composite
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/branches/sca-java-integration/testing/sca/itest/exceptionTests/src/main/resources/META-INF/sca/application.composite
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/branches/sca-java-integration/testing/sca/itest/exceptionTests/src/test/java/org/apache/tuscany/sca/test/exceptions/IntraCompositeTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/testing/sca/itest/exceptionTests/src/test/java/org/apache/tuscany/sca/test/exceptions/IntraCompositeTestCase.java?view=auto&rev=507211
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/testing/sca/itest/exceptionTests/src/test/java/org/apache/tuscany/sca/test/exceptions/IntraCompositeTestCase.java (added)
+++ incubator/tuscany/branches/sca-java-integration/testing/sca/itest/exceptionTests/src/test/java/org/apache/tuscany/sca/test/exceptions/IntraCompositeTestCase.java Tue Feb 13 12:54:06 2007
@@ -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 org.apache.tuscany.sca.test.exceptions;
+
+import junit.framework.TestCase;
+
+import org.apache.tuscany.api.TuscanyContainer;
+import org.osoa.sca.CompositeContext;
+import org.osoa.sca.CurrentCompositeContext;
+
+public class IntraCompositeTestCase extends TestCase {
+    private ExceptionHandler exceptionHandler;
+
+    private CompositeContext context;
+
+    public void testALL() {
+        exceptionHandler.testing();
+        assertEquals(ExceptionThrower.SO_THEY_SAY, exceptionHandler.getTheGood() );
+        assertNotNull(exceptionHandler.getTheBad());
+        assertEquals( Checked.class, exceptionHandler.getTheBad().getClass());
+        assertNotNull(exceptionHandler.getTheUgly());
+        assertEquals( UnChecked.class, exceptionHandler.getTheUgly().getClass());
+
+    }
+
+    @Override
+    protected void setUp() throws Exception {
+    	
+        super.setUp();
+        
+        TuscanyContainer.start();
+        
+        context = CurrentCompositeContext.getContext();
+        assertNotNull(context);
+        exceptionHandler = context.locateService(ExceptionHandler.class, "main");
+        assertNotNull(context);
+    }
+    
+    @Override
+    protected void tearDown() throws Exception {
+    	TuscanyContainer.stop();
+    	
+    	super.tearDown();
+    }
+}

Propchange: incubator/tuscany/branches/sca-java-integration/testing/sca/itest/exceptionTests/src/test/java/org/apache/tuscany/sca/test/exceptions/IntraCompositeTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/branches/sca-java-integration/testing/sca/itest/exceptionTests/src/test/java/org/apache/tuscany/sca/test/exceptions/IntraCompositeTestCase.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: incubator/tuscany/branches/sca-java-integration/testing/sca/itest/pom.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-integration/testing/sca/itest/pom.xml?view=diff&rev=507211&r1=507210&r2=507211
==============================================================================
--- incubator/tuscany/branches/sca-java-integration/testing/sca/itest/pom.xml (original)
+++ incubator/tuscany/branches/sca-java-integration/testing/sca/itest/pom.xml Tue Feb 13 12:54:06 2007
@@ -62,6 +62,12 @@
                 <scope>compile</scope>
             </dependency>
             <dependency>
+                <groupId>org.apache.tuscany.sca.kernel</groupId>
+                <artifactId>tuscany-core</artifactId>
+                <version>0.1-integration-incubating-SNAPSHOT</version>
+                <scope>compile</scope>
+            </dependency>
+            <dependency>
                 <groupId>junit</groupId>
                 <artifactId>junit</artifactId>
                 <version>3.8.1</version>
@@ -70,57 +76,4 @@
         </dependencies>
     </dependencyManagement>
 
-    <build>
-        <defaultGoal>install</defaultGoal>
-        <pluginManagement>
-            <plugins>
-                <plugin>
-                    <groupId>org.apache.maven.plugins</groupId>
-                    <artifactId>maven-compiler-plugin</artifactId>
-                    <configuration>
-                        <source>1.5</source>
-                        <target>1.5</target>
-                    </configuration>
-                </plugin>
-                <plugin>
-                    <groupId>org.apache.tuscany.sca.plugins</groupId>
-                    <artifactId>tuscany-itest-plugin</artifactId>
-                    <executions>
-                        <execution>
-                            <id>start</id>
-                            <goals>
-                                <goal>start</goal>
-                            </goals>
-                        </execution>
-                        <execution>
-                            <id>test</id>
-                            <goals>
-                                <goal>test</goal>
-                            </goals>
-                            <configuration>
-                                <includes>
-                                    <include>**/*ITest.java</include>
-                                </includes>
-                            </configuration>
-                        </execution>
-                        <execution>
-                            <id>stop</id>
-                            <goals>
-                                <goal>stop</goal>
-                            </goals>
-                        </execution>
-                    </executions>
-                </plugin>
-                <plugin>
-                    <groupId>org.apache.maven.plugins</groupId>
-                    <artifactId>maven-surefire-plugin</artifactId>
-                    <configuration>
-                        <excludes>
-                            <exclude>**/*ITest.java</exclude>
-                        </excludes>
-                    </configuration>
-                </plugin>
-            </plugins>
-        </pluginManagement>
-    </build>
 </project>



---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org