System.Xml.Tests.TC_SchemaSet_Misc.GetBuiltinSimpleTypeWorksAsEcpected C# (CSharp) Method

GetBuiltinSimpleTypeWorksAsEcpected() private method

private GetBuiltinSimpleTypeWorksAsEcpected ( ) : void
return void
        public void GetBuiltinSimpleTypeWorksAsEcpected()
        {
            Initialize();
            string xml = "<?xml version=\"1.0\" encoding=\"utf-16\"?>" + "\r\n" +
 "<xs:schema xmlns:xs=\"http://www.w3.org/2001/XMLSchema\">" + "\r\n" +
 "  <xs:simpleType>" + "\r\n" +
 "    <xs:restriction base=\"xs:anySimpleType\" />" + "\r\n" +
 "  </xs:simpleType>" + "\r\n" +
 "</xs:schema>";
            XmlSchema schema = new XmlSchema();
            XmlSchemaSimpleType stringType = XmlSchemaType.GetBuiltInSimpleType(XmlTypeCode.String);
            schema.Items.Add(stringType);
            StringWriter sw = new StringWriter();
            schema.Write(sw);
            CError.Compare(sw.ToString(), xml, "Mismatch");
            return;
        }