KNOX-3439: Add tests for NoClassNameMultiLineToStringStyle - #1378
Open
Raghav-Mah3shwari wants to merge 1 commit into
Open
KNOX-3439: Add tests for NoClassNameMultiLineToStringStyle#1378Raghav-Mah3shwari wants to merge 1 commit into
Raghav-Mah3shwari wants to merge 1 commit into
Conversation
Test Results 4 files 4 suites 13s ⏱️ Results for commit 4b1c1bc. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
This change adds dedicated unit test coverage for NoClassNameMultiLineToStringStyle.
The tests verify that:
Fields are formatted on separate lines.
The class name and identity hash code are not included in the generated string.
No field separator is added before the first field.
The generated output ends with the expected line separator, including when no fields are present.
This is a test-only change and does not modify the existing production behavior.
How was this patch tested?
The new unit tests were executed directly using:
mvn -pl gateway-util-common -Dtest=NoClassNameMultiLineToStringStyleTest testResult:
Tests run: 4, Failures: 0, Errors: 0, Skipped: 0
BUILD SUCCESS
The complete project build was also verified using:
mvn clean verifyThe build completed successfully.
Additionally, Checkstyle reported no violations for the changes.
Integration Tests
No integration tests were added because this change only adds unit test coverage for the formatting behavior of the NoClassNameMultiLineToStringStyle utility class.
The functionality does not require a running Knox Gateway, external services, Docker-based infrastructure, or end-to-end validation.
Dedicated unit tests have been added to cover the affected behavior.