Skip to content
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

Make StubbedPropertySetup.IsMatch less picky #1260

Merged
merged 3 commits into from May 12, 2022

Conversation

stakx
Copy link
Contributor

@stakx stakx commented May 12, 2022

Fixes #1248.

stakx added 3 commits May 12, 2022 18:05
Comparing `MethodInfo`s using the `==` operator appears to go wrong more
often than not. (In this case, this method fails to identify a positive
match of `Base.Property` as the implementation for `IBase.Property`).

Let's make this test much more imprecise by simply comparing accessor
method names (and thus completely ignoring the type hierarchy; if we're
lucky, the .NET compilers will already guarantee valid polymorphic type
relationships).
@stakx stakx added this to the 4.18.1 milestone May 12, 2022
@stakx stakx self-assigned this May 12, 2022
@stakx stakx merged commit a844d5e into devlooped:main May 12, 2022
@stakx stakx deleted the bugfix/stubbedpropertysetup-ismatch branch May 12, 2022 16:10
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.

Setup property doesn't work as expected
1 participant