You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Compiler error Argument type 'System.Nullable<bool>' is not assignable to parameter type 'bool':
Versions
Which version of Fluent Assertions are you using? → 6.5.1
Which .NET runtime and version are you targeting? E.g. .NET framework 4.6.1 or .NET Core 2.1. → net6.0
Additional Information
I'm happy to provide a PR if you consider this feature useful. As far as I see, it should only be something like this in NullableBooleanAssertions:
publicAndConstraint<TAssertions>NotBe(bool?expected,stringbecause="",paramsobject[] becauseArgs){
Execute.Assertion
.ForCondition(Subject!=expected).BecauseOf(because, becauseArgs).FailWith("Expected {context:nullable boolean} not to be {0}{reason}, but found {1}.", expected, Subject);returnnewAndConstraint<TAssertions>((TAssertions)this);}
The text was updated successfully, but these errors were encountered:
Description
The
NullableBooleanAssertions
do not supportNotBe()
at the moment.Complete minimal example reproducing the issue
Expected behavior:
No compiler error
Actual behavior:
Compiler error
Argument type 'System.Nullable<bool>' is not assignable to parameter type 'bool'
:Versions
6.5.1
net6.0
Additional Information
I'm happy to provide a PR if you consider this feature useful. As far as I see, it should only be something like this in
NullableBooleanAssertions
:The text was updated successfully, but these errors were encountered: