Skip to content

Commit cbe3105

Browse files
feature: add movie name to movie provider (#1442)
* add support for movie name
1 parent 562ceed commit cbe3105

File tree

3 files changed

+93
-6
lines changed

3 files changed

+93
-6
lines changed

src/main/java/net/datafaker/providers/entertainment/Movie.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ protected Movie(EntertainmentProviders faker) {
1111
super(faker);
1212
}
1313

14-
/**
15-
* This method generates a random quote from a movie.
16-
*
17-
* @return a string of quote from a movie.
18-
*/
1914
public String quote() {
2015
return resolve("movie.quote");
2116
}
17+
18+
public String name() {
19+
return resolve("movie.name");
20+
}
21+
2222
}

src/main/resources/en/movie.yml

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,88 @@ en:
1313
- "You talking to me?"
1414
- "What we've got here is failure to communicate."
1515
- "I love the smell of napalm in the morning."
16+
name:
17+
- "Everything Everywhere All at Once"
18+
- "Manchester by the Sea"
19+
- "Marcel the Shell with Shoes On"
20+
- "The Florida Project"
21+
- "First Cow"
22+
- "The Eternal Daughter"
23+
- "Talk to Me"
24+
- "Saint Maud"
25+
- "Uncut Gems"
26+
- "A Ghost Story"
27+
- "The Lighthouse"
28+
- "Hereditary"
29+
- "Green Room"
30+
- "The Iron Claw"
31+
- "The Exorcist"
32+
- "Reservoir Dogs"
33+
- "Pulp Fiction"
34+
- "Inglourious Basterds"
35+
- "Django Unchained"
36+
- "Insomnia"
37+
- "Tenet"
38+
- "Memento"
39+
- "Inception"
40+
- "Interstellar"
41+
- "The Prestige"
42+
- "Batman Begins"
43+
- "The Dark Knight"
44+
- "The Dark Knight Rises"
45+
- "Dunkirk"
46+
- "Oppenheimer"
47+
- "L.A. Confidential"
48+
- "The Godfather"
49+
- "Parasite"
50+
- "Schindler's List"
51+
- "12 Angry Men"
52+
- "Goodfellas"
53+
- "There Will Be Blood"
54+
- "The Truman Show"
55+
- "Forrest Gump"
56+
- "The Dictator"
57+
- "Fight Club"
58+
- "The Matrix"
59+
- "The Silence of the Lambs"
60+
- "Saving Private Ryan"
61+
- "Gladiator"
62+
- "The Hangover"
63+
- "The Departed"
64+
- "The Usual Suspects"
65+
- "The Shining"
66+
- "Good Will Hunting"
67+
- "Requiem for a Dream"
68+
- "Eternal Sunshine of the Spotless Mind"
69+
- "Scarface"
70+
- "Taxi Driver"
71+
- "Heat"
72+
- "American Beauty"
73+
- "To Kill a Mockingbird"
74+
- "Die Hard"
75+
- "The Wolf of Wall Street"
76+
- "Shutter Island"
77+
- "The Sixth Sense"
78+
- "No Country for Old Men"
79+
- "A Beautiful Mind"
80+
- "Raging Bull"
81+
- "Catch Me If You Can"
82+
- "Million Dollar Baby"
83+
- "Gone Girl"
84+
- "Ratatouille"
85+
- "Rocky"
86+
- "Unbreakable"
87+
- "Split"
88+
- "Glass"
89+
- "Knock at the Cabin"
90+
- "Titanic"
91+
- "The Notebook"
92+
- "Jerry Maguire"
93+
- "American Made"
94+
- "Edge of Tomorrow"
95+
- "Collateral"
96+
- "Minority Report"
97+
- "About Time"
98+
- "Arrival"
99+
- "12 Monkeys"
100+
- "Predestination"

src/test/java/net/datafaker/providers/entertainment/MovieTest.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ class MovieTest extends EntertainmentFakerTest {
1010
@Override
1111
protected Collection<TestSpec> providerListTest() {
1212
return List.of(
13-
TestSpec.of(movie::quote, "movie.quote")
13+
TestSpec.of(movie::quote, "movie.quote"),
14+
TestSpec.of(movie::name, "movie.name")
1415
);
1516
}
17+
1618
}

0 commit comments

Comments
 (0)