ws-axis-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ami...@apache.org
Subject svn commit: r585405 - in /webservices/axis2/trunk/java/modules/adb-codegen: test-resources/testsuite/ test/org/apache/axis2/schema/defaultvalue/
Date Wed, 17 Oct 2007 08:14:25 GMT
Author: amilas
Date: Wed Oct 17 01:14:24 2007
New Revision: 585405

URL: http://svn.apache.org/viewvc?rev=585405&view=rev
Log:
added test cases for default value

Added:
    webservices/axis2/trunk/java/modules/adb-codegen/test-resources/testsuite/default_value.xsd
    webservices/axis2/trunk/java/modules/adb-codegen/test/org/apache/axis2/schema/defaultvalue/
    webservices/axis2/trunk/java/modules/adb-codegen/test/org/apache/axis2/schema/defaultvalue/DefaultValueTest.java
Modified:
    webservices/axis2/trunk/java/modules/adb-codegen/test-resources/testsuite/restrictions.xsd

Added: webservices/axis2/trunk/java/modules/adb-codegen/test-resources/testsuite/default_value.xsd
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/adb-codegen/test-resources/testsuite/default_value.xsd?rev=585405&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/adb-codegen/test-resources/testsuite/default_value.xsd
(added)
+++ webservices/axis2/trunk/java/modules/adb-codegen/test-resources/testsuite/default_value.xsd
Wed Oct 17 01:14:24 2007
@@ -0,0 +1,33 @@
+<!--
+  ~ 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.
+  -->
+<xs:schema elementFormDefault="qualified"
+           xmlns:xs="http://www.w3.org/2001/XMLSchema"
+           xmlns:tns="http://tempuri.org/boolean1"
+           targetNamespace="http://tempuri.org/boolean1">
+
+    <xs:element name="TestElement1" type="xs:int" default="56"/>
+    <xs:element name="TestElement2" >
+        <xs:complexType>
+            <xs:sequence>
+                <xs:element name="param1" type="xs:string" default="test"/>
+            </xs:sequence>
+            <xs:attribute name="attribute1" type="xs:boolean" default="true"/>
+        </xs:complexType>
+    </xs:element>
+</xs:schema>
\ No newline at end of file

Modified: webservices/axis2/trunk/java/modules/adb-codegen/test-resources/testsuite/restrictions.xsd
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/adb-codegen/test-resources/testsuite/restrictions.xsd?rev=585405&r1=585404&r2=585405&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/adb-codegen/test-resources/testsuite/restrictions.xsd
(original)
+++ webservices/axis2/trunk/java/modules/adb-codegen/test-resources/testsuite/restrictions.xsd
Wed Oct 17 01:14:24 2007
@@ -166,6 +166,14 @@
                 <xsd:element name="EndDate" type="tns:WSTypeDate" nillable="true"/>
                 <xsd:element name="SMS_Provider" type="tns:WSTypeChar3" nillable="true"/>
             </xsd:sequence>
+            <xsd:attribute name="MultipleRestriction">
+                <xsd:simpleType>
+                    <xsd:restriction base="xsd:string">
+                        <xsd:pattern value="String"/>
+                        <xsd:pattern value="Base64"/>
+                    </xsd:restriction>
+                </xsd:simpleType>
+            </xsd:attribute>
         </xsd:complexType>
     </xsd:element>
 
@@ -180,6 +188,8 @@
             <xsd:maxLength value="3"/>
         </xsd:restriction>
     </xsd:simpleType>
+
+
 
 
 </xsd:schema>

Added: webservices/axis2/trunk/java/modules/adb-codegen/test/org/apache/axis2/schema/defaultvalue/DefaultValueTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/adb-codegen/test/org/apache/axis2/schema/defaultvalue/DefaultValueTest.java?rev=585405&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/adb-codegen/test/org/apache/axis2/schema/defaultvalue/DefaultValueTest.java
(added)
+++ webservices/axis2/trunk/java/modules/adb-codegen/test/org/apache/axis2/schema/defaultvalue/DefaultValueTest.java
Wed Oct 17 01:14:24 2007
@@ -0,0 +1,31 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed 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.axis2.schema.defaultvalue;
+
+import junit.framework.TestCase;
+import org.tempuri.boolean1.TestElement1;
+import org.tempuri.boolean1.TestElement2;
+
+public class DefaultValueTest extends TestCase {
+
+    public void testDefaultValues(){
+        TestElement1 testElement1 = new TestElement1();
+        assertEquals(testElement1.getTestElement1(),56);
+        TestElement2 testElement2 = new TestElement2();
+        assertEquals(testElement2.getParam1(), "test");
+        assertEquals(testElement2.getAttribute1(),true);
+    }
+}



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


Mime
View raw message