Merge pull request #1624 from esdrubal/getprocesstimes
[mono.git] / mcs / class / System.Data / Test / System.Data / DataSetInferXmlSchemaTest.cs
index d844157fcd1eadf3a526960c4786cf0aa365e66c..daec352be5baf9b672f5e99b5d4bb2bd786e57fb 100644 (file)
@@ -146,6 +146,7 @@ namespace MonoTests.System.Data
 </set>";
                // simple nest
                string xml22 = "<set><table><col><descendant/></col></table><table2><col2>v2</col2></table2></set>";
+         /*
                // simple diffgram
                string xml23 = @"<set>
   <xs:schema xmlns:xs='http://www.w3.org/2001/XMLSchema'>
@@ -167,7 +168,7 @@ namespace MonoTests.System.Data
 </set>";
                // just deep table
                string xml24 = "<p1><p2><p3><p4><p5><p6/></p5></p4></p3></p2></p1>";
-
+         */
 
                private DataSet GetDataSet (string xml, string [] nss)
                {
@@ -196,12 +197,12 @@ namespace MonoTests.System.Data
                        // namespaces
                        ds = GetDataSet (xml14, null);
                        AssertDataSet ("xml14", ds, "root", 0, 0);
-                       AssertEquals ("p", ds.Prefix);
-                       AssertEquals ("urn:foo", ds.Namespace);
+                       Assert.AreEqual (string.Empty, ds.Prefix);
+                       Assert.AreEqual ("urn:foo", ds.Namespace);
 
                        ds = GetDataSet (xml17, null);
                        AssertDataSet ("xml17", ds, "root", 0, 0);
-                       AssertEquals ("urn:foo", ds.Namespace);
+                       Assert.AreEqual ("urn:foo", ds.Namespace);
                }
 
                [Test]
@@ -323,9 +324,9 @@ namespace MonoTests.System.Data
                        DataSet ds = GetDataSet (xml11, null);
                        AssertDataSet ("ds", ds, "NewDataSet", 1, 0);
                        DataTable dt = ds.Tables [0];
-                       AssertDataTable ("dt", dt, "root", 2, 0, 0, 0, 0, 0);
+                       AssertDataTable ("dt", dt, "root", 1, 0, 0, 0, 0, 0);
                        AssertDataColumn ("element", dt.Columns [0], "child_after_significant_space", true, false, 0, 1, "child_after_significant_space", MappingType.Element, typeof (string), DBNull.Value, String.Empty, -1, String.Empty, 0, String.Empty, false, false);
-                       AssertDataColumn ("xml:space", dt.Columns [1], "space", true, false, 0, 1, "space", MappingType.Attribute, typeof (string), DBNull.Value, String.Empty, -1, "http://www.w3.org/XML/1998/namespace", 1, "xml", false, false);
+                       Assert.AreEqual (1, dt.Columns.Count, "xml:space is not treated as column");
                }
 
                [Test]
@@ -470,11 +471,10 @@ namespace MonoTests.System.Data
                }
 
                [Test]
-               [Category ("NotWorking")]
                [ExpectedException (typeof (ConstraintException))]
                public void ConflictExistingPrimaryKey ()
                {
-                       // The 'col' DataTable tries to create another primary key (and fails)
+                       // <wrong>The 'col' DataTable tries to create another primary key (and fails)</wrong> The data violates key constraint.
                        DataSet ds = new DataSet ();
                        ds.Tables.Add (new DataTable ("table"));
                        DataColumn c = new DataColumn ("pk");
@@ -528,7 +528,7 @@ namespace MonoTests.System.Data
                        ds.WriteXml(sw);
                        XmlDocument doc = new XmlDocument ();
                        doc.LoadXml (sw.ToString ());
-                       AssertEquals (2, doc.DocumentElement.ChildNodes.Count);
+                       Assert.AreEqual (2, doc.DocumentElement.ChildNodes.Count);
                }
        }
 }