System.Xml.Tests.CLoadXmlResolverTest.LoadGeneric12 C# (CSharp) Méthode

LoadGeneric12() private méthode

private LoadGeneric12 ( ) : void
Résultat void
        public void LoadGeneric12()
        {
            if (LoadXSL_Resolver("showParam.xsl", null) == 1)
            {
                try
                {
                    LoadXSL_Resolver("IDontExist.xsl", null);
                }
                catch (System.IO.FileNotFoundException)
                {
                    //no stylesheet loaded, should throw error
                    try
                    {
                        Transform("fruits.xml");
                    }
                    catch (System.InvalidOperationException e2)
                    {
                        CheckExpectedError(e2, "system.xml", "Xslt_NoStylesheetLoaded", new string[] { "IDontExist.xsl" });
                        return;
                    }
                }
                _output.WriteLine("Exception not generated for non-existent file parameter name");
            }
            else
            {
                _output.WriteLine("Errors loading initial file");
                Assert.True(false);
            }
            Assert.True(false);
        }
    }