-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into feature/post-c
- Loading branch information
Showing
70 changed files
with
2,033 additions
and
544 deletions.
There are no files selected for viewing
20 changes: 20 additions & 0 deletions
20
app/src/androidTest/java/com/github/lookupgroup27/lookup/TestLocationProvider.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package com.github.lookupgroup27.lookup | ||
|
||
import android.location.Location | ||
import androidx.test.core.app.ApplicationProvider | ||
import com.github.lookupgroup27.lookup.model.location.LocationProvider | ||
|
||
/** TestLocationProvider allows for manual setting of location values. */ | ||
class TestLocationProvider : LocationProvider(ApplicationProvider.getApplicationContext()) { | ||
fun setLocation(latitude: Double?, longitude: Double?) { | ||
if (latitude != null && longitude != null) { | ||
currentLocation.value = | ||
Location("test").apply { | ||
this.latitude = latitude | ||
this.longitude = longitude | ||
} | ||
} else { | ||
currentLocation.value = null | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.