Add StarCraft content class, add utility methods to Faker.
This commit is contained in:
@@ -97,6 +97,7 @@ public class Faker {
|
||||
private final AquaTeenHungerForce aquaTeenHungerForce;
|
||||
private final ProgrammingLanguage programmingLanguage;
|
||||
private final Kaamelott kaamelott;
|
||||
private final StarCraft starCraft;
|
||||
|
||||
public Faker() {
|
||||
this(Locale.ENGLISH);
|
||||
@@ -203,6 +204,7 @@ public class Faker {
|
||||
this.aquaTeenHungerForce = new AquaTeenHungerForce(this);
|
||||
this.programmingLanguage = new ProgrammingLanguage(this);
|
||||
this.kaamelott = new Kaamelott(this);
|
||||
this.starCraft = new StarCraft(this);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -641,6 +643,10 @@ public class Faker {
|
||||
return kaamelott;
|
||||
}
|
||||
|
||||
public StarCraft starCraft() {
|
||||
return starCraft;
|
||||
}
|
||||
|
||||
public String resolve(String key) {
|
||||
return this.fakeValuesService.resolve(key, this, this);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
package com.github.javafaker;
|
||||
|
||||
public class StarCraft {
|
||||
|
||||
private final Faker faker;
|
||||
|
||||
protected StarCraft(final Faker faker) {
|
||||
this.faker = faker;
|
||||
}
|
||||
|
||||
public String unit() {
|
||||
return faker.fakeValuesService().resolve("starcraft.units", this, faker);
|
||||
}
|
||||
|
||||
public String building() {
|
||||
return faker.fakeValuesService().resolve("starcraft.buildings", this, faker);
|
||||
}
|
||||
|
||||
public String character() {
|
||||
return faker.fakeValuesService().resolve("starcraft.characters", this, faker);
|
||||
}
|
||||
|
||||
public String planet() {
|
||||
return faker.fakeValuesService().resolve("starcraft.planets", this, faker);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user