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

Fix tests with junit 4.13 #182

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

jamesjer
Copy link

@jamesjer jamesjer commented Nov 4, 2023

This PR is a follow-on to #166 that fixes #172. It consists of 3 commits:

  • The first commit beefs up the parsing of BigDecimal values from strings. The BigDecimal constructor is limited. This commit uses DecimalFormat for more sophisticated parsing of strings, fixing a handful of tests in the process.
  • The second commit fixes FilterableTest. The SingleMethodFilter class is no longer necessary, since junit provides Request.method. However, there is also a behavior change here: request.getRunner().getDescription() gets descriptions for all test methods, whether they pass the filter or not. They are marked appropriately, so request.getRunner().testCount() returns the expected value of 1 in each case, and if you actually run the tests, only 1 is executed.
  • The third commit changes two uses of hasMessage to hasMessageContaining since junit now returns a numbered list of exception strings.

With these changes, all tests pass. Some are noisy; I have not attempted to silence them.

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.

Some tests failed with newer version of junit
1 participant