mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 20:33:53 +01:00
Fix unit tests (#5947)
* move createLocale() method to companion object and add test dependency * use mockk() from Mockk library for mocking sealed classes * change method parameter to null-able String type * add null check for accessing property from unit tests * change method signature to match old method's signature It fixes the NullPointerException when running ImageProcessingUnitTest * Fix unresolved references and make properties public for unit tests * fix tests in UploadRepositoryUnitTest by making return type null-able
This commit is contained in:
parent
fe347c21fd
commit
e070c5dbe8
14 changed files with 56 additions and 52 deletions
|
|
@ -98,6 +98,7 @@ dependencies {
|
|||
testImplementation 'org.mockito:mockito-core:5.6.0'
|
||||
testImplementation "org.powermock:powermock-module-junit4:2.0.9"
|
||||
testImplementation "org.powermock:powermock-api-mockito2:2.0.9"
|
||||
testImplementation("io.mockk:mockk:1.13.5")
|
||||
|
||||
// Unit testing
|
||||
testImplementation 'junit:junit:4.13.2'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue