Skip to content

Add simple unit tests#7544

Merged
koppor merged 20 commits into
JabRef:mainfrom
ningxie1991:a1-bs
May 6, 2021
Merged

Add simple unit tests#7544
koppor merged 20 commits into
JabRef:mainfrom
ningxie1991:a1-bs

Conversation

@BShaq

@BShaq BShaq commented Mar 15, 2021

Copy link
Copy Markdown
Contributor

I have added some simple unit tests that will increase code coverage / branch coverage.
They contribute to issue #6207

  • 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 documentation: Is the information available and up to date? If not created an issue at https://github.com/JabRef/user-documentation/issues or, even better, submitted a pull request to the documentation repository.

BShaq added 11 commits March 12, 2021 23:43
new unit tests for EscapeAmpersandsFormatterTest
new unit tests for FieldComparatorTest.java
new unit test for BooktitleChecker class
new unit tests for ISBN-13 control digit partition
more unit tests for ShortMonthFormatter considering new partitions
more unit tests for ToLowerCaseTest.java considering different partitions
more unit tests for ISSNCheckerTest.java considering different boundaries
Comment thread src/test/java/org/jabref/logic/bibtex/comparator/FieldComparatorTest.java Outdated

@koppor koppor left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thank you for the work; some small comments remain ^^

Comment thread src/test/java/org/jabref/logic/bibtex/comparator/FieldComparatorTest.java Outdated
Comment thread src/test/java/org/jabref/logic/layout/format/ToLowerCaseTest.java Outdated
Comment thread src/test/java/org/jabref/model/entry/DateTest.java Outdated
Comment thread src/test/java/org/jabref/logic/layout/format/ToLowerCaseTest.java Outdated
Comment thread src/test/java/org/jabref/logic/layout/format/ShortMonthFormatterTest.java Outdated
Comment thread src/test/java/org/jabref/logic/integrity/ISSNCheckerTest.java Outdated
Comment thread src/test/java/org/jabref/logic/integrity/ISBNCheckerTest.java Outdated
@koppor koppor added the status: changes-required Pull requests that are not yet complete label Apr 12, 2021
@koppor koppor mentioned this pull request Apr 12, 2021
5 tasks
@BShaq

BShaq commented Apr 13, 2021

Copy link
Copy Markdown
Contributor Author

Hi @koppor,
thanks for reviewing!
I've addressed your comments in commit 9492146 and 51b7d8d.

@koppor koppor merged commit 033c706 into JabRef:main May 6, 2021
@koppor koppor removed the status: changes-required Pull requests that are not yet complete label May 6, 2021
Siedlerchr added a commit that referenced this pull request May 15, 2021
* upstream/main: (71 commits)
  [Bot] Update CSL styles (#7735)
  Fix for issue 6966: open all files of multiple entries (#7709)
  Add simple unit tests (#7696)
  Add simple unit tests (#7543)
  Update check-outdated-dependencies.yml
  Added preset for new entry keybindings and reintroduced defaults (#7705)
  Select the entry which has smaller dictonary order when merge (#7708)
  Update CHANGELOG.md
  fix: make more fields, fomatters, ids and languages sorted by alphabetical order (#7717)
  Bump libreoffice from 7.1.2 to 7.1.3 (#7721)
  Bump unoloader from 7.1.2 to 7.1.3 (#7724)
  Bump org.beryx.jlink from 2.23.7 to 2.23.8 (#7723)
  Bump org.openjfx.javafxplugin from 0.0.9 to 0.0.10 (#7725)
  fix: make fields sorted by lexicographical order (#7711)
  Fix tests
  Refactoring existing unit tests (#7687)
  Refactoring and addition of unit tests (#7581)
  Refactor simple Unit Tests (#7571)
  Add simple unit tests (#7544)
  add and extend unit tests (#7685)
  ...
koppor added a commit that referenced this pull request Sep 1, 2023
github-merge-queue Bot pushed a commit that referenced this pull request Sep 2, 2023
* Inline LOGGER.debug

* Move out work in constructor to method

* Streamline code

* Same comments

* Fix variable name

* "Flatten" SaveOrder if OrderType.TABLE

* WIP: Show diff in UI

* Make it scrollable

Co-authored-by: Christoph <siedlerkiller@gmail.com>
Co-authored-by: Carl Christian Snethlage <50491877+calixtus@users.noreply.github.com>

* WIP: Try to fix content selector diff

Co-authored-by: Christoph <siedlerkiller@gmail.com>

* Add some debugging

* Update preferences immediatly after change (and not sometime later)

* Fix serialization of SaveOrder

* Add CHANGELOG.md entry

* Fix mapping of SaveOrderConfig

* Introduce SelfContainedSaveOrder

* More SelfContainedSaveOrder

* Remove ref to PrefsService

* Compile fix

* Made OrFields NOT extending LinkedHashSet<Field>

* Fix hillarious bug

* Fixed tests

* Try to fix FieldComparators for OrFields

* Fix order of null comparisons

Refs tests of #7544

* Fix checkstyle

* Add missing equals, hashcode and toString

* Fix checkstyle

* Restore test files

* Fix OpenRewrite

* Fix modernizer

* Update CHANGELOG.md

* Fix NPE

---------

Co-authored-by: Christoph <siedlerkiller@gmail.com>
Co-authored-by: Carl Christian Snethlage <50491877+calixtus@users.noreply.github.com>
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