Skip to content

Conversation

@dennisdoomen
Copy link
Member

In v6, there's no Should().Throw() that handles async code because you need to use Should().ThrowAsync() for that. However, while dogfooding, I discovered that existing calls to Throw() will raise a Cannot access a protected member here. By renaming the protected members of DelegateAssertionsBase, it'll be clearer that a different method must be used.

@dennisdoomen dennisdoomen requested a review from jnyrup August 11, 2021 14:53
@jnyrup
Copy link
Member

jnyrup commented Aug 11, 2021

I would have expected api approval tests to fail?

In v6, there's no Should().Throw() that handles async code because you need to use Should().ThrowAsync() for that. However, while dogfooding, I discovered that existing calls to ThrowAsync() will raise a "Cannot access a protected member here". By renaming, it'll be clearer that a different method must be used.
@dennisdoomen
Copy link
Member Author

I would have expected api approval tests to fail?

Good point. The build did not even trigger. And on my local machine, the tests didn't fail. Anyway, after re-running everything, it did flag them as breaking changes.

@dennisdoomen dennisdoomen merged commit 9b77349 into fluentassertions:release-6.0 Aug 12, 2021
@dennisdoomen dennisdoomen deleted the Fix/AsyncConflict branch August 12, 2021 06:20
@dennisdoomen dennisdoomen changed the title Hide protected member to avoid confusions for folks upgrading to v6 Hide protected member to avoid confusion for folks upgrading to v6 Aug 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants