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

CallForElementWithoutTypeDefined() private method

private CallForElementWithoutTypeDefined ( ) : void
return void
        public void CallForElementWithoutTypeDefined()
        {
            XmlSchemaValidator val;
            XmlSchemaInfo info = new XmlSchemaInfo();
            XmlSchemaSet schemas = new XmlSchemaSet();
            XmlSchemaParticle[] result;

            val = CreateValidator(XSDFILE_GET_EXPECTED_PARTICLES);

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

            result = val.GetExpectedParticles();

            Assert.Equal(result.Length, 1);

            Assert.True(result[0] is XmlSchemaAny);
            Assert.Equal((result[0] as XmlSchemaAny).Namespace, null);
            Assert.Equal((result[0] as XmlSchemaAny).ProcessContents, XmlSchemaContentProcessing.Lax);

            return;
        }