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

Use Hamcrest instead of deprecated JUnit methods #883

Merged

Conversation

MarkEWaite
Copy link
Contributor

@MarkEWaite MarkEWaite commented Apr 20, 2020

Use Hamcrest instead of deprecated JUnit methods

JUnit 4.13 deprecated the Assert.assertThat method. The Hamcrest assertThat is the replacement for Assert.assertThat. Use the replacement.

JUnit 4.13 deprecated the ExpectedException class. The Assert.assertThrows method is the replacement. Use the replacement.

Checklist

  • I have read the CONTRIBUTING doc
  • I have added tests that verify my changes
  • Unit tests pass locally with my changes
  • I have added documentation as necessary
  • No Javadoc warnings were introduced with my changes
  • No spotbugs warnings were introduced with my changes

Types of changes

  • Dependency or infrastructure update

JUnit 4.13 has deprecated Assert.assertThat in favor of the Hamcrest
implementation of assertThat.  Switch to use the Hamcrest assertThat
method instead of the JUnit assertThat method.
@MarkEWaite MarkEWaite changed the title Use Hamcrest instead of deprecatd JUnit methods Use Hamcrest instead of deprecated JUnit methods Apr 20, 2020
@MarkEWaite MarkEWaite merged commit c99d18f into jenkinsci:master Apr 20, 2020
@MarkEWaite MarkEWaite deleted the handle-junit-assertThat-deprecation branch April 20, 2020 21:35
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.

1 participant