Sorry, I didn't get you. I have created a simple example:
public static class AssertionExtensions { public static CollectionAssertions<T> Should<T>(this IEnumerable<T> actual) { return new CollectionAssertions<T>(actual); } } public class CollectionAssertions<T> { private readonly IEnumerable<T> _actual; public CollectionAssertions(IEnumerable<T> actual) { _actual = actual; } public void Equal(IEnumerable<T> expected) { return; } } public class MainClass { public static void Main() { var actual = new List<int>() { 1, 2, 3 }; actual.Should().Equal(new List<int>() { 1, 2, 3 }); } }
I guess there is some difference between my code and FA code. But what is it?