System.Data.Tests.DataSetReadXmlSchemaTest.TestMoreThanOneRepeatableColumns C# (CSharp) Метод

TestMoreThanOneRepeatableColumns() приватный Метод

private TestMoreThanOneRepeatableColumns ( ) : void
Результат void
        public void TestMoreThanOneRepeatableColumns()
        {
            var ds = new DataSet();
            ds.ReadXmlSchema(new StringReader(
                @"<xsd:schema xmlns:xsd=""http://www.w3.org/2001/XMLSchema"">
	                <xsd:element name=""root"">
		                <xsd:complexType>
			                <xsd:sequence>
				                <xsd:element name=""x"" maxOccurs=""2"" />
				                <xsd:element ref=""y"" maxOccurs=""unbounded"" />
			                </xsd:sequence>
		                </xsd:complexType>
	                </xsd:element>
	                <xsd:element name=""y"" />
                </xsd:schema>"));
            AssertDataSet("014", ds, "NewDataSet", 3, 2);

            DataTable dt = ds.Tables[0];
            AssertDataTable("parent", dt, "root", 1, 0, 0, 2, 1, 1);
            AssertDataColumn("key", dt.Columns[0], "root_Id", false, true, 0, 1, "root_Id", MappingType.Hidden, typeof(int), DBNull.Value, string.Empty, -1, string.Empty, 0, string.Empty, false, true);

            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, 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, 1, string.Empty, false, false);

            AssertDataRelation("rel", ds.Relations[0], "root_x", true, new string[] { "root_Id" }, new string[] { "root_Id" }, true, true);

            AssertDataRelation("rel", ds.Relations[1], "root_y", true, new string[] { "root_Id" }, new string[] { "root_Id" }, true, true);
        }