System.Xml.Tests.TC_SchemaSet_RemoveRecursive.v11 C# (CSharp) Méthode

v11() private méthode

private v11 ( object param0 ) : void
param0 object
Résultat void
        public void v11(object param0)
        {
            XmlSchemaSet sc = new XmlSchemaSet();
            sc.XmlResolver = new XmlUrlResolver();

            sc.ValidationEventHandler += new ValidationEventHandler(ValidationCallback);
            bWarningCallback = false;
            bErrorCallback = false;
            try
            {
                //after compile
                XmlSchema Schema1 = sc.Add(null, Path.Combine(TestData._Root, param0.ToString()));
                sc.Compile();
                CError.Compare(sc.Count, 4, "Count");
                sc.RemoveRecursive(Schema1);
                sc.Compile();
                CError.Compare(sc.Count, 0, "Count");
                CError.Compare(sc.GlobalElements.Count, 0, "Global Elements Count");
                CError.Compare(sc.GlobalTypes.Count, 0, "Global Types Count");//should contain xs:anyType

                //before compile
                Schema1 = sc.Add(null, Path.Combine(TestData._Root, param0.ToString()));
                CError.Compare(sc.Count, 4, "Count");
                sc.RemoveRecursive(Schema1);
                CError.Compare(sc.Count, 0, "Count");
                CError.Compare(sc.GlobalElements.Count, 0, "Global Elements Count");
                CError.Compare(sc.GlobalTypes.Count, 0, "Global Types Count"); //should contain xs:anyType
            }
            catch (Exception e)
            {
                _output.WriteLine(e.ToString());
                Assert.True(false);
            }
            return;
        }
    }