From 9f24e3e50144ef697e161f368e4f1a1ef88dd530 Mon Sep 17 00:00:00 2001 From: Atsushi Eno Date: Mon, 17 May 2004 15:28:12 +0000 Subject: [PATCH] 2004-05-17 Atsushi Enomoto * DataSetAssertion.cs : Enabled "Ordinal" check again, unless the test value is -1. * DataSetInferXmlSchemaTest.cs, DataSetReadXmlSchemaTest.cs : Enabled Ordinal check again, as long as working. Added IgnoredNamespaces() to inferxmlschema test. svn path=/trunk/mcs/; revision=27520 --- .../System.Data/Test/System.Data/ChangeLog | 8 +++ .../Test/System.Data/DataSetAssertion.cs | 3 +- .../System.Data/DataSetInferXmlSchemaTest.cs | 70 ++++++++++++------- .../System.Data/DataSetReadXmlSchemaTest.cs | 46 ++++++------ 4 files changed, 76 insertions(+), 51 deletions(-) diff --git a/mcs/class/System.Data/Test/System.Data/ChangeLog b/mcs/class/System.Data/Test/System.Data/ChangeLog index b435d14c941..6e216f3b5de 100644 --- a/mcs/class/System.Data/Test/System.Data/ChangeLog +++ b/mcs/class/System.Data/Test/System.Data/ChangeLog @@ -1,3 +1,11 @@ +2004-05-17 Atsushi Enomoto + + * DataSetAssertion.cs : Enabled "Ordinal" check again, unless the test + value is -1. + * DataSetInferXmlSchemaTest.cs, + DataSetReadXmlSchemaTest.cs : Enabled Ordinal check again, as long + as working. Added IgnoredNamespaces() to inferxmlschema test. + 2004-05-14 Atsushi Enomoto * DataSetReadXmlSchemaTest.cs : Added test014.xsd tes (contains two diff --git a/mcs/class/System.Data/Test/System.Data/DataSetAssertion.cs b/mcs/class/System.Data/Test/System.Data/DataSetAssertion.cs index 0867a3bc76d..b7734da9fc2 100755 --- a/mcs/class/System.Data/Test/System.Data/DataSetAssertion.cs +++ b/mcs/class/System.Data/Test/System.Data/DataSetAssertion.cs @@ -120,7 +120,8 @@ namespace MonoTests.System.Data AssertEquals (label + "Expression: " , expression, col.Expression); AssertEquals (label + "MaxLength: " , maxLength, col.MaxLength); AssertEquals (label + "Namespace: " , ns, col.Namespace); -// AssertEquals (label + "Ordinal: " , ordinal, col.Ordinal); + if (ordinal >= 0) + AssertEquals (label + "Ordinal: " , ordinal, col.Ordinal); AssertEquals (label + "Prefix: " , prefix, col.Prefix); AssertEquals (label + "ReadOnly: " , readOnly, col.ReadOnly); AssertEquals (label + "Unique: " , unique, col.Unique); diff --git a/mcs/class/System.Data/Test/System.Data/DataSetInferXmlSchemaTest.cs b/mcs/class/System.Data/Test/System.Data/DataSetInferXmlSchemaTest.cs index 11881801fba..a81644363b3 100755 --- a/mcs/class/System.Data/Test/System.Data/DataSetInferXmlSchemaTest.cs +++ b/mcs/class/System.Data/Test/System.Data/DataSetInferXmlSchemaTest.cs @@ -251,33 +251,33 @@ namespace MonoTests.System.Data AssertDataSet ("ds", ds, "NewDataSet", 4, 3); DataTable dt = ds.Tables [0]; - AssertDataTable ("dt", dt, "el1", 3, 0, 0, 1, 1, 1); - AssertDataColumn ("el1_Id", dt.Columns ["el1_Id"], "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 ["attr1"], "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 ["attrA"], "attrA", true, false, 0, 1, "attrA", MappingType.Attribute, typeof (string), DBNull.Value, String.Empty, -1, String.Empty, 2, String.Empty, false, false); + AssertDataTable ("dt1", dt, "el1", 3, 0, 0, 1, 1, 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, 1, 2, 2, 1); - AssertDataColumn ("el2_Id", dt.Columns ["el2_Id"], "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 ["column2"], "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 ["column3"], "column3", true, false, 0, 1, "column3", MappingType.Element, typeof (string), DBNull.Value, String.Empty, -1, String.Empty, 2, String.Empty, false, false); - AssertDataColumn ("el2_attr2", dt.Columns ["attr2"], "attr2", true, false, 0, 1, "attr2", MappingType.Attribute, typeof (string), DBNull.Value, String.Empty, -1, String.Empty, 3, String.Empty, false, false); - AssertDataColumn ("el2_attrB", dt.Columns ["attrB"], "attrB", true, false, 0, 1, "attrB", MappingType.Attribute, typeof (string), DBNull.Value, String.Empty, -1, String.Empty, 4, String.Empty, false, false); - AssertDataColumn ("el2_el1Id", dt.Columns ["el1_Id"], "el1_Id", true, false, 0, 1, "el1_Id", MappingType.Hidden, typeof (int), DBNull.Value, String.Empty, -1, String.Empty, 5, String.Empty, false, false); + AssertDataTable ("dt2", dt, "el2", 6, 0, 1, 2, 2, 1); + 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_attr2", dt.Columns [3], "attr2", true, false, 0, 1, "attr2", MappingType.Attribute, typeof (string), DBNull.Value, String.Empty, -1, String.Empty, 3, String.Empty, false, false); + AssertDataColumn ("el2_attrB", dt.Columns [4], "attrB", true, false, 0, 1, "attrB", MappingType.Attribute, typeof (string), DBNull.Value, String.Empty, -1, String.Empty, 4, 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, 1, 0, 1, 0); - AssertDataColumn ("el3_attr3", dt.Columns ["attr3"], "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 ["attrC"], "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 ["el3_Text"], "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 ["el2_Id"], "el2_Id", true, false, 0, 1, "el2_Id", MappingType.Hidden, typeof (int), DBNull.Value, String.Empty, -1, String.Empty, 3, String.Empty, false, false); + AssertDataTable ("dt3", dt, "el3", 4, 0, 1, 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, 1, 0, 1, 0); - AssertDataColumn ("el3_attr4", dt.Columns ["attr4"], "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 ["attrD"], "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 ["el4_Text"], "el4_Text", true, false, 0, 1, "el4_Text", MappingType.SimpleContent, typeof (string), DBNull.Value, String.Empty, -1, String.Empty, 2, String.Empty, false, false); - AssertDataColumn ("el4_el2Id", dt.Columns ["el2_Id"], "el2_Id", true, false, 0, 1, "el2_Id", MappingType.Hidden, typeof (int), DBNull.Value, String.Empty, -1, String.Empty, 3, String.Empty, false, false); + AssertDataTable ("dt4", dt, "el4", 4, 0, 1, 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); + AssertDataColumn ("el4_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); } [Test] @@ -301,8 +301,8 @@ namespace MonoTests.System.Data AssertDataSet ("ds", ds, "NewDataSet", 1, 0); DataTable dt = ds.Tables [0]; AssertDataTable ("dt", dt, "root", 2, 0, 0, 0, 0, 0); - AssertDataColumn ("element", dt.Columns ["child_after_significant_space"], "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 ["space"], "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); + 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); } [Test] @@ -403,8 +403,8 @@ namespace MonoTests.System.Data dt = ds.Tables [1]; AssertDataTable ("dt", dt, "col", 2, 0, 1, 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); + AssertDataColumn ("table_refId", dt.Columns ["table_Id"], "table_Id", true, false, 0, 1, "table_Id", MappingType.Hidden, typeof (int), DBNull.Value, String.Empty, -1, String.Empty, /*0*/-1, String.Empty, false, false); + AssertDataColumn ("another_col", dt.Columns ["another_col"], "another_col", true, false, 0, 1, "another_col", MappingType.Element, typeof (string), DBNull.Value, String.Empty, -1, String.Empty, /*1*/-1, String.Empty, false, false); DataRelation dr = ds.Relations [0]; AssertDataRelation ("rel", dr, "table_col", true, new string [] {"table_Id"}, new string [] {"table_Id"}, true, true); @@ -426,8 +426,8 @@ namespace MonoTests.System.Data dt = ds.Tables [1]; AssertDataTable ("dt", dt, "col", 3, 0, 1, 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); + AssertDataColumn ("table_refId", dt.Columns ["table_Id"], "table_Id", true, false, 0, 1, "table_Id", MappingType.Hidden, typeof (int), DBNull.Value, String.Empty, -1, String.Empty, /*1*/-1, String.Empty, false, false); + AssertDataColumn ("attr", dt.Columns ["attr"], "attr", true, false, 0, 1, "attr", MappingType.Attribute, typeof (string), DBNull.Value, String.Empty, -1, String.Empty, /*2*/-1, String.Empty, false, false); DataRelation dr = ds.Relations [0]; AssertDataRelation ("rel", dr, "table_col", true, new string [] {"table_Id"}, new string [] {"table_Id"}, true, true); @@ -459,5 +459,21 @@ namespace MonoTests.System.Data xtr.Read (); ds.ReadXml (xtr, XmlReadMode.InferSchema); } + + [Test] + public void IgnoredNamespaces () + { + string xml = ""; + DataSet ds = new DataSet (); + ds.InferXmlSchema (new StringReader (xml), null); + AssertDataSet ("ds", ds, "NewDataSet", 1, 0); + AssertDataTable ("dt", ds.Tables [0], "root", 2, 0, 0, 0, 0, 0); + + ds = new DataSet (); + ds.InferXmlSchema (new StringReader (xml), new string [] {"urn:foo"}); + AssertDataSet ("ds", ds, "NewDataSet", 1, 0); + // a:foo is ignored + AssertDataTable ("dt", ds.Tables [0], "root", 1, 0, 0, 0, 0, 0); + } } } diff --git a/mcs/class/System.Data/Test/System.Data/DataSetReadXmlSchemaTest.cs b/mcs/class/System.Data/Test/System.Data/DataSetReadXmlSchemaTest.cs index 8751c22797b..c6b9b5cfe20 100755 --- a/mcs/class/System.Data/Test/System.Data/DataSetReadXmlSchemaTest.cs +++ b/mcs/class/System.Data/Test/System.Data/DataSetReadXmlSchemaTest.cs @@ -132,9 +132,9 @@ namespace MonoTests.System.Data AssertDataTable ("complex", ds.Tables [0], "Root", 1, 0, 0, 1, 1, 1); DataTable dt = ds.Tables [1]; AssertDataTable ("complex", dt, "Child", 3, 0, 1, 0, 1, 0); - AssertDataColumn ("a1", dt.Columns ["a1"], "a1", true, false, 0, 1, "a1", MappingType.Attribute, typeof (string), DBNull.Value, String.Empty, -1, String.Empty, 0, String.Empty, false, false); - AssertDataColumn ("a2", dt.Columns ["a2"], "a2", true, false, 0, 1, "a2", MappingType.Attribute, typeof (long), DBNull.Value, String.Empty, -1, String.Empty, 1, String.Empty, false, false); - AssertDataColumn ("Root_Id", dt.Columns ["Root_Id"], "Root_Id", true, false, 0, 1, "Root_Id", MappingType.Hidden, typeof (int), DBNull.Value, String.Empty, -1, String.Empty, 2, String.Empty, false, false); + AssertDataColumn ("a1", dt.Columns ["a1"], "a1", true, false, 0, 1, "a1", MappingType.Attribute, typeof (string), DBNull.Value, String.Empty, -1, String.Empty, /*0*/-1, String.Empty, false, false); + AssertDataColumn ("a2", dt.Columns ["a2"], "a2", true, false, 0, 1, "a2", MappingType.Attribute, typeof (long), DBNull.Value, String.Empty, -1, String.Empty, /*1*/-1, String.Empty, false, false); + 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); // xsbase + complex -> dataset ds = new DataSet (); @@ -502,15 +502,15 @@ namespace MonoTests.System.Data DataTable dt = ds.Tables [0]; AssertDataTable ("tab", dt, "foo", 2, 0, 0, 0, 0, 0); AssertDataColumn ("attr", 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 ("text", dt.Columns [1], "foo_text", false, false, 0, 1, "foo_text", MappingType.SimpleContent, typeof (long), DBNull.Value, String.Empty, -1, String.Empty, 0, String.Empty, false, false); + AssertDataColumn ("text", dt.Columns [1], "foo_text", false, false, 0, 1, "foo_text", MappingType.SimpleContent, typeof (long), DBNull.Value, String.Empty, -1, String.Empty, 1, String.Empty, false, false); ds = new DataSet (); ds.ReadXmlSchema ("Test/System.Data/schemas/test006.xsd"); AssertDataSet ("006", ds, "NewDataSet", 1, 0); dt = ds.Tables [0]; AssertDataTable ("tab", dt, "foo", 2, 0, 0, 0, 0, 0); - AssertDataColumn ("att1", dt.Columns ["att1"], "att1", true, false, 0, 1, "att1", MappingType.Attribute, typeof (string), DBNull.Value, String.Empty, -1, String.Empty, 0, String.Empty, false, false); - AssertDataColumn ("att2", dt.Columns ["att2"], "att2", true, false, 0, 1, "att2", MappingType.Attribute, typeof (int), 2, String.Empty, -1, String.Empty, 1, String.Empty, false, false); + AssertDataColumn ("att1", dt.Columns ["att1"], "att1", true, false, 0, 1, "att1", MappingType.Attribute, typeof (string), DBNull.Value, String.Empty, -1, String.Empty, /*0*/-1, String.Empty, false, false); + AssertDataColumn ("att2", dt.Columns ["att2"], "att2", true, false, 0, 1, "att2", MappingType.Attribute, typeof (int), 2, String.Empty, -1, String.Empty, /*1*/-1, String.Empty, false, false); } [Test] @@ -526,7 +526,7 @@ namespace MonoTests.System.Data dt = ds.Tables [1]; AssertDataTable ("tab2", dt, "des", 2, 0, 1, 0, 1, 0); - AssertDataColumn ("child", dt.Columns [0], "tres", false, false, 0, 1, "tres", MappingType.Element, typeof (string), DBNull.Value, String.Empty, -1, String.Empty, 1, String.Empty, false, false); + AssertDataColumn ("child", dt.Columns [0], "tres", false, false, 0, 1, "tres", MappingType.Element, typeof (string), DBNull.Value, String.Empty, -1, String.Empty, 0, String.Empty, false, false); AssertDataColumn ("id", dt.Columns [1], "uno_Id", true, false, 0, 1, "uno_Id", MappingType.Hidden, typeof (int), DBNull.Value, String.Empty, -1, String.Empty, 1, String.Empty, false, false); // External simple type element @@ -539,7 +539,7 @@ namespace MonoTests.System.Data dt = ds.Tables [1]; AssertDataTable ("tab2", dt, "des", 2, 0, 1, 0, 1, 0); - AssertDataColumn ("child", dt.Columns [0], "tres", false, false, 0, 1, "tres", MappingType.Element, typeof (string), DBNull.Value, String.Empty, -1, "urn:foo", 1, String.Empty, false, false); + AssertDataColumn ("child", dt.Columns [0], "tres", false, false, 0, 1, "tres", MappingType.Element, typeof (string), DBNull.Value, String.Empty, -1, "urn:foo", 0, String.Empty, false, false); AssertDataColumn ("id", dt.Columns [1], "uno_Id", true, false, 0, 1, "uno_Id", MappingType.Hidden, typeof (int), DBNull.Value, String.Empty, -1, String.Empty, 1, String.Empty, false, false); } @@ -563,15 +563,15 @@ namespace MonoTests.System.Data // Columns[0], even though "local" is defined in prior. dt = ds.Tables [1]; AssertDataTable ("dos", dt, "des", 4, 0, 1, 0, 1, 0); - AssertDataColumn ("dos.child", dt.Columns ["local"], "local", true, false, 0, 1, "local", MappingType.Attribute, typeof (string), "san", String.Empty, -1, String.Empty, 1, String.Empty, false, false); + AssertDataColumn ("dos.child", dt.Columns ["local"], "local", true, false, 0, 1, "local", MappingType.Attribute, typeof (string), "san", String.Empty, -1, String.Empty, /*0*/-1, String.Empty, false, false); // LAMESPEC: (MS BUG) default value is overwritten, but MS.NET is ignorant of that. #if BUGGY_MS_COMPATIBLE - AssertDataColumn ("dos.global", dt.Columns ["global"], "global", true, false, 0, 1, "global", MappingType.Attribute, typeof (string), "er", String.Empty, -1, "urn:foo", 0, String.Empty, false, false); + AssertDataColumn ("dos.global", dt.Columns ["global"], "global", true, false, 0, 1, "global", MappingType.Attribute, typeof (string), "er", String.Empty, -1, "urn:foo", /*1*/-1, String.Empty, false, false); #else - AssertDataColumn ("dos.global", dt.Columns ["global"], "global", true, false, 0, 1, "global", MappingType.Attribute, typeof (string), "si", String.Empty, -1, "urn:foo", 0, String.Empty, false, false); + AssertDataColumn ("dos.global", dt.Columns ["global"], "global", true, false, 0, 1, "global", MappingType.Attribute, typeof (string), "si", String.Empty, -1, "urn:foo", /*1*/-1, String.Empty, false, false); #endif - AssertDataColumn ("dos.tres", dt.Columns ["tres"], "tres", false, false, 0, 1, "tres", MappingType.Element, typeof (string), "yi", String.Empty, -1, "urn:foo", 1, String.Empty, false, false); - AssertDataColumn ("id", dt.Columns ["uno_Id"], "uno_Id", true, false, 0, 1, "uno_Id", MappingType.Hidden, typeof (int), DBNull.Value, String.Empty, -1, String.Empty, 1, String.Empty, false, false); + AssertDataColumn ("dos.tres", dt.Columns [2], "tres", false, false, 0, 1, "tres", MappingType.Element, typeof (string), "yi", String.Empty, -1, "urn:foo", 2, String.Empty, false, false); + AssertDataColumn ("id", dt.Columns [3], "uno_Id", true, false, 0, 1, "uno_Id", MappingType.Hidden, typeof (int), DBNull.Value, String.Empty, -1, String.Empty, 3, String.Empty, false, false); AssertDataRelation ("rel", ds.Relations [0], "uno_des", true, new string [] {"uno_Id"}, new string [] {"uno_Id"}, true, true); } @@ -598,8 +598,8 @@ namespace MonoTests.System.Data DataTable dt = ds.Tables [0]; AssertDataTable ("root", dt, "e", 3, 0, 1, 0, 1, 0); AssertDataColumn ("attr", dt.Columns [0], "a", true, false, 0, 1, "a", MappingType.Attribute, typeof (string), DBNull.Value, String.Empty, -1, "http://xsdtesting", 0, String.Empty, false, false); - AssertDataColumn ("simple", dt.Columns [1], "e_text", false, false, 0, 1, "e_text", MappingType.SimpleContent, typeof (decimal), DBNull.Value, String.Empty, -1, "http://xsdtesting", 0, String.Empty, false, false); - AssertDataColumn ("hidden", dt.Columns [2], "root_Id", true, false, 0, 1, "root_Id", MappingType.Hidden, typeof (int), DBNull.Value, String.Empty, -1, "http://xsdtesting", 0, String.Empty, false, false); + AssertDataColumn ("simple", dt.Columns [1], "e_text", false, false, 0, 1, "e_text", MappingType.SimpleContent, typeof (decimal), DBNull.Value, String.Empty, -1, "http://xsdtesting", 1, String.Empty, false, false); + AssertDataColumn ("hidden", dt.Columns [2], "root_Id", true, false, 0, 1, "root_Id", MappingType.Hidden, typeof (int), DBNull.Value, String.Empty, -1, "http://xsdtesting", 2, String.Empty, false, false); dt = ds.Tables [1]; AssertDataTable ("root", dt, "root", 1, 0, 0, 1, 1, 1); @@ -618,7 +618,7 @@ namespace MonoTests.System.Data DataTable dt = ds.Tables [0]; AssertDataTable ("root", dt, "e", 2, 0, 0, 0, 0, 0); AssertDataColumn ("attr", dt.Columns [0], "a", true, false, 0, 1, "a", MappingType.Attribute, typeof (string), DBNull.Value, String.Empty, -1, String.Empty, 0, String.Empty, false, false); - AssertDataColumn ("simple", dt.Columns [1], "e_text", false, false, 0, 1, "e_text", MappingType.SimpleContent, typeof (decimal), DBNull.Value, String.Empty, -1, String.Empty, 0, String.Empty, false, false); + AssertDataColumn ("simple", dt.Columns [1], "e_text", false, false, 0, 1, "e_text", MappingType.SimpleContent, typeof (decimal), DBNull.Value, String.Empty, -1, String.Empty, 1, String.Empty, false, false); } [Test] @@ -629,11 +629,11 @@ namespace MonoTests.System.Data AssertDataSet ("101", ds, "root", 2, 1); DataTable dt = ds.Tables [0]; AssertDataTable ("parent_table", dt, "p", 2, 0, 0, 1, 0, 0); - AssertDataColumn ("pk", dt.Columns ["pk"], "pk", false, false, 0, 1, "pk", MappingType.Element, typeof (string), DBNull.Value, String.Empty, -1, String.Empty, 0, String.Empty, false, false); + AssertDataColumn ("pk", dt.Columns [0], "pk", false, false, 0, 1, "pk", MappingType.Element, typeof (string), DBNull.Value, String.Empty, -1, String.Empty, 0, String.Empty, false, false); dt = ds.Tables [1]; AssertDataTable ("child_table", dt, "c", 2, 0, 1, 0, 0, 0); - AssertDataColumn ("fk", dt.Columns ["fk"], "fk", false, false, 0, 1, "fk", MappingType.Element, typeof (string), DBNull.Value, String.Empty, -1, String.Empty, 0, String.Empty, false, false); + AssertDataColumn ("fk", dt.Columns [0], "fk", false, false, 0, 1, "fk", MappingType.Element, typeof (string), DBNull.Value, String.Empty, -1, String.Empty, 0, String.Empty, false, false); AssertDataRelation ("rel", ds.Relations [0], "rel", false, new string [] {"pk"}, new string [] {"fk"}, false, false); } @@ -646,11 +646,11 @@ namespace MonoTests.System.Data AssertDataSet ("102", ds, "ds", 2, 1); DataTable dt = ds.Tables [0]; AssertDataTable ("parent_table", dt, "p", 2, 0, 0, 1, 0, 0); - AssertDataColumn ("pk", dt.Columns ["pk"], "pk", false, false, 0, 1, "pk", MappingType.Element, typeof (string), DBNull.Value, String.Empty, -1, String.Empty, 0, String.Empty, false, false); + AssertDataColumn ("pk", dt.Columns [0], "pk", false, false, 0, 1, "pk", MappingType.Element, typeof (string), DBNull.Value, String.Empty, -1, String.Empty, 0, String.Empty, false, false); dt = ds.Tables [1]; AssertDataTable ("child_table", dt, "c", 2, 0, 1, 0, 0, 0); - AssertDataColumn ("fk", dt.Columns ["fk"], "fk", false, false, 0, 1, "fk", MappingType.Element, typeof (string), DBNull.Value, String.Empty, -1, String.Empty, 0, String.Empty, false, false); + AssertDataColumn ("fk", dt.Columns [0], "fk", false, false, 0, 1, "fk", MappingType.Element, typeof (string), DBNull.Value, String.Empty, -1, String.Empty, 0, String.Empty, false, false); AssertDataRelation ("rel", ds.Relations [0], "rel", true, new string [] {"pk"}, new string [] {"fk"}, false, false); } @@ -668,7 +668,7 @@ namespace MonoTests.System.Data dt = ds.Tables [1]; AssertDataTable ("repeated", dt, "Bar", 2, 0, 1, 0, 1, 0); AssertDataColumn ("data", dt.Columns [0], "Bar_Column", false, false, 0, 1, "Bar_Column", MappingType.SimpleContent, typeof (string), DBNull.Value, String.Empty, -1, String.Empty, 0, String.Empty, false, false); - AssertDataColumn ("refkey", dt.Columns [1], "Foo_Id", true, false, 0, 1, "Foo_Id", MappingType.Hidden, typeof (int), DBNull.Value, String.Empty, -1, String.Empty, 0, String.Empty, false, false); + AssertDataColumn ("refkey", dt.Columns [1], "Foo_Id", true, false, 0, 1, "Foo_Id", MappingType.Hidden, typeof (int), DBNull.Value, String.Empty, -1, String.Empty, 1, String.Empty, false, false); AssertDataRelation ("rel", ds.Relations [0], "Foo_Bar", true, new string [] {"Foo_Id"}, new string [] {"Foo_Id"}, true, true); } @@ -687,12 +687,12 @@ namespace MonoTests.System.Data dt = ds.Tables [1]; AssertDataTable ("repeated", dt, "x", 2, 0, 1, 0, 1, 0); AssertDataColumn ("data_1", dt.Columns [0], "x_Column", false, false, 0, 1, "x_Column", MappingType.SimpleContent, typeof (string), DBNull.Value, String.Empty, -1, String.Empty, 0, String.Empty, false, false); - AssertDataColumn ("refkey_1", dt.Columns [1], "root_Id", true, false, 0, 1, "root_Id", MappingType.Hidden, typeof (int), DBNull.Value, String.Empty, -1, String.Empty, 0, String.Empty, false, false); + AssertDataColumn ("refkey_1", dt.Columns [1], "root_Id", true, false, 0, 1, "root_Id", MappingType.Hidden, typeof (int), DBNull.Value, String.Empty, -1, String.Empty, 1, String.Empty, false, false); dt = ds.Tables [2]; AssertDataTable ("repeated", dt, "y", 2, 0, 1, 0, 1, 0); AssertDataColumn ("data", dt.Columns [0], "y_Column", false, false, 0, 1, "y_Column", MappingType.SimpleContent, typeof (string), DBNull.Value, String.Empty, -1, String.Empty, 0, String.Empty, false, false); - AssertDataColumn ("refkey", dt.Columns [1], "root_Id", true, false, 0, 1, "root_Id", MappingType.Hidden, typeof (int), DBNull.Value, String.Empty, -1, String.Empty, 0, String.Empty, false, false); + AssertDataColumn ("refkey", dt.Columns [1], "root_Id", true, false, 0, 1, "root_Id", MappingType.Hidden, typeof (int), DBNull.Value, String.Empty, -1, String.Empty, 1, String.Empty, false, false); AssertDataRelation ("rel", ds.Relations [0], "root_x", true, new string [] {"root_Id"}, new string [] {"root_Id"}, true, true); -- 2.25.1