Skip to content

Contribution to issue 676 - #2

Draft
Zeglow wants to merge 5 commits into
mainfrom
contribution-to-issue-676
Draft

Contribution to issue 676#2
Zeglow wants to merge 5 commits into
mainfrom
contribution-to-issue-676

Conversation

@Zeglow

@Zeglow Zeglow commented Oct 15, 2025

Copy link
Copy Markdown
Owner

Closes JabRef#676

Refactored CitationKeyGeneratorTest to use parameterized tests with @ParameterizedTest and @MethodSource, reducing code duplication while maintaining full test coverage. This improves test readability and maintainability by consolidating repetitive test methods into data-driven parameterized tests.
Collaboration: This refactoring was completed in collaboration with @hisunll, combining our work on different sections of the test class.

Steps to test

This is a test refactoring PR with no functional changes to the application.

  1. Run the test suite: ./gradlew test --tests CitationKeyGeneratorTest
  2. Verify all tests pass
  3. Review the refactored code to ensure:
    • All original test cases are preserved
    • Parameterized tests are properly structured
    • Method sources correctly provide test data
  4. Optionally, compare the test coverage before and after to confirm no regression

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.

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.

Bibliography within a bibliography

1 participant