I have a .net 4.0 test project which is throwing a method not found exceptions for the Should() extension method.
Then I noticed it also was throwing exceptions for an int type as well.
Does anybody know why FluentAssertions V3 is behaving this way?
For now I am going back to my version 2.2.
For reference, this is the FluentAssersions project website https://github.com/dennisdoomen/fluentassertions/releases
here's the code sample:
var actualItems = new List<string> { "" };
actualItems.All(i => i == "X").Should().BeTrue("All items should be X") ;
here's an exceptions:
Error 237 'bool' does not contain a definition for 'Should'
and no extension method 'Should' accepting a first argument of type 'bool'
could be found (are you missing a using directive or an assembly reference?)
C:\pathtoproject\Tests.cs
That's because v3.0 requires .NET 4.0.3 for your test projects. This is the earliest version supported by the Portable Class Libraries. It's a bit confusing, but if you already installed .NET 4.5, you are already using 4.0.3. I have updated the release notes.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With