Fix the return type of TypeAssertions.HaveAccessModifier and NotHaveAccessModifier#1159
Conversation
return AndConstraint with TypeAssertions instead one with Type fluentassertions#1154
|
I wondering whether we should treat this as a binary compatibility issue. |
|
It will be an issue, because the return type is changed and it will throw a So for let's say if the current usage is something like:
After this change the required step would be:
If the |
|
Yeah, so technically this would be a breaking change. But then again, how likely is this going to be a realistic problem. @jnyrup what do you think? |
|
I'm maybe being over-conservative, but I don't think the benefits are worth the breaking change. |
|
Can we continue with this one now that we're accepting potentially breaking changes again? |
|
Let's continue with this! @adrianiftode Note that since #1217 any API change must be changed in the relevant |
…er and NotHaveAccessModifier
7299423 to
c01d8cc
Compare
|
@jnyrup I've run the tests as instructed. When I first time run the tests my editor added an extra line at the end of the files and the tests failed. I wonder if these lines could be relaxed/ignored while asserting it. |
|
Sorry, the flow has been improved since I suggested to "copy over the changes". |
|
I just tried it and looks fine. |
|
While I remember it... |
|
@adrianiftode Thanks again for reporting and contributing a fix for this issue. |
|
It's been a pleasure, thanks for guidance
vin., 21 feb. 2020, 16:57 Jonas Nyrup <[email protected]> a scris:
… @adrianiftode <https://github.com/adrianiftode> Thanks again for
reporting *and* contributing a fix for this issue.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1159?email_source=notifications&email_token=ADI5U25MVE4QEYDS7D5UZ5LRD7TVLA5CNFSM4I6VPEH2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEMS65RA#issuecomment-589688516>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADI5U26IKXCLRW7Q6HLTOALRD7TVLANCNFSM4I6VPEHQ>
.
|
#1154
The changes don't include a unit test, because I didn't see a common practice in the code base to test that the AndConstraint is closed with the correct type. The only test I've seen that checks for this particular situation is
When_using_StringCollectionAssertions_the_AndConstraint_should_have_the_correct_type. I could add something similar.There are no references in docs to these two assertions