Esempio n. 1
0
        private void DoTest(string MarkdownFileName, string PlainTextFileName)
        {
            string           Markdown     = File.ReadAllText("Markdown/" + MarkdownFileName);
            string           ExpectedText = File.ReadAllText("PlainText/" + PlainTextFileName);
            MarkdownSettings Settings     = new MarkdownSettings(
                new Emoji1LocalFiles(Emoji1SourceFileType.Svg, 24, 24, "/emoji1/%FILENAME%", File.Exists, File.ReadAllBytes),
                true, new Variables())
            {
                HttpxProxy = "/HttpxProxy/%URL%"
            };
            MarkdownDocument Doc           = new MarkdownDocument(Markdown, Settings);
            string           GeneratedText = Doc.GeneratePlainText();

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

            HtmlTests.AssertEqual(ExpectedText, GeneratedText, "Generated Plain Text does not match expected Plain Text.");
        }
Esempio n. 2
0
        private void DoTest(string MarkdownFileName, string XamlFileName)
        {
            string Markdown     = File.ReadAllText("Markdown/" + MarkdownFileName);
            string ExpectedText = File.ReadAllText("XAML/" + XamlFileName);

            ExpectedText = ExpectedText.Replace("
\r", "
");
            MarkdownSettings Settings = new MarkdownSettings(
                new Emoji1LocalFiles(Emoji1SourceFileType.Svg, 24, 24, "/emoji1/%FILENAME%", File.Exists, File.ReadAllBytes),
                true, new Variables())
            {
                HttpxProxy = "/HttpxProxy/%URL%"
            };

            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();

            HtmlTests.AssertEqual(ExpectedText, GeneratedXaml, "Generated XAML does not match expected XAML.");
        }