{% setvar book_path %}/reference/kotlin/androidx/_book.yaml{% endsetvar %} {% include "_shared/_reference-head-tags.html" %}
class LocationSubject
Subject for making assertions about Locations.
Public functions |
|
|---|---|
FloatSubject |
accuracy() |
DoubleSubject |
altitude() |
LocationSubject |
assertThat(location: Location) |
FloatSubject |
bearing() |
FloatSubject |
|
FloatSubject |
|
FloatSubject |
bearingTo(location: Location) |
FloatSubject |
distanceTo(latitude: Double, longitude: Double) |
FloatSubject |
distanceTo(location: Location) |
Unit |
doesNotHaveProvider(provider: String) |
LongSubject |
|
LongSubject |
|
BundleSubject |
extras() |
Unit |
|
Unit |
|
Unit |
|
Unit |
|
Unit |
hasProvider(provider: String) |
Unit |
hasSpeed() |
Unit |
|
Unit |
|
Unit |
isAt(other: Location)Verifies that the location is at the same latitude/longitude as another location. |
Unit |
|
Unit |
|
Unit |
Verifies that the location is at least |
Unit |
isMock() |
Unit |
Verifies that the location is at most |
Unit |
isNotAt(other: Location) |
Unit |
|
Unit |
|
Factory<LocationSubject, Location> |
|
FloatSubject |
speed() |
FloatSubject |
|
LongSubject |
time() |
FloatSubject |
|
fun isAt(other: Location): Unit
Verifies that the location is at the same latitude/longitude as another location.
fun isFaraway(other: Location, distanceM: Float): Unit
Verifies that the location is at least distanceM meters away from another location.