I bump version of junit
to 4.11 and get:
[WARNING] [deprecation] Assert in junit.framework has been deprecated
[WARNING] [deprecation] Assert in junit.framework has been deprecated
....
How and to what migrate?
framework to org. junit. Assert in JUnit 4.0 - you can use that instead, it's not deprecated.
assertThat method defined in Hamcrest 1.3. Therefore, it is recommended to directly use the equivalent assertion defined in the third party Hamcrest library. This rule finds the deprecated usages of Assert. assertThat and automatically replaces them with MatcherAssert.
junit. Assert class. The fail assertion fails a test throwing an AssertionError. It can be used to verify that an actual exception is thrown or when we want to make a test failing during its development.
As it seems the Assert class has been moved from junit.framework
to org.junit.Assert
in JUnit 4.0 - you can use that instead, it's not deprecated.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With