-
-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- One that cycles through a collection / array. - One that returns an arbitrary CityName
- Loading branch information
Showing
8 changed files
with
20,508 additions
and
32 deletions.
There are no files selected for viewing
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
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
39 changes: 39 additions & 0 deletions
39
src/main/java/net/andreinc/mockneat/unit/address/Cities.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,39 @@ | ||
package net.andreinc.mockneat.unit.address; | ||
|
||
import net.andreinc.mockneat.MockNeat; | ||
import net.andreinc.mockneat.abstraction.MockUnitBase; | ||
import net.andreinc.mockneat.abstraction.MockUnitString; | ||
import net.andreinc.mockneat.types.enums.DictType; | ||
|
||
/** | ||
* Copyright 2017, Andrei N. Ciobanu | ||
Permission is hereby granted, free of charge, to any user obtaining a copy of this software and associated | ||
documentation files (the "Software"), to deal in the Software without restriction, including without limitation the | ||
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit | ||
persons to whom the Software is furnished to do so, subject to the following conditions: | ||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the | ||
Software. | ||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE | ||
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. PARAM NO EVENT SHALL THE AUTHORS OR | ||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER PARAM AN ACTION OF CONTRACT, TORT OR | ||
OTHERWISE, ARISING FROM, FREE_TEXT OF OR PARAM CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS PARAM THE SOFTWARE. | ||
*/ | ||
|
||
//TODO document and unit tests | ||
public class Cities extends MockUnitBase { | ||
|
||
public Cities(MockNeat mockNeat) { | ||
super(mockNeat); | ||
} | ||
|
||
public MockUnitString capitals() { | ||
return () -> mockNeat.dicts().type(DictType.CITIES_CAPITALS).supplier(); | ||
} | ||
|
||
public MockUnitString us() { | ||
return () -> mockNeat.dicts().type(DictType.CITIES_US).supplier(); | ||
} | ||
} |
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
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
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,202 @@ | ||
Abu Dhabi | ||
Abuja | ||
Accra | ||
Addis Ababa | ||
Amman | ||
Amsterdam | ||
Andorra la Vella | ||
Ankara | ||
Ankara | ||
Antananarivo | ||
Apia | ||
Asgabat | ||
Asmara | ||
Astana | ||
Asuncion | ||
Athens | ||
Baghdad | ||
Baku | ||
Bamako | ||
Bandar Seri Begawan | ||
Bangkok | ||
Bangui | ||
Banjul | ||
Basseterre | ||
Beijing | ||
Beirut | ||
Belgrade | ||
Belmopan | ||
Berlin | ||
Bern | ||
Bishkek | ||
Bogotá | ||
Brasília | ||
Bratislava | ||
Brazzaville | ||
Bridgetown | ||
Brussels | ||
Bucharest | ||
Budapest | ||
Buenos Aires | ||
Bujumbura | ||
Cairo | ||
Canberra | ||
Caracas | ||
Castries | ||
Cayenne | ||
Chisinau | ||
Cockburn Town | ||
Conakry | ||
Copenhagen | ||
Dakar | ||
Damascus | ||
Dar es Salaam | ||
Dhaka | ||
Dili | ||
Djibouti | ||
Doha | ||
Dublin | ||
Dushanbe | ||
Freetown | ||
Funafuti | ||
Gaborone | ||
George Town | ||
Georgetown | ||
Guatemala | ||
Hanoi | ||
Harare | ||
Havana | ||
Helsinki | ||
Honiara | ||
Islamabad | ||
Jakarta | ||
Jerusalem | ||
Jerusalem | ||
Juba | ||
Kabul | ||
Kampala | ||
Kathmandu | ||
Khartoum | ||
Kigali | ||
Kingston | ||
Kingstown | ||
Kinshasa | ||
Koror | ||
Kuala Lumpur | ||
Kuwait | ||
Kyiv or Kiev | ||
La Paz and Sucre | ||
La’youn | ||
Libreville | ||
Lilongwe | ||
Lima | ||
Lisbon | ||
Ljubljana | ||
Lome | ||
London | ||
Luanda | ||
Lusaka | ||
Luxembourg City | ||
Madrid | ||
Majuro | ||
Malabo | ||
Malé | ||
Managua | ||
Manama | ||
Manila | ||
Maputo | ||
Maseru | ||
Mbabane | ||
Mexico City | ||
Minsk | ||
Mogadishu | ||
Monaco | ||
Monrovia | ||
Montevideo | ||
Moroni | ||
Moscow | ||
Moscow | ||
Muscat | ||
Nairobi | ||
Nassau | ||
Naypyidaw | ||
New Delhi | ||
Niamey | ||
Nicosia | ||
Nouakchott | ||
Nuku’alofa | ||
N’Djamena | ||
Oslo | ||
Ottawa | ||
Ouagadougou | ||
Palikir | ||
Panama City | ||
Paramaribo | ||
Paris | ||
Phnom Penh | ||
Podgorica | ||
Port Louis | ||
Port Moresby | ||
Port Vila | ||
Port of Spain | ||
Port-au-Prince | ||
Porto Novo | ||
Prague | ||
Praia | ||
Pretoria | ||
Pyongyang | ||
Quito | ||
Rabat | ||
Reykjavik | ||
Riga | ||
Riyadh | ||
Rome | ||
Roseau | ||
San José | ||
San Juan | ||
San Marino | ||
San Salvador | ||
Sana’a | ||
Santiago | ||
Santo Domingo | ||
Sarajevo | ||
Seoul | ||
Singapore | ||
Skopje | ||
Sofia | ||
South Tarawa | ||
Sri Jayawardenapura Kotte and Colombo now | ||
St George’s | ||
St. John’s | ||
Stockholm | ||
Suva | ||
São Tomé | ||
Taipei | ||
Taipei | ||
Tallinn | ||
Tashkent | ||
Tbilisi | ||
Tegucigalpa | ||
Tehran | ||
Thimphu | ||
Tirana | ||
Tokyo | ||
Tripoli | ||
Tunis | ||
Ulaanbaatar | ||
Vaduz | ||
Valletta | ||
Vatican City | ||
Victoria | ||
Vienna | ||
Vientiane | ||
Vilnius | ||
Warsaw | ||
Washington DC | ||
Wellington | ||
Windhoek | ||
Yamoussoukro | ||
Yaoundé | ||
Yaren | ||
Yerevan | ||
Zagreb |
Oops, something went wrong.