public void RepeatableSimpleElement()
{
var ds = new DataSet();
ds.ReadXmlSchema(new StringReader(
@"<xs:schema xmlns:xs='http://www.w3.org/2001/XMLSchema'>
<!-- empty -->
<xs:element name='Foo' type='FooType' />
<!-- defining externally to avoid being regarded as dataset element -->
<xs:complexType name='FooType'>
<xs:sequence>
<xs:element name='Bar' maxOccurs='2' />
</xs:sequence>
</xs:complexType>
</xs:schema>"));
AssertDataSet("012", ds, "NewDataSet", 2, 1);
DataTable dt = ds.Tables[0];
AssertDataTable("parent", dt, "Foo", 1, 0, 0, 1, 1, 1);
AssertDataColumn("key", dt.Columns[0], "Foo_Id", false, true, 0, 1, "Foo_Id", MappingType.Hidden, typeof(int), DBNull.Value, string.Empty, -1, string.Empty, 0, string.Empty, false, true);
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, 1, string.Empty, false, false);
AssertDataRelation("rel", ds.Relations[0], "Foo_Bar", true, new string[] { "Foo_Id" }, new string[] { "Foo_Id" }, true, true);
}