Interface GeolocationRequest
public interface GeolocationRequest
A pending one-shot
Geolocation.get(...) request observed by the test
controller. Tests can inspect the options() the facade was called
with, and resolve the request manually via
respondWith(GeolocationPosition) or
respondWith(GeolocationError).- Since:
- 1.1
-
Method Summary
Modifier and TypeMethodDescriptionbooleanWhether this request still awaits a response.@Nullable com.vaadin.flow.component.geolocation.GeolocationOptionsoptions()The options the application passed to get(...), ornull.voidrespondWith(com.vaadin.flow.component.geolocation.GeolocationError error) Resolves the request with the given error.voidrespondWith(com.vaadin.flow.component.geolocation.GeolocationPosition position) Resolves the request with the given position.
-
Method Details
-
options
@Nullable com.vaadin.flow.component.geolocation.GeolocationOptions options()The options the application passed to get(...), ornull.- Returns:
- the options the request was made with
-
isPending
boolean isPending()Whether this request still awaits a response.- Returns:
truewhile the request is still waiting for a position
-
respondWith
void respondWith(com.vaadin.flow.component.geolocation.GeolocationPosition position) Resolves the request with the given position. ThrowsIllegalStateExceptionif the request was already resolved.- Parameters:
position- the caret position
-
respondWith
void respondWith(com.vaadin.flow.component.geolocation.GeolocationError error) Resolves the request with the given error. ThrowsIllegalStateExceptionif the request was already resolved.- Parameters:
error- the error view to register
-