Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add adjectives #785

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ See [CONTRIBUTING.md](https://github.com/DiUS/java-faker/blob/master/CONTRIBUTIN
Fakers
-----
* Address
* Adjective
* Ancient
* Animal
* App
Expand Down
26 changes: 26 additions & 0 deletions src/main/java/com/github/javafaker/Adjective.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package com.github.javafaker;

public class Adjective {

private final Faker faker;

protected Adjective(Faker faker) {
this.faker = faker;
}

/**
* <p>Produces a positive adjective.</p>
* @return random a positive adjective.
*/
public String positive() {
return faker.resolve("adjective.positive");
}

/**
* <p>Produces a negative adjective.</p>
* @return random a negative adjective.
*/
public String negative() {
return faker.resolve("adjective.negative");
}
}
6 changes: 6 additions & 0 deletions src/main/java/com/github/javafaker/Faker.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ public class Faker {
private final RandomService randomService;
private final FakeValuesService fakeValuesService;

private final Adjective adjective;
private final Ancient ancient;
private final App app;
private final Artist artist;
Expand Down Expand Up @@ -132,6 +133,7 @@ public Faker(FakeValuesService fakeValuesService, RandomService random) {
this.randomService = random;
this.fakeValuesService = fakeValuesService;

this.adjective = new Adjective(this);
this.ancient = new Ancient(this);
this.app = new App(this);
this.artist = new Artist(this);
Expand Down Expand Up @@ -347,6 +349,10 @@ FakeValuesService fakeValuesService() {
return this.fakeValuesService;
}

public Adjective adjective() {
return adjective;
}

public Ancient ancient() {
return ancient;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ public String getPath() {
}

private static List<String> FILES = Arrays.asList("address.yml",
"adjective.yml",
"ancient.yml",
"animal.yml",
"app.yml",
Expand Down
179 changes: 179 additions & 0 deletions src/main/resources/en/adjective.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,179 @@
en:
faker:
adjective:
positive:
- 'adorable'
- 'adventurous'
- 'agreeable'
- 'attractive'
- 'beautiful'
- 'brainy'
- 'brave'
- 'bright'
- 'calm'
- 'charming'
- 'cheerful'
- 'clean'
- 'clever'
- 'colorful'
- 'combative'
- 'comfortable'
- 'cooperative'
- 'courageous'
- 'curious'
- 'cute'
- 'delightful'
- 'determined'
- 'elegant'
- 'enchanting'
- 'encouraging'
- 'energetic'
- 'enthusiastic'
- 'excited'
- 'fair'
- 'faithful'
- 'famous'
- 'fancy'
- 'fantastic'
- 'fine'
- 'friendly'
- 'funny'
- 'gentle'
- 'gifted'
- 'glamorous'
- 'gleaming'
- 'glorious'
- 'good'
- 'gorgeous'
- 'graceful'
- 'handsome'
- 'happy'
- 'healthy'
- 'helpful'
- 'hilarious'
- 'homely'
- 'inexpensive'
- 'innocent'
- 'inquisitive'
- 'jolly'
- 'joyous'
- 'kind'
- 'light'
- 'lively'
- 'lovely'
- 'lucky'
- 'magnificent'
- 'modern'
- 'nice'
- 'open'
- 'outstanding'
- 'perfect'
- 'pleasant'
- 'powerful'
- 'precious'
- 'proud'
- 'quaint'
- 'rich'
- 'shiny'
- 'smiling'
- 'sparkling'
- 'splendid'
- 'spotless'
- 'successful'
- 'super'
- 'talented'
- 'tender'
- 'tasty'
- 'thankful'
- 'thoughtful'
- 'vast'
- 'victorious'
- 'vivacious'
- 'witty'
- 'zany'
- 'zealous'
negative:
- 'aggressive'
- 'annoyed'
- 'anxious'
- 'arrogant'
- 'ashamed'
- 'average'
- 'awful'
- 'bad'
- 'bloody'
- 'bored'
- 'careful'
- 'cautious'
- 'concerned'
- 'confused'
- 'crazy'
- 'creepy'
- 'cruel'
- 'dangerous'
- 'depressed'
- 'disturbed'
- 'envious'
- 'evil'
- 'expensive'
- 'exuberant'
- 'filthy'
- 'foolish'
- 'fragile'
- 'frail'
- 'frantic'
- 'frightened'
- 'grieving'
- 'grotesque'
- 'grumpy'
- 'helpless'
- 'horrible'
- 'ill'
- 'itchy'
- 'jealous'
- 'jittery'
- 'lazy'
- 'lonely'
- 'misty'
- 'muddy'
- 'nasty'
- 'naughty'
- 'nervous'
- 'nutty'
- 'obnoxious'
- 'odd'
- 'old-fashioned'
- 'outrageous'
- 'panicky'
- 'poised'
- 'poor'
- 'putrid'
- 'puzzled'
- 'repulsive'
- 'scary'
- 'selfish'
- 'shy'
- 'silly'
- 'sleepy'
- 'smoggy'
- 'sore'
- 'stormy'
- 'strange'
- 'stupid'
- 'terrible'
- 'thoughtless'
- 'tired'
- 'tough'
- 'troubled'
- 'ugliest'
- 'ugly'
- 'uninterested'
- 'unsightly'
- 'upset'
- 'uptight'
- 'weary'
- 'wicked'
- 'wild'
- 'worrisome'
- 'worried'
- 'wrong'
Loading