-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Refactor tests for Journal Cleanup #14934
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
Refactor tests for Journal Cleanup #14934
Conversation
PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label |
|||||||||||||||||||||||
PR Code Suggestions ✨No code suggestions found for the PR. |
|
This PR does not close any issue it is follow for merged PR. I am not sure how to resolve failing checks. Should I first create issue for this PR to close? |
|
No you don't need to create an extra issue |
koppor
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
If you want to learn something about software engineering, you could try Refaster Templates - https://docs.openrewrite.org/authoring-recipes/refaster-recipes
User description
Follow up for PR: #14850 and Issue: #11791
Refactored tests proposed in #14850 (comment)
Mandatory checks
CHANGELOG.mdin a way that is understandable for the average user (if change is visible to the user)PR Type
Tests
Description
Replace individual field assertions with complete BibEntry comparisons
Improve test readability by using expected entry objects
Consolidate multiple Optional field checks into single equality assertions
Apply consistent assertion pattern across all test methods
Diagram Walkthrough
File Walkthrough
AbbreviateJournalCleanupTest.java
Replace field assertions with BibEntry equality checksjablib/src/test/java/org/jabref/logic/cleanup/AbbreviateJournalCleanupTest.java
entry.getField()assertions with completeBibEntryequality checks
BibEntryobjects with all expected fields forcomparison
assertEquals(expectedEntry, entry)callsUnabbreviateJournalCleanupTest.java
Replace field assertions with BibEntry equality checksjablib/src/test/java/org/jabref/logic/cleanup/UnabbreviateJournalCleanupTest.java
entry.getField()assertions with completeBibEntryequality checks
BibEntryobjects with all expected fields forcomparison
assertEquals(expectedEntry, entry)calls