Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adapt to navitia.io configuration (one single country provider)
- Loading branch information
Showing
4 changed files
with
92 additions
and
60 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -91,5 +91,5 @@ public enum NetworkId { | |
GHANA, | ||
|
||
// Nicaragua | ||
ESTELI, MANAGUA, | ||
NICARAGUA, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
85 changes: 85 additions & 0 deletions
85
enabler/test/de/schildbach/pte/live/NicaraguaProviderLiveTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
/* | ||
* Copyright 2015-2016 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 org.junit.Test; | ||
|
||
import de.schildbach.pte.NicaraguaProvider; | ||
import de.schildbach.pte.dto.Point; | ||
|
||
import static org.junit.Assert.assertTrue; | ||
|
||
public class NicaraguaProviderLiveTest extends AbstractNavitiaProviderLiveTest { | ||
|
||
public NicaraguaProviderLiveTest() { | ||
super(new NicaraguaProvider(secretProperty("navitia.authorization"))); | ||
} | ||
|
||
@Test | ||
public void nearbyStationsAddress() throws Exception { | ||
// Managua | ||
nearbyStationsAddress(13090080, -86356250); | ||
} | ||
|
||
@Test | ||
public void nearbyStationsAddress2() throws Exception { | ||
// Esteli | ||
nearbyStationsAddress(12146120, -86274660); | ||
} | ||
|
||
@Test | ||
public void nearbyStationsStation() throws Exception { | ||
nearbyStationsStation("stop_point:MNI:SP:node3230617621"); | ||
} | ||
|
||
@Test | ||
public void nearbyStationsInvalidStation() throws Exception { | ||
nearbyStationsInvalidStation("stop_point:MNIX:SP:node3230617621"); | ||
} | ||
|
||
@Test | ||
public void queryDeparturesEquivsFalse() throws Exception { | ||
queryDeparturesEquivsFalse("stop_point:MNI:SP:node3230617621"); | ||
} | ||
|
||
@Test | ||
public void queryDeparturesInvalidStation() throws Exception { | ||
queryDeparturesInvalidStation("stop_point:MNIX:SP:node3230617621"); | ||
} | ||
|
||
@Test | ||
public void suggestLocations() throws Exception { | ||
suggestLocationsFromName("Hospital"); | ||
} | ||
|
||
@Test | ||
public void queryTripStations() throws Exception { | ||
queryTrip("27 de Mayo", "San Miguel Arcángel"); | ||
} | ||
|
||
@Test | ||
public void queryMoreTrips() throws Exception { | ||
queryMoreTrips("Hospital", "Super Las Segovias"); | ||
} | ||
|
||
@Test | ||
public void getArea() throws Exception { | ||
final Point[] polygon = provider.getArea(); | ||
assertTrue(polygon.length > 0); | ||
} | ||
} |