Open
Description
This makes the tests a lot easier and faster to run.
We can use Robolectric (at the time of writing this, it does not support JUnit 5).
If you want to run Robolectric tests with Junit 4 (using @RunWith
and @org.junit.Test
etc), remember to include testImplementation("org.junit.vintage:junit-vintage-engine:5.7.2")
dependency in the build script.
Remeber to delete the excludeEngines("junit-vintage")
from the following block of code in piechart build script so we can run JUnit 4 tests as well with the vintage engine (why was it excluded in the first place?):
useJUnitPlatform {
excludeEngines("junit-vintage")
}
See this and this for an example.
- Remember to update the GitHub workflows as well