mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 20:33:53 +01:00
test:implement unit tests for fetching campaigns and fix DTO mocking logic
This commit is contained in:
parent
3e6561cdbf
commit
77ea890ea3
1 changed files with 1 additions and 1 deletions
|
|
@ -240,7 +240,7 @@ class OkHttpJsonApiClientTests {
|
||||||
|
|
||||||
fun loadJsonFromResource(fileName: String): String {
|
fun loadJsonFromResource(fileName: String): String {
|
||||||
val resourcePath = "raw/$fileName"
|
val resourcePath = "raw/$fileName"
|
||||||
//use the classloader to find the resource in the test environment
|
//uses the classloader to find the resource in the test environment
|
||||||
val inputStream = javaClass.classLoader?.getResourceAsStream(resourcePath)
|
val inputStream = javaClass.classLoader?.getResourceAsStream(resourcePath)
|
||||||
|
|
||||||
if (inputStream != null) {
|
if (inputStream != null) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue