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