-
Notifications
You must be signed in to change notification settings - Fork 3
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
Fix code generation for interfaces with overloaded methods #38
Fix code generation for interfaces with overloaded methods #38
Conversation
- Update the code generator to properly recognize and process inherited interfaces. - Add unit test to validate the changes.
87d1a25
into
connorivy:fix-unique-method-names
* Fix code generation for methods with default arguments * Fix code generation for interfaces inheriting from other interfaces (#36) - Update the code generator to properly recognize and process inherited interfaces. - Add unit test to validate the changes. * use unified interface and run formatter * Fix code generation for methods with default arguments (#35) * move default argument tests to shared project * Fix code generation for interfaces with overloaded methods (#38) * Fix code generation for interfaces inheriting from other interfaces - Update the code generator to properly recognize and process inherited interfaces. - Add unit test to validate the changes. * Fix code generation for interfaces with overloaded methods --------- Co-authored-by: Karsten Heimrich <[email protected]> Co-authored-by: Karsten Heimrich <[email protected]>
Good catch! I merged this one into 1.1.0, but I changed it a bit. I changed the uniqueMethodName to just include the type parameters. Your PR changed the names of the call store to be Let me know if you think there is some issue with that approach |
I think your changes are totally fine. Many thanks for taking the time to review and apply my changes. |
Now I remember why I introduced the By the way, I think the MockMe/src/MockMe.Generator/MockGenerators/MethodGenerators/MethodMockGeneratorBase.cs Line 163 in d06658b
ArgumentModifierTests
Thanks again for providing this framework and for investing your valuable time. I really appreciate it! |
Context
This pull request addresses an issue in the code generation process for interfaces with overloaded methods. The current implementation does not correctly handle the creation of the storing bags, due to the method
GetUniqueMethodName()
returning a to generic name.Changes Made
Refactored
GetUniqueMethodName
Method:ArgCollectionName
creation.Added
GetUniqueStoreName
Method:Updated Unit Tests:
ISymbolVisitor
.This PR implements the second feature, which depends on the changes made in PR #36 (fix-interface-inheritance). Please review and merge PR #36 before moving on to this one.