public class

LocationSubject

extends Subject
java.lang.Object
   ↳ com.google.common.truth.Subject
     ↳ androidx.test.ext.truth.location.LocationSubject

Class Overview

Subject for making assertions about Locations.

Summary

Public Methods
static LocationSubject assertThat(Location location)
final BundleSubject extras()
void hasAccuracy()
void hasAltitude()
void hasBearing()
void hasSpeed()
void isAt(Location other)
Verifies that the location is centered on the same latitude/longitude as another location.
void isEqualTo(Object otherObj)
void isFaraway(Location other, float distanceM)
Verifies that the location is at least distanceM meters away from another location.
void isMock()
void isNearby(Location other, float distanceM)
Verifies that the location is at most distanceM meters away from another location.
void isNotMock()
static Factory<LocationSubjectLocation> locations()
[Expand]
Inherited Methods
From class com.google.common.truth.Subject
From class java.lang.Object

Public Methods

public static LocationSubject assertThat (Location location)

Parameters
location Location
Returns
LocationSubject

public final BundleSubject extras ()

Returns
BundleSubject

public void hasAccuracy ()

public void hasAltitude ()

public void hasBearing ()

public void hasSpeed ()

public void isAt (Location other)

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

Parameters
other Location

public void isEqualTo (Object otherObj)

Parameters
otherObj Object

public void isFaraway (Location other, float distanceM)

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

Parameters
other Location
distanceM float

public void isMock ()

public void isNearby (Location other, float distanceM)

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

Parameters
other Location
distanceM float

public void isNotMock ()

public static Factory<LocationSubjectLocation> locations ()

Returns
Factory<LocationSubjectLocation>