In FluentAssertions, you can make various claims in various formats.
x.Should().BeEquivalentTo(y);
x.ShouldBeEquivalentTo(y);
are both valid assertions.
Why is Should
a method and not a property? I haven't seen any examples in which Should
takes a parameter, so it seems to me like it could have easily been a property.
You can also assert that
x.Should().NotBeNull().And.BeEquivalentTo(y);
Here, And
is a property instead of a method. Shouldn't And
and Should
each be the same type of element (methods/properties)?
TL;DR
Was there a valid reason behind the design choice to make Should
a method in FluentAssertions instead of a property?
And
property. – Broomfield