Skip to content

Commit

Permalink
Merge pull request #561 from inigodm/klingon
Browse files Browse the repository at this point in the history
Added klingon quotes to StarTrek class
  • Loading branch information
codingricky authored Jul 6, 2020
2 parents 1d8d582 3aa5cf2 commit c992e55
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/main/java/com/github/javafaker/StarTrek.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 22,8 @@ public String specie() {
public String villain() {
return faker.fakeValuesService().resolve("star_trek.villain", this, faker);
}

public String klingon() {
return faker.fakeValuesService().resolve("star_trek.klingon", this, faker);
}
}
1 change: 1 addition & 0 deletions src/main/resources/en/star_trek.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 5,4 @@ en:
location: ["Qo'noS", "Romulus", "Bajor", "Vulcan", "Neutral Zone", "Alpha Quadrant", "Beta Quadrant", "Delta Quadrant", "Gamma Quadrant", "Tau Ceti Prime", "Wolf 359", "Thalos VII", "Cardassia", "Trillius Prime", "Badlands", "Betazed", "Risa", "Deep Space Nine", "Ferenginar", "The Briar Patch", "Khitomer"]
specie: ["Breen", "El-Aurian", "Jem'Hadar", "Kazon", "Ocampa", "Q", "Ferengi", "Klingon", "Talaxian", "Vidiian", "Cardassian", "Vulcan", "Borg", "Romulan", "Vorta", "Andorian", "Bajoran", "Betazoid"]
villain: ["Q", "Gorn", "Khan Noonien Singh", "Ru'afo", "Maltz", "Kruge", "Ayel", "Admiral Marcus", "Martia", "Lt. Valeris", "V'ger", "God of Sha Ka Ree", "Admiral Dougherty", "Nero", "Krall", "Tolian Soran", "Shinzon", "General Chang", "Lursa", "B'Etor", "Borg Queen"]
klingon: ["tlhIngan maH", "bogh tlhInganpu', SuvwI'pu' moj, Hegh", "SuvmeH 'ej charghmeH bogh tlhInganpu'", "DabuQlu'DI' yISuv", "qa' wIje'meH maSuv", "bI'IQchugh yIvang", "tIqIpqu' 'ej nom tIqIp", "lumbe' tlhInganpu'.", "Dubotchugh yIpummoH", "mataHmeH maSachnIS"]
5 changes: 5 additions & 0 deletions src/test/java/com/github/javafaker/StarTrekTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 4,8 @@

import static com.github.javafaker.matchers.MatchesRegularExpression.matchesRegularExpression;
import static org.junit.Assert.assertThat;
import static org.hamcrest.Matchers.isEmptyOrNullString;
import static org.hamcrest.Matchers.not;

public class StarTrekTest extends AbstractFakerTest {

Expand All @@ -26,4 28,7 @@ public void specie() {
public void villain() {
assertThat(faker.starTrek().villain(), matchesRegularExpression("^(\\w '?\\.?\\s?) $"));
}

@Test
public void klingon() { assertThat(faker.starTrek().klingon(), not(isEmptyOrNullString())); }
}

0 comments on commit c992e55

Please sign in to comment.