You are viewing a plain text version of this content. The canonical link for it is here.
Posted to yoko-commits@incubator.apache.org by br...@apache.org on 2007/02/01 16:09:59 UTC
svn commit: r502258 - in /incubator/yoko/trunk/bindings/src/test:
java/org/apache/yoko/bindings/corba/AbstractTypeTestClient.java
java/org/apache/yoko/bindings/corba/CorbaTypeTest.java
resources/wsdl/type_test/type_test.xsd
Author: bravi
Date: Thu Feb 1 08:09:59 2007
New Revision: 502258
URL: http://svn.apache.org/viewvc?view=rev&rev=502258
Log:
[YOKO-170] - Enabling the simple type enum types in the corba binding type test.
Modified:
incubator/yoko/trunk/bindings/src/test/java/org/apache/yoko/bindings/corba/AbstractTypeTestClient.java
incubator/yoko/trunk/bindings/src/test/java/org/apache/yoko/bindings/corba/CorbaTypeTest.java
incubator/yoko/trunk/bindings/src/test/resources/wsdl/type_test/type_test.xsd
Modified: incubator/yoko/trunk/bindings/src/test/java/org/apache/yoko/bindings/corba/AbstractTypeTestClient.java
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/bindings/src/test/java/org/apache/yoko/bindings/corba/AbstractTypeTestClient.java?view=diff&rev=502258&r1=502257&r2=502258
==============================================================================
--- incubator/yoko/trunk/bindings/src/test/java/org/apache/yoko/bindings/corba/AbstractTypeTestClient.java (original)
+++ incubator/yoko/trunk/bindings/src/test/java/org/apache/yoko/bindings/corba/AbstractTypeTestClient.java Thu Feb 1 08:09:59 2007
@@ -35,10 +35,7 @@
import org.apache.type_test.corba.TypeTestTester;
import org.apache.type_test.corba.CORBAService;
-import org.apache.type_test.types1.AnyURIEnum;
-import org.apache.type_test.types1.DecimalEnum;
import org.apache.type_test.types1.NMTokenEnum;
-import org.apache.type_test.types1.NumberEnum;
import org.apache.type_test.types1.StringEnum;
import junit.framework.TestCase;
@@ -874,35 +871,11 @@
}
}
*/
- }
-
- public void testNumberEnum() throws Exception {
- int[] xx = {1, 2, 3};
- int[] yy = {3, 1, 2};
-
- Holder<NumberEnum> z = new Holder<NumberEnum>();
-
- for (int i = 0; i < 3; i++) {
- NumberEnum x = NumberEnum.fromValue(xx[i]);
- NumberEnum yOrig = NumberEnum.fromValue(yy[i]);
- Holder<NumberEnum> y = new Holder<NumberEnum>(yOrig);
-
- NumberEnum ret = client.testNumberEnum(x, y, z);
-
- if (!perfTestOnly) {
- assertEquals("testNumberEnum(): Incorrect value for inout param",
- x.value(), y.value.value());
- assertEquals("testNumberEnum(): Incorrect value for out param",
- yOrig.value(), z.value.value());
- assertEquals("testNumberEnum(): Incorrect return value",
- x.value(), ret.value());
- }
- }
- }
+ }
public void testStringEnum() throws Exception {
- String[] xx = {"a b c", "d e f", "g h i"};
- String[] yy = {"g h i", "a b c", "d e f"};
+ String[] xx = {"abc", "def", "ghi"};
+ String[] yy = {"ghi", "abc", "def"};
Holder<StringEnum> z = new Holder<StringEnum>();
for (int i = 0; i < 3; i++) {
@@ -921,35 +894,7 @@
x.value(), ret.value());
}
}
- }
-
- public void testDecimalEnum() throws Exception {
- BigDecimal[] xx = {new BigDecimal("-10.34"),
- new BigDecimal("11.22"),
- new BigDecimal("14.55")};
- BigDecimal[] yy = {new BigDecimal("14.55"),
- new BigDecimal("-10.34"),
- new BigDecimal("11.22")};
-
- Holder<DecimalEnum> z = new Holder<DecimalEnum>();
-
- for (int i = 0; i < 3; i++) {
- DecimalEnum x = DecimalEnum.fromValue(xx[i]);
- DecimalEnum yOrig = DecimalEnum.fromValue(yy[i]);
- Holder<DecimalEnum> y = new Holder<DecimalEnum>(yOrig);
-
- DecimalEnum ret = client.testDecimalEnum(x, y, z);
-
- if (!perfTestOnly) {
- assertEquals("testDecimalEnum(): Incorrect value for inout param",
- x.value(), y.value.value());
- assertEquals("testDecimalEnum(): Incorrect value for out param",
- yOrig.value(), z.value.value());
- assertEquals("testDecimalEnum(): Incorrect return value",
- x.value(), ret.value());
- }
- }
- }
+ }
public void testNMTokenEnum() throws Exception {
String[] xx = {"hello", "there"};
@@ -974,29 +919,6 @@
}
}
}
-
- public void testAnyURIEnum() throws Exception {
- String[] xx = {"http://www.iona.com", "http://www.google.com"};
- String[] yy = {"http://www.google.com", "http://www.iona.com"};
-
- Holder<AnyURIEnum> z = new Holder<AnyURIEnum>();
- for (int i = 0; i < 2; i++) {
- AnyURIEnum x = AnyURIEnum.fromValue(xx[i]);
- AnyURIEnum yOrig = AnyURIEnum.fromValue(yy[i]);
- Holder<AnyURIEnum> y = new Holder<AnyURIEnum>(yOrig);
-
- AnyURIEnum ret = client.testAnyURIEnum(x, y, z);
-
- if (!perfTestOnly) {
- assertEquals("testAnyURIEnum(): Incorrect value for inout param",
- x.value(), y.value.value());
- assertEquals("testAnyURIEnum(): Incorrect value for out param",
- yOrig.value(), z.value.value());
- assertEquals("testAnyURIEnum(): Incorrect return value", x.value(), ret.value());
- }
- }
- }
-
protected boolean equals(byte[] x, byte[] y) {
String xx = new String(x);
Modified: incubator/yoko/trunk/bindings/src/test/java/org/apache/yoko/bindings/corba/CorbaTypeTest.java
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/bindings/src/test/java/org/apache/yoko/bindings/corba/CorbaTypeTest.java?view=diff&rev=502258&r1=502257&r2=502258
==============================================================================
--- incubator/yoko/trunk/bindings/src/test/java/org/apache/yoko/bindings/corba/CorbaTypeTest.java (original)
+++ incubator/yoko/trunk/bindings/src/test/java/org/apache/yoko/bindings/corba/CorbaTypeTest.java Thu Feb 1 08:09:59 2007
@@ -76,18 +76,6 @@
public void testHexBinary() throws Exception {
}
- public void testNumberEnum() throws Exception {
- }
- public void testStringEnum() throws Exception {
- }
- public void testDecimalEnum() throws Exception {
- }
- public void testAnyURIEnum() throws Exception {
- }
- public void testNMTokenEnum() throws Exception {
- }
-
-
static abstract class CorbaTypeTestSetup extends TestSetup {
ServerLauncher sl = null;
Modified: incubator/yoko/trunk/bindings/src/test/resources/wsdl/type_test/type_test.xsd
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/bindings/src/test/resources/wsdl/type_test/type_test.xsd?view=diff&rev=502258&r1=502257&r2=502258
==============================================================================
--- incubator/yoko/trunk/bindings/src/test/resources/wsdl/type_test/type_test.xsd (original)
+++ incubator/yoko/trunk/bindings/src/test/resources/wsdl/type_test/type_test.xsd Thu Feb 1 08:09:59 2007
@@ -186,73 +186,17 @@
<enumeration value="BLUE"/>
</restriction>
</simpleType>
- <simpleType name="NumberEnum">
- <xsd:annotation>
- <xsd:appinfo>
- <jaxb:typesafeEnumClass name="NumberEnum">
- <jaxb:typesafeEnumMember name="ONE" value="1"/>
- <jaxb:typesafeEnumMember name="TWO" value="2"/>
- <jaxb:typesafeEnumMember name="THREE" value="3"/>
- </jaxb:typesafeEnumClass>
- </xsd:appinfo>
- </xsd:annotation>
- <restriction base="int">
- <enumeration value="1"/>
- <enumeration value="2"/>
- <enumeration value="3"/>
- </restriction>
- </simpleType>
<simpleType name="StringEnum">
<restriction base="string">
- <enumeration value="a b c"/>
- <enumeration value="d e f"/>
- <enumeration value="g h i"/>
- </restriction>
- </simpleType>
- <simpleType name="DecimalEnum">
- <xsd:annotation>
- <xsd:appinfo>
- <jaxb:typesafeEnumClass name="DecimalEnum">
- <jaxb:typesafeEnumMember name="ONE" value="-10.34"/>
- <jaxb:typesafeEnumMember name="TWO" value="11.22"/>
- <jaxb:typesafeEnumMember name="THREE" value="14.55"/>
- </jaxb:typesafeEnumClass>
- </xsd:appinfo>
- </xsd:annotation>
- <restriction base="decimal">
- <enumeration value="-10.34"/>
- <enumeration value="11.22"/>
- <enumeration value="14.55"/>
+ <enumeration value="abc"/>
+ <enumeration value="def"/>
+ <enumeration value="ghi"/>
</restriction>
</simpleType>
<simpleType name="NMTokenEnum">
<restriction base="NMTOKEN">
<enumeration value="hello"/>
<enumeration value="there"/>
- </restriction>
- </simpleType>
-
- <simpleType name="AnyURIEnum">
- <xsd:annotation>
- <xsd:appinfo>
- <jaxb:typesafeEnumClass name="AnyURIEnum"/>
- </xsd:appinfo>
- </xsd:annotation>
- <restriction base="anyURI">
- <enumeration value="http://www.iona.com">
- <xsd:annotation>
- <xsd:appinfo>
- <jaxb:typesafeEnumMember name="IONA"/>
- </xsd:appinfo>
- </xsd:annotation>
- </enumeration>
- <enumeration value="http://www.google.com">
- <xsd:annotation>
- <xsd:appinfo>
- <jaxb:typesafeEnumMember name="GOOGLE"/>
- </xsd:appinfo>
- </xsd:annotation>
- </enumeration>
</restriction>
</simpleType>