Skip to content
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

add unit test to generateInstitutionKey #11756

Merged
merged 2 commits into from
Sep 13, 2024

Conversation

leaf-soba
Copy link
Contributor

  • prepare to refactor this method

Mandatory checks

  • Change in CHANGELOG.md described in a way that is understandable for the average user (if applicable)
  • Tests created for changes (if applicable)
  • Manually tested changed features in running JabRef (always required)
  • Screenshots added in PR description (for UI changes)
  • Checked developer's documentation: Is the information available and up to date? If not, I outlined it in this pull request.
  • Checked 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 to the documentation repository.

prepare to refactor this method
Siedlerchr
Siedlerchr previously approved these changes Sep 13, 2024
Copy link
Member

@koppor koppor left a comment

Choose a reason for hiding this comment

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

Thank you for working on this.

Small nitpick on the test itself.

"'{Example with Several Tokens, Some Address}',EST"})

void generateInstitutionKeyTest(String input, String expected) {
if ("null".equals(input)) {
Copy link
Member

Choose a reason for hiding this comment

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

Please do a separate test for null - this "hack" is only needed for one out of the n>10 test cases. --> The implementation of the test method should be "straight-forward" / Trivial

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK I'll fix it, thanks for reviewing it.

@koppor koppor enabled auto-merge September 13, 2024 12:52
@koppor koppor added this pull request to the merge queue Sep 13, 2024
Merged via the queue into JabRef:main with commit 939f696 Sep 13, 2024
23 checks passed
@koppor
Copy link
Member

koppor commented Sep 14, 2024

@leaf-soba Thank you for using software engineering techniques here. In case you want to have your local files containing all modifications you have, but you want to split up the pull requests to smaller items/topics, I recommend GitButler.

@leaf-soba leaf-soba deleted the add-test-generateInstitutionKey branch September 26, 2024 06:51
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.

3 participants