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

Add unit tests for class feign.Util #844

Merged
merged 1 commit into from
Nov 19, 2018

Conversation

petersear
Copy link
Contributor

Hi,
I've analysed your codebase and added some unit tests for the class feign.Util.
I've written the tests for these functions with the help of Diffblue Cover.
These tests should help detect regressions caused by future code changes.

@velo velo merged commit e186003 into OpenFeign:master Nov 19, 2018
@petersear petersear deleted the add-diffblue-tests branch November 20, 2018 09:32
}

@Test
public void checkNotNullInputNullNotNullNullOutputNullPointerException() {
Copy link
Contributor

@rage-shadowman rage-shadowman Nov 26, 2018

Choose a reason for hiding this comment

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

For future reference, these would make a lot more sense if there was more separation of terms. All of this "NullNotNullNull" stuff makes zero sense to new eyes on the project (kindoflikereadingasentencewithoutanyspacesinit - kinda like reading a sentence without spaces), but "checkNotNull_referenceNull_messageNotNull_messageArgsNull_nullPointerExceptionThrown" is a lot easier to read and understand the coder's intentions without looking at the code in the test (then when looking at the code, you can more easily tell if it really tests what was intended).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@rage-shadowman thanks for your feedback. Much appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants