diff --git a/include/faker-cxx/Movie.h b/include/faker-cxx/Movie.h index ebda4910e..1488d0838 100644 --- a/include/faker-cxx/Movie.h +++ b/include/faker-cxx/Movie.h @@ -29,6 +29,17 @@ class Movie */ static std::string movieTitle(); + /** + * @brief Returns a random tv show. + * + * @returns Tv show. + * + * @code + * Movie::tvShow() // "The Sopranos" + * @endcode + */ + static std::string tvShow(); + /** * @brief Returns a random movie director name. * diff --git a/src/modules/movie/Movie.cpp b/src/modules/movie/Movie.cpp index d640c93fb..5d57472e5 100644 --- a/src/modules/movie/Movie.cpp +++ b/src/modules/movie/Movie.cpp @@ -4,7 +4,8 @@ #include "data/Actresses.h" #include "data/Directors.h" #include "data/Genres.h" -#include "data/MovieTitles.h" +#include "data/Movies.h" +#include "data/TvShows.h" #include "faker-cxx/Helper.h" namespace faker @@ -16,7 +17,12 @@ std::string Movie::genre() std::string Movie::movieTitle() { - return Helper::arrayElement(movieTitles); + return Helper::arrayElement(movies); +} + +std::string Movie::tvShow() +{ + return Helper::arrayElement(tvShows); } std::string Movie::director() @@ -33,4 +39,5 @@ std::string Movie::actress() { return Helper::arrayElement(actresses); } + } diff --git a/src/modules/movie/MovieTest.cpp b/src/modules/movie/MovieTest.cpp index 10156ce33..80273a3d8 100644 --- a/src/modules/movie/MovieTest.cpp +++ b/src/modules/movie/MovieTest.cpp @@ -8,7 +8,8 @@ #include "data/Actresses.h" #include "data/Directors.h" #include "data/Genres.h" -#include "data/MovieTitles.h" +#include "data/Movies.h" +#include "data/TvShows.h" using namespace ::testing; using namespace faker; @@ -30,10 +31,18 @@ TEST_F(MovieTest, shouldGenerateMovieTitle) { const auto generatedMovieTitle = Movie::movieTitle(); - ASSERT_TRUE(std::ranges::any_of(movieTitles, [generatedMovieTitle](const std::string& movieTitle) + ASSERT_TRUE(std::ranges::any_of(movies, [generatedMovieTitle](const std::string& movieTitle) { return generatedMovieTitle == movieTitle; })); } +TEST_F(MovieTest, shouldGenerateTvShow) +{ + const auto generatedTvShow = Movie::tvShow(); + + ASSERT_TRUE(std::ranges::any_of(tvShows, [generatedTvShow](const std::string& tvShow) + { return generatedTvShow == tvShow; })); +} + TEST_F(MovieTest, shouldGenerateDirector) { const auto generatedDirector = Movie::director(); diff --git a/src/modules/movie/data/MovieTitles.h b/src/modules/movie/data/MovieTitles.h deleted file mode 100644 index 7bc61e5af..000000000 --- a/src/modules/movie/data/MovieTitles.h +++ /dev/null @@ -1,258 +0,0 @@ -#pragma once - -#include -#include - -namespace faker -{ -const std::vector movieTitles = {"The Shawshank Redemption", - "The Godfather", - "The Godfather: Part II", - "Il buono, il brutto, il cattivo.", - "Pulp Fiction", - "Inception", - "Schindler's List", - "12 Angry Men", - "One Flew Over the Cuckoo's Nest", - "The Dark Knight", - "Star Wars: Episode V - The Empire Strikes Back", - "The Lord of the Rings: The Return of the King", - "Shichinin no samurai", - "Star Wars", - "Goodfellas", - "Casablanca", - "Fight Club", - "Cidade de Deus", - "The Lord of the Rings: The Fellowship of the Ring", - "Rear Window", - "C'era una volta il West", - "Raiders of the Lost Ark", - "Toy Story 3", - "Psycho", - "The Usual Suspects", - "The Matrix", - "The Silence of the Lambs", - "Se7en", - "Memento", - "It's a Wonderful Life", - "The Lord of the Rings: The Two Towers", - "Sunset Blvd.", - "Dr. Strangelove or: How I Learned to Stop Worrying and Love the Bomb", - "Forrest Gump", - "Léon", - "Citizen Kane", - "Apocalypse Now", - "North by Northwest", - "American Beauty", - "American History X", - "Taxi Driver", - "Terminator 2: Judgment Day", - "Saving Private Ryan", - "Vertigo", - "Le fabuleux destin d'Amélie Poulain", - "Alien", - "WALL·E", - "Lawrence of Arabia", - "The Shining", - "Sen to Chihiro no kamikakushi", - "Paths of Glory", - "A Clockwork Orange", - "Double Indemnity", - "To Kill a Mockingbird", - "The Pianist", - "Das Leben der Anderen", - "The Departed", - "M", - "City Lights", - "Aliens", - "Eternal Sunshine of the Spotless Mind", - "Requiem for a Dream", - "Das Boot", - "The Third Man", - "L.A. Confidential", - "Reservoir Dogs", - "Chinatown", - "The Treasure of the Sierra Madre", - "Modern Times", - "Monty Python and the Holy Grail", - "La vita è bella", - "Back to the Future", - "The Prestige", - "El laberinto del fauno", - "Raging Bull", - "Nuovo Cinema Paradiso", - "Singin' in the Rain", - "Some Like It Hot", - "The Bridge on the River Kwai", - "Rashômon", - "All About Eve", - "Amadeus", - "Once Upon a Time in America", - "The Green Mile", - "Full Metal Jacket", - "Inglourious Basterds", - "2001: A Space Odyssey", - "The Great Dictator", - "Braveheart", - "Ladri di biciclette", - "The Apartment", - "Up", - "Der Untergang", - "Gran Torino", - "Metropolis", - "The Sting", - "Gladiator", - "The Maltese Falcon", - "Unforgiven", - "Sin City", - "The Elephant Man", - "Mr. Smith Goes to Washington", - "Oldeuboi", - "On the Waterfront", - "Indiana Jones and the Last Crusade", - "Star Wars: Episode VI - Return of the Jedi", - "Rebecca", - "The Great Escape", - "Die Hard", - "Batman Begins", - "Mononoke-hime", - "Jaws", - "Hotel Rwanda", - "Slumdog Millionaire", - "Det sjunde inseglet", - "Blade Runner", - "Fargo", - "No Country for Old Men", - "Heat", - "The General", - "The Wizard of Oz", - "Touch of Evil", - "Per qualche dollaro in più", - "Ran", - "Yôjinbô", - "District 9", - "The Sixth Sense", - "Snatch.", - "Donnie Darko", - "Annie Hall", - "Witness for the Prosecution", - "Smultronstället", - "The Deer Hunter", - "Avatar", - "The Social Network", - "Cool Hand Luke", - "Strangers on a Train", - "High Noon", - "The Big Lebowski", - "Hotaru no haka", - "Kill Bill: Vol. 1", - "It Happened One Night", - "Platoon", - "The Lion King", - "Into the Wild", - "There Will Be Blood", - "Notorious", - "Million Dollar Baby", - "Toy Story", - "Butch Cassidy and the Sundance Kid", - "Gone with the Wind", - "Sunrise: A Song of Two Humans", - "The Wrestler", - "The Manchurian Candidate", - "Trainspotting", - "Ben-Hur", - "Scarface", - "The Grapes of Wrath", - "The Graduate", - "The Big Sleep", - "Groundhog Day", - "Life of Brian", - "The Gold Rush", - "The Bourne Ultimatum", - "Amores perros", - "Finding Nemo", - "The Terminator", - "Stand by Me", - "How to Train Your Dragon", - "The Best Years of Our Lives", - "Lock, Stock and Two Smoking Barrels", - "The Thing", - "The Kid", - "V for Vendetta", - "Casino", - "Twelve Monkeys", - "Dog Day Afternoon", - "Ratatouille", - "El secreto de sus ojos", - "Gandhi", - "Star Trek", - "Ikiru", - "Le salaire de la peur", - "Les diaboliques", - "8½", - "The Princess Bride", - "The Night of the Hunter", - "Judgment at Nuremberg", - "The Incredibles", - "Tonari no Totoro", - "The Hustler", - "Good Will Hunting", - "The Killing", - "In Bruges", - "The Wild Bunch", - "Network", - "Le scaphandre et le papillon", - "A Streetcar Named Desire", - "Les quatre cents coups", - "La strada", - "The Exorcist", - "Children of Men", - "Stalag 17", - "Persona", - "Who's Afraid of Virginia Woolf?", - "Ed Wood", - "Dial M for Murder", - "La battaglia di Algeri", - "Låt den rätte komma in", - "All Quiet on the Western Front", - "Big Fish", - "Magnolia", - "Rocky", - "La passion de Jeanne d'Arc", - "Kind Hearts and Coronets", - "Fanny och Alexander", - "Mystic River", - "Manhattan", - "Barry Lyndon", - "Kill Bill: Vol. 2", - "Mary and Max", - "Patton", - "Rosemary's Baby", - "Duck Soup", - "Festen", - "Kick-Ass", - "Fa yeung nin wa", - "Letters from Iwo Jima", - "Roman Holiday", - "Pirates of the Caribbean: The Curse of the Black Pearl", - "Mou gaan dou", - "The Truman Show", - "Crash", - "Hauru no ugoku shiro", - "His Girl Friday", - "Arsenic and Old Lace", - "Harvey", - "Le notti di Cabiria", - "Trois couleurs: Rouge", - "The Philadelphia Story", - "A Christmas Story", - "Sleuth", - "King Kong", - "Bom yeoreum gaeul gyeoul geurigo bom", - "Rope", - "Monsters, Inc.", - "Tenkû no shiro Rapyuta", - "Yeopgijeogin geunyeo", - "Mulholland Dr.", - "The Man Who Shot Liberty Valance"}; -} diff --git a/src/modules/movie/data/Movies.h b/src/modules/movie/data/Movies.h new file mode 100644 index 000000000..208ced2b0 --- /dev/null +++ b/src/modules/movie/data/Movies.h @@ -0,0 +1,258 @@ +#pragma once + +#include +#include + +namespace faker +{ +const std::vector movies = {"The Shawshank Redemption", + "The Godfather", + "The Godfather: Part II", + "Il buono, il brutto, il cattivo.", + "Pulp Fiction", + "Inception", + "Schindler's List", + "12 Angry Men", + "One Flew Over the Cuckoo's Nest", + "The Dark Knight", + "Star Wars: Episode V - The Empire Strikes Back", + "The Lord of the Rings: The Return of the King", + "Shichinin no samurai", + "Star Wars", + "Goodfellas", + "Casablanca", + "Fight Club", + "Cidade de Deus", + "The Lord of the Rings: The Fellowship of the Ring", + "Rear Window", + "C'era una volta il West", + "Raiders of the Lost Ark", + "Toy Story 3", + "Psycho", + "The Usual Suspects", + "The Matrix", + "The Silence of the Lambs", + "Se7en", + "Memento", + "It's a Wonderful Life", + "The Lord of the Rings: The Two Towers", + "Sunset Blvd.", + "Dr. Strangelove or: How I Learned to Stop Worrying and Love the Bomb", + "Forrest Gump", + "Léon", + "Citizen Kane", + "Apocalypse Now", + "North by Northwest", + "American Beauty", + "American History X", + "Taxi Driver", + "Terminator 2: Judgment Day", + "Saving Private Ryan", + "Vertigo", + "Le fabuleux destin d'Amélie Poulain", + "Alien", + "WALL·E", + "Lawrence of Arabia", + "The Shining", + "Sen to Chihiro no kamikakushi", + "Paths of Glory", + "A Clockwork Orange", + "Double Indemnity", + "To Kill a Mockingbird", + "The Pianist", + "Das Leben der Anderen", + "The Departed", + "M", + "City Lights", + "Aliens", + "Eternal Sunshine of the Spotless Mind", + "Requiem for a Dream", + "Das Boot", + "The Third Man", + "L.A. Confidential", + "Reservoir Dogs", + "Chinatown", + "The Treasure of the Sierra Madre", + "Modern Times", + "Monty Python and the Holy Grail", + "La vita è bella", + "Back to the Future", + "The Prestige", + "El laberinto del fauno", + "Raging Bull", + "Nuovo Cinema Paradiso", + "Singin' in the Rain", + "Some Like It Hot", + "The Bridge on the River Kwai", + "Rashômon", + "All About Eve", + "Amadeus", + "Once Upon a Time in America", + "The Green Mile", + "Full Metal Jacket", + "Inglourious Basterds", + "2001: A Space Odyssey", + "The Great Dictator", + "Braveheart", + "Ladri di biciclette", + "The Apartment", + "Up", + "Der Untergang", + "Gran Torino", + "Metropolis", + "The Sting", + "Gladiator", + "The Maltese Falcon", + "Unforgiven", + "Sin City", + "The Elephant Man", + "Mr. Smith Goes to Washington", + "Oldeuboi", + "On the Waterfront", + "Indiana Jones and the Last Crusade", + "Star Wars: Episode VI - Return of the Jedi", + "Rebecca", + "The Great Escape", + "Die Hard", + "Batman Begins", + "Mononoke-hime", + "Jaws", + "Hotel Rwanda", + "Slumdog Millionaire", + "Det sjunde inseglet", + "Blade Runner", + "Fargo", + "No Country for Old Men", + "Heat", + "The General", + "The Wizard of Oz", + "Touch of Evil", + "Per qualche dollaro in più", + "Ran", + "Yôjinbô", + "District 9", + "The Sixth Sense", + "Snatch.", + "Donnie Darko", + "Annie Hall", + "Witness for the Prosecution", + "Smultronstället", + "The Deer Hunter", + "Avatar", + "The Social Network", + "Cool Hand Luke", + "Strangers on a Train", + "High Noon", + "The Big Lebowski", + "Hotaru no haka", + "Kill Bill: Vol. 1", + "It Happened One Night", + "Platoon", + "The Lion King", + "Into the Wild", + "There Will Be Blood", + "Notorious", + "Million Dollar Baby", + "Toy Story", + "Butch Cassidy and the Sundance Kid", + "Gone with the Wind", + "Sunrise: A Song of Two Humans", + "The Wrestler", + "The Manchurian Candidate", + "Trainspotting", + "Ben-Hur", + "Scarface", + "The Grapes of Wrath", + "The Graduate", + "The Big Sleep", + "Groundhog Day", + "Life of Brian", + "The Gold Rush", + "The Bourne Ultimatum", + "Amores perros", + "Finding Nemo", + "The Terminator", + "Stand by Me", + "How to Train Your Dragon", + "The Best Years of Our Lives", + "Lock, Stock and Two Smoking Barrels", + "The Thing", + "The Kid", + "V for Vendetta", + "Casino", + "Twelve Monkeys", + "Dog Day Afternoon", + "Ratatouille", + "El secreto de sus ojos", + "Gandhi", + "Star Trek", + "Ikiru", + "Le salaire de la peur", + "Les diaboliques", + "8½", + "The Princess Bride", + "The Night of the Hunter", + "Judgment at Nuremberg", + "The Incredibles", + "Tonari no Totoro", + "The Hustler", + "Good Will Hunting", + "The Killing", + "In Bruges", + "The Wild Bunch", + "Network", + "Le scaphandre et le papillon", + "A Streetcar Named Desire", + "Les quatre cents coups", + "La strada", + "The Exorcist", + "Children of Men", + "Stalag 17", + "Persona", + "Who's Afraid of Virginia Woolf?", + "Ed Wood", + "Dial M for Murder", + "La battaglia di Algeri", + "Låt den rätte komma in", + "All Quiet on the Western Front", + "Big Fish", + "Magnolia", + "Rocky", + "La passion de Jeanne d'Arc", + "Kind Hearts and Coronets", + "Fanny och Alexander", + "Mystic River", + "Manhattan", + "Barry Lyndon", + "Kill Bill: Vol. 2", + "Mary and Max", + "Patton", + "Rosemary's Baby", + "Duck Soup", + "Festen", + "Kick-Ass", + "Fa yeung nin wa", + "Letters from Iwo Jima", + "Roman Holiday", + "Pirates of the Caribbean: The Curse of the Black Pearl", + "Mou gaan dou", + "The Truman Show", + "Crash", + "Hauru no ugoku shiro", + "His Girl Friday", + "Arsenic and Old Lace", + "Harvey", + "Le notti di Cabiria", + "Trois couleurs: Rouge", + "The Philadelphia Story", + "A Christmas Story", + "Sleuth", + "King Kong", + "Bom yeoreum gaeul gyeoul geurigo bom", + "Rope", + "Monsters, Inc.", + "Tenkû no shiro Rapyuta", + "Yeopgijeogin geunyeo", + "Mulholland Dr.", + "The Man Who Shot Liberty Valance"}; +} diff --git a/src/modules/movie/data/TvShows.h b/src/modules/movie/data/TvShows.h new file mode 100644 index 000000000..e059fcecd --- /dev/null +++ b/src/modules/movie/data/TvShows.h @@ -0,0 +1,130 @@ +#pragma once + +#include +#include + +namespace faker +{ +const std::vector tvShows = {"Planet Earth II", + "Breaking Bad", + "Planet Earth", + "Band of Brothers", + "Chernobyl", + "The Wire", + "Blue Planet II", + "Avatar: The Last Airbender", + "Cosmos: A Spacetime Odyssey", + "The Sopranos", + "Our Planet", + "Cosmos", + "Game of Thrones", + "Rick and Morty", + "The World at War", + "Fullmetal Alchemist: Brotherhood", + "The Last Dance", + "Life", + "Sherlock", + "The Twilight Zone", + "The Vietnam War", + "Batman: The Animated Series", + "Arcane", + "The Blue Planet", + "Attack on Titan", + "The Office", + "Firefly", + "Human Planet", + "Frozen Planet", + "Death Note", + "Only Fools and Horses", + "True Detective", + "The Civil War", + "Hunter x Hunter", + "The Beatles: Get Back", + "Seinfeld", + "Persona", + "Fargo", + "Dekalog", + "Clarkson's Farm", + "Cowboy Bebop", + "Better Call Saul", + "Nathan for You", + "Gravity Falls", + "Friends", + "When They See Us", + "Last Week Tonight with John Oliver", + "Africa", + "TVF Pitchers", + "Apocalypse: The Second World War", + "Monty Python's Flying Circus", + "It's Always Sunny in Philadelphia", + "Taskmaster", + "Das Boot", + "Curb Your Enthusiasm", + "Fawlty Towers", + "Pride and Prejudice", + "The West Wing", + "Freaks and Geeks", + "Leyla and Mecnun", + "Blackadder Goes Forth", + "Twin Peaks", + "Black Mirror", + "Narcos", + "BoJack Horseman", + "Chappelle's Show", + "Succession", + "Dragon Ball", + "I, Claudius", + "South Park", + "Rome", + "Peaky Blinders", + "One Piece", + "Ted Lasso", + "Oz", + "Six Feet Under", + "Over the Garden Wall", + "Kota Factory", + "Dark", + "The Mandalorian", + "As If", + "Arrested Development", + "Steins;Gate", + "One Punch Man", + "The Boys", + "The Simpsons", + "House M.D.", + "Stranger Things", + "The Rehearsal", + "The Shield", + "Fleabag", + "Downton Abbey", + "Invincible", + "Mad Men", + "Vinland Saga", + "Gullak", + "House of Cards", + "The Crown", + "Peep Show", + "The Grand Tour", + "The Thick of It", + "Deadwood", + "Dexter", + "The X-Files", + "Parks and Recreation", + "This Is Us", + "The Bridge", + "Heartstopper", + "Gomorrah", + "Mindhunter", + "Dopesick", + "Boardwalk Empire", + "Battlestar Galactica", + "Westworld", + "The IT Crowd", + "Skam", + "Sons of Anarchy", + "Spartacus: Gods of the Arena", + "Silicon Valley", + "Twin Peaks", + "Hannibal", + "Community"}; +}