Skip to content

Commit e128521

Browse files
ferclagerkingthorinCopilot
authored
Add Bluey provider with characters, quotes and locations (#1740)
* Add Bluey provider with characters, quotes and locations * add bluey.yml in EnFile class * add bluey.yml in EnFile class - end comma needed * Update Bluey.java Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Rick M <kingthorin@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 04b7adf commit e128521

File tree

5 files changed

+73
-0
lines changed

5 files changed

+73
-0
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
package net.datafaker.providers.entertainment;
2+
3+
import net.datafaker.providers.base.AbstractProvider;
4+
5+
/**
6+
* @since 2.6.0
7+
*/
8+
public class Bluey extends AbstractProvider<EntertainmentProviders> {
9+
10+
public Bluey(EntertainmentProviders faker) {
11+
super(faker);
12+
}
13+
14+
public String character() {
15+
return resolve("bluey.characters");
16+
}
17+
18+
public String location() {
19+
return resolve("bluey.locations");
20+
}
21+
22+
public String quote() {
23+
return resolve("bluey.quotes");
24+
}
25+
}

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ default BigBangTheory bigBangTheory() {
2323
return getProvider(BigBangTheory.class, BigBangTheory::new);
2424
}
2525

26+
default Bluey bluey() {
27+
return getProvider(Bluey.class, Bluey::new);
28+
}
29+
2630
default Boardgame boardgame() {
2731
return getProvider(Boardgame.class, Boardgame::new);
2832
}

src/main/java/net/datafaker/service/files/EnFile.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ public String getPath() {
4747
"beer.yml",
4848
"big_bang_theory.yml",
4949
"blood_type.yml",
50+
"bluey.yml",
5051
"boardgame.yml",
5152
"bojack_horseman.yml",
5253
"book.yml",

src/main/resources/en/bluey.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
en:
2+
faker:
3+
bluey:
4+
characters:
5+
- "Bluey Heeler"
6+
- "Bingo Heeler"
7+
- "Muffin Heeler"
8+
- "Socks Heeler"
9+
- "Coco"
10+
- "Snickers"
11+
- "Mackenzie"
12+
- "Bandit Heeler"
13+
- "Chilli Heeler"
14+
locations:
15+
- "Heeler House"
16+
- "Playground"
17+
- "Park"
18+
- "Beach"
19+
quotes:
20+
- "This is trifficult!"
21+
- "For real life?"
22+
- "Biscuits!"
23+
- "We'll see how we go."
24+
- "It's a good thing you're tough."
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
package net.datafaker.providers.entertainment;
2+
3+
import java.util.List;
4+
import java.util.Collection;
5+
6+
7+
public class BlueyTest extends EntertainmentFakerTest {
8+
9+
private final Bluey bluey = getFaker().bluey();
10+
11+
@Override
12+
protected Collection<TestSpec> providerListTest() {
13+
return List.of(
14+
TestSpec.of(bluey::character, "bluey.characters"),
15+
TestSpec.of(bluey::location, "bluey.locations"),
16+
TestSpec.of(bluey::quote, "bluey.quotes")
17+
);
18+
}
19+
}

0 commit comments

Comments
 (0)