test: cover implementation bridge accessor initialization#49724
test: cover implementation bridge accessor initialization#49724amirdeljouyi wants to merge 1 commit into
Conversation
|
Thank you for your contribution @amirdeljouyi! We will review the pull request and get back to you soon. |
|
@amirdeljouyi please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.
Contributor License AgreementContribution License AgreementThis Contribution License Agreement (“Agreement”) is agreed to by the party signing below (“You”),
|
There was a problem hiding this comment.
Pull request overview
This PR extends ImplementationBridgeHelpersTest with additional unit coverage for ImplementationBridgeHelpers accessor behavior, specifically validating lazy accessor initialization via accessor getters and ensuring accessor setters are idempotent (don’t replace an already-installed accessor).
Changes:
- Refactors repeated
"Helper"/getDeclaredClasses()usage into shared constants. - Adds a unit test that iterates helper classes and invokes accessor getters after clearing cached accessor state.
- Adds a unit test that verifies calling accessor setters twice does not replace the initially installed accessor.
| assertThat(accessorSetterCount).isGreaterThan(0); | ||
| } |
Description
Hi,
This PR adds focused unit coverage for
ImplementationBridgeHelpers.It covers accessor initialization behavior across the helper classes, including the CosmosClientBuilder accessor path and the bulk execution thresholds accessor path.
The tests check lazy getter initialization after cached accessor state is cleared, and that a second setter call does not replace an accessor that was already installed. Line coverage for
ImplementationBridgeHelpersincreases by 31%.I hope you find these tests useful. 😄 Please let me know if you have any questions or concerns.
Thanks,
All SDK Contribution checklist:
General Guidelines and Best Practices
Testing Guidelines