Example #1
0
    public void AppendGroup()
    {
        var builder  = new StringBuilder();
        var snippets = new List <Snippet> {
            Snippet.Build(1, 2, "theValue", "thekey", "thelanguage", "thePath")
        };
        var gitHubSnippetMarkdownHandling = new SnippetMarkdownHandling(GitRepoDirectoryFinder.FindForFilePath());

        using (var writer = new StringWriter(builder))
        {
            gitHubSnippetMarkdownHandling.AppendGroup("key1", snippets, writer);
        }

        Approvals.Verify(builder.ToString());
    }
    public Task AppendGroup()
    {
        var builder  = new StringBuilder();
        var snippets = new List <Snippet> {
            Snippet.Build(1, 2, "theValue", "thekey", "thelanguage", "c:/dir/thePath")
        };
        var markdownHandling = new SnippetMarkdownHandling("c:/dir/", LinkFormat.GitHub);

        using (var writer = new StringWriter(builder))
        {
            markdownHandling.AppendGroup("key1", snippets, writer.WriteLine);
        }

        return(Verify(builder.ToString()));
    }