| 1 | package com.github.javafaker; |
| 2 | |
| 3 | public class Dune { |
| 4 | |
| 5 | private final Faker faker; |
| 6 | |
| 7 | protected Dune(Faker faker) { |
| 8 | this.faker = faker; |
| 9 | } |
| 10 | |
| 11 | public String character() { |
| 12 | return faker.fakeValuesService().resolve("dune.characters", this, faker); |
| 13 | } |
| 14 | |
| 15 | public String title() { |
| 16 | return faker.fakeValuesService().resolve("dune.titles", this, faker); |
| 17 | } |
| 18 | |
| 19 | public String planet() { |
| 20 | return faker.fakeValuesService().resolve("dune.planets", this, faker); |
| 21 | } |
| 22 | |
| 23 | public String quote() { |
| 24 | return quote(faker.options().option(Dune.Quote.class)); |
| 25 | } |
| 26 | |
| 27 | public String quote(Quote quote) { |
| 28 | return faker.fakeValuesService().resolve("dune.quotes." + quote.yamlKey, this, faker); |
| 29 | } |
| 30 | |
| 31 | public String saying() { |
| 32 | return saying(faker.options().option(Dune.Saying.class)); |
| 33 | } |
| 34 | |
| 35 | public String saying(Saying saying) { |
| 36 | return faker.fakeValuesService().resolve("dune.sayings." + saying.yamlKey, this, faker); |
| 37 | } |
| 38 | |
| 39 | public enum Quote { |
| 40 | GUILD_NAIVGATOR("guild_navigator"), |
| 41 | EMPEROR("emperor"), |
| 42 | PAUL("paul"), |
| 43 | THUFIR("thufir"), |
| 44 | JESSICA("jessica"), |
| 45 | IRULAN("irulan"), |
| 46 | MOHIAM("mohiam"), |
| 47 | GURNEY("gurney"), |
| 48 | LETO("leto"), |
| 49 | STILGAR("stilgar"), |
| 50 | LIET_KYNES("liet_kynes"), |
| 51 | PARDOT_KYNES("pardot_kynes"), |
| 52 | BARON_HARKONNEN("baron_harkonnen"), |
| 53 | PITER("piter"), |
| 54 | ALIA("alia"), |
| 55 | MAPES("mapes"), |
| 56 | DUNCAN("duncan"), |
| 57 | YUEH("yueh"); |
| 58 | |
| 59 | private final String yamlKey; |
| 60 |
nothing calls this directly
no outgoing calls
no test coverage detected