New Data Providers
+
+++++
+* `archer`
+* `final_fantasy_xiv`
+* `mitch_hedberg`
+* `train_station`
+++++
+
+
+++++
[discrete]
=== Changed
@@ -25,11 +38,6 @@
* https://github.com/serpro69/kotlin-faker/pull/188[#188] [core] Fix postcode for en-GB locale
* https://github.com/serpro69/kotlin-faker/pull/193[#193] [core] Fix localized postcodes with regex patterns
-[discrete]
-=== Other
-
-* ...
-
====
.[1.14.0] - 2023-03-19
diff --git a/cli-bot/src/main/resources/META-INF/native-image/io.github.serpro69/cli-bot/reflect-config.json b/cli-bot/src/main/resources/META-INF/native-image/io.github.serpro69/cli-bot/reflect-config.json
index 41cb362d2..bdd5269c7 100644
--- a/cli-bot/src/main/resources/META-INF/native-image/io.github.serpro69/cli-bot/reflect-config.json
+++ b/cli-bot/src/main/resources/META-INF/native-image/io.github.serpro69/cli-bot/reflect-config.json
@@ -46,6 +46,10 @@
"name": "getAquaTeenHungerForce",
"parameterTypes": []
},
+ {
+ "name": "getArcher",
+ "parameterTypes": []
+ },
{
"name": "getArtist",
"parameterTypes": []
@@ -318,6 +322,10 @@
"name": "getFile",
"parameterTypes": []
},
+ {
+ "name": "getFinalFantasyXIV",
+ "parameterTypes": []
+ },
{
"name": "getFinalSpace",
"parameterTypes": []
@@ -510,6 +518,10 @@
"name": "getMinecraft",
"parameterTypes": []
},
+ {
+ "name": "getMitchHedberg",
+ "parameterTypes": []
+ },
{
"name": "getMoney",
"parameterTypes": []
@@ -782,6 +794,10 @@
"name": "getTouhou",
"parameterTypes": []
},
+ {
+ "name": "getTrainStation",
+ "parameterTypes": []
+ },
{
"name": "getTron",
"parameterTypes": []
@@ -1002,6 +1018,23 @@
}
]
},
+ {
+ "name": "io.github.serpro69.kfaker.provider.Archer",
+ "methods": [
+ {
+ "name": "characters",
+ "parameterTypes": []
+ },
+ {
+ "name": "locations",
+ "parameterTypes": []
+ },
+ {
+ "name": "quotes",
+ "parameterTypes": []
+ }
+ ]
+ },
{
"name": "io.github.serpro69.kfaker.provider.Artist",
"methods": [
@@ -2713,6 +2746,31 @@
}
]
},
+ {
+ "name": "io.github.serpro69.kfaker.provider.FinalFantasyXIV",
+ "methods": [
+ {
+ "name": "characters",
+ "parameterTypes": []
+ },
+ {
+ "name": "dataCenters",
+ "parameterTypes": []
+ },
+ {
+ "name": "jobs",
+ "parameterTypes": []
+ },
+ {
+ "name": "races",
+ "parameterTypes": []
+ },
+ {
+ "name": "zones",
+ "parameterTypes": []
+ }
+ ]
+ },
{
"name": "io.github.serpro69.kfaker.provider.FinalSpace",
"methods": [
@@ -3837,6 +3895,15 @@
}
]
},
+ {
+ "name": "io.github.serpro69.kfaker.provider.MitchHedberg",
+ "methods": [
+ {
+ "name": "quote",
+ "parameterTypes": []
+ }
+ ]
+ },
{
"name": "io.github.serpro69.kfaker.provider.Money",
"allDeclaredFields": true,
@@ -5316,6 +5383,79 @@
}
]
},
+ {
+ "name": "io.github.serpro69.kfaker.provider.TrainStation",
+ "methods": [
+ {
+ "name": "getGermany",
+ "parameterTypes": []
+ },
+ {
+ "name": "getSpain",
+ "parameterTypes": []
+ },
+ {
+ "name": "getUnitedKingdom",
+ "parameterTypes": []
+ },
+ {
+ "name": "getUnitedStates",
+ "parameterTypes": []
+ }
+ ]
+ },
+ {
+ "name": "io.github.serpro69.kfaker.provider.TrainStationGermany",
+ "methods": [
+ {
+ "name": "metro",
+ "parameterTypes": []
+ },
+ {
+ "name": "railway",
+ "parameterTypes": []
+ }
+ ]
+ },
+ {
+ "name": "io.github.serpro69.kfaker.provider.TrainStationSpain",
+ "methods": [
+ {
+ "name": "metro",
+ "parameterTypes": []
+ },
+ {
+ "name": "railway",
+ "parameterTypes": []
+ }
+ ]
+ },
+ {
+ "name": "io.github.serpro69.kfaker.provider.TrainStationUnitedKingdom",
+ "methods": [
+ {
+ "name": "metro",
+ "parameterTypes": []
+ },
+ {
+ "name": "railway",
+ "parameterTypes": []
+ }
+ ]
+ },
+ {
+ "name": "io.github.serpro69.kfaker.provider.TrainStationUnitedStates",
+ "methods": [
+ {
+ "name": "metro",
+ "parameterTypes": []
+ },
+ {
+ "name": "railway",
+ "parameterTypes": []
+ }
+ ]
+ },
{
"name": "io.github.serpro69.kfaker.provider.Tron",
"methods": [
diff --git a/cli-bot/src/test/kotlin/io/github/serpro69/kfaker/app/cli/IntrospectorTest.kt b/cli-bot/src/test/kotlin/io/github/serpro69/kfaker/app/cli/IntrospectorTest.kt
index 5c4408488..86f0df636 100644
--- a/cli-bot/src/test/kotlin/io/github/serpro69/kfaker/app/cli/IntrospectorTest.kt
+++ b/cli-bot/src/test/kotlin/io/github/serpro69/kfaker/app/cli/IntrospectorTest.kt
@@ -6,7 +6,6 @@ import io.github.serpro69.kfaker.provider.Airport
import io.github.serpro69.kfaker.provider.Dota
import io.kotest.core.spec.style.DescribeSpec
import io.kotest.matchers.collections.shouldContainExactly
-import io.kotest.matchers.sequences.shouldContainExactly
import kotlin.reflect.KClass
class IntrospectorTest : DescribeSpec() {
@@ -31,6 +30,7 @@ class IntrospectorTest : DescribeSpec() {
"App",
"Appliance",
"AquaTeenHungerForce",
+ "Archer",
"Artist",
"Australia",
"Avatar",
@@ -99,6 +99,7 @@ class IntrospectorTest : DescribeSpec() {
"Fallout",
"FamilyGuy",
"File",
+ "FinalFantasyXIV",
"FinalSpace",
"Finance",
"FmaBrotherhood",
@@ -147,6 +148,7 @@ class IntrospectorTest : DescribeSpec() {
"MichaelScott",
"Military",
"Minecraft",
+ "MitchHedberg",
"Money",
"Mountain",
"Mountaineering",
@@ -215,6 +217,7 @@ class IntrospectorTest : DescribeSpec() {
"TheThickOfIt",
"Tolkien",
"Touhou",
+ "TrainStation",
"Tron",
"TwinPeaks",
"UmphreysMcgee",
@@ -249,6 +252,7 @@ class IntrospectorTest : DescribeSpec() {
"app",
"appliance",
"aquaTeenHungerForce",
+ "archer",
"artist",
"australia",
"avatar",
@@ -317,6 +321,7 @@ class IntrospectorTest : DescribeSpec() {
"fallout",
"familyGuy",
"file",
+ "finalFantasyXIV",
"finalSpace",
"finance",
"fmaBrotherhood",
@@ -365,6 +370,7 @@ class IntrospectorTest : DescribeSpec() {
"michaelScott",
"military",
"minecraft",
+ "mitchHedberg",
"money",
"mountain",
"mountaineering",
@@ -433,6 +439,7 @@ class IntrospectorTest : DescribeSpec() {
"theThickOfIt",
"tolkien",
"touhou",
+ "trainStation",
"tron",
"twinPeaks",
"umphreysMcgee",
diff --git a/core/src/integration/kotlin/io/github/serpro69/kfaker/FakerIT.kt b/core/src/integration/kotlin/io/github/serpro69/kfaker/FakerIT.kt
index 7567e0bb5..533b0571d 100644
--- a/core/src/integration/kotlin/io/github/serpro69/kfaker/FakerIT.kt
+++ b/core/src/integration/kotlin/io/github/serpro69/kfaker/FakerIT.kt
@@ -16,7 +16,6 @@ import kotlin.reflect.full.declaredMemberProperties
import kotlin.reflect.full.isSubtypeOf
import kotlin.reflect.full.starProjectedType
-@Suppress("UNCHECKED_CAST")
class FakerIT : DescribeSpec({
describe("every public function in each provider is invoked without exceptions") {
val faker = Faker()
diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/Faker.kt b/core/src/main/kotlin/io/github/serpro69/kfaker/Faker.kt
index e48fe46ea..081b16c36 100644
--- a/core/src/main/kotlin/io/github/serpro69/kfaker/Faker.kt
+++ b/core/src/main/kotlin/io/github/serpro69/kfaker/Faker.kt
@@ -43,6 +43,7 @@ class Faker @JvmOverloads constructor(internal val config: FakerConfig = fakerCo
val app: App by lazy { App(fakerService) }
val appliance: Appliance by lazy { Appliance(fakerService) }
val aquaTeenHungerForce: AquaTeenHungerForce by lazy { AquaTeenHungerForce(fakerService) }
+ val archer: Archer by lazy { Archer(fakerService) }
val artist: Artist by lazy { Artist(fakerService) }
val australia: Australia by lazy { Australia(fakerService) }
val avatar: Avatar by lazy { Avatar(fakerService) }
@@ -111,6 +112,7 @@ class Faker @JvmOverloads constructor(internal val config: FakerConfig = fakerCo
val fallout: Fallout by lazy { Fallout(fakerService) }
val familyGuy: FamilyGuy by lazy { FamilyGuy(fakerService) }
val file: File by lazy { File(fakerService) }
+ val finalFantasyXIV: FinalFantasyXIV by lazy { FinalFantasyXIV(fakerService) }
val finalSpace: FinalSpace by lazy { FinalSpace(fakerService) }
val finance: Finance by lazy { Finance(fakerService) }
val fmaBrotherhood: FmaBrotherhood by lazy { FmaBrotherhood(fakerService) }
@@ -161,6 +163,7 @@ class Faker @JvmOverloads constructor(internal val config: FakerConfig = fakerCo
val michaelScott: MichaelScott by lazy { MichaelScott(fakerService) }
val military: Military by lazy { Military(fakerService) }
val minecraft: Minecraft by lazy { Minecraft(fakerService) }
+ val mitchHedberg: MitchHedberg by lazy { MitchHedberg(fakerService) }
val money: Money by lazy { Money(fakerService) }
val mountain: Mountain by lazy { Mountain(fakerService) }
val mountaineering: Mountaineering by lazy { Mountaineering(fakerService) }
@@ -231,6 +234,7 @@ class Faker @JvmOverloads constructor(internal val config: FakerConfig = fakerCo
val theThickOfIt: TheThickOfIt by lazy { TheThickOfIt(fakerService) }
val tolkien: Tolkien by lazy { Tolkien(fakerService) }
val touhou: Touhou by lazy { Touhou(fakerService) }
+ val trainStation: TrainStation by lazy { TrainStation(fakerService) }
val tron: Tron by lazy { Tron(fakerService) }
val twinPeaks: TwinPeaks by lazy { TwinPeaks(fakerService) }
val umphreysMcgee: UmphreysMcgee by lazy { UmphreysMcgee(fakerService) }
diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/dictionary/YamlCategory.kt b/core/src/main/kotlin/io/github/serpro69/kfaker/dictionary/YamlCategory.kt
index 3e57a8539..dd67c7286 100644
--- a/core/src/main/kotlin/io/github/serpro69/kfaker/dictionary/YamlCategory.kt
+++ b/core/src/main/kotlin/io/github/serpro69/kfaker/dictionary/YamlCategory.kt
@@ -19,6 +19,7 @@ internal enum class YamlCategory : Category {
APP,
APPLIANCE,
AQUA_TEEN_HUNGER_FORCE,
+ ARCHER,
ARTIST,
AUSTRALIA,
AVATAR,
@@ -186,6 +187,7 @@ internal enum class YamlCategory : Category {
THE_OFFICE,
THE_THICK_OF_IT,
TOLKIEN,
+ TRAIN_STATION,
TRON,
TWIN_PEAKS,
UMPHREYS_MCGEE,
diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Archer.kt b/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Archer.kt
new file mode 100644
index 000000000..f986ff486
--- /dev/null
+++ b/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Archer.kt
@@ -0,0 +1,24 @@
+package io.github.serpro69.kfaker.provider
+
+import io.github.serpro69.kfaker.*
+import io.github.serpro69.kfaker.dictionary.*
+import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider
+import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate
+
+/**
+ * [FakeDataProvider] implementation for [YamlCategory.ARCHER] category.
+ */
+@Suppress("unused")
+class Archer internal constructor(fakerService: FakerService) : YamlFakeDataProvider