Description
ClearExpectation() returns false after a successful Given<>.
Complete minimal example reproducing the issue
bool success = Execute.Assertion
.Given(() => new object())
.ForCondition(subject => true)
.FailWith("but collection is <null>.")
.Then
.ClearExpectation();
success.Should().BeTrue();
Expected behavior:
Should return true.
Actual behavior:
Returns false
Having another Given(() => {}).ForCondition() chain after ClearExpectation will return true again.
Versions