You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by bd...@apache.org on 2006/11/30 19:09:33 UTC

svn commit: r481021 - in /incubator/tuscany/java/testing/sca/itest/propertyTest: ./ src/ src/main/ src/main/java/ src/main/java/org/ src/main/java/org/apache/ src/main/java/org/apache/tuscany/ src/main/java/org/apache/tuscany/sca/ src/main/java/org/apa...

Author: bdaniel
Date: Thu Nov 30 10:09:30 2006
New Revision: 481021

URL: http://svn.apache.org/viewvc?view=rev&rev=481021
Log:
TUSCANY-903 Applying patch to provide some simple property tests

Added:
    incubator/tuscany/java/testing/sca/itest/propertyTest/
    incubator/tuscany/java/testing/sca/itest/propertyTest/pom.xml
    incubator/tuscany/java/testing/sca/itest/propertyTest/src/
    incubator/tuscany/java/testing/sca/itest/propertyTest/src/main/
    incubator/tuscany/java/testing/sca/itest/propertyTest/src/main/java/
    incubator/tuscany/java/testing/sca/itest/propertyTest/src/main/java/org/
    incubator/tuscany/java/testing/sca/itest/propertyTest/src/main/java/org/apache/
    incubator/tuscany/java/testing/sca/itest/propertyTest/src/main/java/org/apache/tuscany/
    incubator/tuscany/java/testing/sca/itest/propertyTest/src/main/java/org/apache/tuscany/sca/
    incubator/tuscany/java/testing/sca/itest/propertyTest/src/main/java/org/apache/tuscany/sca/itest/
    incubator/tuscany/java/testing/sca/itest/propertyTest/src/main/java/org/apache/tuscany/sca/itest/ABCDComponent.java
    incubator/tuscany/java/testing/sca/itest/propertyTest/src/main/java/org/apache/tuscany/sca/itest/ABCDComponentImpl.java
    incubator/tuscany/java/testing/sca/itest/propertyTest/src/main/java/org/apache/tuscany/sca/itest/ABComponent.java
    incubator/tuscany/java/testing/sca/itest/propertyTest/src/main/java/org/apache/tuscany/sca/itest/ABComponentImpl.java
    incubator/tuscany/java/testing/sca/itest/propertyTest/src/main/java/org/apache/tuscany/sca/itest/CDComponent.java
    incubator/tuscany/java/testing/sca/itest/propertyTest/src/main/java/org/apache/tuscany/sca/itest/CDComponentImpl.java
    incubator/tuscany/java/testing/sca/itest/propertyTest/src/main/java/org/apache/tuscany/sca/itest/OverrideService.java
    incubator/tuscany/java/testing/sca/itest/propertyTest/src/main/java/org/apache/tuscany/sca/itest/OverrideServiceImpl.java
    incubator/tuscany/java/testing/sca/itest/propertyTest/src/main/java/org/apache/tuscany/sca/itest/PropertyService.java
    incubator/tuscany/java/testing/sca/itest/propertyTest/src/main/resources/
    incubator/tuscany/java/testing/sca/itest/propertyTest/src/main/resources/META-INF/
    incubator/tuscany/java/testing/sca/itest/propertyTest/src/main/resources/META-INF/sca/
    incubator/tuscany/java/testing/sca/itest/propertyTest/src/main/resources/META-INF/sca/default.scdl
    incubator/tuscany/java/testing/sca/itest/propertyTest/src/main/resources/META-INF/sca/fileProperty.txt
    incubator/tuscany/java/testing/sca/itest/propertyTest/src/test/
    incubator/tuscany/java/testing/sca/itest/propertyTest/src/test/java/
    incubator/tuscany/java/testing/sca/itest/propertyTest/src/test/java/org/
    incubator/tuscany/java/testing/sca/itest/propertyTest/src/test/java/org/apache/
    incubator/tuscany/java/testing/sca/itest/propertyTest/src/test/java/org/apache/tuscany/
    incubator/tuscany/java/testing/sca/itest/propertyTest/src/test/java/org/apache/tuscany/sca/
    incubator/tuscany/java/testing/sca/itest/propertyTest/src/test/java/org/apache/tuscany/sca/itest/
    incubator/tuscany/java/testing/sca/itest/propertyTest/src/test/java/org/apache/tuscany/sca/itest/PropertyITest.java

Added: incubator/tuscany/java/testing/sca/itest/propertyTest/pom.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/testing/sca/itest/propertyTest/pom.xml?view=auto&rev=481021
==============================================================================
--- incubator/tuscany/java/testing/sca/itest/propertyTest/pom.xml (added)
+++ incubator/tuscany/java/testing/sca/itest/propertyTest/pom.xml Thu Nov 30 10:09:30 2006
@@ -0,0 +1,72 @@
+<project>
+    <modelVersion>4.0.0</modelVersion>
+    <groupId>org.apache.tuscany.testing</groupId>
+    <artifactId>propertyTest</artifactId>
+    <version>SNAPSHOT</version>
+    <packaging>jar</packaging>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.osoa</groupId>
+            <artifactId>sca-api-r0.95</artifactId>
+            <version>1.0-incubator-M2</version>
+        </dependency>
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <version>3.8.1</version>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+    <build>
+        <defaultGoal>install</defaultGoal>
+        <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>
+    </build>
+</project>
\ No newline at end of file

Added: incubator/tuscany/java/testing/sca/itest/propertyTest/src/main/java/org/apache/tuscany/sca/itest/ABCDComponent.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/testing/sca/itest/propertyTest/src/main/java/org/apache/tuscany/sca/itest/ABCDComponent.java?view=auto&rev=481021
==============================================================================
--- incubator/tuscany/java/testing/sca/itest/propertyTest/src/main/java/org/apache/tuscany/sca/itest/ABCDComponent.java (added)
+++ incubator/tuscany/java/testing/sca/itest/propertyTest/src/main/java/org/apache/tuscany/sca/itest/ABCDComponent.java Thu Nov 30 10:09:30 2006
@@ -0,0 +1,27 @@
+/*
+ * 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.itest;
+
+public interface ABCDComponent {
+    String getA();
+    String getB();
+    String getC();
+    String getD();
+}
+

Added: incubator/tuscany/java/testing/sca/itest/propertyTest/src/main/java/org/apache/tuscany/sca/itest/ABCDComponentImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/testing/sca/itest/propertyTest/src/main/java/org/apache/tuscany/sca/itest/ABCDComponentImpl.java?view=auto&rev=481021
==============================================================================
--- incubator/tuscany/java/testing/sca/itest/propertyTest/src/main/java/org/apache/tuscany/sca/itest/ABCDComponentImpl.java (added)
+++ incubator/tuscany/java/testing/sca/itest/propertyTest/src/main/java/org/apache/tuscany/sca/itest/ABCDComponentImpl.java Thu Nov 30 10:09:30 2006
@@ -0,0 +1,55 @@
+/*
+ * 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.itest;
+
+import org.osoa.sca.annotations.Reference;
+import org.osoa.sca.annotations.Scope;
+
+@Scope("MODULE")
+public class ABCDComponentImpl implements ABCDComponent {
+    private ABComponent abComponent;
+    private CDComponent cdComponent;
+    
+    @Reference
+    public void setAb(ABComponent component) {
+        this.abComponent = component;
+    }
+    
+    @Reference
+    public void setCd(CDComponent component) {
+        this.cdComponent = component;
+    }
+    
+    public String getA() {
+        return this.abComponent.getA();
+    }
+    
+    public String getB() {
+        return this.abComponent.getB();       
+    }
+    
+    public String getC() {
+        return this.cdComponent.getC();
+    }
+    
+    public String getD() {
+        return this.cdComponent.getD();
+    }
+}

Added: incubator/tuscany/java/testing/sca/itest/propertyTest/src/main/java/org/apache/tuscany/sca/itest/ABComponent.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/testing/sca/itest/propertyTest/src/main/java/org/apache/tuscany/sca/itest/ABComponent.java?view=auto&rev=481021
==============================================================================
--- incubator/tuscany/java/testing/sca/itest/propertyTest/src/main/java/org/apache/tuscany/sca/itest/ABComponent.java (added)
+++ incubator/tuscany/java/testing/sca/itest/propertyTest/src/main/java/org/apache/tuscany/sca/itest/ABComponent.java Thu Nov 30 10:09:30 2006
@@ -0,0 +1,29 @@
+/*
+ * 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.itest;
+
+public interface ABComponent {  
+
+    String getA();
+    String getB();
+    String getZ();
+    int getIntValue();
+    String getF();
+}

Added: incubator/tuscany/java/testing/sca/itest/propertyTest/src/main/java/org/apache/tuscany/sca/itest/ABComponentImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/testing/sca/itest/propertyTest/src/main/java/org/apache/tuscany/sca/itest/ABComponentImpl.java?view=auto&rev=481021
==============================================================================
--- incubator/tuscany/java/testing/sca/itest/propertyTest/src/main/java/org/apache/tuscany/sca/itest/ABComponentImpl.java (added)
+++ incubator/tuscany/java/testing/sca/itest/propertyTest/src/main/java/org/apache/tuscany/sca/itest/ABComponentImpl.java Thu Nov 30 10:09:30 2006
@@ -0,0 +1,82 @@
+/*
+ * 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.itest;
+
+import org.osoa.sca.annotations.Property;
+
+public class ABComponentImpl implements ABComponent {
+
+    private String aProperty;
+    private String bProperty;
+    private int intValue;
+ //   private Collection manyProp;
+    private String zProperty;
+    private String fProperty;
+
+    @Property(name="xpath")
+    public void setZProperty(final String value) {
+        this.zProperty = value;
+    }
+    
+//    @Property(name="foobar")
+//    public void setCollectionProperty(final Collection value) {
+//        this.manyProp = value;
+//    }
+    
+    @Property
+    public void setA(final String A) {
+        this.aProperty = A;
+    }
+
+    @Property
+    public void setB(final String B) {
+        this.bProperty = B;
+    }
+    
+    @Property 
+    public void setF(final String F) {
+        this.fProperty = F;
+    }
+    
+    @Property
+    public void setOne(final int value) {
+        this.intValue = value;
+    }
+    
+    public String getA() {
+        return this.aProperty;
+    }
+    
+    public String getB() {
+        return this.bProperty;
+    }
+    
+    public int getIntValue() {
+        return this.intValue;
+    }
+    
+    public String getZ() {
+        return this.zProperty;
+    }
+    
+    public String getF() {
+        return this.fProperty;
+    }
+}

Added: incubator/tuscany/java/testing/sca/itest/propertyTest/src/main/java/org/apache/tuscany/sca/itest/CDComponent.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/testing/sca/itest/propertyTest/src/main/java/org/apache/tuscany/sca/itest/CDComponent.java?view=auto&rev=481021
==============================================================================
--- incubator/tuscany/java/testing/sca/itest/propertyTest/src/main/java/org/apache/tuscany/sca/itest/CDComponent.java (added)
+++ incubator/tuscany/java/testing/sca/itest/propertyTest/src/main/java/org/apache/tuscany/sca/itest/CDComponent.java Thu Nov 30 10:09:30 2006
@@ -0,0 +1,30 @@
+/*
+ * 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.itest;
+
+public interface CDComponent {  
+
+    String getC();
+    String getC2();
+    String getD();
+    String getNoSource();
+    String getFileProperty();
+    int getOverrideValue();
+}

Added: incubator/tuscany/java/testing/sca/itest/propertyTest/src/main/java/org/apache/tuscany/sca/itest/CDComponentImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/testing/sca/itest/propertyTest/src/main/java/org/apache/tuscany/sca/itest/CDComponentImpl.java?view=auto&rev=481021
==============================================================================
--- incubator/tuscany/java/testing/sca/itest/propertyTest/src/main/java/org/apache/tuscany/sca/itest/CDComponentImpl.java (added)
+++ incubator/tuscany/java/testing/sca/itest/propertyTest/src/main/java/org/apache/tuscany/sca/itest/CDComponentImpl.java Thu Nov 30 10:09:30 2006
@@ -0,0 +1,85 @@
+/*
+ * 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.itest;
+
+import org.osoa.sca.annotations.Property;
+
+public class CDComponentImpl implements CDComponent {
+
+    private String cProperty;
+    private String dProperty;
+    private String nosource;
+    private String fileProperty;
+    private int overrideNumber;
+    private String cProperty2;
+
+    @Property(name="nonFileProperty")
+    public void setC2(final String value) {
+        this.cProperty2 = value;
+    }
+    @Property(name="two")
+    public void setOverrideNumber(final int value) {
+        this.overrideNumber = value;
+    }
+    
+    @Property(name="fileProperty")
+    public void setFileProp(final String value) {
+        this.fileProperty = value;
+    }
+    @Property
+    public void setC(final String C) {
+        this.cProperty = C;
+    }
+
+    @Property
+    public void setD(final String D) {
+        this.dProperty = D;
+    }
+    
+    @Property
+    public void setNosource(final String value) {
+        this.nosource = value;
+    }
+    
+    public String getFileProperty() {
+        return this.fileProperty;
+    }
+    
+    public String getC() {
+        return this.cProperty;
+    }
+    
+    public String getC2() {
+        return this.cProperty2;
+    }
+    
+    public String getD() {
+        return this.dProperty;
+    }
+
+    public String getNoSource() {
+       return this.nosource;
+    }
+
+    public int getOverrideValue() {
+        return this.overrideNumber;
+    }
+}
+

Added: incubator/tuscany/java/testing/sca/itest/propertyTest/src/main/java/org/apache/tuscany/sca/itest/OverrideService.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/testing/sca/itest/propertyTest/src/main/java/org/apache/tuscany/sca/itest/OverrideService.java?view=auto&rev=481021
==============================================================================
--- incubator/tuscany/java/testing/sca/itest/propertyTest/src/main/java/org/apache/tuscany/sca/itest/OverrideService.java (added)
+++ incubator/tuscany/java/testing/sca/itest/propertyTest/src/main/java/org/apache/tuscany/sca/itest/OverrideService.java Thu Nov 30 10:09:30 2006
@@ -0,0 +1,25 @@
+
+/*
+ * 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.itest;
+
+public interface OverrideService {
+
+}

Added: incubator/tuscany/java/testing/sca/itest/propertyTest/src/main/java/org/apache/tuscany/sca/itest/OverrideServiceImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/testing/sca/itest/propertyTest/src/main/java/org/apache/tuscany/sca/itest/OverrideServiceImpl.java?view=auto&rev=481021
==============================================================================
--- incubator/tuscany/java/testing/sca/itest/propertyTest/src/main/java/org/apache/tuscany/sca/itest/OverrideServiceImpl.java (added)
+++ incubator/tuscany/java/testing/sca/itest/propertyTest/src/main/java/org/apache/tuscany/sca/itest/OverrideServiceImpl.java Thu Nov 30 10:09:30 2006
@@ -0,0 +1,24 @@
+/*
+ * 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.itest;
+
+public class OverrideServiceImpl implements OverrideService {
+
+}

Added: incubator/tuscany/java/testing/sca/itest/propertyTest/src/main/java/org/apache/tuscany/sca/itest/PropertyService.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/testing/sca/itest/propertyTest/src/main/java/org/apache/tuscany/sca/itest/PropertyService.java?view=auto&rev=481021
==============================================================================
--- incubator/tuscany/java/testing/sca/itest/propertyTest/src/main/java/org/apache/tuscany/sca/itest/PropertyService.java (added)
+++ incubator/tuscany/java/testing/sca/itest/propertyTest/src/main/java/org/apache/tuscany/sca/itest/PropertyService.java Thu Nov 30 10:09:30 2006
@@ -0,0 +1,24 @@
+/*
+ * 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.itest;
+
+public interface PropertyService {
+
+}

Added: incubator/tuscany/java/testing/sca/itest/propertyTest/src/main/resources/META-INF/sca/default.scdl
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/testing/sca/itest/propertyTest/src/main/resources/META-INF/sca/default.scdl?view=auto&rev=481021
==============================================================================
--- incubator/tuscany/java/testing/sca/itest/propertyTest/src/main/resources/META-INF/sca/default.scdl (added)
+++ incubator/tuscany/java/testing/sca/itest/propertyTest/src/main/resources/META-INF/sca/default.scdl Thu Nov 30 10:09:30 2006
@@ -0,0 +1,69 @@
+<?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="PropertyTest">
+   
+ <!--   <property name="manyValued" type="xsd:string" many="true"/> -->
+    
+    <property name="number" type="xsd:int">1</property>
+    
+ 	<property name="complex" type="foo:MyComplexType">
+		<foo:a>a</foo:a>
+		<foo:b>b</foo:b>
+		<foo:c>c</foo:c>
+		<foo:d>d</foo:d>
+		<foo:x>
+			<y>y</y>
+			<z>z</z>
+		</foo:x>
+		
+	</property>	
+
+ 	<component name="ABCDComponent">
+		<implementation.java class="org.apache.tuscany.sca.itest.ABCDComponentImpl"/>
+        <reference name="ab">ABComponent</reference>
+        <reference name="cd">CDComponent</reference>
+    </component>
+    
+    <component name="ABComponent">
+		<implementation.java class="org.apache.tuscany.sca.itest.ABComponentImpl"/>
+		<property name="a" source="$complex/foo:a"/>
+		<property name="b" source="$complex/foo:b"/>
+		<property name="f" source="$complex/foo:a">f</property>
+		<property name="xpath" source="$complex/foo:x/*[local-name()='z']"/>
+		<property name="one" source="$number"/>	
+    </component>
+    
+    <component name="CDComponent">
+    	<implementation.java class="org.apache.tuscany.sca.itest.CDComponentImpl"/>
+    	<property name="c" source="$complex/foo:c"/>
+    	<property name="d" source="$complex/foo:d"/>
+    	<property name="nosource">aValue</property>
+    	<property name="fileProperty" file="META-INF/sca/fileProperty.txt"/>
+    	<property name="nonFileProperty" file="META-INF/sca/fileProperty.txt" source="$complex/foo:c"/>
+    	<property name="two" source="$number">2</property>
+    </component>    
+   
+<!--    <component name="Override">
+    	<implementation.composite name="OverrideComposite" scdlLocation="override.scdl"/>
+    </component>
+    -->
+</composite>

Added: incubator/tuscany/java/testing/sca/itest/propertyTest/src/main/resources/META-INF/sca/fileProperty.txt
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/testing/sca/itest/propertyTest/src/main/resources/META-INF/sca/fileProperty.txt?view=auto&rev=481021
==============================================================================
--- incubator/tuscany/java/testing/sca/itest/propertyTest/src/main/resources/META-INF/sca/fileProperty.txt (added)
+++ incubator/tuscany/java/testing/sca/itest/propertyTest/src/main/resources/META-INF/sca/fileProperty.txt Thu Nov 30 10:09:30 2006
@@ -0,0 +1 @@
+<filePropertyTest>fileValue</filePropertyTest>

Added: incubator/tuscany/java/testing/sca/itest/propertyTest/src/test/java/org/apache/tuscany/sca/itest/PropertyITest.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/testing/sca/itest/propertyTest/src/test/java/org/apache/tuscany/sca/itest/PropertyITest.java?view=auto&rev=481021
==============================================================================
--- incubator/tuscany/java/testing/sca/itest/propertyTest/src/test/java/org/apache/tuscany/sca/itest/PropertyITest.java (added)
+++ incubator/tuscany/java/testing/sca/itest/propertyTest/src/test/java/org/apache/tuscany/sca/itest/PropertyITest.java Thu Nov 30 10:09:30 2006
@@ -0,0 +1,98 @@
+/*
+ * 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.itest;
+
+import junit.framework.TestCase;
+
+import org.apache.tuscany.sca.itest.ABCDComponent;
+import org.apache.tuscany.sca.itest.ABComponent;
+import org.apache.tuscany.sca.itest.CDComponent;
+import org.osoa.sca.CurrentCompositeContext;
+
+public class PropertyITest extends TestCase {
+    private ABComponent abService;
+    private CDComponent cdService;  
+    private ABCDComponent abcdService;
+ //   private PropertyService propertyService;
+       
+
+    public void testA() {
+        assertEquals("a", abService.getA());
+    }
+    
+    public void testB() {
+        assertEquals("b", abService.getB());
+    }
+
+    public void testC() {
+        assertEquals("c", cdService.getC());       
+    }
+    
+    public void testC2() {
+        assertEquals("c", cdService.getC2());
+    }
+    public void testD() {
+        assertEquals("d", cdService.getD());
+    }
+    
+    public void testF() {
+        assertEquals("a", abService.getF());
+    }
+    
+    public void testZ() {
+        assertEquals("z", abService.getZ());
+    }
+    
+    
+    public void testIntValue() {
+        assertEquals(1, abService.getIntValue());
+    }
+    
+    public void testDefaultValue() {
+        assertEquals(1, abService.getIntValue());
+    }
+    
+    public void testDefaultValueOverride() {
+        assertEquals(1, cdService.getOverrideValue());
+    }
+    
+    public void testNoSource() {
+        assertEquals("aValue", cdService.getNoSource());
+    }
+    
+    public void testFileProperty() {
+        assertEquals("fileValue", cdService.getFileProperty());
+    }
+    
+    public void testABCD() {
+        assertEquals("a", abcdService.getA());
+        assertEquals("b", abcdService.getB());
+        assertEquals("c", abcdService.getC());
+        assertEquals("d", abcdService.getD());
+    }
+    
+    protected void setUp() throws Exception {
+        super.setUp();
+        abService = CurrentCompositeContext.getContext().locateService(ABComponent.class, "ABComponent");
+        cdService = CurrentCompositeContext.getContext().locateService(CDComponent.class, "CDComponent");    
+        abcdService = CurrentCompositeContext.getContext().locateService(ABCDComponent.class, "ABCDComponent");
+   //     propertyService = CurrentCompositeContext.getContext().locateService(PropertyService.class, "PropertyService");
+    }
+}



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