private void DoTest(string MarkdownFileName, string XamlFileName)
        {
            string Markdown     = File.ReadAllText("Markdown/Syntax/" + MarkdownFileName);
            string ExpectedText = File.ReadAllText("XAML/" + XamlFileName);

            ExpectedText = ExpectedText.Replace("
\r", "
");
            Emoji1LocalFiles Emoji1LocalFiles = new Emoji1LocalFiles(Emoji1SourceFileType.Svg, 24, 24, "/emoji1/%FILENAME%", Path.Combine("Graphics", "Emoji1.zip"), "Graphics");

            MarkdownSettings Settings = new MarkdownSettings(Emoji1LocalFiles, true, new Variables())
            {
                HttpxProxy = "/HttpxProxy/%URL%"
            };

            Assert.IsTrue(Emoji1LocalFiles.WaitUntilInitialized(60000));

            MarkdownDocument Doc           = new MarkdownDocument(Markdown, Settings);
            string           GeneratedXaml = Doc.GenerateXAML(XML.WriterSettings(true, true));

            Console.Out.WriteLine(GeneratedXaml);
            Console.Out.WriteLine();
            Console.Out.WriteLine();
            Console.Out.WriteLine();

            MarkdownHtmlTests.AssertEqual(ExpectedText, GeneratedXaml, "Generated XAML does not match expected XAML.");
        }
Exemple #2
0
        private void DoTest(string MarkdownFileName, string PlainTextFileName)
        {
            string           Markdown         = File.ReadAllText("Markdown/" + MarkdownFileName);
            string           ExpectedText     = File.ReadAllText("PlainText/" + PlainTextFileName);
            Emoji1LocalFiles Emoji1LocalFiles = new Emoji1LocalFiles(Emoji1SourceFileType.Svg, 24, 24, "/emoji1/%FILENAME%", Path.Combine("Graphics", "Emoji1.zip"), "Graphics");

            MarkdownSettings Settings = new MarkdownSettings(Emoji1LocalFiles, true, new Variables())
            {
                HttpxProxy = "/HttpxProxy/%URL%"
            };

            Assert.IsTrue(Emoji1LocalFiles.WaitUntilInitialized(60000));

            MarkdownDocument Doc           = new MarkdownDocument(Markdown, Settings);
            string           GeneratedText = Doc.GeneratePlainText();

            Console.Out.WriteLine(GeneratedText);
            Console.Out.WriteLine();
            Console.Out.WriteLine();
            Console.Out.WriteLine();

            MarkdownHtmlTests.AssertEqual(ExpectedText, GeneratedText, "Generated Plain Text does not match expected Plain Text.");
        }