Add Robolectric test dependency.

This commit is contained in:
Isira Seneviratne 2020-04-28 07:29:40 +05:30
parent 92e8ca17f6
commit a30699cc5b
1 changed files with 7 additions and 2 deletions

View File

@ -87,8 +87,11 @@ android {
}
testOptions {
unitTests.all {
useJUnitPlatform()
unitTests {
includeAndroidResources = true
all {
useJUnitPlatform()
}
}
}
tasks.withType(Test) {
@ -110,6 +113,7 @@ dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'org.eclipse.collections:eclipse-collections:10.2.0'
testImplementation 'androidx.test:core:1.2.0'
testImplementation 'com.google.guava:guava-testlib:28.2-jre'
testImplementation 'commons-io:commons-io:2.6'
testImplementation 'junit:junit:4.13'
@ -117,6 +121,7 @@ dependencies {
testImplementation "org.junit.jupiter:junit-jupiter-params:$junit5_version"
testImplementation "org.powermock:powermock-module-junit4:$powermock_version"
testImplementation "org.powermock:powermock-api-mockito2:$powermock_version"
testImplementation 'org.robolectric:robolectric:4.3.1'
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:$junit5_version"
testRuntimeOnly "org.junit.vintage:junit-vintage-engine:$junit5_version"
}