Skip to content

Commit

Permalink
feat: Added food generator, includes restaurants, dishes and cuisines
Browse files Browse the repository at this point in the history
  • Loading branch information
drager committed Oct 25, 2015
1 parent ef904dd commit 888cfad
Show file tree
Hide file tree
Showing 8 changed files with 375 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/faker.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ part 'src/address.dart';
part 'src/conference.dart';
part 'src/company.dart';
part 'src/currency.dart';
part 'src/food.dart';
part 'src/guid.dart';
part 'src/internet.dart';
part 'src/job.dart';
Expand All @@ -25,6 +26,9 @@ part 'src/data/address/street_suffixes.dart';
part 'src/data/conference/conference_names.dart';
part 'src/data/currency/currency_names.dart';
part 'src/data/currency/currency_codes.dart';
part 'src/data/food/cuisines.dart';
part 'src/data/food/dishes.dart';
part 'src/data/food/restaurants.dart';
part 'src/data/person/firstnames.dart';
part 'src/data/person/lastnames.dart';
part 'src/data/job/job_adj.dart';
Expand Down
104 changes: 104 additions & 0 deletions lib/src/data/food/cuisines.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
part of faker;

const cuisines = const [
'American Chinese',
'Argentinian food',
'Chinese Islamic',
'Cantonese food',
'Chiuchow food',
'Cajun food',
'Buddhist',
'Chinese food',
'Caribbean food',
'Ethiopian food',
'French food',
'Fusion food',
'German food',
'Greek food',
'Hakka food',
'Hunan food',
'Japanese',
'Korean food',
'Beijing food',
'Moroccan food',
'Mexican food',
'Cuisine of the Midwestern United States',
'Cuisine of New England',
'Pizza',
'Seafood',
'Spanish',
'Szechuan food',
'Shanghai food',
'Soul food',
'Sushi',
'Swedish',
'Southern United States food',
'Taiwanese food',
'Thai food',
'Tex-Mex food',
'Tapas',
'Turkish food',
'Vietnamese food',
'Vegetarian food',
'Barbecue',
'Sicilian',
'Hamburger',
'Fish and chips',
'Ice cream',
'Steak',
'Steakhouse',
'Australian food',
'Junk food',
'Breakfast',
'Catalan',
'Lunch',
'Doughnut',
'British',
'Sausage',
'Tiki culture',
'Dim sum',
'Brazilian food',
'Falafel',
'Louisiana Creole',
'Hungarian food',
'Organic food',
'Hot dog',
'Costa Rican',
'Laotian',
'Belgian food',
'Bagel',
'Roman food',
'Finnish',
'Bratwurst',
'Indian',
'Andhra food',
'Bar',
'Puerto Rican',
'Asian food',
'Malaysian food',
'Take-out food',
'Haute',
'Meze',
'Delicatessen',
'Fast food',
'Coffeehouse',
'Indonesian food',
'Quebec food',
'Halal food',
'Polish food',
'Pakistani',
'Danish',
'Cuban food',
'À la carte food',
'Bengali food',
'Latin American food',
'European food',
'Punjabi',
'Jamaican food',
'Austrian food',
'Raw food',
'Russian food',
'Saimin',
'Fondue',
'Game',
];
104 changes: 104 additions & 0 deletions lib/src/data/food/dishes.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
part of faker;

const dishes = const [
"Minestrone",
"Baked Alaska",
"General Tso's chicken",
"Chicken soup",
"Laksa",
"Hot and sour soup",
"Sundae",
"Apple pie",
"Trifle",
"Peach Melba",
"Steak tartare",
"Beef Wellington",
"Steak and kidney pie",
"Bacon and egg pie",
"Corned beef pie",
"Kalakukko",
"Meat and potato pie",
"Pasty",
"Pork pie",
"Pot pie",
"Quiche",
"Scotch pie",
"Cottage pie",
"Stargazy pie",
"Steak pie",
"Sweet potato pie",
"Banoffee pie",
"Banana cream pie",
"Blackberry pie",
"Blueberry pie",
"Boston cream pie",
"Buko pie",
"Cheesecake",
"Cherry pie",
"Chess pie",
"Cream pie",
"Custard pie",
"Dutch apple pie",
"Key lime pie",
"Lemon meringue pie",
"Mince pie",
"Pecan pie",
"Pumpkin pie",
"Rhubarb pie",
"Strawberry pie",
"Sugar pie",
"Mie goreng",
"Nasi goreng",
"Dal",
"Irish stew",
"Cochinita pibil",
"Torta",
"Gordita",
"Burrito",
"Hamburger",
"Chocolate brownie",
"Sinseollo",
"Pad Thai",
"Kow Pad Gai",
"Rat na",
"Phat si-io",
"Drunken noodles",
"Khao soi",
"Tom yum",
"Phat khing",
"Tom kha kai",
"Red curry",
"Green curry",
"Massaman curry",
"Biryani",
"Pilaf",
"Risotto",
"Wedding soup",
"Green papaya salad",
"Larb",
"Kai yang",
"Lemang",
"Sushi",
"Sashimi",
"Okonomiyaki",
"Bulgogi",
"Galbi",
"Jokbal",
"Samgyeopsal",
"Hoe",
"Sannakji",
"Makchang gui",
"Gopchang",
"Gujeolpan",
"Vindaloo",
"Baked ziti",
"Tandoori chicken",
"Butter chicken",
"Palak paneer",
"Mixed grill",
"Eggs Benedict",
"Scrambled eggs",
"Tabbouleh",
"Caesar salad",
"Waldorf salad",
];
104 changes: 104 additions & 0 deletions lib/src/data/food/restaurants.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
part of faker;

const restaurants = const [
"21 Club",
"241 Pizza",
"A&W Restaurants",
"Al Baik",
"Al's Breakfast",
"Albert's Real Jamaican Foods",
"Amber",
"Amigos/Kings Classic",
"Amy's on Second",
"Anchor Bar",
"Anna Miller's",
"Anna's Taqueria",
"Anthony's",
"Antoine's",
"Antonio's Pizza",
"Applebee’s International, Inc.",
"Arby's",
"Arcadian Court",
"Arctic Circle Restaurants",
"Arnold's Drive-In",
"Arthur Bryant's",
"Arthur Treacher's",
"Arzak",
"Atlanta Bread Company",
"Au Bon Pain",
"Auerbachs Keller",
"Auntie Anne's",
"Australian Homemade",
"BOOF",
"Back 40 Junction",
"Back Yard Burgers",
"Bagel Bin & Deli",
"Bahama Breeze",
"Baja Fresh",
"Baker's Drive-Thru",
"Bakers Square",
"Baldwin House",
"Balls Brothers",
"Bar mleczny",
"Barista Lavazza",
"Barney's Beanery",
"Baskin-Robbins",
"Baton Rouge",
"Baxters",
"BD's Mongolian Grill",
"Biggby Coffee",
"Beardslee Castle",
"Beau Rivage",
"Becky's Diner",
"Bembos",
"Ben's Chili Bowl",
"Bens De Luxe Delicatessen & Restaurant",
"Benihana",
"Bennigan's",
"Bern's Steak House",
"Berni Inn",
"Berowra Waters Inn",
"Bertucci's",
"Beryt's",
"Beth's Cafe",
"Beurger King Muslim",
"Bickford's",
"Big Boy Restaurants",
"Big Ten's",
"Bill Miller Bar-B-Q Enterprises",
"Billy Goat Tavern",
"Bimbo Deluxe",
"Bistro 990",
"Black Bear Diner",
"Black-eyed Pea",
"Blake's Lotaburger",
"Blimpie",
"blindekuh",
"Blue Bayou Restaurant",
"Blue Boar Cafeterias",
"Blueberry Hill",
"Boardwalk Hotel and Casino",
"Bob Evans Restaurants",
"Bob's",
"Bobcat Bite",
"Bobo Lobo",
"Boca Grande Taqueria",
"Bojangles' Famous Chicken 'n Biscuits",
"Boll Weevil",
"Boloco",
"Boma",
"Booches",
"Boost Juice",
"Boston Market",
"Boston Pizza",
"Boudin Bakery",
"Brasserie Les Halles",
"Bratwurst Glöckl",
"Braum's",
"Breitbach's Country Dining",
"Brennan Family Restaurants",
"Brewers Fayre",
"Briazz",
"Brigham's Ice Cream",
"Brinker International",
];
2 changes: 2 additions & 0 deletions lib/src/faker.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ class Faker {
final Conference conference;
final Company company;
final Currency currency;
final Food food;
final Guid guid;
final Internet internet;
final Job job;
Expand All @@ -19,6 +20,7 @@ class Faker {
conference = const Conference(),
company = const Company(),
currency = const Currency(),
food = const Food(),
guid = const Guid(),
internet = const Internet(),
job = const Job(),
Expand Down
29 changes: 29 additions & 0 deletions lib/src/food.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
part of faker;

class Food {
const Food();

/// Generates a restaurant.
///
/// Example:
/// ```dart
/// faker.food.restaurant();
/// ```
String restaurant() => random.element(restaurants);

/// Generates a dish.
///
/// Example:
/// ```dart
/// faker.food.dish();
/// ```
String dish() => random.element(dishes);

/// Generates a cuisine.
///
/// Example:
/// ```dart
/// faker.food.cuisine();
/// ```
String cuisine() => random.element(cuisines);
}
2 changes: 2 additions & 0 deletions test/runner.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import 'specs/address.dart' as address;
import 'specs/conference.dart' as conference;
import 'specs/company.dart' as company;
import 'specs/currency.dart' as currency;
import 'specs/food.dart' as food;
import 'specs/guid.dart' as guid;
import 'specs/internet.dart' as internet;
import 'specs/job.dart' as job;
Expand All @@ -14,6 +15,7 @@ main() {
conference.main();
company.main();
currency.main();
food.main();
guid.main();
internet.main();
job.main();
Expand Down

0 comments on commit 888cfad

Please sign in to comment.