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

v9() private méthode

private v9 ( ) : void
Résultat void
        public void v9()
        {
            try
            {
                XmlSchemaSet sc = new XmlSchemaSet();
                sc.Add(null, Path.Combine(TestData._Root, "import_v16_b.xsd"));

                //before compile
                XmlSchema parent = sc.Add(null, Path.Combine(TestData._Root, "import_v16_a.xsd"));
                sc.Compile();
                sc.RemoveRecursive(parent);
                CError.Compare(sc.Count, 1, "Count");
                CError.Compare(sc.Contains("ns-b"), true, "Contains");

                //after compile
                parent = sc.Add(null, Path.Combine(TestData._Root, "import_v16_a.xsd"));
                sc.RemoveRecursive(parent);
                CError.Compare(sc.Count, 1, "Count");
                CError.Compare(sc.Contains("ns-b"), true, "Contains");

                return;
            }
            catch (XmlSchemaException e)
            {
                _output.WriteLine("Exception : " + e.Message);
            }
            Assert.True(false);
        }