Skip to content

Refactor to Eliminate Repetitive Mock Object Creation in OkHttpRequestAdapterTest.java #1387

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

Merged

Conversation

gzhao9
Copy link
Contributor

@gzhao9 gzhao9 commented Jun 26, 2024

Pull Request Title:

Refactor RequestInformationTest to Reduce Redundancy and Simplify Mock Creation。

Pull Request Description:

This pull request addresses issue #1386, which is essentially doing the same thing as issue #1374. It refactors the OkHttpRequestAdapterTest class to eliminate redundant mock creations and simplify the testing code. Specifically, it introduces helper methods to centralize the creation and configuration of mocks for Parsable, ParseNode and ParseNodeFactory, reducing code duplication and enhancing readability.

Copy link
Contributor

@andrueastman andrueastman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution @gzhao9

@andrueastman andrueastman merged commit a853aae into microsoft:main Jun 26, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants