Esempio n. 1
0
        public void Scenario(string name, string folder, string inputFile, string expectedFile)
        {
            var parser   = new CodeFileParser(folder);
            var snippets = parser.Parse(new[] { ".*code[.]cs" });

            var result = DocumentFileProcessor.Apply(snippets, inputFile);

            Assert.Equal(File.ReadAllText(expectedFile), result.Text);
        }
Esempio n. 2
0
        public void ApplySnippets_UsingFile_MatchesExpectedResult()
        {
            var directory  = @"data\apply-snippets\".ToCurrentDirectory();
            var inputFile  = Path.Combine(directory, @"input.md");
            var outputFile = Path.Combine(directory, @"output.md");

            var parser   = new CodeFileParser(directory);
            var snippets = parser.Parse(new[] { ".*code[.]cs" });

            var result = DocumentFileProcessor.Apply(snippets, inputFile);

            Assert.Equal(File.ReadAllText(outputFile), result.Text);
        }