Skip to content

Commit

Permalink
Add mockito-core for instrumented tests
Browse files Browse the repository at this point in the history
- Codacy code fixes
  • Loading branch information
ekigamba committed Aug 23, 2022
1 parent b725b8a commit ef13dbe
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ The library offers a view `KujakuMapView` that provides more functionality than
- For Mapbox related functionality, [go here](https://docs.mapbox.com/android/maps/overview/)
- For extra features provided by this library [go here](./SPECIFICATION.md)

#### `Unable to resolve artifact: Missing` while running tests
## `Unable to resolve artifact: Missing` while running tests

This is encountered when Robolectric has problems downloading the jars it needs for different Android SDK levels. If you keep running into this you can download the JARs locally and point Robolectric to them by doing:

Expand Down
1 change: 1 addition & 0 deletions download-robolectric-deps.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/bin/sh
mkdir robolectric-deps
wget -nc https://repo1.maven.org/maven2/org/robolectric/android-all/10-robolectric-5803371/android-all-10-robolectric-5803371.jar -P robolectric-deps
wget -nc https://repo1.maven.org/maven2/org/robolectric/android-all/8.1.0-robolectric-4611349/android-all-8.1.0-robolectric-4611349.jar -P robolectric-deps
Expand Down
1 change: 1 addition & 0 deletions library/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ private static void testDependencies(instance, configuration) {
configuration.testImplementation instance.androidxTestCore
configuration.androidTestImplementation instance.junit
configuration.androidTestImplementation 'org.mockito:mockito-android:2.7.22'
configuration.androidTestImplementation 'org.mockito:mockito-core:2.7.22'
configuration.androidTestImplementation ('com.android.support.test.espresso:espresso-core:3.1.0', {
exclude group: 'com.android.support', module: 'support-annotations'
exclude group: 'net.sf.kxml', module: 'kxml2'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
import java.util.concurrent.CountDownLatch;

import io.ona.kujaku.BaseTest;
import io.ona.kujaku.BuildConfig;
import io.ona.kujaku.data.MapBoxDownloadTask;
import io.ona.kujaku.listeners.IncompleteMapDownloadCallback;
import io.ona.kujaku.listeners.OnDownloadMapListener;
Expand Down
2 changes: 1 addition & 1 deletion library/src/main/java/io/ona/kujaku/KujakuLibrary.java
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public static void init(Context context) {
AndroidThreeTen.init(context);

if (Timber.treeCount() < 1) {
timber.log.Timber.plant(new DebugTree());
Timber.plant(new DebugTree());
}
}

Expand Down

0 comments on commit ef13dbe

Please sign in to comment.