This repository has been archived by the owner on Mar 5, 2023. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove use of
junit.framework
package
There are certain places in our code base where we use classes from the `junit.framework` package. The `junit.framework` package exists for backwards-compatibility with JUnit 3[1]. We are not a legacy code base stuck on JUnit 3, thus we should use the JUnit 4 API. Replace uses of the `junit.framework` package with the JUnit 4 API equivalents, namely: * Rather than using `junit.framework.TestCase.assertNotNull`, use the JUnit 4 API's `org.junit.Assert.assertNotNull`[2]. * Rather than using `junit.framework.AssertionFailedError`, use `java.lang.AssertionError` instead, since that is what is thrown by the JUnit 4 API on assertion failures. [1] From the package-info.java of `junit.framework` at https://github.com/junit-team/junit4/blob/02c328028b4d32c15bbf0becc9838e54ecbafcbf/src/main/java/junit/framework/package-info.java#L2 "Provides JUnit v3.x core classes" [2] https://stackoverflow.com/a/291074 "JUnit 3.X: junit.framework.Assert JUnit 4.X: org.junit.Assert Prefer the newest one, especially when running JDK5 and higher with annotation support."
- Loading branch information