Skip to content
Open
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
31 changes: 26 additions & 5 deletions src/main/java/net/datafaker/providers/food/Cheese.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,14 @@
import net.datafaker.providers.base.AbstractProvider;

/**
* Generates cheese-related fake data: type, texture, milk, color, name.
* Generates cheese-related fake data: type, texture, milk, color, name etc.
* <p>
* Data source:
* <a href="https://www.cheese.com">cheese.com</a>
* <a href="https://en.wikipedia.org/wiki/Types_of_cheese">Types_of_cheese</a>
* <a href="https://en.wikipedia.org/wiki/Types_of_cheese">Types of cheese</a>
* <a href="https://www.tasteatlas.com/cheese/products">Cheese producers</a>
* <a href="https://www.wisconsincheese.com/the-cheese-life/article/31/cheese-rinds">Cheese rinds</a>
* <a href="https://www.bluecart.com/blog/cheese-packaging-materials">Cheese packaging</a>
* </p>
* @since 2.6.0
*/
Expand Down Expand Up @@ -37,13 +40,31 @@ public String name() {
return resolve("cheese.name");
}

public String producer() {
return resolve("cheese.producer");
}

public String rind() {
return resolve("cheese.rind");
}

public String rindEdibility () {
return resolve("cheese.rind_edibility");
}

public String packaging () {
return resolve("cheese.packaging");
}

/**
* @return a complete wedge of cheese case bundling {@link #name()},
* {@link #type()}, {@link #texture()}, {@link #color()}, and {@link #milk()}.
* {@link #type()}, {@link #producer()}, {@link #texture()}, {@link #color()},
* {@link #milk()}, {@link #rind()}, {@link #rindEdibility()}, and {@link #packaging()}.
*/
public Wedge wedge() {
return new Wedge(name(), type(), texture(), color(), milk());
return new Wedge(name(), type(), producer(), texture(), color(), milk(), rind(), rindEdibility(), packaging());
}

public record Wedge(String name, String type, String texture, String color, String milk) { }
public record Wedge(String name, String type, String producer, String texture, String color, String milk,
String rind, String rindEdibility, String packaging) { }
}
152 changes: 152 additions & 0 deletions src/main/resources/en/cheese.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1585,3 +1585,155 @@ en:
- "Zimbro"
- "Zwitser"
- "Ġbejna"
rind:
- "flavored "
- "washed"
- "bloomy"
- "bandaged-wrapped"
- "wax"
- "natural"
- "rindless"
rind_edibility:
- "edible"
- "inedible"
packaging:
- "wax coating"
- "aluminum foil"
- "paper"
- "parchment paper"
- "wax paper"
- "vacuum sealing"
- "glass containers"
- "modified atmosphere packaging"
- "edible film"
- "active packaging"
- "smart packaging"
producer:
- "4 Madonne Caseificio dell'Emilia"
- "5118 Käserei Gabriel"
- "Adiano"
- "Airas Moniz"
- "Almenland Stollenkäse"
- "Almnäs Bruk"
- "Appenzeller Käse"
- "Bacówka na Polanie Biały Potok"
- "Bafas"
- "Balantinos"
- "Baldauf Käse"
- "Barber's Cheddar Cheese"
- "Bath Soft Cheese"
- "Beemster"
- "Bruny Island Cheese"
- "Caputo Cheese"
- "Casale Roccolo"
- "Caseificio Cugusi Silvana"
- "Caseificio Il Casolare"
- "Caseificio Il Fiorino"
- "Caseificio Storico Amatrice"
- "Caseificio di Gavasseto e Roncadella"
- "Caseificio di Nucci"
- "Caseifitziu Agrìculu Mandrolisai"
- "Cashel Irish Farmhouse Cheesemakers"
- "Central Coast Creamery"
- "Chascharia Val Müstair"
- "Cooperativa La Poiana"
- "Cornish Cheese"
- "Cremo"
- "Cropwell Bishop Creamery"
- "Crémerie Juraflore"
- "Dalewood Fromage"
- "De Colțești"
- "Dehesa De Los Llanos"
- "Dorfsennerei Schlins-Röns"
- "Emmi Roth"
- "Errington Cheese"
- "Etyeki Kecskesajt Manufaktúra"
- "F. W. Read & Sons"
- "Fernando & Simões - Queijaria Artesanal"
- "Fromage d’Alpage"
- "Fromagerie André"
- "Fromagerie Antony"
- "Fromagerie Berthaut"
- "Fromagerie Coopérative de la Vallée des Arves"
- "Fromagerie Germain"
- "Fromagerie L'Amuse"
- "Fromagerie Matocq"
- "Fromagerie Moléson"
- "Fromagerie Rouzaire"
- "Fromagerie d'Etiez"
- "Fromagerie de l’Île-aux-Grues"
- "Fromagerie du Buron"
- "Fromagerie du Mont d'Or"
- "Fromagerie du Presbytère"
- "Fromages Spielhofer"
- "Galmesán"
- "Gourmino"
- "Grana d'Oro"
- "Graviera Pittara"
- "Groendal"
- "Hacienda Zorita"
- "Hol Ysteri"
- "Jasper Hill Farm"
- "Jumi"
- "Kaasmakerij Passendale"
- "King Stone Dairy"
- "Kjekshus Gård"
- "Kostarelos"
- "Kyodo Gakusha"
- "Latteria Sociale Valtellina"
- "Le Herve du Vieux Moulin"
- "Leicestershire Handmade Cheese Company"
- "Little Cheese Farm"
- "Long Clawson Dairy"
- "Luigi Guffanti 1876"
- "Lutjewinkel 1916"
- "Lynher Dairies Cheese"
- "Malko Käsemanufaktur"
- "Malpiqueijo"
- "Marieke Gouda"
- "Mauri Formaggi"
- "Mons Fromager Affineur"
- "Montgomery’s Cheese"
- "Obersteirische Molkerei"
- "Onetik"
- "Pago Valle de los Molinos"
- "Parish Hill Creamery"
- "Paxton & Whitfield"
- "Pinzgau Milch"
- "Prolactine France"
- "Queijaria Belafazenda"
- "Queijaria Vale da Estrela"
- "Queijo Soalheira Quinta Pomar"
- "Queseria La Leze"
- "Queseria Los Casareños"
- "Quesería Artesanal Las RRR"
- "Quesería Artesanal Los Payuelos"
- "Quesería Vega de Tordín"
- "Queso Payoyo"
- "Quesos & Besos"
- "Quesos Cañarejal"
- "Quesos El Pastor"
- "Quesos Pajarete"
- "Quesos Rufino"
- "Quesos Subaida"
- "Quesos Villadharo"
- "Quesos del Casar"
- "Rocca Toscana Formaggi"
- "Roça da Cidade"
- "Roelli Cheese Company"
- "Rogue Creamery"
- "Rohmilchkäserei Backensholz"
- "Roquefort Société"
- "Sennerei Andelsbuch"
- "Spring Brook Farm Cheese"
- "Stichelton Dairy"
- "Tenuta Vannulo"
- "The Farm at Doe Run"
- "Tingvollost"
- "Trethowan Brothers"
- "Tulip Tree Creamery"
- "Tørresvangen Gårdsysteri"
- "Uplands Cheese"
- "Village Maid Cheese"
- "Walo Von Mühlenen"
- "Žemaitijos Pienas"
23 changes: 23 additions & 0 deletions src/main/resources/ru.yml
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,29 @@ ru:
- "Эсром"
- "Ярг"
- "Ярлсберг"
rind:
- "ароматизированный"
- "мытый"
- "цветочный"
- "в бинтах"
- "вощёный"
- "натуральный"
- "без кожуры"
rind_edibility:
- "съедобная"
- "несъедобная"
packaging:
- "воск"
- "алюминиевая фольга"
- "бумага"
- "пергаментная бумага"
- "вощённая paper"
- "вакуумная упаковка"
- "стеклянный контейнер"
- "упаковка в модифицированной атмосфере"
- "съедобная плёнка"
- "активная упаковка"
- "умная упаковка"

photography:
term: ["диафрагма", "выдержка", "фокусное расстояние", "плёнка", "вспышка", "зеркало", "отражение", "видоискатель", "горячий башмак", "затвор", "объектив", "35мм", "зерно", "боке", "фокус", "аберрации", "Ч/Б", "ISO", "ГРИПП", "зеркалка", "цифрозеркалка", "чёрный ключ", "белый ключ", "БДД", "чувствительность"]
Expand Down
10 changes: 9 additions & 1 deletion src/test/java/net/datafaker/providers/foods/CheeseTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,25 @@ protected Collection<TestSpec> providerListTest() {
TestSpec.of(cheese::texture, "cheese.texture"),
TestSpec.of(cheese::milk, "cheese.milk"),
TestSpec.of(cheese::color, "cheese.color"),
TestSpec.of(cheese::name, "cheese.name")
TestSpec.of(cheese::name, "cheese.name"),
TestSpec.of(cheese::producer, "cheese.producer"),
TestSpec.of(cheese::rind, "cheese.rind"),
TestSpec.of(cheese::rindEdibility, "cheese.rind_edibility"),
TestSpec.of(cheese::packaging, "cheese.packaging")
);
}

@Test
void shouldReturnCheeseWedge() {
Cheese.Wedge wedge = cheese.wedge();
assertThat(wedge.name()).isNotEmpty();
assertThat(wedge.producer()).isNotEmpty();
assertThat(wedge.type()).isNotEmpty();
assertThat(wedge.texture()).isNotEmpty();
assertThat(wedge.color()).isNotEmpty();
assertThat(wedge.milk()).isNotEmpty();
assertThat(wedge.rind()).isNotEmpty();
assertThat(wedge.rindEdibility()).isNotEmpty();
assertThat(wedge.packaging()).isNotEmpty();
}
}
Loading