私は xUnit と MOQ を使用しており、これをテストしようとしています:
public static class IEnumerableExtensions
{
    public static void ForEach<T>(this IEnumerable<T> list, Action<T> action)
    {
        foreach (var item in list)
            action(item);
    }
}
私はこれを試しましたが、契約はありません:
[Fact]
    public void ForEach()
    {
        var list = new List<string>() { "string1", "string2" };
        list.ForEach(x =>
        {
            x += "-passed";
        });
        foreach (var item in list)
            item.Should().EndWith("-passed");
    }
これをどのようにテストしますか?