Skip to content

Conversation

@Nakul-Shivaraj
Copy link
Contributor

@Nakul-Shivaraj Nakul-Shivaraj commented Oct 24, 2025

Refs JabRef#676
I am part of a Java graduate school class. My classmates will submit other PRs that address this issue as well.

This PR refactors multiple test classes to follow the one-assertion-per-test guideline and improve overall test readability and maintainability. Parameterized tests (@CsvSource) were introduced where appropriate to replace repetitive assertions.

Steps to test
To test this code run:

./gradlew :jablib:test \
--tests org.jabref.logic.layout.format.AuthorAndsReplacerTest \
--tests org.jabref.logic.layout.format.AuthorFirstLastOxfordCommasTest \
--tests org.jabref.logic.layout.format.AuthorLastFirstAbbrOxfordCommasTest \
--tests org.jabref.logic.layout.format.AuthorLastFirstAbbreviatorTest \
--tests org.jabref.logic.layout.format.RemoveBracketsTest \
--tests org.jabref.logic.layout.format.RemoveLatexCommandsFormatterTest

Mandatory checks

  • I own the copyright of the code submitted and I license it under the MIT license
  • [/] I manually tested my changes in running JabRef (always required)
  • [/] I added JUnit tests for changes (if applicable)
  • [/] I added screenshots in the PR description (if change is visible to the user)
  • [/] I described the change in CHANGELOG.md in a way that is understandable for the average user (if change is visible to the user)
  • I checked the user documentation: Is the information available and up to date? If not, I created an issue at <https://github.com/JabRef/user-documentation/issues> or, even better, I submitted a pull request updating file(s) in <https://github.com/JabRef/user-documentation/tree/main/en>.

@github-actions
Copy link
Contributor

Hey @Nakul-Shivaraj!

Thank you for contributing to JabRef! Your help is truly appreciated ❤️.

We have automatic checks in place, based on which you will soon get automated feedback if any of them are failing. We also use TragBot with custom rules that scans your changes and provides some preliminary comments, before a maintainer takes a look. TragBot is still learning, and may not always be accurate. In the "Files changed" tab, you can go through its comments and just click on "Resolve conversation" if you are sure that it is incorrect, or comment on the conversation if you are doubtful.

Please re-check our contribution guide in case of any other doubts related to our contribution workflow.

@Siedlerchr Siedlerchr added this pull request to the merge queue Nov 5, 2025
Merged via the queue into JabRef:main with commit 2538565 Nov 5, 2025
45 of 46 checks passed
@jabref-machine
Copy link
Collaborator

You ticked that you modified CHANGELOG.md, but no new entry was found there.

If you made changes that are visible to the user, please add a brief description along with the issue number to the CHANGELOG.md file. If you did not, please replace the cross ([x]) by a slash ([/]) to indicate that no CHANGELOG.md entry is necessary. More details can be found in our Developer Documentation about the changelog.

merlinymy pushed a commit to merlinymy/jabref that referenced this pull request Nov 19, 2025
* Parameterize tests for Issue676

* Address PR review feedback: refactor parameterized tests to CsvSource textBlock
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants