Beispiel #1
0
        static public void BuildTree(HtmlTestFilesFixture fixture, string name)
        {
            string testFile     = fixture.GetDestinationPath(name);
            string baselineFile = testFile + ".tree";
            string text         = fixture.LoadDestinationFile(name);

            var tree = new HtmlTree(new TextStream(text), null, null, ParsingMode.Html);

            tree.Build();

            TreeWriter tw     = new TreeWriter();
            string     actual = tw.WriteTree(tree);

            if (_regenerateBaselineFiles)
            {
                // Update this to your actual enlistment if you need to update baseline
                baselineFile = Path.Combine(fixture.SourcePath, name) + ".tree";
                TestFiles.UpdateBaseline(baselineFile, actual);
            }
            else
            {
                TestFiles.CompareToBaseLine(baselineFile, actual);
            }
        }