mirror of
https://gitlab.com/oeffi/public-transport-enabler.git
synced 2025-07-07 05:48:46 +00:00
Navitia: New Brazil provider, covering São Paulo, Rio de Janeiro, Belo Horizonte and Porto Allegre.
This commit is contained in:
parent
82c6761097
commit
d32131cfa7
3 changed files with 156 additions and 0 deletions
86
test/de/schildbach/pte/live/BrazilProviderLiveTest.java
Normal file
86
test/de/schildbach/pte/live/BrazilProviderLiveTest.java
Normal file
|
@ -0,0 +1,86 @@
|
|||
/*
|
||||
* Copyright the original author or authors.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package de.schildbach.pte.live;
|
||||
|
||||
import de.schildbach.pte.BrazilProvider;
|
||||
import de.schildbach.pte.dto.Point;
|
||||
import org.junit.Test;
|
||||
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
/**
|
||||
* @author Torsten Grote
|
||||
*/
|
||||
public class BrazilProviderLiveTest extends AbstractNavitiaProviderLiveTest {
|
||||
public BrazilProviderLiveTest() {
|
||||
super(new BrazilProvider(secretProperty("navitia.authorization")));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void nearbyStationsAddress() throws Exception {
|
||||
// Sao Paulo
|
||||
nearbyStationsAddress(-23547900, -46635200);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void nearbyStationsAddress2() throws Exception {
|
||||
// Rio de Janeiro
|
||||
nearbyStationsAddress(-22905300, -43179500);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void nearbyStationsStation() throws Exception {
|
||||
nearbyStationsStation("stop_point:OIO:SP:18255914");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void nearbyStationsInvalidStation() throws Exception {
|
||||
nearbyStationsInvalidStation("stop_point:OIO:SPX:18255914");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void queryDeparturesEquivsFalse() throws Exception {
|
||||
queryDeparturesEquivsFalse("stop_point:OSA:SP:800016608");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void queryDeparturesInvalidStation() throws Exception {
|
||||
queryDeparturesInvalidStation("stop_point:OWX:SP:6911");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void suggestLocations() throws Exception {
|
||||
suggestLocationsFromName("Republica");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void queryTripStations() throws Exception {
|
||||
queryTrip("Benjamim Constant", "Avenida Paulista");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void queryMoreTrips() throws Exception {
|
||||
queryMoreTrips("Republica", "Avenida Paulista");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void getArea() throws Exception {
|
||||
final Point[] polygon = provider.getArea();
|
||||
assertTrue(polygon.length > 0);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue