AVV_AACHEN: handle inconsistent place "AC" and order for some stations in Aachen

This commit is contained in:
ThTomate 2024-01-16 19:33:05 +01:00 committed by Andreas Schildbach
parent 5f0f872b67
commit fffd2c9acb
2 changed files with 32 additions and 1 deletions

View file

@ -20,8 +20,10 @@ package de.schildbach.pte.live;
import static org.hamcrest.CoreMatchers.hasItem;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertThat;
import static org.junit.Assert.assertTrue;
import java.util.Date;
import java.util.Objects;
import org.junit.Test;
@ -74,6 +76,20 @@ public class AvvAachenProviderLiveTest extends AbstractProviderLiveTest {
assertThat(result.getLocations(), hasItem(new Location(LocationType.STATION, "1576", "Aachen", "Gaßmühle")));
}
@Test
public void suggestLocationBadSuffix() throws Exception {
final SuggestLocationsResult result = suggestLocations("Turmstraße");
print(result);
assertTrue(Objects.requireNonNull(result.getLocations().get(0).name).contains("Turmstr"));
}
@Test
public void suggestLocationSpecialPlaceStationOrder() throws Exception {
final SuggestLocationsResult result = suggestLocations("Jupp-Müller");
print(result);
assertTrue(Objects.requireNonNull(result.getLocations().get(0).name).contains("Jupp-Müller"));
}
@Test
public void suggestLocationsPOI() throws Exception {
final SuggestLocationsResult result = suggestLocations("Suermondt-Ludwig-Museum");