System.Xml.Tests.TCValidateElement.PassNull_LocalName_NamespaceUri_Invalid_First_Second_Overload C# (CSharp) Method

PassNull_LocalName_NamespaceUri_Invalid_First_Second_Overload() private method

private PassNull_LocalName_NamespaceUri_Invalid_First_Second_Overload ( String type, String overload ) : void
type String
overload String
return void
        public void PassNull_LocalName_NamespaceUri_Invalid_First_Second_Overload(String type, String overload)
        {
            XmlSchemaValidator val = CreateValidator(CreateSchemaSetFromXml("<root />"));
            string name = "root";
            string ns = "";
            XmlSchemaInfo info = new XmlSchemaInfo();

            if (type == "name")
                name = null;
            else
                ns = null;

            val.Initialize();
            try
            {
                if (overload == "first")
                    val.ValidateElement(name, ns, info);
                else
                    val.ValidateElement(name, ns, info, null, null, null, null);
            }
            catch (ArgumentNullException)
            {
                return;
            }

            Assert.True(false);
        }