Skip to content

Migrate unit tests to JUnit5 ? #101

@rpelisse

Description

@rpelisse

Reading an article on JUnit5 made me realized that of plumbering in Bugclerk unit testing may be simplified by using some new feature of JUnit 5, such as:

  • assertAll, to reduce, for instance, the amount of code testing that the returned list of Candidates matches the expectation
  • assertThrows, to simplify test expecting throws
  • @RepeatedTest or @nested, to factorize Check tests that are often very prone to cut'n'paste (and a change some value) - this may allow to define a "test template" and then tweak depending on the scenario.
  • ParameterResolver may also be a nice way to adress the previous issue

http://junit.org/junit5/docs/current/user-guide/

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions