diff options
Diffstat (limited to 'sandbox/old/contrib/itest/propertyTest')
23 files changed, 1408 insertions, 0 deletions
diff --git a/sandbox/old/contrib/itest/propertyTest/pom.xml.off b/sandbox/old/contrib/itest/propertyTest/pom.xml.off new file mode 100644 index 0000000000..a8af8b28ea --- /dev/null +++ b/sandbox/old/contrib/itest/propertyTest/pom.xml.off @@ -0,0 +1,40 @@ +<?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>
+ <parent>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>integration-test</artifactId>
+ <version>2.0-alpha-incubating-SNAPSHOT</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.apache.tuscany.sca.integration-test</groupId>
+ <artifactId>propertyTest</artifactId>
+ <packaging>jar</packaging>
+ <name>Integration Test Suite for SCA Properties</name>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.tuscany</groupId>
+ <artifactId>tuscany-itest-plugin</artifactId>
+ </plugin>
+ </plugins>
+ </build>
+</project>
\ No newline at end of file diff --git a/sandbox/old/contrib/itest/propertyTest/src/main/java/org/apache/tuscany/sca/test/property/ABComponent.java b/sandbox/old/contrib/itest/propertyTest/src/main/java/org/apache/tuscany/sca/test/property/ABComponent.java new file mode 100644 index 0000000000..7d7360f678 --- /dev/null +++ b/sandbox/old/contrib/itest/propertyTest/src/main/java/org/apache/tuscany/sca/test/property/ABComponent.java @@ -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.test.property; + +public interface ABComponent { + + String getA(); + String getB(); + String getZ(); + int getIntValue(); + String getF(); +} diff --git a/sandbox/old/contrib/itest/propertyTest/src/main/java/org/apache/tuscany/sca/test/property/ABComponentImpl.java b/sandbox/old/contrib/itest/propertyTest/src/main/java/org/apache/tuscany/sca/test/property/ABComponentImpl.java new file mode 100644 index 0000000000..dc45dbf035 --- /dev/null +++ b/sandbox/old/contrib/itest/propertyTest/src/main/java/org/apache/tuscany/sca/test/property/ABComponentImpl.java @@ -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.test.property; + +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; + } +} diff --git a/sandbox/old/contrib/itest/propertyTest/src/main/java/org/apache/tuscany/sca/test/property/CDComponent.java b/sandbox/old/contrib/itest/propertyTest/src/main/java/org/apache/tuscany/sca/test/property/CDComponent.java new file mode 100644 index 0000000000..b2b776346e --- /dev/null +++ b/sandbox/old/contrib/itest/propertyTest/src/main/java/org/apache/tuscany/sca/test/property/CDComponent.java @@ -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.test.property; + +public interface CDComponent { + + String getC(); + String getC2(); + String getD(); + String getNoSource(); + String getFileProperty(); + int getOverrideValue(); +} diff --git a/sandbox/old/contrib/itest/propertyTest/src/main/java/org/apache/tuscany/sca/test/property/CDComponentImpl.java b/sandbox/old/contrib/itest/propertyTest/src/main/java/org/apache/tuscany/sca/test/property/CDComponentImpl.java new file mode 100644 index 0000000000..f1bf91ef8e --- /dev/null +++ b/sandbox/old/contrib/itest/propertyTest/src/main/java/org/apache/tuscany/sca/test/property/CDComponentImpl.java @@ -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.test.property; + +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; + } +} + diff --git a/sandbox/old/contrib/itest/propertyTest/src/main/java/org/apache/tuscany/sca/test/property/ComplexPropertyBean.java b/sandbox/old/contrib/itest/propertyTest/src/main/java/org/apache/tuscany/sca/test/property/ComplexPropertyBean.java new file mode 100644 index 0000000000..c346b69c30 --- /dev/null +++ b/sandbox/old/contrib/itest/propertyTest/src/main/java/org/apache/tuscany/sca/test/property/ComplexPropertyBean.java @@ -0,0 +1,69 @@ +package org.apache.tuscany.sca.test.property;
+
+public class ComplexPropertyBean {
+
+ protected int integerNumber = 25;
+ public float floatNumber = 50;
+ public double doubleNumber = 75;
+ public int[] intArray = null;
+ public double[] doubleArray = null;
+ protected String[] stringArray = null;
+
+ ComplexPropertyBean numberSet;
+ public ComplexPropertyBean[] numberSetArray = null;
+
+ public ComplexPropertyBean() {
+
+ }
+
+ public double getDoubleNumber() {
+ return doubleNumber;
+ }
+
+ public void setDoubleNumber(double doubleNumber) {
+ this.doubleNumber = doubleNumber;
+ }
+
+ public float getFloatNumber() {
+ return floatNumber;
+ }
+
+ public void setFloatNumber(float floatNumber) {
+ this.floatNumber = floatNumber;
+ }
+
+ public int getIntegerNumber() {
+ return integerNumber;
+ }
+
+ public void setIntegerNumber(int integerNumber) {
+ this.integerNumber = integerNumber;
+ }
+
+ public ComplexPropertyBean getNumberSet() {
+ return numberSet;
+ }
+
+ public void setNumberSet(ComplexPropertyBean numberSet) {
+ this.numberSet = numberSet;
+ }
+
+ public String toString() {
+ return Double.toString(integerNumber) + " - " +
+ Double.toString(floatNumber) + " - " +
+ Double.toString(doubleNumber) + " \n" +
+ ((intArray == null ) ? "no int array" : intArray[0] + " - " + intArray[1] + " \n " ) +
+ ((doubleArray == null ) ? "no double array" : doubleArray[0] + " - " + doubleArray[1] + " \n " ) +
+ ((stringArray == null ) ? "no string array" : stringArray[0] + " - " + stringArray[1] + " \n " ) +
+ ((numberSetArray == null ) ? "no numberset array" : numberSetArray[0] + " - " + numberSetArray[1] + " \n " ) +
+ ((numberSet == null ) ? "" : numberSet.toString());
+ }
+
+ public String[] getStringArray() {
+ return stringArray;
+ }
+
+ public void setStringArray(String[] stringArray) {
+ this.stringArray = stringArray;
+ }
+}
diff --git a/sandbox/old/contrib/itest/propertyTest/src/main/java/org/apache/tuscany/sca/test/property/OverrideService.java b/sandbox/old/contrib/itest/propertyTest/src/main/java/org/apache/tuscany/sca/test/property/OverrideService.java new file mode 100644 index 0000000000..7516c61836 --- /dev/null +++ b/sandbox/old/contrib/itest/propertyTest/src/main/java/org/apache/tuscany/sca/test/property/OverrideService.java @@ -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.test.property; + +public interface OverrideService { + +} diff --git a/sandbox/old/contrib/itest/propertyTest/src/main/java/org/apache/tuscany/sca/test/property/OverrideServiceImpl.java b/sandbox/old/contrib/itest/propertyTest/src/main/java/org/apache/tuscany/sca/test/property/OverrideServiceImpl.java new file mode 100644 index 0000000000..f44263c3f4 --- /dev/null +++ b/sandbox/old/contrib/itest/propertyTest/src/main/java/org/apache/tuscany/sca/test/property/OverrideServiceImpl.java @@ -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.test.property; + +public class OverrideServiceImpl implements OverrideService { + +} diff --git a/sandbox/old/contrib/itest/propertyTest/src/main/java/org/apache/tuscany/sca/test/property/PropertyComponent.java b/sandbox/old/contrib/itest/propertyTest/src/main/java/org/apache/tuscany/sca/test/property/PropertyComponent.java new file mode 100644 index 0000000000..3a77c1fe2f --- /dev/null +++ b/sandbox/old/contrib/itest/propertyTest/src/main/java/org/apache/tuscany/sca/test/property/PropertyComponent.java @@ -0,0 +1,28 @@ +/* + * 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.property; + + +public interface PropertyComponent { + public String getLocation(); + public String getYear(); + public ComplexPropertyBean getComplexPropertyOne(); + public ComplexPropertyBean getComplexPropertyTwo(); +} diff --git a/sandbox/old/contrib/itest/propertyTest/src/main/java/org/apache/tuscany/sca/test/property/PropertyComponentImpl.java b/sandbox/old/contrib/itest/propertyTest/src/main/java/org/apache/tuscany/sca/test/property/PropertyComponentImpl.java new file mode 100644 index 0000000000..e2b331f693 --- /dev/null +++ b/sandbox/old/contrib/itest/propertyTest/src/main/java/org/apache/tuscany/sca/test/property/PropertyComponentImpl.java @@ -0,0 +1,52 @@ +/* + * 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.property; + +import org.osoa.sca.annotations.Property; + +public class PropertyComponentImpl implements PropertyComponent { + @Property + protected ComplexPropertyBean complexPropertyOne; + + @Property + protected ComplexPropertyBean complexPropertyTwo; + + @Property(name = "location") + protected String location = "RTP"; + + @Property(name = "year") + protected String year = "2006"; + + public String getLocation(){ + return location; + } + + public String getYear(){ + return year; + } + + public ComplexPropertyBean getComplexPropertyOne() { + return complexPropertyOne; + } + + public ComplexPropertyBean getComplexPropertyTwo() { + return complexPropertyTwo; + } +} diff --git a/sandbox/old/contrib/itest/propertyTest/src/main/java/org/apache/tuscany/sca/test/property/PropertyService.java b/sandbox/old/contrib/itest/propertyTest/src/main/java/org/apache/tuscany/sca/test/property/PropertyService.java new file mode 100644 index 0000000000..6110283c80 --- /dev/null +++ b/sandbox/old/contrib/itest/propertyTest/src/main/java/org/apache/tuscany/sca/test/property/PropertyService.java @@ -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.test.property; + +public interface PropertyService { + +} diff --git a/sandbox/old/contrib/itest/propertyTest/src/main/java/org/apache/tuscany/sca/test/property/primitives/ConstructorPrimitives.java b/sandbox/old/contrib/itest/propertyTest/src/main/java/org/apache/tuscany/sca/test/property/primitives/ConstructorPrimitives.java new file mode 100644 index 0000000000..e21b31f90d --- /dev/null +++ b/sandbox/old/contrib/itest/propertyTest/src/main/java/org/apache/tuscany/sca/test/property/primitives/ConstructorPrimitives.java @@ -0,0 +1,90 @@ +/* + * 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.property.primitives; + +import org.osoa.sca.annotations.Property; + +/** + * Implementation where all primitive properties are passed in the constructor. + * + * @version $Rev$ $Date$ + */ +public class ConstructorPrimitives implements PrimitiveService { + private boolean booleanValue; + + private byte byteValue; + + private short shortValue; + + private int intValue; + + private long longValue; + + private float floatValue; + + private double doubleValue; + + public ConstructorPrimitives(@Property(name = "booleanValue") boolean booleanValue, + @Property(name = "byteValue") byte byteValue, + @Property(name = "shortValue") short shortValue, + @Property(name = "intValue") int intValue, + @Property(name = "longValue") long longValue, + @Property(name = "floatValue") float floatValue, + @Property(name = "doubleValue") double doubleValue) { + this.booleanValue = booleanValue; + this.byteValue = byteValue; + this.shortValue = shortValue; + this.intValue = intValue; + this.longValue = longValue; + this.floatValue = floatValue; + this.doubleValue = doubleValue; + } + + public boolean isBooleanValue() { + return booleanValue; + } + + public byte getByteValue() { + return byteValue; + } + + public short getShortValue() { + return shortValue; + } + + public int getIntValue() { + return intValue; + } + + public long getLongValue() { + return longValue; + } + + public float getFloatValue() { + return floatValue; + } + + public double getDoubleValue() { + return doubleValue; + } + + public String getImplementationName() { + return getClass().getSimpleName(); + } +} diff --git a/sandbox/old/contrib/itest/propertyTest/src/main/java/org/apache/tuscany/sca/test/property/primitives/PrimitiveService.java b/sandbox/old/contrib/itest/propertyTest/src/main/java/org/apache/tuscany/sca/test/property/primitives/PrimitiveService.java new file mode 100644 index 0000000000..1d599c70a3 --- /dev/null +++ b/sandbox/old/contrib/itest/propertyTest/src/main/java/org/apache/tuscany/sca/test/property/primitives/PrimitiveService.java @@ -0,0 +1,57 @@ +/* + * 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.property.primitives; + +/** + * Service interface for primitive property tests. + * This defines the methods and the values typically returned from a test. + * + * @version $Rev$ $Date$ + */ +public interface PrimitiveService { + String getImplementationName(); + + boolean BOOLEAN_VALUE = true; + + boolean isBooleanValue(); + + byte BYTE_VALUE = 123; + + byte getByteValue(); + + short SHORT_VALUE = 12345; + + short getShortValue(); + + int INT_VALUE = 12345678; + + int getIntValue(); + + long LONG_VALUE = 9876543210L; + + long getLongValue(); + + float FLOAT_VALUE = 1.234e12f; + + float getFloatValue(); + + double DOUBLE_VALUE = 1.23456789e87; + + double getDoubleValue(); +} diff --git a/sandbox/old/contrib/itest/propertyTest/src/main/java/org/apache/tuscany/sca/test/property/primitives/ProtectedFieldPrimitives.java b/sandbox/old/contrib/itest/propertyTest/src/main/java/org/apache/tuscany/sca/test/property/primitives/ProtectedFieldPrimitives.java new file mode 100644 index 0000000000..c2cd13b831 --- /dev/null +++ b/sandbox/old/contrib/itest/propertyTest/src/main/java/org/apache/tuscany/sca/test/property/primitives/ProtectedFieldPrimitives.java @@ -0,0 +1,72 @@ +/* + * 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.property.primitives; + +/** + * Implementation where all primitive properties are private fields. + * + * @version $Rev$ $Date$ + */ +public class ProtectedFieldPrimitives implements PrimitiveService { + protected boolean booleanValue; + + protected byte byteValue; + + protected short shortValue; + + protected int intValue; + + protected long longValue; + + protected float floatValue; + + protected double doubleValue; + + public boolean isBooleanValue() { + return booleanValue; + } + + public byte getByteValue() { + return byteValue; + } + + public short getShortValue() { + return shortValue; + } + + public int getIntValue() { + return intValue; + } + + public long getLongValue() { + return longValue; + } + + public float getFloatValue() { + return floatValue; + } + + public double getDoubleValue() { + return doubleValue; + } + + public String getImplementationName() { + return getClass().getSimpleName(); + } +} diff --git a/sandbox/old/contrib/itest/propertyTest/src/main/java/org/apache/tuscany/sca/test/property/primitives/ProtectedSetterPrimitives.java b/sandbox/old/contrib/itest/propertyTest/src/main/java/org/apache/tuscany/sca/test/property/primitives/ProtectedSetterPrimitives.java new file mode 100644 index 0000000000..7cbb0c1371 --- /dev/null +++ b/sandbox/old/contrib/itest/propertyTest/src/main/java/org/apache/tuscany/sca/test/property/primitives/ProtectedSetterPrimitives.java @@ -0,0 +1,100 @@ +/* + * 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.property.primitives; + +/** + * Implementation where all primitive properties are passed in using protected setter methods. + * + * @version $Rev$ $Date$ + */ +public class ProtectedSetterPrimitives implements PrimitiveService { + protected boolean booleanValue; + + protected byte byteValue; + + protected short shortValue; + + protected int intValue; + + protected long longValue; + + protected float floatValue; + + protected double doubleValue; + + public void setBooleanValue(boolean booleanValue) { + this.booleanValue = booleanValue; + } + + public void setByteValue(byte byteValue) { + this.byteValue = byteValue; + } + + public void setShortValue(short shortValue) { + this.shortValue = shortValue; + } + + public void setIntValue(int intValue) { + this.intValue = intValue; + } + + public void setLongValue(long longValue) { + this.longValue = longValue; + } + + public void setFloatValue(float floatValue) { + this.floatValue = floatValue; + } + + public void setDoubleValue(double doubleValue) { + this.doubleValue = doubleValue; + } + + public boolean isBooleanValue() { + return booleanValue; + } + + public byte getByteValue() { + return byteValue; + } + + public short getShortValue() { + return shortValue; + } + + public int getIntValue() { + return intValue; + } + + public long getLongValue() { + return longValue; + } + + public float getFloatValue() { + return floatValue; + } + + public double getDoubleValue() { + return doubleValue; + } + + public String getImplementationName() { + return getClass().getSimpleName(); + } +} diff --git a/sandbox/old/contrib/itest/propertyTest/src/main/java/org/apache/tuscany/sca/test/property/primitives/PublicFieldPrimitives.java b/sandbox/old/contrib/itest/propertyTest/src/main/java/org/apache/tuscany/sca/test/property/primitives/PublicFieldPrimitives.java new file mode 100644 index 0000000000..a38875b82a --- /dev/null +++ b/sandbox/old/contrib/itest/propertyTest/src/main/java/org/apache/tuscany/sca/test/property/primitives/PublicFieldPrimitives.java @@ -0,0 +1,72 @@ +/* + * 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.property.primitives; + +/** + * Implementation where all primitive properties are private fields. + * + * @version $Rev$ $Date$ + */ +public class PublicFieldPrimitives implements PrimitiveService { + public boolean booleanValue; + + public byte byteValue; + + public short shortValue; + + public int intValue; + + public long longValue; + + public float floatValue; + + public double doubleValue; + + public boolean isBooleanValue() { + return booleanValue; + } + + public byte getByteValue() { + return byteValue; + } + + public short getShortValue() { + return shortValue; + } + + public int getIntValue() { + return intValue; + } + + public long getLongValue() { + return longValue; + } + + public float getFloatValue() { + return floatValue; + } + + public double getDoubleValue() { + return doubleValue; + } + + public String getImplementationName() { + return getClass().getSimpleName(); + } +} diff --git a/sandbox/old/contrib/itest/propertyTest/src/main/java/org/apache/tuscany/sca/test/property/primitives/PublicSetterPrimitives.java b/sandbox/old/contrib/itest/propertyTest/src/main/java/org/apache/tuscany/sca/test/property/primitives/PublicSetterPrimitives.java new file mode 100644 index 0000000000..e7b527ba63 --- /dev/null +++ b/sandbox/old/contrib/itest/propertyTest/src/main/java/org/apache/tuscany/sca/test/property/primitives/PublicSetterPrimitives.java @@ -0,0 +1,100 @@ +/* + * 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.property.primitives; + +/** + * Implementation where all primitive properties are passed in using public setter methods. + * + * @version $Rev$ $Date$ + */ +public class PublicSetterPrimitives implements PrimitiveService { + private boolean booleanValue; + + private byte byteValue; + + private short shortValue; + + private int intValue; + + private long longValue; + + private float floatValue; + + private double doubleValue; + + public void setBooleanValue(boolean booleanValue) { + this.booleanValue = booleanValue; + } + + public void setByteValue(byte byteValue) { + this.byteValue = byteValue; + } + + public void setShortValue(short shortValue) { + this.shortValue = shortValue; + } + + public void setIntValue(int intValue) { + this.intValue = intValue; + } + + public void setLongValue(long longValue) { + this.longValue = longValue; + } + + public void setFloatValue(float floatValue) { + this.floatValue = floatValue; + } + + public void setDoubleValue(double doubleValue) { + this.doubleValue = doubleValue; + } + + public boolean isBooleanValue() { + return booleanValue; + } + + public byte getByteValue() { + return byteValue; + } + + public short getShortValue() { + return shortValue; + } + + public int getIntValue() { + return intValue; + } + + public long getLongValue() { + return longValue; + } + + public float getFloatValue() { + return floatValue; + } + + public double getDoubleValue() { + return doubleValue; + } + + public String getImplementationName() { + return getClass().getSimpleName(); + } +} diff --git a/sandbox/old/contrib/itest/propertyTest/src/main/resources/META-INF/sca/default.scdl b/sandbox/old/contrib/itest/propertyTest/src/main/resources/META-INF/sca/default.scdl new file mode 100644 index 0000000000..9eb0b0f126 --- /dev/null +++ b/sandbox/old/contrib/itest/propertyTest/src/main/resources/META-INF/sca/default.scdl @@ -0,0 +1,117 @@ +<?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="PropertyTestComposite"> + + <include name="PrimitivesTestComposite" scdlLocation="primitives.scdl"/> + + <!-- + <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> + + <property name="moreComplex" type="foo:MyMoreComplexType"> + <foo:stringArray>TestString_1</foo:stringArray> + <foo:stringArray>TestString_2</foo:stringArray> + <foo:intArray>10</foo:intArray> + <foo:integerNumber>27</foo:integerNumber> + <foo:floatNumber>79.34</foo:floatNumber> + <foo:doubleArray>25.52</foo:doubleArray> + <foo:doubleNumber>184.52</foo:doubleNumber> + <foo:doubleArray>50.05</foo:doubleArray> + <foo:intArray>20</foo:intArray> + <foo:numberSetArray> + <foo:integerNumber>1</foo:integerNumber> + <foo:floatNumber>11</foo:floatNumber> + <foo:doubleNumber>111</foo:doubleNumber> + </foo:numberSetArray> + <foo:numberSetArray> + <foo:integerNumber>2</foo:integerNumber> + <foo:floatNumber>22</foo:floatNumber> + <foo:doubleNumber>222</foo:doubleNumber> + </foo:numberSetArray> + <foo:numberSet> + <foo:integerNumber>54</foo:integerNumber> + <foo:floatNumber>158.68</foo:floatNumber> + <foo:doubleNumber>369.04</foo:doubleNumber> + </foo:numberSet> + </property> + + <component name="ABComponent"> + <implementation.java class="org.apache.tuscany.sca.test.property.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.test.property.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="PropertyComponent"> + <implementation.java class="org.apache.tuscany.sca.test.property.PropertyComponentImpl"/> + <property name="complexPropertyOne" source="$moreComplex"></property> + <property name="complexPropertyTwo"> + <foo:stringArray>TestString_1</foo:stringArray> + <foo:stringArray>TestString_2</foo:stringArray> + <foo:intArray>10</foo:intArray> + <foo:integerNumber>27</foo:integerNumber> + <foo:floatNumber>79.34</foo:floatNumber> + <foo:doubleArray>25.52</foo:doubleArray> + <foo:doubleNumber>184.52</foo:doubleNumber> + <foo:doubleArray>50.05</foo:doubleArray> + <foo:intArray>20</foo:intArray> + <foo:numberSetArray> + <foo:integerNumber>1</foo:integerNumber> + <foo:floatNumber>11</foo:floatNumber> + <foo:doubleNumber>111</foo:doubleNumber> + </foo:numberSetArray> + <foo:numberSetArray> + <foo:integerNumber>2</foo:integerNumber> + <foo:floatNumber>22</foo:floatNumber> + <foo:doubleNumber>222</foo:doubleNumber> + </foo:numberSetArray> + <foo:numberSet> + <foo:integerNumber>54</foo:integerNumber> + <foo:floatNumber>158.68</foo:floatNumber> + <foo:doubleNumber>369.04</foo:doubleNumber> + </foo:numberSet> + </property> + </component> +--> +</composite> diff --git a/sandbox/old/contrib/itest/propertyTest/src/main/resources/META-INF/sca/fileProperty.txt b/sandbox/old/contrib/itest/propertyTest/src/main/resources/META-INF/sca/fileProperty.txt new file mode 100644 index 0000000000..c530ae892d --- /dev/null +++ b/sandbox/old/contrib/itest/propertyTest/src/main/resources/META-INF/sca/fileProperty.txt @@ -0,0 +1 @@ +<filePropertyTest>fileValue</filePropertyTest> diff --git a/sandbox/old/contrib/itest/propertyTest/src/main/resources/META-INF/sca/primitives.scdl b/sandbox/old/contrib/itest/propertyTest/src/main/resources/META-INF/sca/primitives.scdl new file mode 100644 index 0000000000..9a47ffc74b --- /dev/null +++ b/sandbox/old/contrib/itest/propertyTest/src/main/resources/META-INF/sca/primitives.scdl @@ -0,0 +1,78 @@ +<?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="PrimitivesTestComposite"> + + <component name='ConstructorPrimitives'> + <implementation.java class='org.apache.tuscany.sca.test.property.primitives.ConstructorPrimitives'/> + <property name='booleanValue'>true</property> + <property name='byteValue'>123</property> + <property name='shortValue'>12345</property> + <property name='intValue'>12345678</property> + <property name='longValue'>9876543210</property> + <property name='floatValue'>1.234e12</property> + <property name='doubleValue'>1.23456789e87</property> + </component> + + <component name='PublicFieldPrimitives'> + <implementation.java class='org.apache.tuscany.sca.test.property.primitives.PublicFieldPrimitives'/> + <property name='booleanValue'>true</property> + <property name='byteValue'>123</property> + <property name='shortValue'>12345</property> + <property name='intValue'>12345678</property> + <property name='longValue'>9876543210</property> + <property name='floatValue'>1.234e12</property> + <property name='doubleValue'>1.23456789e87</property> + </component> + + <component name='ProtectedFieldPrimitives'> + <implementation.java class='org.apache.tuscany.sca.test.property.primitives.ProtectedFieldPrimitives'/> + <property name='booleanValue'>true</property> + <property name='byteValue'>123</property> + <property name='shortValue'>12345</property> + <property name='intValue'>12345678</property> + <property name='longValue'>9876543210</property> + <property name='floatValue'>1.234e12</property> + <property name='doubleValue'>1.23456789e87</property> + </component> + + <component name='PublicSetterPrimitives'> + <implementation.java class='org.apache.tuscany.sca.test.property.primitives.PublicSetterPrimitives'/> + <property name='booleanValue'>true</property> + <property name='byteValue'>123</property> + <property name='shortValue'>12345</property> + <property name='intValue'>12345678</property> + <property name='longValue'>9876543210</property> + <property name='floatValue'>1.234e12</property> + <property name='doubleValue'>1.23456789e87</property> + </component> + + <component name='ProtectedSetterPrimitives'> + <implementation.java class='org.apache.tuscany.sca.test.property.primitives.ProtectedSetterPrimitives'/> + <property name='booleanValue'>true</property> + <property name='byteValue'>123</property> + <property name='shortValue'>12345</property> + <property name='intValue'>12345678</property> + <property name='longValue'>9876543210</property> + <property name='floatValue'>1.234e12</property> + <property name='doubleValue'>1.23456789e87</property> + </component> +</composite> diff --git a/sandbox/old/contrib/itest/propertyTest/src/test/java/org/apache/tuscany/sca/test/property/PropertyTestComponent.java b/sandbox/old/contrib/itest/propertyTest/src/test/java/org/apache/tuscany/sca/test/property/PropertyTestComponent.java new file mode 100644 index 0000000000..954fd456d7 --- /dev/null +++ b/sandbox/old/contrib/itest/propertyTest/src/test/java/org/apache/tuscany/sca/test/property/PropertyTestComponent.java @@ -0,0 +1,100 @@ +/* + * 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.property; + +import junit.framework.TestCase; +import org.osoa.sca.annotations.Reference; + +public class PropertyTestComponent extends TestCase { + @Reference + public ABComponent abService; + @Reference + public CDComponent cdService; + @Reference + public PropertyComponent 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 testDefaultProperty() { + assertEquals("RTP", propertyService.getLocation()); + assertEquals("2006", propertyService.getYear()); + + } + + public void testComplexProperty() { + ComplexPropertyBean propBean = propertyService.getComplexPropertyOne(); + assertNotNull(propBean); + assertEquals("TestString_1", propBean.getStringArray()[0]); + assertEquals(2, propBean.numberSetArray[1].integerNumber); + + propBean = propertyService.getComplexPropertyTwo(); + assertNotNull(propBean); + assertEquals(10, propBean.intArray[0]); + assertEquals((float) 22, propBean.numberSetArray[1].floatNumber); + } +} diff --git a/sandbox/old/contrib/itest/propertyTest/src/test/java/org/apache/tuscany/sca/test/property/primitives/PrimitiveTestComponent.java b/sandbox/old/contrib/itest/propertyTest/src/test/java/org/apache/tuscany/sca/test/property/primitives/PrimitiveTestComponent.java new file mode 100644 index 0000000000..f26e1d341a --- /dev/null +++ b/sandbox/old/contrib/itest/propertyTest/src/test/java/org/apache/tuscany/sca/test/property/primitives/PrimitiveTestComponent.java @@ -0,0 +1,68 @@ +/* + * 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.property.primitives; + +import org.osoa.sca.annotations.Reference; +import org.osoa.sca.annotations.Property; +import junit.framework.TestCase; + +/** + * Test component for checking primitive property values. + * + * @version $Rev$ $Date$ + */ +public class PrimitiveTestComponent extends TestCase { + @Reference + public PrimitiveService primitives; + + @Property + public String expectedImplementation; + + public void testExpectedImplementation() { + assertEquals(expectedImplementation, primitives.getImplementationName()); + } + + public void testBoolean() { + assertEquals(PrimitiveService.BOOLEAN_VALUE, primitives.isBooleanValue()); + } + + public void testByte() { + assertEquals(PrimitiveService.BYTE_VALUE, primitives.getByteValue()); + } + + public void testShort() { + assertEquals(PrimitiveService.SHORT_VALUE, primitives.getShortValue()); + } + + public void testInt() { + assertEquals(PrimitiveService.INT_VALUE, primitives.getIntValue()); + } + + public void testLong() { + assertEquals(PrimitiveService.LONG_VALUE, primitives.getLongValue()); + } + + public void testFloat() { + assertEquals(PrimitiveService.FLOAT_VALUE, primitives.getFloatValue()); + } + + public void testDouble() { + assertEquals(PrimitiveService.DOUBLE_VALUE, primitives.getDoubleValue()); + } +} diff --git a/sandbox/old/contrib/itest/propertyTest/src/test/resources/itest.scdl b/sandbox/old/contrib/itest/propertyTest/src/test/resources/itest.scdl new file mode 100644 index 0000000000..cfc9c11351 --- /dev/null +++ b/sandbox/old/contrib/itest/propertyTest/src/test/resources/itest.scdl @@ -0,0 +1,65 @@ +<?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:tuscany="http://tuscany.apache.org/xmlns/sca/2.0-alpha" + name="PropertyTestHarnessComposite"> + + <include name="PropertyTestComposite" scdlResource="META-INF/sca/default.scdl"/> + + <component name="testConstructorPrimitives"> + <tuscany:junit class="org.apache.tuscany.sca.test.property.primitives.PrimitiveTestComponent"/> + <reference name="primitives" target="ConstructorPrimitives"/> + <property name='expectedImplementation'>ConstructorPrimitives</property> + </component> + + <component name="testPublicFieldPrimitives"> + <tuscany:junit class="org.apache.tuscany.sca.test.property.primitives.PrimitiveTestComponent"/> + <reference name="primitives" target="PublicFieldPrimitives"/> + <property name='expectedImplementation'>PublicFieldPrimitives</property> + </component> + + <component name="testProtectedFieldPrimitives"> + <tuscany:junit class="org.apache.tuscany.sca.test.property.primitives.PrimitiveTestComponent"/> + <reference name="primitives" target="ProtectedFieldPrimitives"/> + <property name='expectedImplementation'>ProtectedFieldPrimitives</property> + </component> + + <component name="testPublicSetterPrimitives"> + <tuscany:junit class="org.apache.tuscany.sca.test.property.primitives.PrimitiveTestComponent"/> + <reference name="primitives" target="PublicSetterPrimitives"/> + <property name='expectedImplementation'>PublicSetterPrimitives</property> + </component> + + <component name="testProtectedSetterPrimitives"> + <tuscany:junit class="org.apache.tuscany.sca.test.property.primitives.PrimitiveTestComponent"/> + <reference name="primitives" target="ProtectedSetterPrimitives"/> + <property name='expectedImplementation'>ProtectedSetterPrimitives</property> + </component> + + <!-- + <component name="testComponent"> + <tuscany:junit class="org.apache.tuscany.sca.test.property.PropertyTestComponent"/> + <reference name="abService" target="ABComponent"/> + <reference name="cdService" target="CDComponent"/> + <reference name="abcdService" target="ABCDComponent"/> + <reference name="propertyService" target="PropertyComponent"/> + </component> +--> +</composite> |