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

ConfigManagerTest.testBasicReplacement is using the Print instead of Assert in Testing #710

Closed
Codegass opened this issue Mar 17, 2024 · 0 comments · Fixed by #711
Closed

Comments

@Codegass
Copy link
Contributor

Codegass commented Mar 17, 2024

Description

When I am running the test for ConfigManager, I noticed that the test case in the its test class ConfigManagerTest does not have any Assert from the Junit.

The test case testBasicReplacement is using the println to print out the related information for manual verification. There is no JUnit Assert function in the test case. Based on my understanding, this requires manual checking of the printed information to verify whether the test cases pass or fail.

Suggested Solution

To address this, I suggest refactoring to use AtomicReference for capturing property changes and verifying with Assertions.assertEquals. This ensures automated, precise test validation, aligning with best practices for robust testing.

If this change is considered beneficial, I am willing to implement it and submit a PR for review.

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 a pull request may close this issue.

1 participant