Author: anagappan
Date: 2007-02-23 01:33:29 -0500 (Fri, 23 Feb 2007)
New Revision: 73347

Added:
   trunk/mcs/class/System.Data/Test/System.Data/TestReadXml1.xml
   trunk/mcs/class/System.Data/Test/System.Data/TestReadXmlSchema1.xml
   trunk/mcs/class/System.Data/Test/System.Data/XmlDataLoaderTest.cs
   trunk/mcs/class/System.Data/Test/System.Data/XmlDataReaderTest.cs
Modified:
   trunk/mcs/class/System.Data/Test/System.Data/ChangeLog
   trunk/mcs/class/System.Data/Test/System.Data/DataTableTest3.cs
   trunk/mcs/class/System.Data/Test/System.Data/DataTableTest4.cs
Log:
2007-02-23  Nagappan A  <[EMAIL PROTECTED]>

        * TestReadXml1.xml: Added new XML for bug # 80596.

        * TestReadXmlSchema1.xml: Added new XML schema for bug # 80596.

        * XmlDataLoaderTest.cs: Added new test-case for bug # 80596.

        * XmlDataReaderTest.cs: Added new test-case for bug # 80596.



Modified: trunk/mcs/class/System.Data/Test/System.Data/ChangeLog
===================================================================
--- trunk/mcs/class/System.Data/Test/System.Data/ChangeLog      2007-02-23 
06:32:33 UTC (rev 73346)
+++ trunk/mcs/class/System.Data/Test/System.Data/ChangeLog      2007-02-23 
06:33:29 UTC (rev 73347)
@@ -1,3 +1,13 @@
+2007-02-23  Nagappan A  <[EMAIL PROTECTED]>
+
+       * TestReadXml1.xml: Added new XML for bug # 80596.
+
+       * TestReadXmlSchema1.xml: Added new XML schema for bug # 80596.
+
+       * XmlDataLoaderTest.cs: Added new test-case for bug # 80596.
+
+       * XmlDataReaderTest.cs: Added new test-case for bug # 80596.
+
 2007-02-20  Gert Driesen  <[EMAIL PROTECTED]>
 
        * DataSetReadXmlTest.cs: Enable test for bug #80048 on 2.0 profile.

Modified: trunk/mcs/class/System.Data/Test/System.Data/DataTableTest3.cs
===================================================================
--- trunk/mcs/class/System.Data/Test/System.Data/DataTableTest3.cs      
2007-02-23 06:32:33 UTC (rev 73346)
+++ trunk/mcs/class/System.Data/Test/System.Data/DataTableTest3.cs      
2007-02-23 06:33:29 UTC (rev 73347)
@@ -1,8 +1,31 @@
-//Tests to check the behavior of ReadXmlSchema and WriteXmlSchema
+// Authors:
+//   Nagappan A <[EMAIL PROTECTED]>
+//
+// Copyright (c) 2007 Novell, Inc
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
 #if NET_2_0
 using System;
 using System.Data;
-using System.Data.Odbc;
 using System.IO;       
 using System.Xml;
 using NUnit.Framework;

Modified: trunk/mcs/class/System.Data/Test/System.Data/DataTableTest4.cs
===================================================================
--- trunk/mcs/class/System.Data/Test/System.Data/DataTableTest4.cs      
2007-02-23 06:32:33 UTC (rev 73346)
+++ trunk/mcs/class/System.Data/Test/System.Data/DataTableTest4.cs      
2007-02-23 06:33:29 UTC (rev 73347)
@@ -1,4 +1,27 @@
-//Tests to check the behavior of ReadXml and WriteXml
+// Authors:
+//   Nagappan A <[EMAIL PROTECTED]>
+//
+// Copyright (c) 2007 Novell, Inc
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
 
 #if NET_2_0
 using System;

Added: trunk/mcs/class/System.Data/Test/System.Data/TestReadXml1.xml
===================================================================
--- trunk/mcs/class/System.Data/Test/System.Data/TestReadXml1.xml       
2007-02-23 06:32:33 UTC (rev 73346)
+++ trunk/mcs/class/System.Data/Test/System.Data/TestReadXml1.xml       
2007-02-23 06:33:29 UTC (rev 73347)
@@ -0,0 +1,113 @@
+<?xml version="1.0" standalone="yes"?>
+<DocumentElement>
+  <DESC>
+    <ColumnName>ColumnName</ColumnName>
+    <DataType>System.String, mscorlib, Version=2.0.0.0, Culture=neutral, 
PublicKeyToken=b77a5c561934e089</DataType>
+    <IsAutoIncrement>false</IsAutoIncrement>
+    <AllowDBNull>true</AllowDBNull>
+    <IsReadOnly>true</IsReadOnly>
+    <IsKey>false</IsKey>
+    <IsUnique>false</IsUnique>
+    <ColumnSize>0</ColumnSize>
+  </DESC>
+  <DESC>
+    <ColumnName>DataType</ColumnName>
+    <DataType>System.Type, mscorlib, Version=2.0.0.0, Culture=neutral, 
PublicKeyToken=b77a5c561934e089</DataType>
+    <IsAutoIncrement>false</IsAutoIncrement>
+    <AllowDBNull>true</AllowDBNull>
+    <IsReadOnly>true</IsReadOnly>
+    <IsKey>false</IsKey>
+    <IsUnique>false</IsUnique>
+    <ColumnSize>0</ColumnSize>
+  </DESC>
+  <DESC>
+    <ColumnName>IsAutoIncrement</ColumnName>
+    <DataType>System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, 
PublicKeyToken=b77a5c561934e089</DataType>
+    <IsAutoIncrement>false</IsAutoIncrement>
+    <AllowDBNull>true</AllowDBNull>
+    <IsReadOnly>true</IsReadOnly>
+    <IsKey>false</IsKey>
+    <IsUnique>false</IsUnique>
+    <ColumnSize>0</ColumnSize>
+  </DESC>
+  <DESC>
+    <ColumnName>AllowDBNull</ColumnName>
+    <DataType>System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, 
PublicKeyToken=b77a5c561934e089</DataType>
+    <IsAutoIncrement>false</IsAutoIncrement>
+    <AllowDBNull>true</AllowDBNull>
+    <IsReadOnly>true</IsReadOnly>
+    <IsKey>false</IsKey>
+    <IsUnique>false</IsUnique>
+    <ColumnSize>0</ColumnSize>
+  </DESC>
+  <DESC>
+    <ColumnName>IsReadOnly</ColumnName>
+    <DataType>System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, 
PublicKeyToken=b77a5c561934e089</DataType>
+    <IsAutoIncrement>false</IsAutoIncrement>
+    <AllowDBNull>true</AllowDBNull>
+    <IsReadOnly>true</IsReadOnly>
+    <IsKey>false</IsKey>
+    <IsUnique>false</IsUnique>
+    <ColumnSize>0</ColumnSize>
+  </DESC>
+  <DESC>
+    <ColumnName>IsKey</ColumnName>
+    <DataType>System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, 
PublicKeyToken=b77a5c561934e089</DataType>
+    <IsAutoIncrement>false</IsAutoIncrement>
+    <AllowDBNull>true</AllowDBNull>
+    <IsReadOnly>true</IsReadOnly>
+    <IsKey>false</IsKey>
+    <IsUnique>false</IsUnique>
+    <ColumnSize>0</ColumnSize>
+  </DESC>
+  <DESC>
+    <ColumnName>IsUnique</ColumnName>
+    <DataType>System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, 
PublicKeyToken=b77a5c561934e089</DataType>
+    <IsAutoIncrement>false</IsAutoIncrement>
+    <AllowDBNull>true</AllowDBNull>
+    <IsReadOnly>true</IsReadOnly>
+    <IsKey>false</IsKey>
+    <IsUnique>false</IsUnique>
+    <ColumnSize>0</ColumnSize>
+  </DESC>
+  <DESC>
+    <ColumnName>ColumnSize</ColumnName>
+    <DataType>System.Int32, mscorlib, Version=2.0.0.0, Culture=neutral, 
PublicKeyToken=b77a5c561934e089</DataType>
+    <IsAutoIncrement>false</IsAutoIncrement>
+    <AllowDBNull>true</AllowDBNull>
+    <IsReadOnly>true</IsReadOnly>
+    <IsKey>false</IsKey>
+    <IsUnique>false</IsUnique>
+    <ColumnSize>0</ColumnSize>
+  </DESC>
+  <DESC>
+    <ColumnName>ColumnNumber</ColumnName>
+    <DataType>System.Int32, mscorlib, Version=2.0.0.0, Culture=neutral, 
PublicKeyToken=b77a5c561934e089</DataType>
+    <IsAutoIncrement>false</IsAutoIncrement>
+    <AllowDBNull>true</AllowDBNull>
+    <IsReadOnly>true</IsReadOnly>
+    <IsKey>false</IsKey>
+    <IsUnique>false</IsUnique>
+    <ColumnSize>0</ColumnSize>
+  </DESC>
+  <DESC>
+    <ColumnName>Summary</ColumnName>
+    <DataType>System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, 
PublicKeyToken=b77a5c561934e089</DataType>
+    <IsAutoIncrement>false</IsAutoIncrement>
+    <AllowDBNull>true</AllowDBNull>
+    <IsReadOnly>true</IsReadOnly>
+    <IsKey>false</IsKey>
+    <IsUnique>false</IsUnique>
+    <ColumnSize>0</ColumnSize>
+  </DESC>
+  <DESC>
+    <ColumnName>Print</ColumnName>
+    <DataType>System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, 
PublicKeyToken=b77a5c561934e089</DataType>
+    <IsAutoIncrement>false</IsAutoIncrement>
+    <AllowDBNull>true</AllowDBNull>
+    <IsReadOnly>true</IsReadOnly>
+    <IsKey>false</IsKey>
+    <IsUnique>false</IsUnique>
+    <ColumnSize>0</ColumnSize>
+  </DESC>
+</DocumentElement>

Added: trunk/mcs/class/System.Data/Test/System.Data/TestReadXmlSchema1.xml
===================================================================
--- trunk/mcs/class/System.Data/Test/System.Data/TestReadXmlSchema1.xml 
2007-02-23 06:32:33 UTC (rev 73346)
+++ trunk/mcs/class/System.Data/Test/System.Data/TestReadXmlSchema1.xml 
2007-02-23 06:33:29 UTC (rev 73347)
@@ -0,0 +1,30 @@
+<?xml version="1.0" standalone="yes"?>
+<xs:schema id="NewDataSet" xmlns="" 
xmlns:xs="http://www.w3.org/2001/XMLSchema"; 
xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+  <xs:element name="NewDataSet" msdata:IsDataSet="true" 
msdata:MainDataTable="DESC" msdata:UseCurrentLocale="true">
+    <xs:complexType>
+      <xs:choice minOccurs="0" maxOccurs="unbounded">
+        <xs:element name="DESC">
+          <xs:complexType>
+            <xs:sequence>
+              <xs:element name="ColumnName" msdata:ReadOnly="true" 
type="xs:string" minOccurs="0" />
+              <xs:element name="DataType" msdata:DataType="System.Type, 
mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" 
msdata:ReadOnly="true" type="xs:string" minOccurs="0" />
+              <xs:element name="IsAutoIncrement" msdata:ReadOnly="true" 
type="xs:boolean" minOccurs="0" />
+              <xs:element name="AllowDBNull" msdata:ReadOnly="true" 
type="xs:boolean" minOccurs="0" />
+              <xs:element name="IsReadOnly" msdata:ReadOnly="true" 
type="xs:boolean" minOccurs="0" />
+              <xs:element name="IsKey" msdata:ReadOnly="true" 
type="xs:boolean" minOccurs="0" />
+              <xs:element name="IsUnique" msdata:ReadOnly="true" 
type="xs:boolean" minOccurs="0" />
+              <xs:element name="ColumnSize" msdata:ReadOnly="true" 
type="xs:int" minOccurs="0" />
+              <xs:element name="ColumnNumber" msdata:ReadOnly="true" 
type="xs:int" minOccurs="0" />
+              <xs:element name="Summary" type="xs:boolean" minOccurs="0" />
+              <xs:element name="Print" type="xs:boolean" minOccurs="0" />
+            </xs:sequence>
+          </xs:complexType>
+        </xs:element>
+      </xs:choice>
+    </xs:complexType>
+    <xs:unique name="Constraint1">
+      <xs:selector xpath=".//DESC" />
+      <xs:field xpath="ColumnName" />
+    </xs:unique>
+  </xs:element>
+</xs:schema>

Added: trunk/mcs/class/System.Data/Test/System.Data/XmlDataLoaderTest.cs
===================================================================
--- trunk/mcs/class/System.Data/Test/System.Data/XmlDataLoaderTest.cs   
2007-02-23 06:32:33 UTC (rev 73346)
+++ trunk/mcs/class/System.Data/Test/System.Data/XmlDataLoaderTest.cs   
2007-02-23 06:33:29 UTC (rev 73347)
@@ -0,0 +1,84 @@
+// Authors:
+//   Nagappan A <[EMAIL PROTECTED]>
+//
+// Copyright (c) 2007 Novell, Inc
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#if NET_2_0
+using System;
+using System.Data;
+using System.Collections;
+using System.IO;       
+using System.Xml;
+using NUnit.Framework;
+
+namespace Monotests_System.Data
+{
+       [TestFixture]   
+       public class XmlDataLoaderTest
+       {
+               DataSet _ds;
+               
+               public XmlDataLoaderTest ()
+               {
+               }
+
+               private DataSet Create ()
+               {
+                       DataSet ds = new DataSet ("Set");
+                       DataTable dt = new DataTable ("Test");
+                       dt.Columns.Add ("CustName",  typeof (String));
+                       dt.Columns.Add ("Type",  typeof (System.Type));
+                       ds.Tables.Add (dt);
+                       return ds;
+               }
+                               
+               public void Write ()
+               {
+                       _ds = Create ();
+                       DataTable dt = _ds.Tables [0];
+                       DataRow dr = dt.NewRow ();
+                       dr["CustName"] = System.DBNull.Value;
+                       dr["Type"] = typeof (System.DBNull);
+                       dt.Rows.Add (dr);
+                       _ds.WriteXml ("Test/System.Data/TestReadWriteXml1.xml", 
XmlWriteMode.DiffGram);
+               }
+               
+               public void Read ()
+               {
+                       _ds = Create ();
+                       _ds.ReadXml ("Test/System.Data/TestReadWriteXml1.xml", 
XmlReadMode.DiffGram);
+               }
+               [Test]
+               public void XmlLoadTest ()
+               {
+                       try {
+                               XmlDataLoaderTest t = new XmlDataLoaderTest ();
+                               t.Write ();
+                               t.Read ();
+                       } catch {
+                               Assert.Fail ("#1 Should not throw Exception");
+                       }
+               }
+       }
+}
+#endif

Added: trunk/mcs/class/System.Data/Test/System.Data/XmlDataReaderTest.cs
===================================================================
--- trunk/mcs/class/System.Data/Test/System.Data/XmlDataReaderTest.cs   
2007-02-23 06:32:33 UTC (rev 73346)
+++ trunk/mcs/class/System.Data/Test/System.Data/XmlDataReaderTest.cs   
2007-02-23 06:33:29 UTC (rev 73347)
@@ -0,0 +1,54 @@
+// Authors:
+//   Nagappan A <[EMAIL PROTECTED]>
+//
+// Copyright (c) 2007 Novell, Inc
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+#if NET_2_0
+using System;
+using System.Data;
+using System.Collections;
+using System.IO;       
+using System.Xml;
+using NUnit.Framework;
+
+namespace Monotests_System.Data
+{
+       [TestFixture]   
+       public class XmlDataReaderTest
+       {
+               [Test]
+               public void XmlLoadTest ()
+               {
+                       try {
+                               DataSet ds = new DataSet();
+                               ds.ReadXmlSchema 
("Test/System.Data/TestReadXmlSchema1.xml");
+                               ds.ReadXml 
("Test/System.Data/TestReadXml1.xml");
+                               ds = null;
+                       } catch {
+                               Assert.Fail ("#1 Should not throw Exception");
+                       }
+               }
+       }
+}
+#endif
+

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to