You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by jb...@apache.org on 2007/02/13 03:17:25 UTC
svn commit: r506814 - in
/incubator/tuscany/java/sca/integration-test/propertyTest: ./
src/main/java/org/apache/tuscany/sca/test/property/primitives/
src/main/resources/META-INF/sca/
src/test/java/org/apache/tuscany/sca/test/property/primitives/ src/te...
Author: jboynes
Date: Mon Feb 12 18:17:24 2007
New Revision: 506814
URL: http://svn.apache.org/viewvc?view=rev&rev=506814
Log:
add tests for primitive properties
Added:
incubator/tuscany/java/sca/integration-test/propertyTest/src/main/java/org/apache/tuscany/sca/test/property/primitives/
incubator/tuscany/java/sca/integration-test/propertyTest/src/main/java/org/apache/tuscany/sca/test/property/primitives/ConstructorPrimitives.java (with props)
incubator/tuscany/java/sca/integration-test/propertyTest/src/main/java/org/apache/tuscany/sca/test/property/primitives/PrimitiveService.java (with props)
incubator/tuscany/java/sca/integration-test/propertyTest/src/main/java/org/apache/tuscany/sca/test/property/primitives/ProtectedFieldPrimitives.java (with props)
incubator/tuscany/java/sca/integration-test/propertyTest/src/main/java/org/apache/tuscany/sca/test/property/primitives/ProtectedSetterPrimitives.java (with props)
incubator/tuscany/java/sca/integration-test/propertyTest/src/main/java/org/apache/tuscany/sca/test/property/primitives/PublicFieldPrimitives.java (with props)
incubator/tuscany/java/sca/integration-test/propertyTest/src/main/java/org/apache/tuscany/sca/test/property/primitives/PublicSetterPrimitives.java (with props)
incubator/tuscany/java/sca/integration-test/propertyTest/src/main/resources/META-INF/sca/primitives.scdl (with props)
incubator/tuscany/java/sca/integration-test/propertyTest/src/test/java/org/apache/tuscany/sca/test/property/primitives/
incubator/tuscany/java/sca/integration-test/propertyTest/src/test/java/org/apache/tuscany/sca/test/property/primitives/PrimitiveTestComponent.java (with props)
Modified:
incubator/tuscany/java/sca/integration-test/propertyTest/pom.xml
incubator/tuscany/java/sca/integration-test/propertyTest/src/main/resources/META-INF/sca/default.scdl
incubator/tuscany/java/sca/integration-test/propertyTest/src/test/resources/itest.scdl
Modified: incubator/tuscany/java/sca/integration-test/propertyTest/pom.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/integration-test/propertyTest/pom.xml?view=diff&rev=506814&r1=506813&r2=506814
==============================================================================
--- incubator/tuscany/java/sca/integration-test/propertyTest/pom.xml (original)
+++ incubator/tuscany/java/sca/integration-test/propertyTest/pom.xml Mon Feb 12 18:17:24 2007
@@ -40,6 +40,7 @@
</dependencies>
<build>
+ <defaultGoal>verify</defaultGoal>
<plugins>
<plugin>
<groupId>org.apache.tuscany.sca</groupId>
Added: incubator/tuscany/java/sca/integration-test/propertyTest/src/main/java/org/apache/tuscany/sca/test/property/primitives/ConstructorPrimitives.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/integration-test/propertyTest/src/main/java/org/apache/tuscany/sca/test/property/primitives/ConstructorPrimitives.java?view=auto&rev=506814
==============================================================================
--- incubator/tuscany/java/sca/integration-test/propertyTest/src/main/java/org/apache/tuscany/sca/test/property/primitives/ConstructorPrimitives.java (added)
+++ incubator/tuscany/java/sca/integration-test/propertyTest/src/main/java/org/apache/tuscany/sca/test/property/primitives/ConstructorPrimitives.java Mon Feb 12 18:17:24 2007
@@ -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();
+ }
+}
Propchange: incubator/tuscany/java/sca/integration-test/propertyTest/src/main/java/org/apache/tuscany/sca/test/property/primitives/ConstructorPrimitives.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sca/integration-test/propertyTest/src/main/java/org/apache/tuscany/sca/test/property/primitives/ConstructorPrimitives.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: incubator/tuscany/java/sca/integration-test/propertyTest/src/main/java/org/apache/tuscany/sca/test/property/primitives/PrimitiveService.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/integration-test/propertyTest/src/main/java/org/apache/tuscany/sca/test/property/primitives/PrimitiveService.java?view=auto&rev=506814
==============================================================================
--- incubator/tuscany/java/sca/integration-test/propertyTest/src/main/java/org/apache/tuscany/sca/test/property/primitives/PrimitiveService.java (added)
+++ incubator/tuscany/java/sca/integration-test/propertyTest/src/main/java/org/apache/tuscany/sca/test/property/primitives/PrimitiveService.java Mon Feb 12 18:17:24 2007
@@ -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();
+}
Propchange: incubator/tuscany/java/sca/integration-test/propertyTest/src/main/java/org/apache/tuscany/sca/test/property/primitives/PrimitiveService.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sca/integration-test/propertyTest/src/main/java/org/apache/tuscany/sca/test/property/primitives/PrimitiveService.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: incubator/tuscany/java/sca/integration-test/propertyTest/src/main/java/org/apache/tuscany/sca/test/property/primitives/ProtectedFieldPrimitives.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/integration-test/propertyTest/src/main/java/org/apache/tuscany/sca/test/property/primitives/ProtectedFieldPrimitives.java?view=auto&rev=506814
==============================================================================
--- incubator/tuscany/java/sca/integration-test/propertyTest/src/main/java/org/apache/tuscany/sca/test/property/primitives/ProtectedFieldPrimitives.java (added)
+++ incubator/tuscany/java/sca/integration-test/propertyTest/src/main/java/org/apache/tuscany/sca/test/property/primitives/ProtectedFieldPrimitives.java Mon Feb 12 18:17:24 2007
@@ -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();
+ }
+}
Propchange: incubator/tuscany/java/sca/integration-test/propertyTest/src/main/java/org/apache/tuscany/sca/test/property/primitives/ProtectedFieldPrimitives.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sca/integration-test/propertyTest/src/main/java/org/apache/tuscany/sca/test/property/primitives/ProtectedFieldPrimitives.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: incubator/tuscany/java/sca/integration-test/propertyTest/src/main/java/org/apache/tuscany/sca/test/property/primitives/ProtectedSetterPrimitives.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/integration-test/propertyTest/src/main/java/org/apache/tuscany/sca/test/property/primitives/ProtectedSetterPrimitives.java?view=auto&rev=506814
==============================================================================
--- incubator/tuscany/java/sca/integration-test/propertyTest/src/main/java/org/apache/tuscany/sca/test/property/primitives/ProtectedSetterPrimitives.java (added)
+++ incubator/tuscany/java/sca/integration-test/propertyTest/src/main/java/org/apache/tuscany/sca/test/property/primitives/ProtectedSetterPrimitives.java Mon Feb 12 18:17:24 2007
@@ -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();
+ }
+}
Propchange: incubator/tuscany/java/sca/integration-test/propertyTest/src/main/java/org/apache/tuscany/sca/test/property/primitives/ProtectedSetterPrimitives.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sca/integration-test/propertyTest/src/main/java/org/apache/tuscany/sca/test/property/primitives/ProtectedSetterPrimitives.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: incubator/tuscany/java/sca/integration-test/propertyTest/src/main/java/org/apache/tuscany/sca/test/property/primitives/PublicFieldPrimitives.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/integration-test/propertyTest/src/main/java/org/apache/tuscany/sca/test/property/primitives/PublicFieldPrimitives.java?view=auto&rev=506814
==============================================================================
--- incubator/tuscany/java/sca/integration-test/propertyTest/src/main/java/org/apache/tuscany/sca/test/property/primitives/PublicFieldPrimitives.java (added)
+++ incubator/tuscany/java/sca/integration-test/propertyTest/src/main/java/org/apache/tuscany/sca/test/property/primitives/PublicFieldPrimitives.java Mon Feb 12 18:17:24 2007
@@ -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();
+ }
+}
Propchange: incubator/tuscany/java/sca/integration-test/propertyTest/src/main/java/org/apache/tuscany/sca/test/property/primitives/PublicFieldPrimitives.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sca/integration-test/propertyTest/src/main/java/org/apache/tuscany/sca/test/property/primitives/PublicFieldPrimitives.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: incubator/tuscany/java/sca/integration-test/propertyTest/src/main/java/org/apache/tuscany/sca/test/property/primitives/PublicSetterPrimitives.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/integration-test/propertyTest/src/main/java/org/apache/tuscany/sca/test/property/primitives/PublicSetterPrimitives.java?view=auto&rev=506814
==============================================================================
--- incubator/tuscany/java/sca/integration-test/propertyTest/src/main/java/org/apache/tuscany/sca/test/property/primitives/PublicSetterPrimitives.java (added)
+++ incubator/tuscany/java/sca/integration-test/propertyTest/src/main/java/org/apache/tuscany/sca/test/property/primitives/PublicSetterPrimitives.java Mon Feb 12 18:17:24 2007
@@ -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();
+ }
+}
Propchange: incubator/tuscany/java/sca/integration-test/propertyTest/src/main/java/org/apache/tuscany/sca/test/property/primitives/PublicSetterPrimitives.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sca/integration-test/propertyTest/src/main/java/org/apache/tuscany/sca/test/property/primitives/PublicSetterPrimitives.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Modified: incubator/tuscany/java/sca/integration-test/propertyTest/src/main/resources/META-INF/sca/default.scdl
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/integration-test/propertyTest/src/main/resources/META-INF/sca/default.scdl?view=diff&rev=506814&r1=506813&r2=506814
==============================================================================
--- incubator/tuscany/java/sca/integration-test/propertyTest/src/main/resources/META-INF/sca/default.scdl (original)
+++ incubator/tuscany/java/sca/integration-test/propertyTest/src/main/resources/META-INF/sca/default.scdl Mon Feb 12 18:17:24 2007
@@ -21,8 +21,9 @@
xmlns:foo="http://foo"
name="PropertyTestComposite">
- <!-- <property name="manyValued" type="xsd:string" many="true"/> -->
+ <include name="PrimitivesTestComposite" scdlLocation="primitives.scdl"/>
+ <!--
<property name="number" type="xsd:int">1</property>
<property name="complex" type="foo:MyComplexType">
@@ -118,9 +119,5 @@
</foo:numberSet>
</property>
</component>
-
- <!-- <component name="Override">
- <implementation.composite name="OverrideComposite" scdlLocation="override.scdl"/>
- </component>
- -->
+-->
</composite>
Added: incubator/tuscany/java/sca/integration-test/propertyTest/src/main/resources/META-INF/sca/primitives.scdl
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/integration-test/propertyTest/src/main/resources/META-INF/sca/primitives.scdl?view=auto&rev=506814
==============================================================================
--- incubator/tuscany/java/sca/integration-test/propertyTest/src/main/resources/META-INF/sca/primitives.scdl (added)
+++ incubator/tuscany/java/sca/integration-test/propertyTest/src/main/resources/META-INF/sca/primitives.scdl Mon Feb 12 18:17:24 2007
@@ -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>
Propchange: incubator/tuscany/java/sca/integration-test/propertyTest/src/main/resources/META-INF/sca/primitives.scdl
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sca/integration-test/propertyTest/src/main/resources/META-INF/sca/primitives.scdl
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: incubator/tuscany/java/sca/integration-test/propertyTest/src/test/java/org/apache/tuscany/sca/test/property/primitives/PrimitiveTestComponent.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/integration-test/propertyTest/src/test/java/org/apache/tuscany/sca/test/property/primitives/PrimitiveTestComponent.java?view=auto&rev=506814
==============================================================================
--- incubator/tuscany/java/sca/integration-test/propertyTest/src/test/java/org/apache/tuscany/sca/test/property/primitives/PrimitiveTestComponent.java (added)
+++ incubator/tuscany/java/sca/integration-test/propertyTest/src/test/java/org/apache/tuscany/sca/test/property/primitives/PrimitiveTestComponent.java Mon Feb 12 18:17:24 2007
@@ -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());
+ }
+}
Propchange: incubator/tuscany/java/sca/integration-test/propertyTest/src/test/java/org/apache/tuscany/sca/test/property/primitives/PrimitiveTestComponent.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sca/integration-test/propertyTest/src/test/java/org/apache/tuscany/sca/test/property/primitives/PrimitiveTestComponent.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Modified: incubator/tuscany/java/sca/integration-test/propertyTest/src/test/resources/itest.scdl
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/integration-test/propertyTest/src/test/resources/itest.scdl?view=diff&rev=506814&r1=506813&r2=506814
==============================================================================
--- incubator/tuscany/java/sca/integration-test/propertyTest/src/test/resources/itest.scdl (original)
+++ incubator/tuscany/java/sca/integration-test/propertyTest/src/test/resources/itest.scdl Mon Feb 12 18:17:24 2007
@@ -23,8 +23,43 @@
<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">ConstructorPrimitives</reference>
+ <property name='expectedImplementation'>ConstructorPrimitives</property>
+ </component>
+
+ <component name="testPublicFieldPrimitives">
+ <tuscany:junit class="org.apache.tuscany.sca.test.property.primitives.PrimitiveTestComponent"/>
+ <reference name="primitives">PublicFieldPrimitives</reference>
+ <property name='expectedImplementation'>PublicFieldPrimitives</property>
+ </component>
+
+ <component name="testProtectedFieldPrimitives">
+ <tuscany:junit class="org.apache.tuscany.sca.test.property.primitives.PrimitiveTestComponent"/>
+ <reference name="primitives">ProtectedFieldPrimitives</reference>
+ <property name='expectedImplementation'>ProtectedFieldPrimitives</property>
+ </component>
+
+ <component name="testPublicSetterPrimitives">
+ <tuscany:junit class="org.apache.tuscany.sca.test.property.primitives.PrimitiveTestComponent"/>
+ <reference name="primitives">PublicSetterPrimitives</reference>
+ <property name='expectedImplementation'>PublicSetterPrimitives</property>
+ </component>
+
+ <component name="testProtectedSetterPrimitives">
+ <tuscany:junit class="org.apache.tuscany.sca.test.property.primitives.PrimitiveTestComponent"/>
+ <reference name="primitives">ProtectedSetterPrimitives</reference>
+ <property name='expectedImplementation'>ProtectedSetterPrimitives</property>
+ </component>
+
+ <!--
<component name="testComponent">
- <tuscany:junit class="calculator.CalculatorTestComponent"/>
- <reference name="calculatorService">CalculatorServiceComponent</reference>
+ <tuscany:junit class="org.apache.tuscany.sca.test.property.PropertyTestComponent"/>
+ <reference name="abService">ABComponent</reference>
+ <reference name="cdService">CDComponent</reference>
+ <reference name="abcdService">ABCDComponent</reference>
+ <reference name="propertyService">PropertyComponent</reference>
</component>
+-->
</composite>
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org