LocationSubject

public class LocationSubject


Subject for making assertions about Locations.

Summary

Public constructors

Public methods

FloatSubject
DoubleSubject
static LocationSubject
assertThat(Location location)
FloatSubject
FloatSubject
FloatSubject
bearingTo(Location location)
FloatSubject
bearingTo(double latitude, double longitude)
FloatSubject
distanceTo(Location location)
FloatSubject
distanceTo(double latitude, double longitude)
void
LongSubject
LongSubject
final BundleSubject
void
void
void
void
void
hasProvider(String provider)
void
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
isEqualTo(Object otherObj)
void
isFaraway(Location other, float distanceM)

Verifies that the location is at least distanceM meters away from another location.

void
void
isNearby(Location other, float distanceM)

Verifies that the location is at most distanceM meters away from another location.

void
isNotAt(Location other)
void
isNotAt(double latitude, double longitude)
void
static Factory<LocationSubject, Location>
FloatSubject
FloatSubject
LongSubject
FloatSubject

Public constructors

LocationSubject

public LocationSubject()

Public methods

accuracy

public FloatSubject accuracy()

altitude

public DoubleSubject altitude()

assertThat

public static LocationSubject assertThat(Location location)

bearing

public FloatSubject bearing()

bearingAccuracy

public FloatSubject bearingAccuracy()

bearingTo

public FloatSubject bearingTo(Location location)

bearingTo

public FloatSubject bearingTo(double latitude, double longitude)

distanceTo

public FloatSubject distanceTo(Location location)

distanceTo

public FloatSubject distanceTo(double latitude, double longitude)

doesNotHaveProvider

public void doesNotHaveProvider(String provider)

elapsedRealtimeMillis

public LongSubject elapsedRealtimeMillis()

elapsedRealtimeNanos

public LongSubject elapsedRealtimeNanos()

extras

public final BundleSubject extras()

hasAccuracy

public void hasAccuracy()

hasAltitude

public void hasAltitude()

hasBearing

public void hasBearing()

hasBearingAccuracy

public void hasBearingAccuracy()

hasProvider

public void hasProvider(String provider)

hasSpeed

public void hasSpeed()

hasSpeedAccuracy

public void hasSpeedAccuracy()

hasVerticalAccuracy

public void hasVerticalAccuracy()

isAt

public void isAt(Location other)

Verifies that the location is at the same latitude/longitude as another location.

isAt

public void isAt(double latitude, double longitude)

isEqualTo

public void isEqualTo(Object otherObj)

isFaraway

public void isFaraway(Location other, float distanceM)

Verifies that the location is at least distanceM meters away from another location.

isMock

public void isMock()

isNearby

public void isNearby(Location other, float distanceM)

Verifies that the location is at most distanceM meters away from another location.

isNotAt

public void isNotAt(Location other)

isNotAt

public void isNotAt(double latitude, double longitude)

isNotMock

public void isNotMock()

locations

public static Factory<LocationSubject, Location> locations()

speed

public FloatSubject speed()

speedAccuracy

public FloatSubject speedAccuracy()

time

public LongSubject time()

verticalAccuracy

public FloatSubject verticalAccuracy()