Skip to content
Merged
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 @@ -315,6 +315,7 @@ Providers
* Military
* Minecraft
* Money
* Money Heist
* Mood
* Mountains
* Mountaineering
Expand Down
25 changes: 25 additions & 0 deletions src/main/java/net/datafaker/movie/MoneyHeist.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package net.datafaker.movie;

import net.datafaker.base.AbstractProvider;

/**
* @since 1.7.0
*/
public class MoneyHeist extends AbstractProvider<MovieProviders> {

protected MoneyHeist(MovieProviders faker) {
super(faker);
}

public String character() {
return resolve("money_heist.characters");
}

public String heist() {
return resolve("money_heist.heists");
}

public String quote() {
return resolve("money_heist.quotes");
}
}
4 changes: 4 additions & 0 deletions src/main/java/net/datafaker/movie/MovieProviders.java
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,10 @@ default Kaamelott kaamelott() {
default LordOfTheRings lordOfTheRings() {
return getProvider(LordOfTheRings.class, LordOfTheRings::new);
}

default MoneyHeist moneyHeist() {
return getProvider(MoneyHeist.class, MoneyHeist::new);
}

default Movie movie() {
return getProvider(Movie.class, Movie::new);
Expand Down
1 change: 1 addition & 0 deletions src/main/java/net/datafaker/service/files/EnFile.java
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ public String getPath() {
"military.yml",
"minecraft.yml",
"money.yml",
"money_heist.yml",
"most_interesting_man_in_the_world.yml",
"mood.yml",
"movie.yml",
Expand Down
6 changes: 6 additions & 0 deletions src/main/resources/en/money_heist.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
en:
faker:
money_heist:
characters: ["Tokyo", "The Professor", "Lisbon", "Berlin", "Moscow", "Nairobi", "Rio", "Denver", "Stockholm", "Arturo Román", "Alison Parker ", "Helsinki", "Bogotá", "Palermo", "Alicia Sierra ", "Marseille", "Manila", "Colonel Luis Tamayo", "Logroño", "Pamplona", "César Gandía", "Ángel Rubio", "Suárez", "Colonel Luis Prieto"]
heists: ["Royal Mint of Spain", "Bank of Spain"]
quotes: ["The plan is designed to survive any setbacks, including my death", "You’re the sexiest woman in the world but I love you for your brains", "I am offering you resurrection, A second life", "Sometimes, a truce is the most important part of a war", "In this world, everything is governed by balance. There is what you stand to gain and what you stand to lose. And when you think you've got nothing to lose, you become overconfident", "Time is greater than money", "Maybe we are all immature to some extent", "You can't get out of the Bank of Spain alive. It is impossible. But I will get you out of there", "Death is simply just a word, a priori. It comprises everything that doesn’t exist. On the other hand, once you’re dead, you won’t remember you were alive", "Death can be the greatest opportunity of your life", "No matter how tough things get, children always turn out okay", "I’ve spent my life being a bit of a son of a bitch, but today I think I want to die with dignity", "In heists, love can get multiplied"]
23 changes: 23 additions & 0 deletions src/test/java/net/datafaker/movie/MoneyHeistTest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package net.datafaker.movie;

import org.junit.jupiter.api.Test;

import static org.assertj.core.api.Assertions.assertThat;

class MoneyHeistTest extends MovieFakerTest {

@Test
void character() {
assertThat(faker.moneyHeist().character()).isNotEmpty();
}

@Test
void heist() {
assertThat(faker.moneyHeist().heist()).isNotEmpty();
}

@Test
void quote() {
assertThat(faker.moneyHeist().quote()).isNotEmpty();
}
}