-
-
Notifications
You must be signed in to change notification settings - Fork 794
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
Allow for class mocks and interface mocks to mock System.Object methods #250
Conversation
/// </summary> | ||
internal class ProxyMethodHook : AllMethodsHook | ||
{ | ||
protected static readonly Tuple<Type, string>[] GrantedMethods = new Tuple<Type, string>[] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make it HashSet<T>
so Contains would work faster?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 to this. Straightforward since Tuple already implements GetHashCode
Wouldn't mind at all if you rebased on top of master, grab EditorConfig VS extension from the VS gallery, and auto-format again to get rid of all the whitespace changes ;) |
if the two minor fixes are implemented, I'd gladly merge this |
Very nice! I'll do it on Monday when I'm back at work. |
…, `object.Equals(object obj)` and `object.GetHashCode()`.
…s. Also fixed a couple of white space errors.
@kzu All done :-). |
Thanks! 👍 |
Heya @kolomanschaft, would you mind looking at the side effect of this feature at #273? It seems to me that these overrides should always behave as loose even on strict mocks, to avoid breaking existing behavior (i.e. adding strict mocks to a dictionary would now break :( ). |
@kzu sounds reasonable. I'll have a look at it tomorrow. |
Thanks a lot! On Mon, Aug 8, 2016 at 8:52 AM Martin Hammerschmied <
|
This fixes #248.