Skip to content

Conversation

@YizhangCao
Copy link

Refs JabRef#676

This PR parameterizes tests in AuthorTest and AuthorListTest to reduce code duplication and improve test maintainability.

My classmates are also contributing to the same issue.

@espertusnu

Testing

   ./gradlew test --tests AuthorTest
   ./gradlew test --tests AuthorListTest

@calixtus
Copy link
Member

There seems to be something wrong with either github or your local configuration:
grafik

Copy link
Member

@calixtus calixtus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Binaries

@Siedlerchr Siedlerchr closed this Oct 23, 2025
@espertusnu
Copy link
Contributor

@YizhangCao seems to have saved the files with the wrong encoding.

@Siedlerchr I see you closed the PR. Should he not fix this?

@calixtus
Copy link
Member

calixtus commented Oct 24, 2025

We got a few low-quality and ai generated prs the last days. Looks like @Siedlerchr overlooked that this pr was from one of the students of your course, when he closed it. Sorry.

Yes, please have the student update the branch with files in the correct encoding.

@calixtus calixtus reopened this Oct 24, 2025
@YizhangCao
Copy link
Author

Thank you @calixtus and @espertusnu for catching this encoding issue! I apologize for the problem.

I've now fixed the file encoding to UTF-8. The issue occurred because I used PowerShell's redirection operator which saved the files as UTF-16 instead of UTF-8.

After pushing I saw all tests are passed, right now I will fix [Source Code Tests / Checkstyle (pull_request)] and [Source Code Tests / Unit tests – jablib (pull_request)

Comment on lines 27 to 33
@CsvSource({
"'A O', 'A. O.'",
"'A-melia', 'A.-melia'",
"'AmeliA', 'AmeliA'",
"'Ameli A', 'Ameli A.'",
"'Ameli ', 'Ameli'",
"'Ameli AA', 'Ameli A. A.'"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please refactor using the knowledge provided at https://devdocs.jabref.org/code-howtos/testing.html#use-paramterizedtests

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @koppor and @calixtus for the review!

I've made the following fixes:

  1. Fixed all EMPTY_AUTHOR test cases in AuthorListTest.java to expect empty string ('') instead of null
  2. Reformatted all @CsvSource annotations in AuthorTest.java to have one test case per line for better readability, following the guidelines at https://devdocs.jabref.org/code-howtos/testing.html#use-paramterizedtests

@koppor koppor added the status: changes-required Pull requests that are not yet complete label Oct 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status: changes-required Pull requests that are not yet complete

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants