From a3d9850a42d55073b02cedb098a47d85f3ba852c Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Thu, 19 Apr 2018 15:45:52 +0200 Subject: [PATCH] update to latest robolectric 3.8 and mockito 2.7.22 http://robolectric.org/getting-started/#building-with-gradle --- app/build.gradle | 7 +++---- .../fdroid/fdroid/updater/ProperMultiRepoUpdaterTest.java | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 373d2acaf..eae44a678 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -49,11 +49,9 @@ dependencies { compile 'org.bouncycastle:bcpkix-jdk15on:1.59' compile 'org.bouncycastle:bcprov-jdk15on:1.59' - testCompile "org.robolectric:robolectric:3.3.2" + testCompile "org.robolectric:robolectric:3.8" testCompile 'junit:junit:4.12' - // As per https://github.com/robolectric/robolectric/issues/1932#issuecomment-219796474 - testCompile 'org.khronos:opengl-api:gl1.1-android-2.1_r1' - testCompile "org.mockito:mockito-core:1.10.19" + testCompile "org.mockito:mockito-core:2.7.22" androidTestCompile "com.android.support:support-annotations:25.3.1" androidTestCompile 'com.android.support.test:runner:0.5' @@ -194,6 +192,7 @@ android { testOptions { unitTests { + includeAndroidResources = true // prevent tests from dying on android.util.Log calls returnDefaultValues = true all { diff --git a/app/src/test/java/org/fdroid/fdroid/updater/ProperMultiRepoUpdaterTest.java b/app/src/test/java/org/fdroid/fdroid/updater/ProperMultiRepoUpdaterTest.java index bd006907a..61bacd87a 100644 --- a/app/src/test/java/org/fdroid/fdroid/updater/ProperMultiRepoUpdaterTest.java +++ b/app/src/test/java/org/fdroid/fdroid/updater/ProperMultiRepoUpdaterTest.java @@ -445,7 +445,7 @@ public class ProperMultiRepoUpdaterTest extends MultiRepoUpdaterTest { if ("ro.product.cpu.abilist".equals(key)) { return "armeabi"; } - return ShadowSystemProperties.get(key); + return ShadowSystemProperties.native_get(key); } }