using ClaudeDo.Worker.Runner;

namespace ClaudeDo.Worker.Tests.Runner;

public class ReviewResultTests
{
    [Fact]
    public void No_blocks_returns_result_unchanged()
    {
        Assert.Equal("done", TaskRunner.ComposeReviewResult("done", Array.Empty<string>()));
    }

    [Fact]
    public void Blocks_are_appended_as_a_section()
    {
        var outp = TaskRunner.ComposeReviewResult("done", new[] { "no creds", "db down" });
        Assert.Contains("⚠ Roadblocks", outp);
        Assert.Contains("- no creds", outp);
        Assert.Contains("- db down", outp);
        Assert.Contains("done", outp);
    }

    [Fact]
    public void Null_result_with_blocks_still_lists_them()
    {
        var outp = TaskRunner.ComposeReviewResult(null, new[] { "x" });
        Assert.Contains("⚠ Roadblocks", outp);
        Assert.Contains("- x", outp);
    }
}
