| 1 | package com.github.javafaker; |
| 2 | |
| 3 | public class Country { |
| 4 | private final Faker faker; |
| 5 | private final String flagUrl; |
| 6 | |
| 7 | protected Country(Faker faker) { |
| 8 | this.faker = faker; |
| 9 | this.flagUrl = "http://flags.fmcdn.net/data/flags/w580/"; |
| 10 | } |
| 11 | |
| 12 | public String flag() { |
| 13 | return flagUrl + faker.fakeValuesService().resolve("country.code2", this, faker) + ".png"; |
| 14 | } |
| 15 | |
| 16 | public String countryCode2() { |
| 17 | return faker.fakeValuesService().resolve("country.code2", this, faker); |
| 18 | } |
| 19 | |
| 20 | public String countryCode3() { |
| 21 | return faker.fakeValuesService().resolve("country.code3", this, faker); |
| 22 | } |
| 23 | |
| 24 | public String capital() { |
| 25 | return faker.fakeValuesService().resolve("country.capital", this, faker); |
| 26 | } |
| 27 | |
| 28 | public String currency() { |
| 29 | return faker.fakeValuesService().resolve("country.currency", this, faker); |
| 30 | } |
| 31 | |
| 32 | public String currencyCode() { |
| 33 | return faker.fakeValuesService().resolve("country.currency_code", this, faker); |
| 34 | } |
| 35 | |
| 36 | public String name() { |
| 37 | return faker.fakeValuesService().resolve("country.name", this, faker); |
| 38 | } |
| 39 | |
| 40 | } |
nothing calls this directly
no outgoing calls
no test coverage detected