Skip to content

KNOX-3439: Add tests for NoClassNameMultiLineToStringStyle - #1378

Open
Raghav-Mah3shwari wants to merge 1 commit into
apache:masterfrom
Raghav-Mah3shwari:KNOX-3439
Open

KNOX-3439: Add tests for NoClassNameMultiLineToStringStyle#1378
Raghav-Mah3shwari wants to merge 1 commit into
apache:masterfrom
Raghav-Mah3shwari:KNOX-3439

Conversation

@Raghav-Mah3shwari

Copy link
Copy Markdown
Contributor

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 test

Result:

Tests run: 4, Failures: 0, Errors: 0, Skipped: 0
BUILD SUCCESS

The complete project build was also verified using:

mvn clean verify

The 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.

@github-actions

github-actions Bot commented Sep 5, 2026

Copy link
Copy Markdown

Test Results

  4 files    4 suites   13s ⏱️
 84 tests  84 ✅ 0 💤 0 ❌
102 runs  102 ✅ 0 💤 0 ❌

Results for commit 4b1c1bc.

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.

2 participants