System.Data.Tests.DataSetTest.IgnoreColumnEmptyNamespace C# (CSharp) Method

IgnoreColumnEmptyNamespace() private method

private IgnoreColumnEmptyNamespace ( ) : void
return void
        public void IgnoreColumnEmptyNamespace()
        {
            DataColumn col = new DataColumn("TEST");
            col.Namespace = "urn:foo";
            DataSet ds = new DataSet("DS");
            ds.Namespace = "urn:foo";
            DataTable dt = new DataTable("tab");
            ds.Tables.Add(dt);
            dt.Columns.Add(col);
            dt.Rows.Add(new object[] { "test" });
            StringWriter sw = new StringWriter();
            ds.WriteXml(new XmlTextWriter(sw));
            string xml = @"<DS xmlns=""urn:foo""><tab><TEST>test</TEST></tab></DS>";
            Assert.Equal(xml, sw.ToString());
        }