System.Xml.Tests.TCGetExpectedParticles.CallForElementWithReferenceToGlobalElement C# (CSharp) Method

CallForElementWithReferenceToGlobalElement() private method

private CallForElementWithReferenceToGlobalElement ( ) : void
return void
        public void CallForElementWithReferenceToGlobalElement()
        {
            XmlSchemaValidator val = CreateValidator(XSDFILE_GET_EXPECTED_PARTICLES);
            XmlSchemaInfo info = new XmlSchemaInfo();

            val.Initialize();
            val.ValidateElement("ReferenceElement", "", info);
            val.ValidateEndOfAttributes(null);

            foreach (string elem in new string[] { "NestedElement", "foo", "bar" })
            {
                CheckExpectedElements(val.GetExpectedParticles(), new XmlQualifiedName[] { new XmlQualifiedName(elem) });

                val.ValidateElement(elem, "", info);
                val.ValidateEndOfAttributes(null);
            }

            foreach (string elem in new string[] { "bar", "foo", "NestedElement" })
            {
                val.ValidateEndElement(info);
                CheckExpectedElements(val.GetExpectedParticles(), new XmlQualifiedName[] { });
            }

            return;
        }