tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwilli...@apache.org
Subject svn commit: r657988 - in /incubator/tuscany/java/sca/vtest: ./ java-api/ java-api/conversation/parameters/src/test/java/org/apache/tuscany/sca/vtest/javaapi/conversation/parameters/ utilities/ utilities/src/ utilities/src/main/ utilities/src/main/java/...
Date Mon, 19 May 2008 21:27:52 GMT
Author: kwilliams
Date: Mon May 19 14:27:51 2008
New Revision: 657988

URL: http://svn.apache.org/viewvc?rev=657988&view=rev
Log:
Starting some refactoring

Added:
    incubator/tuscany/java/sca/vtest/utilities/
    incubator/tuscany/java/sca/vtest/utilities/pom.xml   (with props)
    incubator/tuscany/java/sca/vtest/utilities/src/
    incubator/tuscany/java/sca/vtest/utilities/src/main/
    incubator/tuscany/java/sca/vtest/utilities/src/main/java/
    incubator/tuscany/java/sca/vtest/utilities/src/main/java/org/
    incubator/tuscany/java/sca/vtest/utilities/src/main/java/org/apache/
    incubator/tuscany/java/sca/vtest/utilities/src/main/java/org/apache/tuscany/
    incubator/tuscany/java/sca/vtest/utilities/src/main/java/org/apache/tuscany/sca/
    incubator/tuscany/java/sca/vtest/utilities/src/main/java/org/apache/tuscany/sca/vtest/
    incubator/tuscany/java/sca/vtest/utilities/src/main/java/org/apache/tuscany/sca/vtest/utilities/
    incubator/tuscany/java/sca/vtest/utilities/src/main/java/org/apache/tuscany/sca/vtest/utilities/ServiceFinder.java
  (with props)
Modified:
    incubator/tuscany/java/sca/vtest/java-api/conversation/parameters/src/test/java/org/apache/tuscany/sca/vtest/javaapi/conversation/parameters/ConversationParametersTestCase.java
    incubator/tuscany/java/sca/vtest/java-api/pom.xml
    incubator/tuscany/java/sca/vtest/pom.xml

Modified: incubator/tuscany/java/sca/vtest/java-api/conversation/parameters/src/test/java/org/apache/tuscany/sca/vtest/javaapi/conversation/parameters/ConversationParametersTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/vtest/java-api/conversation/parameters/src/test/java/org/apache/tuscany/sca/vtest/javaapi/conversation/parameters/ConversationParametersTestCase.java?rev=657988&r1=657987&r2=657988&view=diff
==============================================================================
--- incubator/tuscany/java/sca/vtest/java-api/conversation/parameters/src/test/java/org/apache/tuscany/sca/vtest/javaapi/conversation/parameters/ConversationParametersTestCase.java
(original)
+++ incubator/tuscany/java/sca/vtest/java-api/conversation/parameters/src/test/java/org/apache/tuscany/sca/vtest/javaapi/conversation/parameters/ConversationParametersTestCase.java
Mon May 19 14:27:51 2008
@@ -19,9 +19,7 @@
 
 package org.apache.tuscany.sca.vtest.javaapi.conversation.parameters;
 
-import junit.framework.Assert;
-
-import org.apache.tuscany.sca.host.embedded.SCADomain;
+import org.apache.tuscany.sca.vtest.utilities.ServiceFinder;
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
 import org.junit.Test;
@@ -32,7 +30,7 @@
  */
 public class ConversationParametersTestCase {
 
-    protected static SCADomain domain;
+    protected static ServiceFinder serviceFinder;
     protected static String compositeName = "parameters.composite";
     protected static AService aService = null;
 
@@ -40,8 +38,8 @@
     public static void init() throws Exception {
         try {
             System.out.println("Setting up");
-            domain = SCADomain.newInstance(compositeName);
-            aService = domain.getService(AService.class, "AComponent");
+            ServiceFinder.init(compositeName);
+            aService = ServiceFinder.getService(AService.class, "AComponent");
         } catch (Exception ex) {
             ex.printStackTrace();
         }
@@ -51,8 +49,7 @@
     public static void destroy() throws Exception {
 
         System.out.println("Cleaning up");
-        if (domain != null)
-            domain.close();
+        ServiceFinder.cleanup();
 
     }
 
@@ -69,5 +66,4 @@
         aService.setBStateThenGetCState();
     }
 
-
 }

Modified: incubator/tuscany/java/sca/vtest/java-api/pom.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/vtest/java-api/pom.xml?rev=657988&r1=657987&r2=657988&view=diff
==============================================================================
--- incubator/tuscany/java/sca/vtest/java-api/pom.xml (original)
+++ incubator/tuscany/java/sca/vtest/java-api/pom.xml Mon May 19 14:27:51 2008
@@ -43,6 +43,13 @@
             <scope>runtime</scope>
         </dependency>
         
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>vtest-utilities</artifactId>
+            <version>2.0-incubating-SNAPSHOT</version>
+            <scope>runtime</scope>
+        </dependency>
+
     </dependencies>
 
 

Modified: incubator/tuscany/java/sca/vtest/pom.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/vtest/pom.xml?rev=657988&r1=657987&r2=657988&view=diff
==============================================================================
--- incubator/tuscany/java/sca/vtest/pom.xml (original)
+++ incubator/tuscany/java/sca/vtest/pom.xml Mon May 19 14:27:51 2008
@@ -47,6 +47,7 @@
             <modules>
                 <module>java-api</module>
                 <module>wsbinding</module>
+                <module>utilities</module>
            </modules>
         </profile>
     </profiles>

Added: incubator/tuscany/java/sca/vtest/utilities/pom.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/vtest/utilities/pom.xml?rev=657988&view=auto
==============================================================================
--- incubator/tuscany/java/sca/vtest/utilities/pom.xml (added)
+++ incubator/tuscany/java/sca/vtest/utilities/pom.xml Mon May 19 14:27:51 2008
@@ -0,0 +1,42 @@
+<?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.    
+-->
+<project>
+
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.apache.tuscany.sca</groupId>
+        <artifactId>tuscany-vtest</artifactId>
+        <version>2.0-incubating-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+    <artifactId>vtest-utilities</artifactId>
+    <name>Apache Tuscany SCA Verification Tests - Utilities</name>
+
+    <dependencies>
+
+        <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-host-embedded</artifactId>
+            <version>2.0-incubating-SNAPSHOT</version>
+        </dependency>
+
+    </dependencies>
+
+</project>

Propchange: incubator/tuscany/java/sca/vtest/utilities/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/vtest/utilities/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/tuscany/java/sca/vtest/utilities/pom.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: incubator/tuscany/java/sca/vtest/utilities/src/main/java/org/apache/tuscany/sca/vtest/utilities/ServiceFinder.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/vtest/utilities/src/main/java/org/apache/tuscany/sca/vtest/utilities/ServiceFinder.java?rev=657988&view=auto
==============================================================================
--- incubator/tuscany/java/sca/vtest/utilities/src/main/java/org/apache/tuscany/sca/vtest/utilities/ServiceFinder.java
(added)
+++ incubator/tuscany/java/sca/vtest/utilities/src/main/java/org/apache/tuscany/sca/vtest/utilities/ServiceFinder.java
Mon May 19 14:27:51 2008
@@ -0,0 +1,51 @@
+/*
+ * 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.vtest.utilities;
+
+import org.apache.tuscany.sca.host.embedded.SCADomain;
+
+/**
+ * 
+ * 
+ */
+public class ServiceFinder {
+
+    private static SCADomain domain;
+
+    protected ServiceFinder() {
+        super();
+    }
+
+    public static void init(String compositeFileName) {
+        if (domain != null)
+            System.out.println("VTEST WARNING: domain already exists is is being overwritten!");
+        domain = SCADomain.newInstance(compositeFileName);
+    } 
+    
+    
+    public static <B> B getService(Class<B> businessInterface, String serviceName)
{
+        return domain.getService(businessInterface, serviceName);
+    }
+
+    public static void cleanup() {
+        domain.close();
+        domain = null;
+    }
+
+}

Propchange: incubator/tuscany/java/sca/vtest/utilities/src/main/java/org/apache/tuscany/sca/vtest/utilities/ServiceFinder.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/vtest/utilities/src/main/java/org/apache/tuscany/sca/vtest/utilities/ServiceFinder.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date



Mime
View raw message