Parameterize tests (issue #676)#3
Conversation
You didn't, and that's okay.
Test this link. See also messages on Teams about the JabRef PR. |
espertusnu
left a comment
There was a problem hiding this comment.
Sorry for the delay.
| "bla,; bla", | ||
| "_bla.bla.blub,; _bla.bla.blub" | ||
| }, delimiter = ';') | ||
| void parseMethodCallsSingleNoArgs(String input, String expected) { |
There was a problem hiding this comment.
What does "single no args" mean here?
I'm also having trouble understanding under function names. Could you help me understand them?
| "bla,; bla", | ||
| "_bla.bla.blub,; _bla.bla.blub" | ||
| }, delimiter = ';') | ||
| void parseMethodCallsSingleNoArgs(String input, String expected) { |
There was a problem hiding this comment.
The jabref team has said they like for the expected argument to be first.
| @ParameterizedTest | ||
| @CsvSource(value = { | ||
| "bla,foo; bla; foo" | ||
| }, delimiter = ';') |
There was a problem hiding this comment.
It looks like there's just a single call, sot here's no benefit to parameterizing.
| assertEquals("von Neumann, John, Smith, John & Black Brown, Peter", | ||
| a.format("von Neumann, John and Smith, John and Black Brown, Peter")); | ||
| @ParameterizedTest | ||
| @CsvSource({ |
| assertEquals("\\u169?", formatter.format("{\\copyright}")); // © | ||
| assertEquals("\\u163?", formatter.format("{\\pounds}")); // £ | ||
| static Stream<Arguments> specialCharacterCases() { | ||
| return Stream.of( |
There was a problem hiding this comment.
Why did you do a method source instead of a CSV source?
There was a problem hiding this comment.
My first refactor used csvSource and it passed all tests. Then some of the changes from upstream casued the same code to throw a CsvParseException so had to use another way to circumvent the issue
2276cdf to
ac41963
Compare
|
I have made the changes to address the comment |
* Automatic field editor: Add Clear content tab + viewmodel * Removing comments * PR comment changes * Bot suggested changes * Bot suggested changes * reformat * fix fxml * Added tests, reformats and visual modifications. Fixed number of affected files * Fixed tab number * CHANGELOG.md --------- Co-authored-by: Siedlerchr <siedlerkiller@gmail.com> Co-authored-by: Carl Christian Snethlage <calixtus@users.noreply.github.com>
…f#14048) * Switch to new macos intel runner and update arm runner as well Refs https://github.blog/changelog/2025-09-19-github-actions-macos-13-runner-image-is-closing-down/ * macos15 * fix target names * fix target names
* New translations jabref_en.properties (French) * New translations jabref_en.properties (Italian)
* Prevent brief flash of the default JavaFX (Modena) theme on startup * Avoid spamming IndexOutOfBoundsException when the theme is updated at runtime - IndexOutOfBoundsException keeps being thrown although the theme is applied correctly. By catching the exception, we avoid spamming the exception to user. * Fix button-bar buttons truncating long text with ellipsis * Update Changelog * use clear * Revert "Avoid spamming IndexOutOfBoundsException when the theme is updated at runtime" This reverts commit 7361b5a. * Update CHANGELOG.md --------- Co-authored-by: Houssem Nasri <houssem.nasri@360t.com> Co-authored-by: Siedlerchr <siedlerkiller@gmail.com>
* Add checkerframework to jablib * Add ADR * Refine * Revise endorsement for nullness checking framework Updated endorsement reference to JUnit 6 with a link. * Migrate to Errorprone with NullAway * Refine ADR * Remove jakarta.inject dependency * Add architecture test * No eclipse jgit nullable annotations * Fix architecture test --------- Co-authored-by: Carl Christian Snethlage <calixtus@users.noreply.github.com> Co-authored-by: Oliver Kopp <kopp.dev@gmail.com> Co-authored-by: Christoph <siedlerkiller@gmail.com>
…abRef#14045) * Merged scite metrics tab into the Citation Relations Tab (now called "Citations") and removed SciteTab from view in EntryEditor. * Removed SciteTab.java and SciteTabViewModel.java. Moved fetchTallies method to new class ScienceAiFetcher.java. Moved SciteTallyModel to jabref.model.sciteTallies and renamed to TalliesResponse. * Added info to CHANGELOG.md. * CHANGELOG formatting. * Updated CHANGELOG.md after PR comments. Moved URLs to URLs helper class. Added nicer styling to the Citations tab. * Updated CHANGELOG.md after PR comments. Moved URLs to URLs helper class. Added nicer styling to the Citations tab. * Added missing localization keys and removed obsolete localization keys. * Added localization to citation tab labels * Renamed labels in Citations tab and added a help button with a popup explaining the source and linking to the respective page. * Updated Citation Metrics section to a single line * Made Citation Metrics a single line. Also broke up its text into elements to have better separation. * Removed labels in the Citations tab. The provided by buttons are now entirely in the Metrics line. --------- Co-authored-by: Mitkens374 <michal.leso@student.tuke.sk>
…JabRef#14031) * Changed ComboBox to SearchableComboBox in FieldFormatterCleanupsPanel * Changed the combobox to a searchable combobox * Revert "Changed the combobox to a searchable combobox" This reverts commit 348762b. * changed combobox to a searchable combobox * Added bugfix to CHANGELOG.md * Corrected an issue number in CHANGELOG.md * Revise CHANGELOG for recent updates and fixes Updated CHANGELOG with new features, changes, fixes, and removals. --------- Co-authored-by: Carl Christian Snethlage <50491877+calixtus@users.noreply.github.com>
* JabRef#14058 - fix alphabetical ordering * JabRef#14058 - update change log * JabRef#14058 feedback - reorder
* Fix search query reset issue after entry deletion - Add EntriesRemovedEvent listener to MainTableDataModel.SearchIndexListener - Refresh search matches when entries are removed to prevent stale entries - Ensure filtered list is properly updated after entry deletion - Maintain search query state during entry manipulation operations This fixes the issue where search results would show stale entries after deleting entries from search results, making it appear as if the search query was reset even though it remained in the search bar. * Fix import order for EntriesRemovedEvent - Move EntriesRemovedEvent import to correct alphabetical position - Fixes checkstyle ImportOrder violation * Update CHANGELOG with fixed issue description and link --------- Co-authored-by: Carl Christian Snethlage <50491877+calixtus@users.noreply.github.com>
* New translations jabref_en.properties (French) * New translations jabref_en.properties (Spanish) * New translations jabref_en.properties (German) * New translations jabref_en.properties (Italian) * New translations jabref_en.properties (Turkish) * New translations jabref_en.properties (Chinese Simplified) * New translations jabref_en.properties (Portuguese, Brazilian)
Co-authored-by: Ruslan <ruslanpopov1512@gmail.com>
Bumps [jablib/src/main/resources/csl-locales](https://github.com/citation-style-language/locales) from `8c149db` to `fbb76f6`. - [Release notes](https://github.com/citation-style-language/locales/releases) - [Commits](citation-style-language/locales@8c149db...fbb76f6) --- updated-dependencies: - dependency-name: jablib/src/main/resources/csl-locales dependency-version: fbb76f6129728a234c4e42ba598c7bbbedd73301 dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [jablib/src/main/abbrv.jabref.org](https://github.com/JabRef/abbrv.jabref.org) from `fc3ef9e` to `176c06c`. - [Release notes](https://github.com/JabRef/abbrv.jabref.org/releases) - [Commits](JabRef/abbrv.jabref.org@fc3ef9e...176c06c) --- updated-dependencies: - dependency-name: jablib/src/main/abbrv.jabref.org dependency-version: 176c06c4727fa1005117ead24e8d5b9051e4f3ab dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: gradle-update-robot <gradle-update-robot@regolo.cc>
…4340) * Revert "Update Gradle Wrapper from 9.3.0-jabref-1 to 9.1.0 (JabRef#14033)" This reverts commit 1fc12a7. * Clean up packages in JabKit * Fix namings - entry point: JabKitLauncher - command "jabkit": JabKit * First GetCitedWorks * Add some NonNull annotations * Fix main class name * Fix option * Add initial support for unpaywall downloads - some alphabetical sorting - refine comments - some null markers - some variable name tweaks * Fix alphabetical ordering * No default email for Unpaywall * Other handling of Unpaywall * Handle empty key * Fix key customization * Revert changes of gradlew and gradlew.bat * Make UnpayWallFetcher a WebFetcher * Add CHANGELOG.md line * Add commands * Revert "Merge branch 'revert-14033-gradlew-update-9.1.0' into add-cites-citing" This reverts commit ab02d15, reversing changes made to 403910e. * Add links to CHANGELOG.md * Discard changes to .github/workflows/binaries.yml * Fix import * Fix imports * Fix formatting * Fix typo * Fix test * Add getTestUrl() * Swap methods * Fix typo * Fix formatting * Adapt tests to new behavior --------- Co-authored-by: Carl Christian Snethlage <50491877+calixtus@users.noreply.github.com>
…ef#14124) * Revert "Update Gradle Wrapper from 9.3.0-jabref-1 to 9.1.0 (JabRef#14033)" This reverts commit 1fc12a7. * Revert changes of gradlew and gradlew.bat * Update gradle * Add java-module-packaging patch * Fix tabs vs. spaces * WIP: Include plugin from source * Remove second includeBuild * Commit sub project * Use released version of java-module-packaging --------- Co-authored-by: Oliver Kopp <kopp.dev@gmail.com>
* New translations jabref_en.properties (French) * New translations jabref_en.properties (Italian)
* Add final modifier and private constructor * Update exception message
…4345) * Add final modifier and private constructor * Update exception message
* Add final modifier and private constructor * Update exception message
…Ref#14342) * Add final modifier and private constructor * Update exception message
…ef#14341) * Add final modifier and private constructor * Update exception message
* Add final modifier and private constructor * Update exception message
|
This shows 627 changed files. In the future, never push force in a PR. If you tell me what files you changed, I'll take a look at those. |
Sorry for the mess... I followed these steps before trying to push
However, my push was rejected because the tip of the branch is behind. I followed the hint provided by git "hint: use 'git pull' before pushing again." But then git asked me to reconcile divergent branches and it gave me three options (merge, rebase and ff only). So I run |
|
Thanks for checking. The problem is with the |
|
Are all of the changes in the linked commit? If not, I'll need a list of file names. |
|
Thanks for letting me know. And yes, all the changes are in the linked
commit.
…On Wed, Nov 19, 2025 at 2:54 PM Ellen Spertus ***@***.***> wrote:
*espertusnu* left a comment (merlinymy/jabref#3)
<#3 (comment)>
Are all of the changes in the linked commit? If not, I'll need a list of
file names.
—
Reply to this email directly, view it on GitHub
<#3 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AT3MZ6UIPXZEWEE7SXY2HPD35TYKBAVCNFSM6AAAAACIOUWDCSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTKNJUHE2DINZRGQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
All of the changes are in the linked commit |
Fixes JabRef#676. This PR only address part of the issue, and my classmates are doing the rest.
This PR refactors several unit tests in the jablib/src/test/java/org/jabref/logic/layout/format/ package to use JUnit 5 parameterized tests.
The goal is to simplify repetitive test logic, improve readability, and make future additions to formatting rules easier to maintain.
Steps to test
Mandatory checks
CHANGELOG.mdin a way that is understandable for the average user (if change is visible to the user)