</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'>
</set>";
// just deep table
string xml24 = "<p1><p2><p3><p4><p5><p6/></p5></p4></p3></p2></p1>";
-
+ */
private DataSet GetDataSet (string xml, string [] nss)
{
// 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]
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]
}
[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");
ds.WriteXml(sw);
XmlDocument doc = new XmlDocument ();
doc.LoadXml (sw.ToString ());
- AssertEquals (2, doc.DocumentElement.ChildNodes.Count);
+ Assert.AreEqual (2, doc.DocumentElement.ChildNodes.Count);
}
}
}