LocationSimulationRule
class LocationSimulationRule(iviServiceApiRule: IviServiceApiRule, initialLocationSimulationDataProvider: InitialLocationSimulationDataProvider?) : ResourceRule
Manages the simulated position during tests.
When an initial non-null LocationSimulationData is provided through the initialLocationSimulationDataProvider this position is simulated before starting the tests. The rule asserts when this is not possible.
It is only possible to simulate the position when:
The LocationSimulationService can be used.
The LocationSimulationService indicates it can simulate positions.
During a test the simulated position can be changed by changing locationSimulationData.
Constructors
Link copied to clipboard
fun LocationSimulationRule(iviServiceApiRule: IviServiceApiRule, initialLocationSimulationDataProvider: InitialLocationSimulationDataProvider?)
Properties
Link copied to clipboard
Link copied to clipboard
true
if location simulation is possible. If false
, location simulation is not possible because the SUT is not configured with the LocationSimulationService or the mock_location
permission is not granted.