Skip to content
This repository was archived by the owner on Dec 9, 2024. It is now read-only.

Commit a6f2c5c

Browse files
Update test annotations
1 parent b97402c commit a6f2c5c

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

OurStreets/app/build.gradle

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ android {
3838
release {
3939
minifyEnabled false
4040
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
41+
resValue "string", "google_maps_key", "\"${maps_api_key}\""
4142
}
4243
}
4344
packagingOptions {
@@ -62,6 +63,8 @@ dependencies {
6263
implementation "com.firebase:firebase-client-android:${firebaseVersion}"
6364
implementation "com.google.android.gms:play-services-maps:${mapsVersion}"
6465
implementation "com.google.maps.android:android-maps-utils:${mapsUtilsVersion}"
66+
67+
testImplementation "androidx.test:runner:1.2.0"
6568
testImplementation 'junit:junit:4.12'
6669
testImplementation "org.hamcrest:hamcrest-core:${hamcrestVersion}"
6770
testImplementation "org.hamcrest:hamcrest-library:${hamcrestVersion}"

OurStreets/app/src/test/java/com/google/samples/apps/ourstreets/model/DetailTest.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,14 @@
1616

1717
package com.google.samples.apps.ourstreets.model;
1818

19-
import android.test.suitebuilder.annotation.SmallTest;
19+
import androidx.test.filters.SmallTest;
2020

2121
import com.google.android.gms.maps.model.LatLng;
2222

2323
import org.junit.After;
2424
import org.junit.Before;
2525
import org.junit.Test;
2626

27-
import static org.hamcrest.CoreMatchers.equalTo;
2827
import static org.hamcrest.CoreMatchers.is;
2928
import static org.hamcrest.MatcherAssert.assertThat;
3029

@@ -80,4 +79,4 @@ public void testGetTilt() {
8079
public void testGetBearing() {
8180
assertThat( Math.abs(mDetailUnderTest.getBearing() - mBearing) < MAX_FLOAT_DELTA, is(true));
8281
}
83-
}
82+
}

OurStreets/app/src/test/java/com/google/samples/apps/ourstreets/model/GalleryTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
package com.google.samples.apps.ourstreets.model;
1818

19-
import android.test.suitebuilder.annotation.SmallTest;
19+
import androidx.test.filters.SmallTest;
2020

2121
import com.google.android.gms.maps.model.LatLng;
2222

@@ -111,4 +111,4 @@ public void testGetBounds_none() {
111111
mGalleryUnderTest.replaceDetails(testList);
112112
assertThat(mGalleryUnderTest.getBounds(), notNullValue());
113113
}
114-
}
114+
}

0 commit comments

Comments
 (0)