New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Drop RespectingRuntimeTypes and RespectingDeclaredTypes #2252
Comments
I really like that we revise if the default of only looking at the declared types is still the right choice 👍 I tried removing
We should remind ourselves that the expectation might not be a static value, but could also be a computed one. For If we discover properties based on the runtime type, which of the two class Person : IPerson
{
public string Name { get; set; }
string IPerson.Name { get; set; }
} |
In #2152, I've chosen to prefer the normal property over the explicitly implemented one.
We still support various overloads of
When_respecting_runtime_types_explicit_interface_member_on_interfaced_subject_should_not_be_used would also be affected by removing the options. |
👍 I wrote this before my latest review on #2152
I had forgotten we have |
I propose to drop those two methods for a couple of reasons:
BeEquivalentTo
goes one level deeper, it will fall-back to the run-time types.If somebody really wants to include or exclude certain members, they can either use an anonymous type as the expectation or use one of the other APIs to include or exclude certain members.
Also may affect #1860
The text was updated successfully, but these errors were encountered: