use of org.wikivoyage.listings.entity.Listing in project wikivoyage-listings by baturin.
the class InputTests method caseInsensitiveListingNames.
@Test
public void caseInsensitiveListingNames() throws Exception {
Listing poi = parseResourceSinglePOI("case-insensitive-templates.wikicode");
Assert.assertEquals("Черниговская областная филармония", poi.getTitle());
}
use of org.wikivoyage.listings.entity.Listing in project wikivoyage-listings by baturin.
the class InputTests method skipDeadLinks.
@Test
public void skipDeadLinks() throws Exception {
Listing poi = parseResourceSinglePOI("dead-link.wikicode");
Assert.assertEquals("http://www.isbryderen-elbjorn.dk", poi.getUrl());
}
use of org.wikivoyage.listings.entity.Listing in project wikivoyage-listings by baturin.
the class InputTests method processFrench.
@Test
public void processFrench() throws Exception {
List<Listing> pois = parseResourcePOIs("sample-article-fr.wikicode", new French(), "Thouars");
// Check number of POIs
Assert.assertEquals(28, pois.size());
// Check a particular POI in detail
Listing poi = pois.get(25);
Assert.assertEquals("Thouars", poi.getArticle());
Assert.assertEquals("sleep", poi.getType());
Assert.assertEquals("Camping municipal", poi.getTitle());
Assert.assertEquals("", poi.getAlt());
Assert.assertEquals("13 Rue de la Grande Côte de Crevant", poi.getAddress());
Assert.assertEquals("", poi.getDirections());
Assert.assertEquals("+33 5 49 66 17 99", poi.getPhone());
Assert.assertEquals("", poi.getTollFree());
Assert.assertEquals("", poi.getEmail());
Assert.assertEquals("", poi.getFax());
Assert.assertEquals("http://www.ville-thouars.fr/decouvrir/camping.htm", poi.getUrl());
Assert.assertEquals("", poi.getHours());
Assert.assertEquals("", poi.getCheckIn());
Assert.assertEquals("", poi.getCheckOut());
Assert.assertEquals("", poi.getImage());
Assert.assertEquals("3.2€", poi.getPrice());
Assert.assertEquals("46.979967", poi.getLatitude());
Assert.assertEquals("-0.219622", poi.getLongitude());
Assert.assertEquals("Situé au bord de la rivière, immédiatement en contrebas du Parc Imbert et du vieux " + "centre ville. 9 h - 12 h et 15 h 30 - 19 h 30, seulement l'été.", poi.getDescription());
}
use of org.wikivoyage.listings.entity.Listing in project wikivoyage-listings by baturin.
the class InputTests method processRussianRoadTemplate.
@Test
public void processRussianRoadTemplate() throws Exception {
Listing poi = parseResourceSinglePOI("russian-road-template.wikicode", new Russian());
Assert.assertEquals("На 38 км Ново-Рижского шоссе М9 (19 км от МКАД) " + "свернуть по указателю на пирамиду.", poi.getDirections());
}
use of org.wikivoyage.listings.entity.Listing in project wikivoyage-listings by baturin.
the class InputTests method processEnglish.
@Test
public void processEnglish() throws Exception {
List<Listing> pois = parseResourcePOIs("sample-article-en.wikicode", new English(), "Tokyo/Roppongi");
// Check number of POIs
Assert.assertEquals(71, pois.size());
// Check a particular POI in detail
Listing poi = pois.get(68);
Assert.assertEquals("Tokyo/Roppongi", poi.getArticle());
Assert.assertEquals("sleep", poi.getType());
Assert.assertEquals("Grand Hyatt Tokyo", poi.getTitle());
Assert.assertEquals("", poi.getAlt());
Assert.assertEquals("6-10-3 Roppongi", poi.getAddress());
Assert.assertEquals("In Roppongi Hills", poi.getDirections());
Assert.assertEquals("+81 3 4333-1234", poi.getPhone());
Assert.assertEquals("", poi.getTollFree());
Assert.assertEquals("", poi.getEmail());
Assert.assertEquals("+81 3 4333-8123", poi.getFax());
Assert.assertEquals("http://tokyo.grand.hyatt.com/", poi.getUrl());
Assert.assertEquals("", poi.getHours());
Assert.assertEquals("15:00", poi.getCheckIn());
Assert.assertEquals("12:00", poi.getCheckOut());
Assert.assertEquals("Grand Hyatt Tokyo.JPG", poi.getImage());
Assert.assertEquals("Rack rates marginally cheaper than the Park Hyatt at ¥37,000 and up", poi.getPrice());
Assert.assertEquals("35.65968", poi.getLatitude());
Assert.assertEquals("139.72814", poi.getLongitude());
Assert.assertEquals("A part of Roppongi Hills, and not to be confused with the more famous Park Hyatt " + "of ''Lost in Translation'' fame, which is in Shinjuku. Sleek and minimalistic, " + "all black, gray and brown, with expensive design that never hesitates to sacrifice " + "function for form, but the superlative service makes up for it.", poi.getDescription());
}
Aggregations