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

4.x: Fix MockBean to work with argument matchers #9398

Merged

Conversation

romain-grecourt
Copy link
Contributor

@romain-grecourt romain-grecourt commented Oct 16, 2024

Description

  • Call toString() to force initialization of the mocked instances
  • Use produceWith instead of createWith
  • Use addTransitiveTypeClosure instead of addType to support more than just one type
  • Minor refactoring of the processMockBean method
  • Re-work HelidonTestNgListener to initialize the testInstance with an extension
  • Add tests

Fixes #9397
Fixes #9411

Documentation

None.

@romain-grecourt romain-grecourt added this to the 4.2.0 milestone Oct 16, 2024
@romain-grecourt romain-grecourt self-assigned this Oct 16, 2024
@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Oct 16, 2024
@romain-grecourt romain-grecourt force-pushed the mockbean-argument-matcher branch from 221471e to 490ddbe Compare October 16, 2024 04:21
@jbescos

This comment was marked as resolved.

@romain-grecourt romain-grecourt force-pushed the mockbean-argument-matcher branch from a5a4a45 to 143e42e Compare October 16, 2024 18:47
jbescos
jbescos previously approved these changes Oct 17, 2024
- Call toString() to force initialization of the mocked instances
- Use produceWith instead of createWith
- Use addTransitiveTypeClosure instead of addType to support more than just one type
- Minor refactoring of the processMockBean method
- Add unit test
- Re-work HelidonTestNgListener to initialize the testInstance with an extension

Fixes helidon-io#9397
@romain-grecourt romain-grecourt merged commit 6a93b66 into helidon-io:main Oct 17, 2024
44 checks passed
@romain-grecourt romain-grecourt deleted the mockbean-argument-matcher branch October 17, 2024 22:23
arjav-desai pushed a commit to arjav-desai/helidon that referenced this pull request Dec 11, 2024
- Call toString() to force initialization of the mocked instances
- Use produceWith instead of createWith
- Use addTransitiveTypeClosure instead of addType to support more than just one type
- Minor refactoring of the processMockBean method
- Add unit test
- Re-work HelidonTestNgListener to initialize the testInstance with an extension

Fixes helidon-io#9397
Fixes helidon-io#9411
danielkec pushed a commit to danielkec/helidon that referenced this pull request Dec 20, 2024
- Call toString() to force initialization of the mocked instances
- Use produceWith instead of createWith
- Use addTransitiveTypeClosure instead of addType to support more than just one type
- Minor refactoring of the processMockBean method
- Add unit test
- Re-work HelidonTestNgListener to initialize the testInstance with an extension

Fixes helidon-io#9397
Fixes helidon-io#9411

(cherry picked from commit 6a93b66)
@danielkec danielkec mentioned this pull request Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4.x Version 4.x MP OCA Verified All contributors have signed the Oracle Contributor Agreement. testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4.x: HelidonTestNgListener creates new AnnotatedType 4.x: MockBean fails with ArgumentMatcher
3 participants