-
Notifications
You must be signed in to change notification settings - Fork 851
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
120 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package com.github.javafaker; | ||
|
||
public class Mountain { | ||
private final Faker faker; | ||
|
||
protected Mountain(Faker faker) { | ||
this.faker = faker; | ||
} | ||
|
||
public String name() { | ||
return faker.fakeValuesService().resolve("mountain.name", this, faker); | ||
} | ||
|
||
public String range() { | ||
return faker.fakeValuesService().resolve("mountain.range", this, faker); | ||
} | ||
} |
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,77 @@ | ||
en: | ||
faker: | ||
mountain: | ||
range: [ | ||
"Himalayas", | ||
"Karakoram", | ||
"Hindu Kush", | ||
"Pamirs", | ||
"Hengduan Mountains", | ||
"Tian Shan", | ||
"Kunlun", | ||
"Transhimalaya", | ||
"Andes", | ||
"Hindu Raj", | ||
"Alaska Range", | ||
"Saint Elias Mountains", | ||
"Caucasus Mountains" | ||
] | ||
name: [ | ||
"Everest", | ||
"Cerro Aconcagua", | ||
"Denali", | ||
"Kilimanjaro", | ||
"Elbrus", | ||
"Vinson Massif", | ||
"Puncak Jaya", | ||
"K2", | ||
"Kangchenjunga", | ||
"Lhotse", | ||
"Makalu", | ||
"Mount Logan", | ||
"Pico de Orizaba", | ||
"Mount Saint Elias", | ||
"Popocatépetl", | ||
"Mount Foraker", | ||
"Mount Lucania", | ||
"Iztaccíhuatl", | ||
"King Peak", | ||
"Mount Bona", | ||
"Cristobal Colon", | ||
"Citlaltepetl", | ||
"Mount Blanc", | ||
"Damavand", | ||
"Klyuchevskaya", | ||
"Nanga Parbat", | ||
"Mauna Kea", | ||
"Jengish Chokusu (Pik Pobeda)", | ||
"Chimborazo", | ||
"Bogda Shan", | ||
"Namcha Barwa", | ||
"Kinabalu", | ||
"Mount Rainier", | ||
"Ras Dashen", | ||
"Tajumulco", | ||
"Pico Bolivar", | ||
"Mount Fairweather", | ||
"Margherita", | ||
"Kangchenjunga", | ||
"Tirich Mir", | ||
"Koryaksky", | ||
"Gunung Agung", | ||
"Popocatepetl", | ||
"Mount Whitney", | ||
"Haleakala", | ||
"Shiveluch", | ||
"Nanda Devi", | ||
"Mount Waddington", | ||
"Mount Marcus Baker", | ||
"Manaslu", | ||
"Ojos del Salado", | ||
"Monte San Valentin", | ||
"Mount Fuji", | ||
"Mount Kenya", | ||
"Mount Ararat", | ||
"Dhaulagiri I", | ||
"Etna" | ||
] |
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,21 @@ | ||
package com.github.javafaker; | ||
|
||
import org.junit.Test; | ||
|
||
import static org.hamcrest.Matchers.isEmptyOrNullString; | ||
import static org.hamcrest.Matchers.not; | ||
import static org.junit.Assert.assertThat; | ||
|
||
public class MountainTest extends AbstractFakerTest { | ||
@Test | ||
public void testMountainName() { | ||
String mountainName = faker.mountain().name(); | ||
assertThat(mountainName, not(isEmptyOrNullString())); | ||
} | ||
|
||
@Test | ||
public void testMountainLeague() { | ||
String mountainLeague = faker.mountain().range(); | ||
assertThat(mountainLeague, not(isEmptyOrNullString())); | ||
} | ||
} |