{
DataSet ds = new DataSet ();
ds.InferXmlSchema ((XmlReader) null, null);
- AssertDataSet ("null", ds, "NewDataSet", 0);
+ AssertDataSet ("null", ds, "NewDataSet", 0, 0);
}
[Test]
DataSet ds = GetDataSet (xml2, null);
AssertDataSet ("ds", ds, "NewDataSet", 1, 0);
DataTable dt = ds.Tables [0];
- AssertDataTable ("dt", dt, "root", 1, 0);
+ AssertDataTable ("dt", dt, "root", 1, 0, 0, 0);
AssertDataColumn ("col", dt.Columns [0], "attr", true, false, 0, 1, "attr", MappingType.Attribute, typeof (string), DBNull.Value, String.Empty, -1, String.Empty, 0, String.Empty, false, false);
}
DataSet ds = GetDataSet (xml3, null);
AssertDataSet ("ds", ds, "NewDataSet", 1, 0);
DataTable dt = ds.Tables [0];
- AssertDataTable ("dt", dt, "root", 2, 0);
+ AssertDataTable ("dt", dt, "root", 2, 0, 0, 0);
AssertDataColumn ("col", dt.Columns [0], "attr", true, false, 0, 1, "attr", MappingType.Attribute, typeof (string), DBNull.Value, String.Empty, -1, String.Empty, 0, String.Empty, false, false);
AssertDataColumn ("col", dt.Columns [1], "attr2", true, false, 0, 1, "attr2", MappingType.Attribute, typeof (string), DBNull.Value, String.Empty, -1, String.Empty, 1, String.Empty, false, false);
}
DataSet ds = GetDataSet (xml5, null);
AssertDataSet ("ds", ds, "NewDataSet", 1, 0);
DataTable dt = ds.Tables [0];
- AssertDataTable ("dt", dt, "root", 1, 0);
+ AssertDataTable ("dt", dt, "root", 1, 0, 0, 0);
AssertDataColumn ("col", dt.Columns [0], "child", true, false, 0, 1, "child", MappingType.Element, typeof (string), DBNull.Value, String.Empty, -1, String.Empty, 0, String.Empty, false, false);
ds = GetDataSet (xml6, null);
AssertDataSet ("ds", ds, "NewDataSet", 1, 0);
dt = ds.Tables [0];
- AssertDataTable ("dt", dt, "root", 1, 0);
+ AssertDataTable ("dt", dt, "root", 1, 0, 0, 0);
AssertDataColumn ("col", dt.Columns [0], "col1", true, false, 0, 1, "col1", MappingType.Element, typeof (string), DBNull.Value, String.Empty, -1, String.Empty, 0, String.Empty, false, false);
}
DataSet ds = GetDataSet (xml7, null);
AssertDataSet ("ds", ds, "NewDataSet", 1, 0);
DataTable dt = ds.Tables [0];
- AssertDataTable ("dt", dt, "root", 3, 0);
+ AssertDataTable ("dt", dt, "root", 3, 0, 0, 0);
AssertDataColumn ("col", dt.Columns [0], "col1", true, false, 0, 1, "col1", MappingType.Element, typeof (string), DBNull.Value, String.Empty, -1, String.Empty, 0, String.Empty, false, false);
AssertDataColumn ("col2", dt.Columns [1], "col2", true, false, 0, 1, "col2", MappingType.Element, typeof (string), DBNull.Value, String.Empty, -1, String.Empty, 1, String.Empty, false, false);
AssertDataColumn ("col3", dt.Columns [2], "col3", true, false, 0, 1, "col3", MappingType.Element, typeof (string), DBNull.Value, String.Empty, -1, String.Empty, 2, String.Empty, false, false);
DataSet ds = GetDataSet (xml8, null);
AssertDataSet ("ds", ds, "set", 1, 0);
DataTable dt = ds.Tables [0];
- AssertDataTable ("dt", dt, "tab", 3, 0);
+ AssertDataTable ("dt", dt, "tab", 3, 0, 0, 0);
AssertDataColumn ("col", dt.Columns [0], "col1", true, false, 0, 1, "col1", MappingType.Element, typeof (string), DBNull.Value, String.Empty, -1, String.Empty, 0, String.Empty, false, false);
AssertDataColumn ("col2", dt.Columns [1], "col2", true, false, 0, 1, "col2", MappingType.Element, typeof (string), DBNull.Value, String.Empty, -1, String.Empty, 1, String.Empty, false, false);
AssertDataColumn ("col3", dt.Columns [2], "col3", true, false, 0, 1, "col3", MappingType.Element, typeof (string), DBNull.Value, String.Empty, -1, String.Empty, 2, String.Empty, false, false);
AssertDataSet ("ds", ds, "NewDataSet", 4, 3);
DataTable dt = ds.Tables [0];
- AssertDataTable ("dt", dt, "el1", 3, 0);
+ AssertDataTable ("dt", dt, "el1", 3, 0, 0, 1);
AssertDataColumn ("el1_Id", dt.Columns [0], "el1_Id", false, true, 0, 1, "el1_Id", MappingType.Hidden, typeof (int), DBNull.Value, String.Empty, -1, String.Empty, 0, String.Empty, false, true);
AssertDataColumn ("el1_attr1", dt.Columns [1], "attr1", true, false, 0, 1, "attr1", MappingType.Attribute, typeof (string), DBNull.Value, String.Empty, -1, String.Empty, 1, String.Empty, false, false);
AssertDataColumn ("el1_attrA", dt.Columns [2], "attrA", true, false, 0, 1, "attrA", MappingType.Attribute, typeof (string), DBNull.Value, String.Empty, -1, String.Empty, 2, String.Empty, false, false);
dt = ds.Tables [1];
- AssertDataTable ("dt", dt, "el2", 6, 0);
+ AssertDataTable ("dt", dt, "el2", 6, 0, 1, 2);
AssertDataColumn ("el2_Id", dt.Columns [0], "el2_Id", false, true, 0, 1, "el2_Id", MappingType.Hidden, typeof (int), DBNull.Value, String.Empty, -1, String.Empty, 0, String.Empty, false, true);
AssertDataColumn ("el2_col2", dt.Columns [1], "column2", true, false, 0, 1, "column2", MappingType.Element, typeof (string), DBNull.Value, String.Empty, -1, String.Empty, 1, String.Empty, false, false);
AssertDataColumn ("el2_col3", dt.Columns [2], "column3", true, false, 0, 1, "column3", MappingType.Element, typeof (string), DBNull.Value, String.Empty, -1, String.Empty, 2, String.Empty, false, false);
AssertDataColumn ("el2_el1Id", dt.Columns [5], "el1_Id", true, false, 0, 1, "el1_Id", MappingType.Hidden, typeof (int), DBNull.Value, String.Empty, -1, String.Empty, 5, String.Empty, false, false);
dt = ds.Tables [2];
- AssertDataTable ("dt", dt, "el3", 4, 0);
+ AssertDataTable ("dt", dt, "el3", 4, 0, 1, 0);
AssertDataColumn ("el3_attr3", dt.Columns [0], "attr3", true, false, 0, 1, "attr3", MappingType.Attribute, typeof (string), DBNull.Value, String.Empty, -1, String.Empty, 0, String.Empty, false, false);
AssertDataColumn ("el3_attrC", dt.Columns [1], "attrC", true, false, 0, 1, "attrC", MappingType.Attribute, typeof (string), DBNull.Value, String.Empty, -1, String.Empty, 1, String.Empty, false, false);
AssertDataColumn ("el3_Text", dt.Columns [2], "el3_Text", true, false, 0, 1, "el3_Text", MappingType.SimpleContent, typeof (string), DBNull.Value, String.Empty, -1, String.Empty, 2, String.Empty, false, false);
AssertDataColumn ("el3_el2Id", dt.Columns [3], "el2_Id", true, false, 0, 1, "el2_Id", MappingType.Hidden, typeof (int), DBNull.Value, String.Empty, -1, String.Empty, 3, String.Empty, false, false);
dt = ds.Tables [3];
- AssertDataTable ("dt", dt, "el4", 4, 0);
+ AssertDataTable ("dt", dt, "el4", 4, 0, 1, 0);
AssertDataColumn ("el3_attr4", dt.Columns [0], "attr4", true, false, 0, 1, "attr4", MappingType.Attribute, typeof (string), DBNull.Value, String.Empty, -1, String.Empty, 0, String.Empty, false, false);
AssertDataColumn ("el4_attrD", dt.Columns [1], "attrD", true, false, 0, 1, "attrD", MappingType.Attribute, typeof (string), DBNull.Value, String.Empty, -1, String.Empty, 1, String.Empty, false, false);
AssertDataColumn ("el4_Text", dt.Columns [2], "el4_Text", true, false, 0, 1, "el4_Text", MappingType.SimpleContent, typeof (string), DBNull.Value, String.Empty, -1, String.Empty, 2, String.Empty, false, false);
DataSet ds = GetDataSet (xml10, null);
AssertDataSet ("ds", ds, "NewDataSet", 1, 0);
DataTable dt = ds.Tables [0];
- AssertDataTable ("dt", dt, "root", 1, 0);
+ AssertDataTable ("dt", dt, "root", 1, 0, 0, 0);
AssertDataColumn ("col", dt.Columns [0], "b", true, false, 0, 1, "b", MappingType.Element, typeof (string), DBNull.Value, String.Empty, -1, String.Empty, 0, String.Empty, false, false);
}
DataSet ds = GetDataSet (xml11, null);
AssertDataSet ("ds", ds, "NewDataSet", 1, 0);
DataTable dt = ds.Tables [0];
- AssertDataTable ("dt", dt, "root", 2, 0);
+ AssertDataTable ("dt", dt, "root", 2, 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);
}
(" \n\n"));\r
XmlReader xr = new XmlNodeReader (doc);\r
ds.InferXmlSchema (xr, null);\r
- AssertDataSet ("pure_whitespace", ds, "root", 0);\r
+ AssertDataSet ("pure_whitespace", ds, "root", 0, 0);\r
}
[Test]
AssertDataSet ("ds", ds, "root", 2, 0);
DataTable dt = ds.Tables [0];
- AssertDataTable ("dt", dt, "table1", 2, 0);
+ AssertDataTable ("dt", dt, "table1", 2, 0, 0, 0);
AssertDataColumn ("col1_1", dt.Columns [0], "col1_1", true, false, 0, 1, "col1_1", MappingType.Element, typeof (string), DBNull.Value, String.Empty, -1, String.Empty, 0, String.Empty, false, false);
AssertDataColumn ("col1_2", dt.Columns [1], "col1_2", true, false, 0, 1, "col1_2", MappingType.Element, typeof (string), DBNull.Value, String.Empty, -1, String.Empty, 1, String.Empty, false, false);
dt = ds.Tables [1];
- AssertDataTable ("dt", dt, "table2", 2, 0);
+ AssertDataTable ("dt", dt, "table2", 2, 0, 0, 0);
AssertDataColumn ("col2_1", dt.Columns [0], "col2_1", true, false, 0, 1, "col2_1", MappingType.Element, typeof (string), DBNull.Value, String.Empty, -1, String.Empty, 0, String.Empty, false, false);
AssertDataColumn ("col2_2", dt.Columns [1], "col2_2", true, false, 0, 1, "col2_2", MappingType.Element, typeof (string), DBNull.Value, String.Empty, -1, String.Empty, 1, String.Empty, false, false);
}
AssertDataSet ("ds", ds, "set", 2, 1);
DataTable dt = ds.Tables [0];
- AssertDataTable ("dt", dt, "table", 1, 0);
+ AssertDataTable ("dt", dt, "table", 1, 0, 0, 1);
AssertDataColumn ("table_Id", dt.Columns [0], "table_Id", false, true, 0, 1, "table_Id", MappingType.Hidden, typeof (int), DBNull.Value, String.Empty, -1, String.Empty, 0, String.Empty, false, true);
dt = ds.Tables [1];
- AssertDataTable ("dt", dt, "col", 2, 0);
+ AssertDataTable ("dt", dt, "col", 2, 0, 1, 0);
AssertDataColumn ("another_col", dt.Columns [0], "another_col", true, false, 0, 1, "another_col", MappingType.Element, typeof (string), DBNull.Value, String.Empty, -1, String.Empty, 0, String.Empty, false, false);
AssertDataColumn ("table_refId", dt.Columns [1], "table_Id", true, false, 0, 1, "table_Id", MappingType.Hidden, typeof (int), DBNull.Value, String.Empty, -1, String.Empty, 1, String.Empty, false, false);
DataRelation dr = ds.Relations [0];
- AssertDataRelation ("rel", dr, "table_col", new string [] {"table_Id"}, new string [] {"table_Id"}, true, true);
+ AssertDataRelation ("rel", dr, "table_col", true, new string [] {"table_Id"}, new string [] {"table_Id"}, true, true);
AssertUniqueConstraint ("uniq", dr.ParentKeyConstraint, "Constraint1", true, new string [] {"table_Id"});
AssertForeignKeyConstraint ("fkey", dr.ChildKeyConstraint, "table_col", AcceptRejectRule.None, Rule.Cascade, Rule.Cascade, new string [] {"table_Id"}, new string [] {"table_Id"});
}
AssertDataSet ("ds", ds, "set", 2, 1);
DataTable dt = ds.Tables [0];
- AssertDataTable ("dt", dt, "table", 1, 0);
+ AssertDataTable ("dt", dt, "table", 1, 0, 0, 1);
AssertDataColumn ("table_Id", dt.Columns [0], "table_Id", false, true, 0, 1, "table_Id", MappingType.Hidden, typeof (int), DBNull.Value, String.Empty, -1, String.Empty, 0, String.Empty, false, true);
dt = ds.Tables [1];
- AssertDataTable ("dt", dt, "col", 2, 0);
+ AssertDataTable ("dt", dt, "col", 2, 0, 1, 0);
AssertDataColumn ("table_refId", dt.Columns [0], "table_Id", true, false, 0, 1, "table_Id", MappingType.Hidden, typeof (int), DBNull.Value, String.Empty, -1, String.Empty, 0, String.Empty, false, false);
AssertDataColumn ("another_col", dt.Columns [1], "another_col", true, false, 0, 1, "another_col", MappingType.Element, typeof (string), DBNull.Value, String.Empty, -1, String.Empty, 1, String.Empty, false, false);
DataRelation dr = ds.Relations [0];
- AssertDataRelation ("rel", dr, "table_col", new string [] {"table_Id"}, new string [] {"table_Id"}, true, true);
+ AssertDataRelation ("rel", dr, "table_col", true, new string [] {"table_Id"}, new string [] {"table_Id"}, true, true);
AssertUniqueConstraint ("uniq", dr.ParentKeyConstraint, "Constraint1", true, new string [] {"table_Id"});
AssertForeignKeyConstraint ("fkey", dr.ChildKeyConstraint, "table_col", AcceptRejectRule.None, Rule.Cascade, Rule.Cascade, new string [] {"table_Id"}, new string [] {"table_Id"});
}
AssertDataSet ("ds", ds, "set", 2, 1);
DataTable dt = ds.Tables [0];
- AssertDataTable ("dt", dt, "table", 1, 0);
+ AssertDataTable ("dt", dt, "table", 1, 0, 0, 1);
AssertDataColumn ("table_Id", dt.Columns [0], "table_Id", false, true, 0, 1, "table_Id", MappingType.Hidden, typeof (int), DBNull.Value, String.Empty, -1, String.Empty, 0, String.Empty, false, true);
dt = ds.Tables [1];
- AssertDataTable ("dt", dt, "col", 3, 0);
+ AssertDataTable ("dt", dt, "col", 3, 0, 1, 0);
AssertDataColumn ("another_col", dt.Columns [0], "another_col", true, false, 0, 1, "another_col", MappingType.Element, typeof (string), DBNull.Value, String.Empty, -1, String.Empty, 0, String.Empty, false, false);
AssertDataColumn ("table_refId", dt.Columns [1], "table_Id", true, false, 0, 1, "table_Id", MappingType.Hidden, typeof (int), DBNull.Value, String.Empty, -1, String.Empty, 1, String.Empty, false, false);
AssertDataColumn ("attr", dt.Columns [2], "attr", true, false, 0, 1, "attr", MappingType.Attribute, typeof (string), DBNull.Value, String.Empty, -1, String.Empty, 2, String.Empty, false, false);
DataRelation dr = ds.Relations [0];
- AssertDataRelation ("rel", dr, "table_col", new string [] {"table_Id"}, new string [] {"table_Id"}, true, true);
+ AssertDataRelation ("rel", dr, "table_col", true, new string [] {"table_Id"}, new string [] {"table_Id"}, true, true);
AssertUniqueConstraint ("uniq", dr.ParentKeyConstraint, "Constraint1", true, new string [] {"table_Id"});
AssertForeignKeyConstraint ("fkey", dr.ChildKeyConstraint, "table_col", AcceptRejectRule.None, Rule.Cascade, Rule.Cascade, new string [] {"table_Id"}, new string [] {"table_Id"});
}
// LocaleOnRootWithoutIsDataSet(), that tests if locale on\r
// the (mere) data table modifies *DataSet's* locale.\r
string xsbase = @"<xs:schema xmlns:xs='http://www.w3.org/2001/XMLSchema' id='hoge'>\r
- <xs:element name='Root'> <!-- becomes table -->\r
+ <xs:element name='Root'> <!-- When simple, it becomes table. When complex, it becomes DataSet -->\r
<xs:complexType>\r
<xs:choice maxOccurs='unbounded'>\r
{0}\r
</xs:choice>\r
</xs:complexType>\r
</xs:element>\r
+ <xs:element name='more' type='xs:string' />\r
</xs:schema>";\r
string simple = "<xs:element name='Child' type='xs:string' />";\r
string complex = @"<xs:element name='Child'>\r
<xs:complexType>\r
<xs:attribute name='a1' />\r
- <xs:attribute name='a2'/>\r
+ <xs:attribute name='a2' type='xs:integer'/>\r
</xs:complexType>\r
</xs:element>";\r
+ string elref = "<xs:element ref='more' />";\r
\r
DataSet ds = new DataSet ();\r
\r
string xs = String.Format (xsbase, simple);\r
ds.ReadXmlSchema (new StringReader (xs));\r
- AssertDataSet ("simple", ds, "hoge", 1);\r
- AssertDataTable ("simple", ds.Tables [0], "Root", 1, 0);\r
+ AssertDataSet ("simple", ds, "hoge", 1, 0);\r
+ AssertDataTable ("simple", ds.Tables [0], "Root", 1, 0, 0, 0);\r
\r
ds = new DataSet ();\r
xs = String.Format (xsbase, complex);\r
ds.ReadXmlSchema (new StringReader (xs));\r
- AssertDataSet ("complex", ds, "Root", 1);\r
- AssertDataTable ("complex", ds.Tables [0], "Child", 2, 0);\r
+ AssertDataSet ("complex", ds, "hoge", 2, 1);\r
+ AssertDataTable ("complex", ds.Tables [0], "Root", 1, 0, 0, 1);\r
+ DataTable dt = ds.Tables [1];\r
+ AssertDataTable ("complex", dt, "Child", 3, 0, 1, 0);\r
+ AssertDataColumn ("a1", dt.Columns [0], "a1", true, false, 0, 1, "a1", MappingType.Attribute, typeof (string), DBNull.Value, String.Empty, -1, String.Empty, 0, String.Empty, false, false);\r
+ AssertDataColumn ("a2", dt.Columns [1], "a2", true, false, 0, 1, "a2", MappingType.Attribute, typeof (long), DBNull.Value, String.Empty, -1, String.Empty, 1, String.Empty, false, false);\r
+ AssertDataColumn ("Root_Id", dt.Columns [2], "Root_Id", true, false, 0, 1, "Root_Id", MappingType.Hidden, typeof (int), DBNull.Value, String.Empty, -1, String.Empty, 2, String.Empty, false, false);\r
+\r
+ ds = new DataSet ();\r
+ xs = String.Format (xsbase, elref);\r
+ ds.ReadXmlSchema (new StringReader (xs));\r
+ AssertDataSet ("complex", ds, "hoge", 1, 0);\r
+ AssertDataTable ("complex", ds.Tables [0], "Root", 1, 0, 0, 0);\r
}\r
\r
[Test]\r
DataSet ds = new DataSet ();\r
ds.ReadXmlSchema (new StringReader (xs));\r
// Here "unusedType" table is never imported.\r
- AssertDataSet ("ds", ds, "hoge", 1);\r
- AssertDataTable ("dt", ds.Tables [0], "Root", 1, 0);\r
+ AssertDataSet ("ds", ds, "hoge", 1, 0);\r
+ AssertDataTable ("dt", ds.Tables [0], "Root", 1, 0, 0, 0);\r
}\r
\r
[Test]\r
DataSet ds = new DataSet ();\r
ds.ReadXmlSchema (new StringReader (xs));\r
// nothing is imported.\r
- AssertDataSet ("ds", ds, "NewDataSet", 0);\r
+ AssertDataSet ("ds", ds, "NewDataSet", 0, 0);\r
}\r
\r
[Test]\r
\r
DataSet ds = new DataSet ();\r
ds.ReadXmlSchema (new StringReader (xs));\r
- AssertDataSet ("ds", ds, "Root", 0); // name is "Root"\r
+ AssertDataSet ("ds", ds, "Root", 0, 0); // name is "Root"\r
\r
// But when explicit msdata:IsDataSet value is "false", then\r
// treat as usual.\r
\r
ds = new DataSet ();\r
ds.ReadXmlSchema (new StringReader (xs));\r
- AssertDataSet ("ds", ds, "NewDataSet", 1);\r
+ AssertDataSet ("ds", ds, "NewDataSet", 1, 0);\r
}\r
\r
[Test]\r
DataSet ds = new DataSet ();\r
ds.ReadXmlSchema (new StringReader (xs));\r
// Child should not be regarded as DataSet element\r
- AssertDataSet ("ds", ds, "NewDataSet", 1);\r
+ AssertDataSet ("ds", ds, "NewDataSet", 1, 0);\r
}\r
\r
[Test]\r
\r
DataSet ds = new DataSet ();\r
ds.ReadXmlSchema (new StringReader (xs));\r
- AssertDataSet ("ds", ds, "NewDataSet", 1);\r
+ AssertDataSet ("ds", ds, "NewDataSet", 1, 0);\r
AssertEquals ("fi-FI", ds.Locale.Name); // DataSet's Locale comes from current thread\r
DataTable dt = ds.Tables [0];\r
- AssertDataTable ("dt", dt, "Root", 2, 0);\r
+ AssertDataTable ("dt", dt, "Root", 2, 0, 0, 0);\r
AssertEquals ("ja-JP", dt.Locale.Name); // DataTable's Locale comes from msdata:Locale\r
AssertDataColumn ("col1", dt.Columns [0], "Attr", true, false, 0, 1, "Attr", MappingType.Attribute, typeof (Int64), DBNull.Value, String.Empty, -1, String.Empty, 0, String.Empty, false, false);\r
AssertDataColumn ("col2", dt.Columns [1], "Child", false, false, 0, 1, "Child", MappingType.Element, typeof (string), DBNull.Value, String.Empty, -1, String.Empty, 1, String.Empty, false, false);\r
// No prefixes on tables and columns\r
DataSet ds = new DataSet ();\r
ds.ReadXmlSchema (new StringReader (xs));\r
- AssertDataSet ("ds", ds, "DS", 3);\r
+ AssertDataSet ("ds", ds, "DS", 3, 1);\r
DataTable dt = ds.Tables [0];\r
- AssertDataTable ("R3", dt, "R3", 3, 0);\r
+ AssertDataTable ("R3", dt, "R3", 3, 0, 0, 0);\r
AssertDataColumn ("col1", dt.Columns [0], "Attr", true, false, 0, 1, "Attr", MappingType.Attribute, typeof (Int64), DBNull.Value, String.Empty, -1, String.Empty, 0, String.Empty, false, false);\r
}\r
\r
\r
private void ReadTest1Check (DataSet ds)\r
{\r
- AssertDataSet ("dataset", ds, "NewDataSet", 2);\r
- AssertDataTable ("tbl1", ds.Tables [0], "Table1", 3, 0);\r
- AssertDataTable ("tbl2", ds.Tables [1], "Table2", 3, 0);\r
+ AssertDataSet ("dataset", ds, "NewDataSet", 2, 1);\r
+ AssertDataTable ("tbl1", ds.Tables [0], "Table1", 3, 0, 0, 1);\r
+ AssertDataTable ("tbl2", ds.Tables [1], "Table2", 3, 0, 1, 0);\r
\r
DataRelation rel = ds.Relations [0];\r
- AssertDataRelation ("rel", rel, "Rel1",\r
+ AssertDataRelation ("rel", rel, "Rel1", false,\r
new string [] {"Column1_3"},\r
new string [] {"Column2_1"}, true, true);\r
AssertUniqueConstraint ("uc", rel.ParentKeyConstraint, \r
AssertReadXml (ds, "SimpleTable", xml6,\r
XmlReadMode.Auto, XmlReadMode.InferSchema,\r
"NewDataSet", 1);\r
- AssertDataTable ("xml6", ds.Tables [0], "root", 1, 1);\r
+ AssertDataTable ("xml6", ds.Tables [0], "root", 1, 1, 0, 0);\r
\r
// simple table with 2 columns:\r
ds = new DataSet ();\r
AssertReadXml (ds, "SimpleTable2", xml7,\r
XmlReadMode.Auto, XmlReadMode.InferSchema,\r
"NewDataSet", 1);\r
- AssertDataTable ("xml7", ds.Tables [0], "root", 2, 1);\r
+ AssertDataTable ("xml7", ds.Tables [0], "root", 2, 1, 0, 0);\r
\r
// simple dataset with 1 table:\r
ds = new DataSet ();\r
AssertReadXml (ds, "SimpleDataSet", xml8,\r
XmlReadMode.Auto, XmlReadMode.InferSchema,\r
"dataset", 1);\r
- AssertDataTable ("xml8", ds.Tables [0], "table", 2, 1);\r
+ AssertDataTable ("xml8", ds.Tables [0], "table", 2, 1, 0, 0);\r
}\r
\r
[Test]\r
AssertReadXml (ds, "SimpleTable", xml6,\r
XmlReadMode.InferSchema, XmlReadMode.InferSchema,\r
"NewDataSet", 1);\r
- AssertDataTable ("xml6", ds.Tables [0], "root", 1, 1);\r
+ AssertDataTable ("xml6", ds.Tables [0], "root", 1, 1, 0, 0);\r
\r
// simple table with 2 columns:\r
ds = new DataSet ();\r
AssertReadXml (ds, "SimpleTable2", xml7,\r
XmlReadMode.InferSchema, XmlReadMode.InferSchema,\r
"NewDataSet", 1);\r
- AssertDataTable ("xml7", ds.Tables [0], "root", 2, 1);\r
+ AssertDataTable ("xml7", ds.Tables [0], "root", 2, 1, 0, 0);\r
\r
// simple dataset with 1 table:\r
ds = new DataSet ();\r
AssertReadXml (ds, "SimpleDataSet", xml8,\r
XmlReadMode.InferSchema, XmlReadMode.InferSchema,\r
"dataset", 1);\r
- AssertDataTable ("xml8", ds.Tables [0], "table", 2, 1);\r
+ AssertDataTable ("xml8", ds.Tables [0], "table", 2, 1, 0, 0);\r
}\r
\r
[Test]\r
AssertReadXml (ds, "Fragment", schema1,\r
XmlReadMode.Fragment, XmlReadMode.Fragment,\r
"NewDataSet", 1);\r
- AssertDataTable ("fragment", ds.Tables [0], "Root", 1, 0);\r
+ AssertDataTable ("fragment", ds.Tables [0], "Root", 1, 0, 0, 0);\r
\r
ds = new DataSet ();\r
AssertReadXml (ds, "ReadSchema", schema1,\r
XmlReadMode.ReadSchema, XmlReadMode.ReadSchema,\r
"NewDataSet", 1);\r
- AssertDataTable ("readschema", ds.Tables [0], "Root", 1, 0);\r
+ AssertDataTable ("readschema", ds.Tables [0], "Root", 1, 0, 0, 0);\r
\r
ds = new DataSet ();\r
AssertReadXml (ds, "Auto", schema1,\r
XmlReadMode.Auto, XmlReadMode.ReadSchema,\r
"NewDataSet", 1);\r
- AssertDataTable ("auto", ds.Tables [0], "Root", 1, 0);\r
+ AssertDataTable ("auto", ds.Tables [0], "Root", 1, 0, 0, 0);\r
\r
ds = new DataSet ();\r
AssertReadXml (ds, "DiffGram", schema1,\r
AssertReadXml (ds, "Fragment", schema2,\r
XmlReadMode.Fragment, XmlReadMode.Fragment,\r
"NewDataSet", 1);\r
- AssertDataTable ("fragment", ds.Tables [0], "Root", 1, 0);\r
+ AssertDataTable ("fragment", ds.Tables [0], "Root", 1, 0, 0, 0);\r
\r
// rest ... treated as schema\r
ds = new DataSet ();\r
AssertReadXml (ds, "Auto", schema2,\r
XmlReadMode.Auto, XmlReadMode.ReadSchema,\r
"NewDataSet", 1, ReadState.Interactive);\r
- AssertDataTable ("auto", ds.Tables [0], "Root", 1, 0);\r
+ AssertDataTable ("auto", ds.Tables [0], "Root", 1, 0, 0, 0);\r
\r
ds = new DataSet ();\r
AssertReadXml (ds, "DiffGram", schema2,\r
XmlReadMode.DiffGram, XmlReadMode.DiffGram,\r
"NewDataSet", 1, ReadState.Interactive);\r
- AssertDataTable ("diffgram", ds.Tables [0], "Root", 1, 0);\r
+ AssertDataTable ("diffgram", ds.Tables [0], "Root", 1, 0, 0, 0);\r
\r
ds = new DataSet ();\r
AssertReadXml (ds, "ReadSchema", schema2,\r
AssertReadXml (ds, "SimpleTable", xml6,\r
XmlReadMode.Auto, XmlReadMode.InferSchema,\r
"root", 1); // not NewDataSet unlike standalone load\r
- AssertDataTable ("seq1", ds.Tables [0], "root", 1, 1);\r
+ AssertDataTable ("seq1", ds.Tables [0], "root", 1, 1, 0, 0);\r
}\r
\r
[Test]\r
AssertReadXml (ds, "SimpleTable2", xml7,\r
XmlReadMode.Auto, XmlReadMode.InferSchema,\r
"root", 1); // dataset name will not be overwritten\r
- AssertDataTable ("#1", ds.Tables [0], "root", 2, 1);\r
+ AssertDataTable ("#1", ds.Tables [0], "root", 2, 1, 0, 0);\r
\r
// simple table -> simple dataset\r
ds = new DataSet ();\r
AssertReadXml (ds, "SimpleTable", xml6,\r
XmlReadMode.Auto, XmlReadMode.InferSchema,\r
"NewDataSet", 1);\r
- AssertDataTable ("#2", ds.Tables [0], "root", 1, 1);\r
+ AssertDataTable ("#2", ds.Tables [0], "root", 1, 1, 0, 0);\r
\r
// Return value became IgnoreSchema, since there is\r
// already schema information in the dataset.\r
AssertReadXml (ds, "SimpleTable2", xml7,\r
XmlReadMode.Auto, XmlReadMode.IgnoreSchema,\r
"NewDataSet", 1);\r
- AssertDataTable ("#3", ds.Tables [0], "root", 1, 2);\r
+ AssertDataTable ("#3", ds.Tables [0], "root", 1, 2, 0, 0);\r
\r
}\r
\r