2019-03-14 18:31:14 +01:00
|
|
|
defmodule Mobilizon.Service.Geospatial.Mock do
|
2019-03-12 11:52:28 +01:00
|
|
|
@moduledoc """
|
2019-09-22 16:26:23 +02:00
|
|
|
Mock for Geospatial Provider implementations.
|
2019-03-12 11:52:28 +01:00
|
|
|
"""
|
2019-09-22 16:26:23 +02:00
|
|
|
|
2019-03-12 11:52:28 +01:00
|
|
|
alias Mobilizon.Addresses.Address
|
2019-09-22 16:26:23 +02:00
|
|
|
alias Mobilizon.Service.Geospatial.Provider
|
2019-03-12 11:52:28 +01:00
|
|
|
|
|
|
|
@behaviour Provider
|
|
|
|
|
|
|
|
@impl Provider
|
2019-03-14 18:31:14 +01:00
|
|
|
def geocode(_lon, _lat, _options \\ []), do: []
|
2019-03-12 11:52:28 +01:00
|
|
|
|
|
|
|
@impl Provider
|
2019-03-14 18:31:14 +01:00
|
|
|
def search(_q, _options \\ []), do: [%Address{description: "10 rue Jangot, Lyon"}]
|
2019-03-12 11:52:28 +01:00
|
|
|
end
|