tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sl...@apache.org
Subject svn commit: r652501 - in /incubator/tuscany/java/sca/vtest/java-api/annotations/property/src: main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/property/impl/ main/resources/ test/java/org/apache/tuscany/sca/vtest/javaapi/annotations/property/
Date Thu, 01 May 2008 12:41:34 GMT
Author: slaws
Date: Thu May  1 05:41:33 2008
New Revision: 652501

URL: http://svn.apache.org/viewvc?rev=652501&view=rev
Log:
TUSCANY-2210 Thanks for the patch Vamsi

Added:
    incubator/tuscany/java/sca/vtest/java-api/annotations/property/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/property/impl/AnotherAServiceImpl.java
  (with props)
Modified:
    incubator/tuscany/java/sca/vtest/java-api/annotations/property/src/main/resources/property.composite
    incubator/tuscany/java/sca/vtest/java-api/annotations/property/src/test/java/org/apache/tuscany/sca/vtest/javaapi/annotations/property/PropertyAnnotationTestCase.java

Added: incubator/tuscany/java/sca/vtest/java-api/annotations/property/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/property/impl/AnotherAServiceImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/vtest/java-api/annotations/property/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/property/impl/AnotherAServiceImpl.java?rev=652501&view=auto
==============================================================================
--- incubator/tuscany/java/sca/vtest/java-api/annotations/property/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/property/impl/AnotherAServiceImpl.java
(added)
+++ incubator/tuscany/java/sca/vtest/java-api/annotations/property/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/property/impl/AnotherAServiceImpl.java
Thu May  1 05:41:33 2008
@@ -0,0 +1,166 @@
+/*
+ * 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.vtest.javaapi.annotations.property.impl;
+
+import org.apache.tuscany.sca.vtest.javaapi.annotations.property.AService;
+import org.osoa.sca.annotations.Service;
+
+@Service(AService.class)
+public class AnotherAServiceImpl implements AService {
+
+    public String p13;                // injected via field and un-annotated
+    
+    public String p14;                // injected via setter and un-annotated
+    
+    public boolean p14SetterIsCalled = false;
+    
+    public String getName() {
+        return "AService";
+    }
+    
+    public AnotherAServiceImpl() {
+        super();
+    }
+ 
+    public void setP14(String p14) {
+        p14SetterIsCalled = true;
+        this.p14 = p14;
+    }
+    
+    public String getP1() {
+        return null;
+    }
+
+    public String getP2() {
+        return null;
+    }
+
+    public String getP3() {
+        return null;
+    }
+
+    public String getP4() {
+        return null;
+    }
+
+    public String getP5() {
+        return null;
+    }
+
+    public String getP6() {
+        return null;
+    }
+
+    public String getP7AString() {
+        return null;
+    }
+
+    public int getP7BInt() {
+        return -1;
+    }
+    
+    public String getP8AString() {
+        return null;
+    }
+
+    public int getP8BInt() {
+        return -1;
+    }
+    
+    public String getP9AString() {
+        return null;
+    }
+
+    public int getP9BInt() {
+        return -1;
+    }
+    
+    public String getP10AString() {
+        return null;
+    }
+
+    public int getP10BInt() {
+        return -1;
+    }
+
+    public String getP11AString() {
+        return null;
+    }
+
+    public int getP11BInt() {
+        return -1;
+    }
+
+    public String getP12AString() {
+        return null;
+    }
+
+    public int getP12BInt() {
+        return -1;
+    }
+
+    public String getP13() {
+        return p13;
+    }
+    
+    public String getP14() {
+        return p14;
+    }
+    
+    public boolean getP14SetterIsCalled() {
+        return p14SetterIsCalled;
+    }
+    
+    public String getP15() {
+        return null;
+    }
+
+    public String getP16() {
+        return null;
+    }
+
+    public String getP17() {
+        return null;
+    }
+
+    public String getP18() {
+        return null;
+    }
+
+    public int getP19Size() {
+        return -1;
+    }
+
+    public String getP20(int i) {
+        return null;
+    }
+
+    public int getP20Size() {
+        return -1;
+    }
+
+    public int getP21(int i) {
+        return -1;
+    }
+
+    public int getP21Size() {
+        return -1;
+    }
+}

Propchange: incubator/tuscany/java/sca/vtest/java-api/annotations/property/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/property/impl/AnotherAServiceImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/vtest/java-api/annotations/property/src/main/java/org/apache/tuscany/sca/vtest/javaapi/annotations/property/impl/AnotherAServiceImpl.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: incubator/tuscany/java/sca/vtest/java-api/annotations/property/src/main/resources/property.composite
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/vtest/java-api/annotations/property/src/main/resources/property.composite?rev=652501&r1=652500&r2=652501&view=diff
==============================================================================
--- incubator/tuscany/java/sca/vtest/java-api/annotations/property/src/main/resources/property.composite
(original)
+++ incubator/tuscany/java/sca/vtest/java-api/annotations/property/src/main/resources/property.composite
Thu May  1 05:41:33 2008
@@ -132,4 +132,10 @@
         <implementation.java class="org.apache.tuscany.sca.vtest.javaapi.annotations.property.impl.BServiceImpl"/>
     </component>    
     
+    <component name="AnotherAComponent">
+        <implementation.java
+            class="org.apache.tuscany.sca.vtest.javaapi.annotations.property.impl.AnotherAServiceImpl"
/>
+            <property name="p13">p13</property>
+            <property name="p14">p14</property>
+    </component>
 </composite>

Modified: incubator/tuscany/java/sca/vtest/java-api/annotations/property/src/test/java/org/apache/tuscany/sca/vtest/javaapi/annotations/property/PropertyAnnotationTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/vtest/java-api/annotations/property/src/test/java/org/apache/tuscany/sca/vtest/javaapi/annotations/property/PropertyAnnotationTestCase.java?rev=652501&r1=652500&r2=652501&view=diff
==============================================================================
--- incubator/tuscany/java/sca/vtest/java-api/annotations/property/src/test/java/org/apache/tuscany/sca/vtest/javaapi/annotations/property/PropertyAnnotationTestCase.java
(original)
+++ incubator/tuscany/java/sca/vtest/java-api/annotations/property/src/test/java/org/apache/tuscany/sca/vtest/javaapi/annotations/property/PropertyAnnotationTestCase.java
Thu May  1 05:41:33 2008
@@ -28,7 +28,6 @@
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
 import org.junit.Test;
-import org.junit.Ignore;
 
 /**
  * This test class tests the Property annotation described in section 1.2.3
@@ -128,10 +127,9 @@
      * p13 - injected via field and un-annotated
      */
     @Test
-    @Ignore
-    // (Jira Tuscany-2210)
     public void atProperty2() throws Exception {
-    	Assert.assertEquals("p13", aService.getP13());
+        AService anotherAService = domain.getService(AService.class, "AnotherAComponent");
+        Assert.assertEquals("p13", anotherAService.getP13());
     }
 
     /**
@@ -142,11 +140,10 @@
      * p14 - injected via setter and un-annotated
      */
     @Test
-    @Ignore
-    // (Jira Tuscany-2210)
     public void atProperty3() throws Exception {
-    	Assert.assertEquals("p14", aService.getP14());
-    	Assert.assertTrue(aService.getP14SetterIsCalled());
+        AService anotherAService = domain.getService(AService.class, "AnotherAComponent");
+        Assert.assertEquals("p14", anotherAService.getP14());
+        Assert.assertTrue(anotherAService.getP14SetterIsCalled());
     }
     
     /**



Mime
View raw message