Skip to content

Conversation

Zeglow
Copy link

@Zeglow Zeglow commented Oct 21, 2025

Refs JabRef#676

Refactored CitationKeyGeneratorTest to use parameterized tests with @ParameterizedTest and @MethodSource, reducing code duplication while maintaining test coverage.

Collaboration: This refactoring was completed in collaboration with my classmate @hisunll. We divided the work - she refactored the first half of the test class, and I refactored the second half.

Note: My classmates are also contributing to fixing this issue as part of our CS5010 coursework. cc @espertusnu

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
  1. Verify all tests pass
  2. Review the refactored code to ensure:
    • All original test cases are preserved
    • Parameterized tests are properly structured
    • Method sources correctly provide test data
  3. 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.

1 participant