diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2b3b91dc6..219fb44c4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -29,7 +29,10 @@ jobs: run: | _app_path=$(find ./cli-bot/build/graal -type f -name faker-bot\* -not -name \*.txt) mv "$_app_path" ./faker-bot - ./faker-bot list --verbose >/dev/null || false - ./faker-bot lookup a --verbose >/dev/null || false + # run several iterations to test various pathways when generating data + for i in {0..10}; do + ./faker-bot list --verbose >/dev/null || false + ./faker-bot lookup a --verbose >/dev/null || false + done diff --git a/CONTRIBUTING.adoc b/CONTRIBUTING.adoc index d16ba1978..00f8163ec 100644 --- a/CONTRIBUTING.adoc +++ b/CONTRIBUTING.adoc @@ -70,6 +70,7 @@ This repository consists of the following modules: * `link:cli-bot[cli-bot]` - a CLI application that helps to quickly find required kotlin-faker functions right from the terminal * `link:core[core]` - contains the core functionality of kotlin-faker * `link:docs[docs]` - documentation for this project, published @ https://serpro69.github.io/kotlin-faker/ +* `link:faker[faker]` - submodules with faker implementations in various domains, like "books", "music", and so on. == Adding new functionality @@ -162,3 +163,13 @@ class Name internal constructor(fakerService: FakerService) : AbstractFakeDataPr ==== Example commit In addition to the above instructions, you can also take a look at https://github.com/serpro69/kotlin-faker/commit/0b34d19d77aa728ed87382444908c90a63cc5f52[`0b34d1`] commit, which can be used as an MVP example of all of the above steps. + +==== Which Faker implementation to use? + +Since kotlin-faker 2.0, the functionality has been split between various "faker implementations", according to some generic "domains". + +link:core[CoreFaker] (or just Faker) contains the most commonly used data providers, like names, addresses, internet and others, while the rest has been split between various other link:faker[faker submodules]. + +There's no "even split" between each faker implementation and in some cases you could easily argue for a data provider to belong to more than one domain, so use your best judgement when deciding where to place a new data provider implementation. If there's no good fit, use link:faker/misc[MiscFaker]. + +One can also consider creating a new faker submodule altogether, however, a general rule should be that any faker implementation should have at least 3 data providers. diff --git a/README.md b/README.md index d59128f5c..b8903fcfd 100644 --- a/README.md +++ b/README.md @@ -68,6 +68,10 @@ repositories { ``` +#### Additional Fakers + +Extra fakers covering a wide range of domains are available as separate dependencies. See [faker](faker) submodules in this repo for more details about each faker. + ### Generating data ```kotlin diff --git a/build.gradle.kts b/build.gradle.kts index a4ff01c60..0c1d2ecfe 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,18 +1,19 @@ import com.github.benmanes.gradle.versions.updates.DependencyUpdatesTask import io.qameta.allure.gradle.task.AllureReport import io.qameta.allure.gradle.task.AllureServe -import org.jetbrains.kotlin.gradle.tasks.KotlinCompile import org.gradle.api.tasks.testing.TestResult.ResultType import org.gradle.api.tasks.testing.logging.TestExceptionFormat import org.gradle.api.tasks.testing.logging.TestLogEvent +import org.jetbrains.kotlin.gradle.dsl.KotlinJvmProjectExtension plugins { - kotlin("jvm") version "1.9.10" apply false - id("com.adarshr.test-logger") version "2.0.0" apply false + // NB! some versions are on the classpath from dependency declared in buildSrc/build.gradle.kts + kotlin("jvm") apply false + id("com.adarshr.test-logger") apply false id("com.github.ben-manes.versions") version "0.28.0" apply false id("io.qameta.allure") version "2.8.1" id("io.github.gradle-nexus.publish-plugin") version "1.1.0" - id("com.github.johnrengelman.shadow") version "8.1.1" apply false + id("com.github.johnrengelman.shadow") apply false } repositories { @@ -22,9 +23,10 @@ repositories { group = "io.github.serpro69" subprojects { - group = parent?.group?.toString() ?: "io.github.serpro69" + group = rootProject.group.toString() + version = rootProject.version.toString() - version = rootProject.version + val isTestHelper = this@subprojects.name == "test" repositories { mavenCentral() @@ -36,7 +38,7 @@ subprojects { plugin("com.adarshr.test-logger") plugin("com.github.ben-manes.versions") plugin("io.qameta.allure") - plugin("com.github.johnrengelman.shadow") + if (!isTestHelper) plugin("com.github.johnrengelman.shadow") } dependencies { @@ -44,6 +46,7 @@ subprojects { val testRuntimeOnly by configurations val testImplementation by configurations + // TODO move dependencies to conventions plugin(s) implementation(kotlin("stdlib-jdk8")) implementation(kotlin("reflect")) implementation("com.github.mifmif:generex:1.0.2") @@ -68,20 +71,19 @@ subprojects { } configure { - sourceCompatibility = JavaVersion.VERSION_1_8 - targetCompatibility = JavaVersion.VERSION_1_8 + toolchain { + languageVersion = JavaLanguageVersion.of(8) + } } - tasks.withType { - options.encoding = "UTF-8" - sourceCompatibility = "1.8" - targetCompatibility = "1.8" + configure { + jvmToolchain { + languageVersion.set(JavaLanguageVersion.of(8)) + } } - tasks.withType { - kotlinOptions { - jvmTarget = "1.8" - } + tasks.withType { + options.encoding = "UTF-8" } tasks.withType { @@ -147,7 +149,7 @@ subprojects { tasks.withType { fun isNonStable(version: String): Boolean { - val stableKeyword = listOf("RELEASE", "FINAL", "GA").any { version.toUpperCase().contains(it) } + val stableKeyword = listOf("RELEASE", "FINAL", "GA").any { version.uppercase().contains(it) } val regex = "^[0-9,.v-]+(-r|-jre)?$".toRegex() val isStable = stableKeyword || regex.matches(version) return isStable.not() diff --git a/buildSrc/build.gradle.kts b/buildSrc/build.gradle.kts index 4febdf489..46c357d46 100644 --- a/buildSrc/build.gradle.kts +++ b/buildSrc/build.gradle.kts @@ -4,9 +4,18 @@ plugins { repositories { mavenCentral() + gradlePluginPortal() } dependencies { - implementation("com.fasterxml.jackson.core:jackson-databind:2.14.0") - implementation("com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.14.0") + // needed to be able to apply external plugin + // https://docs.gradle.org/current/userguide/custom_plugins.html#applying_external_plugins_in_precompiled_script_plugins + implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.20") + implementation("org.jetbrains.dokka:dokka-gradle-plugin:1.9.10") + implementation("com.github.johnrengelman:shadow:8.1.1") + implementation("com.adarshr:gradle-test-logger-plugin:4.0.0") + // used by yaml-to-json buildSrc plugin + implementation("com.fasterxml.jackson.core:jackson-databind:2.15.3") + // use snakeyaml instead of jackson-dataformat-yaml to properly handle yaml anchors and write them as actual values to json + implementation("org.yaml:snakeyaml:2.2") } diff --git a/buildSrc/src/main/kotlin/faker-lib-conventions.gradle.kts b/buildSrc/src/main/kotlin/faker-lib-conventions.gradle.kts new file mode 100644 index 000000000..68dbaa2b3 --- /dev/null +++ b/buildSrc/src/main/kotlin/faker-lib-conventions.gradle.kts @@ -0,0 +1,215 @@ +import com.adarshr.gradle.testlogger.theme.ThemeType +import com.adarshr.gradle.testlogger.TestLoggerExtension +import com.github.jengelman.gradle.plugins.shadow.ShadowExtension +import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar +import java.util.* + +plugins { + `java-library` + kotlin("jvm") + id("org.jetbrains.dokka") + `maven-publish` + signing +} + +/** + * For additional providers, use a combination of rootProject and subproject names for artifact name and similar things. + * i.e. kotlin-faker-books, kotlin-faker-movies, kotlin-faker-tv, ... + * + * The "core" lib retains the same name as before: kotlin-faker + */ +private val fullName: String = if (project.name == "core") rootProject.name else "${rootProject.name}-${project.name}" + +configurations { + create("integrationImplementation") { extendsFrom(configurations.getByName("testImplementation")) } + create("integrationRuntimeOnly") { + extendsFrom( + configurations.getByName("testRuntimeOnly"), + configurations.getByName("shadow") + ) + } +} + +// configure sourceSets as extension since it's not available here as `sourceSets` is an extension on `Project` +// https://docs.gradle.org/current/userguide/kotlin_dsl.html#project_extensions_and_conventions +configure { + create("integration") { + resources.srcDir("src/integration/resources") + compileClasspath += main.get().compileClasspath + test.get().compileClasspath + runtimeClasspath += main.get().runtimeClasspath + test.get().runtimeClasspath + } + main { + resources { + this.srcDir("build/generated/src/main/resources") + } + } +} + +dependencies { + val shadow by configurations + val integrationImplementation by configurations + shadow(kotlin("stdlib-jdk8")) + shadow(kotlin("reflect")) + // provides helpers for integration tests + integrationImplementation(project(":test", "testHelper")) +} + +val integrationTest by tasks.creating(Test::class) { + testClassesDirs = sourceSets["integration"].output.classesDirs + classpath = sourceSets["integration"].runtimeClasspath + dependsOn(tasks.test) +} + +configure { + showPassed = false + theme = ThemeType.MOCHA +} + +tasks.withType { + archiveBaseName.set(fullName) + + manifest { + attributes( + mapOf( + "Implementation-Title" to fullName, + "Implementation-Version" to project.version, + /* + * We can't add this here because this resolves the configuration, + * after which it effectively becomes read-only and we'll get an error + * Cannot change dependencies of dependency configuration ':core:implementation' after it has been included in dependency resolution + * if we try to add more dependencies in the module's build.gradle file directly + */ + // "Class-Path" to project.configurations.compileClasspath.get().joinToString(" ") { it.name } + ) + ) + } +} + +val shadowJar by tasks.getting(ShadowJar::class) { + minimize() + archiveBaseName.set(fullName) + archiveClassifier.set("") + relocate("com.fasterxml", "faker.com.fasterxml") + exclude("**/locales/*.yml") // jar already contains json files + dependencies { + exclude("module-info.class") + include { + it.name.startsWith(project.group.toString()) || + it.name.startsWith("com.fasterxml") + } + } + manifest { + attributes( + mapOf( + "Implementation-Title" to fullName, + "Implementation-Version" to project.version, + /* + * We can't add this here because this resolves the configuration, + * after which it effectively becomes read-only and we'll get an error + * Cannot change dependencies of dependency configuration ':core:implementation' after it has been included in dependency resolution + * if we try to add more dependencies in the module's build.gradle file directly + */ + // "Class-Path" to project.configurations.compileClasspath.get().joinToString(" ") { it.name } + ) + ) + } + dependsOn(tasks.jar) +} + +val sourcesJar by tasks.creating(Jar::class) { + archiveClassifier.set("sources") + from(sourceSets.getByName("main").allSource) + from("LICENCE.md") { + into("META-INF") + } +} + +val dokkaJavadocJar by tasks.creating(Jar::class) { + archiveClassifier.set("javadoc") + dependsOn(tasks.dokkaJavadoc) + from(tasks.dokkaJavadoc.get().outputDirectory.orNull) +} + +artifacts { + archives(sourcesJar) + archives(dokkaJavadocJar) +} + +val artifactName = fullName +val artifactGroup = project.group.toString() +val artifactVersion = project.version.toString() +val releaseTagName = "v$artifactVersion" + +val pomUrl = "https://github.com/serpro69/kotlin-faker" +val pomScmUrl = "https://github.com/serpro69/kotlin-faker" +val pomIssueUrl = "https://github.com/serpro69/kotlin-faker/issues" +val pomDesc = "https://github.com/serpro69/kotlin-faker" + +val ghRepo = "serpro69/kotlin-faker" +val ghReadme = "README.md" + +val pomLicenseName = "MIT" +val pomLicenseUrl = "https://opensource.org/licenses/mit-license.php" +val pomLicenseDist = "repo" + +val pomDeveloperId = "serpro69" +val pomDeveloperName = "Serhii Prodan" + +val publicationName = "faker${project.name.replaceFirstChar { if (it.isLowerCase()) it.titlecase(Locale.getDefault()) else it.toString() }}" + +publishing { + publications { + create(publicationName) { + groupId = artifactGroup + artifactId = artifactName + version = artifactVersion +// from(components["java"]) + ShadowExtension(project).component(this) + artifact(sourcesJar) + artifact(dokkaJavadocJar) //TODO configure dokka or use defaults? + + pom { + packaging = "jar" + name.set(fullName) + description.set(pomDesc) + url.set(pomUrl) + scm { + url.set(pomScmUrl) + } + issueManagement { + url.set(pomIssueUrl) + } + licenses { + license { + name.set(pomLicenseName) + url.set(pomLicenseUrl) + } + } + developers { + developer { + id.set(pomDeveloperId) + name.set(pomDeveloperName) + } + } + } + } + } +} + +signing { + if (!version.toString().endsWith("SNAPSHOT")) { + sign(publishing.publications[publicationName]) + } +} + +tasks { + assemble { + dependsOn(shadowJar) + } +} + +tasks.withType().configureEach { + doFirst { + if (version == "0.0.0") throw IllegalArgumentException("Unable to publish version 0.0.0") + } +} diff --git a/buildSrc/src/main/kotlin/faker-provider-conventions.gradle.kts b/buildSrc/src/main/kotlin/faker-provider-conventions.gradle.kts new file mode 100644 index 000000000..e2df64129 --- /dev/null +++ b/buildSrc/src/main/kotlin/faker-provider-conventions.gradle.kts @@ -0,0 +1,21 @@ + +plugins { +} + +dependencies { + val compileOnly by configurations + val testImplementation by configurations + // In order to use an additional fake data provider, + // core faker needs to be on the classpath. + // Don't add it as transitive dependency to each faker provider + compileOnly(project(":core")) + // we need implementation dependency for tests to be able to access 'core' functionality + testImplementation(project(":core")) +} + +// since we're adding :core as testImplementation dependency, +// we also need to make sure Test tasks depend on core having been built +tasks.withType { + dependsOn(":core:shadowJar") +} + diff --git a/buildSrc/src/main/kotlin/yaml-to-json.gradle.kts b/buildSrc/src/main/kotlin/yaml-to-json.gradle.kts index 0e7e54cc8..e659fb5d2 100644 --- a/buildSrc/src/main/kotlin/yaml-to-json.gradle.kts +++ b/buildSrc/src/main/kotlin/yaml-to-json.gradle.kts @@ -1,6 +1,5 @@ import com.fasterxml.jackson.databind.ObjectMapper -import com.fasterxml.jackson.dataformat.yaml.YAMLFactory -import org.gradle.kotlin.dsl.create +import org.yaml.snakeyaml.Yaml interface Yaml2JsonPluginExtension { val input: Property @@ -9,7 +8,13 @@ interface Yaml2JsonPluginExtension { class Yaml2JsonPlugin : Plugin { val jsonMapper = ObjectMapper() - val yamlMapper = ObjectMapper(YAMLFactory()) + // https://github.com/FasterXML/jackson-dataformats-text/issues/98 + /* We use snakeyaml since it can handle Anchors and References (Aliases) in yml files, which jackson can't apparently. + * We still can use jackson to write to json, because at that time, + * the Map we created from yaml will contain proper values and not simply anchor names, + * like it happens when using jackson to read yaml. + */ + val yamlMapper = Yaml() override fun apply(p: Project) { val ext = p.extensions.create("yaml2jsonExt") @@ -50,8 +55,7 @@ class Yaml2JsonPlugin : Plugin { } private fun writeYamlToJson(src: File, dest: File) { - val map = yamlMapper.readValue(src.inputStream(), Map::class.java) + val map = yamlMapper.loadAs(src.inputStream(), Map::class.java) jsonMapper.writeValue(dest, map) } } - diff --git a/cli-bot/README.md b/cli-bot/README.md index addd0b534..e0db24bf6 100644 --- a/cli-bot/README.md +++ b/cli-bot/README.md @@ -78,6 +78,10 @@ using `de` locale. `./faker-bot list --list-locales` - prints all available locales +#### List available fakers + +`./faker-bot list --list-fakers` - prints all available faker implementations + ## Thanks Inspired by [faker-ruby/faker-bot](https://github.com/faker-ruby/faker-bot) diff --git a/cli-bot/TODO.md b/cli-bot/TODO.md new file mode 100644 index 000000000..27992210b --- /dev/null +++ b/cli-bot/TODO.md @@ -0,0 +1,19 @@ +- Update functionality to use `AbstractFaker` instead of `Faker` +- Add new filter option - `--faker` (e.g. `--faker core` or `--faker books`) + - Support multiple values in the filter +- Refactor commands to use `AbstractFaker` implementation based on filters, or use all implementations by default + - Each provider implementation should have it's own "root-node" name in the output, according to the class name of the faker, e.g. + ```text + Faker() + └── address + ├── buildingNumber() + ├── city() + └── cityName() + + BooksFaker() + └── dune + ├── characters() + └── quotes + + ... + ``` diff --git a/cli-bot/build.gradle.kts b/cli-bot/build.gradle.kts index 3fe6635ce..4a6ac3ca3 100644 --- a/cli-bot/build.gradle.kts +++ b/cli-bot/build.gradle.kts @@ -10,11 +10,36 @@ plugins { val mainFunction = "io.github.serpro69.kfaker.app.KFakerKt" val mainAppClass = "io.github.serpro69.kfaker.app.KFaker" +val fakers = listOf( + "books", + "commerce", + "creatures", + "edu", + "games", + "humor", + "japmedia", + "lorem", + "misc", + "movies", + "music", + "sports", + "tech", + "travel", + "tvshows", +) + dependencies { implementation(project(":core")) + fakers.forEach { implementation(project(":faker:$it")) } implementation("info.picocli:picocli:4.7.5") } +// Test tasks must run after we've built the dependencies +tasks.withType { + dependsOn(":core:shadowJar") + fakers.forEach { dependsOn(":faker:$it:shadowJar") } +} + application { // mainClassName = mainFunction mainClass.set(mainFunction) @@ -48,6 +73,16 @@ val shadowJar by tasks.getting(ShadowJar::class) { from(project.configurations.runtimeClasspath.get().filter { it.name.endsWith("jar") }.map { zipTree(it) }) with(tasks.jar.get() as CopySpec) dependsOn(project.configurations.runtimeClasspath) + // since we're adding :core and :faker:* as implementation dependencies + // we also need to make sure ShadowJar task depend on core having been built + dependsOn(":core:shadowJar") + fakers.forEach { dependsOn(":faker:$it:shadowJar") } +} + +// dunno why, but gradle is complaining that 'startScripts' may run before dependencies have been built +tasks.startScripts { + dependsOn(":core:shadowJar") + fakers.forEach { dependsOn(":faker:$it:shadowJar") } } graal { diff --git a/cli-bot/src/main/kotlin/io/github/serpro69/kfaker/app/Constants.kt b/cli-bot/src/main/kotlin/io/github/serpro69/kfaker/app/Constants.kt new file mode 100644 index 000000000..a3cb693a0 --- /dev/null +++ b/cli-bot/src/main/kotlin/io/github/serpro69/kfaker/app/Constants.kt @@ -0,0 +1,41 @@ +package io.github.serpro69.kfaker.app + +import io.github.serpro69.kfaker.AbstractFaker +import io.github.serpro69.kfaker.Faker +import io.github.serpro69.kfaker.FakerConfig +import io.github.serpro69.kfaker.books.BooksFaker +import io.github.serpro69.kfaker.commerce.CommerceFaker +import io.github.serpro69.kfaker.creatures.CreaturesFaker +import io.github.serpro69.kfaker.edu.EduFaker +import io.github.serpro69.kfaker.games.GamesFaker +import io.github.serpro69.kfaker.humor.HumorFaker +import io.github.serpro69.kfaker.japmedia.JapaneseMediaFaker +import io.github.serpro69.kfaker.lorem.LoremFaker +import io.github.serpro69.kfaker.misc.MiscFaker +import io.github.serpro69.kfaker.movies.MoviesFaker +import io.github.serpro69.kfaker.music.MusicFaker +import io.github.serpro69.kfaker.sports.SportsFaker +import io.github.serpro69.kfaker.tech.TechFaker +import io.github.serpro69.kfaker.travel.TravelFaker +import io.github.serpro69.kfaker.tv.TvShowsFaker + +val fakers: (config: FakerConfig) -> List = { + listOf( + Faker(it), + BooksFaker(it), + CommerceFaker(it), + CreaturesFaker(it), + EduFaker(it), + GamesFaker(it), + HumorFaker(it), + JapaneseMediaFaker(it), + LoremFaker(it), + MiscFaker(it), + MoviesFaker(it), + MusicFaker(it), + SportsFaker(it), + TechFaker(it), + TravelFaker(it), + TvShowsFaker(it), + ) +} diff --git a/cli-bot/src/main/kotlin/io/github/serpro69/kfaker/app/cli/Introspector.kt b/cli-bot/src/main/kotlin/io/github/serpro69/kfaker/app/cli/Introspector.kt index 410b27e33..ed693fb00 100644 --- a/cli-bot/src/main/kotlin/io/github/serpro69/kfaker/app/cli/Introspector.kt +++ b/cli-bot/src/main/kotlin/io/github/serpro69/kfaker/app/cli/Introspector.kt @@ -1,6 +1,6 @@ package io.github.serpro69.kfaker.app.cli -import io.github.serpro69.kfaker.Faker +import io.github.serpro69.kfaker.AbstractFaker import io.github.serpro69.kfaker.provider.FakeDataProvider import io.github.serpro69.kfaker.provider.misc.RandomProvider import io.github.serpro69.kfaker.provider.misc.StringProvider @@ -13,9 +13,9 @@ import kotlin.reflect.full.isSubtypeOf import kotlin.reflect.full.starProjectedType /** - * Introspects [Faker] and it's descendants. + * Introspects [faker] and it's descendants. */ -class Introspector(private val faker: Faker) { +class Introspector(private val faker: AbstractFaker) { // Get a list of all publicly visible providers val providers: Sequence> = faker::class.declaredMemberProperties.asSequence().filter { it.visibility == KVisibility.PUBLIC diff --git a/cli-bot/src/main/kotlin/io/github/serpro69/kfaker/app/cli/Renderer.kt b/cli-bot/src/main/kotlin/io/github/serpro69/kfaker/app/cli/Renderer.kt index 60df9344b..ab3f612fc 100644 --- a/cli-bot/src/main/kotlin/io/github/serpro69/kfaker/app/cli/Renderer.kt +++ b/cli-bot/src/main/kotlin/io/github/serpro69/kfaker/app/cli/Renderer.kt @@ -1,6 +1,6 @@ package io.github.serpro69.kfaker.app.cli -import io.github.serpro69.kfaker.Faker +import io.github.serpro69.kfaker.AbstractFaker import io.github.serpro69.kfaker.app.subcommands.CommandOptions import io.github.serpro69.kfaker.provider.Money import kotlin.reflect.KFunction @@ -58,7 +58,7 @@ class Renderer(private val name: String, private val children: List) { */ fun renderProvider( options: CommandOptions, - faker: Faker, + faker: AbstractFaker, provider: KProperty<*>, subProvider: KProperty<*>?, functions: Sequence>, diff --git a/cli-bot/src/main/kotlin/io/github/serpro69/kfaker/app/subcommands/List.kt b/cli-bot/src/main/kotlin/io/github/serpro69/kfaker/app/subcommands/List.kt index ff0c4822d..abb3c9f5c 100644 --- a/cli-bot/src/main/kotlin/io/github/serpro69/kfaker/app/subcommands/List.kt +++ b/cli-bot/src/main/kotlin/io/github/serpro69/kfaker/app/subcommands/List.kt @@ -1,10 +1,11 @@ package io.github.serpro69.kfaker.app.subcommands -import io.github.serpro69.kfaker.Faker +import io.github.serpro69.kfaker.AbstractFaker import io.github.serpro69.kfaker.app.KFaker import io.github.serpro69.kfaker.app.cli.Introspector import io.github.serpro69.kfaker.app.cli.Renderer import io.github.serpro69.kfaker.app.cli.renderProvider +import io.github.serpro69.kfaker.app.fakers import io.github.serpro69.kfaker.fakerConfig import picocli.CommandLine @@ -28,18 +29,19 @@ object List : Runnable { ) var listLocales: Boolean = false + @CommandLine.Option( + names = ["--list-fakers"], + description = ["list available fakers", "if used other options will be ignored"], + required = false + ) + var listFakers: Boolean = false + @CommandLine.Parameters( description = ["limit output to specified provider(s)", "case-insensitive"] ) var providerNames = arrayOf() - private fun printProvidersList() { - val fakerConfig = fakerConfig { - locale = options.locale - } - - val faker = Faker(fakerConfig) - + private fun printProvidersList(faker: AbstractFaker) { val introspector = Introspector(faker) val renderedProviders = if (providerNames.isNotEmpty()) { @@ -56,9 +58,10 @@ object List : Runnable { } } - val output = Renderer("Faker()", renderedProviders.toList()).toString() + val output = Renderer("${faker::class.simpleName}()", renderedProviders.toList()).toString() println(output) + println("\n") } private fun printAvailableLocales() { @@ -71,6 +74,11 @@ object List : Runnable { } override fun run() { - if (listLocales) printAvailableLocales() else printProvidersList() + val fakerConfig = fakerConfig { locale = options.locale } + when { + listLocales -> printAvailableLocales() + listFakers -> fakers(fakerConfig).forEach { println(it::class.qualifiedName) } + else -> fakers(fakerConfig).forEach(::printProvidersList) + } } } diff --git a/cli-bot/src/main/kotlin/io/github/serpro69/kfaker/app/subcommands/Lookup.kt b/cli-bot/src/main/kotlin/io/github/serpro69/kfaker/app/subcommands/Lookup.kt index 5b99f0ada..0f9f80641 100644 --- a/cli-bot/src/main/kotlin/io/github/serpro69/kfaker/app/subcommands/Lookup.kt +++ b/cli-bot/src/main/kotlin/io/github/serpro69/kfaker/app/subcommands/Lookup.kt @@ -1,15 +1,14 @@ package io.github.serpro69.kfaker.app.subcommands -import io.github.serpro69.kfaker.Faker +import io.github.serpro69.kfaker.AbstractFaker import io.github.serpro69.kfaker.app.KFaker import io.github.serpro69.kfaker.app.cli.Introspector import io.github.serpro69.kfaker.app.cli.Renderer import io.github.serpro69.kfaker.app.cli.renderProvider +import io.github.serpro69.kfaker.app.fakers import io.github.serpro69.kfaker.app.subcommands.Lookup.name import io.github.serpro69.kfaker.fakerConfig import picocli.CommandLine -import kotlin.reflect.KFunction -import kotlin.reflect.KProperty /** * [KFaker] command for looking up required functionality by [name] @@ -30,13 +29,7 @@ object Lookup : Runnable { ) lateinit var name: String - private fun printMatchingFunctions() { - val fakerConfig = fakerConfig { - locale = options.locale - } - - val faker = Faker(fakerConfig) - + private fun printMatchingFunctions(faker: AbstractFaker) { val introspector = Introspector(faker) val filteredMap = introspector.providerData @@ -56,12 +49,18 @@ object Lookup : Runnable { renderProvider(options, faker, provider, null, functions, properties) } - val output = Renderer("Faker()", renderedProviders).toString() + val output = if (renderedProviders.isNotEmpty()) { + Renderer("${faker::class.simpleName}()", renderedProviders).toString() + } else null - println(output) + output?.let { + println(it) + println("\n") + } } override fun run() { - printMatchingFunctions() + val fakerConfig = fakerConfig { locale = options.locale } + fakers(fakerConfig).forEach(::printMatchingFunctions) } } 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 ad50cf198..fbe6bb01f 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 @@ -1,6255 +1,2660 @@ [ - { - "name": "faker.com.fasterxml.jackson.databind.deser.Deserializers[]" - }, - { - "name": "faker.com.fasterxml.jackson.databind.deser.KeyDeserializers[]" - }, - { - "name": "faker.com.fasterxml.jackson.databind.deser.ValueInstantiators[]" - }, - { - "name": "faker.com.fasterxml.jackson.databind.ser.Serializers[]" - }, - { - "name": "io.github.serpro69.kfaker.Faker", - "methods": [ - { - "name": "getAddress", - "parameterTypes": [] - }, - { - "name": "getAdjective", - "parameterTypes": [] - }, - { - "name": "getAirport", - "parameterTypes": [] - }, - { - "name": "getAncient", - "parameterTypes": [] - }, - { - "name": "getAnimal", - "parameterTypes": [] - }, - { - "name": "getApp", - "parameterTypes": [] - }, - { - "name": "getAppliance", - "parameterTypes": [] - }, - { - "name": "getAquaTeenHungerForce", - "parameterTypes": [] - }, - { - "name": "getArcher", - "parameterTypes": [] - }, - { - "name": "getArtist", - "parameterTypes": [] - }, - { - "name": "getAustralia", - "parameterTypes": [] - }, - { - "name": "getAvatar", - "parameterTypes": [] - }, - { - "name": "getBackToTheFuture", - "parameterTypes": [] - }, - { - "name": "getBank", - "parameterTypes": [] - }, - { - "name": "getBarcode", - "parameterTypes": [] - }, - { - "name": "getBasketball", - "parameterTypes": [] - }, - { - "name": "getBeer", - "parameterTypes": [] - }, - { - "name": "getBible", - "parameterTypes": [] - }, - { - "name": "getBigBangTheory", - "parameterTypes": [] - }, - { - "name": "getBird", - "parameterTypes": [] - }, - { - "name": "getBlood", - "parameterTypes": [] - }, - { - "name": "getBojackHorseman", - "parameterTypes": [] - }, - { - "name": "getBook", - "parameterTypes": [] - }, - { - "name": "getBossaNova", - "parameterTypes": [] - }, - { - "name": "getBreakingBad", - "parameterTypes": [] - }, - { - "name": "getBrooklynNineNine", - "parameterTypes": [] - }, - { - "name": "getBuffy", - "parameterTypes": [] - }, - { - "name": "getBusiness", - "parameterTypes": [] - }, - { - "name": "getCamera", - "parameterTypes": [] - }, - { - "name": "getCannabis", - "parameterTypes": [] - }, - { - "name": "getCat", - "parameterTypes": [] - }, - { - "name": "getChess", - "parameterTypes": [] - }, - { - "name": "getChiquito", - "parameterTypes": [] - }, - { - "name": "getChuckNorris", - "parameterTypes": [] - }, - { - "name": "getClashOfClans", - "parameterTypes": [] - }, - { - "name": "getCode", - "parameterTypes": [] - }, - { - "name": "getCoffee", - "parameterTypes": [] - }, - { - "name": "getCoin", - "parameterTypes": [] - }, - { - "name": "getColor", - "parameterTypes": [] - }, - { - "name": "getCommerce", - "parameterTypes": [] - }, - { - "name": "getCommunity", - "parameterTypes": [] - }, - { - "name": "getCompany", - "parameterTypes": [] - }, - { - "name": "getComputer", - "parameterTypes": [] - }, - { - "name": "getConan", - "parameterTypes": [] - }, - { - "name": "getConstruction", - "parameterTypes": [] - }, - { - "name": "getControl", - "parameterTypes": [] - }, - { - "name": "getCosmere", - "parameterTypes": [] - }, - { - "name": "getCowboyBebop", - "parameterTypes": [] - }, - { - "name": "getCrossfit", - "parameterTypes": [] - }, - { - "name": "getCrypto", - "parameterTypes": [] - }, - { - "name": "getCryptoCoin", - "parameterTypes": [] - }, - { - "name": "getCultureSeries", - "parameterTypes": [] - }, - { - "name": "getCurrency", - "parameterTypes": [] - }, - { - "name": "getCurrencySymbol", - "parameterTypes": [] - }, - { - "name": "getDcComics", - "parameterTypes": [] - }, - { - "name": "getDemographic", - "parameterTypes": [] - }, - { - "name": "getDeparted", - "parameterTypes": [] - }, - { - "name": "getDessert", - "parameterTypes": [] - }, - { - "name": "getDevice", - "parameterTypes": [] - }, - { - "name": "getDnd", - "parameterTypes": [] - }, - { - "name": "getDog", - "parameterTypes": [] - }, - { - "name": "getDoraemon", - "parameterTypes": [] - }, - { - "name": "getDota", - "parameterTypes": [] - }, - { - "name": "getDrWho", - "parameterTypes": [] - }, - { - "name": "getDragonBall", - "parameterTypes": [] - }, - { - "name": "getDrivingLicense", - "parameterTypes": [] - }, - { - "name": "getDrone", - "parameterTypes": [] - }, - { - "name": "getDumbAndDumber", - "parameterTypes": [] - }, - { - "name": "getDune", - "parameterTypes": [] - }, - { - "name": "getESport", - "parameterTypes": [] - }, - { - "name": "getEducator", - "parameterTypes": [] - }, - { - "name": "getElderScrolls", - "parameterTypes": [] - }, - { - "name": "getElectricalComponents", - "parameterTypes": [] - }, - { - "name": "getEmotion", - "parameterTypes": [] - }, - { - "name": "getFallout", - "parameterTypes": [] - }, - { - "name": "getFamilyGuy", - "parameterTypes": [] - }, - { - "name": "getFile", - "parameterTypes": [] - }, - { - "name": "getFinalFantasyXIV", - "parameterTypes": [] - }, - { - "name": "getFinalSpace", - "parameterTypes": [] - }, - { - "name": "getFinance", - "parameterTypes": [] - }, - { - "name": "getFmaBrotherhood", - "parameterTypes": [] - }, - { - "name": "getFood", - "parameterTypes": [] - }, - { - "name": "getFootball", - "parameterTypes": [] - }, - { - "name": "getFreshPriceOfBelAir", - "parameterTypes": [] - }, - { - "name": "getFriends", - "parameterTypes": [] - }, - { - "name": "getFunnyName", - "parameterTypes": [] - }, - { - "name": "getFuturama", - "parameterTypes": [] - }, - { - "name": "getGame", - "parameterTypes": [] - }, - { - "name": "getGameOfThrones", - "parameterTypes": [] - }, - { - "name": "getGender", - "parameterTypes": [] - }, - { - "name": "getGhostBusters", - "parameterTypes": [] - }, - { - "name": "getGratefulDead", - "parameterTypes": [] - }, - { - "name": "getGreekPhilosophers", - "parameterTypes": [] - }, - { - "name": "getHacker", - "parameterTypes": [] - }, - { - "name": "getHackers", - "parameterTypes": [] - }, - { - "name": "getHalfLife", - "parameterTypes": [] - }, - { - "name": "getHarryPotter", - "parameterTypes": [] - }, - { - "name": "getHeroes", - "parameterTypes": [] - }, - { - "name": "getHeroesOfTheStorm", - "parameterTypes": [] - }, - { - "name": "getHeyArnold", - "parameterTypes": [] - }, - { - "name": "getHipster", - "parameterTypes": [] - }, - { - "name": "getHitchhikersGuideToTheGalaxy", - "parameterTypes": [] - }, - { - "name": "getHobbit", - "parameterTypes": [] - }, - { - "name": "getHobby", - "parameterTypes": [] - }, - { - "name": "getHorse", - "parameterTypes": [] - }, - { - "name": "getHouse", - "parameterTypes": [] - }, - { - "name": "getHowIMetYourMother", - "parameterTypes": [] - }, - { - "name": "getHowToTrainYourDragon", - "parameterTypes": [] - }, - { - "name": "getIdNumber", - "parameterTypes": [] - }, - { - "name": "getIndustrySegments", - "parameterTypes": [] - }, - { - "name": "getInternet", - "parameterTypes": [] - }, - { - "name": "getJackHandey", - "parameterTypes": [] - }, - { - "name": "getJob", - "parameterTypes": [] - }, - { - "name": "getKPop", - "parameterTypes": [] - }, - { - "name": "getKamenRider", - "parameterTypes": [] - }, - { - "name": "getLeagueOfLegends", - "parameterTypes": [] - }, - { - "name": "getLebowski", - "parameterTypes": [] - }, - { - "name": "getLordOfTheRings", - "parameterTypes": [] - }, - { - "name": "getLorem", - "parameterTypes": [] - }, - { - "name": "getLovecraft", - "parameterTypes": [] - }, - { - "name": "getMarkdown", - "parameterTypes": [] - }, - { - "name": "getMarketing", - "parameterTypes": [] - }, - { - "name": "getMeasurement", - "parameterTypes": [] - }, - { - "name": "getMichaelScott", - "parameterTypes": [] - }, - { - "name": "getMilitary", - "parameterTypes": [] - }, - { - "name": "getMinecraft", - "parameterTypes": [] - }, - { - "name": "getMitchHedberg", - "parameterTypes": [] - }, - { - "name": "getMoney", - "parameterTypes": [] - }, - { - "name": "getMountain", - "parameterTypes": [] - }, - { - "name": "getMountaineering", - "parameterTypes": [] - }, - { - "name": "getMovie", - "parameterTypes": [] - }, - { - "name": "getMusic", - "parameterTypes": [] - }, - { - "name": "getMyst", - "parameterTypes": [] - }, - { - "name": "getName", - "parameterTypes": [] - }, - { - "name": "getNaruto", - "parameterTypes": [] - }, - { - "name": "getNation", - "parameterTypes": [] - }, - { - "name": "getNatoPhoneticAlphabet", - "parameterTypes": [] - }, - { - "name": "getNewGirl", - "parameterTypes": [] - }, - { - "name": "getOnePiece", - "parameterTypes": [] - }, - { - "name": "getOpera", - "parameterTypes": [] - }, - { - "name": "getOverwatch", - "parameterTypes": [] - }, - { - "name": "getParksAndRec", - "parameterTypes": [] - }, - { - "name": "getPearlJam", - "parameterTypes": [] - }, - { - "name": "getPhish", - "parameterTypes": [] - }, - { - "name": "getPhoneNumber", - "parameterTypes": [] - }, - { - "name": "getPokemon", - "parameterTypes": [] - }, - { - "name": "getPrince", - "parameterTypes": [] - }, - { - "name": "getPrincessBride", - "parameterTypes": [] - }, - { - "name": "getProgrammingLanguage", - "parameterTypes": [] - }, - { - "name": "getQuote", - "parameterTypes": [] - }, - { - "name": "getRajnikanth", - "parameterTypes": [] - }, - { - "name": "getRelationship", - "parameterTypes": [] - }, - { - "name": "getRestaurant", - "parameterTypes": [] - }, - { - "name": "getRickAndMorty", - "parameterTypes": [] - }, - { - "name": "getRockBand", - "parameterTypes": [] - }, - { - "name": "getRoom", - "parameterTypes": [] - }, - { - "name": "getRupaul", - "parameterTypes": [] - }, - { - "name": "getRush", - "parameterTypes": [] - }, - { - "name": "getScience", - "parameterTypes": [] - }, - { - "name": "getSeinfeld", - "parameterTypes": [] - }, - { - "name": "getSeparator", - "parameterTypes": [] - }, - { - "name": "getShakespeare", - "parameterTypes": [] - }, - { - "name": "getShow", - "parameterTypes": [] - }, - { - "name": "getSiliconValley", - "parameterTypes": [] - }, - { - "name": "getSimpsons", - "parameterTypes": [] - }, - { - "name": "getSlackEmoji", - "parameterTypes": [] - }, - { - "name": "getSmashingPumpkins", - "parameterTypes": [] - }, - { - "name": "getSonicTheHedgehog", - "parameterTypes": [] - }, - { - "name": "getSouthPark", - "parameterTypes": [] - }, - { - "name": "getSpace", - "parameterTypes": [] - }, - { - "name": "getSpongebob", - "parameterTypes": [] - }, - { - "name": "getSport", - "parameterTypes": [] - }, - { - "name": "getStarTrek", - "parameterTypes": [] - }, - { - "name": "getStarWars", - "parameterTypes": [] - }, - { - "name": "getStargate", - "parameterTypes": [] - }, - { - "name": "getStrangerThings", - "parameterTypes": [] - }, - { - "name": "getStreetFighter", - "parameterTypes": [] - }, - { - "name": "getStripe", - "parameterTypes": [] - }, - { - "name": "getStudioGhibli", - "parameterTypes": [] - }, - { - "name": "getSubscription", - "parameterTypes": [] - }, - { - "name": "getSuits", - "parameterTypes": [] - }, - { - "name": "getSuperMario", - "parameterTypes": [] - }, - { - "name": "getSuperSmashBros", - "parameterTypes": [] - }, - { - "name": "getSuperhero", - "parameterTypes": [] - }, - { - "name": "getSupernatural", - "parameterTypes": [] - }, - { - "name": "getSwordArtOnline", - "parameterTypes": [] - }, - { - "name": "getTarkov", - "parameterTypes": [] - }, - { - "name": "getTea", - "parameterTypes": [] - }, - { - "name": "getTeam", - "parameterTypes": [] - }, - { - "name": "getTheExpanse", - "parameterTypes": [] - }, - { - "name": "getTheITCrowd", - "parameterTypes": [] - }, - { - "name": "getTheKingkillerChronicle", - "parameterTypes": [] - }, - { - "name": "getTheOffice", - "parameterTypes": [] - }, - { - "name": "getTheRoom", - "parameterTypes": [] - }, - { - "name": "getTheThickOfIt", - "parameterTypes": [] - }, - { - "name": "getTolkien", - "parameterTypes": [] - }, - { - "name": "getTouhou", - "parameterTypes": [] - }, - { - "name": "getTrainStation", - "parameterTypes": [] - }, - { - "name": "getTron", - "parameterTypes": [] - }, - { - "name": "getTwinPeaks", - "parameterTypes": [] - }, - { - "name": "getUmphreysMcgee", - "parameterTypes": [] - }, - { - "name": "getUniversity", - "parameterTypes": [] - }, - { - "name": "getVForVendetta", - "parameterTypes": [] - }, - { - "name": "getVehicle", - "parameterTypes": [] - }, - { - "name": "getVentureBros", - "parameterTypes": [] - }, - { - "name": "getVerbs", - "parameterTypes": [] - }, - { - "name": "getVolleyball", - "parameterTypes": [] - }, - { - "name": "getWarhammerFantasy", - "parameterTypes": [] - }, - { - "name": "getWitcher", - "parameterTypes": [] - }, - { - "name": "getWorldCup", - "parameterTypes": [] - }, - { - "name": "getWorldOfWarcraft", - "parameterTypes": [] - }, - { - "name": "getYoda", - "parameterTypes": [] - }, - { - "name": "getZelda", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.Faker$Builder" - }, - { - "name": "io.github.serpro69.kfaker.FakerConfig" - }, - { - "name": "io.github.serpro69.kfaker.FakerService" - }, - { - "name": "io.github.serpro69.kfaker.RandomService" - }, - { - "name": "io.github.serpro69.kfaker.app.KFaker", - "allDeclaredFields": true, - "allDeclaredMethods": true - }, - { - "name": "io.github.serpro69.kfaker.app.subcommands.CommandOptions", - "allDeclaredFields": true, - "allDeclaredMethods": true - }, - { - "name": "io.github.serpro69.kfaker.app.subcommands.List", - "allDeclaredFields": true, - "allDeclaredMethods": true, - "methods": [ - { - "name": "", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.app.subcommands.Lookup", - "allDeclaredFields": true, - "allDeclaredMethods": true, - "methods": [ - { - "name": "", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.dictionary.Category" - }, - { - "name": "io.github.serpro69.kfaker.dictionary.YamlCategory" - }, - { - "name": "io.github.serpro69.kfaker.provider.AbstractFakeDataProvider" - }, - { - "name": "io.github.serpro69.kfaker.provider.Address", - "allDeclaredFields": true, - "allDeclaredMethods": true, - "allDeclaredConstructors": true - }, - { - "name": "io.github.serpro69.kfaker.provider.Adjective", - "methods": [ - { - "name": "negative", - "parameterTypes": [] - }, - { - "name": "positive", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.Airport", - "methods": [ - { - "name": "getEuropeanUnion", - "parameterTypes": [] - }, - { - "name": "getUnitedStates", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.Ancient", - "methods": [ - { - "name": "god", - "parameterTypes": [] - }, - { - "name": "hero", - "parameterTypes": [] - }, - { - "name": "primordial", - "parameterTypes": [] - }, - { - "name": "titan", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.Animal", - "methods": [ - { - "name": "name", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.App", - "methods": [ - { - "name": "author", - "parameterTypes": [] - }, - { - "name": "name", - "parameterTypes": [] - }, - { - "name": "version", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.Appliance", - "methods": [ - { - "name": "brand", - "parameterTypes": [] - }, - { - "name": "equipment", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.AquaTeenHungerForce", - "methods": [ - { - "name": "character", - "parameterTypes": [] - }, - { - "name": "quote", - "parameterTypes": [] - } - ] - }, - { - "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": [ - { - "name": "names", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.Australia", - "methods": [ - { - "name": "animals", - "parameterTypes": [] - }, - { - "name": "locations", - "parameterTypes": [] - }, - { - "name": "states", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.Avatar", - "methods": [ - { - "name": "characters", - "parameterTypes": [] - }, - { - "name": "dates", - "parameterTypes": [] - }, - { - "name": "quotes", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.BackToTheFuture", - "methods": [ - { - "name": "characters", - "parameterTypes": [] - }, - { - "name": "dates", - "parameterTypes": [] - }, - { - "name": "quotes", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.Bank", - "methods": [ - { - "name": "ibanDetails", - "parameterTypes": [ - "java.lang.String" - ] - }, - { - "name": "name", - "parameterTypes": [] - }, - { - "name": "swiftBic", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.Barcode", - "methods": [ - { - "name": "compositeSymbol", - "parameterTypes": [] - }, - { - "name": "ean13", - "parameterTypes": [] - }, - { - "name": "ean8", - "parameterTypes": [] - }, - { - "name": "isbn", - "parameterTypes": [] - }, - { - "name": "ismn", - "parameterTypes": [] - }, - { - "name": "issn", - "parameterTypes": [] - }, - { - "name": "upcA", - "parameterTypes": [] - }, - { - "name": "upcE", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.Basketball", - "methods": [ - { - "name": "coaches", - "parameterTypes": [] - }, - { - "name": "players", - "parameterTypes": [] - }, - { - "name": "positions", - "parameterTypes": [] - }, - { - "name": "teams", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.Beer", - "methods": [ - { - "name": "brand", - "parameterTypes": [] - }, - { - "name": "hop", - "parameterTypes": [] - }, - { - "name": "malt", - "parameterTypes": [] - }, - { - "name": "name", - "parameterTypes": [] - }, - { - "name": "style", - "parameterTypes": [] - }, - { - "name": "yeast", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.Bible", - "methods": [ - { - "name": "character", - "parameterTypes": [] - }, - { - "name": "location", - "parameterTypes": [] - }, - { - "name": "quote", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.BigBangTheory", - "methods": [ - { - "name": "characters", - "parameterTypes": [] - }, - { - "name": "quotes", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.Bird", - "methods": [ - { - "name": "adjectives", - "parameterTypes": [] - }, - { - "name": "anatomy", - "parameterTypes": [] - }, - { - "name": "anatomyPastTense", - "parameterTypes": [] - }, - { - "name": "colors", - "parameterTypes": [] - }, - { - "name": "commonFamilyName", - "parameterTypes": [] - }, - { - "name": "emotionalAdjectives", - "parameterTypes": [] - }, - { - "name": "geo", - "parameterTypes": [] - }, - { - "name": "getOrderCommonMap", - "parameterTypes": [] - }, - { - "name": "implausibleCommonNames", - "parameterTypes": [] - }, - { - "name": "plausibleCommonNames", - "parameterTypes": [] - }, - { - "name": "sillyAdjectives", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.BirdOrderCommonMap", - "methods": [ - { - "name": "accipitriformes", - "parameterTypes": [] - }, - { - "name": "anseriformes", - "parameterTypes": [] - }, - { - "name": "apterygiformes", - "parameterTypes": [] - }, - { - "name": "bucerotiformes", - "parameterTypes": [] - }, - { - "name": "caprimulgiformes", - "parameterTypes": [] - }, - { - "name": "cariamiformes", - "parameterTypes": [] - }, - { - "name": "casuariiformes", - "parameterTypes": [] - }, - { - "name": "cathartiformes", - "parameterTypes": [] - }, - { - "name": "charadriiformes", - "parameterTypes": [] - }, - { - "name": "ciconiiformes", - "parameterTypes": [] - }, - { - "name": "coliiformes", - "parameterTypes": [] - }, - { - "name": "columbiformes", - "parameterTypes": [] - }, - { - "name": "coraciiformes", - "parameterTypes": [] - }, - { - "name": "cuculiformes", - "parameterTypes": [] - }, - { - "name": "eurypygiformes", - "parameterTypes": [] - }, - { - "name": "falconiformes", - "parameterTypes": [] - }, - { - "name": "galbuliformes", - "parameterTypes": [] - }, - { - "name": "galliformes", - "parameterTypes": [] - }, - { - "name": "gaviiformes", - "parameterTypes": [] - }, - { - "name": "gruiformes", - "parameterTypes": [] - }, - { - "name": "mesitornithiformes", - "parameterTypes": [] - }, - { - "name": "musophagiformes", - "parameterTypes": [] - }, - { - "name": "opisthocomiformes", - "parameterTypes": [] - }, - { - "name": "otidiformes", - "parameterTypes": [] - }, - { - "name": "passeriformes", - "parameterTypes": [] - }, - { - "name": "pelecaniformes", - "parameterTypes": [] - }, - { - "name": "phaethontiformes", - "parameterTypes": [] - }, - { - "name": "phoenicopteriformes", - "parameterTypes": [] - }, - { - "name": "piciformes", - "parameterTypes": [] - }, - { - "name": "podicipediformes", - "parameterTypes": [] - }, - { - "name": "procellariiformes", - "parameterTypes": [] - }, - { - "name": "psittaciformes", - "parameterTypes": [] - }, - { - "name": "pterocliformes", - "parameterTypes": [] - }, - { - "name": "rheiformes", - "parameterTypes": [] - }, - { - "name": "sphenisciformes", - "parameterTypes": [] - }, - { - "name": "strigiformes", - "parameterTypes": [] - }, - { - "name": "struthioniformes", - "parameterTypes": [] - }, - { - "name": "suliformes", - "parameterTypes": [] - }, - { - "name": "tinamiformes", - "parameterTypes": [] - }, - { - "name": "trogoniformes", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.Blood", - "methods": [ - { - "name": "group", - "parameterTypes": [] - }, - { - "name": "rhFactor", - "parameterTypes": [] - }, - { - "name": "type", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.BojackHorseman", - "methods": [ - { - "name": "characters", - "parameterTypes": [] - }, - { - "name": "quotes", - "parameterTypes": [] - }, - { - "name": "tongueTwisters", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.Book", - "methods": [ - { - "name": "author", - "parameterTypes": [] - }, - { - "name": "genre", - "parameterTypes": [] - }, - { - "name": "publisher", - "parameterTypes": [] - }, - { - "name": "title", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.BossaNova", - "methods": [ - { - "name": "artists", - "parameterTypes": [] - }, - { - "name": "songs", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.BreakingBad", - "methods": [ - { - "name": "character", - "parameterTypes": [] - }, - { - "name": "episode", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.BrooklynNineNine", - "methods": [ - { - "name": "characters", - "parameterTypes": [] - }, - { - "name": "quotes", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.Buffy", - "allDeclaredFields": true, - "allDeclaredMethods": true, - "allDeclaredConstructors": true - }, - { - "name": "io.github.serpro69.kfaker.provider.Business", - "methods": [ - { - "name": "creditCardNumbers", - "parameterTypes": [] - }, - { - "name": "creditCardTypes", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.Camera", - "methods": [ - { - "name": "brand", - "parameterTypes": [] - }, - { - "name": "brandWithModel", - "parameterTypes": [] - }, - { - "name": "model", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.Cannabis", - "methods": [ - { - "name": "brands", - "parameterTypes": [] - }, - { - "name": "cannabinoidAbbreviations", - "parameterTypes": [] - }, - { - "name": "cannabinoids", - "parameterTypes": [] - }, - { - "name": "categories", - "parameterTypes": [] - }, - { - "name": "healthBenefits", - "parameterTypes": [] - }, - { - "name": "medicalUses", - "parameterTypes": [] - }, - { - "name": "strains", - "parameterTypes": [] - }, - { - "name": "terpenes", - "parameterTypes": [] - }, - { - "name": "types", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.Cat", - "methods": [ - { - "name": "breed", - "parameterTypes": [] - }, - { - "name": "name", - "parameterTypes": [] - }, - { - "name": "registry", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.CellPhone", - "methods": [ - { - "name": "number", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.Chess", - "methods": [ - { - "name": "openings", - "parameterTypes": [] - }, - { - "name": "players", - "parameterTypes": [] - }, - { - "name": "titles", - "parameterTypes": [] - }, - { - "name": "tournaments", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.Chiquito", - "methods": [ - { - "name": "expressions", - "parameterTypes": [] - }, - { - "name": "jokes", - "parameterTypes": [] - }, - { - "name": "sentences", - "parameterTypes": [] - }, - { - "name": "terms", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.ChuckNorris", - "methods": [ - { - "name": "fact", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.ClashOfClans", - "methods": [ - { - "name": "defensiveBuildings", - "parameterTypes": [] - }, - { - "name": "ranks", - "parameterTypes": [] - }, - { - "name": "troops", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.Code", - "methods": [ - { - "name": "asin", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.Coffee", - "methods": [ - { - "name": "blendName", - "parameterTypes": [] - }, - { - "name": "country", - "parameterTypes": [] - }, - { - "name": "notes", - "parameterTypes": [] - }, - { - "name": "regions", - "parameterTypes": [ - "java.lang.String" - ] - }, - { - "name": "variety", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.Coin", - "methods": [ - { - "name": "flip", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.Color", - "methods": [ - { - "name": "name", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.Commerce", - "methods": [ - { - "name": "brand", - "parameterTypes": [] - }, - { - "name": "department", - "parameterTypes": [] - }, - { - "name": "productName", - "parameterTypes": [] - }, - { - "name": "promotionCode", - "parameterTypes": [] - }, - { - "name": "vendor", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.Community", - "methods": [ - { - "name": "characters", - "parameterTypes": [] - }, - { - "name": "quotes", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.Company", - "methods": [ - { - "name": "bs", - "parameterTypes": [] - }, - { - "name": "buzzwords", - "parameterTypes": [] - }, - { - "name": "department", - "parameterTypes": [] - }, - { - "name": "industry", - "parameterTypes": [] - }, - { - "name": "name", - "parameterTypes": [] - }, - { - "name": "profession", - "parameterTypes": [] - }, - { - "name": "sicCode", - "parameterTypes": [] - }, - { - "name": "type", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.Computer", - "allDeclaredFields": true, - "allDeclaredMethods": true, - "allDeclaredConstructors": true - }, - { - "name": "io.github.serpro69.kfaker.provider.ComputerOS", - "methods": [ - { - "name": "linux", - "parameterTypes": [] - }, - { - "name": "macOS", - "parameterTypes": [] - }, - { - "name": "openBsd", - "parameterTypes": [] - }, - { - "name": "plan9", - "parameterTypes": [] - }, - { - "name": "templeOS", - "parameterTypes": [] - }, - { - "name": "windows", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.Conan", - "methods": [ - { - "name": "characters", - "parameterTypes": [] - }, - { - "name": "gadgets", - "parameterTypes": [] - }, - { - "name": "vehicles", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.Construction", - "methods": [ - { - "name": "materials", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.Control", - "methods": [ - { - "name": "alteredItem", - "parameterTypes": [] - }, - { - "name": "alteredWorldEvent", - "parameterTypes": [] - }, - { - "name": "character", - "parameterTypes": [] - }, - { - "name": "hiss", - "parameterTypes": [] - }, - { - "name": "location", - "parameterTypes": [] - }, - { - "name": "objectOfPower", - "parameterTypes": [] - }, - { - "name": "quote", - "parameterTypes": [] - }, - { - "name": "theBoard", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.Cosmere", - "methods": [ - { - "name": "allomancers", - "parameterTypes": [] - }, - { - "name": "aons", - "parameterTypes": [] - }, - { - "name": "feruchemists", - "parameterTypes": [] - }, - { - "name": "knightsRadiant", - "parameterTypes": [] - }, - { - "name": "metals", - "parameterTypes": [] - }, - { - "name": "shardWorlds", - "parameterTypes": [] - }, - { - "name": "shards", - "parameterTypes": [] - }, - { - "name": "surges", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.CountryCode", - "methods": [ - { - "name": "code", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.CowboyBebop", - "methods": [ - { - "name": "character", - "parameterTypes": [] - }, - { - "name": "episode", - "parameterTypes": [] - }, - { - "name": "quote", - "parameterTypes": [] - }, - { - "name": "song", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.Crossfit", - "methods": [ - { - "name": "competitions", - "parameterTypes": [] - }, - { - "name": "femaleAthletes", - "parameterTypes": [] - }, - { - "name": "girlWorkouts", - "parameterTypes": [] - }, - { - "name": "heroWorkouts", - "parameterTypes": [] - }, - { - "name": "maleAthletes", - "parameterTypes": [] - }, - { - "name": "movements", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.CryptoCoin", - "methods": [ - { - "name": "coin", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.CultureSeries", - "methods": [ - { - "name": "books", - "parameterTypes": [] - }, - { - "name": "civs", - "parameterTypes": [] - }, - { - "name": "cultureShipClassAbvs", - "parameterTypes": [] - }, - { - "name": "cultureShipClasses", - "parameterTypes": [] - }, - { - "name": "cultureShips", - "parameterTypes": [] - }, - { - "name": "planets", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.Currency", - "methods": [ - { - "name": "code", - "parameterTypes": [] - }, - { - "name": "name", - "parameterTypes": [] - }, - { - "name": "symbol", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.CurrencySymbol", - "methods": [ - { - "name": "symbol", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.DcComics", - "methods": [ - { - "name": "hero", - "parameterTypes": [] - }, - { - "name": "heroine", - "parameterTypes": [] - }, - { - "name": "name", - "parameterTypes": [] - }, - { - "name": "title", - "parameterTypes": [] - }, - { - "name": "villain", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.Degree", - "methods": [ - { - "name": "courseNumber", - "parameterTypes": [] - }, - { - "name": "type", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.Demographic", - "methods": [ - { - "name": "demonym", - "parameterTypes": [] - }, - { - "name": "educationalAttainment", - "parameterTypes": [] - }, - { - "name": "maritalStatus", - "parameterTypes": [] - }, - { - "name": "race", - "parameterTypes": [] - }, - { - "name": "sex", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.Departed", - "methods": [ - { - "name": "actors", - "parameterTypes": [] - }, - { - "name": "characters", - "parameterTypes": [] - }, - { - "name": "quotes", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.Dessert", - "methods": [ - { - "name": "dessert", - "parameterTypes": [] - }, - { - "name": "flavor", - "parameterTypes": [] - }, - { - "name": "topping", - "parameterTypes": [] - }, - { - "name": "variety", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.Device", - "methods": [ - { - "name": "manufacturer", - "parameterTypes": [] - }, - { - "name": "modelName", - "parameterTypes": [] - }, - { - "name": "platform", - "parameterTypes": [] - }, - { - "name": "serial", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.DnD", - "methods": [ - { - "name": "alignments", - "parameterTypes": [] - }, - { - "name": "backgrounds", - "parameterTypes": [] - }, - { - "name": "cities", - "parameterTypes": [] - }, - { - "name": "getName", - "parameterTypes": [] - }, - { - "name": "klasses", - "parameterTypes": [] - }, - { - "name": "languages", - "parameterTypes": [] - }, - { - "name": "meleeWeapons", - "parameterTypes": [] - }, - { - "name": "monsters", - "parameterTypes": [] - }, - { - "name": "races", - "parameterTypes": [] - }, - { - "name": "rangedWeapons", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.DndName", - "methods": [ - { - "name": "firstName", - "parameterTypes": [] - }, - { - "name": "lastName", - "parameterTypes": [] - }, - { - "name": "title", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.Dog", - "methods": [ - { - "name": "age", - "parameterTypes": [] - }, - { - "name": "breed", - "parameterTypes": [] - }, - { - "name": "coatLength", - "parameterTypes": [] - }, - { - "name": "memePhrase", - "parameterTypes": [] - }, - { - "name": "name", - "parameterTypes": [] - }, - { - "name": "size", - "parameterTypes": [] - }, - { - "name": "sound", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.Doraemon", - "methods": [ - { - "name": "characters", - "parameterTypes": [] - }, - { - "name": "gadgets", - "parameterTypes": [] - }, - { - "name": "locations", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.Dota", - "allDeclaredFields": true, - "allDeclaredMethods": true, - "allDeclaredConstructors": true - }, - { - "name": "io.github.serpro69.kfaker.provider.DrWho", - "methods": [ - { - "name": "actors", - "parameterTypes": [] - }, - { - "name": "catchPhrases", - "parameterTypes": [] - }, - { - "name": "character", - "parameterTypes": [] - }, - { - "name": "quotes", - "parameterTypes": [] - }, - { - "name": "species", - "parameterTypes": [] - }, - { - "name": "theDoctors", - "parameterTypes": [] - }, - { - "name": "villains", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.DragonBall", - "methods": [ - { - "name": "characters", - "parameterTypes": [] - }, - { - "name": "planets", - "parameterTypes": [] - }, - { - "name": "races", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.DrivingLicense", - "methods": [ - { - "name": "license", - "parameterTypes": [] - }, - { - "name": "licenseByState", - "parameterTypes": [ - "java.lang.String" - ] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.Drone", - "methods": [ - { - "name": "batteryCapacity", - "parameterTypes": [] - }, - { - "name": "batteryType", - "parameterTypes": [] - }, - { - "name": "batteryVoltage", - "parameterTypes": [] - }, - { - "name": "batteryWeight", - "parameterTypes": [] - }, - { - "name": "chargingTemperature", - "parameterTypes": [] - }, - { - "name": "flightTime", - "parameterTypes": [] - }, - { - "name": "iso", - "parameterTypes": [] - }, - { - "name": "maxAltitude", - "parameterTypes": [] - }, - { - "name": "maxAngularVelocity", - "parameterTypes": [] - }, - { - "name": "maxAscentSpeed", - "parameterTypes": [] - }, - { - "name": "maxChargingPower", - "parameterTypes": [] - }, - { - "name": "maxDescentSpeed", - "parameterTypes": [] - }, - { - "name": "maxFlightDistance", - "parameterTypes": [] - }, - { - "name": "maxResolution", - "parameterTypes": [] - }, - { - "name": "maxShutterSpeed", - "parameterTypes": [] - }, - { - "name": "maxSpeed", - "parameterTypes": [] - }, - { - "name": "maxTiltAngle", - "parameterTypes": [] - }, - { - "name": "maxWindResistance", - "parameterTypes": [] - }, - { - "name": "minShutterSpeed", - "parameterTypes": [] - }, - { - "name": "name", - "parameterTypes": [] - }, - { - "name": "operatingTemperature", - "parameterTypes": [] - }, - { - "name": "photoFormat", - "parameterTypes": [] - }, - { - "name": "shutterSpeedUnits", - "parameterTypes": [] - }, - { - "name": "videoFormat", - "parameterTypes": [] - }, - { - "name": "weight", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.DumbAndDumber", - "methods": [ - { - "name": "actors", - "parameterTypes": [] - }, - { - "name": "characters", - "parameterTypes": [] - }, - { - "name": "quotes", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.Dune", - "methods": [ - { - "name": "quotes", - "parameterTypes": [ - "io.github.serpro69.kfaker.provider.DuneQuoteCharacter" - ] - }, - { - "name": "quotes$default", - "parameterTypes": [ - "io.github.serpro69.kfaker.provider.Dune", - "io.github.serpro69.kfaker.provider.DuneQuoteCharacter", - "int", - "java.lang.Object" - ] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.DuneQuoteCharacter" - }, - { - "name": "io.github.serpro69.kfaker.provider.ESport", - "methods": [ - { - "name": "events", - "parameterTypes": [] - }, - { - "name": "games", - "parameterTypes": [] - }, - { - "name": "leagues", - "parameterTypes": [] - }, - { - "name": "players", - "parameterTypes": [] - }, - { - "name": "teams", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.Educator", - "allDeclaredFields": true, - "allDeclaredMethods": true, - "allDeclaredConstructors": true - }, - { - "name": "io.github.serpro69.kfaker.provider.ElderScrolls", - "methods": [ - { - "name": "city", - "parameterTypes": [] - }, - { - "name": "creature", - "parameterTypes": [] - }, - { - "name": "dragon", - "parameterTypes": [] - }, - { - "name": "firstName", - "parameterTypes": [] - }, - { - "name": "jewelry", - "parameterTypes": [] - }, - { - "name": "lastName", - "parameterTypes": [] - }, - { - "name": "race", - "parameterTypes": [] - }, - { - "name": "region", - "parameterTypes": [] - }, - { - "name": "weapon", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.ElectricalComponents", - "methods": [ - { - "name": "active", - "parameterTypes": [] - }, - { - "name": "electromechanical", - "parameterTypes": [] - }, - { - "name": "passive", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.Emotion", - "methods": [ - { - "name": "adjective", - "parameterTypes": [] - }, - { - "name": "noun", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.EuropeanUnion", - "methods": [ - { - "name": "large", - "parameterTypes": [] - }, - { - "name": "medium", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.FakeDataProvider" - }, - { - "name": "io.github.serpro69.kfaker.provider.Fallout", - "methods": [ - { - "name": "characters", - "parameterTypes": [] - }, - { - "name": "factions", - "parameterTypes": [] - }, - { - "name": "locations", - "parameterTypes": [] - }, - { - "name": "quotes", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.FamilyGuy", - "methods": [ - { - "name": "character", - "parameterTypes": [] - }, - { - "name": "location", - "parameterTypes": [] - }, - { - "name": "quote", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.File", - "allDeclaredFields": true, - "allDeclaredMethods": true, - "allDeclaredConstructors": true - }, - { - "name": "io.github.serpro69.kfaker.provider.FileMimeType", - "methods": [ - { - "name": "application", - "parameterTypes": [] - }, - { - "name": "audio", - "parameterTypes": [] - }, - { - "name": "image", - "parameterTypes": [] - }, - { - "name": "message", - "parameterTypes": [] - }, - { - "name": "model", - "parameterTypes": [] - }, - { - "name": "multipart", - "parameterTypes": [] - }, - { - "name": "text", - "parameterTypes": [] - }, - { - "name": "video", - "parameterTypes": [] - } - ] - }, - { - "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": [ - { - "name": "characters", - "parameterTypes": [] - }, - { - "name": "quotes", - "parameterTypes": [] - }, - { - "name": "vehicles", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.Finance", - "methods": [ - { - "name": "condominiumFiscalCode", - "parameterTypes": [] - }, - { - "name": "creditCard", - "parameterTypes": [ - "java.lang.String" - ] - }, - { - "name": "stockMarket", - "parameterTypes": [] - }, - { - "name": "ticker", - "parameterTypes": [ - "io.github.serpro69.kfaker.provider.StockExchange" - ] - }, - { - "name": "ticker$default", - "parameterTypes": [ - "io.github.serpro69.kfaker.provider.Finance", - "io.github.serpro69.kfaker.provider.StockExchange", - "int", - "java.lang.Object" - ] - }, - { - "name": "vatNumber", - "parameterTypes": [ - "java.lang.String" - ] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.FmaBrotherhood", - "methods": [ - { - "name": "characters", - "parameterTypes": [] - }, - { - "name": "cities", - "parameterTypes": [] - }, - { - "name": "countries", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.Food", - "methods": [ - { - "name": "allergens", - "parameterTypes": [] - }, - { - "name": "descriptions", - "parameterTypes": [] - }, - { - "name": "dish", - "parameterTypes": [] - }, - { - "name": "ethnicCategory", - "parameterTypes": [] - }, - { - "name": "fruits", - "parameterTypes": [] - }, - { - "name": "ingredients", - "parameterTypes": [] - }, - { - "name": "measurementSizes", - "parameterTypes": [] - }, - { - "name": "measurements", - "parameterTypes": [] - }, - { - "name": "metricMeasurements", - "parameterTypes": [] - }, - { - "name": "spices", - "parameterTypes": [] - }, - { - "name": "sushi", - "parameterTypes": [] - }, - { - "name": "vegetables", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.Football", - "methods": [ - { - "name": "coaches", - "parameterTypes": [] - }, - { - "name": "competitions", - "parameterTypes": [] - }, - { - "name": "players", - "parameterTypes": [] - }, - { - "name": "positions", - "parameterTypes": [] - }, - { - "name": "teams", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.FrenchOpera", - "methods": [ - { - "name": "byCamilleSaintSaens", - "parameterTypes": [] - }, - { - "name": "byCharlesGounod", - "parameterTypes": [] - }, - { - "name": "byChristophWillibaldGluck", - "parameterTypes": [] - }, - { - "name": "byGeorgesBizet", - "parameterTypes": [] - }, - { - "name": "byHectorBerlioz", - "parameterTypes": [] - }, - { - "name": "byMauriceRavel", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.FreshPriceOfBelAir", - "allDeclaredFields": true, - "allDeclaredMethods": true, - "allDeclaredConstructors": true - }, - { - "name": "io.github.serpro69.kfaker.provider.Friends", - "methods": [ - { - "name": "characters", - "parameterTypes": [] - }, - { - "name": "locations", - "parameterTypes": [] - }, - { - "name": "quotes", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.FunnyName", - "methods": [ - { - "name": "name", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.Futurama", - "methods": [ - { - "name": "characters", - "parameterTypes": [] - }, - { - "name": "hermesCatchphrases", - "parameterTypes": [] - }, - { - "name": "locations", - "parameterTypes": [] - }, - { - "name": "quotes", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.Game", - "methods": [ - { - "name": "title", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.GameOfThrones", - "methods": [ - { - "name": "characters", - "parameterTypes": [] - }, - { - "name": "cities", - "parameterTypes": [] - }, - { - "name": "dragons", - "parameterTypes": [] - }, - { - "name": "houses", - "parameterTypes": [] - }, - { - "name": "quotes", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.Gender", - "methods": [ - { - "name": "binaryTypes", - "parameterTypes": [] - }, - { - "name": "shortBinaryTypes", - "parameterTypes": [] - }, - { - "name": "types", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.GermanOpera", - "methods": [ - { - "name": "byAlbanBerg", - "parameterTypes": [] - }, - { - "name": "byCarlMariaVonWeber", - "parameterTypes": [] - }, - { - "name": "byFranzSchubert", - "parameterTypes": [] - }, - { - "name": "byLudwigVanBeethoven", - "parameterTypes": [] - }, - { - "name": "byRichardStrauss", - "parameterTypes": [] - }, - { - "name": "byRichardWagner", - "parameterTypes": [] - }, - { - "name": "byRobertSchumann", - "parameterTypes": [] - }, - { - "name": "byWolfgangAmadeusMozart", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.GhostBusters", - "methods": [ - { - "name": "actors", - "parameterTypes": [] - }, - { - "name": "characters", - "parameterTypes": [] - }, - { - "name": "quotes", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.GratefulDead", - "methods": [ - { - "name": "players", - "parameterTypes": [] - }, - { - "name": "songs", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.GreekPhilosophers", - "methods": [ - { - "name": "names", - "parameterTypes": [] - }, - { - "name": "quotes", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.Hacker", - "methods": [ - { - "name": "abbreviation", - "parameterTypes": [] - }, - { - "name": "adjective", - "parameterTypes": [] - }, - { - "name": "ingverb", - "parameterTypes": [] - }, - { - "name": "noun", - "parameterTypes": [] - }, - { - "name": "verb", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.Hackers", - "methods": [ - { - "name": "characters", - "parameterTypes": [] - }, - { - "name": "handles", - "parameterTypes": [] - }, - { - "name": "quotes", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.HalfLife", - "methods": [ - { - "name": "character", - "parameterTypes": [] - }, - { - "name": "enemy", - "parameterTypes": [] - }, - { - "name": "location", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.HarryPotter", - "methods": [ - { - "name": "books", - "parameterTypes": [] - }, - { - "name": "characters", - "parameterTypes": [] - }, - { - "name": "houses", - "parameterTypes": [] - }, - { - "name": "locations", - "parameterTypes": [] - }, - { - "name": "quotes", - "parameterTypes": [] - }, - { - "name": "spells", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.Heroes", - "methods": [ - { - "name": "artifacts", - "parameterTypes": [] - }, - { - "name": "klasses", - "parameterTypes": [] - }, - { - "name": "names", - "parameterTypes": [] - }, - { - "name": "specialties", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.HeroesOfTheStorm", - "methods": [ - { - "name": "battlegrounds", - "parameterTypes": [] - }, - { - "name": "classNames", - "parameterTypes": [] - }, - { - "name": "heroes", - "parameterTypes": [] - }, - { - "name": "quotes", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.HeyArnold", - "methods": [ - { - "name": "characters", - "parameterTypes": [] - }, - { - "name": "locations", - "parameterTypes": [] - }, - { - "name": "quotes", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.HipHop", - "methods": [ - { - "name": "artist", - "parameterTypes": [] - }, - { - "name": "groups", - "parameterTypes": [] - }, - { - "name": "subgenres", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.Hipster", - "methods": [ - { - "name": "words", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.HitchhikersGuideToTheGalaxy", - "methods": [ - { - "name": "characters", - "parameterTypes": [] - }, - { - "name": "locations", - "parameterTypes": [] - }, - { - "name": "marvinQuote", - "parameterTypes": [] - }, - { - "name": "planets", - "parameterTypes": [] - }, - { - "name": "quotes", - "parameterTypes": [] - }, - { - "name": "species", - "parameterTypes": [] - }, - { - "name": "starships", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.Hobbit", - "methods": [ - { - "name": "character", - "parameterTypes": [] - }, - { - "name": "location", - "parameterTypes": [] - }, - { - "name": "quote", - "parameterTypes": [] - }, - { - "name": "thorinsCompany", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.Hobby", - "methods": [ - { - "name": "activity", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.Horse", - "methods": [ - { - "name": "breed", - "parameterTypes": [] - }, - { - "name": "name", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.House", - "methods": [ - { - "name": "furniture", - "parameterTypes": [] - }, - { - "name": "rooms", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.HowIMetYourMother", - "methods": [ - { - "name": "catchPhrase", - "parameterTypes": [] - }, - { - "name": "character", - "parameterTypes": [] - }, - { - "name": "highFive", - "parameterTypes": [] - }, - { - "name": "quote", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.HowToTrainYourDragon", - "methods": [ - { - "name": "characters", - "parameterTypes": [] - }, - { - "name": "dragons", - "parameterTypes": [] - }, - { - "name": "locations", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.IataCode" - }, - { - "name": "io.github.serpro69.kfaker.provider.IdNumber", - "methods": [ - { - "name": "invalid", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.IndustrySegments", - "methods": [ - { - "name": "industry", - "parameterTypes": [] - }, - { - "name": "sector", - "parameterTypes": [] - }, - { - "name": "subSector", - "parameterTypes": [] - }, - { - "name": "superSector", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.Internet", - "allDeclaredFields": true, - "allDeclaredMethods": true, - "allDeclaredConstructors": true - }, - { - "name": "io.github.serpro69.kfaker.provider.ItalianOpera", - "methods": [ - { - "name": "byChristophWillibaldGluck", - "parameterTypes": [] - }, - { - "name": "byGaetanoDonizetti", - "parameterTypes": [] - }, - { - "name": "byGioacchinoRossini", - "parameterTypes": [] - }, - { - "name": "byGiuseppeVerdi", - "parameterTypes": [] - }, - { - "name": "byVincenzoBellini", - "parameterTypes": [] - }, - { - "name": "byWolfgangAmadeusMozart", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.JackHandey", - "methods": [ - { - "name": "quote", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.Job", - "methods": [ - { - "name": "educationLevel", - "parameterTypes": [] - }, - { - "name": "employmentType", - "parameterTypes": [] - }, - { - "name": "field", - "parameterTypes": [] - }, - { - "name": "keySkills", - "parameterTypes": [] - }, - { - "name": "position", - "parameterTypes": [] - }, - { - "name": "seniority", - "parameterTypes": [] - }, - { - "name": "title", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.KPop", - "methods": [ - { - "name": "boyBands", - "parameterTypes": [] - }, - { - "name": "firstGroups", - "parameterTypes": [] - }, - { - "name": "girlGroups", - "parameterTypes": [] - }, - { - "name": "secondGroups", - "parameterTypes": [] - }, - { - "name": "solo", - "parameterTypes": [] - }, - { - "name": "thirdGroups", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.KamenRider", - "methods": [ - { - "name": "getHeisei", - "parameterTypes": [] - }, - { - "name": "getReiwa", - "parameterTypes": [] - }, - { - "name": "getShowa", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.KamenRiderHeisei", - "methods": [ - { - "name": "collectibleDevices", - "parameterTypes": [] - }, - { - "name": "kamenRiders", - "parameterTypes": [] - }, - { - "name": "series", - "parameterTypes": [] - }, - { - "name": "transformationDevices", - "parameterTypes": [] - }, - { - "name": "users", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.KamenRiderReiwa", - "methods": [ - { - "name": "collectibleDevices", - "parameterTypes": [] - }, - { - "name": "kamenRiders", - "parameterTypes": [] - }, - { - "name": "series", - "parameterTypes": [] - }, - { - "name": "transformationDevices", - "parameterTypes": [] - }, - { - "name": "users", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.KamenRiderShowa", - "methods": [ - { - "name": "kamenRiders", - "parameterTypes": [] - }, - { - "name": "series", - "parameterTypes": [] - }, - { - "name": "transformationDevices", - "parameterTypes": [] - }, - { - "name": "users", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.LeagueOfLegends", - "methods": [ - { - "name": "champion", - "parameterTypes": [] - }, - { - "name": "location", - "parameterTypes": [] - }, - { - "name": "masteries", - "parameterTypes": [] - }, - { - "name": "quote", - "parameterTypes": [] - }, - { - "name": "rank", - "parameterTypes": [] - }, - { - "name": "summonerSpell", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.Lebowski", - "methods": [ - { - "name": "actors", - "parameterTypes": [] - }, - { - "name": "characters", - "parameterTypes": [] - }, - { - "name": "quotes", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.LordOfTheRings", - "methods": [ - { - "name": "characters", - "parameterTypes": [] - }, - { - "name": "locations", - "parameterTypes": [] - }, - { - "name": "quotes", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.Lorem", - "allDeclaredFields": true, - "allDeclaredMethods": true, - "allDeclaredConstructors": true - }, - { - "name": "io.github.serpro69.kfaker.provider.Lovecraft", - "methods": [ - { - "name": "deity", - "parameterTypes": [] - }, - { - "name": "fhtagn", - "parameterTypes": [] - }, - { - "name": "location", - "parameterTypes": [] - }, - { - "name": "tome", - "parameterTypes": [] - }, - { - "name": "words", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.Markdown", - "methods": [ - { - "name": "emphasis", - "parameterTypes": [] - }, - { - "name": "headers", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.Marketing", - "methods": [ - { - "name": "buzzwords", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.Measurement", - "methods": [ - { - "name": "height", - "parameterTypes": [] - }, - { - "name": "length", - "parameterTypes": [] - }, - { - "name": "metricHeight", - "parameterTypes": [] - }, - { - "name": "metricLength", - "parameterTypes": [] - }, - { - "name": "metricVolume", - "parameterTypes": [] - }, - { - "name": "metricWeight", - "parameterTypes": [] - }, - { - "name": "volume", - "parameterTypes": [] - }, - { - "name": "weight", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.MichaelScott", - "methods": [ - { - "name": "quotes", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.Military", - "methods": [ - { - "name": "airForceRank", - "parameterTypes": [] - }, - { - "name": "armyRank", - "parameterTypes": [] - }, - { - "name": "coastGuardRank", - "parameterTypes": [] - }, - { - "name": "dodPaygrade", - "parameterTypes": [] - }, - { - "name": "marinesRank", - "parameterTypes": [] - }, - { - "name": "navyRank", - "parameterTypes": [] - }, - { - "name": "spaceForceRank", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.Minecraft", - "methods": [ - { - "name": "achievement", - "parameterTypes": [] - }, - { - "name": "biome", - "parameterTypes": [] - }, - { - "name": "blocks", - "parameterTypes": [] - }, - { - "name": "enchantment", - "parameterTypes": [] - }, - { - "name": "gameMode", - "parameterTypes": [] - }, - { - "name": "items", - "parameterTypes": [] - }, - { - "name": "mobs", - "parameterTypes": [] - }, - { - "name": "statusEffect", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.MitchHedberg", - "methods": [ - { - "name": "quote", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.Money", - "allDeclaredFields": true, - "allDeclaredMethods": true, - "allDeclaredConstructors": true - }, - { - "name": "io.github.serpro69.kfaker.provider.Mountain", - "methods": [ - { - "name": "name", - "parameterTypes": [] - }, - { - "name": "range", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.Mountaineering", - "methods": [ - { - "name": "mountaineer", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.Movie", - "methods": [ - { - "name": "quote", - "parameterTypes": [] - }, - { - "name": "title", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.Music", - "methods": [ - { - "name": "albums", - "parameterTypes": [] - }, - { - "name": "bands", - "parameterTypes": [] - }, - { - "name": "genres", - "parameterTypes": [] - }, - { - "name": "getHipHop", - "parameterTypes": [] - }, - { - "name": "instruments", - "parameterTypes": [] - }, - { - "name": "mamboNo5", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.Myst", - "methods": [ - { - "name": "ages", - "parameterTypes": [] - }, - { - "name": "characters", - "parameterTypes": [] - }, - { - "name": "creatures", - "parameterTypes": [] - }, - { - "name": "games", - "parameterTypes": [] - }, - { - "name": "quotes", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.Name", - "allDeclaredFields": true, - "allDeclaredMethods": true, - "allDeclaredConstructors": true - }, - { - "name": "io.github.serpro69.kfaker.provider.Naruto", - "methods": [ - { - "name": "characters", - "parameterTypes": [] - }, - { - "name": "demons", - "parameterTypes": [] - }, - { - "name": "eyes", - "parameterTypes": [] - }, - { - "name": "villages", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.Nation", - "allDeclaredFields": true, - "allDeclaredMethods": true, - "allDeclaredConstructors": true - }, - { - "name": "io.github.serpro69.kfaker.provider.NatoPhoneticAlphabet", - "methods": [ - { - "name": "codeWord", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.NewGirl", - "methods": [ - { - "name": "characters", - "parameterTypes": [] - }, - { - "name": "quotes", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.OnePiece", - "allDeclaredFields": true, - "allDeclaredMethods": true, - "allDeclaredConstructors": true - }, - { - "name": "io.github.serpro69.kfaker.provider.Opera", - "methods": [ - { - "name": "getFrench", - "parameterTypes": [] - }, - { - "name": "getGerman", - "parameterTypes": [] - }, - { - "name": "getItalian", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.Overwatch", - "methods": [ - { - "name": "heroes", - "parameterTypes": [] - }, - { - "name": "locations", - "parameterTypes": [] - }, - { - "name": "quotes", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.ParksAndRec", - "methods": [ - { - "name": "characters", - "parameterTypes": [] - }, - { - "name": "cities", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.PearlJam", - "methods": [ - { - "name": "albums", - "parameterTypes": [] - }, - { - "name": "musicians", - "parameterTypes": [] - }, - { - "name": "songs", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.Person" - }, - { - "name": "io.github.serpro69.kfaker.provider.Phish", - "methods": [ - { - "name": "albums", - "parameterTypes": [] - }, - { - "name": "musicians", - "parameterTypes": [] - }, - { - "name": "songs", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.PhoneNumber", - "allDeclaredFields": true, - "allDeclaredMethods": true, - "allDeclaredConstructors": true - }, - { - "name": "io.github.serpro69.kfaker.provider.Pokemon", - "methods": [ - { - "name": "locations", - "parameterTypes": [] - }, - { - "name": "moves", - "parameterTypes": [] - }, - { - "name": "names", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.Prince", - "methods": [ - { - "name": "album", - "parameterTypes": [] - }, - { - "name": "band", - "parameterTypes": [] - }, - { - "name": "lyric", - "parameterTypes": [] - }, - { - "name": "song", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.PrincessBride", - "methods": [ - { - "name": "characters", - "parameterTypes": [] - }, - { - "name": "quotes", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.ProgrammingLanguage", - "methods": [ - { - "name": "creator", - "parameterTypes": [] - }, - { - "name": "name", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.Quote", - "methods": [ - { - "name": "famousLastWords", - "parameterTypes": [] - }, - { - "name": "fortuneCookie", - "parameterTypes": [] - }, - { - "name": "matz", - "parameterTypes": [] - }, - { - "name": "mostInterestingManInTheWorld", - "parameterTypes": [] - }, - { - "name": "robin", - "parameterTypes": [] - }, - { - "name": "singularSiegler", - "parameterTypes": [] - }, - { - "name": "yoda", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.Rajnikanth", - "methods": [ - { - "name": "joke", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.Relationship", - "methods": [ - { - "name": "familial", - "parameterTypes": [] - }, - { - "name": "familialDirect", - "parameterTypes": [] - }, - { - "name": "familialExtended", - "parameterTypes": [] - }, - { - "name": "inLaw", - "parameterTypes": [] - }, - { - "name": "parent", - "parameterTypes": [] - }, - { - "name": "sibling", - "parameterTypes": [] - }, - { - "name": "spouse", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.Restaurant", - "methods": [ - { - "name": "description", - "parameterTypes": [] - }, - { - "name": "name", - "parameterTypes": [] - }, - { - "name": "review", - "parameterTypes": [] - }, - { - "name": "type", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.RickAndMorty", - "methods": [ - { - "name": "characters", - "parameterTypes": [] - }, - { - "name": "locations", - "parameterTypes": [] - }, - { - "name": "quotes", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.RockBand", - "methods": [ - { - "name": "name", - "parameterTypes": [] - }, - { - "name": "song", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.Room", - "methods": [ - { - "name": "actors", - "parameterTypes": [] - }, - { - "name": "characters", - "parameterTypes": [] - }, - { - "name": "locations", - "parameterTypes": [] - }, - { - "name": "quotes", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.Rupaul", - "methods": [ - { - "name": "queens", - "parameterTypes": [] - }, - { - "name": "quotes", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.Rush", - "methods": [ - { - "name": "albums", - "parameterTypes": [] - }, - { - "name": "players", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.Science", - "methods": [ - { - "name": "element", - "parameterTypes": [] - }, - { - "name": "elementState", - "parameterTypes": [] - }, - { - "name": "elementSubcategory", - "parameterTypes": [] - }, - { - "name": "elementSymbol", - "parameterTypes": [] - }, - { - "name": "getBranch", - "parameterTypes": [] - }, - { - "name": "modifier", - "parameterTypes": [] - }, - { - "name": "scientist", - "parameterTypes": [] - }, - { - "name": "tool", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.ScienceBranch", - "methods": [ - { - "name": "empiricalNaturalApplied", - "parameterTypes": [] - }, - { - "name": "empiricalNaturalBasic", - "parameterTypes": [] - }, - { - "name": "empiricalSocialApplied", - "parameterTypes": [] - }, - { - "name": "empiricalSocialBasic", - "parameterTypes": [] - }, - { - "name": "formalApplied", - "parameterTypes": [] - }, - { - "name": "formalBasic", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.Seinfeld", - "methods": [ - { - "name": "business", - "parameterTypes": [] - }, - { - "name": "character", - "parameterTypes": [] - }, - { - "name": "quote", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.Separator", - "methods": [ - { - "name": "separator", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.Shakespeare", - "methods": [ - { - "name": "asYouLikeIt", - "parameterTypes": [] - }, - { - "name": "hamlet", - "parameterTypes": [] - }, - { - "name": "kingRichardTheThird", - "parameterTypes": [] - }, - { - "name": "romeoAndJuliet", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.Show", - "methods": [ - { - "name": "adultMusical", - "parameterTypes": [] - }, - { - "name": "kidsMusical", - "parameterTypes": [] - }, - { - "name": "play", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.SiliconValley", - "methods": [ - { - "name": "apps", - "parameterTypes": [] - }, - { - "name": "characters", - "parameterTypes": [] - }, - { - "name": "companies", - "parameterTypes": [] - }, - { - "name": "email", - "parameterTypes": [] - }, - { - "name": "inventions", - "parameterTypes": [] - }, - { - "name": "mottos", - "parameterTypes": [] - }, - { - "name": "quotes", - "parameterTypes": [] - }, - { - "name": "urls", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.Simpsons", - "methods": [ - { - "name": "characters", - "parameterTypes": [] - }, - { - "name": "episodeTitles", - "parameterTypes": [] - }, - { - "name": "locations", - "parameterTypes": [] - }, - { - "name": "quotes", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.SlackEmoji", - "methods": [ - { - "name": "activity", - "parameterTypes": [] - }, - { - "name": "celebration", - "parameterTypes": [] - }, - { - "name": "custom", - "parameterTypes": [] - }, - { - "name": "emoji", - "parameterTypes": [] - }, - { - "name": "foodAndDrink", - "parameterTypes": [] - }, - { - "name": "nature", - "parameterTypes": [] - }, - { - "name": "objectsAndSymbols", - "parameterTypes": [] - }, - { - "name": "people", - "parameterTypes": [] - }, - { - "name": "travelAndPlaces", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.SmashingPumpkins", - "methods": [ - { - "name": "musicians", - "parameterTypes": [] - }, - { - "name": "albums", - "parameterTypes": [] - }, - { - "name": "lyric", - "parameterTypes": [] - }, - { - "name": "songs", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.SonicTheHedgehog", - "methods": [ - { - "name": "character", - "parameterTypes": [] - }, - { - "name": "game", - "parameterTypes": [] - }, - { - "name": "zone", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.SouthPark", - "methods": [ - { - "name": "characters", - "parameterTypes": [] - }, - { - "name": "episodes", - "parameterTypes": [] - }, - { - "name": "quotes", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.Space", - "methods": [ - { - "name": "agency", - "parameterTypes": [] - }, - { - "name": "agencyAbv", - "parameterTypes": [] - }, - { - "name": "company", - "parameterTypes": [] - }, - { - "name": "constellation", - "parameterTypes": [] - }, - { - "name": "distanceMeasurement", - "parameterTypes": [] - }, - { - "name": "galaxy", - "parameterTypes": [] - }, - { - "name": "launchVehicle", - "parameterTypes": [] - }, - { - "name": "meteorite", - "parameterTypes": [] - }, - { - "name": "moon", - "parameterTypes": [] - }, - { - "name": "nasaSpaceCraft", - "parameterTypes": [] - }, - { - "name": "nebula", - "parameterTypes": [] - }, - { - "name": "planet", - "parameterTypes": [] - }, - { - "name": "star", - "parameterTypes": [] - }, - { - "name": "starCluster", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.Spongebob", - "methods": [ - { - "name": "characters", - "parameterTypes": [] - }, - { - "name": "episodes", - "parameterTypes": [] - }, - { - "name": "quotes", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.Sport", - "methods": [ - { - "name": "ancientOlympics", - "parameterTypes": [] - }, - { - "name": "summerOlympics", - "parameterTypes": [] - }, - { - "name": "summerParalympics", - "parameterTypes": [] - }, - { - "name": "unusual", - "parameterTypes": [] - }, - { - "name": "winterOlympics", - "parameterTypes": [] - }, - { - "name": "winterParalympics", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.StarTrek", - "methods": [ - { - "name": "character", - "parameterTypes": [] - }, - { - "name": "location", - "parameterTypes": [] - }, - { - "name": "specie", - "parameterTypes": [] - }, - { - "name": "villain", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.StarWars", - "methods": [ - { - "name": "alternateCharacterSpellings", - "parameterTypes": [ - "java.lang.String" - ] - }, - { - "name": "callNumbers", - "parameterTypes": [] - }, - { - "name": "callSign", - "parameterTypes": [] - }, - { - "name": "callSquadrons", - "parameterTypes": [] - }, - { - "name": "characters", - "parameterTypes": [] - }, - { - "name": "droids", - "parameterTypes": [] - }, - { - "name": "planets", - "parameterTypes": [] - }, - { - "name": "quote", - "parameterTypes": [] - }, - { - "name": "quotes", - "parameterTypes": [ - "java.lang.String" - ] - }, - { - "name": "species", - "parameterTypes": [] - }, - { - "name": "vehicles", - "parameterTypes": [] - }, - { - "name": "wookieeWords", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.Stargate", - "methods": [ - { - "name": "characters", - "parameterTypes": [] - }, - { - "name": "planets", - "parameterTypes": [] - }, - { - "name": "quotes", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.StockExchange" - }, - { - "name": "io.github.serpro69.kfaker.provider.StrangerThings", - "methods": [ - { - "name": "character", - "parameterTypes": [] - }, - { - "name": "quote", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.StreetFighter", - "methods": [ - { - "name": "characters", - "parameterTypes": [] - }, - { - "name": "moves", - "parameterTypes": [] - }, - { - "name": "quotes", - "parameterTypes": [] - }, - { - "name": "stages", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.Stripe", - "methods": [ - { - "name": "invalidCards", - "parameterTypes": [ - "java.lang.String" - ] - }, - { - "name": "validCards", - "parameterTypes": [ - "java.lang.String" - ] - }, - { - "name": "validTokens", - "parameterTypes": [ - "java.lang.String" - ] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.StudioGhibli", - "methods": [ - { - "name": "characters", - "parameterTypes": [] - }, - { - "name": "movies", - "parameterTypes": [] - }, - { - "name": "quotes", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.Subscription", - "methods": [ - { - "name": "paymentMethods", - "parameterTypes": [] - }, - { - "name": "paymentTerms", - "parameterTypes": [] - }, - { - "name": "plans", - "parameterTypes": [] - }, - { - "name": "statuses", - "parameterTypes": [] - }, - { - "name": "subscriptionTerms", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.Suits", - "methods": [ - { - "name": "characters", - "parameterTypes": [] - }, - { - "name": "quotes", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.SuperMario", - "methods": [ - { - "name": "characters", - "parameterTypes": [] - }, - { - "name": "games", - "parameterTypes": [] - }, - { - "name": "locations", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.SuperSmashBros", - "methods": [ - { - "name": "fighter", - "parameterTypes": [] - }, - { - "name": "stage", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.Superhero", - "methods": [ - { - "name": "descriptor$core", - "parameterTypes": [] - }, - { - "name": "name", - "parameterTypes": [] - }, - { - "name": "power", - "parameterTypes": [] - }, - { - "name": "prefix$core", - "parameterTypes": [] - }, - { - "name": "suffix$core", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.Supernatural", - "methods": [ - { - "name": "character", - "parameterTypes": [] - }, - { - "name": "creature", - "parameterTypes": [] - }, - { - "name": "weapon", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.SwordArtOnline", - "methods": [ - { - "name": "gameName", - "parameterTypes": [] - }, - { - "name": "item", - "parameterTypes": [] - }, - { - "name": "location", - "parameterTypes": [] - }, - { - "name": "realName", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.Tarkov", - "methods": [ - { - "name": "bosses", - "parameterTypes": [] - }, - { - "name": "factions", - "parameterTypes": [] - }, - { - "name": "getQuests", - "parameterTypes": [] - }, - { - "name": "items", - "parameterTypes": [] - }, - { - "name": "locations", - "parameterTypes": [] - }, - { - "name": "traders", - "parameterTypes": [] - }, - { - "name": "weapons", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.TarkovQuests", - "methods": [ - { - "name": "fence", - "parameterTypes": [] - }, - { - "name": "jaeger", - "parameterTypes": [] - }, - { - "name": "mechanic", - "parameterTypes": [] - }, - { - "name": "peacekeeper", - "parameterTypes": [] - }, - { - "name": "prapor", - "parameterTypes": [] - }, - { - "name": "ragman", - "parameterTypes": [] - }, - { - "name": "skier", - "parameterTypes": [] - }, - { - "name": "therapist", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.Tea", - "methods": [ - { - "name": "getVariety", - "parameterTypes": [] - }, - { - "name": "type", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.TeaVariety", - "methods": [ - { - "name": "black", - "parameterTypes": [] - }, - { - "name": "green", - "parameterTypes": [] - }, - { - "name": "herbal", - "parameterTypes": [] - }, - { - "name": "oolong", - "parameterTypes": [] - }, - { - "name": "white", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.Team", - "methods": [ - { - "name": "mascot", - "parameterTypes": [] - }, - { - "name": "name", - "parameterTypes": [] - }, - { - "name": "sport", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.Tertiary", - "methods": [ - { - "name": "getDegree", - "parameterTypes": [] - }, - { - "name": "universityType", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.TheExpanse", - "methods": [ - { - "name": "characters", - "parameterTypes": [] - }, - { - "name": "locations", - "parameterTypes": [] - }, - { - "name": "quotes", - "parameterTypes": [] - }, - { - "name": "ships", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.TheITCrowd", - "methods": [ - { - "name": "actors", - "parameterTypes": [] - }, - { - "name": "characters", - "parameterTypes": [] - }, - { - "name": "emails", - "parameterTypes": [] - }, - { - "name": "quotes", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.TheKingkillerChronicle", - "methods": [ - { - "name": "books", - "parameterTypes": [] - }, - { - "name": "characters", - "parameterTypes": [] - }, - { - "name": "creatures", - "parameterTypes": [] - }, - { - "name": "locations", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.TheOffice", - "methods": [ - { - "name": "characters", - "parameterTypes": [] - }, - { - "name": "quotes", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.TheRoom", - "methods": [ - { - "name": "actors", - "parameterTypes": [] - }, - { - "name": "characters", - "parameterTypes": [] - }, - { - "name": "locations", - "parameterTypes": [] - }, - { - "name": "quotes", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.TheThickOfIt", - "methods": [ - { - "name": "characters", - "parameterTypes": [] - }, - { - "name": "departments", - "parameterTypes": [] - }, - { - "name": "positions", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.Tolkien", - "methods": [ - { - "name": "characters", - "parameterTypes": [] - }, - { - "name": "getHobbit", - "parameterTypes": [] - }, - { - "name": "getLordOfTheRings", - "parameterTypes": [] - }, - { - "name": "locations", - "parameterTypes": [] - }, - { - "name": "poems", - "parameterTypes": [] - }, - { - "name": "races", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.TolkienHobbit", - "methods": [ - { - "name": "character", - "parameterTypes": [] - }, - { - "name": "location", - "parameterTypes": [] - }, - { - "name": "quote", - "parameterTypes": [] - }, - { - "name": "thorinsCompany", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.TolkienLordOfTheRings", - "methods": [ - { - "name": "characters", - "parameterTypes": [] - }, - { - "name": "locations", - "parameterTypes": [] - }, - { - "name": "quotes", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.Touhou", - "methods": [ - { - "name": "characters", - "parameterTypes": [] - }, - { - "name": "games", - "parameterTypes": [] - }, - { - "name": "locations", - "parameterTypes": [] - }, - { - "name": "songs", - "parameterTypes": [] - }, - { - "name": "spellCards", - "parameterTypes": [] - } - ] - }, - { - "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": [ - { - "name": "alternateCharacterSpellings", - "parameterTypes": [ - "io.github.serpro69.kfaker.provider.TronAlternateCharacter" - ] - }, - { - "name": "alternateCharacterSpellings$default", - "parameterTypes": [ - "io.github.serpro69.kfaker.provider.Tron", - "io.github.serpro69.kfaker.provider.TronAlternateCharacter", - "int", - "java.lang.Object" - ] - }, - { - "name": "characters", - "parameterTypes": [ - "io.github.serpro69.kfaker.provider.TronCharacterType" - ] - }, - { - "name": "characters$default", - "parameterTypes": [ - "io.github.serpro69.kfaker.provider.Tron", - "io.github.serpro69.kfaker.provider.TronCharacterType", - "int", - "java.lang.Object" - ] - }, - { - "name": "games", - "parameterTypes": [] - }, - { - "name": "locations", - "parameterTypes": [] - }, - { - "name": "quotes", - "parameterTypes": [ - "io.github.serpro69.kfaker.provider.TronCharacter" - ] - }, - { - "name": "quotes$default", - "parameterTypes": [ - "io.github.serpro69.kfaker.provider.Tron", - "io.github.serpro69.kfaker.provider.TronCharacter", - "int", - "java.lang.Object" - ] - }, - { - "name": "taglines", - "parameterTypes": [] - }, - { - "name": "vehicles", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.TronAlternateCharacter" - }, - { - "name": "io.github.serpro69.kfaker.provider.TronCharacter" - }, - { - "name": "io.github.serpro69.kfaker.provider.TronCharacterType" - }, - { - "name": "io.github.serpro69.kfaker.provider.TwinPeaks", - "methods": [ - { - "name": "characters", - "parameterTypes": [] - }, - { - "name": "locations", - "parameterTypes": [] - }, - { - "name": "quotes", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.UmphreysMcgee", - "methods": [ - { - "name": "song", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.UnitedStates", - "methods": [ - { - "name": "large", - "parameterTypes": [] - }, - { - "name": "medium", - "parameterTypes": [] - }, - { - "name": "small", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.University", - "methods": [ - { - "name": "name", - "parameterTypes": [] - }, - { - "name": "prefix", - "parameterTypes": [] - }, - { - "name": "suffix", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.VForVendetta", - "methods": [ - { - "name": "characters", - "parameterTypes": [] - }, - { - "name": "quotes", - "parameterTypes": [] - }, - { - "name": "speeches", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.Vehicle", - "methods": [ - { - "name": "carOptions", - "parameterTypes": [] - }, - { - "name": "carTypes", - "parameterTypes": [] - }, - { - "name": "colors", - "parameterTypes": [] - }, - { - "name": "cylinderEngine", - "parameterTypes": [] - }, - { - "name": "doors", - "parameterTypes": [] - }, - { - "name": "driveTypes", - "parameterTypes": [] - }, - { - "name": "engineSizes", - "parameterTypes": [] - }, - { - "name": "fuelTypes", - "parameterTypes": [] - }, - { - "name": "licencePlateByState", - "parameterTypes": [ - "java.lang.String" - ] - }, - { - "name": "licensePlate", - "parameterTypes": [] - }, - { - "name": "makes", - "parameterTypes": [] - }, - { - "name": "manufacture", - "parameterTypes": [] - }, - { - "name": "modelsByMake", - "parameterTypes": [ - "java.lang.String" - ] - }, - { - "name": "standardSpecs", - "parameterTypes": [] - }, - { - "name": "styles", - "parameterTypes": [] - }, - { - "name": "transmissions", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.VentureBros", - "methods": [ - { - "name": "character", - "parameterTypes": [] - }, - { - "name": "organization", - "parameterTypes": [] - }, - { - "name": "quote", - "parameterTypes": [] - }, - { - "name": "vehicle", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.Verbs", - "methods": [ - { - "name": "base", - "parameterTypes": [] - }, - { - "name": "ingForm", - "parameterTypes": [] - }, - { - "name": "past", - "parameterTypes": [] - }, - { - "name": "pastParticiple", - "parameterTypes": [] - }, - { - "name": "simplePresent", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.Volleyball", - "methods": [ - { - "name": "coach", - "parameterTypes": [] - }, - { - "name": "formation", - "parameterTypes": [] - }, - { - "name": "player", - "parameterTypes": [] - }, - { - "name": "position", - "parameterTypes": [] - }, - { - "name": "team", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.WarhammerFantasy", - "methods": [ - { - "name": "creatures", - "parameterTypes": [] - }, - { - "name": "factions", - "parameterTypes": [] - }, - { - "name": "heroes", - "parameterTypes": [] - }, - { - "name": "locations", - "parameterTypes": [] - }, - { - "name": "quotes", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.Witcher", - "methods": [ - { - "name": "books", - "parameterTypes": [] - }, - { - "name": "characters", - "parameterTypes": [] - }, - { - "name": "locations", - "parameterTypes": [] - }, - { - "name": "monsters", - "parameterTypes": [] - }, - { - "name": "potions", - "parameterTypes": [] - }, - { - "name": "quotes", - "parameterTypes": [] - }, - { - "name": "schools", - "parameterTypes": [] - }, - { - "name": "signs", - "parameterTypes": [] - }, - { - "name": "witchers", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.WorldCup", - "allDeclaredFields": true, - "allDeclaredMethods": true, - "allDeclaredConstructors": true - }, - { - "name": "io.github.serpro69.kfaker.provider.WorldOfWarcraft", - "methods": [ - { - "name": "classNames", - "parameterTypes": [] - }, - { - "name": "hero", - "parameterTypes": [] - }, - { - "name": "quotes", - "parameterTypes": [] - }, - { - "name": "races", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.YamlFakeDataProvider" - }, - { - "name": "io.github.serpro69.kfaker.provider.Yoda", - "methods": [ - { - "name": "quotes", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.Zelda", - "methods": [ - { - "name": "characters", - "parameterTypes": [] - }, - { - "name": "games", - "parameterTypes": [] - }, - { - "name": "items", - "parameterTypes": [] - }, - { - "name": "locations", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.misc.CryptographyProvider", - "methods": [ - { - "name": "md5", - "parameterTypes": [] - }, - { - "name": "sha1", - "parameterTypes": [] - }, - { - "name": "sha224", - "parameterTypes": [] - }, - { - "name": "sha256", - "parameterTypes": [] - }, - { - "name": "sha384", - "parameterTypes": [] - }, - { - "name": "sha512", - "parameterTypes": [] - } - ] - }, - { - "name": "io.github.serpro69.kfaker.provider.misc.RandomClassProvider" - }, - { - "name": "io.github.serpro69.kfaker.provider.misc.StringProvider" - }, - { - "name": "io.github.serpro69.kfaker.provider.unique.GlobalUniqueDataDataProvider" - }, - { - "name": "io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider" - }, - { - "name": "io.github.serpro69.kfaker.provider.unique.UniqueDataProvider" - }, - { - "name": "java.lang.ClassValue" - }, - { - "name": "java.lang.Object", - "allDeclaredFields": true, - "allDeclaredMethods": true - }, - { - "name": "java.lang.String" - }, - { - "name": "java.nio.file.Path" - }, - { - "name": "java.nio.file.Paths", - "methods": [ - { - "name": "get", - "parameterTypes": [ - "java.lang.String", - "java.lang.String[]" - ] - } - ] - }, - { - "name": "java.sql.Connection" - }, - { - "name": "java.sql.Driver" - }, - { - "name": "java.sql.DriverManager", - "methods": [ - { - "name": "getConnection", - "parameterTypes": [ - "java.lang.String" - ] - }, - { - "name": "getDriver", - "parameterTypes": [ - "java.lang.String" - ] - } - ] - }, - { - "name": "java.sql.Time", - "methods": [ - { - "name": "", - "parameterTypes": [ - "long" - ] - } - ] - }, - { - "name": "java.sql.Timestamp", - "methods": [ - { - "name": "valueOf", - "parameterTypes": [ - "java.lang.String" - ] - } - ] - }, - { - "name": "java.time.Duration", - "methods": [ - { - "name": "parse", - "parameterTypes": [ - "java.lang.CharSequence" - ] - } - ] - }, - { - "name": "java.time.Instant", - "methods": [ - { - "name": "parse", - "parameterTypes": [ - "java.lang.CharSequence" - ] - } - ] - }, - { - "name": "java.time.LocalDate", - "methods": [ - { - "name": "parse", - "parameterTypes": [ - "java.lang.CharSequence" - ] - } - ] - }, - { - "name": "java.time.LocalDateTime", - "methods": [ - { - "name": "parse", - "parameterTypes": [ - "java.lang.CharSequence" - ] - } - ] - }, - { - "name": "java.time.LocalTime", - "methods": [ - { - "name": "parse", - "parameterTypes": [ - "java.lang.CharSequence" - ] - } - ] - }, - { - "name": "java.time.MonthDay", - "methods": [ - { - "name": "parse", - "parameterTypes": [ - "java.lang.CharSequence" - ] - } - ] - }, - { - "name": "java.time.OffsetDateTime", - "methods": [ - { - "name": "parse", - "parameterTypes": [ - "java.lang.CharSequence" - ] - } - ] - }, - { - "name": "java.time.OffsetTime", - "methods": [ - { - "name": "parse", - "parameterTypes": [ - "java.lang.CharSequence" - ] - } - ] - }, - { - "name": "java.time.Period", - "methods": [ - { - "name": "parse", - "parameterTypes": [ - "java.lang.CharSequence" - ] - } - ] - }, - { - "name": "java.time.Year", - "methods": [ - { - "name": "parse", - "parameterTypes": [ - "java.lang.CharSequence" - ] - } - ] - }, - { - "name": "java.time.YearMonth", - "methods": [ - { - "name": "parse", - "parameterTypes": [ - "java.lang.CharSequence" - ] - } - ] - }, - { - "name": "java.time.ZoneId", - "methods": [ - { - "name": "of", - "parameterTypes": [ - "java.lang.String" - ] - } - ] - }, - { - "name": "java.time.ZoneOffset", - "methods": [ - { - "name": "of", - "parameterTypes": [ - "java.lang.String" - ] - } - ] - }, - { - "name": "java.time.ZonedDateTime", - "methods": [ - { - "name": "parse", - "parameterTypes": [ - "java.lang.CharSequence" - ] - } - ] - }, - { - "name": "kotlin.Deprecated", - "allDeclaredMethods": true - }, - { - "name": "kotlin.Metadata", - "allDeclaredMethods": true - }, - { - "name": "kotlin.ReplaceWith", - "allDeclaredMethods": true - }, - { - "name": "kotlin.Unit" - }, - { - "name": "kotlin.internal.jdk8.JDK8PlatformImplementations", - "methods": [ - { - "name": "", - "parameterTypes": [] - } - ] - }, - { - "name": "kotlin.jvm.functions.Function0" - }, - { - "name": "kotlin.jvm.internal.DefaultConstructorMarker" - }, - { - "name": "kotlin.ranges.IntRange" - }, - { - "name": "kotlin.reflect.jvm.internal.ReflectionFactoryImpl", - "methods": [ - { - "name": "", - "parameterTypes": [] - } - ] - }, - { - "name": "kotlin.reflect.jvm.internal.impl.renderer.DescriptorRendererOptionsImpl", - "allDeclaredFields": true - }, - { - "name": "kotlin.reflect.jvm.internal.impl.resolve.scopes.DescriptorKindFilter", - "allPublicFields": true - }, - { - "name": "picocli.CommandLine$AutoHelpMixin", - "allDeclaredFields": true, - "allDeclaredMethods": true - } +{ + "name":"faker.com.fasterxml.jackson.databind.deser.Deserializers[]" +}, +{ + "name":"faker.com.fasterxml.jackson.databind.deser.KeyDeserializers[]" +}, +{ + "name":"faker.com.fasterxml.jackson.databind.deser.ValueInstantiators[]" +}, +{ + "name":"faker.com.fasterxml.jackson.databind.ser.Serializers[]" +}, +{ + "name":"io.github.serpro69.kfaker.AbstractFaker" +}, +{ + "name":"io.github.serpro69.kfaker.Faker", + "methods":[ + {"name":"getAddress","parameterTypes":[] }, + {"name":"getColor","parameterTypes":[] }, + {"name":"getCrypto","parameterTypes":[] }, + {"name":"getCurrency","parameterTypes":[] }, + {"name":"getCurrencySymbol","parameterTypes":[] }, + {"name":"getFile","parameterTypes":[] }, + {"name":"getGender","parameterTypes":[] }, + {"name":"getIdNumber","parameterTypes":[] }, + {"name":"getInternet","parameterTypes":[] }, + {"name":"getMeasurement","parameterTypes":[] }, + {"name":"getMoney","parameterTypes":[] }, + {"name":"getName","parameterTypes":[] }, + {"name":"getPhoneNumber","parameterTypes":[] }, + {"name":"getSeparator","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.Faker$Builder" +}, +{ + "name":"io.github.serpro69.kfaker.FakerConfig" +}, +{ + "name":"io.github.serpro69.kfaker.FakerService" +}, +{ + "name":"io.github.serpro69.kfaker.IRandom" +}, +{ + "name":"io.github.serpro69.kfaker.RandomService" +}, +{ + "name":"io.github.serpro69.kfaker.app.KFaker", + "allDeclaredFields":true, + "allDeclaredMethods":true +}, +{ + "name":"io.github.serpro69.kfaker.app.subcommands.CommandOptions", + "allDeclaredFields":true, + "allDeclaredMethods":true +}, +{ + "name":"io.github.serpro69.kfaker.app.subcommands.List", + "allDeclaredFields":true, + "allDeclaredMethods":true, + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "name":"io.github.serpro69.kfaker.app.subcommands.Lookup", + "allDeclaredFields":true, + "allDeclaredMethods":true, + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "name":"io.github.serpro69.kfaker.books.BooksFaker", + "methods":[ + {"name":"getBible","parameterTypes":[] }, + {"name":"getBook","parameterTypes":[] }, + {"name":"getCosmere","parameterTypes":[] }, + {"name":"getCultureSeries","parameterTypes":[] }, + {"name":"getDcComics","parameterTypes":[] }, + {"name":"getDune","parameterTypes":[] }, + {"name":"getLovecraft","parameterTypes":[] }, + {"name":"getShakespeare","parameterTypes":[] }, + {"name":"getTheKingkillerChronicle","parameterTypes":[] }, + {"name":"getTolkien","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.books.BooksFaker$Builder" +}, +{ + "name":"io.github.serpro69.kfaker.books.provider.Bible", + "methods":[ + {"name":"character","parameterTypes":[] }, + {"name":"location","parameterTypes":[] }, + {"name":"quote","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.books.provider.Book", + "methods":[ + {"name":"author","parameterTypes":[] }, + {"name":"genre","parameterTypes":[] }, + {"name":"publisher","parameterTypes":[] }, + {"name":"title","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.books.provider.Cosmere", + "methods":[ + {"name":"allomancers","parameterTypes":[] }, + {"name":"aons","parameterTypes":[] }, + {"name":"feruchemists","parameterTypes":[] }, + {"name":"knightsRadiant","parameterTypes":[] }, + {"name":"metals","parameterTypes":[] }, + {"name":"shardWorlds","parameterTypes":[] }, + {"name":"shards","parameterTypes":[] }, + {"name":"surges","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.books.provider.CultureSeries", + "methods":[ + {"name":"books","parameterTypes":[] }, + {"name":"civs","parameterTypes":[] }, + {"name":"cultureShipClassAbvs","parameterTypes":[] }, + {"name":"cultureShipClasses","parameterTypes":[] }, + {"name":"cultureShips","parameterTypes":[] }, + {"name":"planets","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.books.provider.DcComics", + "methods":[ + {"name":"hero","parameterTypes":[] }, + {"name":"heroine","parameterTypes":[] }, + {"name":"name","parameterTypes":[] }, + {"name":"title","parameterTypes":[] }, + {"name":"villain","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.books.provider.Dune", + "methods":[ + {"name":"quotes","parameterTypes":["io.github.serpro69.kfaker.books.provider.Dune$QuoteCharacter"] }, + {"name":"quotes$default","parameterTypes":["io.github.serpro69.kfaker.books.provider.Dune","io.github.serpro69.kfaker.books.provider.Dune$QuoteCharacter","int","java.lang.Object"] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.books.provider.Dune$QuoteCharacter" +}, +{ + "name":"io.github.serpro69.kfaker.books.provider.Dune$SayingOrigin" +}, +{ + "name":"io.github.serpro69.kfaker.books.provider.Lovecraft", + "methods":[ + {"name":"deity","parameterTypes":[] }, + {"name":"fhtagn","parameterTypes":[] }, + {"name":"location","parameterTypes":[] }, + {"name":"tome","parameterTypes":[] }, + {"name":"words","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.books.provider.Shakespeare", + "methods":[ + {"name":"asYouLikeIt","parameterTypes":[] }, + {"name":"hamlet","parameterTypes":[] }, + {"name":"kingRichardTheThird","parameterTypes":[] }, + {"name":"romeoAndJuliet","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.books.provider.TheKingkillerChronicle", + "methods":[ + {"name":"books","parameterTypes":[] }, + {"name":"characters","parameterTypes":[] }, + {"name":"creatures","parameterTypes":[] }, + {"name":"locations","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.books.provider.Tolkien", + "methods":[ + {"name":"characters","parameterTypes":[] }, + {"name":"getHobbit","parameterTypes":[] }, + {"name":"getLordOfTheRings","parameterTypes":[] }, + {"name":"locations","parameterTypes":[] }, + {"name":"poems","parameterTypes":[] }, + {"name":"races","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.books.provider.TolkienHobbit", + "methods":[ + {"name":"character","parameterTypes":[] }, + {"name":"location","parameterTypes":[] }, + {"name":"quote","parameterTypes":[] }, + {"name":"thorinsCompany","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.books.provider.TolkienLordOfTheRings", + "methods":[ + {"name":"characters","parameterTypes":[] }, + {"name":"locations","parameterTypes":[] }, + {"name":"quotes","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.commerce.CommerceFaker", + "methods":[ + {"name":"getBank","parameterTypes":[] }, + {"name":"getBarcode","parameterTypes":[] }, + {"name":"getBeer","parameterTypes":[] }, + {"name":"getBusiness","parameterTypes":[] }, + {"name":"getCannabis","parameterTypes":[] }, + {"name":"getCode","parameterTypes":[] }, + {"name":"getCoffee","parameterTypes":[] }, + {"name":"getCommerce","parameterTypes":[] }, + {"name":"getCompany","parameterTypes":[] }, + {"name":"getConstruction","parameterTypes":[] }, + {"name":"getDessert","parameterTypes":[] }, + {"name":"getFinance","parameterTypes":[] }, + {"name":"getFood","parameterTypes":[] }, + {"name":"getHouse","parameterTypes":[] }, + {"name":"getIndustrySegments","parameterTypes":[] }, + {"name":"getMarketing","parameterTypes":[] }, + {"name":"getRestaurant","parameterTypes":[] }, + {"name":"getStripe","parameterTypes":[] }, + {"name":"getSubscription","parameterTypes":[] }, + {"name":"getTea","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.commerce.CommerceFaker$Builder" +}, +{ + "name":"io.github.serpro69.kfaker.commerce.provider.Bank", + "methods":[ + {"name":"ibanDetails","parameterTypes":["java.lang.String"] }, + {"name":"name","parameterTypes":[] }, + {"name":"swiftBic","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.commerce.provider.Barcode", + "methods":[ + {"name":"compositeSymbol","parameterTypes":[] }, + {"name":"ean13","parameterTypes":[] }, + {"name":"ean8","parameterTypes":[] }, + {"name":"isbn","parameterTypes":[] }, + {"name":"ismn","parameterTypes":[] }, + {"name":"issn","parameterTypes":[] }, + {"name":"upcA","parameterTypes":[] }, + {"name":"upcE","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.commerce.provider.Beer", + "methods":[ + {"name":"brand","parameterTypes":[] }, + {"name":"hop","parameterTypes":[] }, + {"name":"malt","parameterTypes":[] }, + {"name":"name","parameterTypes":[] }, + {"name":"style","parameterTypes":[] }, + {"name":"yeast","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.commerce.provider.Business", + "methods":[ + {"name":"creditCardNumbers","parameterTypes":[] }, + {"name":"creditCardTypes","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.commerce.provider.Cannabis", + "methods":[ + {"name":"brands","parameterTypes":[] }, + {"name":"cannabinoidAbbreviations","parameterTypes":[] }, + {"name":"cannabinoids","parameterTypes":[] }, + {"name":"categories","parameterTypes":[] }, + {"name":"healthBenefits","parameterTypes":[] }, + {"name":"medicalUses","parameterTypes":[] }, + {"name":"strains","parameterTypes":[] }, + {"name":"terpenes","parameterTypes":[] }, + {"name":"types","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.commerce.provider.Code", + "methods":[{"name":"asin","parameterTypes":[] }] +}, +{ + "name":"io.github.serpro69.kfaker.commerce.provider.Coffee", + "methods":[ + {"name":"blendName","parameterTypes":[] }, + {"name":"country","parameterTypes":[] }, + {"name":"notes","parameterTypes":[] }, + {"name":"regions","parameterTypes":["java.lang.String"] }, + {"name":"variety","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.commerce.provider.Commerce", + "methods":[ + {"name":"brand","parameterTypes":[] }, + {"name":"department","parameterTypes":[] }, + {"name":"productName","parameterTypes":[] }, + {"name":"promotionCode","parameterTypes":[] }, + {"name":"vendor","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.commerce.provider.Company", + "methods":[ + {"name":"bs","parameterTypes":[] }, + {"name":"buzzwords","parameterTypes":[] }, + {"name":"department","parameterTypes":[] }, + {"name":"industry","parameterTypes":[] }, + {"name":"name","parameterTypes":[] }, + {"name":"profession","parameterTypes":[] }, + {"name":"sicCode","parameterTypes":[] }, + {"name":"type","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.commerce.provider.Construction", + "methods":[{"name":"materials","parameterTypes":[] }] +}, +{ + "name":"io.github.serpro69.kfaker.commerce.provider.Dessert", + "methods":[ + {"name":"dessert","parameterTypes":[] }, + {"name":"flavor","parameterTypes":[] }, + {"name":"topping","parameterTypes":[] }, + {"name":"variety","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.commerce.provider.Finance", + "methods":[ + {"name":"condominiumFiscalCode","parameterTypes":[] }, + {"name":"creditCard","parameterTypes":["java.lang.String"] }, + {"name":"stockMarket","parameterTypes":[] }, + {"name":"ticker","parameterTypes":["io.github.serpro69.kfaker.commerce.provider.StockExchange"] }, + {"name":"ticker$default","parameterTypes":["io.github.serpro69.kfaker.commerce.provider.Finance","io.github.serpro69.kfaker.commerce.provider.StockExchange","int","java.lang.Object"] }, + {"name":"vatNumber","parameterTypes":["java.lang.String"] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.commerce.provider.Food", + "methods":[ + {"name":"allergens","parameterTypes":[] }, + {"name":"descriptions","parameterTypes":[] }, + {"name":"dish","parameterTypes":[] }, + {"name":"ethnicCategory","parameterTypes":[] }, + {"name":"fruits","parameterTypes":[] }, + {"name":"ingredients","parameterTypes":[] }, + {"name":"measurementSizes","parameterTypes":[] }, + {"name":"measurements","parameterTypes":[] }, + {"name":"metricMeasurements","parameterTypes":[] }, + {"name":"spices","parameterTypes":[] }, + {"name":"sushi","parameterTypes":[] }, + {"name":"vegetables","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.commerce.provider.House", + "methods":[ + {"name":"furniture","parameterTypes":[] }, + {"name":"rooms","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.commerce.provider.IndustrySegments", + "methods":[ + {"name":"industry","parameterTypes":[] }, + {"name":"sector","parameterTypes":[] }, + {"name":"subSector","parameterTypes":[] }, + {"name":"superSector","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.commerce.provider.Marketing", + "methods":[{"name":"buzzwords","parameterTypes":[] }] +}, +{ + "name":"io.github.serpro69.kfaker.commerce.provider.Restaurant", + "methods":[ + {"name":"description","parameterTypes":[] }, + {"name":"name","parameterTypes":[] }, + {"name":"review","parameterTypes":[] }, + {"name":"type","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.commerce.provider.StockExchange" +}, +{ + "name":"io.github.serpro69.kfaker.commerce.provider.Stripe", + "methods":[ + {"name":"invalidCards","parameterTypes":["java.lang.String"] }, + {"name":"validCards","parameterTypes":["java.lang.String"] }, + {"name":"validTokens","parameterTypes":["java.lang.String"] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.commerce.provider.Subscription", + "methods":[ + {"name":"paymentMethods","parameterTypes":[] }, + {"name":"paymentTerms","parameterTypes":[] }, + {"name":"plans","parameterTypes":[] }, + {"name":"statuses","parameterTypes":[] }, + {"name":"subscriptionTerms","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.commerce.provider.Tea", + "methods":[ + {"name":"getVariety","parameterTypes":[] }, + {"name":"type","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.commerce.provider.TeaVariety", + "methods":[ + {"name":"black","parameterTypes":[] }, + {"name":"green","parameterTypes":[] }, + {"name":"herbal","parameterTypes":[] }, + {"name":"oolong","parameterTypes":[] }, + {"name":"white","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.creatures.CreaturesFaker", + "methods":[ + {"name":"getAncient","parameterTypes":[] }, + {"name":"getAnimal","parameterTypes":[] }, + {"name":"getBird","parameterTypes":[] }, + {"name":"getCat","parameterTypes":[] }, + {"name":"getDog","parameterTypes":[] }, + {"name":"getHorse","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.creatures.CreaturesFaker$Builder" +}, +{ + "name":"io.github.serpro69.kfaker.creatures.provider.Ancient", + "methods":[ + {"name":"god","parameterTypes":[] }, + {"name":"hero","parameterTypes":[] }, + {"name":"primordial","parameterTypes":[] }, + {"name":"titan","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.creatures.provider.Animal", + "methods":[{"name":"name","parameterTypes":[] }] +}, +{ + "name":"io.github.serpro69.kfaker.creatures.provider.Bird", + "methods":[ + {"name":"adjectives","parameterTypes":[] }, + {"name":"anatomy","parameterTypes":[] }, + {"name":"anatomyPastTense","parameterTypes":[] }, + {"name":"colors","parameterTypes":[] }, + {"name":"commonFamilyName","parameterTypes":[] }, + {"name":"emotionalAdjectives","parameterTypes":[] }, + {"name":"geo","parameterTypes":[] }, + {"name":"getOrderCommonMap","parameterTypes":[] }, + {"name":"implausibleCommonNames","parameterTypes":[] }, + {"name":"plausibleCommonNames","parameterTypes":[] }, + {"name":"sillyAdjectives","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.creatures.provider.BirdOrderCommonMap", + "methods":[ + {"name":"accipitriformes","parameterTypes":[] }, + {"name":"anseriformes","parameterTypes":[] }, + {"name":"apterygiformes","parameterTypes":[] }, + {"name":"bucerotiformes","parameterTypes":[] }, + {"name":"caprimulgiformes","parameterTypes":[] }, + {"name":"cariamiformes","parameterTypes":[] }, + {"name":"casuariiformes","parameterTypes":[] }, + {"name":"cathartiformes","parameterTypes":[] }, + {"name":"charadriiformes","parameterTypes":[] }, + {"name":"ciconiiformes","parameterTypes":[] }, + {"name":"coliiformes","parameterTypes":[] }, + {"name":"columbiformes","parameterTypes":[] }, + {"name":"coraciiformes","parameterTypes":[] }, + {"name":"cuculiformes","parameterTypes":[] }, + {"name":"eurypygiformes","parameterTypes":[] }, + {"name":"falconiformes","parameterTypes":[] }, + {"name":"galbuliformes","parameterTypes":[] }, + {"name":"galliformes","parameterTypes":[] }, + {"name":"gaviiformes","parameterTypes":[] }, + {"name":"gruiformes","parameterTypes":[] }, + {"name":"mesitornithiformes","parameterTypes":[] }, + {"name":"musophagiformes","parameterTypes":[] }, + {"name":"opisthocomiformes","parameterTypes":[] }, + {"name":"otidiformes","parameterTypes":[] }, + {"name":"passeriformes","parameterTypes":[] }, + {"name":"pelecaniformes","parameterTypes":[] }, + {"name":"phaethontiformes","parameterTypes":[] }, + {"name":"phoenicopteriformes","parameterTypes":[] }, + {"name":"piciformes","parameterTypes":[] }, + {"name":"podicipediformes","parameterTypes":[] }, + {"name":"procellariiformes","parameterTypes":[] }, + {"name":"psittaciformes","parameterTypes":[] }, + {"name":"pterocliformes","parameterTypes":[] }, + {"name":"rheiformes","parameterTypes":[] }, + {"name":"sphenisciformes","parameterTypes":[] }, + {"name":"strigiformes","parameterTypes":[] }, + {"name":"struthioniformes","parameterTypes":[] }, + {"name":"suliformes","parameterTypes":[] }, + {"name":"tinamiformes","parameterTypes":[] }, + {"name":"trogoniformes","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.creatures.provider.Cat", + "methods":[ + {"name":"breed","parameterTypes":[] }, + {"name":"name","parameterTypes":[] }, + {"name":"registry","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.creatures.provider.Dog", + "methods":[ + {"name":"age","parameterTypes":[] }, + {"name":"breed","parameterTypes":[] }, + {"name":"coatLength","parameterTypes":[] }, + {"name":"memePhrase","parameterTypes":[] }, + {"name":"name","parameterTypes":[] }, + {"name":"size","parameterTypes":[] }, + {"name":"sound","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.creatures.provider.Horse", + "methods":[ + {"name":"breed","parameterTypes":[] }, + {"name":"name","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.dictionary.Category" +}, +{ + "name":"io.github.serpro69.kfaker.dictionary.YamlCategory" +}, +{ + "name":"io.github.serpro69.kfaker.edu.EduFaker", + "methods":[ + {"name":"getEducator","parameterTypes":[] }, + {"name":"getJob","parameterTypes":[] }, + {"name":"getScience","parameterTypes":[] }, + {"name":"getUniversity","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.edu.EduFaker$Builder" +}, +{ + "name":"io.github.serpro69.kfaker.edu.provider.Degree", + "methods":[ + {"name":"courseNumber","parameterTypes":[] }, + {"name":"type","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.edu.provider.Educator", + "allDeclaredFields":true, + "allDeclaredMethods":true, + "allDeclaredConstructors":true +}, +{ + "name":"io.github.serpro69.kfaker.edu.provider.Job", + "methods":[ + {"name":"educationLevel","parameterTypes":[] }, + {"name":"employmentType","parameterTypes":[] }, + {"name":"field","parameterTypes":[] }, + {"name":"keySkills","parameterTypes":[] }, + {"name":"position","parameterTypes":[] }, + {"name":"seniority","parameterTypes":[] }, + {"name":"title","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.edu.provider.Science", + "methods":[ + {"name":"element","parameterTypes":[] }, + {"name":"elementState","parameterTypes":[] }, + {"name":"elementSubcategory","parameterTypes":[] }, + {"name":"elementSymbol","parameterTypes":[] }, + {"name":"getBranch","parameterTypes":[] }, + {"name":"modifier","parameterTypes":[] }, + {"name":"scientist","parameterTypes":[] }, + {"name":"tool","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.edu.provider.ScienceBranch", + "methods":[ + {"name":"empiricalNaturalApplied","parameterTypes":[] }, + {"name":"empiricalNaturalBasic","parameterTypes":[] }, + {"name":"empiricalSocialApplied","parameterTypes":[] }, + {"name":"empiricalSocialBasic","parameterTypes":[] }, + {"name":"formalApplied","parameterTypes":[] }, + {"name":"formalBasic","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.edu.provider.Tertiary", + "methods":[ + {"name":"getDegree","parameterTypes":[] }, + {"name":"universityType","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.edu.provider.University", + "methods":[ + {"name":"name","parameterTypes":[] }, + {"name":"prefix","parameterTypes":[] }, + {"name":"suffix","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.games.GamesFaker", + "methods":[ + {"name":"getClashOfClans","parameterTypes":[] }, + {"name":"getCoin","parameterTypes":[] }, + {"name":"getControl","parameterTypes":[] }, + {"name":"getDnd","parameterTypes":[] }, + {"name":"getDota","parameterTypes":[] }, + {"name":"getElderScrolls","parameterTypes":[] }, + {"name":"getFallout","parameterTypes":[] }, + {"name":"getFinalFantasyXIV","parameterTypes":[] }, + {"name":"getGame","parameterTypes":[] }, + {"name":"getHalfLife","parameterTypes":[] }, + {"name":"getHeroes","parameterTypes":[] }, + {"name":"getHeroesOfTheStorm","parameterTypes":[] }, + {"name":"getLeagueOfLegends","parameterTypes":[] }, + {"name":"getMinecraft","parameterTypes":[] }, + {"name":"getMyst","parameterTypes":[] }, + {"name":"getOverwatch","parameterTypes":[] }, + {"name":"getPokemon","parameterTypes":[] }, + {"name":"getSonicTheHedgehog","parameterTypes":[] }, + {"name":"getStreetFighter","parameterTypes":[] }, + {"name":"getSuperMario","parameterTypes":[] }, + {"name":"getSuperSmashBros","parameterTypes":[] }, + {"name":"getSuperhero","parameterTypes":[] }, + {"name":"getTarkov","parameterTypes":[] }, + {"name":"getTouhou","parameterTypes":[] }, + {"name":"getWarhammerFantasy","parameterTypes":[] }, + {"name":"getWitcher","parameterTypes":[] }, + {"name":"getWorldOfWarcraft","parameterTypes":[] }, + {"name":"getZelda","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.games.GamesFaker$Builder" +}, +{ + "name":"io.github.serpro69.kfaker.games.provider.ClashOfClans", + "methods":[ + {"name":"defensiveBuildings","parameterTypes":[] }, + {"name":"ranks","parameterTypes":[] }, + {"name":"troops","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.games.provider.Coin", + "methods":[{"name":"flip","parameterTypes":[] }] +}, +{ + "name":"io.github.serpro69.kfaker.games.provider.Control", + "methods":[ + {"name":"alteredItem","parameterTypes":[] }, + {"name":"alteredWorldEvent","parameterTypes":[] }, + {"name":"character","parameterTypes":[] }, + {"name":"hiss","parameterTypes":[] }, + {"name":"location","parameterTypes":[] }, + {"name":"objectOfPower","parameterTypes":[] }, + {"name":"quote","parameterTypes":[] }, + {"name":"theBoard","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.games.provider.DnD", + "methods":[ + {"name":"alignments","parameterTypes":[] }, + {"name":"backgrounds","parameterTypes":[] }, + {"name":"cities","parameterTypes":[] }, + {"name":"getName","parameterTypes":[] }, + {"name":"klasses","parameterTypes":[] }, + {"name":"languages","parameterTypes":[] }, + {"name":"meleeWeapons","parameterTypes":[] }, + {"name":"monsters","parameterTypes":[] }, + {"name":"races","parameterTypes":[] }, + {"name":"rangedWeapons","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.games.provider.DndName", + "methods":[ + {"name":"firstName","parameterTypes":[] }, + {"name":"lastName","parameterTypes":[] }, + {"name":"title","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.games.provider.Dota", + "allDeclaredFields":true, + "allDeclaredMethods":true, + "allDeclaredConstructors":true +}, +{ + "name":"io.github.serpro69.kfaker.games.provider.ElderScrolls", + "methods":[ + {"name":"city","parameterTypes":[] }, + {"name":"creature","parameterTypes":[] }, + {"name":"dragon","parameterTypes":[] }, + {"name":"firstName","parameterTypes":[] }, + {"name":"jewelry","parameterTypes":[] }, + {"name":"lastName","parameterTypes":[] }, + {"name":"race","parameterTypes":[] }, + {"name":"region","parameterTypes":[] }, + {"name":"weapon","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.games.provider.Fallout", + "methods":[ + {"name":"characters","parameterTypes":[] }, + {"name":"factions","parameterTypes":[] }, + {"name":"locations","parameterTypes":[] }, + {"name":"quotes","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.games.provider.FinalFantasyXIV", + "methods":[ + {"name":"characters","parameterTypes":[] }, + {"name":"dataCenters","parameterTypes":[] }, + {"name":"jobs","parameterTypes":[] }, + {"name":"races","parameterTypes":[] }, + {"name":"zones","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.games.provider.Game", + "methods":[{"name":"title","parameterTypes":[] }] +}, +{ + "name":"io.github.serpro69.kfaker.games.provider.HalfLife", + "methods":[ + {"name":"character","parameterTypes":[] }, + {"name":"enemy","parameterTypes":[] }, + {"name":"location","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.games.provider.Heroes", + "methods":[ + {"name":"artifacts","parameterTypes":[] }, + {"name":"klasses","parameterTypes":[] }, + {"name":"names","parameterTypes":[] }, + {"name":"specialties","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.games.provider.HeroesOfTheStorm", + "methods":[ + {"name":"battlegrounds","parameterTypes":[] }, + {"name":"classNames","parameterTypes":[] }, + {"name":"heroes","parameterTypes":[] }, + {"name":"quotes","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.games.provider.LeagueOfLegends", + "methods":[ + {"name":"champion","parameterTypes":[] }, + {"name":"location","parameterTypes":[] }, + {"name":"masteries","parameterTypes":[] }, + {"name":"quote","parameterTypes":[] }, + {"name":"rank","parameterTypes":[] }, + {"name":"summonerSpell","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.games.provider.Minecraft", + "methods":[ + {"name":"achievement","parameterTypes":[] }, + {"name":"biome","parameterTypes":[] }, + {"name":"blocks","parameterTypes":[] }, + {"name":"enchantment","parameterTypes":[] }, + {"name":"gameMode","parameterTypes":[] }, + {"name":"items","parameterTypes":[] }, + {"name":"mobs","parameterTypes":[] }, + {"name":"statusEffect","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.games.provider.Myst", + "methods":[ + {"name":"ages","parameterTypes":[] }, + {"name":"characters","parameterTypes":[] }, + {"name":"creatures","parameterTypes":[] }, + {"name":"games","parameterTypes":[] }, + {"name":"quotes","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.games.provider.Overwatch", + "methods":[ + {"name":"heroes","parameterTypes":[] }, + {"name":"locations","parameterTypes":[] }, + {"name":"quotes","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.games.provider.Pokemon", + "methods":[ + {"name":"locations","parameterTypes":[] }, + {"name":"moves","parameterTypes":[] }, + {"name":"names","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.games.provider.SonicTheHedgehog", + "methods":[ + {"name":"character","parameterTypes":[] }, + {"name":"game","parameterTypes":[] }, + {"name":"zone","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.games.provider.StreetFighter", + "methods":[ + {"name":"characters","parameterTypes":[] }, + {"name":"moves","parameterTypes":[] }, + {"name":"quotes","parameterTypes":[] }, + {"name":"stages","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.games.provider.SuperMario", + "methods":[ + {"name":"characters","parameterTypes":[] }, + {"name":"games","parameterTypes":[] }, + {"name":"locations","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.games.provider.SuperSmashBros", + "methods":[ + {"name":"fighter","parameterTypes":[] }, + {"name":"stage","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.games.provider.Superhero", + "methods":[ + {"name":"descriptor$games","parameterTypes":[] }, + {"name":"name","parameterTypes":[] }, + {"name":"power","parameterTypes":[] }, + {"name":"prefix$games","parameterTypes":[] }, + {"name":"suffix$games","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.games.provider.Tarkov", + "methods":[ + {"name":"bosses","parameterTypes":[] }, + {"name":"factions","parameterTypes":[] }, + {"name":"getQuests","parameterTypes":[] }, + {"name":"items","parameterTypes":[] }, + {"name":"locations","parameterTypes":[] }, + {"name":"traders","parameterTypes":[] }, + {"name":"weapons","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.games.provider.TarkovQuests", + "methods":[ + {"name":"fence","parameterTypes":[] }, + {"name":"jaeger","parameterTypes":[] }, + {"name":"mechanic","parameterTypes":[] }, + {"name":"peacekeeper","parameterTypes":[] }, + {"name":"prapor","parameterTypes":[] }, + {"name":"ragman","parameterTypes":[] }, + {"name":"skier","parameterTypes":[] }, + {"name":"therapist","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.games.provider.Touhou", + "methods":[ + {"name":"characters","parameterTypes":[] }, + {"name":"games","parameterTypes":[] }, + {"name":"locations","parameterTypes":[] }, + {"name":"songs","parameterTypes":[] }, + {"name":"spellCards","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.games.provider.WarhammerFantasy", + "methods":[ + {"name":"creatures","parameterTypes":[] }, + {"name":"factions","parameterTypes":[] }, + {"name":"heroes","parameterTypes":[] }, + {"name":"locations","parameterTypes":[] }, + {"name":"quotes","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.games.provider.Witcher", + "methods":[ + {"name":"books","parameterTypes":[] }, + {"name":"characters","parameterTypes":[] }, + {"name":"locations","parameterTypes":[] }, + {"name":"monsters","parameterTypes":[] }, + {"name":"potions","parameterTypes":[] }, + {"name":"quotes","parameterTypes":[] }, + {"name":"schools","parameterTypes":[] }, + {"name":"signs","parameterTypes":[] }, + {"name":"witchers","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.games.provider.WorldOfWarcraft", + "methods":[ + {"name":"classNames","parameterTypes":[] }, + {"name":"hero","parameterTypes":[] }, + {"name":"quotes","parameterTypes":[] }, + {"name":"races","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.games.provider.Zelda", + "methods":[ + {"name":"characters","parameterTypes":[] }, + {"name":"games","parameterTypes":[] }, + {"name":"items","parameterTypes":[] }, + {"name":"locations","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.humor.HumorFaker", + "methods":[ + {"name":"getChiquito","parameterTypes":[] }, + {"name":"getChuckNorris","parameterTypes":[] }, + {"name":"getFunnyName","parameterTypes":[] }, + {"name":"getJackHandey","parameterTypes":[] }, + {"name":"getMitchHedberg","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.humor.HumorFaker$Builder" +}, +{ + "name":"io.github.serpro69.kfaker.humor.provider.Chiquito", + "methods":[ + {"name":"expressions","parameterTypes":[] }, + {"name":"jokes","parameterTypes":[] }, + {"name":"sentences","parameterTypes":[] }, + {"name":"terms","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.humor.provider.ChuckNorris", + "methods":[{"name":"fact","parameterTypes":[] }] +}, +{ + "name":"io.github.serpro69.kfaker.humor.provider.FunnyName", + "methods":[{"name":"name","parameterTypes":[] }] +}, +{ + "name":"io.github.serpro69.kfaker.humor.provider.JackHandey", + "methods":[{"name":"quote","parameterTypes":[] }] +}, +{ + "name":"io.github.serpro69.kfaker.humor.provider.MitchHedberg", + "methods":[{"name":"quote","parameterTypes":[] }] +}, +{ + "name":"io.github.serpro69.kfaker.japmedia.JapaneseMediaFaker", + "methods":[ + {"name":"getConan","parameterTypes":[] }, + {"name":"getCowboyBebop","parameterTypes":[] }, + {"name":"getDoraemon","parameterTypes":[] }, + {"name":"getDragonBall","parameterTypes":[] }, + {"name":"getFmaBrotherhood","parameterTypes":[] }, + {"name":"getKamenRider","parameterTypes":[] }, + {"name":"getNaruto","parameterTypes":[] }, + {"name":"getOnePiece","parameterTypes":[] }, + {"name":"getStudioGhibli","parameterTypes":[] }, + {"name":"getSwordArtOnline","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.japmedia.JapaneseMediaFaker$Builder" +}, +{ + "name":"io.github.serpro69.kfaker.japmedia.provider.Conan", + "methods":[ + {"name":"characters","parameterTypes":[] }, + {"name":"gadgets","parameterTypes":[] }, + {"name":"vehicles","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.japmedia.provider.CowboyBebop", + "methods":[ + {"name":"character","parameterTypes":[] }, + {"name":"episode","parameterTypes":[] }, + {"name":"quote","parameterTypes":[] }, + {"name":"song","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.japmedia.provider.Doraemon", + "methods":[ + {"name":"characters","parameterTypes":[] }, + {"name":"gadgets","parameterTypes":[] }, + {"name":"locations","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.japmedia.provider.DragonBall", + "methods":[ + {"name":"characters","parameterTypes":[] }, + {"name":"planets","parameterTypes":[] }, + {"name":"races","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.japmedia.provider.FmaBrotherhood", + "methods":[ + {"name":"characters","parameterTypes":[] }, + {"name":"cities","parameterTypes":[] }, + {"name":"countries","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.japmedia.provider.KamenRider", + "methods":[ + {"name":"getHeisei","parameterTypes":[] }, + {"name":"getReiwa","parameterTypes":[] }, + {"name":"getShowa","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.japmedia.provider.KamenRiderHeisei", + "methods":[ + {"name":"collectibleDevices","parameterTypes":[] }, + {"name":"kamenRiders","parameterTypes":[] }, + {"name":"series","parameterTypes":[] }, + {"name":"transformationDevices","parameterTypes":[] }, + {"name":"users","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.japmedia.provider.KamenRiderReiwa", + "methods":[ + {"name":"collectibleDevices","parameterTypes":[] }, + {"name":"kamenRiders","parameterTypes":[] }, + {"name":"series","parameterTypes":[] }, + {"name":"transformationDevices","parameterTypes":[] }, + {"name":"users","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.japmedia.provider.KamenRiderShowa", + "methods":[ + {"name":"kamenRiders","parameterTypes":[] }, + {"name":"series","parameterTypes":[] }, + {"name":"transformationDevices","parameterTypes":[] }, + {"name":"users","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.japmedia.provider.Naruto", + "methods":[ + {"name":"characters","parameterTypes":[] }, + {"name":"demons","parameterTypes":[] }, + {"name":"eyes","parameterTypes":[] }, + {"name":"villages","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.japmedia.provider.OnePiece", + "allDeclaredFields":true, + "allDeclaredMethods":true, + "allDeclaredConstructors":true +}, +{ + "name":"io.github.serpro69.kfaker.japmedia.provider.StudioGhibli", + "methods":[ + {"name":"characters","parameterTypes":[] }, + {"name":"movies","parameterTypes":[] }, + {"name":"quotes","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.japmedia.provider.SwordArtOnline", + "methods":[ + {"name":"gameName","parameterTypes":[] }, + {"name":"item","parameterTypes":[] }, + {"name":"location","parameterTypes":[] }, + {"name":"realName","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.lorem.LoremFaker", + "methods":[ + {"name":"getAdjective","parameterTypes":[] }, + {"name":"getEmotion","parameterTypes":[] }, + {"name":"getHipster","parameterTypes":[] }, + {"name":"getLorem","parameterTypes":[] }, + {"name":"getMarkdown","parameterTypes":[] }, + {"name":"getNatoPhoneticAlphabet","parameterTypes":[] }, + {"name":"getSlackEmoji","parameterTypes":[] }, + {"name":"getQuote","parameterTypes":[] }, + {"name":"getVerbs","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.lorem.LoremFaker$Builder" +}, +{ + "name":"io.github.serpro69.kfaker.lorem.provider.Adjective", + "methods":[ + {"name":"negative","parameterTypes":[] }, + {"name":"positive","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.lorem.provider.Emotion", + "methods":[ + {"name":"adjective","parameterTypes":[] }, + {"name":"noun","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.lorem.provider.Hipster", + "methods":[{"name":"words","parameterTypes":[] }] +}, +{ + "name":"io.github.serpro69.kfaker.lorem.provider.Lorem", + "allDeclaredFields":true, + "allDeclaredMethods":true, + "allDeclaredConstructors":true +}, +{ + "name":"io.github.serpro69.kfaker.lorem.provider.Markdown", + "methods":[ + {"name":"emphasis","parameterTypes":[] }, + {"name":"headers","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.lorem.provider.NatoPhoneticAlphabet", + "methods":[{"name":"codeWord","parameterTypes":[] }] +}, +{ + "name":"io.github.serpro69.kfaker.lorem.provider.SlackEmoji", + "methods":[ + {"name":"activity","parameterTypes":[] }, + {"name":"celebration","parameterTypes":[] }, + {"name":"custom","parameterTypes":[] }, + {"name":"emoji","parameterTypes":[] }, + {"name":"foodAndDrink","parameterTypes":[] }, + {"name":"nature","parameterTypes":[] }, + {"name":"objectsAndSymbols","parameterTypes":[] }, + {"name":"people","parameterTypes":[] }, + {"name":"travelAndPlaces","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.lorem.provider.Quote", + "methods":[ + {"name":"famousLastWords","parameterTypes":[] }, + {"name":"fortuneCookie","parameterTypes":[] }, + {"name":"matz","parameterTypes":[] }, + {"name":"mostInterestingManInTheWorld","parameterTypes":[] }, + {"name":"robin","parameterTypes":[] }, + {"name":"singularSiegler","parameterTypes":[] }, + {"name":"yoda","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.lorem.provider.Verbs", + "methods":[ + {"name":"base","parameterTypes":[] }, + {"name":"ingForm","parameterTypes":[] }, + {"name":"past","parameterTypes":[] }, + {"name":"pastParticiple","parameterTypes":[] }, + {"name":"simplePresent","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.misc.MiscFaker", + "methods":[ + {"name":"getArtist","parameterTypes":[] }, + {"name":"getBlood","parameterTypes":[] }, + {"name":"getDemographic","parameterTypes":[] }, + {"name":"getDrivingLicense","parameterTypes":[] }, + {"name":"getGreekPhilosophers","parameterTypes":[] }, + {"name":"getHobby","parameterTypes":[] }, + {"name":"getMilitary","parameterTypes":[] }, + {"name":"getRelationship","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.misc.MiscFaker$Builder" +}, +{ + "name":"io.github.serpro69.kfaker.misc.provider.Artist", + "methods":[{"name":"names","parameterTypes":[] }] +}, +{ + "name":"io.github.serpro69.kfaker.misc.provider.Blood", + "methods":[ + {"name":"group","parameterTypes":[] }, + {"name":"rhFactor","parameterTypes":[] }, + {"name":"type","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.misc.provider.Demographic", + "methods":[ + {"name":"demonym","parameterTypes":[] }, + {"name":"educationalAttainment","parameterTypes":[] }, + {"name":"maritalStatus","parameterTypes":[] }, + {"name":"race","parameterTypes":[] }, + {"name":"sex","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.misc.provider.DrivingLicense", + "methods":[ + {"name":"license","parameterTypes":[] }, + {"name":"licenseByState","parameterTypes":["java.lang.String"] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.misc.provider.GreekPhilosophers", + "methods":[ + {"name":"names","parameterTypes":[] }, + {"name":"quotes","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.misc.provider.Hobby", + "methods":[{"name":"activity","parameterTypes":[] }] +}, +{ + "name":"io.github.serpro69.kfaker.misc.provider.Military", + "methods":[ + {"name":"airForceRank","parameterTypes":[] }, + {"name":"armyRank","parameterTypes":[] }, + {"name":"coastGuardRank","parameterTypes":[] }, + {"name":"dodPaygrade","parameterTypes":[] }, + {"name":"marinesRank","parameterTypes":[] }, + {"name":"navyRank","parameterTypes":[] }, + {"name":"spaceForceRank","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.misc.provider.Relationship", + "methods":[ + {"name":"familial","parameterTypes":[] }, + {"name":"familialDirect","parameterTypes":[] }, + {"name":"familialExtended","parameterTypes":[] }, + {"name":"inLaw","parameterTypes":[] }, + {"name":"parent","parameterTypes":[] }, + {"name":"sibling","parameterTypes":[] }, + {"name":"spouse","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.movies.MoviesFaker", + "methods":[ + {"name":"getAvatar","parameterTypes":[] }, + {"name":"getBackToTheFuture","parameterTypes":[] }, + {"name":"getDeparted","parameterTypes":[] }, + {"name":"getDumbAndDumber","parameterTypes":[] }, + {"name":"getGhostBusters","parameterTypes":[] }, + {"name":"getHackers","parameterTypes":[] }, + {"name":"getHarryPotter","parameterTypes":[] }, + {"name":"getHitchhikersGuideToTheGalaxy","parameterTypes":[] }, + {"name":"getHobbit","parameterTypes":[] }, + {"name":"getHowToTrainYourDragon","parameterTypes":[] }, + {"name":"getLebowski","parameterTypes":[] }, + {"name":"getLordOfTheRings","parameterTypes":[] }, + {"name":"getMovie","parameterTypes":[] }, + {"name":"getPrincessBride","parameterTypes":[] }, + {"name":"getRajnikanth","parameterTypes":[] }, + {"name":"getStarWars","parameterTypes":[] }, + {"name":"getTheRoom","parameterTypes":[] }, + {"name":"getTron","parameterTypes":[] }, + {"name":"getVForVendetta","parameterTypes":[] }, + {"name":"getYoda","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.movies.MoviesFaker$Builder" +}, +{ + "name":"io.github.serpro69.kfaker.movies.provider.Avatar", + "methods":[ + {"name":"characters","parameterTypes":[] }, + {"name":"dates","parameterTypes":[] }, + {"name":"quotes","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.movies.provider.BackToTheFuture", + "methods":[ + {"name":"characters","parameterTypes":[] }, + {"name":"dates","parameterTypes":[] }, + {"name":"quotes","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.movies.provider.Departed", + "methods":[ + {"name":"actors","parameterTypes":[] }, + {"name":"characters","parameterTypes":[] }, + {"name":"quotes","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.movies.provider.DumbAndDumber", + "methods":[ + {"name":"actors","parameterTypes":[] }, + {"name":"characters","parameterTypes":[] }, + {"name":"quotes","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.movies.provider.GhostBusters", + "methods":[ + {"name":"actors","parameterTypes":[] }, + {"name":"characters","parameterTypes":[] }, + {"name":"quotes","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.movies.provider.Hackers", + "methods":[ + {"name":"characters","parameterTypes":[] }, + {"name":"handles","parameterTypes":[] }, + {"name":"quotes","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.movies.provider.HarryPotter", + "methods":[ + {"name":"books","parameterTypes":[] }, + {"name":"characters","parameterTypes":[] }, + {"name":"houses","parameterTypes":[] }, + {"name":"locations","parameterTypes":[] }, + {"name":"quotes","parameterTypes":[] }, + {"name":"spells","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.movies.provider.HitchhikersGuideToTheGalaxy", + "methods":[ + {"name":"characters","parameterTypes":[] }, + {"name":"locations","parameterTypes":[] }, + {"name":"marvinQuote","parameterTypes":[] }, + {"name":"planets","parameterTypes":[] }, + {"name":"quotes","parameterTypes":[] }, + {"name":"species","parameterTypes":[] }, + {"name":"starships","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.movies.provider.Hobbit", + "methods":[ + {"name":"character","parameterTypes":[] }, + {"name":"location","parameterTypes":[] }, + {"name":"quote","parameterTypes":[] }, + {"name":"thorinsCompany","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.movies.provider.HowToTrainYourDragon", + "methods":[ + {"name":"characters","parameterTypes":[] }, + {"name":"dragons","parameterTypes":[] }, + {"name":"locations","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.movies.provider.Lebowski", + "methods":[ + {"name":"actors","parameterTypes":[] }, + {"name":"characters","parameterTypes":[] }, + {"name":"quotes","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.movies.provider.LordOfTheRings", + "methods":[ + {"name":"characters","parameterTypes":[] }, + {"name":"locations","parameterTypes":[] }, + {"name":"quotes","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.movies.provider.Movie", + "methods":[ + {"name":"quote","parameterTypes":[] }, + {"name":"title","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.movies.provider.PrincessBride", + "methods":[ + {"name":"characters","parameterTypes":[] }, + {"name":"quotes","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.movies.provider.Rajnikanth", + "methods":[{"name":"joke","parameterTypes":[] }] +}, +{ + "name":"io.github.serpro69.kfaker.movies.provider.StarWars", + "methods":[ + {"name":"alternateCharacterSpellings","parameterTypes":["java.lang.String"] }, + {"name":"callNumbers","parameterTypes":[] }, + {"name":"callSign","parameterTypes":[] }, + {"name":"callSquadrons","parameterTypes":[] }, + {"name":"characters","parameterTypes":[] }, + {"name":"droids","parameterTypes":[] }, + {"name":"planets","parameterTypes":[] }, + {"name":"quote","parameterTypes":[] }, + {"name":"quotes","parameterTypes":["java.lang.String"] }, + {"name":"species","parameterTypes":[] }, + {"name":"vehicles","parameterTypes":[] }, + {"name":"wookieeWords","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.movies.provider.TheRoom", + "methods":[ + {"name":"actors","parameterTypes":[] }, + {"name":"characters","parameterTypes":[] }, + {"name":"locations","parameterTypes":[] }, + {"name":"quotes","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.movies.provider.Tron", + "methods":[ + {"name":"alternateCharacterSpellings","parameterTypes":["io.github.serpro69.kfaker.movies.provider.TronAlternateCharacter"] }, + {"name":"alternateCharacterSpellings$default","parameterTypes":["io.github.serpro69.kfaker.movies.provider.Tron","io.github.serpro69.kfaker.movies.provider.TronAlternateCharacter","int","java.lang.Object"] }, + {"name":"characters","parameterTypes":["io.github.serpro69.kfaker.movies.provider.TronCharacterType"] }, + {"name":"characters$default","parameterTypes":["io.github.serpro69.kfaker.movies.provider.Tron","io.github.serpro69.kfaker.movies.provider.TronCharacterType","int","java.lang.Object"] }, + {"name":"games","parameterTypes":[] }, + {"name":"locations","parameterTypes":[] }, + {"name":"quotes","parameterTypes":["io.github.serpro69.kfaker.movies.provider.TronCharacter"] }, + {"name":"quotes$default","parameterTypes":["io.github.serpro69.kfaker.movies.provider.Tron","io.github.serpro69.kfaker.movies.provider.TronCharacter","int","java.lang.Object"] }, + {"name":"taglines","parameterTypes":[] }, + {"name":"vehicles","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.movies.provider.TronAlternateCharacter" +}, +{ + "name":"io.github.serpro69.kfaker.movies.provider.TronCharacter" +}, +{ + "name":"io.github.serpro69.kfaker.movies.provider.TronCharacterType" +}, +{ + "name":"io.github.serpro69.kfaker.movies.provider.VForVendetta", + "methods":[ + {"name":"characters","parameterTypes":[] }, + {"name":"quotes","parameterTypes":[] }, + {"name":"speeches","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.movies.provider.Yoda", + "methods":[{"name":"quotes","parameterTypes":[] }] +}, +{ + "name":"io.github.serpro69.kfaker.music.MusicFaker", + "methods":[ + {"name":"getBossaNova","parameterTypes":[] }, + {"name":"getGratefulDead","parameterTypes":[] }, + {"name":"getHipHop","parameterTypes":[] }, + {"name":"getKPop","parameterTypes":[] }, + {"name":"getMusic","parameterTypes":[] }, + {"name":"getOpera","parameterTypes":[] }, + {"name":"getPearlJam","parameterTypes":[] }, + {"name":"getPhish","parameterTypes":[] }, + {"name":"getPrince","parameterTypes":[] }, + {"name":"getRockBand","parameterTypes":[] }, + {"name":"getRush","parameterTypes":[] }, + {"name":"getShow","parameterTypes":[] }, + {"name":"getSmashingPumpkins","parameterTypes":[] }, + {"name":"getUmphreysMcgee","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.music.MusicFaker$Builder" +}, +{ + "name":"io.github.serpro69.kfaker.music.provider.BossaNova", + "methods":[ + {"name":"artists","parameterTypes":[] }, + {"name":"songs","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.music.provider.FrenchOpera", + "methods":[ + {"name":"byCamilleSaintSaens","parameterTypes":[] }, + {"name":"byCharlesGounod","parameterTypes":[] }, + {"name":"byChristophWillibaldGluck","parameterTypes":[] }, + {"name":"byGeorgesBizet","parameterTypes":[] }, + {"name":"byHectorBerlioz","parameterTypes":[] }, + {"name":"byMauriceRavel","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.music.provider.GermanOpera", + "methods":[ + {"name":"byAlbanBerg","parameterTypes":[] }, + {"name":"byCarlMariaVonWeber","parameterTypes":[] }, + {"name":"byFranzSchubert","parameterTypes":[] }, + {"name":"byLudwigVanBeethoven","parameterTypes":[] }, + {"name":"byRichardStrauss","parameterTypes":[] }, + {"name":"byRichardWagner","parameterTypes":[] }, + {"name":"byRobertSchumann","parameterTypes":[] }, + {"name":"byWolfgangAmadeusMozart","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.music.provider.GratefulDead", + "methods":[ + {"name":"players","parameterTypes":[] }, + {"name":"songs","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.music.provider.HipHop", + "methods":[ + {"name":"artist","parameterTypes":[] }, + {"name":"groups","parameterTypes":[] }, + {"name":"subgenres","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.music.provider.ItalianOpera", + "methods":[ + {"name":"byChristophWillibaldGluck","parameterTypes":[] }, + {"name":"byGaetanoDonizetti","parameterTypes":[] }, + {"name":"byGioacchinoRossini","parameterTypes":[] }, + {"name":"byGiuseppeVerdi","parameterTypes":[] }, + {"name":"byVincenzoBellini","parameterTypes":[] }, + {"name":"byWolfgangAmadeusMozart","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.music.provider.KPop", + "methods":[ + {"name":"boyBands","parameterTypes":[] }, + {"name":"firstGroups","parameterTypes":[] }, + {"name":"girlGroups","parameterTypes":[] }, + {"name":"secondGroups","parameterTypes":[] }, + {"name":"solo","parameterTypes":[] }, + {"name":"thirdGroups","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.music.provider.Music", + "allDeclaredFields":true, + "allDeclaredMethods":true, + "allDeclaredConstructors":true +}, +{ + "name":"io.github.serpro69.kfaker.music.provider.Opera", + "methods":[ + {"name":"getFrench","parameterTypes":[] }, + {"name":"getGerman","parameterTypes":[] }, + {"name":"getItalian","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.music.provider.PearlJam", + "methods":[ + {"name":"albums","parameterTypes":[] }, + {"name":"musicians","parameterTypes":[] }, + {"name":"songs","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.music.provider.Phish", + "methods":[ + {"name":"albums","parameterTypes":[] }, + {"name":"musicians","parameterTypes":[] }, + {"name":"songs","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.music.provider.Prince", + "methods":[ + {"name":"album","parameterTypes":[] }, + {"name":"band","parameterTypes":[] }, + {"name":"lyric","parameterTypes":[] }, + {"name":"song","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.music.provider.RockBand", + "methods":[ + {"name":"name","parameterTypes":[] }, + {"name":"song","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.music.provider.Rush", + "methods":[ + {"name":"albums","parameterTypes":[] }, + {"name":"players","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.music.provider.Show", + "methods":[ + {"name":"adultMusical","parameterTypes":[] }, + {"name":"kidsMusical","parameterTypes":[] }, + {"name":"play","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.music.provider.SmashingPumpkins", + "methods":[ + {"name":"albums","parameterTypes":[] }, + {"name":"lyric","parameterTypes":[] }, + {"name":"musicians","parameterTypes":[] }, + {"name":"songs","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.music.provider.UmphreysMcgee", + "methods":[{"name":"song","parameterTypes":[] }] +}, +{ + "name":"io.github.serpro69.kfaker.provider.AbstractFakeDataProvider" +}, +{ + "name":"io.github.serpro69.kfaker.provider.Address", + "allDeclaredFields":true, + "allDeclaredMethods":true, + "allDeclaredConstructors":true +}, +{ + "name":"io.github.serpro69.kfaker.provider.CellPhone", + "methods":[{"name":"number","parameterTypes":[] }] +}, +{ + "name":"io.github.serpro69.kfaker.provider.Color", + "methods":[{"name":"name","parameterTypes":[] }] +}, +{ + "name":"io.github.serpro69.kfaker.provider.CountryCode" +}, +{ + "name":"io.github.serpro69.kfaker.provider.Currency", + "methods":[ + {"name":"code","parameterTypes":[] }, + {"name":"name","parameterTypes":[] }, + {"name":"symbol","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.provider.CurrencySymbol", + "methods":[{"name":"symbol","parameterTypes":[] }] +}, +{ + "name":"io.github.serpro69.kfaker.provider.FakeDataProvider" +}, +{ + "name":"io.github.serpro69.kfaker.provider.File", + "allDeclaredFields":true, + "allDeclaredMethods":true, + "allDeclaredConstructors":true +}, +{ + "name":"io.github.serpro69.kfaker.provider.FileMimeType", + "methods":[ + {"name":"application","parameterTypes":[] }, + {"name":"audio","parameterTypes":[] }, + {"name":"image","parameterTypes":[] }, + {"name":"message","parameterTypes":[] }, + {"name":"model","parameterTypes":[] }, + {"name":"multipart","parameterTypes":[] }, + {"name":"text","parameterTypes":[] }, + {"name":"video","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.provider.Gender", + "methods":[ + {"name":"binaryTypes","parameterTypes":[] }, + {"name":"shortBinaryTypes","parameterTypes":[] }, + {"name":"types","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.provider.IdNumber", + "methods":[{"name":"invalid","parameterTypes":[] }] +}, +{ + "name":"io.github.serpro69.kfaker.provider.Internet", + "allDeclaredFields":true, + "allDeclaredMethods":true, + "allDeclaredConstructors":true +}, +{ + "name":"io.github.serpro69.kfaker.provider.Measurement", + "methods":[ + {"name":"height","parameterTypes":[] }, + {"name":"length","parameterTypes":[] }, + {"name":"metricHeight","parameterTypes":[] }, + {"name":"metricLength","parameterTypes":[] }, + {"name":"metricVolume","parameterTypes":[] }, + {"name":"metricWeight","parameterTypes":[] }, + {"name":"volume","parameterTypes":[] }, + {"name":"weight","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.provider.Money", + "allDeclaredFields":true, + "allDeclaredMethods":true, + "allDeclaredConstructors":true +}, +{ + "name":"io.github.serpro69.kfaker.provider.Name", + "allDeclaredFields":true, + "allDeclaredMethods":true, + "allDeclaredConstructors":true +}, +{ + "name":"io.github.serpro69.kfaker.provider.Person" +}, +{ + "name":"io.github.serpro69.kfaker.provider.PhoneNumber", + "allDeclaredFields":true, + "allDeclaredMethods":true, + "allDeclaredConstructors":true +}, +{ + "name":"io.github.serpro69.kfaker.provider.Separator", + "methods":[{"name":"separator","parameterTypes":[] }] +}, +{ + "name":"io.github.serpro69.kfaker.provider.YamlFakeDataProvider" +}, +{ + "name":"io.github.serpro69.kfaker.provider.misc.CryptographyProvider", + "methods":[ + {"name":"md5","parameterTypes":[] }, + {"name":"sha1","parameterTypes":[] }, + {"name":"sha224","parameterTypes":[] }, + {"name":"sha256","parameterTypes":[] }, + {"name":"sha384","parameterTypes":[] }, + {"name":"sha512","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.provider.misc.RandomClassProvider" +}, +{ + "name":"io.github.serpro69.kfaker.provider.misc.RandomProvider" +}, +{ + "name":"io.github.serpro69.kfaker.provider.misc.StringProvider" +}, +{ + "name":"io.github.serpro69.kfaker.provider.unique.GlobalUniqueDataDataProvider" +}, +{ + "name":"io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider" +}, +{ + "name":"io.github.serpro69.kfaker.sports.SportsFaker", + "methods":[ + {"name":"getBasketball","parameterTypes":[] }, + {"name":"getChess","parameterTypes":[] }, + {"name":"getCrossfit","parameterTypes":[] }, + {"name":"getESport","parameterTypes":[] }, + {"name":"getFootball","parameterTypes":[] }, + {"name":"getMountaineering","parameterTypes":[] }, + {"name":"getSport","parameterTypes":[] }, + {"name":"getTeam","parameterTypes":[] }, + {"name":"getVolleyball","parameterTypes":[] }, + {"name":"getWorldCup","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.sports.SportsFaker$Builder" +}, +{ + "name":"io.github.serpro69.kfaker.sports.provider.Basketball", + "methods":[ + {"name":"coaches","parameterTypes":[] }, + {"name":"players","parameterTypes":[] }, + {"name":"positions","parameterTypes":[] }, + {"name":"teams","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.sports.provider.Chess", + "methods":[ + {"name":"openings","parameterTypes":[] }, + {"name":"players","parameterTypes":[] }, + {"name":"titles","parameterTypes":[] }, + {"name":"tournaments","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.sports.provider.Crossfit", + "methods":[ + {"name":"competitions","parameterTypes":[] }, + {"name":"femaleAthletes","parameterTypes":[] }, + {"name":"girlWorkouts","parameterTypes":[] }, + {"name":"heroWorkouts","parameterTypes":[] }, + {"name":"maleAthletes","parameterTypes":[] }, + {"name":"movements","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.sports.provider.ESport", + "methods":[ + {"name":"events","parameterTypes":[] }, + {"name":"games","parameterTypes":[] }, + {"name":"leagues","parameterTypes":[] }, + {"name":"players","parameterTypes":[] }, + {"name":"teams","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.sports.provider.Football", + "methods":[ + {"name":"coaches","parameterTypes":[] }, + {"name":"competitions","parameterTypes":[] }, + {"name":"players","parameterTypes":[] }, + {"name":"positions","parameterTypes":[] }, + {"name":"teams","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.sports.provider.Mountaineering", + "methods":[{"name":"mountaineer","parameterTypes":[] }] +}, +{ + "name":"io.github.serpro69.kfaker.sports.provider.Sport", + "methods":[ + {"name":"ancientOlympics","parameterTypes":[] }, + {"name":"summerOlympics","parameterTypes":[] }, + {"name":"summerParalympics","parameterTypes":[] }, + {"name":"unusual","parameterTypes":[] }, + {"name":"winterOlympics","parameterTypes":[] }, + {"name":"winterParalympics","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.sports.provider.Team", + "methods":[ + {"name":"mascot","parameterTypes":[] }, + {"name":"name","parameterTypes":[] }, + {"name":"sport","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.sports.provider.Volleyball", + "methods":[ + {"name":"coach","parameterTypes":[] }, + {"name":"formation","parameterTypes":[] }, + {"name":"player","parameterTypes":[] }, + {"name":"position","parameterTypes":[] }, + {"name":"team","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.sports.provider.WorldCup", + "allDeclaredFields":true, + "allDeclaredMethods":true, + "allDeclaredConstructors":true +}, +{ + "name":"io.github.serpro69.kfaker.tech.TechFaker", + "methods":[ + {"name":"getApp","parameterTypes":[] }, + {"name":"getAppliance","parameterTypes":[] }, + {"name":"getCamera","parameterTypes":[] }, + {"name":"getComputer","parameterTypes":[] }, + {"name":"getCryptoCoin","parameterTypes":[] }, + {"name":"getDevice","parameterTypes":[] }, + {"name":"getDrone","parameterTypes":[] }, + {"name":"getElectricalComponents","parameterTypes":[] }, + {"name":"getHacker","parameterTypes":[] }, + {"name":"getProgrammingLanguage","parameterTypes":[] }, + {"name":"getSpace","parameterTypes":[] }, + {"name":"getVehicle","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.tech.TechFaker$Builder" +}, +{ + "name":"io.github.serpro69.kfaker.tech.provider.App", + "methods":[ + {"name":"author","parameterTypes":[] }, + {"name":"name","parameterTypes":[] }, + {"name":"version","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.tech.provider.Appliance", + "methods":[ + {"name":"brand","parameterTypes":[] }, + {"name":"equipment","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.tech.provider.Camera", + "methods":[ + {"name":"brand","parameterTypes":[] }, + {"name":"brandWithModel","parameterTypes":[] }, + {"name":"model","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.tech.provider.Computer", + "allDeclaredFields":true, + "allDeclaredMethods":true, + "allDeclaredConstructors":true +}, +{ + "name":"io.github.serpro69.kfaker.tech.provider.ComputerOS", + "methods":[ + {"name":"linux","parameterTypes":[] }, + {"name":"macOS","parameterTypes":[] }, + {"name":"openBsd","parameterTypes":[] }, + {"name":"plan9","parameterTypes":[] }, + {"name":"templeOS","parameterTypes":[] }, + {"name":"windows","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.tech.provider.CryptoCoin", + "methods":[{"name":"coin","parameterTypes":[] }] +}, +{ + "name":"io.github.serpro69.kfaker.tech.provider.Device", + "methods":[ + {"name":"manufacturer","parameterTypes":[] }, + {"name":"modelName","parameterTypes":[] }, + {"name":"platform","parameterTypes":[] }, + {"name":"serial","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.tech.provider.Drone", + "methods":[ + {"name":"batteryCapacity","parameterTypes":[] }, + {"name":"batteryType","parameterTypes":[] }, + {"name":"batteryVoltage","parameterTypes":[] }, + {"name":"batteryWeight","parameterTypes":[] }, + {"name":"chargingTemperature","parameterTypes":[] }, + {"name":"flightTime","parameterTypes":[] }, + {"name":"iso","parameterTypes":[] }, + {"name":"maxAltitude","parameterTypes":[] }, + {"name":"maxAngularVelocity","parameterTypes":[] }, + {"name":"maxAscentSpeed","parameterTypes":[] }, + {"name":"maxChargingPower","parameterTypes":[] }, + {"name":"maxDescentSpeed","parameterTypes":[] }, + {"name":"maxFlightDistance","parameterTypes":[] }, + {"name":"maxResolution","parameterTypes":[] }, + {"name":"maxShutterSpeed","parameterTypes":[] }, + {"name":"maxSpeed","parameterTypes":[] }, + {"name":"maxTiltAngle","parameterTypes":[] }, + {"name":"maxWindResistance","parameterTypes":[] }, + {"name":"minShutterSpeed","parameterTypes":[] }, + {"name":"name","parameterTypes":[] }, + {"name":"operatingTemperature","parameterTypes":[] }, + {"name":"photoFormat","parameterTypes":[] }, + {"name":"shutterSpeedUnits","parameterTypes":[] }, + {"name":"videoFormat","parameterTypes":[] }, + {"name":"weight","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.tech.provider.ElectricalComponents", + "methods":[ + {"name":"active","parameterTypes":[] }, + {"name":"electromechanical","parameterTypes":[] }, + {"name":"passive","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.tech.provider.Hacker", + "methods":[ + {"name":"abbreviation","parameterTypes":[] }, + {"name":"adjective","parameterTypes":[] }, + {"name":"ingverb","parameterTypes":[] }, + {"name":"noun","parameterTypes":[] }, + {"name":"verb","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.tech.provider.ProgrammingLanguage", + "methods":[ + {"name":"creator","parameterTypes":[] }, + {"name":"name","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.tech.provider.Space", + "methods":[ + {"name":"agency","parameterTypes":[] }, + {"name":"agencyAbv","parameterTypes":[] }, + {"name":"company","parameterTypes":[] }, + {"name":"constellation","parameterTypes":[] }, + {"name":"distanceMeasurement","parameterTypes":[] }, + {"name":"galaxy","parameterTypes":[] }, + {"name":"launchVehicle","parameterTypes":[] }, + {"name":"meteorite","parameterTypes":[] }, + {"name":"moon","parameterTypes":[] }, + {"name":"nasaSpaceCraft","parameterTypes":[] }, + {"name":"nebula","parameterTypes":[] }, + {"name":"planet","parameterTypes":[] }, + {"name":"star","parameterTypes":[] }, + {"name":"starCluster","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.tech.provider.Vehicle", + "methods":[ + {"name":"carOptions","parameterTypes":[] }, + {"name":"carTypes","parameterTypes":[] }, + {"name":"colors","parameterTypes":[] }, + {"name":"cylinderEngine","parameterTypes":[] }, + {"name":"doors","parameterTypes":[] }, + {"name":"driveTypes","parameterTypes":[] }, + {"name":"engineSizes","parameterTypes":[] }, + {"name":"fuelTypes","parameterTypes":[] }, + {"name":"licencePlateByState","parameterTypes":["java.lang.String"] }, + {"name":"licensePlate","parameterTypes":[] }, + {"name":"makes","parameterTypes":[] }, + {"name":"manufacture","parameterTypes":[] }, + {"name":"modelsByMake","parameterTypes":["java.lang.String"] }, + {"name":"standardSpecs","parameterTypes":[] }, + {"name":"styles","parameterTypes":[] }, + {"name":"transmissions","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.travel.TravelFaker", + "methods":[ + {"name":"getAirport","parameterTypes":[] }, + {"name":"getAustralia","parameterTypes":[] }, + {"name":"getMountain","parameterTypes":[] }, + {"name":"getNation","parameterTypes":[] }, + {"name":"getTrainStation","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.travel.TravelFaker$Builder" +}, +{ + "name":"io.github.serpro69.kfaker.travel.provider.Airport", + "methods":[ + {"name":"getEuropeanUnion","parameterTypes":[] }, + {"name":"getUnitedStates","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.travel.provider.Australia", + "methods":[ + {"name":"animals","parameterTypes":[] }, + {"name":"locations","parameterTypes":[] }, + {"name":"states","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.travel.provider.EuropeanUnion", + "methods":[ + {"name":"large","parameterTypes":[] }, + {"name":"medium","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.travel.provider.IataCode" +}, +{ + "name":"io.github.serpro69.kfaker.travel.provider.Mountain", + "methods":[ + {"name":"name","parameterTypes":[] }, + {"name":"range","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.travel.provider.Nation", + "allDeclaredFields":true, + "allDeclaredMethods":true, + "allDeclaredConstructors":true +}, +{ + "name":"io.github.serpro69.kfaker.travel.provider.TrainStation", + "methods":[ + {"name":"getGermany","parameterTypes":[] }, + {"name":"getSpain","parameterTypes":[] }, + {"name":"getUnitedKingdom","parameterTypes":[] }, + {"name":"getUnitedStates","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.travel.provider.TrainStationGermany", + "methods":[ + {"name":"metro","parameterTypes":[] }, + {"name":"railway","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.travel.provider.TrainStationSpain", + "methods":[ + {"name":"metro","parameterTypes":[] }, + {"name":"railway","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.travel.provider.TrainStationUnitedKingdom", + "methods":[ + {"name":"metro","parameterTypes":[] }, + {"name":"railway","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.travel.provider.TrainStationUnitedStates", + "methods":[ + {"name":"metro","parameterTypes":[] }, + {"name":"railway","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.travel.provider.UnitedStates", + "methods":[ + {"name":"large","parameterTypes":[] }, + {"name":"medium","parameterTypes":[] }, + {"name":"small","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.tv.TvShowsFaker", + "methods":[ + {"name":"getAquaTeenHungerForce","parameterTypes":[] }, + {"name":"getArcher","parameterTypes":[] }, + {"name":"getBigBangTheory","parameterTypes":[] }, + {"name":"getBojackHorseman","parameterTypes":[] }, + {"name":"getBreakingBad","parameterTypes":[] }, + {"name":"getBrooklynNineNine","parameterTypes":[] }, + {"name":"getBuffy","parameterTypes":[] }, + {"name":"getCommunity","parameterTypes":[] }, + {"name":"getDrWho","parameterTypes":[] }, + {"name":"getFamilyGuy","parameterTypes":[] }, + {"name":"getFinalSpace","parameterTypes":[] }, + {"name":"getFreshPriceOfBelAir","parameterTypes":[] }, + {"name":"getFriends","parameterTypes":[] }, + {"name":"getFuturama","parameterTypes":[] }, + {"name":"getGameOfThrones","parameterTypes":[] }, + {"name":"getHeyArnold","parameterTypes":[] }, + {"name":"getHowIMetYourMother","parameterTypes":[] }, + {"name":"getMichaelScott","parameterTypes":[] }, + {"name":"getNewGirl","parameterTypes":[] }, + {"name":"getParksAndRec","parameterTypes":[] }, + {"name":"getRickAndMorty","parameterTypes":[] }, + {"name":"getRupaul","parameterTypes":[] }, + {"name":"getSeinfeld","parameterTypes":[] }, + {"name":"getSiliconValley","parameterTypes":[] }, + {"name":"getSimpsons","parameterTypes":[] }, + {"name":"getSouthPark","parameterTypes":[] }, + {"name":"getSpongebob","parameterTypes":[] }, + {"name":"getStarTrek","parameterTypes":[] }, + {"name":"getStargate","parameterTypes":[] }, + {"name":"getStrangerThings","parameterTypes":[] }, + {"name":"getSuits","parameterTypes":[] }, + {"name":"getSupernatural","parameterTypes":[] }, + {"name":"getTheExpanse","parameterTypes":[] }, + {"name":"getTheITCrowd","parameterTypes":[] }, + {"name":"getTheOffice","parameterTypes":[] }, + {"name":"getTheThickOfIt","parameterTypes":[] }, + {"name":"getTwinPeaks","parameterTypes":[] }, + {"name":"getVentureBros","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.tv.TvShowsFaker$Builder" +}, +{ + "name":"io.github.serpro69.kfaker.tv.provider.AquaTeenHungerForce", + "methods":[ + {"name":"character","parameterTypes":[] }, + {"name":"quote","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.tv.provider.Archer", + "methods":[ + {"name":"characters","parameterTypes":[] }, + {"name":"locations","parameterTypes":[] }, + {"name":"quotes","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.tv.provider.BigBangTheory", + "methods":[ + {"name":"characters","parameterTypes":[] }, + {"name":"quotes","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.tv.provider.BojackHorseman", + "methods":[ + {"name":"characters","parameterTypes":[] }, + {"name":"quotes","parameterTypes":[] }, + {"name":"tongueTwisters","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.tv.provider.BreakingBad", + "methods":[ + {"name":"character","parameterTypes":[] }, + {"name":"episode","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.tv.provider.BrooklynNineNine", + "methods":[ + {"name":"characters","parameterTypes":[] }, + {"name":"quotes","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.tv.provider.Buffy", + "allDeclaredFields":true, + "allDeclaredMethods":true, + "allDeclaredConstructors":true +}, +{ + "name":"io.github.serpro69.kfaker.tv.provider.Community", + "methods":[ + {"name":"characters","parameterTypes":[] }, + {"name":"quotes","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.tv.provider.DrWho", + "methods":[ + {"name":"actors","parameterTypes":[] }, + {"name":"catchPhrases","parameterTypes":[] }, + {"name":"character","parameterTypes":[] }, + {"name":"quotes","parameterTypes":[] }, + {"name":"species","parameterTypes":[] }, + {"name":"theDoctors","parameterTypes":[] }, + {"name":"villains","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.tv.provider.FamilyGuy", + "methods":[ + {"name":"character","parameterTypes":[] }, + {"name":"location","parameterTypes":[] }, + {"name":"quote","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.tv.provider.FinalSpace", + "methods":[ + {"name":"characters","parameterTypes":[] }, + {"name":"quotes","parameterTypes":[] }, + {"name":"vehicles","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.tv.provider.FreshPriceOfBelAir", + "allDeclaredFields":true, + "allDeclaredMethods":true, + "allDeclaredConstructors":true +}, +{ + "name":"io.github.serpro69.kfaker.tv.provider.Friends", + "methods":[ + {"name":"characters","parameterTypes":[] }, + {"name":"locations","parameterTypes":[] }, + {"name":"quotes","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.tv.provider.Futurama", + "methods":[ + {"name":"characters","parameterTypes":[] }, + {"name":"hermesCatchphrases","parameterTypes":[] }, + {"name":"locations","parameterTypes":[] }, + {"name":"quotes","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.tv.provider.GameOfThrones", + "methods":[ + {"name":"characters","parameterTypes":[] }, + {"name":"cities","parameterTypes":[] }, + {"name":"dragons","parameterTypes":[] }, + {"name":"houses","parameterTypes":[] }, + {"name":"quotes","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.tv.provider.HeyArnold", + "methods":[ + {"name":"characters","parameterTypes":[] }, + {"name":"locations","parameterTypes":[] }, + {"name":"quotes","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.tv.provider.HowIMetYourMother", + "methods":[ + {"name":"catchPhrase","parameterTypes":[] }, + {"name":"character","parameterTypes":[] }, + {"name":"highFive","parameterTypes":[] }, + {"name":"quote","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.tv.provider.MichaelScott", + "methods":[{"name":"quotes","parameterTypes":[] }] +}, +{ + "name":"io.github.serpro69.kfaker.tv.provider.NewGirl", + "methods":[ + {"name":"characters","parameterTypes":[] }, + {"name":"quotes","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.tv.provider.ParksAndRec", + "methods":[ + {"name":"characters","parameterTypes":[] }, + {"name":"cities","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.tv.provider.RickAndMorty", + "methods":[ + {"name":"characters","parameterTypes":[] }, + {"name":"locations","parameterTypes":[] }, + {"name":"quotes","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.tv.provider.Rupaul", + "methods":[ + {"name":"queens","parameterTypes":[] }, + {"name":"quotes","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.tv.provider.Seinfeld", + "methods":[ + {"name":"business","parameterTypes":[] }, + {"name":"character","parameterTypes":[] }, + {"name":"quote","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.tv.provider.SiliconValley", + "methods":[ + {"name":"apps","parameterTypes":[] }, + {"name":"characters","parameterTypes":[] }, + {"name":"companies","parameterTypes":[] }, + {"name":"email","parameterTypes":[] }, + {"name":"inventions","parameterTypes":[] }, + {"name":"mottos","parameterTypes":[] }, + {"name":"quotes","parameterTypes":[] }, + {"name":"urls","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.tv.provider.Simpsons", + "methods":[ + {"name":"characters","parameterTypes":[] }, + {"name":"episodeTitles","parameterTypes":[] }, + {"name":"locations","parameterTypes":[] }, + {"name":"quotes","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.tv.provider.SouthPark", + "methods":[ + {"name":"characters","parameterTypes":[] }, + {"name":"episodes","parameterTypes":[] }, + {"name":"quotes","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.tv.provider.Spongebob", + "methods":[ + {"name":"characters","parameterTypes":[] }, + {"name":"episodes","parameterTypes":[] }, + {"name":"quotes","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.tv.provider.StarTrek", + "methods":[ + {"name":"character","parameterTypes":[] }, + {"name":"location","parameterTypes":[] }, + {"name":"specie","parameterTypes":[] }, + {"name":"villain","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.tv.provider.Stargate", + "methods":[ + {"name":"characters","parameterTypes":[] }, + {"name":"planets","parameterTypes":[] }, + {"name":"quotes","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.tv.provider.StrangerThings", + "methods":[ + {"name":"character","parameterTypes":[] }, + {"name":"quote","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.tv.provider.Suits", + "methods":[ + {"name":"characters","parameterTypes":[] }, + {"name":"quotes","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.tv.provider.Supernatural", + "methods":[ + {"name":"character","parameterTypes":[] }, + {"name":"creature","parameterTypes":[] }, + {"name":"weapon","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.tv.provider.TheExpanse", + "methods":[ + {"name":"characters","parameterTypes":[] }, + {"name":"locations","parameterTypes":[] }, + {"name":"quotes","parameterTypes":[] }, + {"name":"ships","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.tv.provider.TheITCrowd", + "methods":[ + {"name":"actors","parameterTypes":[] }, + {"name":"characters","parameterTypes":[] }, + {"name":"emails","parameterTypes":[] }, + {"name":"quotes","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.tv.provider.TheOffice", + "methods":[ + {"name":"characters","parameterTypes":[] }, + {"name":"quotes","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.tv.provider.TheThickOfIt", + "methods":[ + {"name":"characters","parameterTypes":[] }, + {"name":"departments","parameterTypes":[] }, + {"name":"positions","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.tv.provider.TwinPeaks", + "methods":[ + {"name":"characters","parameterTypes":[] }, + {"name":"locations","parameterTypes":[] }, + {"name":"quotes","parameterTypes":[] } + ] +}, +{ + "name":"io.github.serpro69.kfaker.tv.provider.VentureBros", + "methods":[ + {"name":"character","parameterTypes":[] }, + {"name":"organization","parameterTypes":[] }, + {"name":"quote","parameterTypes":[] }, + {"name":"vehicle","parameterTypes":[] } + ] +}, +{ + "name":"java.lang.ClassValue" +}, +{ + "name":"java.lang.Object", + "allDeclaredFields":true, + "allDeclaredMethods":true +}, +{ + "name":"java.lang.String" +}, +{ + "name":"java.nio.file.Path" +}, +{ + "name":"java.nio.file.Paths", + "methods":[{"name":"get","parameterTypes":["java.lang.String","java.lang.String[]"] }] +}, +{ + "name":"java.sql.Connection" +}, +{ + "name":"java.sql.Driver" +}, +{ + "name":"java.sql.DriverManager", + "methods":[ + {"name":"getConnection","parameterTypes":["java.lang.String"] }, + {"name":"getDriver","parameterTypes":["java.lang.String"] } + ] +}, +{ + "name":"java.sql.Time", + "methods":[{"name":"","parameterTypes":["long"] }] +}, +{ + "name":"java.sql.Timestamp", + "methods":[{"name":"valueOf","parameterTypes":["java.lang.String"] }] +}, +{ + "name":"java.time.Duration", + "methods":[{"name":"parse","parameterTypes":["java.lang.CharSequence"] }] +}, +{ + "name":"java.time.Instant", + "methods":[{"name":"parse","parameterTypes":["java.lang.CharSequence"] }] +}, +{ + "name":"java.time.LocalDate", + "methods":[{"name":"parse","parameterTypes":["java.lang.CharSequence"] }] +}, +{ + "name":"java.time.LocalDateTime", + "methods":[{"name":"parse","parameterTypes":["java.lang.CharSequence"] }] +}, +{ + "name":"java.time.LocalTime", + "methods":[{"name":"parse","parameterTypes":["java.lang.CharSequence"] }] +}, +{ + "name":"java.time.MonthDay", + "methods":[{"name":"parse","parameterTypes":["java.lang.CharSequence"] }] +}, +{ + "name":"java.time.OffsetDateTime", + "methods":[{"name":"parse","parameterTypes":["java.lang.CharSequence"] }] +}, +{ + "name":"java.time.OffsetTime", + "methods":[{"name":"parse","parameterTypes":["java.lang.CharSequence"] }] +}, +{ + "name":"java.time.Period", + "methods":[{"name":"parse","parameterTypes":["java.lang.CharSequence"] }] +}, +{ + "name":"java.time.Year", + "methods":[{"name":"parse","parameterTypes":["java.lang.CharSequence"] }] +}, +{ + "name":"java.time.YearMonth", + "methods":[{"name":"parse","parameterTypes":["java.lang.CharSequence"] }] +}, +{ + "name":"java.time.ZoneId", + "methods":[{"name":"of","parameterTypes":["java.lang.String"] }] +}, +{ + "name":"java.time.ZoneOffset", + "methods":[{"name":"of","parameterTypes":["java.lang.String"] }] +}, +{ + "name":"java.time.ZonedDateTime", + "methods":[{"name":"parse","parameterTypes":["java.lang.CharSequence"] }] +}, +{ + "name":"kotlin.Deprecated", + "allDeclaredMethods":true +}, +{ + "name":"kotlin.Metadata", + "allDeclaredMethods":true +}, +{ + "name":"kotlin.ReplaceWith", + "allDeclaredMethods":true +}, +{ + "name":"kotlin.Unit" +}, +{ + "name":"kotlin.jvm.functions.Function0" +}, +{ + "name":"kotlin.jvm.internal.DefaultConstructorMarker" +}, +{ + "name":"kotlin.ranges.IntRange" +}, +{ + "name":"kotlin.reflect.jvm.internal.ReflectionFactoryImpl", + "methods":[{"name":"","parameterTypes":[] }] +}, +{ + "name":"kotlin.reflect.jvm.internal.impl.renderer.DescriptorRendererOptionsImpl", + "allDeclaredFields":true +}, +{ + "name":"kotlin.reflect.jvm.internal.impl.resolve.scopes.DescriptorKindFilter", + "allPublicFields":true +}, +{ + "name":"picocli.CommandLine$AutoHelpMixin", + "allDeclaredFields":true, + "allDeclaredMethods":true +} ] 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 b86aed1c5..ed0fce272 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 @@ -1,9 +1,11 @@ package io.github.serpro69.kfaker.app.cli import io.github.serpro69.kfaker.Faker +import io.github.serpro69.kfaker.games.GamesFaker +import io.github.serpro69.kfaker.games.provider.Dota import io.github.serpro69.kfaker.provider.Address -import io.github.serpro69.kfaker.provider.Airport -import io.github.serpro69.kfaker.provider.Dota +import io.github.serpro69.kfaker.travel.TravelFaker +import io.github.serpro69.kfaker.travel.provider.Airport import io.kotest.core.spec.style.DescribeSpec import io.kotest.matchers.collections.shouldContainExactly import kotlin.reflect.KClass @@ -13,9 +15,8 @@ class IntrospectorTest : DescribeSpec() { init { describe("Introspector class") { - val introspector = Introspector(faker) - context("list all Faker providers") { + val introspector = Introspector(faker) val providers = introspector.providers .map { it.getter.returnType.classifier as KClass<*> } .map { it.simpleName } @@ -23,442 +24,45 @@ class IntrospectorTest : DescribeSpec() { it("should contain all providers") { val expectedProviders = listOf( "Address", - "Adjective", - "Airport", - "Ancient", - "Animal", - "App", - "Appliance", - "AquaTeenHungerForce", - "Archer", - "Artist", - "Australia", - "Avatar", - "BackToTheFuture", - "Bank", - "Barcode", - "Basketball", - "Beer", - "Bible", - "BigBangTheory", - "Bird", - "Blood", - "BojackHorseman", - "Book", - "BossaNova", - "BreakingBad", - "BrooklynNineNine", - "Buffy", - "Business", - "Camera", - "Cannabis", - "Cat", - "Chess", - "Chiquito", - "ChuckNorris", - "ClashOfClans", - "Code", - "Coffee", - "Coin", "Color", - "Commerce", - "Community", - "Company", - "Computer", - "Conan", - "Construction", - "Control", - "Cosmere", - "CowboyBebop", - "Crossfit", "CryptographyProvider", - "CryptoCoin", - "CultureSeries", "Currency", "CurrencySymbol", - "DcComics", - "Demographic", - "Departed", - "Dessert", - "Device", - "DnD", - "Dog", - "Doraemon", - "Dota", - "DrWho", - "DragonBall", - "DrivingLicense", - "Drone", - "DumbAndDumber", - "Dune", - "ESport", - "Educator", - "ElderScrolls", - "ElectricalComponents", - "Emotion", - "Fallout", - "FamilyGuy", "File", - "FinalFantasyXIV", - "FinalSpace", - "Finance", - "FmaBrotherhood", - "Food", - "Football", - "FreshPriceOfBelAir", - "Friends", - "FunnyName", - "Futurama", - "Game", - "GameOfThrones", "Gender", - "GhostBusters", - "GratefulDead", - "GreekPhilosophers", - "Hacker", - "Hackers", - "HalfLife", - "HarryPotter", - "Heroes", - "HeroesOfTheStorm", - "HeyArnold", - "Hipster", - "HitchhikersGuideToTheGalaxy", - "Hobbit", - "Hobby", - "Horse", - "House", - "HowIMetYourMother", - "HowToTrainYourDragon", "IdNumber", - "IndustrySegments", "Internet", - "JackHandey", - "Job", - "KPop", - "KamenRider", - "LeagueOfLegends", - "Lebowski", - "LordOfTheRings", - "Lorem", - "Lovecraft", - "Markdown", - "Marketing", "Measurement", - "MichaelScott", - "Military", - "Minecraft", - "MitchHedberg", "Money", - "Mountain", - "Mountaineering", - "Movie", - "Music", - "Myst", "Name", - "Naruto", - "Nation", - "NatoPhoneticAlphabet", - "NewGirl", - "OnePiece", - "Opera", - "Overwatch", - "ParksAndRec", - "PearlJam", - "Phish", "PhoneNumber", - "Pokemon", - "Prince", - "PrincessBride", - "ProgrammingLanguage", - "Quote", - "Rajnikanth", - "Relationship", - "Restaurant", - "RickAndMorty", - "RockBand", - "Room", - "Rupaul", - "Rush", - "Science", - "Seinfeld", "Separator", - "Shakespeare", - "Show", - "SiliconValley", - "Simpsons", - "SlackEmoji", - "SmashingPumpkins", - "SonicTheHedgehog", - "SouthPark", - "Space", - "Spongebob", - "Sport", - "StarTrek", - "StarWars", - "Stargate", - "StrangerThings", - "StreetFighter", - "Stripe", - "StudioGhibli", - "Subscription", - "Suits", - "SuperMario", - "SuperSmashBros", - "Superhero", - "Supernatural", - "SwordArtOnline", - "Tarkov", - "Tea", - "Team", - "TheExpanse", - "TheITCrowd", - "TheKingkillerChronicle", - "TheOffice", - "TheRoom", - "TheThickOfIt", - "Tolkien", - "Touhou", - "TrainStation", - "Tron", - "TwinPeaks", - "UmphreysMcgee", - "University", - "VForVendetta", - "Vehicle", - "VentureBros", - "Verbs", - "Volleyball", - "WarhammerFantasy", - "Witcher", - "WorldCup", - "WorldOfWarcraft", - "Yoda", - "Zelda" ) providers.toList() shouldContainExactly expectedProviders } } context("list available functions for each provider") { + val introspector = Introspector(faker) val providerData = introspector.providerData it("should contain all providers") { val providers = providerData.map { it.key.name } val expectedProviders = listOf( "address", - "adjective", - "airport", - "ancient", - "animal", - "app", - "appliance", - "aquaTeenHungerForce", - "archer", - "artist", - "australia", - "avatar", - "backToTheFuture", - "bank", - "barcode", - "basketball", - "beer", - "bible", - "bigBangTheory", - "bird", - "blood", - "bojackHorseman", - "book", - "bossaNova", - "breakingBad", - "brooklynNineNine", - "buffy", - "business", - "camera", - "cannabis", - "cat", - "chess", - "chiquito", - "chuckNorris", - "clashOfClans", - "code", - "coffee", - "coin", "color", - "commerce", - "community", - "company", - "computer", - "conan", - "construction", - "control", - "cosmere", - "cowboyBebop", - "crossfit", "crypto", - "cryptoCoin", - "cultureSeries", "currency", "currencySymbol", - "dcComics", - "demographic", - "departed", - "dessert", - "device", - "dnd", - "dog", - "doraemon", - "dota", - "drWho", - "dragonBall", - "drivingLicense", - "drone", - "dumbAndDumber", - "dune", - "eSport", - "educator", - "elderScrolls", - "electricalComponents", - "emotion", - "fallout", - "familyGuy", "file", - "finalFantasyXIV", - "finalSpace", - "finance", - "fmaBrotherhood", - "food", - "football", - "freshPriceOfBelAir", - "friends", - "funnyName", - "futurama", - "game", - "gameOfThrones", "gender", - "ghostBusters", - "gratefulDead", - "greekPhilosophers", - "hacker", - "hackers", - "halfLife", - "harryPotter", - "heroes", - "heroesOfTheStorm", - "heyArnold", - "hipster", - "hitchhikersGuideToTheGalaxy", - "hobbit", - "hobby", - "horse", - "house", - "howIMetYourMother", - "howToTrainYourDragon", "idNumber", - "industrySegments", "internet", - "jackHandey", - "job", - "kPop", - "kamenRider", - "leagueOfLegends", - "lebowski", - "lordOfTheRings", - "lorem", - "lovecraft", - "markdown", - "marketing", "measurement", - "michaelScott", - "military", - "minecraft", - "mitchHedberg", "money", - "mountain", - "mountaineering", - "movie", - "music", - "myst", "name", - "naruto", - "nation", - "natoPhoneticAlphabet", - "newGirl", - "onePiece", - "opera", - "overwatch", - "parksAndRec", - "pearlJam", - "phish", "phoneNumber", - "pokemon", - "prince", - "princessBride", - "programmingLanguage", - "quote", - "rajnikanth", - "relationship", - "restaurant", - "rickAndMorty", - "rockBand", - "room", - "rupaul", - "rush", - "science", - "seinfeld", "separator", - "shakespeare", - "show", - "siliconValley", - "simpsons", - "slackEmoji", - "smashingPumpkins", - "sonicTheHedgehog", - "southPark", - "space", - "spongebob", - "sport", - "starTrek", - "starWars", - "stargate", - "strangerThings", - "streetFighter", - "stripe", - "studioGhibli", - "subscription", - "suits", - "superMario", - "superSmashBros", - "superhero", - "supernatural", - "swordArtOnline", - "tarkov", - "tea", - "team", - "theExpanse", - "theITCrowd", - "theKingkillerChronicle", - "theOffice", - "theRoom", - "theThickOfIt", - "tolkien", - "touhou", - "trainStation", - "tron", - "twinPeaks", - "umphreysMcgee", - "university", - "vForVendetta", - "vehicle", - "ventureBros", - "verbs", - "volleyball", - "warhammerFantasy", - "witcher", - "worldCup", - "worldOfWarcraft", - "yoda", - "zelda" ) providers shouldContainExactly expectedProviders @@ -500,7 +104,12 @@ class IntrospectorTest : DescribeSpec() { addressFunctions.toList() shouldContainExactly expectedFunctions } + } + + context("deprecated functionality") { it("should not contain deprecated functions") { + val introspector = Introspector(GamesFaker()) + val providerData = introspector.providerData val addressFunctions = providerData.entries.first { (provider, _) -> (provider.returnType.classifier as KClass<*>) == Dota::class }.value.first.map { it.name } @@ -509,8 +118,12 @@ class IntrospectorTest : DescribeSpec() { addressFunctions.toList() shouldContainExactly expectedFunctions } + } + context("sub-providers") { it("should contain all sub-providers of the provider") { + val introspector = Introspector(TravelFaker()) + val providerData = introspector.providerData val subProviders = providerData.entries.first { (provider, _) -> (provider.returnType.classifier as KClass<*>) == Airport::class }.value.second diff --git a/core/build.gradle.kts b/core/build.gradle.kts index dfaf715e1..88e86da11 100644 --- a/core/build.gradle.kts +++ b/core/build.gradle.kts @@ -1,15 +1,9 @@ import Yaml_to_json_gradle.Yaml2JsonPlugin import Yaml_to_json_gradle.Yaml2JsonPluginExtension -import com.adarshr.gradle.testlogger.theme.ThemeType import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar -//import io.github.serpro69.YamlToJsonPlugin - plugins { - kotlin("jvm") - id("org.jetbrains.dokka") version "1.9.10" - `maven-publish` - signing + `faker-lib-conventions` `yaml-to-json` } @@ -17,185 +11,43 @@ dependencies { implementation("com.fasterxml.jackson.core:jackson-databind:2.15.3") implementation("com.fasterxml.jackson.module:jackson-module-kotlin:2.15.3") shadow("com.ibm.icu:icu4j:73.2") - shadow(kotlin("stdlib-jdk8")) - shadow(kotlin("reflect")) shadow("com.github.mifmif:generex:1.0.2") + // integration dependencies for classes in docs package, e.g. Homepage.kt + // NB! only add fakers that are needed + val integrationImplementation by configurations + integrationImplementation(project(":faker:commerce")) + integrationImplementation(project(":faker:movies")) + integrationImplementation(project(":faker:tvshows")) +} + +// integrationTest task must run after we've built the dependencies +tasks.getByName("integrationTest") { + dependsOn(":faker:commerce:shadowJar") + dependsOn(":faker:movies:shadowJar") + dependsOn(":faker:tvshows:shadowJar") } apply() // this shouldn't really be needed since the plugin is supposed to be applied in the plugins{} block configure { - val cwd = project.projectDir.getAbsolutePath() + val cwd = project.projectDir.absolutePath input.set(File("$cwd/src/main/resources/locales")) output.set(File("$cwd/build/generated/src/main/resources")) } tasks.processResources.get().dependsOn(tasks["yaml2json"]) -configurations { - create("integrationImplementation") { extendsFrom(testImplementation.get()) } - create("integrationRuntimeOnly") { extendsFrom(testRuntimeOnly.get(), configurations.getByName("shadow")) } -} - -sourceSets { - create("integration") { - resources.srcDir("src/integration/resources") - compileClasspath += main.get().compileClasspath + test.get().compileClasspath - runtimeClasspath += main.get().runtimeClasspath + test.get().runtimeClasspath - } - main { - resources { - this.srcDir("build/generated/src/main/resources") - } - } -} - -val integrationTest by tasks.creating(Test::class) { - testClassesDirs = sourceSets["integration"].output.classesDirs - classpath = sourceSets["integration"].runtimeClasspath - dependsOn(tasks.test) -} - -tasks.withType { - archiveBaseName.set(rootProject.name) - +tasks.withType().configureEach { manifest { - attributes( - mapOf( - "Implementation-Title" to project.name, - "Implementation-Version" to project.version, - "Class-Path" to configurations.compileClasspath.get().joinToString(" ") { it.name } - ) - ) + // set the classpath attribute here because we can't modify it in a buildSrc plugin or someplace else + // see comment in the ShadowJar task config of the 'faker-lib-conventions' buildSrc plugin + attributes["Class-Path"] = project.configurations.compileClasspath.get().joinToString(" ") { it.name } } } -val shadowJar by tasks.getting(ShadowJar::class) { - minimize() - archiveBaseName.set(rootProject.name) - archiveClassifier.set("") - relocate("com.fasterxml", "faker.com.fasterxml") - exclude("**/locales/*.yml") // jar already contains json files - dependencies { - exclude("module-info.class") - include { - it.name.startsWith(project.group.toString()) || - it.name.startsWith("com.fasterxml") - } - } +tasks.withType().configureEach { manifest { - attributes( - mapOf( - "Implementation-Title" to project.name, - "Implementation-Version" to project.version, - "Class-Path" to project.configurations.compileClasspath.get().joinToString(" ") { it.name } - ) - ) - } - dependsOn(tasks.jar) -} - -java { - sourceCompatibility = JavaVersion.VERSION_1_8 - targetCompatibility = JavaVersion.VERSION_1_8 -} - -testlogger { - showPassed = false - theme = ThemeType.MOCHA -} - -val sourcesJar by tasks.creating(Jar::class) { - archiveClassifier.set("sources") - from(sourceSets.getByName("main").allSource) - from("LICENCE.md") { - into("META-INF") - } -} - -val dokkaJavadocJar by tasks.creating(Jar::class) { - archiveClassifier.set("javadoc") - dependsOn(tasks.dokkaJavadoc) - from(tasks.dokkaJavadoc.get().outputDirectory.orNull) -} - -artifacts { - archives(sourcesJar) - archives(dokkaJavadocJar) -} - -val artifactName = rootProject.name -val artifactGroup = project.group.toString() -val artifactVersion = project.version.toString() -val releaseTagName = "v$artifactVersion" - -val pomUrl = "https://github.com/serpro69/kotlin-faker" -val pomScmUrl = "https://github.com/serpro69/kotlin-faker" -val pomIssueUrl = "https://github.com/serpro69/kotlin-faker/issues" -val pomDesc = "https://github.com/serpro69/kotlin-faker" - -val ghRepo = "serpro69/kotlin-faker" -val ghReadme = "README.md" - -val pomLicenseName = "MIT" -val pomLicenseUrl = "https://opensource.org/licenses/mit-license.php" -val pomLicenseDist = "repo" - -val pomDeveloperId = "serpro69" -val pomDeveloperName = "Serhii Prodan" - -publishing { - publications { - create("fakerCore") { - groupId = artifactGroup - artifactId = artifactName - version = artifactVersion -// from(components["java"]) - project.shadow.component(this) - artifact(sourcesJar) - artifact(dokkaJavadocJar) //TODO configure dokka or use defaults? - - pom { - packaging = "jar" - name.set(rootProject.name) - description.set(pomDesc) - url.set(pomUrl) - scm { - url.set(pomScmUrl) - } - issueManagement { - url.set(pomIssueUrl) - } - licenses { - license { - name.set(pomLicenseName) - url.set(pomLicenseUrl) - } - } - developers { - developer { - id.set(pomDeveloperId) - name.set(pomDeveloperName) - } - } - } - } - } -} - -signing { - if (!version.toString().endsWith("SNAPSHOT")) { - sign(publishing.publications["fakerCore"]) - } -} - -tasks { - assemble { - dependsOn(shadowJar) - } -} - -tasks.withType().configureEach { - doFirst { - if (version == "0.0.0") throw IllegalArgumentException("Unable to publish version 0.0.0") + // set the classpath attribute here because we can't modify it in a buildSrc plugin or someplace else + // see comment in the ShadowJar task config of the 'faker-lib-conventions' buildSrc plugin + attributes["Class-Path"] = project.configurations.compileClasspath.get().joinToString(" ") { it.name } } } diff --git a/core/src/integration/kotlin/io/github/serpro69/kfaker/UniqueDataProvierIT.kt b/core/src/integration/kotlin/io/github/serpro69/kfaker/UniqueDataProvierIT.kt index a6ef78416..8dee0bb62 100644 --- a/core/src/integration/kotlin/io/github/serpro69/kfaker/UniqueDataProvierIT.kt +++ b/core/src/integration/kotlin/io/github/serpro69/kfaker/UniqueDataProvierIT.kt @@ -109,12 +109,8 @@ class UniqueDataProviderIT : DescribeSpec({ "Block", "Bode", "Boehm", "Bogan", "Bogisich", "Borer", "Bosco", "Botsford", "Boyer", "Boyle", "Bradtke", "Brakus", "Braun", "Breitenberg", "Brekke", "Brown", "Bruen", "Buckridge" ) - val excludedBicCodes = listOf( - "AACCGB21", "AACNGB21", "AAFMGB21", "AAHOGB21", "AAHVGB21", "AANLGB21", - "AANLGB2L", "AAOGGB21", "AAPEGB21", "AAPUGB21", "AAQIGB21", "ABBYGB2L", - "BCYPGB2LCBB", "BCYPGB2LHGB", "BCYPGB2LHHB", "BCYPGB2LPGB", "BCYPGB2LSSB", "BCYPGB2LMBB" - ) - val excludeAll = listOf(excludedCountries, excludedNames, excludedBicCodes).flatten() + val excludedDomains = listOf("com", "biz", "info") + val excludeAll = listOf(excludedCountries, excludedNames, excludedDomains).flatten() faker.unique.configuration { enable(faker::address) @@ -125,16 +121,16 @@ class UniqueDataProviderIT : DescribeSpec({ context("collection of unique values is generated run#$it") { val countries = (0..30).map { faker.address.country() } val names = (0..30).map { faker.name.lastName() } - // Unique generation not enabled for Bank - val bicCodes = (0..30).map { faker.bank.swiftBic() } + // Unique generation not enabled for Internet + val domainSuffixes = (0..30).map { faker.internet.domainSuffix() } it("should not contain excluded values") { assertSoftly { countries shouldNotContainAnyOf excludeAll names shouldNotContainAnyOf excludeAll - // Unique generation not enabled for Bank - bicCodes shouldNot beUnique() - bicCodes shouldContainAnyOf excludedBicCodes + // Unique generation not enabled for Internet + domainSuffixes shouldNot beUnique() + domainSuffixes shouldContainAnyOf excludedDomains } } } @@ -150,23 +146,23 @@ class UniqueDataProviderIT : DescribeSpec({ enable(faker::address) enable(faker::name) // Exclude all values starting with "A" - exclude { listOf(Regex("^A")) } + exclude { listOf(Regex("^[Cc]")) } } it("should not contain values matching pattern run#$it") { val countries = (0..30).map { faker.address.country() } val names = (0..30).map { faker.name.lastName() } // Unique generation not enabled for Bank - val bicCodes = (0..30).map { faker.bank.swiftBic() } + val domainSuffixes = (0..30).map { faker.internet.domainSuffix() } assertSoftly { - countries.none { s -> s.startsWith("A") } shouldBe true + countries.none { s -> s.startsWith("C") } shouldBe true countries should beUnique() - names.none { s -> s.startsWith("A") } shouldBe true + names.none { s -> s.startsWith("C") } shouldBe true names should beUnique() - // Unique generation not enabled for Bank - bicCodes.any { s -> s.startsWith("A") } shouldBe true - bicCodes shouldNot beUnique() + // Unique generation not enabled for Internet + domainSuffixes.any { s -> s.startsWith("c") } shouldBe true + domainSuffixes shouldNot beUnique() } } } @@ -204,7 +200,7 @@ class UniqueDataProviderIT : DescribeSpec({ val faker = Faker(config) faker.unique.enable(faker::address) - faker.unique.enable(faker::ancient) + faker.unique.enable(faker::color) val countries = (0..20).map { faker.address.country() } @@ -321,10 +317,10 @@ class UniqueDataProviderIT : DescribeSpec({ val faker = Faker(config) faker.unique.enable(faker::address) - val animalNames = (0..100).map { faker.animal.name() } + val colors = (0..100).map { faker.color.name() } it("collection can have duplicates") { - animalNames shouldNot beUnique() + colors shouldNot beUnique() } } @@ -347,18 +343,18 @@ class UniqueDataProviderIT : DescribeSpec({ context("unique generation is disabled for all categories") { val faker = Faker(config) faker.unique.enable(faker::address) - faker.unique.enable(faker::ancient) + faker.unique.enable(faker::color) faker.unique.disableAll() context("collections of values are generated") { val countries = (0..100).map { faker.address.country() } - val gods = (0..100).map { faker.ancient.god() } + val colors = (0..100).map { faker.color.name() } it("collection can have duplicates") { assertSoftly { countries shouldNot beUnique() - gods shouldNot beUnique() + colors shouldNot beUnique() } } } @@ -379,22 +375,22 @@ class UniqueDataProviderIT : DescribeSpec({ context("unique generation is cleared for all categories") { val faker = Faker(config) faker.unique.enable(faker::address) - faker.unique.enable(faker::ancient) + faker.unique.enable(faker::color) // Generate some values first (0..20).map { faker.address.country() } - (0..20).map { faker.ancient.hero() } + (0..20).map { faker.color.name() } faker.unique.clearAll() context("collections of values are generated") { val countries = (0..20).map { faker.address.country() } - val heroes = (0..20).map { faker.ancient.hero() } + val colors = (0..20).map { faker.color.name() } it("collections should be unique") { assertSoftly { countries should beUnique() - heroes should beUnique() + colors should beUnique() } } } diff --git a/core/src/integration/kotlin/io/github/serpro69/kfaker/docs/Homepage.kt b/core/src/integration/kotlin/io/github/serpro69/kfaker/docs/Homepage.kt index 42f9d870f..16bf81e85 100644 --- a/core/src/integration/kotlin/io/github/serpro69/kfaker/docs/Homepage.kt +++ b/core/src/integration/kotlin/io/github/serpro69/kfaker/docs/Homepage.kt @@ -3,7 +3,10 @@ package io.github.serpro69.kfaker.docs import io.github.serpro69.kfaker.Faker +import io.github.serpro69.kfaker.commerce.CommerceFaker import io.github.serpro69.kfaker.fakerConfig +import io.github.serpro69.kfaker.movies.MoviesFaker +import io.github.serpro69.kfaker.tv.TvShowsFaker import io.kotest.core.spec.DisplayName import io.kotest.core.spec.style.DescribeSpec import org.junit.jupiter.api.Assertions.assertEquals @@ -42,7 +45,7 @@ class Homepage : DescribeSpec({ } it("should print a SWIFT BIC code") { // START data_provider_four - faker.bank.swiftBic() // => AACCGB21 + CommerceFaker().bank.swiftBic() // => AACCGB21 // END data_provider_four } it("should print a safe email address") { @@ -52,17 +55,17 @@ class Homepage : DescribeSpec({ } it("should print a ship name from The Expanse") { // START data_provider_five - faker.theExpanse.ships() // => Rocinante + TvShowsFaker().theExpanse.ships() // => Rocinante // END data_provider_five } it("should print a Star Wars character name") { // START data_provider_six_a - faker.starWars.characters() // => Darth Vader + MoviesFaker().starWars.characters() // => Darth Vader // END data_provider_six_a } it("should print a character name from Friends") { // START data_provider_six_b - faker.friends.characters() // => Phoebe Buffay + TvShowsFaker().friends.characters() // => Phoebe Buffay // END data_provider_six_b } // START data_provider_seven diff --git a/core/src/integration/kotlin/io/github/serpro69/kfaker/provider/InternetIT.kt b/core/src/integration/kotlin/io/github/serpro69/kfaker/provider/InternetIT.kt index f39e8103a..b047e82c8 100644 --- a/core/src/integration/kotlin/io/github/serpro69/kfaker/provider/InternetIT.kt +++ b/core/src/integration/kotlin/io/github/serpro69/kfaker/provider/InternetIT.kt @@ -6,9 +6,7 @@ import io.kotest.assertions.assertSoftly import io.kotest.core.spec.style.DescribeSpec import io.kotest.matchers.collections.shouldHaveSize import io.kotest.matchers.shouldBe -import io.kotest.matchers.string.shouldEndWith import io.kotest.matchers.string.shouldMatch -import io.kotest.matchers.string.shouldNotContain import io.kotest.matchers.string.shouldStartWith @Suppress("unused") diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/AbstractFaker.kt b/core/src/main/kotlin/io/github/serpro69/kfaker/AbstractFaker.kt new file mode 100644 index 000000000..3d67d73d4 --- /dev/null +++ b/core/src/main/kotlin/io/github/serpro69/kfaker/AbstractFaker.kt @@ -0,0 +1,39 @@ +package io.github.serpro69.kfaker + +import io.github.serpro69.kfaker.provider.unique.GlobalUniqueDataDataProvider + +abstract class AbstractFaker(internal val config: FakerConfig) { + protected val fakerService: FakerService + get() = FakerService(this) + protected val randomService: RandomService + get() = fakerService.randomService + + val unique by lazy { GlobalUniqueDataDataProvider() } + + @FakerDsl + /** + * DSL builder for creating instances of [AbstractFaker] + */ + abstract class Builder { + /** + * @property config faker configuration for the [AbstractFaker] instance + * which will be created with this [AbstractFaker.Builder]. + */ + protected var config: FakerConfig = io.github.serpro69.kfaker.fakerConfig { } + + /** + * Sets [config] configuration for this [AbstractFaker.Builder] + * using the results of the [block] function. + * + * This [config] will then be used when an instance of [AbstractFaker] is created using this [AbstractFaker.Builder] + */ + fun fakerConfig(block: ConfigBuilder) { + config = io.github.serpro69.kfaker.fakerConfig(block) + } + + /** + * Builds an instance of [AbstractFaker] with this [config]. + */ + abstract fun build(): T + } +} 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 039e39616..897a7dd6f 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/Faker.kt +++ b/core/src/main/kotlin/io/github/serpro69/kfaker/Faker.kt @@ -2,288 +2,84 @@ package io.github.serpro69.kfaker -import io.github.serpro69.kfaker.provider.* +import io.github.serpro69.kfaker.provider.Address +import io.github.serpro69.kfaker.provider.Color +import io.github.serpro69.kfaker.provider.Currency +import io.github.serpro69.kfaker.provider.CurrencySymbol +import io.github.serpro69.kfaker.provider.File +import io.github.serpro69.kfaker.provider.Gender +import io.github.serpro69.kfaker.provider.IdNumber +import io.github.serpro69.kfaker.provider.Internet +import io.github.serpro69.kfaker.provider.Measurement +import io.github.serpro69.kfaker.provider.Money +import io.github.serpro69.kfaker.provider.Name +import io.github.serpro69.kfaker.provider.Person +import io.github.serpro69.kfaker.provider.PhoneNumber +import io.github.serpro69.kfaker.provider.Separator import io.github.serpro69.kfaker.provider.misc.CryptographyProvider -import io.github.serpro69.kfaker.provider.misc.RandomProvider import io.github.serpro69.kfaker.provider.misc.RandomClassProvider +import io.github.serpro69.kfaker.provider.misc.RandomProvider import io.github.serpro69.kfaker.provider.misc.StringProvider -import io.github.serpro69.kfaker.provider.unique.GlobalUniqueDataDataProvider /** - * Provides access to fake data generators. + * Provides access to 'core' fake data generators. * * Each category (generator) from this [Faker] is represented by a property that has the same name as the `.yml` file. * - * @property random provides public access to the functions of [RandomService]. - * @property randomProvider provides additional functionality that is not covered by other data providers + * @property random provides data-generator-like functionality for the functions of [RandomService]. + * @property randomClass provides additional functionality that is not covered by other data providers * such as [address], [name], [internet], and so on. See [RandomClassProvider] for more details. - * @property string provides functionality to generate strings from expressions/templates - * @property unique global provider for generation of unique values. + * @property string provides functionality to generate strings from expressions/templates + * @property unique global provider for generation of unique values. */ -class Faker @JvmOverloads constructor(internal val config: FakerConfig = fakerConfig { }) { - private val fakerService: FakerService = FakerService(this) - - val random: RandomProvider by lazy { RandomProvider(fakerService) } - - val unique by lazy { GlobalUniqueDataDataProvider() } +@Suppress("unused") +class Faker @JvmOverloads constructor(config: FakerConfig = fakerConfig { }) : AbstractFaker(config) { // misc providers val crypto: CryptographyProvider by lazy { CryptographyProvider(fakerService) } - val randomProvider: RandomClassProvider by lazy { RandomClassProvider(config) } + val random: RandomProvider by lazy { RandomProvider(fakerService) } + val randomClass: RandomClassProvider by lazy { RandomClassProvider(config) } val string: StringProvider by lazy { StringProvider(fakerService) } - val separator: Separator by lazy { Separator(fakerService) } - val currencySymbol: CurrencySymbol by lazy { CurrencySymbol(fakerService) } + @Deprecated( + message = "This property is deprecated and will be removed in future releases", + level = DeprecationLevel.WARNING, + replaceWith = ReplaceWith("randomClass") + ) + val randomProvider: RandomClassProvider by lazy { RandomClassProvider(config) } - // dictionary-based providers + // yml dictionary-based providers val address: Address by lazy { Address(fakerService) } - val adjective: Adjective by lazy { Adjective(fakerService) } - val airport: Airport by lazy { Airport(fakerService) } - val ancient: Ancient by lazy { Ancient(fakerService) } - val animal: Animal by lazy { Animal(fakerService) } - 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) } - val backToTheFuture: BackToTheFuture by lazy { BackToTheFuture(fakerService) } - val bank: Bank by lazy { Bank(fakerService) } - val barcode: Barcode by lazy { Barcode(fakerService) } - val basketball: Basketball by lazy { Basketball(fakerService) } - val beer: Beer by lazy { Beer(fakerService) } - val bible: Bible by lazy { Bible(fakerService) } - val bigBangTheory: BigBangTheory by lazy { BigBangTheory(fakerService) } - val bird: Bird by lazy { Bird(fakerService) } - val blood: Blood by lazy { Blood(fakerService) } - val bojackHorseman: BojackHorseman by lazy { BojackHorseman(fakerService) } - val book: Book by lazy { Book(fakerService) } - val bossaNova: BossaNova by lazy { BossaNova(fakerService) } - val breakingBad: BreakingBad by lazy { BreakingBad(fakerService) } - val brooklynNineNine: BrooklynNineNine by lazy { BrooklynNineNine(fakerService) } - val buffy: Buffy by lazy { Buffy(fakerService) } - val business: Business by lazy { Business(fakerService) } - val camera: Camera by lazy { Camera(fakerService) } - val cannabis: Cannabis by lazy { Cannabis(fakerService) } - val cat: Cat by lazy { Cat(fakerService) } - val chiquito: Chiquito by lazy { Chiquito(fakerService) } - val chess: Chess by lazy { Chess(fakerService) } - val chuckNorris: ChuckNorris by lazy { ChuckNorris(fakerService) } - val clashOfClans: ClashOfClans by lazy { ClashOfClans(fakerService) } - val code: Code by lazy { Code(fakerService) } - val coffee: Coffee by lazy { Coffee(fakerService) } - val coin: Coin by lazy { Coin(fakerService) } val color: Color by lazy { Color(fakerService) } - val commerce: Commerce by lazy { Commerce(fakerService) } - val community: Community by lazy { Community(fakerService) } - val company: Company by lazy { Company(fakerService) } - - // val compass: Compass by lazy {Compass(fakerService) } - val computer: Computer by lazy { Computer(fakerService) } - val conan: Conan by lazy { Conan(fakerService) } - val construction: Construction by lazy { Construction(fakerService) } - val control: Control by lazy { Control(fakerService) } - val cosmere: Cosmere by lazy { Cosmere(fakerService) } - val cowboyBebop: CowboyBebop by lazy { CowboyBebop(fakerService) } - val crossfit: Crossfit by lazy { Crossfit(fakerService) } - val cryptoCoin: CryptoCoin by lazy { CryptoCoin(fakerService) } - val cultureSeries: CultureSeries by lazy { CultureSeries(fakerService) } val currency: Currency by lazy { Currency(fakerService) } - val dcComics: DcComics by lazy { DcComics(fakerService) } - val demographic: Demographic by lazy { Demographic(fakerService) } - val departed: Departed by lazy { Departed(fakerService) } - val dessert: Dessert by lazy { Dessert(fakerService) } - val device: Device by lazy { Device(fakerService) } - val dnd: DnD by lazy { DnD(fakerService) } - val dog: Dog by lazy { Dog(fakerService) } - val doraemon: Doraemon by lazy { Doraemon(fakerService) } - val dota: Dota by lazy { Dota(fakerService) } - val dragonBall: DragonBall by lazy { DragonBall(fakerService) } - val drivingLicense: DrivingLicense by lazy { DrivingLicense(fakerService) } - val drone: Drone by lazy { Drone(fakerService) } - val drWho: DrWho by lazy { DrWho(fakerService) } - val dumbAndDumber: DumbAndDumber by lazy { DumbAndDumber(fakerService) } - val dune: Dune by lazy { Dune(fakerService) } - val educator: Educator by lazy { Educator(fakerService) } - val elderScrolls: ElderScrolls by lazy { ElderScrolls(fakerService) } - val electricalComponents: ElectricalComponents by lazy { ElectricalComponents(fakerService) } - val emotion: Emotion by lazy { Emotion(fakerService) } - val eSport: ESport by lazy { ESport(fakerService) } - val fallout: Fallout by lazy { Fallout(fakerService) } - val familyGuy: FamilyGuy by lazy { FamilyGuy(fakerService) } + val currencySymbol: CurrencySymbol by lazy { CurrencySymbol(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) } - val food: Food by lazy { Food(fakerService) } - val football: Football by lazy { Football(fakerService) } - val freshPriceOfBelAir: FreshPriceOfBelAir by lazy { FreshPriceOfBelAir(fakerService) } - val friends: Friends by lazy { Friends(fakerService) } - val funnyName: FunnyName by lazy { FunnyName(fakerService) } - val futurama: Futurama by lazy { Futurama(fakerService) } - val game: Game by lazy { Game(fakerService) } - val gameOfThrones: GameOfThrones by lazy { GameOfThrones(fakerService) } val gender: Gender by lazy { Gender(fakerService) } - val ghostBusters: GhostBusters by lazy { GhostBusters(fakerService) } - val gratefulDead: GratefulDead by lazy { GratefulDead(fakerService) } - val greekPhilosophers: GreekPhilosophers by lazy { GreekPhilosophers(fakerService) } - val hacker: Hacker by lazy { Hacker(fakerService) } - val hackers: Hackers by lazy { Hackers(fakerService) } - val halfLife: HalfLife by lazy { HalfLife(fakerService) } - val harryPotter: HarryPotter by lazy { HarryPotter(fakerService) } - val heroes: Heroes by lazy { Heroes(fakerService) } - val heroesOfTheStorm: HeroesOfTheStorm by lazy { HeroesOfTheStorm(fakerService) } - val heyArnold: HeyArnold by lazy { HeyArnold(fakerService) } - val hipster: Hipster by lazy { Hipster(fakerService) } - val hitchhikersGuideToTheGalaxy: HitchhikersGuideToTheGalaxy by lazy { HitchhikersGuideToTheGalaxy(fakerService) } - val hobbit: Hobbit by lazy { Hobbit(fakerService) } - val hobby: Hobby by lazy { Hobby(fakerService) } - val horse: Horse by lazy { Horse(fakerService) } - val house: House by lazy { House(fakerService) } - val howIMetYourMother: HowIMetYourMother by lazy { HowIMetYourMother(fakerService) } - val howToTrainYourDragon: HowToTrainYourDragon by lazy { HowToTrainYourDragon(fakerService) } val idNumber: IdNumber by lazy { IdNumber(fakerService) } - val industrySegments: IndustrySegments by lazy { IndustrySegments(fakerService) } - val internet: Internet by lazy { Internet(fakerService) } - - // val invoice: Invoice by lazy {Invoice(fakerService } - val jackHandey: JackHandey by lazy { JackHandey(fakerService) } - val job: Job by lazy { Job(fakerService) } - val kamenRider: KamenRider by lazy { KamenRider(fakerService) } - val kPop: KPop by lazy { KPop(fakerService) } - val leagueOfLegends: LeagueOfLegends by lazy { LeagueOfLegends(fakerService) } - val lebowski: Lebowski by lazy { Lebowski(fakerService) } - val lordOfTheRings: LordOfTheRings by lazy { LordOfTheRings(fakerService) } - val lorem: Lorem by lazy { Lorem(fakerService) } - val lovecraft: Lovecraft by lazy { Lovecraft(fakerService) } - val markdown: Markdown by lazy { Markdown(fakerService) } - val marketing: Marketing by lazy { Marketing(fakerService) } + val internet: Internet by lazy { Internet(fakerService, name) } val measurement: Measurement by lazy { Measurement(fakerService) } - 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) } - val movie: Movie by lazy { Movie(fakerService) } - val music: Music by lazy { Music(fakerService) } - val myst: Myst by lazy { Myst(fakerService) } val name: Name by lazy { Name(fakerService) } - val naruto: Naruto by lazy { Naruto(fakerService) } - val nation: Nation by lazy { Nation(fakerService) } - val natoPhoneticAlphabet: NatoPhoneticAlphabet by lazy { NatoPhoneticAlphabet(fakerService) } - val newGirl: NewGirl by lazy { NewGirl(fakerService) } - val onePiece: OnePiece by lazy { OnePiece(fakerService) } - val opera: Opera by lazy { Opera(fakerService) } - val overwatch: Overwatch by lazy { Overwatch(fakerService) } - val parksAndRec: ParksAndRec by lazy { ParksAndRec(fakerService) } - val pearlJam: PearlJam by lazy { PearlJam(fakerService) } val person: Person by lazy { Person(config.random) } - val phish: Phish by lazy { Phish(fakerService) } val phoneNumber: PhoneNumber by lazy { PhoneNumber(fakerService) } - val pokemon: Pokemon by lazy { Pokemon(fakerService) } - val prince: Prince by lazy { Prince(fakerService) } - val princessBride: PrincessBride by lazy { PrincessBride(fakerService) } - val programmingLanguage: ProgrammingLanguage by lazy { ProgrammingLanguage(fakerService) } - val quote: Quote by lazy { Quote(fakerService) } - val rajnikanth: Rajnikanth by lazy { Rajnikanth(fakerService) } - val relationship: Relationship by lazy { Relationship(fakerService) } - val restaurant: Restaurant by lazy { Restaurant(fakerService) } - val rickAndMorty: RickAndMorty by lazy { RickAndMorty(fakerService) } - val rockBand: RockBand by lazy { RockBand(fakerService) } - val room: Room by lazy { Room(fakerService) } - val rupaul: Rupaul by lazy { Rupaul(fakerService) } - val rush: Rush by lazy { Rush(fakerService) } - val science: Science by lazy { Science(fakerService) } - val seinfeld: Seinfeld by lazy { Seinfeld(fakerService) } - val shakespeare: Shakespeare by lazy { Shakespeare(fakerService) } - val show: Show by lazy { Show(fakerService) } - val siliconValley: SiliconValley by lazy { SiliconValley(fakerService) } - val simpsons: Simpsons by lazy { Simpsons(fakerService) } - val slackEmoji: SlackEmoji by lazy { SlackEmoji(fakerService) } - val smashingPumpkins: SmashingPumpkins by lazy { SmashingPumpkins(fakerService) } - val sonicTheHedgehog: SonicTheHedgehog by lazy { SonicTheHedgehog(fakerService) } - - // val source: Source by lazy {Source(fakerService } - val southPark: SouthPark by lazy { SouthPark(fakerService) } - val space: Space by lazy { Space(fakerService) } - val spongebob: Spongebob by lazy { Spongebob(fakerService) } - val sport: Sport by lazy { Sport(fakerService) } - val stargate: Stargate by lazy { Stargate(fakerService) } - val starTrek: StarTrek by lazy { StarTrek(fakerService) } - val starWars: StarWars by lazy { StarWars(fakerService) } - val strangerThings: StrangerThings by lazy { StrangerThings(fakerService) } - val streetFighter: StreetFighter by lazy { StreetFighter(fakerService) } - val stripe: Stripe by lazy { Stripe(fakerService) } - val studioGhibli: StudioGhibli by lazy { StudioGhibli(fakerService) } - val subscription: Subscription by lazy { Subscription(fakerService) } - val suits: Suits by lazy { Suits(fakerService) } - val superMario: SuperMario by lazy { SuperMario(fakerService) } - val superhero: Superhero by lazy { Superhero(fakerService) } - val supernatural: Supernatural by lazy { Supernatural(fakerService) } - val superSmashBros: SuperSmashBros by lazy { SuperSmashBros(fakerService) } - val swordArtOnline: SwordArtOnline by lazy { SwordArtOnline(fakerService) } - val tarkov: Tarkov by lazy { Tarkov(fakerService) } - val tea: Tea by lazy { Tea(fakerService) } - val team: Team by lazy { Team(fakerService) } - val theExpanse: TheExpanse by lazy { TheExpanse(fakerService) } - val theITCrowd: TheITCrowd by lazy { TheITCrowd(fakerService) } - val theKingkillerChronicle: TheKingkillerChronicle by lazy { TheKingkillerChronicle(fakerService) } - val theOffice: TheOffice by lazy { TheOffice(fakerService) } - val theRoom: TheRoom by lazy { TheRoom(fakerService) } - 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) } - val university: University by lazy { University(fakerService) } - val vehicle: Vehicle by lazy { Vehicle(fakerService) } - val ventureBros: VentureBros by lazy { VentureBros(fakerService) } - val verbs: Verbs by lazy { Verbs(fakerService) } - val volleyball: Volleyball by lazy { Volleyball(fakerService) } - val warhammerFantasy: WarhammerFantasy by lazy { WarhammerFantasy(fakerService) } - val vForVendetta: VForVendetta by lazy { VForVendetta(fakerService) } - val witcher: Witcher by lazy { Witcher(fakerService) } - val worldCup: WorldCup by lazy { WorldCup(fakerService) } - val worldOfWarcraft: WorldOfWarcraft by lazy { WorldOfWarcraft(fakerService) } - val yoda: Yoda by lazy { Yoda(fakerService) } - val zelda: Zelda by lazy { Zelda(fakerService) } + val separator: Separator by lazy { Separator(fakerService) } + // TODO val source: Source by lazy { Source(fakerService) } @FakerDsl /** * DSL builder for creating instances of [Faker] */ - class Builder internal constructor() { - /** - * @property config faker configuration for the [Faker] instance - * which will be created with this [Faker.Builder]. - */ - private var config: FakerConfig = io.github.serpro69.kfaker.fakerConfig { } - - /** - * Sets [config] configuration for this [Faker.Builder] - * using the results of the [block] function. - * - * This [config] will then be used when an instance of [Faker] is created using this [Faker.Builder] - */ - fun fakerConfig(block: ConfigBuilder) { - config = io.github.serpro69.kfaker.fakerConfig(block) - } + class Builder internal constructor() : AbstractFaker.Builder() { /** * Builds an instance of [Faker] with this [config]. */ - internal fun build(): Faker = Faker(config) + override fun build(): Faker = Faker(config) } } /** - * Applies the the [block] function to [Faker.Builder] + * Applies the [block] function to [Faker.Builder] * and returns as an instance of [Faker] from that builder. */ fun faker(block: Faker.Builder.() -> Unit): Faker = Faker.Builder().apply(block).build() diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/FakerConfig.kt b/core/src/main/kotlin/io/github/serpro69/kfaker/FakerConfig.kt index 2be03ea1e..3f6ca262c 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/FakerConfig.kt +++ b/core/src/main/kotlin/io/github/serpro69/kfaker/FakerConfig.kt @@ -6,7 +6,7 @@ import io.github.serpro69.kfaker.provider.misc.RandomProviderConfig import java.util.* /** - * Configuration for [Faker]. + * Configuration for implementations of [AbstractFaker]. */ class FakerConfig private constructor( val locale: String, diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/FakerService.kt b/core/src/main/kotlin/io/github/serpro69/kfaker/FakerService.kt index 1a2c09a17..cc5f54dc5 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/FakerService.kt +++ b/core/src/main/kotlin/io/github/serpro69/kfaker/FakerService.kt @@ -12,11 +12,8 @@ import io.github.serpro69.kfaker.dictionary.YamlCategory.SEPARATOR import io.github.serpro69.kfaker.dictionary.YamlCategoryData import io.github.serpro69.kfaker.dictionary.lowercase import io.github.serpro69.kfaker.provider.Address -import io.github.serpro69.kfaker.provider.Degree -import io.github.serpro69.kfaker.provider.Educator import io.github.serpro69.kfaker.provider.FakeDataProvider import io.github.serpro69.kfaker.provider.Name -import io.github.serpro69.kfaker.provider.Tertiary import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import java.io.InputStream import java.util.* @@ -33,15 +30,15 @@ import kotlin.reflect.full.declaredMemberProperties * * @constructor creates an instance of this [FakerService] with the default 'en' locale if is not specified. */ -internal class FakerService { +class FakerService { @Suppress("RegExpRedundantEscape") private val curlyBraceRegex = Regex("""#\{(?!\d)(\p{L}+\.)?(.*?)\}""") private val locale: String - internal val faker: Faker + internal val faker: AbstractFaker internal val randomService: RandomService internal val dictionary: Dictionary = EnumMap(YamlCategory::class.java) - internal constructor(faker: Faker) { + internal constructor(faker: AbstractFaker) { this.faker = faker this.locale = faker.config.locale.replace("_", "-") randomService = RandomService(faker.config) @@ -50,7 +47,7 @@ internal class FakerService { /** * @constructor creates an instance of this [FakerService] with the given [locale] */ - internal constructor(faker: Faker, locale: Locale) { + internal constructor(faker: AbstractFaker, locale: Locale) { this.faker = faker this.locale = locale.toLanguageTag() randomService = RandomService(faker.config) @@ -189,7 +186,7 @@ internal class FakerService { * @throws IllegalArgumentException if the [locale] is invalid or locale dictionary file is not present on the classpath. */ @Suppress("UNUSED_ANONYMOUS_PARAMETER") - internal fun load(category: YamlCategory, secondaryCategory: Category? = null): Dictionary { + fun load(category: YamlCategory, secondaryCategory: Category? = null): Dictionary { val defaultValues: LinkedHashMap = linkedMapOf() dictionary.compute(category) { _, categoryData -> // i.e. compute data for 'address' category @@ -476,6 +473,7 @@ internal class FakerService { * fun street() = with(fakerService) { resolveExpression().numerify().letterify() * ``` */ + @Suppress("KDocUnresolvedReference") private tailrec fun resolveExpression(category: YamlCategory, rawExpression: RawExpression): String { val sb = StringBuffer() @@ -578,13 +576,26 @@ internal class FakerService { /** * Returns an instance of [FakeDataProvider] fetched by its [simpleClassName] (case-insensitive). + * + * The function will attempt a [FakeDataProvider] in this [faker]'s declared member properties. + * Failing that, the core [Faker] implementation will be used to do the same. + * + * @throws NoSuchElementException if neither this [faker] nor the core [Faker] implementation + * has declared a provider that matches the [simpleClassName] parameter. */ private fun getProvider(simpleClassName: String): FakeDataProvider { - val kProp = faker::class.declaredMemberProperties.first { + val kProp = faker::class.declaredMemberProperties.firstOrNull { it.name.lowercase() == simpleClassName.lowercase() } - return kProp.call(faker) as FakeDataProvider + return kProp?.let { it.call(faker) as FakeDataProvider } ?: run { + val core = Faker(faker.config) + val prop = core::class.declaredMemberProperties.firstOrNull { p -> + p.name.lowercase() == simpleClassName.lowercase() + } + prop?.let { p -> p.call(core) as FakeDataProvider } + ?: throw NoSuchElementException("Faker provider '$simpleClassName' not found in $core or $faker") + } } private fun findMatchesAndAppendTail( diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/IRandom.kt b/core/src/main/kotlin/io/github/serpro69/kfaker/IRandom.kt index e8748b525..03c0c7cca 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/IRandom.kt +++ b/core/src/main/kotlin/io/github/serpro69/kfaker/IRandom.kt @@ -2,6 +2,9 @@ package io.github.serpro69.kfaker import java.util.* +/** + * Provides functionality similar to [Random] + */ interface IRandom { val config: FakerConfig diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/RandomService.kt b/core/src/main/kotlin/io/github/serpro69/kfaker/RandomService.kt index 798da4865..83ab3d6da 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/RandomService.kt +++ b/core/src/main/kotlin/io/github/serpro69/kfaker/RandomService.kt @@ -19,7 +19,7 @@ import kotlin.random.asKotlinRandom * Consider passing [java.security.SecureRandom] to the constructor of this [RandomService] * to get a cryptographically secure pseudo-random generator. */ -internal class RandomService internal constructor(override val config: FakerConfig) : IRandom { +class RandomService internal constructor(override val config: FakerConfig) : IRandom { private val random = config.random private val alphabeticLowerCharset = ('a'..'z') private val alphabeticUpperCharset = ('A'..'Z') diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/dictionary/Category.kt b/core/src/main/kotlin/io/github/serpro69/kfaker/dictionary/Category.kt index aec84d287..0578441db 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/dictionary/Category.kt +++ b/core/src/main/kotlin/io/github/serpro69/kfaker/dictionary/Category.kt @@ -13,7 +13,7 @@ interface Category { /** * Creates a new [Category] with the given [name]. */ - internal fun ofName(name: String): Category = object : Category { + fun ofName(name: String): Category = object : Category { override val name: String = name.uppercase() } } diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/dictionary/RawExpression.kt b/core/src/main/kotlin/io/github/serpro69/kfaker/dictionary/RawExpression.kt index 432ff8bcc..8427c0c26 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/dictionary/RawExpression.kt +++ b/core/src/main/kotlin/io/github/serpro69/kfaker/dictionary/RawExpression.kt @@ -1,5 +1,4 @@ package io.github.serpro69.kfaker.dictionary -@Suppress("EXPERIMENTAL_FEATURE_WARNING") @JvmInline -internal value class RawExpression(val value: String) +value class RawExpression(val value: String) 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 bf0270df6..a99cb4d6a 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 @@ -1,16 +1,20 @@ package io.github.serpro69.kfaker.dictionary -import java.util.NoSuchElementException - /** * This enum contains all default categories and matches with the names of the .yml files for 'en' locale. * * If any new category is added to .yml file(s) a new class has to be added to this enum as well. */ -internal enum class YamlCategory : Category { +enum class YamlCategory : Category { + /** + * [YamlCategory] for custom yml-based data providers + */ + CUSTOM, + // Special providers for locale-based symbols SEPARATOR, CURRENCY_SYMBOL, + // Rest of providers ADDRESS, ADJECTIVE, @@ -151,7 +155,6 @@ internal enum class YamlCategory : Category { RESTAURANT, RICK_AND_MORTY, ROCK_BAND, - ROOM, RUPAUL, RUSH, SCIENCE, diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/AbstractFakeDataProvider.kt b/core/src/main/kotlin/io/github/serpro69/kfaker/provider/AbstractFakeDataProvider.kt index 465aeebe9..1b2b24da7 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/AbstractFakeDataProvider.kt +++ b/core/src/main/kotlin/io/github/serpro69/kfaker/provider/AbstractFakeDataProvider.kt @@ -12,18 +12,18 @@ import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider * @param T type of data provider (i.e. [StringProvider]) */ abstract class AbstractFakeDataProvider internal constructor( - internal val fakerService: FakerService + val fakerService: FakerService ) : FakeDataProvider { /** * Category of `this` fake data provider class. */ - internal abstract val category: Category + protected abstract val category: Category /** * A [LocalUniqueDataProvider] instance that is used with this [unique] provider. */ - internal abstract val localUniqueDataProvider: LocalUniqueDataProvider + protected abstract val localUniqueDataProvider: LocalUniqueDataProvider /** * An instance of [T] for generating unique values diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Bird.kt b/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Bird.kt deleted file mode 100644 index c6ce9e70f..000000000 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Bird.kt +++ /dev/null @@ -1,84 +0,0 @@ -@file:Suppress("unused") - -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.CREATURE] category. - */ -class Bird internal constructor(fakerService: FakerService) : YamlFakeDataProvider(fakerService) { - override val yamlCategory = YamlCategory.CREATURE - override val secondaryCategory: Category = Category.ofName("BIRD") - override val localUniqueDataProvider = LocalUniqueDataProvider() - override val unique by UniqueProviderDelegate(localUniqueDataProvider) - - init { - fakerService.load(yamlCategory, secondaryCategory) - } - - val orderCommonMap by lazy { BirdOrderCommonMap(fakerService) } - - fun anatomy(): String = resolve("bird", "anatomy") - fun anatomyPastTense(): String = resolve("bird", "anatomy_past_tense") - fun geo(): String = resolve("bird", "geo") - fun colors(): String = resolve("bird", "colors") - fun emotionalAdjectives(): String = resolve("bird", "emotional_adjectives") - fun sillyAdjectives(): String = resolve("bird", "silly_adjectives") - fun adjectives(): String = resolve("bird", "adjectives") - fun plausibleCommonNames(): String = resolve("bird", "plausible_common_names") - fun implausibleCommonNames(): String = resolve("bird", "implausible_common_names") - fun commonFamilyName(): String = resolve("bird", "common_family_name") -} - -class BirdOrderCommonMap internal constructor( - fakerService: FakerService -) : YamlFakeDataProvider(fakerService) { - override val yamlCategory = YamlCategory.CREATURE - override val localUniqueDataProvider = LocalUniqueDataProvider() - override val unique by UniqueProviderDelegate(localUniqueDataProvider) - - fun accipitriformes(): String = resolve("bird", "order_common_map", "Accipitriformes") - fun anseriformes(): String = resolve("bird", "order_common_map", "Anseriformes") - fun apterygiformes(): String = resolve("bird", "order_common_map", "Apterygiformes") - fun bucerotiformes(): String = resolve("bird", "order_common_map", "Bucerotiformes") - fun caprimulgiformes(): String = resolve("bird", "order_common_map", "Caprimulgiformes") - fun cariamiformes(): String = resolve("bird", "order_common_map", "Cariamiformes") - fun casuariiformes(): String = resolve("bird", "order_common_map", "Casuariiformes") - fun cathartiformes(): String = resolve("bird", "order_common_map", "Cathartiformes") - fun charadriiformes(): String = resolve("bird", "order_common_map", "Charadriiformes") - fun ciconiiformes(): String = resolve("bird", "order_common_map", "Ciconiiformes") - fun coliiformes(): String = resolve("bird", "order_common_map", "Coliiformes") - fun columbiformes(): String = resolve("bird", "order_common_map", "Columbiformes") - fun coraciiformes(): String = resolve("bird", "order_common_map", "Coraciiformes") - fun cuculiformes(): String = resolve("bird", "order_common_map", "Cuculiformes") - fun eurypygiformes(): String = resolve("bird", "order_common_map", "Eurypygiformes") - fun falconiformes(): String = resolve("bird", "order_common_map", "Falconiformes") - fun galbuliformes(): String = resolve("bird", "order_common_map", "Galbuliformes") - fun galliformes(): String = resolve("bird", "order_common_map", "Galliformes") - fun gaviiformes(): String = resolve("bird", "order_common_map", "Gaviiformes") - fun gruiformes(): String = resolve("bird", "order_common_map", "Gruiformes") - fun mesitornithiformes(): String = resolve("bird", "order_common_map", "Mesitornithiformes") - fun musophagiformes(): String = resolve("bird", "order_common_map", "Musophagiformes") - fun opisthocomiformes(): String = resolve("bird", "order_common_map", "Opisthocomiformes") - fun otidiformes(): String = resolve("bird", "order_common_map", "Otidiformes") - fun passeriformes(): String = resolve("bird", "order_common_map", "Passeriformes") - fun pelecaniformes(): String = resolve("bird", "order_common_map", "Pelecaniformes") - fun phaethontiformes(): String = resolve("bird", "order_common_map", "Phaethontiformes") - fun phoenicopteriformes(): String = resolve("bird", "order_common_map", "Phoenicopteriformes") - fun piciformes(): String = resolve("bird", "order_common_map", "Piciformes") - fun podicipediformes(): String = resolve("bird", "order_common_map", "Podicipediformes") - fun procellariiformes(): String = resolve("bird", "order_common_map", "Procellariiformes") - fun psittaciformes(): String = resolve("bird", "order_common_map", "Psittaciformes") - fun pterocliformes(): String = resolve("bird", "order_common_map", "Pterocliformes") - fun rheiformes(): String = resolve("bird", "order_common_map", "Rheiformes") - fun sphenisciformes(): String = resolve("bird", "order_common_map", "Sphenisciformes") - fun strigiformes(): String = resolve("bird", "order_common_map", "Strigiformes") - fun struthioniformes(): String = resolve("bird", "order_common_map", "Struthioniformes") - fun suliformes(): String = resolve("bird", "order_common_map", "Suliformes") - fun tinamiformes(): String = resolve("bird", "order_common_map", "Tinamiformes") - fun trogoniformes(): String = resolve("bird", "order_common_map", "Trogoniformes") -} diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Control.kt b/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Control.kt deleted file mode 100644 index 2ce6898c2..000000000 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Control.kt +++ /dev/null @@ -1,30 +0,0 @@ -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.GAMES] category. - */ -@Suppress("unused") -class Control internal constructor(fakerService: FakerService) : YamlFakeDataProvider(fakerService) { - override val yamlCategory = YamlCategory.GAMES - override val secondaryCategory: Category = Category.ofName("CONTROL") - override val localUniqueDataProvider = LocalUniqueDataProvider() - override val unique by UniqueProviderDelegate(localUniqueDataProvider) - - init { - fakerService.load(yamlCategory, secondaryCategory) - } - - fun character() = resolve("control", "character") - fun location() = resolve("control", "location") - fun objectOfPower() = resolve("control", "object_of_power") - fun alteredItem() = resolve("control", "altered_item") - fun alteredWorldEvent() = resolve("control", "altered_world_event") - fun hiss() = resolve("control", "hiss") - fun theBoard() = resolve("control", "the_board") - fun quote() = resolve("control", "quote") -} diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Dog.kt b/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Dog.kt deleted file mode 100644 index 536cdc3cc..000000000 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Dog.kt +++ /dev/null @@ -1,29 +0,0 @@ -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.CREATURE] category. - */ -@Suppress("unused") -class Dog internal constructor(fakerService: FakerService) : YamlFakeDataProvider(fakerService) { - override val yamlCategory = YamlCategory.CREATURE - override val secondaryCategory: Category = Category.ofName("DOG") - override val localUniqueDataProvider = LocalUniqueDataProvider() - override val unique by UniqueProviderDelegate(localUniqueDataProvider) - - init { - fakerService.load(yamlCategory, secondaryCategory) - } - - fun name() = resolve("dog", "name") - fun breed() = resolve("dog", "breed") - fun sound() = resolve("dog", "sound") - fun memePhrase() = resolve("dog", "meme_phrase") - fun age() = resolve("dog", "age") - fun coatLength() = resolve("dog", "coat_length") - fun size() = resolve("dog", "size") -} diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/ElderScrolls.kt b/core/src/main/kotlin/io/github/serpro69/kfaker/provider/ElderScrolls.kt deleted file mode 100644 index e1a0df29f..000000000 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/ElderScrolls.kt +++ /dev/null @@ -1,31 +0,0 @@ -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.GAMES] category. - */ -@Suppress("unused") -class ElderScrolls internal constructor(fakerService: FakerService) : YamlFakeDataProvider(fakerService) { - override val yamlCategory = YamlCategory.GAMES - override val secondaryCategory: Category = Category.ofName("ELDER_SCROLLS") - override val localUniqueDataProvider = LocalUniqueDataProvider() - override val unique by UniqueProviderDelegate(localUniqueDataProvider) - - init { - fakerService.load(yamlCategory, secondaryCategory) - } - - fun race() = resolve("elder_scrolls", "race") - fun creature() = resolve("elder_scrolls", "creature") - fun region() = resolve("elder_scrolls", "region") - fun dragon() = resolve("elder_scrolls", "dragon") - fun city() = resolve("elder_scrolls", "city") - fun firstName() = resolve("elder_scrolls", "first_name") - fun lastName() = resolve("elder_scrolls", "last_name") - fun weapon() = resolve("elder_scrolls", "weapon") - fun jewelry() = resolve("elder_scrolls", "jewelry") -} diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Internet.kt b/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Internet.kt index 7022427d4..1df0283f0 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Internet.kt +++ b/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Internet.kt @@ -2,6 +2,7 @@ package io.github.serpro69.kfaker.provider import io.github.serpro69.kfaker.FakerService import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.faker import io.github.serpro69.kfaker.helper.isReservedNet import io.github.serpro69.kfaker.helper.prepare import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider @@ -12,7 +13,10 @@ import java.lang.String.format * [FakeDataProvider] implementation for [YamlCategory.INTERNET] category. */ @Suppress("unused") -class Internet internal constructor(fakerService: FakerService) : YamlFakeDataProvider(fakerService) { +class Internet internal constructor( + fakerService: FakerService, + private val nameProvider: Name, +) : YamlFakeDataProvider(fakerService) { override val yamlCategory = YamlCategory.INTERNET override val localUniqueDataProvider = LocalUniqueDataProvider() override val unique by UniqueProviderDelegate(localUniqueDataProvider) @@ -22,9 +26,7 @@ class Internet internal constructor(fakerService: FakerService) : YamlFakeDataPr } fun domain(subdomain: Boolean = false, domain: String? = null): String { - val name: () -> String = { - prepare(fakerService.faker.company.name().split(" ").first(), fakerService.faker.config) - } + val name: () -> String = { prepare(nameProvider.lastName().split(" ").first(), fakerService.faker.config) } return domain?.let { domain.split(".") .map { domainPart -> prepare(domainPart, fakerService.faker.config) } @@ -94,7 +96,7 @@ class Internet internal constructor(fakerService: FakerService) : YamlFakeDataPr @JvmOverloads fun email(name: String = ""): String { val localName = if (name.trim() == "") { - fakerService.faker.name.name() + nameProvider.name() .replace(".", "") .replace(" ", ".") .lowercase() @@ -133,3 +135,10 @@ private val privateIpv4Ranges = listOf( // 198.18.0.0/15 - Used for benchmark testing of inter-network communications between subnets listOf(198..198, 18..19, 0..255, 1..255) ) + +fun main() { + val f = faker { } + repeat(100) { + println(f.internet.domain()) + } +} diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Minecraft.kt b/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Minecraft.kt deleted file mode 100644 index ca93ec096..000000000 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Minecraft.kt +++ /dev/null @@ -1,30 +0,0 @@ -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.GAMES] category. - */ -@Suppress("unused") -class Minecraft internal constructor(fakerService: FakerService) : YamlFakeDataProvider(fakerService) { - override val yamlCategory = YamlCategory.GAMES - override val secondaryCategory: Category = Category.ofName("MINECRAFT") - override val localUniqueDataProvider = LocalUniqueDataProvider() - override val unique by UniqueProviderDelegate(localUniqueDataProvider) - - init { - fakerService.load(yamlCategory, secondaryCategory) - } - - fun achievement() = resolve("minecraft", "achievement") - fun biome() = resolve("minecraft", "biome") - fun blocks() = resolve("minecraft", "blocks") - fun enchantment() = resolve("minecraft", "enchantment") - fun gameMode() = resolve("minecraft", "game_mode") - fun items() = resolve("minecraft", "items") - fun mobs() = resolve("minecraft", "mobs") - fun statusEffect() = resolve("minecraft", "status_effect") -} diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Money.kt b/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Money.kt index f81ffdcb7..ca499399e 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Money.kt +++ b/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Money.kt @@ -2,7 +2,6 @@ package io.github.serpro69.kfaker.provider import io.github.serpro69.kfaker.FakerService import io.github.serpro69.kfaker.dictionary.Category -import io.github.serpro69.kfaker.dictionary.YamlCategory import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Room.kt b/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Room.kt deleted file mode 100644 index a402498a8..000000000 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Room.kt +++ /dev/null @@ -1,27 +0,0 @@ -@file:Suppress("unused") - -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.ROOM] category. - */ -class Room internal constructor(fakerService: FakerService) : - YamlFakeDataProvider(fakerService) { - override val yamlCategory = YamlCategory.ROOM - override val localUniqueDataProvider = LocalUniqueDataProvider() - override val unique by UniqueProviderDelegate(localUniqueDataProvider) - - init { - fakerService.load(yamlCategory) - } - - fun actors(): String = resolve("actors") - fun characters(): String = resolve("characters") - fun locations(): String = resolve("locations") - fun quotes(): String = resolve("quotes") -} diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Witcher.kt b/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Witcher.kt deleted file mode 100644 index fdc5d2689..000000000 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Witcher.kt +++ /dev/null @@ -1,31 +0,0 @@ -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.GAMES] category. - */ -@Suppress("unused") -class Witcher internal constructor(fakerService: FakerService) : YamlFakeDataProvider(fakerService) { - override val yamlCategory = YamlCategory.GAMES - override val secondaryCategory: Category = Category.ofName("WITCHER") - override val localUniqueDataProvider = LocalUniqueDataProvider() - override val unique by UniqueProviderDelegate(localUniqueDataProvider) - - init { - fakerService.load(yamlCategory, secondaryCategory) - } - - fun characters() = resolve("witcher", "characters") - fun witchers() = resolve("witcher", "witchers") - fun schools() = resolve("witcher", "schools") - fun locations() = resolve("witcher", "locations") - fun quotes() = resolve("witcher", "quotes") - fun monsters() = resolve("witcher", "monsters") - fun signs() = resolve("witcher", "signs") - fun potions() = resolve("witcher", "potions") - fun books() = resolve("witcher", "books") -} diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/YamlFakeDataProvider.kt b/core/src/main/kotlin/io/github/serpro69/kfaker/provider/YamlFakeDataProvider.kt index c7df7007b..441502e84 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/YamlFakeDataProvider.kt +++ b/core/src/main/kotlin/io/github/serpro69/kfaker/provider/YamlFakeDataProvider.kt @@ -1,6 +1,6 @@ package io.github.serpro69.kfaker.provider -import io.github.serpro69.kfaker.Faker +import io.github.serpro69.kfaker.AbstractFaker import io.github.serpro69.kfaker.FakerService import io.github.serpro69.kfaker.dictionary.Category import io.github.serpro69.kfaker.dictionary.YamlCategory @@ -11,7 +11,7 @@ import io.github.serpro69.kfaker.exception.RetryLimitException * * @param T type of data provider (i.e. [Address]) */ -abstract class YamlFakeDataProvider internal constructor( +abstract class YamlFakeDataProvider( fakerService: FakerService ) : AbstractFakeDataProvider(fakerService) { @@ -26,9 +26,13 @@ abstract class YamlFakeDataProvider internal constructor( * faker: * address: * ``` - * then the category name would be [YamlCategory.ADDRESS] + * then the [yamlCategory] would be [YamlCategory.ADDRESS] + * + * _NB! If the [secondaryCategory] is NOT set, + * the dictionary filename should match the [yamlCategory] name, + * i.e. the file name should be `address.yml` for the [YamlCategory.ADDRESS]._ */ - internal abstract val yamlCategory: YamlCategory + protected abstract val yamlCategory: YamlCategory /** * Secondary category for `this` fake yaml data provider class. @@ -42,10 +46,20 @@ abstract class YamlFakeDataProvider internal constructor( * creature: * dog: * ``` - * then the category name would be `"dog"` + * then the [yamlCategory] would be [YamlCategory.CREATURE], and the secondary [Category.name] would be `"dog"` + * + * _TIP: Use [Category.ofName] helper function when needed._ + * + * _NB! If the [secondaryCategory] is set, + * the dictionary filename should match the [Category.name] of this [secondaryCategory], + * i.e. the file name should be `dog.yml` for the `[Category.ofName]` dog._ */ - internal open val secondaryCategory: Category? = null + protected open val secondaryCategory: Category? = null + /* + * FYI, we override the [category] from the super class + * so that we don't need to do it in each of this [YamlFakeDataProvider] implementations + */ final override val category: YamlCategory get() = yamlCategory @@ -62,6 +76,35 @@ abstract class YamlFakeDataProvider internal constructor( return returnOrResolveUnique(key) } + /** + * Returns resolved (unique) value for the parameter with the specified [primaryKey] and [secondaryKey]. + * + * TIP: Can be useful for providers that override this [secondaryCategory] + * to use a compile-safe object instead of a string for the [primaryKey]. + * + * Example: + * ```diff + * class Minecraft internal constructor(fakerService: FakerService) : YamlFakeDataProvider(fakerService) { + * override val yamlCategory = YamlCategory.GAMES + * override val secondaryCategory: Category = Category.ofName("MINECRAFT") + * override val localUniqueDataProvider = LocalUniqueDataProvider() + * override val unique by UniqueProviderDelegate(localUniqueDataProvider) + * + * fun achievement() = resolve("minecraft", "achievement") + * fun biome() = resolve(secondaryCategory, "biome") + * } + * ``` + * + * Will return a unique value if the call to the function is prefixed with `unique` property. + * Example: + * ``` + * faker.address.unique.countryByCode(countryCode) => will return a unique value for the `city` parameter + * ``` + */ + protected fun resolve(primaryKey: Category, secondaryKey: String): String { + return resolve(primaryKey.name.lowercase(), secondaryKey) + } + /** * Returns resolved (unique) value for the parameter with the specified [primaryKey] and [secondaryKey]. * @@ -75,6 +118,19 @@ abstract class YamlFakeDataProvider internal constructor( return returnOrResolveUnique(primaryKey, secondaryKey) } + /** + * Returns resolved (unique) value for the parameter with the specified [primaryKey], [secondaryKey] and [thirdKey] + * + * Will return a unique value if the call to the function is prefixed with `unique` property. + * Example: + * ``` + * faker.educator.tertiaryDegree(type) => will return a unique value for the `tertiaryDegree` parameter + * ``` + */ + protected fun resolve(primaryKey: Category, secondaryKey: String, thirdKey: String): String { + return resolve(primaryKey.name.lowercase(), secondaryKey, thirdKey) + } + /** * Returns resolved (unique) value for the parameter with the specified [primaryKey], [secondaryKey] and [thirdKey] * @@ -91,7 +147,7 @@ abstract class YamlFakeDataProvider internal constructor( /** * Returns the result of this [resolve] function. * - * IF [Faker.unique] is enabled for this [T] provider type + * IF [AbstractFaker.unique] is enabled for this [T] provider type * OR this [unique] is used * THEN will attempt to return a unique value. * diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/misc/RandomProvider.kt b/core/src/main/kotlin/io/github/serpro69/kfaker/provider/misc/RandomProvider.kt index 8bcbf1a2e..af005f3b8 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/misc/RandomProvider.kt +++ b/core/src/main/kotlin/io/github/serpro69/kfaker/provider/misc/RandomProvider.kt @@ -3,6 +3,7 @@ package io.github.serpro69.kfaker.provider.misc import io.github.serpro69.kfaker.FakerConfig import io.github.serpro69.kfaker.FakerService import io.github.serpro69.kfaker.IRandom +import io.github.serpro69.kfaker.RandomService import io.github.serpro69.kfaker.dictionary.Category import io.github.serpro69.kfaker.provider.AbstractFakeDataProvider import io.github.serpro69.kfaker.provider.misc.RandomProvider.Key.NEXT_CHAR @@ -21,6 +22,9 @@ import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate import java.util.* +/** + * Provides data-generator-like functionality for the functions of [RandomService]. + */ class RandomProvider internal constructor( fakerService: FakerService ) : IRandom, AbstractFakeDataProvider(fakerService) { diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/unique/GlobalUniqueDataDataProvider.kt b/core/src/main/kotlin/io/github/serpro69/kfaker/provider/unique/GlobalUniqueDataDataProvider.kt index cdc72cef4..4e53820b8 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/unique/GlobalUniqueDataDataProvider.kt +++ b/core/src/main/kotlin/io/github/serpro69/kfaker/provider/unique/GlobalUniqueDataDataProvider.kt @@ -1,14 +1,14 @@ package io.github.serpro69.kfaker.provider.unique import io.github.serpro69.kfaker.provider.FakeDataProvider -import io.github.serpro69.kfaker.Faker +import io.github.serpro69.kfaker.AbstractFaker import kotlin.reflect.KClass import kotlin.reflect.KProperty0 /** * Global provider for unique values. * - * This provider is used in [Faker] class to control global unique generation configuration of faker providers. + * This provider is used in [AbstractFaker] class implementations to control global unique generation configuration of faker providers. * * Example usage: * ``` diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/unique/LocalUniqueDataProvider.kt b/core/src/main/kotlin/io/github/serpro69/kfaker/provider/unique/LocalUniqueDataProvider.kt index d3daca06f..8930ab7fd 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/unique/LocalUniqueDataProvider.kt +++ b/core/src/main/kotlin/io/github/serpro69/kfaker/provider/unique/LocalUniqueDataProvider.kt @@ -20,7 +20,7 @@ import kotlin.reflect.jvm.javaField * Faker().address.unique().country() * ``` */ -class LocalUniqueDataProvider internal constructor() : UniqueDataProvider() { +class LocalUniqueDataProvider : UniqueDataProvider() { // override val config: UniqueProviderConfiguration // get() = TODO("Not yet implemented") // override val markedUnique: MutableSet = mutableSetOf() diff --git a/core/src/main/resources/locales/en/app.yml b/core/src/main/resources/locales/en/app.yml index 712f0aef7..770c3b077 100644 --- a/core/src/main/resources/locales/en/app.yml +++ b/core/src/main/resources/locales/en/app.yml @@ -6,5 +6,14 @@ en: version: ['0.#.#', '0.##', '#.##', '#.#', '#.#.#'] author: - "#{Name.name}" - - "#{Company.name}" + # - "#{Company.name}" + ### NB! workaround for #{Company.name} call, + # which is broken because Company is part of another faker (:faker:commerce), + # and we don't support calls between different faker providers + # Copied 'name' key values and 'suffix' as-is from company.yml + - "#{Name.last_name} #{suffix}" + - "#{Name.last_name}-#{Name.last_name}" + - "#{Name.last_name}, #{Name.last_name} and #{Name.last_name}" + suffix: [Inc, and Sons, LLC, Group] + ### end # END app_provider_dict diff --git a/core/src/main/resources/locales/en/room.yml b/core/src/main/resources/locales/en/room.yml deleted file mode 100644 index 617c88d94..000000000 --- a/core/src/main/resources/locales/en/room.yml +++ /dev/null @@ -1,70 +0,0 @@ -# START room_provider_dict -en: - faker: - room: - actors: - - Tommy Wiseau - - Juliette Danielle - - Greg Sestero - - Philip Haldiman - - Carolyn Minnott - - Robyn Paris - - Scott Holmes - - Dan Janjigian - - Kyle Vogt - - Greg Ellery - characters: - - Johnny - - Lisa - - Mark - - Denny - - Claudette - - Michelle - - Mike - - Chris-R - - Peter - - Steven - locations: - - Johnny's Place - - Rooftop - - Park - - Alley - - Flower Shop - - Claudette's Place - quotes: - - "Oh hi, Denny" - - "Anything for my princess! Ha-ha-ha-ha." - - "Denny, two's great, but three's a crowd. Ha-ha." - - "Oh hi, Johnny, I didn't know it was you." - - "Here you go, keep the change. Hi doggy!" - - "You're my favorite customer" - - "I just want to talk to Johnny. You look beautiful today. Can I kiss you?" - - "I got the results of the test back. I definitely have breast cancer." - - "Did you, uh, know, that chocolate is the symbol of love?" - - "Where’s my money, Denny?" - - "Denny, what kind of money, just tell me!" - - "What kind of drugs, Denny?" - - "I did not hit her! It’s not true! It’s bullshit! I did not hit her! I did not! Oh, hi Mark." - - "A-ha-ha-ha! What a story, Mark!" - - "You can love someone deep inside your heart, and there is nothing wrong with it. If a lot of people loved each other, the world would be a better place to live." - - "I never hit you. You shouldn’t have any secrets from me. I’m your future husband." - - "Why Lisa, why Lisa, please talk to me, please! You’re part of my life, you are everything, I could not go on without you, Lisa." - - "You’re lying, I never hit you. You are tearing me apart, Lisa!" - - "Do you understand life? Do you?" - - "Oh hi, Mike, what’s new?" - - "Oh hey, Denny." - - "How can they say this about me? I don’t believe it. I show them. I will record everything." - - "You know what they say: love is blind." - - "Ha-ha-ha, chicken, Peter, you’re just a little chicken! Cheep, cheep cheep cheep cheep chee-ee-ee-eep eeeeeeeeeeee!" - - "Oh, hi Denny. Nice tux, you look great." - - "You look great. You look a babyface." - - "Oh hi, Susan." - - "We got a new client at the bank, we make a lot of money." - - "Anyway, how is your sex life?" - - "Oh hi, Claudette. Bye!" - - "You betrayed me, you’re not good, you’re just a chicken, cheep-cheep-cheep-cheep-cheep." - - "It’s not over! Everybody betray me! I fed up with this world!" - - "How could you do this to me?! I gave you seven years of my life! And you betray me." - - "Aughhhhhhhh!!! Everybody betray me. I don’t have a friend in the world." - - "As far as I’m concerned, you can drop off the earth. That’s a promise" -# END room_provider_dict diff --git a/core/src/test/kotlin/io/github/serpro69/kfaker/FakerServiceTest.kt b/core/src/test/kotlin/io/github/serpro69/kfaker/FakerServiceTest.kt index b8b83749e..b829564d6 100644 --- a/core/src/test/kotlin/io/github/serpro69/kfaker/FakerServiceTest.kt +++ b/core/src/test/kotlin/io/github/serpro69/kfaker/FakerServiceTest.kt @@ -488,6 +488,7 @@ internal class FakerServiceTest : DescribeSpec({ } } +/* TODO - remove, the test was moved to ':faker:edu' module context("expression calls are chained with a dot '.' char") { val fakerService = fakerService(YamlCategory.EDUCATOR) val degreeType = fakerService.resolve(YamlCategory.EDUCATOR, "degree") @@ -499,7 +500,7 @@ internal class FakerServiceTest : DescribeSpec({ "Master of", ) } - } + }*/ } } } diff --git a/core/src/test/kotlin/io/github/serpro69/kfaker/provider/CrossfitTest.kt b/core/src/test/kotlin/io/github/serpro69/kfaker/provider/CrossfitTest.kt deleted file mode 100644 index ab27cef6f..000000000 --- a/core/src/test/kotlin/io/github/serpro69/kfaker/provider/CrossfitTest.kt +++ /dev/null @@ -1,18 +0,0 @@ -package io.github.serpro69.kfaker.provider - -import io.github.serpro69.kfaker.Faker -import io.github.serpro69.kfaker.FakerService -import io.kotest.core.spec.style.DescribeSpec -import io.kotest.matchers.shouldNotBe - -class CrossfitTest : DescribeSpec({ - describe("Crossfit provider") { - val crossfit = Crossfit(FakerService(faker = Faker())) - - context("competition fun") { - it("should returns a Crossfit® competition name") { - crossfit.competitions() shouldNotBe null - } - } - } -}) diff --git a/core/src/test/kotlin/io/github/serpro69/kfaker/provider/InternetTest.kt b/core/src/test/kotlin/io/github/serpro69/kfaker/provider/InternetTest.kt index a8155f519..e240821ff 100644 --- a/core/src/test/kotlin/io/github/serpro69/kfaker/provider/InternetTest.kt +++ b/core/src/test/kotlin/io/github/serpro69/kfaker/provider/InternetTest.kt @@ -11,7 +11,8 @@ import sun.net.util.IPAddressUtil class InternetTest: DescribeSpec({ describe("Internet provider") { - val internet = Internet(FakerService(faker = Faker())) + val s = FakerService(Faker()) + val internet = Internet(s, Name(s)) context("IPv4 address generation") { repeat(100) { diff --git a/core/src/test/kotlin/io/github/serpro69/kfaker/provider/StarWarsTest.kt b/core/src/test/kotlin/io/github/serpro69/kfaker/provider/StarWarsTest.kt deleted file mode 100644 index 0b10f99e1..000000000 --- a/core/src/test/kotlin/io/github/serpro69/kfaker/provider/StarWarsTest.kt +++ /dev/null @@ -1,24 +0,0 @@ -package io.github.serpro69.kfaker.provider - -import io.github.serpro69.kfaker.Faker -import io.github.serpro69.kfaker.FakerService -import io.kotest.core.spec.style.DescribeSpec -import io.kotest.matchers.shouldNotBe - -class StarWarsTest : DescribeSpec({ - describe("StarWars provider") { - val starWars = StarWars(FakerService(faker = Faker())) - - context("any quote") { - it("should return any quote") { - starWars.quote() shouldNotBe null - } - } - - context("quotes filter") { - it("should return a Admiral Ackbar quote") { - starWars.quotes("admiral_ackbar") shouldNotBe null - } - } - } -}) diff --git a/docs/src/orchid/resources/pages/data-provider/bible.adoc b/docs/src/orchid/resources/pages/data-provider/books/bible.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/bible.adoc rename to docs/src/orchid/resources/pages/data-provider/books/bible.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/book.adoc b/docs/src/orchid/resources/pages/data-provider/books/book.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/book.adoc rename to docs/src/orchid/resources/pages/data-provider/books/book.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/cosmere.adoc b/docs/src/orchid/resources/pages/data-provider/books/cosmere.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/cosmere.adoc rename to docs/src/orchid/resources/pages/data-provider/books/cosmere.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/culture_series.adoc b/docs/src/orchid/resources/pages/data-provider/books/culture_series.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/culture_series.adoc rename to docs/src/orchid/resources/pages/data-provider/books/culture_series.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/dc_comics.adoc b/docs/src/orchid/resources/pages/data-provider/books/dc_comics.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/dc_comics.adoc rename to docs/src/orchid/resources/pages/data-provider/books/dc_comics.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/dune.adoc b/docs/src/orchid/resources/pages/data-provider/books/dune.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/dune.adoc rename to docs/src/orchid/resources/pages/data-provider/books/dune.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/lovecraft.adoc b/docs/src/orchid/resources/pages/data-provider/books/lovecraft.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/lovecraft.adoc rename to docs/src/orchid/resources/pages/data-provider/books/lovecraft.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/shakespeare.adoc b/docs/src/orchid/resources/pages/data-provider/books/shakespeare.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/shakespeare.adoc rename to docs/src/orchid/resources/pages/data-provider/books/shakespeare.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/the_kingkiller_chronicle.adoc b/docs/src/orchid/resources/pages/data-provider/books/the_kingkiller_chronicle.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/the_kingkiller_chronicle.adoc rename to docs/src/orchid/resources/pages/data-provider/books/the_kingkiller_chronicle.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/tolkien.adoc b/docs/src/orchid/resources/pages/data-provider/books/tolkien.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/tolkien.adoc rename to docs/src/orchid/resources/pages/data-provider/books/tolkien.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/bank.adoc b/docs/src/orchid/resources/pages/data-provider/commerce/bank.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/bank.adoc rename to docs/src/orchid/resources/pages/data-provider/commerce/bank.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/barcode.adoc b/docs/src/orchid/resources/pages/data-provider/commerce/barcode.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/barcode.adoc rename to docs/src/orchid/resources/pages/data-provider/commerce/barcode.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/beer.adoc b/docs/src/orchid/resources/pages/data-provider/commerce/beer.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/beer.adoc rename to docs/src/orchid/resources/pages/data-provider/commerce/beer.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/business.adoc b/docs/src/orchid/resources/pages/data-provider/commerce/business.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/business.adoc rename to docs/src/orchid/resources/pages/data-provider/commerce/business.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/cannabis.adoc b/docs/src/orchid/resources/pages/data-provider/commerce/cannabis.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/cannabis.adoc rename to docs/src/orchid/resources/pages/data-provider/commerce/cannabis.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/code.adoc b/docs/src/orchid/resources/pages/data-provider/commerce/code.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/code.adoc rename to docs/src/orchid/resources/pages/data-provider/commerce/code.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/coffee.adoc b/docs/src/orchid/resources/pages/data-provider/commerce/coffee.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/coffee.adoc rename to docs/src/orchid/resources/pages/data-provider/commerce/coffee.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/commerce.adoc b/docs/src/orchid/resources/pages/data-provider/commerce/commerce.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/commerce.adoc rename to docs/src/orchid/resources/pages/data-provider/commerce/commerce.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/company.adoc b/docs/src/orchid/resources/pages/data-provider/commerce/company.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/company.adoc rename to docs/src/orchid/resources/pages/data-provider/commerce/company.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/construction.adoc b/docs/src/orchid/resources/pages/data-provider/commerce/construction.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/construction.adoc rename to docs/src/orchid/resources/pages/data-provider/commerce/construction.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/dessert.adoc b/docs/src/orchid/resources/pages/data-provider/commerce/dessert.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/dessert.adoc rename to docs/src/orchid/resources/pages/data-provider/commerce/dessert.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/finance.adoc b/docs/src/orchid/resources/pages/data-provider/commerce/finance.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/finance.adoc rename to docs/src/orchid/resources/pages/data-provider/commerce/finance.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/food.adoc b/docs/src/orchid/resources/pages/data-provider/commerce/food.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/food.adoc rename to docs/src/orchid/resources/pages/data-provider/commerce/food.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/house.adoc b/docs/src/orchid/resources/pages/data-provider/commerce/house.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/house.adoc rename to docs/src/orchid/resources/pages/data-provider/commerce/house.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/industry_segments.adoc b/docs/src/orchid/resources/pages/data-provider/commerce/industry_segments.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/industry_segments.adoc rename to docs/src/orchid/resources/pages/data-provider/commerce/industry_segments.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/invoice.adoc b/docs/src/orchid/resources/pages/data-provider/commerce/invoice.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/invoice.adoc rename to docs/src/orchid/resources/pages/data-provider/commerce/invoice.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/marketing.adoc b/docs/src/orchid/resources/pages/data-provider/commerce/marketing.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/marketing.adoc rename to docs/src/orchid/resources/pages/data-provider/commerce/marketing.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/restaurant.adoc b/docs/src/orchid/resources/pages/data-provider/commerce/restaurant.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/restaurant.adoc rename to docs/src/orchid/resources/pages/data-provider/commerce/restaurant.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/stripe.adoc b/docs/src/orchid/resources/pages/data-provider/commerce/stripe.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/stripe.adoc rename to docs/src/orchid/resources/pages/data-provider/commerce/stripe.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/subscription.adoc b/docs/src/orchid/resources/pages/data-provider/commerce/subscription.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/subscription.adoc rename to docs/src/orchid/resources/pages/data-provider/commerce/subscription.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/tea.adoc b/docs/src/orchid/resources/pages/data-provider/commerce/tea.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/tea.adoc rename to docs/src/orchid/resources/pages/data-provider/commerce/tea.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/address.adoc b/docs/src/orchid/resources/pages/data-provider/core/address.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/address.adoc rename to docs/src/orchid/resources/pages/data-provider/core/address.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/color.adoc b/docs/src/orchid/resources/pages/data-provider/core/color.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/color.adoc rename to docs/src/orchid/resources/pages/data-provider/core/color.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/crypto.adoc b/docs/src/orchid/resources/pages/data-provider/core/crypto.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/crypto.adoc rename to docs/src/orchid/resources/pages/data-provider/core/crypto.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/currency.adoc b/docs/src/orchid/resources/pages/data-provider/core/currency.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/currency.adoc rename to docs/src/orchid/resources/pages/data-provider/core/currency.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/currency_symbol.adoc b/docs/src/orchid/resources/pages/data-provider/core/currency_symbol.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/currency_symbol.adoc rename to docs/src/orchid/resources/pages/data-provider/core/currency_symbol.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/file.adoc b/docs/src/orchid/resources/pages/data-provider/core/file.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/file.adoc rename to docs/src/orchid/resources/pages/data-provider/core/file.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/gender.adoc b/docs/src/orchid/resources/pages/data-provider/core/gender.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/gender.adoc rename to docs/src/orchid/resources/pages/data-provider/core/gender.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/id_number.adoc b/docs/src/orchid/resources/pages/data-provider/core/id_number.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/id_number.adoc rename to docs/src/orchid/resources/pages/data-provider/core/id_number.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/internet.adoc b/docs/src/orchid/resources/pages/data-provider/core/internet.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/internet.adoc rename to docs/src/orchid/resources/pages/data-provider/core/internet.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/measurement.adoc b/docs/src/orchid/resources/pages/data-provider/core/measurement.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/measurement.adoc rename to docs/src/orchid/resources/pages/data-provider/core/measurement.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/money.adoc b/docs/src/orchid/resources/pages/data-provider/core/money.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/money.adoc rename to docs/src/orchid/resources/pages/data-provider/core/money.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/name.adoc b/docs/src/orchid/resources/pages/data-provider/core/name.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/name.adoc rename to docs/src/orchid/resources/pages/data-provider/core/name.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/person.adoc b/docs/src/orchid/resources/pages/data-provider/core/person.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/person.adoc rename to docs/src/orchid/resources/pages/data-provider/core/person.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/phone_number.adoc b/docs/src/orchid/resources/pages/data-provider/core/phone_number.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/phone_number.adoc rename to docs/src/orchid/resources/pages/data-provider/core/phone_number.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/core/random.adoc b/docs/src/orchid/resources/pages/data-provider/core/random.adoc new file mode 100644 index 000000000..500e13378 --- /dev/null +++ b/docs/src/orchid/resources/pages/data-provider/core/random.adoc @@ -0,0 +1,35 @@ +--- +--- + +== `Faker().random` + +Provides data-generator-like functionality for the functions of `RandomService`, which is a "wrapper" around `java.util.Random`. + +.Available Functions +[%collapsible] +==== +[source,kotlin] +---- +Faker().random.nextInt() + +Faker().random.nextLong(bound = 42) + +Faker().random.nextDouble() + +Faker().random.nextChar() + +Faker().random.nextEnum(MyEnum::class) + +Faker().random.nextBoolean() + +Faker().random.randomValue(listOf(1, 2, 3)) + +Faker().random.randomString() + +Faker().random.nextUUID() + +Faker().random.randomSublist(listOf(1, 2, 3, 4, 5, 6)) + +// and more +---- +==== diff --git a/docs/src/orchid/resources/pages/data-provider/random_provider.adoc b/docs/src/orchid/resources/pages/data-provider/core/random_class.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/random_provider.adoc rename to docs/src/orchid/resources/pages/data-provider/core/random_class.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/separator.adoc b/docs/src/orchid/resources/pages/data-provider/core/separator.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/separator.adoc rename to docs/src/orchid/resources/pages/data-provider/core/separator.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/source.adoc b/docs/src/orchid/resources/pages/data-provider/core/source.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/source.adoc rename to docs/src/orchid/resources/pages/data-provider/core/source.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/string_provider.adoc b/docs/src/orchid/resources/pages/data-provider/core/string_provider.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/string_provider.adoc rename to docs/src/orchid/resources/pages/data-provider/core/string_provider.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/ancient.adoc b/docs/src/orchid/resources/pages/data-provider/creatures/ancient.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/ancient.adoc rename to docs/src/orchid/resources/pages/data-provider/creatures/ancient.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/animal.adoc b/docs/src/orchid/resources/pages/data-provider/creatures/animal.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/animal.adoc rename to docs/src/orchid/resources/pages/data-provider/creatures/animal.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/creatures/bird.adoc b/docs/src/orchid/resources/pages/data-provider/creatures/bird.adoc new file mode 100644 index 000000000..aab399eb9 --- /dev/null +++ b/docs/src/orchid/resources/pages/data-provider/creatures/bird.adoc @@ -0,0 +1,120 @@ +--- +--- + +== `Faker().bird` + +.Dictionary file +[%collapsible] +==== +[source,yaml] +---- +{% snippet 'bird_provider_dict' %} +---- +==== + +.Available Functions +[%collapsible] +==== +[source,kotlin] +---- +CreaturesFaker().bird.orderCommonMap.Accipitriformes() // => Bateleur + +CreaturesFaker().bird.orderCommonMap.Anseriformes() // => Brant + +CreaturesFaker().bird.orderCommonMap.Apterygiformes() // => Kiwi + +CreaturesFaker().bird.orderCommonMap.Bucerotiformes() // => Hoopoe + +CreaturesFaker().bird.orderCommonMap.Caprimulgiformes() // => Avocetbill + +CreaturesFaker().bird.orderCommonMap.Cariamiformes() // => Seriema + +CreaturesFaker().bird.orderCommonMap.Casuariiformes() // => Cassowary + +CreaturesFaker().bird.orderCommonMap.Cathartiformes() // => Condor + +CreaturesFaker().bird.orderCommonMap.Charadriiformes() // => Auk + +CreaturesFaker().bird.orderCommonMap.Ciconiiformes() // => Adjutant + +CreaturesFaker().bird.orderCommonMap.Coliiformes() // => Mousebird + +CreaturesFaker().bird.orderCommonMap.Columbiformes() // => Bronzewing + +CreaturesFaker().bird.orderCommonMap.Coraciiformes() // => Dollarbird + +CreaturesFaker().bird.orderCommonMap.Cuculiformes() // => Ani + +CreaturesFaker().bird.orderCommonMap.Eurypygiformes() // => Kagu + +CreaturesFaker().bird.orderCommonMap.Falconiformes() // => Caracara + +CreaturesFaker().bird.orderCommonMap.Galbuliformes() // => Jacamar + +CreaturesFaker().bird.orderCommonMap.Galliformes() // => Argus + +CreaturesFaker().bird.orderCommonMap.Gaviiformes() // => Loon + +CreaturesFaker().bird.orderCommonMap.Gruiformes() // => Brolga + +CreaturesFaker().bird.orderCommonMap.Mesitornithiformes() // => Mesite + +CreaturesFaker().bird.orderCommonMap.Musophagiformes() // => Turaco + +CreaturesFaker().bird.orderCommonMap.Opisthocomiformes() // => Hoatzin + +CreaturesFaker().bird.orderCommonMap.Otidiformes() // => Bustard + +CreaturesFaker().bird.orderCommonMap.Passeriformes() // => Accentor + +CreaturesFaker().bird.orderCommonMap.Pelecaniformes() // => Bittern + +CreaturesFaker().bird.orderCommonMap.Phaethontiformes() // => Tropicbird + +CreaturesFaker().bird.orderCommonMap.Phoenicopteriformes() // => Flamingo + +CreaturesFaker().bird.orderCommonMap.Piciformes() // => Aracari + +CreaturesFaker().bird.orderCommonMap.Podicipediformes() // => Grebe + +CreaturesFaker().bird.orderCommonMap.Procellariiformes() // => Albatross + +CreaturesFaker().bird.orderCommonMap.Psittaciformes() // => Bluebonnet + +CreaturesFaker().bird.orderCommonMap.Pterocliformes() // => Sandgrouse + +CreaturesFaker().bird.orderCommonMap.Rheiformes() // => Rhea + +CreaturesFaker().bird.orderCommonMap.Sphenisciformes() // => Penguin + +CreaturesFaker().bird.orderCommonMap.Strigiformes() // => Boobook + +CreaturesFaker().bird.orderCommonMap.Struthioniformes() // => Ostrich + +CreaturesFaker().bird.orderCommonMap.Suliformes() // => Anhinga + +CreaturesFaker().bird.orderCommonMap.Tinamiformes() // => Nothura + +CreaturesFaker().bird.orderCommonMap.Trogoniformes() // => Quetzal + +CreaturesFaker().bird.anatomy() // => back + +CreaturesFaker().bird.anatomyPastTense() // => backed + +CreaturesFaker().bird.geo() // => African + +CreaturesFaker().bird.colors() // => ash + +CreaturesFaker().bird.emotionalAdjectives() // => angry + +CreaturesFaker().bird.sillyAdjectives() // => anarchist + +CreaturesFaker().bird.adjectives() // => banded + +CreaturesFaker().bird.plausibleCommonNames() // => Egyptian lazuli Herons, Egrets, and Bitterns + +CreaturesFaker().bird.implausibleCommonNames() // => Waters's furious Limpkin + +CreaturesFaker().bird.commonFamilyName() // => Accentors +---- +==== diff --git a/docs/src/orchid/resources/pages/data-provider/cat.adoc b/docs/src/orchid/resources/pages/data-provider/creatures/cat.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/cat.adoc rename to docs/src/orchid/resources/pages/data-provider/creatures/cat.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/dog.adoc b/docs/src/orchid/resources/pages/data-provider/creatures/dog.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/dog.adoc rename to docs/src/orchid/resources/pages/data-provider/creatures/dog.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/horse.adoc b/docs/src/orchid/resources/pages/data-provider/creatures/horse.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/horse.adoc rename to docs/src/orchid/resources/pages/data-provider/creatures/horse.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/educator.adoc b/docs/src/orchid/resources/pages/data-provider/edu/educator.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/educator.adoc rename to docs/src/orchid/resources/pages/data-provider/edu/educator.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/job.adoc b/docs/src/orchid/resources/pages/data-provider/edu/job.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/job.adoc rename to docs/src/orchid/resources/pages/data-provider/edu/job.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/science.adoc b/docs/src/orchid/resources/pages/data-provider/edu/science.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/science.adoc rename to docs/src/orchid/resources/pages/data-provider/edu/science.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/university.adoc b/docs/src/orchid/resources/pages/data-provider/edu/university.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/university.adoc rename to docs/src/orchid/resources/pages/data-provider/edu/university.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/clash_of_clans.adoc b/docs/src/orchid/resources/pages/data-provider/games/clash_of_clans.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/clash_of_clans.adoc rename to docs/src/orchid/resources/pages/data-provider/games/clash_of_clans.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/coin.adoc b/docs/src/orchid/resources/pages/data-provider/games/coin.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/coin.adoc rename to docs/src/orchid/resources/pages/data-provider/games/coin.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/control.adoc b/docs/src/orchid/resources/pages/data-provider/games/control.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/control.adoc rename to docs/src/orchid/resources/pages/data-provider/games/control.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/dnd.adoc b/docs/src/orchid/resources/pages/data-provider/games/dnd.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/dnd.adoc rename to docs/src/orchid/resources/pages/data-provider/games/dnd.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/dota.adoc b/docs/src/orchid/resources/pages/data-provider/games/dota.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/dota.adoc rename to docs/src/orchid/resources/pages/data-provider/games/dota.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/elder_scrolls.adoc b/docs/src/orchid/resources/pages/data-provider/games/elder_scrolls.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/elder_scrolls.adoc rename to docs/src/orchid/resources/pages/data-provider/games/elder_scrolls.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/fallout.adoc b/docs/src/orchid/resources/pages/data-provider/games/fallout.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/fallout.adoc rename to docs/src/orchid/resources/pages/data-provider/games/fallout.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/final_fantasy_xiv.adoc b/docs/src/orchid/resources/pages/data-provider/games/final_fantasy_xiv.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/final_fantasy_xiv.adoc rename to docs/src/orchid/resources/pages/data-provider/games/final_fantasy_xiv.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/game.adoc b/docs/src/orchid/resources/pages/data-provider/games/game.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/game.adoc rename to docs/src/orchid/resources/pages/data-provider/games/game.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/half_life.adoc b/docs/src/orchid/resources/pages/data-provider/games/half_life.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/half_life.adoc rename to docs/src/orchid/resources/pages/data-provider/games/half_life.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/heroes.adoc b/docs/src/orchid/resources/pages/data-provider/games/heroes.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/heroes.adoc rename to docs/src/orchid/resources/pages/data-provider/games/heroes.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/heroes_of_the_storm.adoc b/docs/src/orchid/resources/pages/data-provider/games/heroes_of_the_storm.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/heroes_of_the_storm.adoc rename to docs/src/orchid/resources/pages/data-provider/games/heroes_of_the_storm.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/league_of_legends.adoc b/docs/src/orchid/resources/pages/data-provider/games/league_of_legends.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/league_of_legends.adoc rename to docs/src/orchid/resources/pages/data-provider/games/league_of_legends.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/minecraft.adoc b/docs/src/orchid/resources/pages/data-provider/games/minecraft.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/minecraft.adoc rename to docs/src/orchid/resources/pages/data-provider/games/minecraft.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/myst.adoc b/docs/src/orchid/resources/pages/data-provider/games/myst.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/myst.adoc rename to docs/src/orchid/resources/pages/data-provider/games/myst.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/overwatch.adoc b/docs/src/orchid/resources/pages/data-provider/games/overwatch.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/overwatch.adoc rename to docs/src/orchid/resources/pages/data-provider/games/overwatch.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/pokemon.adoc b/docs/src/orchid/resources/pages/data-provider/games/pokemon.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/pokemon.adoc rename to docs/src/orchid/resources/pages/data-provider/games/pokemon.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/sonic_the_hedgehog.adoc b/docs/src/orchid/resources/pages/data-provider/games/sonic_the_hedgehog.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/sonic_the_hedgehog.adoc rename to docs/src/orchid/resources/pages/data-provider/games/sonic_the_hedgehog.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/street_fighter.adoc b/docs/src/orchid/resources/pages/data-provider/games/street_fighter.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/street_fighter.adoc rename to docs/src/orchid/resources/pages/data-provider/games/street_fighter.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/super_mario.adoc b/docs/src/orchid/resources/pages/data-provider/games/super_mario.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/super_mario.adoc rename to docs/src/orchid/resources/pages/data-provider/games/super_mario.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/super_smash_bros.adoc b/docs/src/orchid/resources/pages/data-provider/games/super_smash_bros.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/super_smash_bros.adoc rename to docs/src/orchid/resources/pages/data-provider/games/super_smash_bros.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/superhero.adoc b/docs/src/orchid/resources/pages/data-provider/games/superhero.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/superhero.adoc rename to docs/src/orchid/resources/pages/data-provider/games/superhero.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/tarkov.adoc b/docs/src/orchid/resources/pages/data-provider/games/tarkov.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/tarkov.adoc rename to docs/src/orchid/resources/pages/data-provider/games/tarkov.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/touhou.adoc b/docs/src/orchid/resources/pages/data-provider/games/touhou.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/touhou.adoc rename to docs/src/orchid/resources/pages/data-provider/games/touhou.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/warhammer_fantasy.adoc b/docs/src/orchid/resources/pages/data-provider/games/warhammer_fantasy.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/warhammer_fantasy.adoc rename to docs/src/orchid/resources/pages/data-provider/games/warhammer_fantasy.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/witcher.adoc b/docs/src/orchid/resources/pages/data-provider/games/witcher.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/witcher.adoc rename to docs/src/orchid/resources/pages/data-provider/games/witcher.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/world_of_warcraft.adoc b/docs/src/orchid/resources/pages/data-provider/games/world_of_warcraft.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/world_of_warcraft.adoc rename to docs/src/orchid/resources/pages/data-provider/games/world_of_warcraft.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/zelda.adoc b/docs/src/orchid/resources/pages/data-provider/games/zelda.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/zelda.adoc rename to docs/src/orchid/resources/pages/data-provider/games/zelda.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/chiquito.adoc b/docs/src/orchid/resources/pages/data-provider/humor/chiquito.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/chiquito.adoc rename to docs/src/orchid/resources/pages/data-provider/humor/chiquito.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/chuck_norris.adoc b/docs/src/orchid/resources/pages/data-provider/humor/chuck_norris.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/chuck_norris.adoc rename to docs/src/orchid/resources/pages/data-provider/humor/chuck_norris.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/funny_name.adoc b/docs/src/orchid/resources/pages/data-provider/humor/funny_name.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/funny_name.adoc rename to docs/src/orchid/resources/pages/data-provider/humor/funny_name.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/jack_handey.adoc b/docs/src/orchid/resources/pages/data-provider/humor/jack_handey.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/jack_handey.adoc rename to docs/src/orchid/resources/pages/data-provider/humor/jack_handey.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/mitch_hedberg.adoc b/docs/src/orchid/resources/pages/data-provider/humor/mitch_hedberg.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/mitch_hedberg.adoc rename to docs/src/orchid/resources/pages/data-provider/humor/mitch_hedberg.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/conan.adoc b/docs/src/orchid/resources/pages/data-provider/japmedia/conan.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/conan.adoc rename to docs/src/orchid/resources/pages/data-provider/japmedia/conan.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/cowbow_bebop.adoc b/docs/src/orchid/resources/pages/data-provider/japmedia/cowbow_bebop.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/cowbow_bebop.adoc rename to docs/src/orchid/resources/pages/data-provider/japmedia/cowbow_bebop.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/doraemon.adoc b/docs/src/orchid/resources/pages/data-provider/japmedia/doraemon.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/doraemon.adoc rename to docs/src/orchid/resources/pages/data-provider/japmedia/doraemon.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/dragon_ball.adoc b/docs/src/orchid/resources/pages/data-provider/japmedia/dragon_ball.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/dragon_ball.adoc rename to docs/src/orchid/resources/pages/data-provider/japmedia/dragon_ball.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/fma_brotherhood.adoc b/docs/src/orchid/resources/pages/data-provider/japmedia/fma_brotherhood.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/fma_brotherhood.adoc rename to docs/src/orchid/resources/pages/data-provider/japmedia/fma_brotherhood.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/kamen_rider.adoc b/docs/src/orchid/resources/pages/data-provider/japmedia/kamen_rider.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/kamen_rider.adoc rename to docs/src/orchid/resources/pages/data-provider/japmedia/kamen_rider.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/naruto.adoc b/docs/src/orchid/resources/pages/data-provider/japmedia/naruto.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/naruto.adoc rename to docs/src/orchid/resources/pages/data-provider/japmedia/naruto.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/one_piece.adoc b/docs/src/orchid/resources/pages/data-provider/japmedia/one_piece.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/one_piece.adoc rename to docs/src/orchid/resources/pages/data-provider/japmedia/one_piece.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/studio_ghibli.adoc b/docs/src/orchid/resources/pages/data-provider/japmedia/studio_ghibli.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/studio_ghibli.adoc rename to docs/src/orchid/resources/pages/data-provider/japmedia/studio_ghibli.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/sword_art_online.adoc b/docs/src/orchid/resources/pages/data-provider/japmedia/sword_art_online.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/sword_art_online.adoc rename to docs/src/orchid/resources/pages/data-provider/japmedia/sword_art_online.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/adjective.adoc b/docs/src/orchid/resources/pages/data-provider/lorem/adjective.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/adjective.adoc rename to docs/src/orchid/resources/pages/data-provider/lorem/adjective.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/emotion.adoc b/docs/src/orchid/resources/pages/data-provider/lorem/emotion.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/emotion.adoc rename to docs/src/orchid/resources/pages/data-provider/lorem/emotion.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/hipster.adoc b/docs/src/orchid/resources/pages/data-provider/lorem/hipster.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/hipster.adoc rename to docs/src/orchid/resources/pages/data-provider/lorem/hipster.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/lorem.adoc b/docs/src/orchid/resources/pages/data-provider/lorem/lorem.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/lorem.adoc rename to docs/src/orchid/resources/pages/data-provider/lorem/lorem.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/markdown.adoc b/docs/src/orchid/resources/pages/data-provider/lorem/markdown.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/markdown.adoc rename to docs/src/orchid/resources/pages/data-provider/lorem/markdown.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/nato_phonetic_alphabet.adoc b/docs/src/orchid/resources/pages/data-provider/lorem/nato_phonetic_alphabet.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/nato_phonetic_alphabet.adoc rename to docs/src/orchid/resources/pages/data-provider/lorem/nato_phonetic_alphabet.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/quote.adoc b/docs/src/orchid/resources/pages/data-provider/lorem/quote.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/quote.adoc rename to docs/src/orchid/resources/pages/data-provider/lorem/quote.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/slack_emoji.adoc b/docs/src/orchid/resources/pages/data-provider/lorem/slack_emoji.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/slack_emoji.adoc rename to docs/src/orchid/resources/pages/data-provider/lorem/slack_emoji.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/verbs.adoc b/docs/src/orchid/resources/pages/data-provider/lorem/verbs.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/verbs.adoc rename to docs/src/orchid/resources/pages/data-provider/lorem/verbs.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/artist.adoc b/docs/src/orchid/resources/pages/data-provider/misc/artist.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/artist.adoc rename to docs/src/orchid/resources/pages/data-provider/misc/artist.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/blood.adoc b/docs/src/orchid/resources/pages/data-provider/misc/blood.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/blood.adoc rename to docs/src/orchid/resources/pages/data-provider/misc/blood.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/demographic.adoc b/docs/src/orchid/resources/pages/data-provider/misc/demographic.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/demographic.adoc rename to docs/src/orchid/resources/pages/data-provider/misc/demographic.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/driving_license.adoc b/docs/src/orchid/resources/pages/data-provider/misc/driving_license.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/driving_license.adoc rename to docs/src/orchid/resources/pages/data-provider/misc/driving_license.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/greek_philosophers.adoc b/docs/src/orchid/resources/pages/data-provider/misc/greek_philosophers.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/greek_philosophers.adoc rename to docs/src/orchid/resources/pages/data-provider/misc/greek_philosophers.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/hobby.adoc b/docs/src/orchid/resources/pages/data-provider/misc/hobby.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/hobby.adoc rename to docs/src/orchid/resources/pages/data-provider/misc/hobby.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/military.adoc b/docs/src/orchid/resources/pages/data-provider/misc/military.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/military.adoc rename to docs/src/orchid/resources/pages/data-provider/misc/military.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/relationship.adoc b/docs/src/orchid/resources/pages/data-provider/misc/relationship.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/relationship.adoc rename to docs/src/orchid/resources/pages/data-provider/misc/relationship.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/avatar.adoc b/docs/src/orchid/resources/pages/data-provider/movies/avatar.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/avatar.adoc rename to docs/src/orchid/resources/pages/data-provider/movies/avatar.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/back_to_the_future.adoc b/docs/src/orchid/resources/pages/data-provider/movies/back_to_the_future.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/back_to_the_future.adoc rename to docs/src/orchid/resources/pages/data-provider/movies/back_to_the_future.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/departed.adoc b/docs/src/orchid/resources/pages/data-provider/movies/departed.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/departed.adoc rename to docs/src/orchid/resources/pages/data-provider/movies/departed.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/dumb_and_dumber.adoc b/docs/src/orchid/resources/pages/data-provider/movies/dumb_and_dumber.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/dumb_and_dumber.adoc rename to docs/src/orchid/resources/pages/data-provider/movies/dumb_and_dumber.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/ghost_busters.adoc b/docs/src/orchid/resources/pages/data-provider/movies/ghost_busters.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/ghost_busters.adoc rename to docs/src/orchid/resources/pages/data-provider/movies/ghost_busters.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/hackers.adoc b/docs/src/orchid/resources/pages/data-provider/movies/hackers.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/hackers.adoc rename to docs/src/orchid/resources/pages/data-provider/movies/hackers.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/harry_potter.adoc b/docs/src/orchid/resources/pages/data-provider/movies/harry_potter.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/harry_potter.adoc rename to docs/src/orchid/resources/pages/data-provider/movies/harry_potter.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/hitchhikers_guide_to_the_galaxy.adoc b/docs/src/orchid/resources/pages/data-provider/movies/hitchhikers_guide_to_the_galaxy.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/hitchhikers_guide_to_the_galaxy.adoc rename to docs/src/orchid/resources/pages/data-provider/movies/hitchhikers_guide_to_the_galaxy.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/hobbit.adoc b/docs/src/orchid/resources/pages/data-provider/movies/hobbit.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/hobbit.adoc rename to docs/src/orchid/resources/pages/data-provider/movies/hobbit.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/how_to_train_your_dragon.adoc b/docs/src/orchid/resources/pages/data-provider/movies/how_to_train_your_dragon.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/how_to_train_your_dragon.adoc rename to docs/src/orchid/resources/pages/data-provider/movies/how_to_train_your_dragon.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/lebowski.adoc b/docs/src/orchid/resources/pages/data-provider/movies/lebowski.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/lebowski.adoc rename to docs/src/orchid/resources/pages/data-provider/movies/lebowski.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/lord_of_the_rings.adoc b/docs/src/orchid/resources/pages/data-provider/movies/lord_of_the_rings.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/lord_of_the_rings.adoc rename to docs/src/orchid/resources/pages/data-provider/movies/lord_of_the_rings.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/movie.adoc b/docs/src/orchid/resources/pages/data-provider/movies/movie.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/movie.adoc rename to docs/src/orchid/resources/pages/data-provider/movies/movie.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/princess_bride.adoc b/docs/src/orchid/resources/pages/data-provider/movies/princess_bride.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/princess_bride.adoc rename to docs/src/orchid/resources/pages/data-provider/movies/princess_bride.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/rajnikanth.adoc b/docs/src/orchid/resources/pages/data-provider/movies/rajnikanth.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/rajnikanth.adoc rename to docs/src/orchid/resources/pages/data-provider/movies/rajnikanth.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/star_wars.adoc b/docs/src/orchid/resources/pages/data-provider/movies/star_wars.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/star_wars.adoc rename to docs/src/orchid/resources/pages/data-provider/movies/star_wars.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/the_room.adoc b/docs/src/orchid/resources/pages/data-provider/movies/the_room.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/the_room.adoc rename to docs/src/orchid/resources/pages/data-provider/movies/the_room.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/tron.adoc b/docs/src/orchid/resources/pages/data-provider/movies/tron.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/tron.adoc rename to docs/src/orchid/resources/pages/data-provider/movies/tron.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/v_for_vendetta.adoc b/docs/src/orchid/resources/pages/data-provider/movies/v_for_vendetta.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/v_for_vendetta.adoc rename to docs/src/orchid/resources/pages/data-provider/movies/v_for_vendetta.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/yoda.adoc b/docs/src/orchid/resources/pages/data-provider/movies/yoda.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/yoda.adoc rename to docs/src/orchid/resources/pages/data-provider/movies/yoda.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/bossa_nova.adoc b/docs/src/orchid/resources/pages/data-provider/music/bossa_nova.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/bossa_nova.adoc rename to docs/src/orchid/resources/pages/data-provider/music/bossa_nova.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/grateful_dead.adoc b/docs/src/orchid/resources/pages/data-provider/music/grateful_dead.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/grateful_dead.adoc rename to docs/src/orchid/resources/pages/data-provider/music/grateful_dead.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/kpop.adoc b/docs/src/orchid/resources/pages/data-provider/music/kpop.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/kpop.adoc rename to docs/src/orchid/resources/pages/data-provider/music/kpop.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/music.adoc b/docs/src/orchid/resources/pages/data-provider/music/music.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/music.adoc rename to docs/src/orchid/resources/pages/data-provider/music/music.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/opera.adoc b/docs/src/orchid/resources/pages/data-provider/music/opera.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/opera.adoc rename to docs/src/orchid/resources/pages/data-provider/music/opera.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/pearl_jam.adoc b/docs/src/orchid/resources/pages/data-provider/music/pearl_jam.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/pearl_jam.adoc rename to docs/src/orchid/resources/pages/data-provider/music/pearl_jam.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/phish.adoc b/docs/src/orchid/resources/pages/data-provider/music/phish.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/phish.adoc rename to docs/src/orchid/resources/pages/data-provider/music/phish.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/prince.adoc b/docs/src/orchid/resources/pages/data-provider/music/prince.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/prince.adoc rename to docs/src/orchid/resources/pages/data-provider/music/prince.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/rock_band.adoc b/docs/src/orchid/resources/pages/data-provider/music/rock_band.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/rock_band.adoc rename to docs/src/orchid/resources/pages/data-provider/music/rock_band.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/rush.adoc b/docs/src/orchid/resources/pages/data-provider/music/rush.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/rush.adoc rename to docs/src/orchid/resources/pages/data-provider/music/rush.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/show.adoc b/docs/src/orchid/resources/pages/data-provider/music/show.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/show.adoc rename to docs/src/orchid/resources/pages/data-provider/music/show.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/smashing_pumpkins.adoc b/docs/src/orchid/resources/pages/data-provider/music/smashing_pumpkins.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/smashing_pumpkins.adoc rename to docs/src/orchid/resources/pages/data-provider/music/smashing_pumpkins.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/umphreys_mcgee.adoc b/docs/src/orchid/resources/pages/data-provider/music/umphreys_mcgee.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/umphreys_mcgee.adoc rename to docs/src/orchid/resources/pages/data-provider/music/umphreys_mcgee.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/room.adoc b/docs/src/orchid/resources/pages/data-provider/room.adoc deleted file mode 100644 index 20adac676..000000000 --- a/docs/src/orchid/resources/pages/data-provider/room.adoc +++ /dev/null @@ -1,29 +0,0 @@ ---- ---- - -== `Faker().room` - -.Dictionary file -[%collapsible] -==== -[source,yaml] ----- -{% snippet 'room_provider_dict' %} ----- -==== - -.Available Functions -[%collapsible] -==== -[source,kotlin] ----- -Faker().room.actors() // => Tommy Wiseau - -Faker().room.characters() // => Johnny - -Faker().room.locations() // => Johnny's Place - -Faker().room.quotes() // => "Oh hi, Denny" - ----- -==== diff --git a/docs/src/orchid/resources/pages/data-provider/basketball.adoc b/docs/src/orchid/resources/pages/data-provider/sports/basketball.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/basketball.adoc rename to docs/src/orchid/resources/pages/data-provider/sports/basketball.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/chess.adoc b/docs/src/orchid/resources/pages/data-provider/sports/chess.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/chess.adoc rename to docs/src/orchid/resources/pages/data-provider/sports/chess.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/crossfit.adoc b/docs/src/orchid/resources/pages/data-provider/sports/crossfit.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/crossfit.adoc rename to docs/src/orchid/resources/pages/data-provider/sports/crossfit.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/esport.adoc b/docs/src/orchid/resources/pages/data-provider/sports/esport.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/esport.adoc rename to docs/src/orchid/resources/pages/data-provider/sports/esport.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/football.adoc b/docs/src/orchid/resources/pages/data-provider/sports/football.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/football.adoc rename to docs/src/orchid/resources/pages/data-provider/sports/football.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/mountaineering.adoc b/docs/src/orchid/resources/pages/data-provider/sports/mountaineering.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/mountaineering.adoc rename to docs/src/orchid/resources/pages/data-provider/sports/mountaineering.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/sport.adoc b/docs/src/orchid/resources/pages/data-provider/sports/sport.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/sport.adoc rename to docs/src/orchid/resources/pages/data-provider/sports/sport.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/team.adoc b/docs/src/orchid/resources/pages/data-provider/sports/team.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/team.adoc rename to docs/src/orchid/resources/pages/data-provider/sports/team.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/volleyball.adoc b/docs/src/orchid/resources/pages/data-provider/sports/volleyball.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/volleyball.adoc rename to docs/src/orchid/resources/pages/data-provider/sports/volleyball.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/world_cup.adoc b/docs/src/orchid/resources/pages/data-provider/sports/world_cup.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/world_cup.adoc rename to docs/src/orchid/resources/pages/data-provider/sports/world_cup.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/app.adoc b/docs/src/orchid/resources/pages/data-provider/tech/app.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/app.adoc rename to docs/src/orchid/resources/pages/data-provider/tech/app.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/appliance.adoc b/docs/src/orchid/resources/pages/data-provider/tech/appliance.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/appliance.adoc rename to docs/src/orchid/resources/pages/data-provider/tech/appliance.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/camera.adoc b/docs/src/orchid/resources/pages/data-provider/tech/camera.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/camera.adoc rename to docs/src/orchid/resources/pages/data-provider/tech/camera.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/computer.adoc b/docs/src/orchid/resources/pages/data-provider/tech/computer.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/computer.adoc rename to docs/src/orchid/resources/pages/data-provider/tech/computer.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/crypto_coin.adoc b/docs/src/orchid/resources/pages/data-provider/tech/crypto_coin.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/crypto_coin.adoc rename to docs/src/orchid/resources/pages/data-provider/tech/crypto_coin.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/device.adoc b/docs/src/orchid/resources/pages/data-provider/tech/device.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/device.adoc rename to docs/src/orchid/resources/pages/data-provider/tech/device.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/drone.adoc b/docs/src/orchid/resources/pages/data-provider/tech/drone.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/drone.adoc rename to docs/src/orchid/resources/pages/data-provider/tech/drone.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/electrical_components.adoc b/docs/src/orchid/resources/pages/data-provider/tech/electrical_components.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/electrical_components.adoc rename to docs/src/orchid/resources/pages/data-provider/tech/electrical_components.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/hacker.adoc b/docs/src/orchid/resources/pages/data-provider/tech/hacker.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/hacker.adoc rename to docs/src/orchid/resources/pages/data-provider/tech/hacker.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/programming_language.adoc b/docs/src/orchid/resources/pages/data-provider/tech/programming_language.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/programming_language.adoc rename to docs/src/orchid/resources/pages/data-provider/tech/programming_language.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/space.adoc b/docs/src/orchid/resources/pages/data-provider/tech/space.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/space.adoc rename to docs/src/orchid/resources/pages/data-provider/tech/space.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/vehicle.adoc b/docs/src/orchid/resources/pages/data-provider/tech/vehicle.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/vehicle.adoc rename to docs/src/orchid/resources/pages/data-provider/tech/vehicle.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/airport.adoc b/docs/src/orchid/resources/pages/data-provider/travel/airport.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/airport.adoc rename to docs/src/orchid/resources/pages/data-provider/travel/airport.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/australia.adoc b/docs/src/orchid/resources/pages/data-provider/travel/australia.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/australia.adoc rename to docs/src/orchid/resources/pages/data-provider/travel/australia.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/compass.adoc b/docs/src/orchid/resources/pages/data-provider/travel/compass.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/compass.adoc rename to docs/src/orchid/resources/pages/data-provider/travel/compass.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/mountain.adoc b/docs/src/orchid/resources/pages/data-provider/travel/mountain.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/mountain.adoc rename to docs/src/orchid/resources/pages/data-provider/travel/mountain.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/nation.adoc b/docs/src/orchid/resources/pages/data-provider/travel/nation.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/nation.adoc rename to docs/src/orchid/resources/pages/data-provider/travel/nation.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/train_station.adoc b/docs/src/orchid/resources/pages/data-provider/travel/train_station.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/train_station.adoc rename to docs/src/orchid/resources/pages/data-provider/travel/train_station.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/aqua_teen_hunger_force.adoc b/docs/src/orchid/resources/pages/data-provider/tvshows/aqua_teen_hunger_force.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/aqua_teen_hunger_force.adoc rename to docs/src/orchid/resources/pages/data-provider/tvshows/aqua_teen_hunger_force.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/archer.adoc b/docs/src/orchid/resources/pages/data-provider/tvshows/archer.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/archer.adoc rename to docs/src/orchid/resources/pages/data-provider/tvshows/archer.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/big_bang_theory.adoc b/docs/src/orchid/resources/pages/data-provider/tvshows/big_bang_theory.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/big_bang_theory.adoc rename to docs/src/orchid/resources/pages/data-provider/tvshows/big_bang_theory.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/bojack_horseman.adoc b/docs/src/orchid/resources/pages/data-provider/tvshows/bojack_horseman.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/bojack_horseman.adoc rename to docs/src/orchid/resources/pages/data-provider/tvshows/bojack_horseman.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/breaking_bad.adoc b/docs/src/orchid/resources/pages/data-provider/tvshows/breaking_bad.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/breaking_bad.adoc rename to docs/src/orchid/resources/pages/data-provider/tvshows/breaking_bad.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/brooklyn_nine_nine.adoc b/docs/src/orchid/resources/pages/data-provider/tvshows/brooklyn_nine_nine.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/brooklyn_nine_nine.adoc rename to docs/src/orchid/resources/pages/data-provider/tvshows/brooklyn_nine_nine.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/buffy.adoc b/docs/src/orchid/resources/pages/data-provider/tvshows/buffy.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/buffy.adoc rename to docs/src/orchid/resources/pages/data-provider/tvshows/buffy.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/community.adoc b/docs/src/orchid/resources/pages/data-provider/tvshows/community.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/community.adoc rename to docs/src/orchid/resources/pages/data-provider/tvshows/community.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/dr_who.adoc b/docs/src/orchid/resources/pages/data-provider/tvshows/dr_who.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/dr_who.adoc rename to docs/src/orchid/resources/pages/data-provider/tvshows/dr_who.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/family_guy.adoc b/docs/src/orchid/resources/pages/data-provider/tvshows/family_guy.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/family_guy.adoc rename to docs/src/orchid/resources/pages/data-provider/tvshows/family_guy.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/final_space.adoc b/docs/src/orchid/resources/pages/data-provider/tvshows/final_space.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/final_space.adoc rename to docs/src/orchid/resources/pages/data-provider/tvshows/final_space.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/fresh_price_of_bel_air.adoc b/docs/src/orchid/resources/pages/data-provider/tvshows/fresh_price_of_bel_air.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/fresh_price_of_bel_air.adoc rename to docs/src/orchid/resources/pages/data-provider/tvshows/fresh_price_of_bel_air.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/friends.adoc b/docs/src/orchid/resources/pages/data-provider/tvshows/friends.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/friends.adoc rename to docs/src/orchid/resources/pages/data-provider/tvshows/friends.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/futurama.adoc b/docs/src/orchid/resources/pages/data-provider/tvshows/futurama.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/futurama.adoc rename to docs/src/orchid/resources/pages/data-provider/tvshows/futurama.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/game_of_thrones.adoc b/docs/src/orchid/resources/pages/data-provider/tvshows/game_of_thrones.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/game_of_thrones.adoc rename to docs/src/orchid/resources/pages/data-provider/tvshows/game_of_thrones.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/hey_arnold.adoc b/docs/src/orchid/resources/pages/data-provider/tvshows/hey_arnold.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/hey_arnold.adoc rename to docs/src/orchid/resources/pages/data-provider/tvshows/hey_arnold.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/how_i_met_your_mother.adoc b/docs/src/orchid/resources/pages/data-provider/tvshows/how_i_met_your_mother.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/how_i_met_your_mother.adoc rename to docs/src/orchid/resources/pages/data-provider/tvshows/how_i_met_your_mother.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/michael_scott.adoc b/docs/src/orchid/resources/pages/data-provider/tvshows/michael_scott.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/michael_scott.adoc rename to docs/src/orchid/resources/pages/data-provider/tvshows/michael_scott.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/new_girl.adoc b/docs/src/orchid/resources/pages/data-provider/tvshows/new_girl.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/new_girl.adoc rename to docs/src/orchid/resources/pages/data-provider/tvshows/new_girl.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/parks_and_rec.adoc b/docs/src/orchid/resources/pages/data-provider/tvshows/parks_and_rec.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/parks_and_rec.adoc rename to docs/src/orchid/resources/pages/data-provider/tvshows/parks_and_rec.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/rick_and_morty.adoc b/docs/src/orchid/resources/pages/data-provider/tvshows/rick_and_morty.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/rick_and_morty.adoc rename to docs/src/orchid/resources/pages/data-provider/tvshows/rick_and_morty.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/rupaul.adoc b/docs/src/orchid/resources/pages/data-provider/tvshows/rupaul.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/rupaul.adoc rename to docs/src/orchid/resources/pages/data-provider/tvshows/rupaul.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/seinfeld.adoc b/docs/src/orchid/resources/pages/data-provider/tvshows/seinfeld.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/seinfeld.adoc rename to docs/src/orchid/resources/pages/data-provider/tvshows/seinfeld.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/silicon_valley.adoc b/docs/src/orchid/resources/pages/data-provider/tvshows/silicon_valley.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/silicon_valley.adoc rename to docs/src/orchid/resources/pages/data-provider/tvshows/silicon_valley.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/simpsons.adoc b/docs/src/orchid/resources/pages/data-provider/tvshows/simpsons.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/simpsons.adoc rename to docs/src/orchid/resources/pages/data-provider/tvshows/simpsons.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/south_park.adoc b/docs/src/orchid/resources/pages/data-provider/tvshows/south_park.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/south_park.adoc rename to docs/src/orchid/resources/pages/data-provider/tvshows/south_park.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/spongebob.adoc b/docs/src/orchid/resources/pages/data-provider/tvshows/spongebob.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/spongebob.adoc rename to docs/src/orchid/resources/pages/data-provider/tvshows/spongebob.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/star_trek.adoc b/docs/src/orchid/resources/pages/data-provider/tvshows/star_trek.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/star_trek.adoc rename to docs/src/orchid/resources/pages/data-provider/tvshows/star_trek.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/stargate.adoc b/docs/src/orchid/resources/pages/data-provider/tvshows/stargate.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/stargate.adoc rename to docs/src/orchid/resources/pages/data-provider/tvshows/stargate.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/stranger_things.adoc b/docs/src/orchid/resources/pages/data-provider/tvshows/stranger_things.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/stranger_things.adoc rename to docs/src/orchid/resources/pages/data-provider/tvshows/stranger_things.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/suits.adoc b/docs/src/orchid/resources/pages/data-provider/tvshows/suits.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/suits.adoc rename to docs/src/orchid/resources/pages/data-provider/tvshows/suits.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/supernatural.adoc b/docs/src/orchid/resources/pages/data-provider/tvshows/supernatural.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/supernatural.adoc rename to docs/src/orchid/resources/pages/data-provider/tvshows/supernatural.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/the_expanse.adoc b/docs/src/orchid/resources/pages/data-provider/tvshows/the_expanse.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/the_expanse.adoc rename to docs/src/orchid/resources/pages/data-provider/tvshows/the_expanse.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/the_it_crowd.adoc b/docs/src/orchid/resources/pages/data-provider/tvshows/the_it_crowd.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/the_it_crowd.adoc rename to docs/src/orchid/resources/pages/data-provider/tvshows/the_it_crowd.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/the_office.adoc b/docs/src/orchid/resources/pages/data-provider/tvshows/the_office.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/the_office.adoc rename to docs/src/orchid/resources/pages/data-provider/tvshows/the_office.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/the_thick_of_it.adoc b/docs/src/orchid/resources/pages/data-provider/tvshows/the_thick_of_it.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/the_thick_of_it.adoc rename to docs/src/orchid/resources/pages/data-provider/tvshows/the_thick_of_it.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/twin_peaks.adoc b/docs/src/orchid/resources/pages/data-provider/tvshows/twin_peaks.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/twin_peaks.adoc rename to docs/src/orchid/resources/pages/data-provider/tvshows/twin_peaks.adoc diff --git a/docs/src/orchid/resources/pages/data-provider/venture_bros.adoc b/docs/src/orchid/resources/pages/data-provider/tvshows/venture_bros.adoc similarity index 100% rename from docs/src/orchid/resources/pages/data-provider/venture_bros.adoc rename to docs/src/orchid/resources/pages/data-provider/tvshows/venture_bros.adoc diff --git a/docs/src/orchid/resources/pages/fakers/books.md b/docs/src/orchid/resources/pages/fakers/books.md new file mode 100644 index 000000000..595ab08fd --- /dev/null +++ b/docs/src/orchid/resources/pages/fakers/books.md @@ -0,0 +1,54 @@ +## `BooksFaker` + +[![Maven Central](https://img.shields.io/maven-central/v/io.github.serpro69/kotlin-faker-books?style=for-the-badge)](https://search.maven.org/artifact/io.github.serpro69/kotlin-faker-books) +[![Sonatype Nexus (Snapshots)](https://img.shields.io/nexus/s/io.github.serpro69/kotlin-faker-books?label=snapshot-version&server=https%3A%2F%2Foss.sonatype.org&style=for-the-badge&color=yellow)](#downloading) + +Provides access to fake data generators within the Books domain. + +## Usage + +Documentation for kotlin-faker is available at [serpro69.github.io/kotlin-faker/](https://serpro69.github.io/kotlin-faker/). + +### Downloading + +Latest releases are always available on maven central. + +**With gradle** + +```groovy +dependencies { + implementation 'io.github.serpro69:kotlin-faker:$version' + implementation 'io.github.serpro69:kotlin-faker-books:$version' +} +``` + +**With maven** + +```xml + + + io.github.serpro69 + kotlin-faker + ${version} + + + io.github.serpro69 + kotlin-faker-books + ${version} + + +``` + +_NB! An additional fake data provider like 'books' requires the main `kotlin-faker` dependency to be on the classpath._ + +### Generating data + +```kotlin +// NB! the package you import if using multiple fakers +import io.github.serpro69.kfaker.books.faker + +val faker = faker { } + +faker.book.title() +faker.cosmere.aons() +``` diff --git a/docs/src/orchid/resources/pages/fakers/commerce.md b/docs/src/orchid/resources/pages/fakers/commerce.md new file mode 100644 index 000000000..8e5397e1d --- /dev/null +++ b/docs/src/orchid/resources/pages/fakers/commerce.md @@ -0,0 +1,54 @@ +## `CommerceFaker` + +[![Maven Central](https://img.shields.io/maven-central/v/io.github.serpro69/kotlin-faker-commerce?style=for-the-badge)](https://search.maven.org/artifact/io.github.serpro69/kotlin-faker-commerce) +[![Sonatype Nexus (Snapshots)](https://img.shields.io/nexus/s/io.github.serpro69/kotlin-faker-commerce?label=snapshot-version&server=https%3A%2F%2Foss.sonatype.org&style=for-the-badge&color=yellow)](#downloading) + +Provides access to fake data generators within the Commerce domain. + +## Usage + +Documentation for kotlin-faker is available at [serpro69.github.io/kotlin-faker/](https://serpro69.github.io/kotlin-faker/). + +### Downloading + +Latest releases are always available on maven central. + +**With gradle** + +```groovy +dependencies { + implementation 'io.github.serpro69:kotlin-faker:$version' + implementation 'io.github.serpro69:kotlin-faker-commerce:$version' +} +``` + +**With maven** + +```xml + + + io.github.serpro69 + kotlin-faker + ${version} + + + io.github.serpro69 + kotlin-faker-commerce + ${version} + + +``` + +_NB! An additional fake data provider like 'commerce' requires the main `kotlin-faker` dependency to be on the classpath._ + +### Generating data + +```kotlin +// NB! the package you import if using multiple fakers +import io.github.serpro69.kfaker.commerce.faker + +val faker = faker { } + +faker.bank.name() +faker.code.asin() +``` diff --git a/docs/src/orchid/resources/pages/fakers/creatures.md b/docs/src/orchid/resources/pages/fakers/creatures.md new file mode 100644 index 000000000..c74750cc6 --- /dev/null +++ b/docs/src/orchid/resources/pages/fakers/creatures.md @@ -0,0 +1,54 @@ +## `CreaturesFaker` + +[![Maven Central](https://img.shields.io/maven-central/v/io.github.serpro69/kotlin-faker-creatures?style=for-the-badge)](https://search.maven.org/artifact/io.github.serpro69/kotlin-faker-creatures) +[![Sonatype Nexus (Snapshots)](https://img.shields.io/nexus/s/io.github.serpro69/kotlin-faker-creatures?label=snapshot-version&server=https%3A%2F%2Foss.sonatype.org&style=for-the-badge&color=yellow)](#downloading) + +Provides access to fake data generators within the Creatures domain. + +## Usage + +Documentation for kotlin-faker is available at [serpro69.github.io/kotlin-faker/](https://serpro69.github.io/kotlin-faker/). + +### Downloading + +Latest releases are always available on maven central. + +**With gradle** + +```groovy +dependencies { + implementation 'io.github.serpro69:kotlin-faker:$version' + implementation 'io.github.serpro69:kotlin-faker-creatures:$version' +} +``` + +**With maven** + +```xml + + + io.github.serpro69 + kotlin-faker + ${version} + + + io.github.serpro69 + kotlin-faker-creatures + ${version} + + +``` + +_NB! An additional fake data provider like 'creatures' requires the main `kotlin-faker` dependency to be on the classpath._ + +### Generating data + +```kotlin +// NB! the package you import if using multiple fakers +import io.github.serpro69.kfaker.creatures.faker + +val faker = faker { } + +faker.dog.name() +faker.horse.breed() +``` diff --git a/docs/src/orchid/resources/pages/fakers/edu.md b/docs/src/orchid/resources/pages/fakers/edu.md new file mode 100644 index 000000000..27b474afd --- /dev/null +++ b/docs/src/orchid/resources/pages/fakers/edu.md @@ -0,0 +1,54 @@ +## `EduFaker` + +[![Maven Central](https://img.shields.io/maven-central/v/io.github.serpro69/kotlin-faker-edu?style=for-the-badge)](https://search.maven.org/artifact/io.github.serpro69/kotlin-faker-edu) +[![Sonatype Nexus (Snapshots)](https://img.shields.io/nexus/s/io.github.serpro69/kotlin-faker-edu?label=snapshot-version&server=https%3A%2F%2Foss.sonatype.org&style=for-the-badge&color=yellow)](#downloading) + +Provides access to fake data generators within the Education domain. + +## Usage + +Documentation for kotlin-faker is available at [serpro69.github.io/kotlin-faker/](https://serpro69.github.io/kotlin-faker/). + +### Downloading + +Latest releases are always available on maven central. + +**With gradle** + +```groovy +dependencies { + implementation 'io.github.serpro69:kotlin-faker:$version' + implementation 'io.github.serpro69:kotlin-faker-edu:$version' +} +``` + +**With maven** + +```xml + + + io.github.serpro69 + kotlin-faker + ${version} + + + io.github.serpro69 + kotlin-faker-edu + ${version} + + +``` + +_NB! An additional fake data provider like 'edu' requires the main `kotlin-faker` dependency to be on the classpath._ + +### Generating data + +```kotlin +// NB! the package you import if using multiple fakers +import io.github.serpro69.kfaker.edu.faker + +val faker = faker { } + +faker.educator.schoolName() +faker.science.element() +``` diff --git a/docs/src/orchid/resources/pages/fakers/games.md b/docs/src/orchid/resources/pages/fakers/games.md new file mode 100644 index 000000000..2461006ec --- /dev/null +++ b/docs/src/orchid/resources/pages/fakers/games.md @@ -0,0 +1,54 @@ +## `GamesFaker` + +[![Maven Central](https://img.shields.io/maven-central/v/io.github.serpro69/kotlin-faker-games?style=for-the-badge)](https://search.maven.org/artifact/io.github.serpro69/kotlin-faker-games) +[![Sonatype Nexus (Snapshots)](https://img.shields.io/nexus/s/io.github.serpro69/kotlin-faker-games?label=snapshot-version&server=https%3A%2F%2Foss.sonatype.org&style=for-the-badge&color=yellow)](#downloading) + +Provides access to fake data generators within the Games domain. + +## Usage + +Documentation for kotlin-faker is available at [serpro69.github.io/kotlin-faker/](https://serpro69.github.io/kotlin-faker/). + +### Downloading + +Latest releases are always available on maven central. + +**With gradle** + +```groovy +dependencies { + implementation 'io.github.serpro69:kotlin-faker:$version' + implementation 'io.github.serpro69:kotlin-faker-games:$version' +} +``` + +**With maven** + +```xml + + + io.github.serpro69 + kotlin-faker + ${version} + + + io.github.serpro69 + kotlin-faker-games + ${version} + + +``` + +_NB! An additional fake data provider like 'games' requires the main `kotlin-faker` dependency to be on the classpath._ + +### Generating data + +```kotlin +// NB! the package you import if using multiple fakers +import io.github.serpro69.kfaker.games.faker + +val faker = faker { } + +faker.coin.flip() +faker.dnd.alignments() +``` diff --git a/docs/src/orchid/resources/pages/fakers/humor.md b/docs/src/orchid/resources/pages/fakers/humor.md new file mode 100644 index 000000000..09fa755b7 --- /dev/null +++ b/docs/src/orchid/resources/pages/fakers/humor.md @@ -0,0 +1,54 @@ +## `HumorFaker` + +[![Maven Central](https://img.shields.io/maven-central/v/io.github.serpro69/kotlin-faker-humor?style=for-the-badge)](https://search.maven.org/artifact/io.github.serpro69/kotlin-faker-humor) +[![Sonatype Nexus (Snapshots)](https://img.shields.io/nexus/s/io.github.serpro69/kotlin-faker-humor?label=snapshot-version&server=https%3A%2F%2Foss.sonatype.org&style=for-the-badge&color=yellow)](#downloading) + +Provides access to fake data generators within the Humor domain. + +## Usage + +Documentation for kotlin-faker is available at [serpro69.github.io/kotlin-faker/](https://serpro69.github.io/kotlin-faker/). + +### Downloading + +Latest releases are always available on maven central. + +**With gradle** + +```groovy +dependencies { + implementation 'io.github.serpro69:kotlin-faker:$version' + implementation 'io.github.serpro69:kotlin-faker-humor:$version' +} +``` + +**With maven** + +```xml + + + io.github.serpro69 + kotlin-faker + ${version} + + + io.github.serpro69 + kotlin-faker-humor + ${version} + + +``` + +_NB! An additional fake data provider like 'humor' requires the main `kotlin-faker` dependency to be on the classpath._ + +### Generating data + +```kotlin +// NB! the package you import if using multiple fakers +import io.github.serpro69.kfaker.humor.faker + +val faker = faker { } + +faker.chuckNorris.fact() +faker.funnyName.name() +``` diff --git a/docs/src/orchid/resources/pages/fakers/japmedia.md b/docs/src/orchid/resources/pages/fakers/japmedia.md new file mode 100644 index 000000000..51cf82c90 --- /dev/null +++ b/docs/src/orchid/resources/pages/fakers/japmedia.md @@ -0,0 +1,54 @@ +## `JapaneseMediaFaker` + +[![Maven Central](https://img.shields.io/maven-central/v/io.github.serpro69/kotlin-faker-japmedia?style=for-the-badge)](https://search.maven.org/artifact/io.github.serpro69/kotlin-faker-japmedia) +[![Sonatype Nexus (Snapshots)](https://img.shields.io/nexus/s/io.github.serpro69/kotlin-faker-japmedia?label=snapshot-version&server=https%3A%2F%2Foss.sonatype.org&style=for-the-badge&color=yellow)](#downloading) + +Provides access to fake data generators within the Japanese Media domain. + +## Usage + +Documentation for kotlin-faker is available at [serpro69.github.io/kotlin-faker/](https://serpro69.github.io/kotlin-faker/). + +### Downloading + +Latest releases are always available on maven central. + +**With gradle** + +```groovy +dependencies { + implementation 'io.github.serpro69:kotlin-faker:$version' + implementation 'io.github.serpro69:kotlin-faker-japmedia:$version' +} +``` + +**With maven** + +```xml + + + io.github.serpro69 + kotlin-faker + ${version} + + + io.github.serpro69 + kotlin-faker-japmedia + ${version} + + +``` + +_NB! An additional fake data provider like 'japmedia' requires the main `kotlin-faker` dependency to be on the classpath._ + +### Generating data + +```kotlin +// NB! the package you import if using multiple fakers +import io.github.serpro69.kfaker.japmedia.faker + +val faker = faker { } + +faker.onePiece.characters() +faker.studioGhibli.characters() +``` diff --git a/docs/src/orchid/resources/pages/fakers/lorem.md b/docs/src/orchid/resources/pages/fakers/lorem.md new file mode 100644 index 000000000..1c4b504d9 --- /dev/null +++ b/docs/src/orchid/resources/pages/fakers/lorem.md @@ -0,0 +1,54 @@ +## `LoremFaker` + +[![Maven Central](https://img.shields.io/maven-central/v/io.github.serpro69/kotlin-faker-lorem?style=for-the-badge)](https://search.maven.org/artifact/io.github.serpro69/kotlin-faker-lorem) +[![Sonatype Nexus (Snapshots)](https://img.shields.io/nexus/s/io.github.serpro69/kotlin-faker-lorem?label=snapshot-version&server=https%3A%2F%2Foss.sonatype.org&style=for-the-badge&color=yellow)](#downloading) + +Provides access to fake data generators within the Lorem domain. + +## Usage + +Documentation for kotlin-faker is available at [serpro69.github.io/kotlin-faker/](https://serpro69.github.io/kotlin-faker/). + +### Downloading + +Latest releases are always available on maven central. + +**With gradle** + +```groovy +dependencies { + implementation 'io.github.serpro69:kotlin-faker:$version' + implementation 'io.github.serpro69:kotlin-faker-lorem:$version' +} +``` + +**With maven** + +```xml + + + io.github.serpro69 + kotlin-faker + ${version} + + + io.github.serpro69 + kotlin-faker-lorem + ${version} + + +``` + +_NB! An additional fake data provider like 'lorem' requires the main `kotlin-faker` dependency to be on the classpath._ + +### Generating data + +```kotlin +// NB! the package you import if using multiple fakers +import io.github.serpro69.kfaker.lorem.faker + +val faker = faker { } + +faker.adjective.positive() +faker.verbs.base() +``` diff --git a/docs/src/orchid/resources/pages/fakers/misc.md b/docs/src/orchid/resources/pages/fakers/misc.md new file mode 100644 index 000000000..1a420ff19 --- /dev/null +++ b/docs/src/orchid/resources/pages/fakers/misc.md @@ -0,0 +1,54 @@ +## `MiscFaker` + +[![Maven Central](https://img.shields.io/maven-central/v/io.github.serpro69/kotlin-faker-misc?style=for-the-badge)](https://search.maven.org/artifact/io.github.serpro69/kotlin-faker-misc) +[![Sonatype Nexus (Snapshots)](https://img.shields.io/nexus/s/io.github.serpro69/kotlin-faker-misc?label=snapshot-version&server=https%3A%2F%2Foss.sonatype.org&style=for-the-badge&color=yellow)](#downloading) + +Provides access to fake data generators that don't belong in the core Faker, but also don't fit into any of the existing providers. + +## Usage + +Documentation for kotlin-faker is available at [serpro69.github.io/kotlin-faker/](https://serpro69.github.io/kotlin-faker/). + +### Downloading + +Latest releases are always available on maven central. + +**With gradle** + +```groovy +dependencies { + implementation 'io.github.serpro69:kotlin-faker:$version' + implementation 'io.github.serpro69:kotlin-faker-misc:$version' +} +``` + +**With maven** + +```xml + + + io.github.serpro69 + kotlin-faker + ${version} + + + io.github.serpro69 + kotlin-faker-misc + ${version} + + +``` + +_NB! An additional fake data provider like 'misc' requires the main `kotlin-faker` dependency to be on the classpath._ + +### Generating data + +```kotlin +// NB! the package you import if using multiple fakers +import io.github.serpro69.kfaker.misc.faker + +val faker = faker { } + +faker.artist.names() +faker.hobby.activity() +``` diff --git a/docs/src/orchid/resources/pages/fakers/movies.md b/docs/src/orchid/resources/pages/fakers/movies.md new file mode 100644 index 000000000..0888f0ae8 --- /dev/null +++ b/docs/src/orchid/resources/pages/fakers/movies.md @@ -0,0 +1,54 @@ +## `MoviesFaker` + +[![Maven Central](https://img.shields.io/maven-central/v/io.github.serpro69/kotlin-faker-movies?style=for-the-badge)](https://search.maven.org/artifact/io.github.serpro69/kotlin-faker-movies) +[![Sonatype Nexus (Snapshots)](https://img.shields.io/nexus/s/io.github.serpro69/kotlin-faker-movies?label=snapshot-version&server=https%3A%2F%2Foss.sonatype.org&style=for-the-badge&color=yellow)](#downloading) + +Provides access to fake data generators within the Movies domain. + +## Usage + +Documentation for kotlin-faker is available at [serpro69.github.io/kotlin-faker/](https://serpro69.github.io/kotlin-faker/). + +### Downloading + +Latest releases are always available on maven central. + +**With gradle** + +```groovy +dependencies { + implementation 'io.github.serpro69:kotlin-faker:$version' + implementation 'io.github.serpro69:kotlin-faker-movies:$version' +} +``` + +**With maven** + +```xml + + + io.github.serpro69 + kotlin-faker + ${version} + + + io.github.serpro69 + kotlin-faker-movies + ${version} + + +``` + +_NB! An additional fake data provider like 'movies' requires the main `kotlin-faker` dependency to be on the classpath._ + +### Generating data + +```kotlin +// NB! the package you import if using multiple fakers +import io.github.serpro69.kfaker.movies.faker + +val faker = faker { } + +faker.departed.actors() +faker.hobbit.characters() +``` diff --git a/docs/src/orchid/resources/pages/fakers/music.md b/docs/src/orchid/resources/pages/fakers/music.md new file mode 100644 index 000000000..459052358 --- /dev/null +++ b/docs/src/orchid/resources/pages/fakers/music.md @@ -0,0 +1,54 @@ +## `MucisFaker` + +[![Maven Central](https://img.shields.io/maven-central/v/io.github.serpro69/kotlin-faker-music?style=for-the-badge)](https://search.maven.org/artifact/io.github.serpro69/kotlin-faker-music) +[![Sonatype Nexus (Snapshots)](https://img.shields.io/nexus/s/io.github.serpro69/kotlin-faker-music?label=snapshot-version&server=https%3A%2F%2Foss.sonatype.org&style=for-the-badge&color=yellow)](#downloading) + +Provides access to fake data generators within the Mucis domain. + +## Usage + +Documentation for kotlin-faker is available at [serpro69.github.io/kotlin-faker/](https://serpro69.github.io/kotlin-faker/). + +### Downloading + +Latest releases are always available on maven central. + +**With gradle** + +```groovy +dependencies { + implementation 'io.github.serpro69:kotlin-faker:$version' + implementation 'io.github.serpro69:kotlin-faker-music:$version' +} +``` + +**With maven** + +```xml + + + io.github.serpro69 + kotlin-faker + ${version} + + + io.github.serpro69 + kotlin-faker-music + ${version} + + +``` + +_NB! An additional fake data provider like 'music' requires the main `kotlin-faker` dependency to be on the classpath._ + +### Generating data + +```kotlin +// NB! the package you import if using multiple fakers +import io.github.serpro69.kfaker.music.faker + +val faker = faker { } + +faker.music.instruments() +faker.opera.italian.byGiuseppeVerdi() +``` diff --git a/docs/src/orchid/resources/pages/fakers/sports.md b/docs/src/orchid/resources/pages/fakers/sports.md new file mode 100644 index 000000000..306304250 --- /dev/null +++ b/docs/src/orchid/resources/pages/fakers/sports.md @@ -0,0 +1,54 @@ +## `SportsFaker` + +[![Maven Central](https://img.shields.io/maven-central/v/io.github.serpro69/kotlin-faker-sports?style=for-the-badge)](https://search.maven.org/artifact/io.github.serpro69/kotlin-faker-sports) +[![Sonatype Nexus (Snapshots)](https://img.shields.io/nexus/s/io.github.serpro69/kotlin-faker-sports?label=snapshot-version&server=https%3A%2F%2Foss.sonatype.org&style=for-the-badge&color=yellow)](#downloading) + +Provides access to fake data generators within the Sports domain. + +## Usage + +Documentation for kotlin-faker is available at [serpro69.github.io/kotlin-faker/](https://serpro69.github.io/kotlin-faker/). + +### Downloading + +Latest releases are always available on maven central. + +**With gradle** + +```groovy +dependencies { + implementation 'io.github.serpro69:kotlin-faker:$version' + implementation 'io.github.serpro69:kotlin-faker-sports:$version' +} +``` + +**With maven** + +```xml + + + io.github.serpro69 + kotlin-faker + ${version} + + + io.github.serpro69 + kotlin-faker-sports + ${version} + + +``` + +_NB! An additional fake data provider like 'sports' requires the main `kotlin-faker` dependency to be on the classpath._ + +### Generating data + +```kotlin +// NB! the package you import if using multiple fakers +import io.github.serpro69.kfaker.sports.faker + +val faker = faker { } + +faker.basketball.teams() +faker.chess.players() +``` diff --git a/docs/src/orchid/resources/pages/fakers/tech.md b/docs/src/orchid/resources/pages/fakers/tech.md new file mode 100644 index 000000000..dee73084e --- /dev/null +++ b/docs/src/orchid/resources/pages/fakers/tech.md @@ -0,0 +1,54 @@ +## `TechFaker` + +[![Maven Central](https://img.shields.io/maven-central/v/io.github.serpro69/kotlin-faker-tech?style=for-the-badge)](https://search.maven.org/artifact/io.github.serpro69/kotlin-faker-tech) +[![Sonatype Nexus (Snapshots)](https://img.shields.io/nexus/s/io.github.serpro69/kotlin-faker-tech?label=snapshot-version&server=https%3A%2F%2Foss.sonatype.org&style=for-the-badge&color=yellow)](#downloading) + +Provides access to fake data generators within the Tech domain. + +## Usage + +Documentation for kotlin-faker is available at [serpro69.github.io/kotlin-faker/](https://serpro69.github.io/kotlin-faker/). + +### Downloading + +Latest releases are always available on maven central. + +**With gradle** + +```groovy +dependencies { + implementation 'io.github.serpro69:kotlin-faker:$version' + implementation 'io.github.serpro69:kotlin-faker-tech:$version' +} +``` + +**With maven** + +```xml + + + io.github.serpro69 + kotlin-faker + ${version} + + + io.github.serpro69 + kotlin-faker-tech + ${version} + + +``` + +_NB! An additional fake data provider like 'tech' requires the main `kotlin-faker` dependency to be on the classpath._ + +### Generating data + +```kotlin +// NB! the package you import if using multiple fakers +import io.github.serpro69.kfaker.tech.faker + +val faker = faker { } + +faker.app.name() +faker.device.platform() +``` diff --git a/docs/src/orchid/resources/pages/fakers/travel.md b/docs/src/orchid/resources/pages/fakers/travel.md new file mode 100644 index 000000000..07ae3c6a0 --- /dev/null +++ b/docs/src/orchid/resources/pages/fakers/travel.md @@ -0,0 +1,54 @@ +## `TravelFaker` + +[![Maven Central](https://img.shields.io/maven-central/v/io.github.serpro69/kotlin-faker-travel?style=for-the-badge)](https://search.maven.org/artifact/io.github.serpro69/kotlin-faker-travel) +[![Sonatype Nexus (Snapshots)](https://img.shields.io/nexus/s/io.github.serpro69/kotlin-faker-travel?label=snapshot-version&server=https%3A%2F%2Foss.sonatype.org&style=for-the-badge&color=yellow)](#downloading) + +Provides access to fake data generators within the Travel domain. + +## Usage + +Documentation for kotlin-faker is available at [serpro69.github.io/kotlin-faker/](https://serpro69.github.io/kotlin-faker/). + +### Downloading + +Latest releases are always available on maven central. + +**With gradle** + +```groovy +dependencies { + implementation 'io.github.serpro69:kotlin-faker:$version' + implementation 'io.github.serpro69:kotlin-faker-travel:$version' +} +``` + +**With maven** + +```xml + + + io.github.serpro69 + kotlin-faker + ${version} + + + io.github.serpro69 + kotlin-faker-travel + ${version} + + +``` + +_NB! An additional fake data provider like 'travel' requires the main `kotlin-faker` dependency to be on the classpath._ + +### Generating data + +```kotlin +// NB! the package you import if using multiple fakers +import io.github.serpro69.kfaker.travel.faker + +val faker = faker { } + +faker.airport.europeanUnion.iataCode() +faker.mountain.name() +``` diff --git a/docs/src/orchid/resources/pages/fakers/tvshows.md b/docs/src/orchid/resources/pages/fakers/tvshows.md new file mode 100644 index 000000000..1c53b200b --- /dev/null +++ b/docs/src/orchid/resources/pages/fakers/tvshows.md @@ -0,0 +1,54 @@ +## `TvShowsFaker` + +[![Maven Central](https://img.shields.io/maven-central/v/io.github.serpro69/kotlin-faker-tvshows?style=for-the-badge)](https://search.maven.org/artifact/io.github.serpro69/kotlin-faker-tvshows) +[![Sonatype Nexus (Snapshots)](https://img.shields.io/nexus/s/io.github.serpro69/kotlin-faker-tvshows?label=snapshot-version&server=https%3A%2F%2Foss.sonatype.org&style=for-the-badge&color=yellow)](#downloading) + +Provides access to fake data generators within the TV-Shows domain. + +## Usage + +Documentation for kotlin-faker is available at [serpro69.github.io/kotlin-faker/](https://serpro69.github.io/kotlin-faker/). + +### Downloading + +Latest releases are always available on maven central. + +**With gradle** + +```groovy +dependencies { + implementation 'io.github.serpro69:kotlin-faker:$version' + implementation 'io.github.serpro69:kotlin-faker-tvshows:$version' +} +``` + +**With maven** + +```xml + + + io.github.serpro69 + kotlin-faker + ${version} + + + io.github.serpro69 + kotlin-faker-tvshows + ${version} + + +``` + +_NB! An additional fake data provider like 'tvshows' requires the main `kotlin-faker` dependency to be on the classpath._ + +### Generating data + +```kotlin +// NB! the package you import if using multiple fakers +import io.github.serpro69.kfaker.tv.faker + +val faker = faker { } + +faker.bigBangTheory.characters() +faker.friends.characters() +``` diff --git a/docs/src/orchid/resources/wiki/custom-data-provider.md b/docs/src/orchid/resources/wiki/custom-data-provider.md new file mode 100644 index 000000000..148703054 --- /dev/null +++ b/docs/src/orchid/resources/wiki/custom-data-provider.md @@ -0,0 +1,84 @@ +--- +--- + +# Custom Data Provider + +Kotlin-faker allows you to easily create your own custom fake data generators (providers), and even new fakers. + +Let's assume you want to create a `FooBar` data generator with support for the default `en` locale. + +First, we need to create a json file that will serve as your "data dictionary", e.g. `resources/locales/en/foobar.json`, with the following contents: + +```json +{ + "en": { + "faker": { + "custom": { + "foobar": { + "foo": ["foo", "bar", "baz"], + "bar": "foobar", + "baz": "### ???" + } + } + } + } +} +``` + +- The first key in the json file should match the locale name. +- The second key should always be `faker` and the third `custom` +- The next key, `foobar` in this case, can be anything you want. + - For `en` locale, the json filename should either match this key, or should be `custom.json`. + - If the filename is `foobar.json`, we need to override the `secondaryCategory` property in the data generator implementation (see ❷ below), and pass this property as second argument to `fakerService.load` (see ❸ below). +- After that you have your data parameters with values as key-value pairs + +{% tip %} +If you want to support a different locale, place the file in `resources/locales/.json` instead +{% endtip %} + +Then, we need to implement the `YamlFakeDataProvider` class: + +```kotlin +class FooBar(fakerService: FakerService) : YamlFakeDataProvider(fakerService) { + override val yamlCategory: YamlCategory = YamlCategory.CUSTOM // ❶ + override val secondaryCategory: Category = Category.ofName("FOOBAR") // ❷ + override val localUniqueDataProvider = LocalUniqueDataProvider() + override val unique: FooBar by UniqueProviderDelegate(localUniqueDataProvider) + + init { + fakerService.load(yamlCategory, secondaryCategory) // ❸ + } + + fun foo(): String = resolve(secondaryCategory, "foo") + fun bar(): String = resolve(secondaryCategory, "bar") + fun baz(): String = with(fakerService) { resolve(secondaryCategory, "baz").numerify().letterify() } // ❹ +} +``` + +❶ The `yamlCategory` should generally use `YamlCategory.CUSTOM` enum class. Although you could also use one of the existing categories if you like, one should be careful not to override existing functionality in a given data provider. +❷ If our json file is named `foobar.json`, the `secondaryKey` needs to override the category name +❸ In this case we also need to pass the `secondaryCategory` argument to `fakerService.load` function +❹ You have access to all default faker functionality, i.e. `FakerService#numerify` to replace all `#` placeholders with a random digit, and `FakerService#letterify` to replace all `?` with a random letter + +{% info %} +It's totally understandable if you're confused about the naming of the `YamlFakeDataProvider` and `YamlCategory` classes, especially since we use json files to read data from. +The reason for this is that the source of the data that faker uses comes in yml files, but faker converts them to json files at build time and uses those instead. +{% endinfo %} + +Last, we need to add a very simple implementation of the `AbstractFaker`: + +```kotlin +class CustomFaker(config: FakerConfig = fakerConfig { }) : AbstractFaker(config) { + + val fooBar by lazy { FooBar(fakerService) } +} +``` + +From there we can use our `CustomFaker` just like any other: + +```kotlin +val testFaker = CustomFaker() +println(testFaker.fooBar.foo()) // baz +println(testFaker.fooBar.bar()) // foobar +println(testFaker.fooBar.baz()) // ABC 123 +``` diff --git a/docs/src/orchid/resources/wiki/data-providers.md b/docs/src/orchid/resources/wiki/data-providers.md index 54b0e1be2..cd7feff02 100644 --- a/docs/src/orchid/resources/wiki/data-providers.md +++ b/docs/src/orchid/resources/wiki/data-providers.md @@ -3,7 +3,7 @@ # Data Providers -Below is the list of available data providers (aka "categories" or "domains") that correspond to the yaml dictionary files found in [core/locales/en](https://github.com/serpro69/kotlin-faker/tree/master/core/src/main/resources/locales/en) +Below is the list of available Fakers domains and their data providers (data generators) that correspond to the yaml dictionary files found in [core/locales/en](https://github.com/serpro69/kotlin-faker/tree/master/core/src/main/resources/locales/en) {% info %} Not all (although most) of the providers and/or their functions are implemented at this point. For more details on available functions see the documentation for each provider below, or go to the {{ anchor(title='Core API', collectionType='kotlindoc', collectionId='modules-core', itemId='Core API') }} page to browse the API reference documentation. @@ -13,6 +13,132 @@ Not all (although most) of the providers and/or their functions are implemented Below pages contain code blocks with inlined yaml dictionaries, some of them can be quite big. This could affect your internet traffic if you're viewing these docs on a mobile device. {% endwarn %} -{% for page in findAll(collectionType='pages', collectionId='data-provider') %} +{% set pages = findAll(collectionType='pages', collectionId='data-provider') %} + +"Core" `Faker` + +{% for page in pages %} +{% if page.link | split('/') contains "core" %} +- [{{ page.title }}]({{ page.link }}) +{% endif %} +{% endfor %} + +[`BooksFaker`]({{ link(collectionType='pages', collectionId='fakers', itemId='Books') }}) + +{% for page in pages %} +{% if page.link | split('/') contains "books" %} +- [{{ page.title }}]({{ page.link }}) +{% endif %} +{% endfor %} + +[`CommerceFaker`]({{ link(collectionType='pages', collectionId='fakers', itemId='Commerce') }}) + +{% for page in pages %} +{% if page.link | split('/') contains "commerce" %} +- [{{ page.title }}]({{ page.link }}) +{% endif %} +{% endfor %} + +[`CreaturesFaker`]({{ link(collectionType='pages', collectionId='fakers', itemId='Creatures') }}) + +{% for page in pages %} +{% if page.link | split('/') contains "creatures" %} +- [{{ page.title }}]({{ page.link }}) +{% endif %} +{% endfor %} + +[`EduFaker`]({{ link(collectionType='pages', collectionId='fakers', itemId='Edu') }}) + +{% for page in pages %} +{% if page.link | split('/') contains "edu" %} +- [{{ page.title }}]({{ page.link }}) +{% endif %} +{% endfor %} + +[`GamesFaker`]({{ link(collectionType='pages', collectionId='fakers', itemId='Games') }}) + +{% for page in pages %} +{% if page.link | split('/') contains "games" %} +- [{{ page.title }}]({{ page.link }}) +{% endif %} +{% endfor %} + +[`HumorFaker`]({{ link(collectionType='pages', collectionId='fakers', itemId='Humor') }}) + +{% for page in pages %} +{% if page.link | split('/') contains "humor" %} +- [{{ page.title }}]({{ page.link }}) +{% endif %} +{% endfor %} + +[`JapaneseMediaFaker`]({{ link(collectionType='pages', collectionId='fakers', itemId='Japmedia') }}) + +{% for page in pages %} +{% if page.link | split('/') contains "japmedia" %} +- [{{ page.title }}]({{ page.link }}) +{% endif %} +{% endfor %} + +[`LoremFaker`]({{ link(collectionType='pages', collectionId='fakers', itemId='Lorem') }}) + +{% for page in pages %} +{% if page.link | split('/') contains "lorem" %} +- [{{ page.title }}]({{ page.link }}) +{% endif %} +{% endfor %} + +[`MiscFaker`]({{ link(collectionType='pages', collectionId='fakers', itemId='Misc') }}) + +{% for page in pages %} +{% if page.link | split('/') contains "misc" %} +- [{{ page.title }}]({{ page.link }}) +{% endif %} +{% endfor %} + +[`MoviesFaker`]({{ link(collectionType='pages', collectionId='fakers', itemId='Movies') }}) + +{% for page in pages %} +{% if page.link | split('/') contains "movies" %} +- [{{ page.title }}]({{ page.link }}) +{% endif %} +{% endfor %} + +[`MusicFaker`]({{ link(collectionType='pages', collectionId='fakers', itemId='Music') }}) + +{% for page in pages %} +{% if page.link | split('/') contains "music" %} +- [{{ page.title }}]({{ page.link }}) +{% endif %} +{% endfor %} + +[`SportsFaker`]({{ link(collectionType='pages', collectionId='fakers', itemId='Sports') }}) + +{% for page in pages %} +{% if page.link | split('/') contains "sports" %} +- [{{ page.title }}]({{ page.link }}) +{% endif %} +{% endfor %} + +[`TechFaker`]({{ link(collectionType='pages', collectionId='fakers', itemId='Tech') }}) + +{% for page in pages %} +{% if page.link | split('/') contains "tech" %} +- [{{ page.title }}]({{ page.link }}) +{% endif %} +{% endfor %} + +[`TravelFaker`]({{ link(collectionType='pages', collectionId='fakers', itemId='Travel') }}) + +{% for page in pages %} +{% if page.link | split('/') contains "travel" %} +- [{{ page.title }}]({{ page.link }}) +{% endif %} +{% endfor %} + +[`TvShowsFaker`]({{ link(collectionType='pages', collectionId='fakers', itemId='Tvshows') }}) + +{% for page in pages %} +{% if page.link | split('/') contains "tvshows" %} - [{{ page.title }}]({{ page.link }}) +{% endif %} {% endfor %} diff --git a/docs/src/orchid/resources/wiki/summary.md b/docs/src/orchid/resources/wiki/summary.md index 278445782..d20834704 100644 --- a/docs/src/orchid/resources/wiki/summary.md +++ b/docs/src/orchid/resources/wiki/summary.md @@ -5,6 +5,7 @@ * [Extras](extras.md) * [Faker DSL](faker-dsl.md) * [Data Providers](data-providers.md) +* [Custom Data Provider](custom-data-provider.md) * [Available Locales](available-locales.md) * [Java Interop](java-interop.md) * [Faker Bot CLI](faker-cli.md) diff --git a/faker/books/README.md b/faker/books/README.md new file mode 100644 index 000000000..595ab08fd --- /dev/null +++ b/faker/books/README.md @@ -0,0 +1,54 @@ +## `BooksFaker` + +[![Maven Central](https://img.shields.io/maven-central/v/io.github.serpro69/kotlin-faker-books?style=for-the-badge)](https://search.maven.org/artifact/io.github.serpro69/kotlin-faker-books) +[![Sonatype Nexus (Snapshots)](https://img.shields.io/nexus/s/io.github.serpro69/kotlin-faker-books?label=snapshot-version&server=https%3A%2F%2Foss.sonatype.org&style=for-the-badge&color=yellow)](#downloading) + +Provides access to fake data generators within the Books domain. + +## Usage + +Documentation for kotlin-faker is available at [serpro69.github.io/kotlin-faker/](https://serpro69.github.io/kotlin-faker/). + +### Downloading + +Latest releases are always available on maven central. + +**With gradle** + +```groovy +dependencies { + implementation 'io.github.serpro69:kotlin-faker:$version' + implementation 'io.github.serpro69:kotlin-faker-books:$version' +} +``` + +**With maven** + +```xml + + + io.github.serpro69 + kotlin-faker + ${version} + + + io.github.serpro69 + kotlin-faker-books + ${version} + + +``` + +_NB! An additional fake data provider like 'books' requires the main `kotlin-faker` dependency to be on the classpath._ + +### Generating data + +```kotlin +// NB! the package you import if using multiple fakers +import io.github.serpro69.kfaker.books.faker + +val faker = faker { } + +faker.book.title() +faker.cosmere.aons() +``` diff --git a/faker/books/build.gradle.kts b/faker/books/build.gradle.kts new file mode 100644 index 000000000..55f6540f8 --- /dev/null +++ b/faker/books/build.gradle.kts @@ -0,0 +1,4 @@ +plugins { + `faker-lib-conventions` + `faker-provider-conventions` +} diff --git a/faker/books/src/integration/kotlin/io/github/serpro69/kfaker/books/BooksFakerIT.kt b/faker/books/src/integration/kotlin/io/github/serpro69/kfaker/books/BooksFakerIT.kt new file mode 100644 index 000000000..fd1cb951f --- /dev/null +++ b/faker/books/src/integration/kotlin/io/github/serpro69/kfaker/books/BooksFakerIT.kt @@ -0,0 +1,11 @@ +package io.github.serpro69.kfaker.books + +import io.github.serpro69.kfaker.test.helper.`every public function in each provider is invoked without exceptions` +import io.github.serpro69.kfaker.test.helper.`faker instance is initialized with custom locale` +import io.kotest.core.spec.style.DescribeSpec + +class BooksFakerIT : DescribeSpec({ + `every public function in each provider is invoked without exceptions`(BooksFaker()) + + `faker instance is initialized with custom locale` { faker { } } +}) diff --git a/faker/books/src/main/kotlin/io/github/serpro69/kfaker/books/BooksFaker.kt b/faker/books/src/main/kotlin/io/github/serpro69/kfaker/books/BooksFaker.kt new file mode 100644 index 000000000..44b557959 --- /dev/null +++ b/faker/books/src/main/kotlin/io/github/serpro69/kfaker/books/BooksFaker.kt @@ -0,0 +1,62 @@ +package io.github.serpro69.kfaker.books + +import io.github.serpro69.kfaker.AbstractFaker +import io.github.serpro69.kfaker.FakerConfig +import io.github.serpro69.kfaker.FakerDsl +import io.github.serpro69.kfaker.books.provider.Bible +import io.github.serpro69.kfaker.books.provider.Book +import io.github.serpro69.kfaker.books.provider.Cosmere +import io.github.serpro69.kfaker.books.provider.CultureSeries +import io.github.serpro69.kfaker.books.provider.DcComics +import io.github.serpro69.kfaker.books.provider.Dune +import io.github.serpro69.kfaker.books.provider.Lovecraft +import io.github.serpro69.kfaker.books.provider.Shakespeare +import io.github.serpro69.kfaker.books.provider.TheKingkillerChronicle +import io.github.serpro69.kfaker.books.provider.Tolkien +import io.github.serpro69.kfaker.fakerConfig + +/** + * Typealias for the [BooksFaker] + */ +typealias Faker = BooksFaker + +/** + * Provides access to fake data generators within the Books domain. + * + * Each category (generator) from this [BooksFaker] is represented by a property + * that (usually) has the same name as the `.yml` dictionary file. + * + * @property unique global provider for generation of unique values. + */ +@Suppress("unused") +class BooksFaker @JvmOverloads constructor(config: FakerConfig = fakerConfig { }) : AbstractFaker(config) { + + val bible: Bible by lazy { Bible(fakerService) } + val book: Book by lazy { Book(fakerService) } + val cosmere: Cosmere by lazy { Cosmere(fakerService) } + val cultureSeries: CultureSeries by lazy { CultureSeries(fakerService) } + val dcComics: DcComics by lazy { DcComics(fakerService) } + val dune: Dune by lazy { Dune(fakerService, randomService) } + val lovecraft: Lovecraft by lazy { Lovecraft(fakerService) } + val shakespeare: Shakespeare by lazy { Shakespeare(fakerService) } + val theKingkillerChronicle: TheKingkillerChronicle by lazy { TheKingkillerChronicle(fakerService) } + val tolkien: Tolkien by lazy { Tolkien(fakerService) } + + @FakerDsl + /** + * DSL builder for creating instances of [Faker] + */ + class Builder internal constructor() : AbstractFaker.Builder() { + + /** + * Builds an instance of [Faker] with this [config]. + */ + override fun build(): Faker = Faker(config) + } +} + +/** + * Applies the [block] function to [BooksFaker.Builder] + * and returns as an instance of [BooksFaker] from that builder. + */ +fun faker(block: BooksFaker.Builder.() -> Unit): BooksFaker = BooksFaker.Builder().apply(block).build() diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Bible.kt b/faker/books/src/main/kotlin/io/github/serpro69/kfaker/books/provider/Bible.kt similarity index 73% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/Bible.kt rename to faker/books/src/main/kotlin/io/github/serpro69/kfaker/books/provider/Bible.kt index 13ec44eb8..b7f93e711 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Bible.kt +++ b/faker/books/src/main/kotlin/io/github/serpro69/kfaker/books/provider/Bible.kt @@ -1,9 +1,11 @@ @file:Suppress("unused") -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.books.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Book.kt b/faker/books/src/main/kotlin/io/github/serpro69/kfaker/books/provider/Book.kt similarity index 83% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/Book.kt rename to faker/books/src/main/kotlin/io/github/serpro69/kfaker/books/provider/Book.kt index 18e04dce3..731ba88e7 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Book.kt +++ b/faker/books/src/main/kotlin/io/github/serpro69/kfaker/books/provider/Book.kt @@ -1,7 +1,9 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.books.provider import io.github.serpro69.kfaker.* import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Cosmere.kt b/faker/books/src/main/kotlin/io/github/serpro69/kfaker/books/provider/Cosmere.kt similarity index 77% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/Cosmere.kt rename to faker/books/src/main/kotlin/io/github/serpro69/kfaker/books/provider/Cosmere.kt index 55a1c364b..7525dba69 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Cosmere.kt +++ b/faker/books/src/main/kotlin/io/github/serpro69/kfaker/books/provider/Cosmere.kt @@ -1,7 +1,9 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.books.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/CultureSeries.kt b/faker/books/src/main/kotlin/io/github/serpro69/kfaker/books/provider/CultureSeries.kt similarity index 85% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/CultureSeries.kt rename to faker/books/src/main/kotlin/io/github/serpro69/kfaker/books/provider/CultureSeries.kt index a6588924a..8f2fc7a68 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/CultureSeries.kt +++ b/faker/books/src/main/kotlin/io/github/serpro69/kfaker/books/provider/CultureSeries.kt @@ -1,7 +1,9 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.books.provider import io.github.serpro69.kfaker.* import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/DcComics.kt b/faker/books/src/main/kotlin/io/github/serpro69/kfaker/books/provider/DcComics.kt similarity index 74% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/DcComics.kt rename to faker/books/src/main/kotlin/io/github/serpro69/kfaker/books/provider/DcComics.kt index f0d2e3030..7080b81e9 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/DcComics.kt +++ b/faker/books/src/main/kotlin/io/github/serpro69/kfaker/books/provider/DcComics.kt @@ -1,7 +1,9 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.books.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Dune.kt b/faker/books/src/main/kotlin/io/github/serpro69/kfaker/books/provider/Dune.kt similarity index 63% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/Dune.kt rename to faker/books/src/main/kotlin/io/github/serpro69/kfaker/books/provider/Dune.kt index d24b0e573..9333fffc3 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Dune.kt +++ b/faker/books/src/main/kotlin/io/github/serpro69/kfaker/books/provider/Dune.kt @@ -1,7 +1,10 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.books.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.RandomService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate @@ -9,7 +12,10 @@ import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate * [FakeDataProvider] implementation for [YamlCategory.DUNE] category. */ @Suppress("unused") -class Dune internal constructor(fakerService: FakerService) : YamlFakeDataProvider(fakerService) { +class Dune internal constructor( + fakerService: FakerService, + private val randomService: RandomService, +) : YamlFakeDataProvider(fakerService) { override val yamlCategory = YamlCategory.DUNE override val localUniqueDataProvider = LocalUniqueDataProvider() override val unique by UniqueProviderDelegate(localUniqueDataProvider) @@ -23,7 +29,7 @@ class Dune internal constructor(fakerService: FakerService) : YamlFakeDataProvid // fun planets() = resolve("planets") // fun cities() = resolve("cities") - fun quotes(character: DuneQuoteCharacter = fakerService.randomService.nextEnum()) = + fun quotes(character: QuoteCharacter = randomService.nextEnum()) = resolve("quotes", character.name.lowercase()) // @Deprecated( @@ -46,35 +52,35 @@ class Dune internal constructor(fakerService: FakerService) : YamlFakeDataProvid // fun sayings(origin: String) = DuneSayingOrigin.values().firstOrNull { it.name.equals(origin, true) }?.let { // sayings(it) // } ?: throw IllegalArgumentException("Dune saying not found for '$origin'") -} -enum class DuneQuoteCharacter { - GUILD_NAVIGATOR, - EMPEROR, - PAUL, - THUFIR, - JESSICA, - IRULAN, - MOHIAM, - GURNEY, - LETO, - STILGAR, - LIET_KYNES, - PARDOT_KYNES, - BARON_HARKONNEN, - PITER, - ALIA, - MAPES, - DUNCAN, - YUEH, - ; -} + enum class QuoteCharacter { + GUILD_NAVIGATOR, + EMPEROR, + PAUL, + THUFIR, + JESSICA, + IRULAN, + MOHIAM, + GURNEY, + LETO, + STILGAR, + LIET_KYNES, + PARDOT_KYNES, + BARON_HARKONNEN, + PITER, + ALIA, + MAPES, + DUNCAN, + YUEH, + ; + } -enum class DuneSayingOrigin { - BENE_GESSERIT, - FREMEN, - MENTAT, - MUADDIB, - ORANGE_CATHOLIC_BIBLE, - ; + enum class SayingOrigin { + BENE_GESSERIT, + FREMEN, + MENTAT, + MUADDIB, + ORANGE_CATHOLIC_BIBLE, + ; + } } diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Lovecraft.kt b/faker/books/src/main/kotlin/io/github/serpro69/kfaker/books/provider/Lovecraft.kt similarity index 84% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/Lovecraft.kt rename to faker/books/src/main/kotlin/io/github/serpro69/kfaker/books/provider/Lovecraft.kt index dc395a9e1..55515a254 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Lovecraft.kt +++ b/faker/books/src/main/kotlin/io/github/serpro69/kfaker/books/provider/Lovecraft.kt @@ -1,7 +1,9 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.books.provider import io.github.serpro69.kfaker.* import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Shakespeare.kt b/faker/books/src/main/kotlin/io/github/serpro69/kfaker/books/provider/Shakespeare.kt similarity index 75% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/Shakespeare.kt rename to faker/books/src/main/kotlin/io/github/serpro69/kfaker/books/provider/Shakespeare.kt index c46a20dd1..76b4e4525 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Shakespeare.kt +++ b/faker/books/src/main/kotlin/io/github/serpro69/kfaker/books/provider/Shakespeare.kt @@ -1,7 +1,9 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.books.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/TheKingkillerChronicle.kt b/faker/books/src/main/kotlin/io/github/serpro69/kfaker/books/provider/TheKingkillerChronicle.kt similarity index 66% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/TheKingkillerChronicle.kt rename to faker/books/src/main/kotlin/io/github/serpro69/kfaker/books/provider/TheKingkillerChronicle.kt index 18fb7cd7d..540171fe3 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/TheKingkillerChronicle.kt +++ b/faker/books/src/main/kotlin/io/github/serpro69/kfaker/books/provider/TheKingkillerChronicle.kt @@ -1,9 +1,11 @@ @file:Suppress("unused") -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.books.provider import io.github.serpro69.kfaker.* import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate @@ -21,8 +23,8 @@ class TheKingkillerChronicle internal constructor(fakerService: FakerService) : fakerService.load(yamlCategory, secondaryCategory) } - fun books(): String = resolve("the_kingkiller_chronicle", "books") - fun characters(): String = resolve("the_kingkiller_chronicle", "characters") - fun creatures(): String = resolve("the_kingkiller_chronicle", "creatures") - fun locations(): String = resolve("the_kingkiller_chronicle", "locations") + fun books(): String = resolve(secondaryCategory, "books") + fun characters(): String = resolve(secondaryCategory, "characters") + fun creatures(): String = resolve(secondaryCategory, "creatures") + fun locations(): String = resolve(secondaryCategory, "locations") } diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Tolkien.kt b/faker/books/src/main/kotlin/io/github/serpro69/kfaker/books/provider/Tolkien.kt similarity index 89% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/Tolkien.kt rename to faker/books/src/main/kotlin/io/github/serpro69/kfaker/books/provider/Tolkien.kt index 0927c7186..7a0e8db51 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Tolkien.kt +++ b/faker/books/src/main/kotlin/io/github/serpro69/kfaker/books/provider/Tolkien.kt @@ -1,9 +1,11 @@ @file:Suppress("unused") -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.books.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/faker/commerce/README.md b/faker/commerce/README.md new file mode 100644 index 000000000..8e5397e1d --- /dev/null +++ b/faker/commerce/README.md @@ -0,0 +1,54 @@ +## `CommerceFaker` + +[![Maven Central](https://img.shields.io/maven-central/v/io.github.serpro69/kotlin-faker-commerce?style=for-the-badge)](https://search.maven.org/artifact/io.github.serpro69/kotlin-faker-commerce) +[![Sonatype Nexus (Snapshots)](https://img.shields.io/nexus/s/io.github.serpro69/kotlin-faker-commerce?label=snapshot-version&server=https%3A%2F%2Foss.sonatype.org&style=for-the-badge&color=yellow)](#downloading) + +Provides access to fake data generators within the Commerce domain. + +## Usage + +Documentation for kotlin-faker is available at [serpro69.github.io/kotlin-faker/](https://serpro69.github.io/kotlin-faker/). + +### Downloading + +Latest releases are always available on maven central. + +**With gradle** + +```groovy +dependencies { + implementation 'io.github.serpro69:kotlin-faker:$version' + implementation 'io.github.serpro69:kotlin-faker-commerce:$version' +} +``` + +**With maven** + +```xml + + + io.github.serpro69 + kotlin-faker + ${version} + + + io.github.serpro69 + kotlin-faker-commerce + ${version} + + +``` + +_NB! An additional fake data provider like 'commerce' requires the main `kotlin-faker` dependency to be on the classpath._ + +### Generating data + +```kotlin +// NB! the package you import if using multiple fakers +import io.github.serpro69.kfaker.commerce.faker + +val faker = faker { } + +faker.bank.name() +faker.code.asin() +``` diff --git a/faker/commerce/build.gradle.kts b/faker/commerce/build.gradle.kts new file mode 100644 index 000000000..55f6540f8 --- /dev/null +++ b/faker/commerce/build.gradle.kts @@ -0,0 +1,4 @@ +plugins { + `faker-lib-conventions` + `faker-provider-conventions` +} diff --git a/faker/commerce/src/integration/kotlin/io/github/serpro69/kfaker/commerce/CommerceFakerIT.kt b/faker/commerce/src/integration/kotlin/io/github/serpro69/kfaker/commerce/CommerceFakerIT.kt new file mode 100644 index 000000000..a3d62cd4a --- /dev/null +++ b/faker/commerce/src/integration/kotlin/io/github/serpro69/kfaker/commerce/CommerceFakerIT.kt @@ -0,0 +1,11 @@ +package io.github.serpro69.kfaker.commerce + +import io.github.serpro69.kfaker.test.helper.`every public function in each provider is invoked without exceptions` +import io.github.serpro69.kfaker.test.helper.`faker instance is initialized with custom locale` +import io.kotest.core.spec.style.DescribeSpec + +class CommerceFakerIT : DescribeSpec({ + `every public function in each provider is invoked without exceptions`(CommerceFaker()) + + `faker instance is initialized with custom locale` { faker { } } +}) diff --git a/core/src/integration/kotlin/io/github/serpro69/kfaker/provider/CompanyIT.kt b/faker/commerce/src/integration/kotlin/io/github/serpro69/kfaker/commerce/provider/CompanyIT.kt similarity index 76% rename from core/src/integration/kotlin/io/github/serpro69/kfaker/provider/CompanyIT.kt rename to faker/commerce/src/integration/kotlin/io/github/serpro69/kfaker/commerce/provider/CompanyIT.kt index c8bc03fa2..fc04d37d6 100644 --- a/core/src/integration/kotlin/io/github/serpro69/kfaker/provider/CompanyIT.kt +++ b/faker/commerce/src/integration/kotlin/io/github/serpro69/kfaker/commerce/provider/CompanyIT.kt @@ -1,11 +1,9 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.commerce.provider -import io.github.serpro69.kfaker.faker +import io.github.serpro69.kfaker.commerce.faker import io.kotest.assertions.throwables.shouldNotThrow import io.kotest.core.spec.style.DescribeSpec -import io.kotest.matchers.shouldBe import io.kotest.matchers.shouldNotBe -import io.kotest.matchers.string.shouldMatch class CompanyIT : DescribeSpec({ describe("Company Provider") { diff --git a/core/src/integration/kotlin/io/github/serpro69/kfaker/provider/FinanceIT.kt b/faker/commerce/src/integration/kotlin/io/github/serpro69/kfaker/commerce/provider/FinanceIT.kt similarity index 82% rename from core/src/integration/kotlin/io/github/serpro69/kfaker/provider/FinanceIT.kt rename to faker/commerce/src/integration/kotlin/io/github/serpro69/kfaker/commerce/provider/FinanceIT.kt index d0a1f4461..844536f3b 100644 --- a/core/src/integration/kotlin/io/github/serpro69/kfaker/provider/FinanceIT.kt +++ b/faker/commerce/src/integration/kotlin/io/github/serpro69/kfaker/commerce/provider/FinanceIT.kt @@ -1,10 +1,8 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.commerce.provider -import io.github.serpro69.kfaker.faker +import io.github.serpro69.kfaker.commerce.faker import io.kotest.assertions.assertSoftly -import io.kotest.assertions.throwables.shouldNotThrow import io.kotest.core.spec.style.DescribeSpec -import io.kotest.matchers.shouldNotHave import io.kotest.matchers.string.shouldNotContain class FinanceIT : DescribeSpec({ diff --git a/faker/commerce/src/main/kotlin/io/github/serpro69/kfaker/commerce/CommerceFaker.kt b/faker/commerce/src/main/kotlin/io/github/serpro69/kfaker/commerce/CommerceFaker.kt new file mode 100644 index 000000000..fa9aa5472 --- /dev/null +++ b/faker/commerce/src/main/kotlin/io/github/serpro69/kfaker/commerce/CommerceFaker.kt @@ -0,0 +1,84 @@ +package io.github.serpro69.kfaker.commerce + +import io.github.serpro69.kfaker.AbstractFaker +import io.github.serpro69.kfaker.FakerConfig +import io.github.serpro69.kfaker.FakerDsl +import io.github.serpro69.kfaker.commerce.provider.Bank +import io.github.serpro69.kfaker.commerce.provider.Barcode +import io.github.serpro69.kfaker.commerce.provider.Beer +import io.github.serpro69.kfaker.commerce.provider.Business +import io.github.serpro69.kfaker.commerce.provider.Cannabis +import io.github.serpro69.kfaker.commerce.provider.Code +import io.github.serpro69.kfaker.commerce.provider.Coffee +import io.github.serpro69.kfaker.commerce.provider.Commerce +import io.github.serpro69.kfaker.commerce.provider.Company +import io.github.serpro69.kfaker.commerce.provider.Construction +import io.github.serpro69.kfaker.commerce.provider.Dessert +import io.github.serpro69.kfaker.commerce.provider.Finance +import io.github.serpro69.kfaker.commerce.provider.Food +import io.github.serpro69.kfaker.commerce.provider.House +import io.github.serpro69.kfaker.commerce.provider.IndustrySegments +import io.github.serpro69.kfaker.commerce.provider.Marketing +import io.github.serpro69.kfaker.commerce.provider.Restaurant +import io.github.serpro69.kfaker.commerce.provider.Stripe +import io.github.serpro69.kfaker.commerce.provider.Subscription +import io.github.serpro69.kfaker.commerce.provider.Tea +import io.github.serpro69.kfaker.fakerConfig + +/** + * Typealias for the [CommerceFaker] + */ +typealias Faker = CommerceFaker + +/** + * Provides access to fake data generators within the Commerce domain. + * + * Each category (generator) from this [CommerceFaker] is represented by a property + * that (usually) has the same name as the `.yml` dictionary file. + * + * @property unique global provider for generation of unique values. + */ +@Suppress("unused") +class CommerceFaker @JvmOverloads constructor(config: FakerConfig = fakerConfig { }) : AbstractFaker(config) { + + val bank: Bank by lazy { Bank(fakerService) } + val barcode: Barcode by lazy { Barcode(fakerService) } + val beer: Beer by lazy { Beer(fakerService) } + val business: Business by lazy { Business(fakerService) } + val cannabis: Cannabis by lazy { Cannabis(fakerService) } + val code: Code by lazy { Code(fakerService) } + val coffee: Coffee by lazy { Coffee(fakerService) } + val commerce: Commerce by lazy { Commerce(fakerService) } + val company: Company by lazy { Company(fakerService) } + val construction: Construction by lazy { Construction(fakerService) } + val dessert: Dessert by lazy { Dessert(fakerService) } + val finance: Finance by lazy { Finance(fakerService, randomService) } + val food: Food by lazy { Food(fakerService) } + val house: House by lazy { House(fakerService) } + val industrySegments: IndustrySegments by lazy { IndustrySegments(fakerService) } + // TODO not implemented + // val invoice: Invoice by lazy { Invoice(fakerService } + val marketing: Marketing by lazy { Marketing(fakerService) } + val restaurant: Restaurant by lazy { Restaurant(fakerService) } + val stripe: Stripe by lazy { Stripe(fakerService) } + val subscription: Subscription by lazy { Subscription(fakerService) } + val tea: Tea by lazy { Tea(fakerService) } + + @FakerDsl + /** + * DSL builder for creating instances of [Faker] + */ + class Builder internal constructor() : AbstractFaker.Builder() { + + /** + * Builds an instance of [Faker] with this [config]. + */ + override fun build(): Faker = Faker(config) + } +} + +/** + * Applies the [block] function to [CommerceFaker.Builder] + * and returns as an instance of [CommerceFaker] from that builder. + */ +fun faker(block: CommerceFaker.Builder.() -> Unit): CommerceFaker = CommerceFaker.Builder().apply(block).build() diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Bank.kt b/faker/commerce/src/main/kotlin/io/github/serpro69/kfaker/commerce/provider/Bank.kt similarity index 86% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/Bank.kt rename to faker/commerce/src/main/kotlin/io/github/serpro69/kfaker/commerce/provider/Bank.kt index 84465fe0c..bcda41aa5 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Bank.kt +++ b/faker/commerce/src/main/kotlin/io/github/serpro69/kfaker/commerce/provider/Bank.kt @@ -1,7 +1,9 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.commerce.provider import io.github.serpro69.kfaker.FakerService import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Barcode.kt b/faker/commerce/src/main/kotlin/io/github/serpro69/kfaker/commerce/provider/Barcode.kt similarity index 93% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/Barcode.kt rename to faker/commerce/src/main/kotlin/io/github/serpro69/kfaker/commerce/provider/Barcode.kt index 058f241f5..5321f39b0 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Barcode.kt +++ b/faker/commerce/src/main/kotlin/io/github/serpro69/kfaker/commerce/provider/Barcode.kt @@ -1,7 +1,8 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.commerce.provider import io.github.serpro69.kfaker.* import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.provider.* import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Beer.kt b/faker/commerce/src/main/kotlin/io/github/serpro69/kfaker/commerce/provider/Beer.kt similarity index 90% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/Beer.kt rename to faker/commerce/src/main/kotlin/io/github/serpro69/kfaker/commerce/provider/Beer.kt index ccfee090c..dd438511d 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Beer.kt +++ b/faker/commerce/src/main/kotlin/io/github/serpro69/kfaker/commerce/provider/Beer.kt @@ -1,7 +1,8 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.commerce.provider import io.github.serpro69.kfaker.* import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.provider.* import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Business.kt b/faker/commerce/src/main/kotlin/io/github/serpro69/kfaker/commerce/provider/Business.kt similarity index 89% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/Business.kt rename to faker/commerce/src/main/kotlin/io/github/serpro69/kfaker/commerce/provider/Business.kt index 95627912c..22fbfe294 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Business.kt +++ b/faker/commerce/src/main/kotlin/io/github/serpro69/kfaker/commerce/provider/Business.kt @@ -1,7 +1,8 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.commerce.provider import io.github.serpro69.kfaker.* import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.provider.* import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Cannabis.kt b/faker/commerce/src/main/kotlin/io/github/serpro69/kfaker/commerce/provider/Cannabis.kt similarity index 92% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/Cannabis.kt rename to faker/commerce/src/main/kotlin/io/github/serpro69/kfaker/commerce/provider/Cannabis.kt index 6dca4bf41..48fb08c26 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Cannabis.kt +++ b/faker/commerce/src/main/kotlin/io/github/serpro69/kfaker/commerce/provider/Cannabis.kt @@ -1,7 +1,8 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.commerce.provider import io.github.serpro69.kfaker.* import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.provider.* import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Code.kt b/faker/commerce/src/main/kotlin/io/github/serpro69/kfaker/commerce/provider/Code.kt similarity index 69% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/Code.kt rename to faker/commerce/src/main/kotlin/io/github/serpro69/kfaker/commerce/provider/Code.kt index 0894d9ee0..a37925340 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Code.kt +++ b/faker/commerce/src/main/kotlin/io/github/serpro69/kfaker/commerce/provider/Code.kt @@ -1,7 +1,9 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.commerce.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Coffee.kt b/faker/commerce/src/main/kotlin/io/github/serpro69/kfaker/commerce/provider/Coffee.kt similarity index 90% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/Coffee.kt rename to faker/commerce/src/main/kotlin/io/github/serpro69/kfaker/commerce/provider/Coffee.kt index 95f4d9f99..e6c56933b 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Coffee.kt +++ b/faker/commerce/src/main/kotlin/io/github/serpro69/kfaker/commerce/provider/Coffee.kt @@ -1,7 +1,8 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.commerce.provider import io.github.serpro69.kfaker.* import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.provider.* import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Commerce.kt b/faker/commerce/src/main/kotlin/io/github/serpro69/kfaker/commerce/provider/Commerce.kt similarity index 93% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/Commerce.kt rename to faker/commerce/src/main/kotlin/io/github/serpro69/kfaker/commerce/provider/Commerce.kt index 7cb9ad5ab..c2c8e9567 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Commerce.kt +++ b/faker/commerce/src/main/kotlin/io/github/serpro69/kfaker/commerce/provider/Commerce.kt @@ -1,7 +1,8 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.commerce.provider import io.github.serpro69.kfaker.* import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.provider.* import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Company.kt b/faker/commerce/src/main/kotlin/io/github/serpro69/kfaker/commerce/provider/Company.kt similarity index 91% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/Company.kt rename to faker/commerce/src/main/kotlin/io/github/serpro69/kfaker/commerce/provider/Company.kt index bce80a8c0..02517dc6c 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Company.kt +++ b/faker/commerce/src/main/kotlin/io/github/serpro69/kfaker/commerce/provider/Company.kt @@ -1,7 +1,8 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.commerce.provider import io.github.serpro69.kfaker.* import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.provider.* import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Construction.kt b/faker/commerce/src/main/kotlin/io/github/serpro69/kfaker/commerce/provider/Construction.kt similarity index 88% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/Construction.kt rename to faker/commerce/src/main/kotlin/io/github/serpro69/kfaker/commerce/provider/Construction.kt index 2436d921c..e4e473c97 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Construction.kt +++ b/faker/commerce/src/main/kotlin/io/github/serpro69/kfaker/commerce/provider/Construction.kt @@ -1,7 +1,8 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.commerce.provider import io.github.serpro69.kfaker.* import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.provider.* import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Dessert.kt b/faker/commerce/src/main/kotlin/io/github/serpro69/kfaker/commerce/provider/Dessert.kt similarity index 74% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/Dessert.kt rename to faker/commerce/src/main/kotlin/io/github/serpro69/kfaker/commerce/provider/Dessert.kt index 9f0ecbaa8..086f63aea 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Dessert.kt +++ b/faker/commerce/src/main/kotlin/io/github/serpro69/kfaker/commerce/provider/Dessert.kt @@ -1,7 +1,9 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.commerce.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Finance.kt b/faker/commerce/src/main/kotlin/io/github/serpro69/kfaker/commerce/provider/Finance.kt similarity index 74% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/Finance.kt rename to faker/commerce/src/main/kotlin/io/github/serpro69/kfaker/commerce/provider/Finance.kt index 1e59bd6c5..99ef04641 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Finance.kt +++ b/faker/commerce/src/main/kotlin/io/github/serpro69/kfaker/commerce/provider/Finance.kt @@ -1,7 +1,9 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.commerce.provider import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.RandomService import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.* import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate @@ -9,7 +11,10 @@ import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate * [FakeDataProvider] implementation for [YamlCategory.FINANCE] category. */ @Suppress("unused") -class Finance internal constructor(fakerService: FakerService) : YamlFakeDataProvider(fakerService) { +class Finance internal constructor( + fakerService: FakerService, + private val randomService: RandomService +) : YamlFakeDataProvider(fakerService) { override val yamlCategory = YamlCategory.FINANCE override val localUniqueDataProvider = LocalUniqueDataProvider() override val unique by UniqueProviderDelegate(localUniqueDataProvider) @@ -21,7 +26,7 @@ class Finance internal constructor(fakerService: FakerService) : YamlFakeDataPro fun creditCard(type: String): String = with(fakerService) { resolve("credit_card", type).numerify().generexify() } fun condominiumFiscalCode(): String = with(fakerService) { resolve("condominium_fiscal_code", "IT").numerify() } fun vatNumber(countryCode: String): String = with(fakerService) { resolve("vat_number", countryCode).numerify() } - fun ticker(stockExchange: StockExchange = fakerService.randomService.nextEnum()): String = + fun ticker(stockExchange: StockExchange = randomService.nextEnum()): String = resolve("ticker", stockExchange.name.lowercase()) fun stockMarket(): String = resolve("stock_market") diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Food.kt b/faker/commerce/src/main/kotlin/io/github/serpro69/kfaker/commerce/provider/Food.kt similarity index 92% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/Food.kt rename to faker/commerce/src/main/kotlin/io/github/serpro69/kfaker/commerce/provider/Food.kt index 11257a428..82cd9d294 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Food.kt +++ b/faker/commerce/src/main/kotlin/io/github/serpro69/kfaker/commerce/provider/Food.kt @@ -1,7 +1,8 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.commerce.provider import io.github.serpro69.kfaker.* import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.provider.* import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/House.kt b/faker/commerce/src/main/kotlin/io/github/serpro69/kfaker/commerce/provider/House.kt similarity index 71% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/House.kt rename to faker/commerce/src/main/kotlin/io/github/serpro69/kfaker/commerce/provider/House.kt index 0780de8cf..eeefbeba4 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/House.kt +++ b/faker/commerce/src/main/kotlin/io/github/serpro69/kfaker/commerce/provider/House.kt @@ -1,7 +1,9 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.commerce.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/IndustrySegments.kt b/faker/commerce/src/main/kotlin/io/github/serpro69/kfaker/commerce/provider/IndustrySegments.kt similarity index 90% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/IndustrySegments.kt rename to faker/commerce/src/main/kotlin/io/github/serpro69/kfaker/commerce/provider/IndustrySegments.kt index 478bfc4eb..de0d7f00d 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/IndustrySegments.kt +++ b/faker/commerce/src/main/kotlin/io/github/serpro69/kfaker/commerce/provider/IndustrySegments.kt @@ -1,7 +1,8 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.commerce.provider import io.github.serpro69.kfaker.* import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.provider.* import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Invoice.kt b/faker/commerce/src/main/kotlin/io/github/serpro69/kfaker/commerce/provider/Invoice.kt similarity index 91% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/Invoice.kt rename to faker/commerce/src/main/kotlin/io/github/serpro69/kfaker/commerce/provider/Invoice.kt index 2a8e8a741..6650a5de7 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Invoice.kt +++ b/faker/commerce/src/main/kotlin/io/github/serpro69/kfaker/commerce/provider/Invoice.kt @@ -1,7 +1,8 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.commerce.provider import io.github.serpro69.kfaker.* import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.provider.* import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Marketing.kt b/faker/commerce/src/main/kotlin/io/github/serpro69/kfaker/commerce/provider/Marketing.kt similarity index 88% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/Marketing.kt rename to faker/commerce/src/main/kotlin/io/github/serpro69/kfaker/commerce/provider/Marketing.kt index 837fd54dc..40e63b179 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Marketing.kt +++ b/faker/commerce/src/main/kotlin/io/github/serpro69/kfaker/commerce/provider/Marketing.kt @@ -1,7 +1,8 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.commerce.provider import io.github.serpro69.kfaker.* import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.provider.* import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Restaurant.kt b/faker/commerce/src/main/kotlin/io/github/serpro69/kfaker/commerce/provider/Restaurant.kt similarity index 90% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/Restaurant.kt rename to faker/commerce/src/main/kotlin/io/github/serpro69/kfaker/commerce/provider/Restaurant.kt index c142d0648..8e9ece270 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Restaurant.kt +++ b/faker/commerce/src/main/kotlin/io/github/serpro69/kfaker/commerce/provider/Restaurant.kt @@ -1,7 +1,8 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.commerce.provider import io.github.serpro69.kfaker.* import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.provider.* import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Stripe.kt b/faker/commerce/src/main/kotlin/io/github/serpro69/kfaker/commerce/provider/Stripe.kt similarity index 74% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/Stripe.kt rename to faker/commerce/src/main/kotlin/io/github/serpro69/kfaker/commerce/provider/Stripe.kt index 5e9b5a863..84d1aac92 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Stripe.kt +++ b/faker/commerce/src/main/kotlin/io/github/serpro69/kfaker/commerce/provider/Stripe.kt @@ -1,7 +1,9 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.commerce.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Subscription.kt b/faker/commerce/src/main/kotlin/io/github/serpro69/kfaker/commerce/provider/Subscription.kt similarity index 91% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/Subscription.kt rename to faker/commerce/src/main/kotlin/io/github/serpro69/kfaker/commerce/provider/Subscription.kt index 2d69941b6..10266e4e8 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Subscription.kt +++ b/faker/commerce/src/main/kotlin/io/github/serpro69/kfaker/commerce/provider/Subscription.kt @@ -1,7 +1,8 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.commerce.provider import io.github.serpro69.kfaker.* import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.provider.* import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Tea.kt b/faker/commerce/src/main/kotlin/io/github/serpro69/kfaker/commerce/provider/Tea.kt similarity index 93% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/Tea.kt rename to faker/commerce/src/main/kotlin/io/github/serpro69/kfaker/commerce/provider/Tea.kt index 59cca5218..72270638d 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Tea.kt +++ b/faker/commerce/src/main/kotlin/io/github/serpro69/kfaker/commerce/provider/Tea.kt @@ -1,9 +1,10 @@ @file:Suppress("unused") -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.commerce.provider import io.github.serpro69.kfaker.* import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.provider.* import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/faker/creatures/README.md b/faker/creatures/README.md new file mode 100644 index 000000000..c74750cc6 --- /dev/null +++ b/faker/creatures/README.md @@ -0,0 +1,54 @@ +## `CreaturesFaker` + +[![Maven Central](https://img.shields.io/maven-central/v/io.github.serpro69/kotlin-faker-creatures?style=for-the-badge)](https://search.maven.org/artifact/io.github.serpro69/kotlin-faker-creatures) +[![Sonatype Nexus (Snapshots)](https://img.shields.io/nexus/s/io.github.serpro69/kotlin-faker-creatures?label=snapshot-version&server=https%3A%2F%2Foss.sonatype.org&style=for-the-badge&color=yellow)](#downloading) + +Provides access to fake data generators within the Creatures domain. + +## Usage + +Documentation for kotlin-faker is available at [serpro69.github.io/kotlin-faker/](https://serpro69.github.io/kotlin-faker/). + +### Downloading + +Latest releases are always available on maven central. + +**With gradle** + +```groovy +dependencies { + implementation 'io.github.serpro69:kotlin-faker:$version' + implementation 'io.github.serpro69:kotlin-faker-creatures:$version' +} +``` + +**With maven** + +```xml + + + io.github.serpro69 + kotlin-faker + ${version} + + + io.github.serpro69 + kotlin-faker-creatures + ${version} + + +``` + +_NB! An additional fake data provider like 'creatures' requires the main `kotlin-faker` dependency to be on the classpath._ + +### Generating data + +```kotlin +// NB! the package you import if using multiple fakers +import io.github.serpro69.kfaker.creatures.faker + +val faker = faker { } + +faker.dog.name() +faker.horse.breed() +``` diff --git a/faker/creatures/build.gradle.kts b/faker/creatures/build.gradle.kts new file mode 100644 index 000000000..55f6540f8 --- /dev/null +++ b/faker/creatures/build.gradle.kts @@ -0,0 +1,4 @@ +plugins { + `faker-lib-conventions` + `faker-provider-conventions` +} diff --git a/faker/creatures/src/integration/kotlin/io/github/serpro69/kfaker/creatures/CreatureFakerIT.kt b/faker/creatures/src/integration/kotlin/io/github/serpro69/kfaker/creatures/CreatureFakerIT.kt new file mode 100644 index 000000000..33211fb90 --- /dev/null +++ b/faker/creatures/src/integration/kotlin/io/github/serpro69/kfaker/creatures/CreatureFakerIT.kt @@ -0,0 +1,11 @@ +package io.github.serpro69.kfaker.creatures + +import io.github.serpro69.kfaker.test.helper.`every public function in each provider is invoked without exceptions` +import io.github.serpro69.kfaker.test.helper.`faker instance is initialized with custom locale` +import io.kotest.core.spec.style.DescribeSpec + +class CreatureFakerIT : DescribeSpec({ + `every public function in each provider is invoked without exceptions`(CreaturesFaker()) + + `faker instance is initialized with custom locale` { faker { } } +}) diff --git a/faker/creatures/src/main/kotlin/io/github/serpro69/kfaker/creatures/CreaturesFaker.kt b/faker/creatures/src/main/kotlin/io/github/serpro69/kfaker/creatures/CreaturesFaker.kt new file mode 100644 index 000000000..6ef5a5d9d --- /dev/null +++ b/faker/creatures/src/main/kotlin/io/github/serpro69/kfaker/creatures/CreaturesFaker.kt @@ -0,0 +1,54 @@ +package io.github.serpro69.kfaker.creatures + +import io.github.serpro69.kfaker.AbstractFaker +import io.github.serpro69.kfaker.FakerConfig +import io.github.serpro69.kfaker.FakerDsl +import io.github.serpro69.kfaker.creatures.provider.Ancient +import io.github.serpro69.kfaker.creatures.provider.Animal +import io.github.serpro69.kfaker.creatures.provider.Bird +import io.github.serpro69.kfaker.creatures.provider.Cat +import io.github.serpro69.kfaker.creatures.provider.Dog +import io.github.serpro69.kfaker.creatures.provider.Horse +import io.github.serpro69.kfaker.fakerConfig + +/** + * Typealias for the [CreaturesFaker] + */ +typealias Faker = CreaturesFaker + +/** + * Provides access to fake data generators within the Creature domain. + * + * Each category (generator) from this [CreaturesFaker] is represented by a property + * that (usually) has the same name as the `.yml` dictionary file. + * + * @property unique global provider for generation of unique values. + */ +@Suppress("unused") +class CreaturesFaker @JvmOverloads constructor(config: FakerConfig = fakerConfig { }) : AbstractFaker(config) { + + val ancient: Ancient by lazy { Ancient(fakerService) } + val animal: Animal by lazy { Animal(fakerService) } + val bird: Bird by lazy { Bird(fakerService) } + val cat: Cat by lazy { Cat(fakerService) } + val dog: Dog by lazy { Dog(fakerService) } + val horse: Horse by lazy { Horse(fakerService) } + + @FakerDsl + /** + * DSL builder for creating instances of [Faker] + */ + class Builder internal constructor() : AbstractFaker.Builder() { + + /** + * Builds an instance of [Faker] with this [config]. + */ + override fun build(): Faker = Faker(config) + } +} + +/** + * Applies the [block] function to [CreaturesFaker.Builder] + * and returns as an instance of [CreaturesFaker] from that builder. + */ +fun faker(block: CreaturesFaker.Builder.() -> Unit): CreaturesFaker = CreaturesFaker.Builder().apply(block).build() diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Ancient.kt b/faker/creatures/src/main/kotlin/io/github/serpro69/kfaker/creatures/provider/Ancient.kt similarity index 73% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/Ancient.kt rename to faker/creatures/src/main/kotlin/io/github/serpro69/kfaker/creatures/provider/Ancient.kt index ab03fc67e..05f862b09 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Ancient.kt +++ b/faker/creatures/src/main/kotlin/io/github/serpro69/kfaker/creatures/provider/Ancient.kt @@ -1,7 +1,9 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.creatures.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Animal.kt b/faker/creatures/src/main/kotlin/io/github/serpro69/kfaker/creatures/provider/Animal.kt similarity index 65% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/Animal.kt rename to faker/creatures/src/main/kotlin/io/github/serpro69/kfaker/creatures/provider/Animal.kt index 01073f7d4..65ac01d60 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Animal.kt +++ b/faker/creatures/src/main/kotlin/io/github/serpro69/kfaker/creatures/provider/Animal.kt @@ -1,7 +1,10 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.creatures.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.Category +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate @@ -19,5 +22,5 @@ class Animal internal constructor(fakerService: FakerService) : YamlFakeDataProv fakerService.load(yamlCategory, secondaryCategory) } - fun name() = resolve("animal", "name") + fun name() = resolve(secondaryCategory, "name") } diff --git a/faker/creatures/src/main/kotlin/io/github/serpro69/kfaker/creatures/provider/Bird.kt b/faker/creatures/src/main/kotlin/io/github/serpro69/kfaker/creatures/provider/Bird.kt new file mode 100644 index 000000000..bb671167c --- /dev/null +++ b/faker/creatures/src/main/kotlin/io/github/serpro69/kfaker/creatures/provider/Bird.kt @@ -0,0 +1,88 @@ +@file:Suppress("unused") + +package io.github.serpro69.kfaker.creatures.provider + +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.Category +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider +import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider +import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate + +/** + * [FakeDataProvider] implementation for [YamlCategory.CREATURE] category. + */ +class Bird internal constructor(fakerService: FakerService) : YamlFakeDataProvider(fakerService) { + override val yamlCategory = YamlCategory.CREATURE + override val secondaryCategory: Category = Category.ofName("BIRD") + override val localUniqueDataProvider = LocalUniqueDataProvider() + override val unique by UniqueProviderDelegate(localUniqueDataProvider) + + init { + fakerService.load(yamlCategory, secondaryCategory) + } + + val orderCommonMap by lazy { BirdOrderCommonMap(fakerService, secondaryCategory) } + + fun anatomy(): String = resolve(secondaryCategory, "anatomy") + fun anatomyPastTense(): String = resolve(secondaryCategory, "anatomy_past_tense") + fun geo(): String = resolve(secondaryCategory, "geo") + fun colors(): String = resolve(secondaryCategory, "colors") + fun emotionalAdjectives(): String = resolve(secondaryCategory, "emotional_adjectives") + fun sillyAdjectives(): String = resolve(secondaryCategory, "silly_adjectives") + fun adjectives(): String = resolve(secondaryCategory, "adjectives") + fun plausibleCommonNames(): String = resolve(secondaryCategory, "plausible_common_names") + fun implausibleCommonNames(): String = resolve(secondaryCategory, "implausible_common_names") + fun commonFamilyName(): String = resolve(secondaryCategory, "common_family_name") +} + +class BirdOrderCommonMap internal constructor( + fakerService: FakerService, + override val secondaryCategory: Category, +) : YamlFakeDataProvider(fakerService) { + override val yamlCategory = YamlCategory.CREATURE + override val localUniqueDataProvider = LocalUniqueDataProvider() + override val unique by UniqueProviderDelegate(localUniqueDataProvider) + + fun accipitriformes(): String = resolve(secondaryCategory, "order_common_map", "Accipitriformes") + fun anseriformes(): String = resolve(secondaryCategory, "order_common_map", "Anseriformes") + fun apterygiformes(): String = resolve(secondaryCategory, "order_common_map", "Apterygiformes") + fun bucerotiformes(): String = resolve(secondaryCategory, "order_common_map", "Bucerotiformes") + fun caprimulgiformes(): String = resolve(secondaryCategory, "order_common_map", "Caprimulgiformes") + fun cariamiformes(): String = resolve(secondaryCategory, "order_common_map", "Cariamiformes") + fun casuariiformes(): String = resolve(secondaryCategory, "order_common_map", "Casuariiformes") + fun cathartiformes(): String = resolve(secondaryCategory, "order_common_map", "Cathartiformes") + fun charadriiformes(): String = resolve(secondaryCategory, "order_common_map", "Charadriiformes") + fun ciconiiformes(): String = resolve(secondaryCategory, "order_common_map", "Ciconiiformes") + fun coliiformes(): String = resolve(secondaryCategory, "order_common_map", "Coliiformes") + fun columbiformes(): String = resolve(secondaryCategory, "order_common_map", "Columbiformes") + fun coraciiformes(): String = resolve(secondaryCategory, "order_common_map", "Coraciiformes") + fun cuculiformes(): String = resolve(secondaryCategory, "order_common_map", "Cuculiformes") + fun eurypygiformes(): String = resolve(secondaryCategory, "order_common_map", "Eurypygiformes") + fun falconiformes(): String = resolve(secondaryCategory, "order_common_map", "Falconiformes") + fun galbuliformes(): String = resolve(secondaryCategory, "order_common_map", "Galbuliformes") + fun galliformes(): String = resolve(secondaryCategory, "order_common_map", "Galliformes") + fun gaviiformes(): String = resolve(secondaryCategory, "order_common_map", "Gaviiformes") + fun gruiformes(): String = resolve(secondaryCategory, "order_common_map", "Gruiformes") + fun mesitornithiformes(): String = resolve(secondaryCategory, "order_common_map", "Mesitornithiformes") + fun musophagiformes(): String = resolve(secondaryCategory, "order_common_map", "Musophagiformes") + fun opisthocomiformes(): String = resolve(secondaryCategory, "order_common_map", "Opisthocomiformes") + fun otidiformes(): String = resolve(secondaryCategory, "order_common_map", "Otidiformes") + fun passeriformes(): String = resolve(secondaryCategory, "order_common_map", "Passeriformes") + fun pelecaniformes(): String = resolve(secondaryCategory, "order_common_map", "Pelecaniformes") + fun phaethontiformes(): String = resolve(secondaryCategory, "order_common_map", "Phaethontiformes") + fun phoenicopteriformes(): String = resolve(secondaryCategory, "order_common_map", "Phoenicopteriformes") + fun piciformes(): String = resolve(secondaryCategory, "order_common_map", "Piciformes") + fun podicipediformes(): String = resolve(secondaryCategory, "order_common_map", "Podicipediformes") + fun procellariiformes(): String = resolve(secondaryCategory, "order_common_map", "Procellariiformes") + fun psittaciformes(): String = resolve(secondaryCategory, "order_common_map", "Psittaciformes") + fun pterocliformes(): String = resolve(secondaryCategory, "order_common_map", "Pterocliformes") + fun rheiformes(): String = resolve(secondaryCategory, "order_common_map", "Rheiformes") + fun sphenisciformes(): String = resolve(secondaryCategory, "order_common_map", "Sphenisciformes") + fun strigiformes(): String = resolve(secondaryCategory, "order_common_map", "Strigiformes") + fun struthioniformes(): String = resolve(secondaryCategory, "order_common_map", "Struthioniformes") + fun suliformes(): String = resolve(secondaryCategory, "order_common_map", "Suliformes") + fun tinamiformes(): String = resolve(secondaryCategory, "order_common_map", "Tinamiformes") + fun trogoniformes(): String = resolve(secondaryCategory, "order_common_map", "Trogoniformes") +} diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Cat.kt b/faker/creatures/src/main/kotlin/io/github/serpro69/kfaker/creatures/provider/Cat.kt similarity index 58% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/Cat.kt rename to faker/creatures/src/main/kotlin/io/github/serpro69/kfaker/creatures/provider/Cat.kt index 6229440e9..48ebc4845 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Cat.kt +++ b/faker/creatures/src/main/kotlin/io/github/serpro69/kfaker/creatures/provider/Cat.kt @@ -1,7 +1,10 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.creatures.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.Category +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate @@ -19,7 +22,7 @@ class Cat internal constructor(fakerService: FakerService) : YamlFakeDataProvide fakerService.load(yamlCategory, secondaryCategory) } - fun name() = resolve("cat", "name") - fun breed() = resolve("cat", "breed") - fun registry() = resolve("cat", "registry") + fun name() = resolve(secondaryCategory, "name") + fun breed() = resolve(secondaryCategory, "breed") + fun registry() = resolve(secondaryCategory, "registry") } diff --git a/faker/creatures/src/main/kotlin/io/github/serpro69/kfaker/creatures/provider/Dog.kt b/faker/creatures/src/main/kotlin/io/github/serpro69/kfaker/creatures/provider/Dog.kt new file mode 100644 index 000000000..5b52f58fb --- /dev/null +++ b/faker/creatures/src/main/kotlin/io/github/serpro69/kfaker/creatures/provider/Dog.kt @@ -0,0 +1,32 @@ +package io.github.serpro69.kfaker.creatures.provider + +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.Category +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider +import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider +import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate + +/** + * [FakeDataProvider] implementation for [YamlCategory.CREATURE] category. + */ +@Suppress("unused") +class Dog internal constructor(fakerService: FakerService) : YamlFakeDataProvider(fakerService) { + override val yamlCategory = YamlCategory.CREATURE + override val secondaryCategory: Category = Category.ofName("DOG") + override val localUniqueDataProvider = LocalUniqueDataProvider() + override val unique by UniqueProviderDelegate(localUniqueDataProvider) + + init { + fakerService.load(yamlCategory, secondaryCategory) + } + + fun name() = resolve(secondaryCategory, "name") + fun breed() = resolve(secondaryCategory, "breed") + fun sound() = resolve(secondaryCategory, "sound") + fun memePhrase() = resolve(secondaryCategory, "meme_phrase") + fun age() = resolve(secondaryCategory, "age") + fun coatLength() = resolve(secondaryCategory, "coat_length") + fun size() = resolve(secondaryCategory, "size") +} diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Horse.kt b/faker/creatures/src/main/kotlin/io/github/serpro69/kfaker/creatures/provider/Horse.kt similarity index 62% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/Horse.kt rename to faker/creatures/src/main/kotlin/io/github/serpro69/kfaker/creatures/provider/Horse.kt index d788bc892..e83f7566f 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Horse.kt +++ b/faker/creatures/src/main/kotlin/io/github/serpro69/kfaker/creatures/provider/Horse.kt @@ -1,7 +1,10 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.creatures.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.Category +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate @@ -19,6 +22,6 @@ class Horse internal constructor(fakerService: FakerService) : YamlFakeDataProvi fakerService.load(yamlCategory, secondaryCategory) } - fun name() = resolve("horse", "name") - fun breed() = resolve("horse", "breed") + fun name() = resolve(secondaryCategory, "name") + fun breed() = resolve(secondaryCategory, "breed") } diff --git a/faker/edu/README.md b/faker/edu/README.md new file mode 100644 index 000000000..27b474afd --- /dev/null +++ b/faker/edu/README.md @@ -0,0 +1,54 @@ +## `EduFaker` + +[![Maven Central](https://img.shields.io/maven-central/v/io.github.serpro69/kotlin-faker-edu?style=for-the-badge)](https://search.maven.org/artifact/io.github.serpro69/kotlin-faker-edu) +[![Sonatype Nexus (Snapshots)](https://img.shields.io/nexus/s/io.github.serpro69/kotlin-faker-edu?label=snapshot-version&server=https%3A%2F%2Foss.sonatype.org&style=for-the-badge&color=yellow)](#downloading) + +Provides access to fake data generators within the Education domain. + +## Usage + +Documentation for kotlin-faker is available at [serpro69.github.io/kotlin-faker/](https://serpro69.github.io/kotlin-faker/). + +### Downloading + +Latest releases are always available on maven central. + +**With gradle** + +```groovy +dependencies { + implementation 'io.github.serpro69:kotlin-faker:$version' + implementation 'io.github.serpro69:kotlin-faker-edu:$version' +} +``` + +**With maven** + +```xml + + + io.github.serpro69 + kotlin-faker + ${version} + + + io.github.serpro69 + kotlin-faker-edu + ${version} + + +``` + +_NB! An additional fake data provider like 'edu' requires the main `kotlin-faker` dependency to be on the classpath._ + +### Generating data + +```kotlin +// NB! the package you import if using multiple fakers +import io.github.serpro69.kfaker.edu.faker + +val faker = faker { } + +faker.educator.schoolName() +faker.science.element() +``` diff --git a/faker/edu/build.gradle.kts b/faker/edu/build.gradle.kts new file mode 100644 index 000000000..55f6540f8 --- /dev/null +++ b/faker/edu/build.gradle.kts @@ -0,0 +1,4 @@ +plugins { + `faker-lib-conventions` + `faker-provider-conventions` +} diff --git a/faker/edu/src/integration/kotlin/io/github/serpro69/kfaker/edu/EduFakerIT.kt b/faker/edu/src/integration/kotlin/io/github/serpro69/kfaker/edu/EduFakerIT.kt new file mode 100644 index 000000000..5ca7e0f62 --- /dev/null +++ b/faker/edu/src/integration/kotlin/io/github/serpro69/kfaker/edu/EduFakerIT.kt @@ -0,0 +1,11 @@ +package io.github.serpro69.kfaker.edu + +import io.github.serpro69.kfaker.test.helper.`every public function in each provider is invoked without exceptions` +import io.github.serpro69.kfaker.test.helper.`faker instance is initialized with custom locale` +import io.kotest.core.spec.style.DescribeSpec + +class EduFakerIT : DescribeSpec({ + `every public function in each provider is invoked without exceptions`(EduFaker()) + + `faker instance is initialized with custom locale` { faker { } } +}) diff --git a/faker/edu/src/main/kotlin/io/github/serpro69/kfaker/edu/EduFaker.kt b/faker/edu/src/main/kotlin/io/github/serpro69/kfaker/edu/EduFaker.kt new file mode 100644 index 000000000..1a5704aa1 --- /dev/null +++ b/faker/edu/src/main/kotlin/io/github/serpro69/kfaker/edu/EduFaker.kt @@ -0,0 +1,50 @@ +package io.github.serpro69.kfaker.edu + +import io.github.serpro69.kfaker.AbstractFaker +import io.github.serpro69.kfaker.FakerConfig +import io.github.serpro69.kfaker.FakerDsl +import io.github.serpro69.kfaker.edu.provider.Educator +import io.github.serpro69.kfaker.edu.provider.Job +import io.github.serpro69.kfaker.edu.provider.Science +import io.github.serpro69.kfaker.edu.provider.University +import io.github.serpro69.kfaker.fakerConfig + +/** + * Typealias for the [EduFaker] + */ +typealias Faker = EduFaker + +/** + * Provides access to fake data generators within the Education domain. + * + * Each category (generator) from this [EduFaker] is represented by a property + * that (usually) has the same name as the `.yml` dictionary file. + * + * @property unique global provider for generation of unique values. + */ +@Suppress("unused") +class EduFaker @JvmOverloads constructor(config: FakerConfig = fakerConfig { }) : AbstractFaker(config) { + + val job: Job by lazy { Job(fakerService) } + val educator: Educator by lazy { Educator(fakerService) } + val science: Science by lazy { Science(fakerService) } + val university: University by lazy { University(fakerService) } + + @FakerDsl + /** + * DSL builder for creating instances of [Faker] + */ + class Builder internal constructor() : AbstractFaker.Builder() { + + /** + * Builds an instance of [Faker] with this [config]. + */ + override fun build(): Faker = Faker(config) + } +} + +/** + * Applies the [block] function to [EduFaker.Builder] + * and returns as an instance of [EduFaker] from that builder. + */ +fun faker(block: EduFaker.Builder.() -> Unit): EduFaker = EduFaker.Builder().apply(block).build() diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Educator.kt b/faker/edu/src/main/kotlin/io/github/serpro69/kfaker/edu/provider/Educator.kt similarity index 90% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/Educator.kt rename to faker/edu/src/main/kotlin/io/github/serpro69/kfaker/edu/provider/Educator.kt index f9da1c55b..5ff788ed1 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Educator.kt +++ b/faker/edu/src/main/kotlin/io/github/serpro69/kfaker/edu/provider/Educator.kt @@ -1,7 +1,9 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.edu.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Job.kt b/faker/edu/src/main/kotlin/io/github/serpro69/kfaker/edu/provider/Job.kt similarity index 77% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/Job.kt rename to faker/edu/src/main/kotlin/io/github/serpro69/kfaker/edu/provider/Job.kt index 04af51e83..34eef7ef7 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Job.kt +++ b/faker/edu/src/main/kotlin/io/github/serpro69/kfaker/edu/provider/Job.kt @@ -1,7 +1,9 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.edu.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Science.kt b/faker/edu/src/main/kotlin/io/github/serpro69/kfaker/edu/provider/Science.kt similarity index 87% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/Science.kt rename to faker/edu/src/main/kotlin/io/github/serpro69/kfaker/edu/provider/Science.kt index 5c4f62543..95939232e 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Science.kt +++ b/faker/edu/src/main/kotlin/io/github/serpro69/kfaker/edu/provider/Science.kt @@ -1,7 +1,9 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.edu.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/University.kt b/faker/edu/src/main/kotlin/io/github/serpro69/kfaker/edu/provider/University.kt similarity index 75% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/University.kt rename to faker/edu/src/main/kotlin/io/github/serpro69/kfaker/edu/provider/University.kt index 3833f0773..75def938e 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/University.kt +++ b/faker/edu/src/main/kotlin/io/github/serpro69/kfaker/edu/provider/University.kt @@ -1,7 +1,9 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.edu.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/faker/edu/src/test/kotlin/io/github/serpro69/kfaker/edu/FakerServiceTest.kt b/faker/edu/src/test/kotlin/io/github/serpro69/kfaker/edu/FakerServiceTest.kt new file mode 100644 index 000000000..cf3af1b82 --- /dev/null +++ b/faker/edu/src/test/kotlin/io/github/serpro69/kfaker/edu/FakerServiceTest.kt @@ -0,0 +1,47 @@ +package io.github.serpro69.kfaker.edu + +import io.github.serpro69.kfaker.AbstractFaker +import io.github.serpro69.kfaker.FakerConfig +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory.EDUCATOR +import io.github.serpro69.kfaker.edu.provider.Educator +import io.github.serpro69.kfaker.fakerConfig +import io.kotest.core.spec.style.DescribeSpec +import io.kotest.matchers.collections.shouldBeIn + +internal class FakerServiceTest : DescribeSpec({ + + describe("dictionary is loaded") { + context("resolving raw expression") { + context("expression matches the curly-brace-regex") { + context("expression calls are chained with a dot '.' char") { + val degreeType = fakerService().resolve(EDUCATOR, "degree") + + it("is resolved by functionName") { + degreeType.split(" ").take(2).joinToString(" ") shouldBeIn listOf( + "Associate Degree", + "Bachelor of", + "Master of", + ) + } + } + } + } + } + +}) + +private fun fakerService(): FakerService { + val f = TestFaker() + return f.service +} + +@Suppress("unused") +class TestFaker @JvmOverloads constructor(config: FakerConfig = fakerConfig { }) : AbstractFaker(config) { + + // expose FakerService for tests + val service = fakerService + + // don't lazy-init so we always have the dictionary loaded + val educator: Educator = Educator(service) +} diff --git a/faker/games/README.md b/faker/games/README.md new file mode 100644 index 000000000..2461006ec --- /dev/null +++ b/faker/games/README.md @@ -0,0 +1,54 @@ +## `GamesFaker` + +[![Maven Central](https://img.shields.io/maven-central/v/io.github.serpro69/kotlin-faker-games?style=for-the-badge)](https://search.maven.org/artifact/io.github.serpro69/kotlin-faker-games) +[![Sonatype Nexus (Snapshots)](https://img.shields.io/nexus/s/io.github.serpro69/kotlin-faker-games?label=snapshot-version&server=https%3A%2F%2Foss.sonatype.org&style=for-the-badge&color=yellow)](#downloading) + +Provides access to fake data generators within the Games domain. + +## Usage + +Documentation for kotlin-faker is available at [serpro69.github.io/kotlin-faker/](https://serpro69.github.io/kotlin-faker/). + +### Downloading + +Latest releases are always available on maven central. + +**With gradle** + +```groovy +dependencies { + implementation 'io.github.serpro69:kotlin-faker:$version' + implementation 'io.github.serpro69:kotlin-faker-games:$version' +} +``` + +**With maven** + +```xml + + + io.github.serpro69 + kotlin-faker + ${version} + + + io.github.serpro69 + kotlin-faker-games + ${version} + + +``` + +_NB! An additional fake data provider like 'games' requires the main `kotlin-faker` dependency to be on the classpath._ + +### Generating data + +```kotlin +// NB! the package you import if using multiple fakers +import io.github.serpro69.kfaker.games.faker + +val faker = faker { } + +faker.coin.flip() +faker.dnd.alignments() +``` diff --git a/faker/games/build.gradle.kts b/faker/games/build.gradle.kts new file mode 100644 index 000000000..55f6540f8 --- /dev/null +++ b/faker/games/build.gradle.kts @@ -0,0 +1,4 @@ +plugins { + `faker-lib-conventions` + `faker-provider-conventions` +} diff --git a/faker/games/src/integration/kotlin/io/github/serpro69/kfaker/games/GamesFakerIT.kt b/faker/games/src/integration/kotlin/io/github/serpro69/kfaker/games/GamesFakerIT.kt new file mode 100644 index 000000000..2e1e8c610 --- /dev/null +++ b/faker/games/src/integration/kotlin/io/github/serpro69/kfaker/games/GamesFakerIT.kt @@ -0,0 +1,11 @@ +package io.github.serpro69.kfaker.games + +import io.github.serpro69.kfaker.test.helper.`every public function in each provider is invoked without exceptions` +import io.github.serpro69.kfaker.test.helper.`faker instance is initialized with custom locale` +import io.kotest.core.spec.style.DescribeSpec + +class GamesFakerIT : DescribeSpec({ + `every public function in each provider is invoked without exceptions`(GamesFaker()) + + `faker instance is initialized with custom locale` { faker { } } +}) diff --git a/faker/games/src/main/kotlin/io/github/serpro69/kfaker/games/GamesFaker.kt b/faker/games/src/main/kotlin/io/github/serpro69/kfaker/games/GamesFaker.kt new file mode 100644 index 000000000..e0ca8b492 --- /dev/null +++ b/faker/games/src/main/kotlin/io/github/serpro69/kfaker/games/GamesFaker.kt @@ -0,0 +1,98 @@ +package io.github.serpro69.kfaker.games + +import io.github.serpro69.kfaker.AbstractFaker +import io.github.serpro69.kfaker.FakerConfig +import io.github.serpro69.kfaker.FakerDsl +import io.github.serpro69.kfaker.fakerConfig +import io.github.serpro69.kfaker.games.provider.ClashOfClans +import io.github.serpro69.kfaker.games.provider.Coin +import io.github.serpro69.kfaker.games.provider.Control +import io.github.serpro69.kfaker.games.provider.DnD +import io.github.serpro69.kfaker.games.provider.Dota +import io.github.serpro69.kfaker.games.provider.ElderScrolls +import io.github.serpro69.kfaker.games.provider.Fallout +import io.github.serpro69.kfaker.games.provider.FinalFantasyXIV +import io.github.serpro69.kfaker.games.provider.Game +import io.github.serpro69.kfaker.games.provider.HalfLife +import io.github.serpro69.kfaker.games.provider.Heroes +import io.github.serpro69.kfaker.games.provider.HeroesOfTheStorm +import io.github.serpro69.kfaker.games.provider.LeagueOfLegends +import io.github.serpro69.kfaker.games.provider.Minecraft +import io.github.serpro69.kfaker.games.provider.Myst +import io.github.serpro69.kfaker.games.provider.Overwatch +import io.github.serpro69.kfaker.games.provider.Pokemon +import io.github.serpro69.kfaker.games.provider.SonicTheHedgehog +import io.github.serpro69.kfaker.games.provider.StreetFighter +import io.github.serpro69.kfaker.games.provider.SuperMario +import io.github.serpro69.kfaker.games.provider.SuperSmashBros +import io.github.serpro69.kfaker.games.provider.Superhero +import io.github.serpro69.kfaker.games.provider.Tarkov +import io.github.serpro69.kfaker.games.provider.Touhou +import io.github.serpro69.kfaker.games.provider.WarhammerFantasy +import io.github.serpro69.kfaker.games.provider.Witcher +import io.github.serpro69.kfaker.games.provider.WorldOfWarcraft +import io.github.serpro69.kfaker.games.provider.Zelda + +/** + * Typealias for the [GamesFaker] + */ +typealias Faker = GamesFaker + +/** + * Provides access to fake data generators within the Games domain. + * + * Each category (generator) from this [GamesFaker] is represented by a property + * that (usually) has the same name as the `.yml` dictionary file. + * + * @property unique global provider for generation of unique values. + */ +@Suppress("unused") +class GamesFaker @JvmOverloads constructor(config: FakerConfig = fakerConfig { }): AbstractFaker(config) { + + val clashOfClans: ClashOfClans by lazy { ClashOfClans(fakerService) } + val coin: Coin by lazy { Coin(fakerService) } + val control: Control by lazy { Control(fakerService) } + val dnd: DnD by lazy { DnD(fakerService) } + val dota: Dota by lazy { Dota(fakerService) } + val elderScrolls: ElderScrolls by lazy { ElderScrolls(fakerService) } + val fallout: Fallout by lazy { Fallout(fakerService) } + val finalFantasyXIV: FinalFantasyXIV by lazy { FinalFantasyXIV(fakerService) } + val game: Game by lazy { Game(fakerService) } + val halfLife: HalfLife by lazy { HalfLife(fakerService) } + val heroes: Heroes by lazy { Heroes(fakerService) } + val heroesOfTheStorm: HeroesOfTheStorm by lazy { HeroesOfTheStorm(fakerService) } + val leagueOfLegends: LeagueOfLegends by lazy { LeagueOfLegends(fakerService) } + val minecraft: Minecraft by lazy { Minecraft(fakerService) } + val myst: Myst by lazy { Myst(fakerService) } + val overwatch: Overwatch by lazy { Overwatch(fakerService) } + val pokemon: Pokemon by lazy { Pokemon(fakerService) } + val sonicTheHedgehog: SonicTheHedgehog by lazy { SonicTheHedgehog(fakerService) } + val streetFighter: StreetFighter by lazy { StreetFighter(fakerService) } + val superhero: Superhero by lazy { Superhero(fakerService) } + val superMario: SuperMario by lazy { SuperMario(fakerService) } + val superSmashBros: SuperSmashBros by lazy { SuperSmashBros(fakerService) } + val tarkov: Tarkov by lazy { Tarkov(fakerService) } + val touhou: Touhou by lazy { Touhou(fakerService) } + val warhammerFantasy: WarhammerFantasy by lazy { WarhammerFantasy(fakerService) } + val witcher: Witcher by lazy { Witcher(fakerService) } + val worldOfWarcraft: WorldOfWarcraft by lazy { WorldOfWarcraft(fakerService) } + val zelda: Zelda by lazy { Zelda(fakerService) } + + @FakerDsl + /** + * DSL builder for creating instances of [Faker] + */ + class Builder internal constructor() : AbstractFaker.Builder() { + + /** + * Builds an instance of [Faker] with this [config]. + */ + override fun build(): Faker = Faker(config) + } +} + +/** + * Applies the [block] function to [GamesFaker.Builder] + * and returns as an instance of [GamesFaker] from that builder. + */ +fun faker(block: GamesFaker.Builder.() -> Unit): GamesFaker = GamesFaker.Builder().apply(block).build() diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/ClashOfClans.kt b/faker/games/src/main/kotlin/io/github/serpro69/kfaker/games/provider/ClashOfClans.kt similarity index 75% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/ClashOfClans.kt rename to faker/games/src/main/kotlin/io/github/serpro69/kfaker/games/provider/ClashOfClans.kt index 500cc30a0..323806c7c 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/ClashOfClans.kt +++ b/faker/games/src/main/kotlin/io/github/serpro69/kfaker/games/provider/ClashOfClans.kt @@ -1,9 +1,12 @@ @file:Suppress("unused") -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.games.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.Category +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Coin.kt b/faker/games/src/main/kotlin/io/github/serpro69/kfaker/games/provider/Coin.kt similarity index 70% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/Coin.kt rename to faker/games/src/main/kotlin/io/github/serpro69/kfaker/games/provider/Coin.kt index 117494170..18fff6aa5 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Coin.kt +++ b/faker/games/src/main/kotlin/io/github/serpro69/kfaker/games/provider/Coin.kt @@ -1,7 +1,9 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.games.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/faker/games/src/main/kotlin/io/github/serpro69/kfaker/games/provider/Control.kt b/faker/games/src/main/kotlin/io/github/serpro69/kfaker/games/provider/Control.kt new file mode 100644 index 000000000..ab1d3316b --- /dev/null +++ b/faker/games/src/main/kotlin/io/github/serpro69/kfaker/games/provider/Control.kt @@ -0,0 +1,33 @@ +package io.github.serpro69.kfaker.games.provider + +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.Category +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider +import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider +import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate + +/** + * [FakeDataProvider] implementation for [YamlCategory.GAMES] category. + */ +@Suppress("unused") +class Control internal constructor(fakerService: FakerService) : YamlFakeDataProvider(fakerService) { + override val yamlCategory = YamlCategory.GAMES + override val secondaryCategory: Category = Category.ofName("CONTROL") + override val localUniqueDataProvider = LocalUniqueDataProvider() + override val unique by UniqueProviderDelegate(localUniqueDataProvider) + + init { + fakerService.load(yamlCategory, secondaryCategory) + } + + fun character() = resolve(secondaryCategory, "character") + fun location() = resolve(secondaryCategory, "location") + fun objectOfPower() = resolve(secondaryCategory, "object_of_power") + fun alteredItem() = resolve(secondaryCategory, "altered_item") + fun alteredWorldEvent() = resolve(secondaryCategory, "altered_world_event") + fun hiss() = resolve(secondaryCategory, "hiss") + fun theBoard() = resolve(secondaryCategory, "the_board") + fun quote() = resolve(secondaryCategory, "quote") +} diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/DnD.kt b/faker/games/src/main/kotlin/io/github/serpro69/kfaker/games/provider/DnD.kt similarity index 85% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/DnD.kt rename to faker/games/src/main/kotlin/io/github/serpro69/kfaker/games/provider/DnD.kt index ab81fa7ad..dd25a25a3 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/DnD.kt +++ b/faker/games/src/main/kotlin/io/github/serpro69/kfaker/games/provider/DnD.kt @@ -1,7 +1,9 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.games.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Dota.kt b/faker/games/src/main/kotlin/io/github/serpro69/kfaker/games/provider/Dota.kt similarity index 54% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/Dota.kt rename to faker/games/src/main/kotlin/io/github/serpro69/kfaker/games/provider/Dota.kt index 1420e27c6..df8c931bd 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Dota.kt +++ b/faker/games/src/main/kotlin/io/github/serpro69/kfaker/games/provider/Dota.kt @@ -1,7 +1,10 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.games.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.Category +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate @@ -19,127 +22,127 @@ class Dota internal constructor(fakerService: FakerService) : YamlFakeDataProvid fakerService.load(yamlCategory, secondaryCategory) } - fun building() = resolve("dota", "building") + fun building() = resolve(secondaryCategory, "building") - fun hero() = resolve("dota", "hero") + fun hero() = resolve(secondaryCategory, "hero") @Deprecated(level = DeprecationLevel.ERROR, message = "Not fully implemented") - fun abaddon() = resolve("dota", "abaddon", "quote") + fun abaddon() = resolve(secondaryCategory, "abaddon", "quote") @Deprecated(level = DeprecationLevel.ERROR, message = "Not fully implemented") - fun alchemist() = resolve("dota", "alchemist", "quote") + fun alchemist() = resolve(secondaryCategory, "alchemist", "quote") @Deprecated(level = DeprecationLevel.ERROR, message = "Not fully implemented") - fun axe() = resolve("dota", "axe", "quote") + fun axe() = resolve(secondaryCategory, "axe", "quote") @Deprecated(level = DeprecationLevel.ERROR, message = "Not fully implemented") - fun beastmaster() = resolve("dota", "beastmaster", "quote") + fun beastmaster() = resolve(secondaryCategory, "beastmaster", "quote") @Deprecated(level = DeprecationLevel.ERROR, message = "Not fully implemented") - fun brewmaster() = resolve("dota", "brewmaster", "quote") + fun brewmaster() = resolve(secondaryCategory, "brewmaster", "quote") @Deprecated(level = DeprecationLevel.ERROR, message = "Not fully implemented") - fun bristleback() = resolve("dota", "bristleback", "quote") + fun bristleback() = resolve(secondaryCategory, "bristleback", "quote") @Deprecated(level = DeprecationLevel.ERROR, message = "Not fully implemented") - fun centaur() = resolve("dota", "centaur", "quote") + fun centaur() = resolve(secondaryCategory, "centaur", "quote") @Deprecated(level = DeprecationLevel.ERROR, message = "Not fully implemented") - fun chaosKnight() = resolve("dota", "chaos_knight", "quote") + fun chaosKnight() = resolve(secondaryCategory, "chaos_knight", "quote") @Deprecated(level = DeprecationLevel.ERROR, message = "Not fully implemented") - fun clockwerk() = resolve("dota", "clockwerk", "quote") + fun clockwerk() = resolve(secondaryCategory, "clockwerk", "quote") @Deprecated(level = DeprecationLevel.ERROR, message = "Not fully implemented") - fun doom() = resolve("dota", "doom", "quote") + fun doom() = resolve(secondaryCategory, "doom", "quote") @Deprecated(level = DeprecationLevel.ERROR, message = "Not fully implemented") - fun dragonKnight() = resolve("dota", "dragon_knight", "quote") + fun dragonKnight() = resolve(secondaryCategory, "dragon_knight", "quote") @Deprecated(level = DeprecationLevel.ERROR, message = "Not fully implemented") - fun earthSpirit() = resolve("dota", "earth_spirit", "quote") + fun earthSpirit() = resolve(secondaryCategory, "earth_spirit", "quote") @Deprecated(level = DeprecationLevel.ERROR, message = "Not fully implemented") - fun earthshaker() = resolve("dota", "earthshaker", "quote") + fun earthshaker() = resolve(secondaryCategory, "earthshaker", "quote") @Deprecated(level = DeprecationLevel.ERROR, message = "Not fully implemented") - fun elderTitan() = resolve("dota", "elder_titan", "quote") + fun elderTitan() = resolve(secondaryCategory, "elder_titan", "quote") @Deprecated(level = DeprecationLevel.ERROR, message = "Not fully implemented") - fun huskar() = resolve("dota", "huskar", "quote") + fun huskar() = resolve(secondaryCategory, "huskar", "quote") @Deprecated(level = DeprecationLevel.ERROR, message = "Not fully implemented") - fun io() = resolve("dota", "io", "quote") + fun io() = resolve(secondaryCategory, "io", "quote") @Deprecated(level = DeprecationLevel.ERROR, message = "Not fully implemented") - fun kunkka() = resolve("dota", "kunkka", "quote") + fun kunkka() = resolve(secondaryCategory, "kunkka", "quote") @Deprecated(level = DeprecationLevel.ERROR, message = "Not fully implemented") - fun legionCommander() = resolve("dota", "legion_commander", "quote") + fun legionCommander() = resolve(secondaryCategory, "legion_commander", "quote") @Deprecated(level = DeprecationLevel.ERROR, message = "Not fully implemented") - fun lifestealer() = resolve("dota", "lifestealer", "quote") + fun lifestealer() = resolve(secondaryCategory, "lifestealer", "quote") @Deprecated(level = DeprecationLevel.ERROR, message = "Not fully implemented") - fun lycan() = resolve("dota", "lycan", "quote") + fun lycan() = resolve(secondaryCategory, "lycan", "quote") @Deprecated(level = DeprecationLevel.ERROR, message = "Not fully implemented") - fun magnus() = resolve("dota", "magnus", "quote") + fun magnus() = resolve(secondaryCategory, "magnus", "quote") @Deprecated(level = DeprecationLevel.ERROR, message = "Not fully implemented") - fun meepo() = resolve("dota", "meepo", "quote") + fun meepo() = resolve(secondaryCategory, "meepo", "quote") @Deprecated(level = DeprecationLevel.ERROR, message = "Not fully implemented") - fun nightStalker() = resolve("dota", "night_stalker", "quote") + fun nightStalker() = resolve(secondaryCategory, "night_stalker", "quote") @Deprecated(level = DeprecationLevel.ERROR, message = "Not fully implemented") - fun omniknight() = resolve("dota", "omniknight", "quote") + fun omniknight() = resolve(secondaryCategory, "omniknight", "quote") @Deprecated(level = DeprecationLevel.ERROR, message = "Not fully implemented") - fun phoenix() = resolve("dota", "phoenix", "quote") + fun phoenix() = resolve(secondaryCategory, "phoenix", "quote") @Deprecated(level = DeprecationLevel.ERROR, message = "Not fully implemented") - fun pudge() = resolve("dota", "pudge", "quote") + fun pudge() = resolve(secondaryCategory, "pudge", "quote") @Deprecated(level = DeprecationLevel.ERROR, message = "Not fully implemented") - fun sandKing() = resolve("dota", "sand_king", "quote") + fun sandKing() = resolve(secondaryCategory, "sand_king", "quote") @Deprecated(level = DeprecationLevel.ERROR, message = "Not fully implemented") - fun slardar() = resolve("dota", "slardar", "quote") + fun slardar() = resolve(secondaryCategory, "slardar", "quote") @Deprecated(level = DeprecationLevel.ERROR, message = "Not fully implemented") - fun spiritBreaker() = resolve("dota", "spirit_breaker", "quote") + fun spiritBreaker() = resolve(secondaryCategory, "spirit_breaker", "quote") @Deprecated(level = DeprecationLevel.ERROR, message = "Not fully implemented") - fun sven() = resolve("dota", "sven", "quote") + fun sven() = resolve(secondaryCategory, "sven", "quote") @Deprecated(level = DeprecationLevel.ERROR, message = "Not fully implemented") - fun tidehunter() = resolve("dota", "tidehunter", "quote") + fun tidehunter() = resolve(secondaryCategory, "tidehunter", "quote") @Deprecated(level = DeprecationLevel.ERROR, message = "Not fully implemented") - fun timbersaw() = resolve("dota", "timbersaw", "quote") + fun timbersaw() = resolve(secondaryCategory, "timbersaw", "quote") @Deprecated(level = DeprecationLevel.ERROR, message = "Not fully implemented") - fun tiny() = resolve("dota", "tiny", "quote") + fun tiny() = resolve(secondaryCategory, "tiny", "quote") @Deprecated(level = DeprecationLevel.ERROR, message = "Not fully implemented") - fun treantProtector() = resolve("dota", "treant_protector", "quote") + fun treantProtector() = resolve(secondaryCategory, "treant_protector", "quote") @Deprecated(level = DeprecationLevel.ERROR, message = "Not fully implemented") - fun tusk() = resolve("dota", "tusk", "quote") + fun tusk() = resolve(secondaryCategory, "tusk", "quote") @Deprecated(level = DeprecationLevel.ERROR, message = "Not fully implemented") - fun underlord() = resolve("dota", "underlord", "quote") + fun underlord() = resolve(secondaryCategory, "underlord", "quote") @Deprecated(level = DeprecationLevel.ERROR, message = "Not fully implemented") - fun undying() = resolve("dota", "undying", "quote") + fun undying() = resolve(secondaryCategory, "undying", "quote") @Deprecated(level = DeprecationLevel.ERROR, message = "Not fully implemented") - fun wraithKing() = resolve("dota", "wraith_king", "quote") + fun wraithKing() = resolve(secondaryCategory, "wraith_king", "quote") - fun item() = resolve("dota", "item") + fun item() = resolve(secondaryCategory, "item") - fun team() = resolve("dota", "team") + fun team() = resolve(secondaryCategory, "team") - fun player() = resolve("dota", "player") + fun player() = resolve(secondaryCategory, "player") } diff --git a/faker/games/src/main/kotlin/io/github/serpro69/kfaker/games/provider/ElderScrolls.kt b/faker/games/src/main/kotlin/io/github/serpro69/kfaker/games/provider/ElderScrolls.kt new file mode 100644 index 000000000..77f635816 --- /dev/null +++ b/faker/games/src/main/kotlin/io/github/serpro69/kfaker/games/provider/ElderScrolls.kt @@ -0,0 +1,34 @@ +package io.github.serpro69.kfaker.games.provider + +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.Category +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider +import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider +import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate + +/** + * [FakeDataProvider] implementation for [YamlCategory.GAMES] category. + */ +@Suppress("unused") +class ElderScrolls internal constructor(fakerService: FakerService) : YamlFakeDataProvider(fakerService) { + override val yamlCategory = YamlCategory.GAMES + override val secondaryCategory: Category = Category.ofName("ELDER_SCROLLS") + override val localUniqueDataProvider = LocalUniqueDataProvider() + override val unique by UniqueProviderDelegate(localUniqueDataProvider) + + init { + fakerService.load(yamlCategory, secondaryCategory) + } + + fun race() = resolve(secondaryCategory, "race") + fun creature() = resolve(secondaryCategory, "creature") + fun region() = resolve(secondaryCategory, "region") + fun dragon() = resolve(secondaryCategory, "dragon") + fun city() = resolve(secondaryCategory, "city") + fun firstName() = resolve(secondaryCategory, "first_name") + fun lastName() = resolve(secondaryCategory, "last_name") + fun weapon() = resolve(secondaryCategory, "weapon") + fun jewelry() = resolve(secondaryCategory, "jewelry") +} diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Fallout.kt b/faker/games/src/main/kotlin/io/github/serpro69/kfaker/games/provider/Fallout.kt similarity index 55% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/Fallout.kt rename to faker/games/src/main/kotlin/io/github/serpro69/kfaker/games/provider/Fallout.kt index 5ab33e3a9..e6d1b3526 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Fallout.kt +++ b/faker/games/src/main/kotlin/io/github/serpro69/kfaker/games/provider/Fallout.kt @@ -1,7 +1,10 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.games.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.Category +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate @@ -19,8 +22,8 @@ class Fallout internal constructor(fakerService: FakerService) : YamlFakeDataPro fakerService.load(yamlCategory, secondaryCategory) } - fun characters() = resolve("fallout", "characters") - fun factions() = resolve("fallout", "factions") - fun locations() = resolve("fallout", "locations") - fun quotes() = resolve("fallout", "quotes") + fun characters() = resolve(secondaryCategory, "characters") + fun factions() = resolve(secondaryCategory, "factions") + fun locations() = resolve(secondaryCategory, "locations") + fun quotes() = resolve(secondaryCategory, "quotes") } diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/FinalFantasyXIV.kt b/faker/games/src/main/kotlin/io/github/serpro69/kfaker/games/provider/FinalFantasyXIV.kt similarity index 60% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/FinalFantasyXIV.kt rename to faker/games/src/main/kotlin/io/github/serpro69/kfaker/games/provider/FinalFantasyXIV.kt index 972a1f29e..9216923f7 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/FinalFantasyXIV.kt +++ b/faker/games/src/main/kotlin/io/github/serpro69/kfaker/games/provider/FinalFantasyXIV.kt @@ -1,18 +1,19 @@ @file:Suppress("unused") -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.games.provider import io.github.serpro69.kfaker.FakerService import io.github.serpro69.kfaker.dictionary.Category import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate /** * [FakeDataProvider] implementation for [YamlCategory.GAMES] category. */ -class FinalFantasyXIV internal constructor(fakerService: FakerService) : - YamlFakeDataProvider(fakerService) { +class FinalFantasyXIV internal constructor(fakerService: FakerService) : YamlFakeDataProvider(fakerService) { override val yamlCategory = YamlCategory.GAMES override val secondaryCategory: Category = Category.ofName("FINAL_FANTASY_XIV") override val localUniqueDataProvider = LocalUniqueDataProvider() @@ -22,9 +23,9 @@ class FinalFantasyXIV internal constructor(fakerService: FakerService) : fakerService.load(yamlCategory, secondaryCategory) } - fun characters(): String = resolve("final_fantasy_xiv", "characters") - fun jobs(): String = resolve("final_fantasy_xiv", "jobs") - fun races(): String = resolve("final_fantasy_xiv", "races") - fun dataCenters(): String = resolve("final_fantasy_xiv", "data_centers") - fun zones(): String = resolve("final_fantasy_xiv", "zones") + fun characters(): String = resolve(secondaryCategory, "characters") + fun jobs(): String = resolve(secondaryCategory, "jobs") + fun races(): String = resolve(secondaryCategory, "races") + fun dataCenters(): String = resolve(secondaryCategory, "data_centers") + fun zones(): String = resolve(secondaryCategory, "zones") } diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Game.kt b/faker/games/src/main/kotlin/io/github/serpro69/kfaker/games/provider/Game.kt similarity index 70% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/Game.kt rename to faker/games/src/main/kotlin/io/github/serpro69/kfaker/games/provider/Game.kt index 3f6e521e4..e2338acca 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Game.kt +++ b/faker/games/src/main/kotlin/io/github/serpro69/kfaker/games/provider/Game.kt @@ -1,7 +1,9 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.games.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/HalfLife.kt b/faker/games/src/main/kotlin/io/github/serpro69/kfaker/games/provider/HalfLife.kt similarity index 58% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/HalfLife.kt rename to faker/games/src/main/kotlin/io/github/serpro69/kfaker/games/provider/HalfLife.kt index f33b577de..be902dfe6 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/HalfLife.kt +++ b/faker/games/src/main/kotlin/io/github/serpro69/kfaker/games/provider/HalfLife.kt @@ -1,7 +1,10 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.games.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.Category +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate @@ -19,7 +22,7 @@ class HalfLife internal constructor(fakerService: FakerService) : YamlFakeDataPr fakerService.load(yamlCategory, secondaryCategory) } - fun character() = resolve("half_life", "character") - fun enemy() = resolve("half_life", "enemy") - fun location() = resolve("half_life", "location") + fun character() = resolve(secondaryCategory, "character") + fun enemy() = resolve(secondaryCategory, "enemy") + fun location() = resolve(secondaryCategory, "location") } diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Heroes.kt b/faker/games/src/main/kotlin/io/github/serpro69/kfaker/games/provider/Heroes.kt similarity index 88% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/Heroes.kt rename to faker/games/src/main/kotlin/io/github/serpro69/kfaker/games/provider/Heroes.kt index 4c3f5965a..bf4abf410 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Heroes.kt +++ b/faker/games/src/main/kotlin/io/github/serpro69/kfaker/games/provider/Heroes.kt @@ -1,7 +1,8 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.games.provider import io.github.serpro69.kfaker.* import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/HeroesOfTheStorm.kt b/faker/games/src/main/kotlin/io/github/serpro69/kfaker/games/provider/HeroesOfTheStorm.kt similarity index 89% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/HeroesOfTheStorm.kt rename to faker/games/src/main/kotlin/io/github/serpro69/kfaker/games/provider/HeroesOfTheStorm.kt index fbf93fd59..db2c176a7 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/HeroesOfTheStorm.kt +++ b/faker/games/src/main/kotlin/io/github/serpro69/kfaker/games/provider/HeroesOfTheStorm.kt @@ -1,7 +1,8 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.games.provider import io.github.serpro69.kfaker.* import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/LeagueOfLegends.kt b/faker/games/src/main/kotlin/io/github/serpro69/kfaker/games/provider/LeagueOfLegends.kt similarity index 52% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/LeagueOfLegends.kt rename to faker/games/src/main/kotlin/io/github/serpro69/kfaker/games/provider/LeagueOfLegends.kt index 706023504..438beacc5 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/LeagueOfLegends.kt +++ b/faker/games/src/main/kotlin/io/github/serpro69/kfaker/games/provider/LeagueOfLegends.kt @@ -1,7 +1,10 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.games.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.Category +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate @@ -19,10 +22,10 @@ class LeagueOfLegends internal constructor(fakerService: FakerService) : YamlFak fakerService.load(yamlCategory, secondaryCategory) } - fun champion() = resolve("league_of_legends", "champion") - fun location() = resolve("league_of_legends", "location") - fun quote() = resolve("league_of_legends", "quote") - fun summonerSpell() = resolve("league_of_legends", "summoner_spell") - fun masteries() = resolve("league_of_legends", "masteries") - fun rank() = resolve("league_of_legends", "rank") + fun champion() = resolve(secondaryCategory, "champion") + fun location() = resolve(secondaryCategory, "location") + fun quote() = resolve(secondaryCategory, "quote") + fun summonerSpell() = resolve(secondaryCategory, "summoner_spell") + fun masteries() = resolve(secondaryCategory, "masteries") + fun rank() = resolve(secondaryCategory, "rank") } diff --git a/faker/games/src/main/kotlin/io/github/serpro69/kfaker/games/provider/Minecraft.kt b/faker/games/src/main/kotlin/io/github/serpro69/kfaker/games/provider/Minecraft.kt new file mode 100644 index 000000000..6a6f72f5b --- /dev/null +++ b/faker/games/src/main/kotlin/io/github/serpro69/kfaker/games/provider/Minecraft.kt @@ -0,0 +1,33 @@ +package io.github.serpro69.kfaker.games.provider + +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.Category +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider +import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider +import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate + +/** + * [FakeDataProvider] implementation for [YamlCategory.GAMES] category. + */ +@Suppress("unused") +class Minecraft internal constructor(fakerService: FakerService) : YamlFakeDataProvider(fakerService) { + override val yamlCategory = YamlCategory.GAMES + override val secondaryCategory: Category = Category.ofName("MINECRAFT") + override val localUniqueDataProvider = LocalUniqueDataProvider() + override val unique by UniqueProviderDelegate(localUniqueDataProvider) + + init { + fakerService.load(yamlCategory, secondaryCategory) + } + + fun achievement() = resolve(secondaryCategory, "achievement") + fun biome() = resolve(secondaryCategory, "biome") + fun blocks() = resolve(secondaryCategory, "blocks") + fun enchantment() = resolve(secondaryCategory, "enchantment") + fun gameMode() = resolve(secondaryCategory, "game_mode") + fun items() = resolve(secondaryCategory, "items") + fun mobs() = resolve(secondaryCategory, "mobs") + fun statusEffect() = resolve(secondaryCategory, "status_effect") +} diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Myst.kt b/faker/games/src/main/kotlin/io/github/serpro69/kfaker/games/provider/Myst.kt similarity index 53% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/Myst.kt rename to faker/games/src/main/kotlin/io/github/serpro69/kfaker/games/provider/Myst.kt index 251a44419..1e9994680 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Myst.kt +++ b/faker/games/src/main/kotlin/io/github/serpro69/kfaker/games/provider/Myst.kt @@ -1,7 +1,10 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.games.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.Category +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate @@ -19,9 +22,9 @@ class Myst internal constructor(fakerService: FakerService) : YamlFakeDataProvid fakerService.load(yamlCategory, secondaryCategory) } - fun games() = resolve("myst", "games") - fun creatures() = resolve("myst", "creatures") - fun characters() = resolve("myst", "characters") - fun ages() = resolve("myst", "ages") - fun quotes() = resolve("myst", "quotes") + fun games() = resolve(secondaryCategory, "games") + fun creatures() = resolve(secondaryCategory, "creatures") + fun characters() = resolve(secondaryCategory, "characters") + fun ages() = resolve(secondaryCategory, "ages") + fun quotes() = resolve(secondaryCategory, "quotes") } diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Overwatch.kt b/faker/games/src/main/kotlin/io/github/serpro69/kfaker/games/provider/Overwatch.kt similarity index 59% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/Overwatch.kt rename to faker/games/src/main/kotlin/io/github/serpro69/kfaker/games/provider/Overwatch.kt index ce0013058..da431d3dd 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Overwatch.kt +++ b/faker/games/src/main/kotlin/io/github/serpro69/kfaker/games/provider/Overwatch.kt @@ -1,7 +1,10 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.games.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.Category +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate @@ -19,7 +22,7 @@ class Overwatch internal constructor(fakerService: FakerService) : YamlFakeDataP fakerService.load(yamlCategory, secondaryCategory) } - fun heroes() = resolve("overwatch", "heroes") - fun locations() = resolve("overwatch", "locations") - fun quotes() = resolve("overwatch", "quotes") + fun heroes() = resolve(secondaryCategory, "heroes") + fun locations() = resolve(secondaryCategory, "locations") + fun quotes() = resolve(secondaryCategory, "quotes") } diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Pokemon.kt b/faker/games/src/main/kotlin/io/github/serpro69/kfaker/games/provider/Pokemon.kt similarity index 59% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/Pokemon.kt rename to faker/games/src/main/kotlin/io/github/serpro69/kfaker/games/provider/Pokemon.kt index 30a198e71..f3a77b270 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Pokemon.kt +++ b/faker/games/src/main/kotlin/io/github/serpro69/kfaker/games/provider/Pokemon.kt @@ -1,7 +1,10 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.games.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.Category +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate @@ -19,7 +22,7 @@ class Pokemon internal constructor(fakerService: FakerService) : YamlFakeDataPro fakerService.load(yamlCategory, secondaryCategory) } - fun names() = resolve("pokemon", "names") - fun locations() = resolve("pokemon", "locations") - fun moves() = resolve("pokemon", "moves") + fun names() = resolve(secondaryCategory, "names") + fun locations() = resolve(secondaryCategory, "locations") + fun moves() = resolve(secondaryCategory, "moves") } diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/SonicTheHedgehog.kt b/faker/games/src/main/kotlin/io/github/serpro69/kfaker/games/provider/SonicTheHedgehog.kt similarity index 60% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/SonicTheHedgehog.kt rename to faker/games/src/main/kotlin/io/github/serpro69/kfaker/games/provider/SonicTheHedgehog.kt index 9aedbb0e6..ab5e0f8c3 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/SonicTheHedgehog.kt +++ b/faker/games/src/main/kotlin/io/github/serpro69/kfaker/games/provider/SonicTheHedgehog.kt @@ -1,7 +1,10 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.games.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.Category +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate @@ -19,7 +22,7 @@ class SonicTheHedgehog internal constructor(fakerService: FakerService) : YamlFa fakerService.load(yamlCategory, secondaryCategory) } - fun zone() = resolve("sonic_the_hedgehog", "zone") - fun character() = resolve("sonic_the_hedgehog", "character") - fun game() = resolve("sonic_the_hedgehog", "game") + fun zone() = resolve(secondaryCategory, "zone") + fun character() = resolve(secondaryCategory, "character") + fun game() = resolve(secondaryCategory, "game") } diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/StreetFighter.kt b/faker/games/src/main/kotlin/io/github/serpro69/kfaker/games/provider/StreetFighter.kt similarity index 57% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/StreetFighter.kt rename to faker/games/src/main/kotlin/io/github/serpro69/kfaker/games/provider/StreetFighter.kt index 4a53e2017..1fc99ab79 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/StreetFighter.kt +++ b/faker/games/src/main/kotlin/io/github/serpro69/kfaker/games/provider/StreetFighter.kt @@ -1,7 +1,10 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.games.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.Category +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate @@ -19,8 +22,8 @@ class StreetFighter internal constructor(fakerService: FakerService) : YamlFakeD fakerService.load(yamlCategory, secondaryCategory) } - fun characters() = resolve("street_fighter", "characters") - fun stages() = resolve("street_fighter", "stages") - fun quotes() = resolve("street_fighter", "quotes") - fun moves() = resolve("street_fighter", "moves") + fun characters() = resolve(secondaryCategory, "characters") + fun stages() = resolve(secondaryCategory, "stages") + fun quotes() = resolve(secondaryCategory, "quotes") + fun moves() = resolve(secondaryCategory, "moves") } diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/SuperMario.kt b/faker/games/src/main/kotlin/io/github/serpro69/kfaker/games/provider/SuperMario.kt similarity index 58% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/SuperMario.kt rename to faker/games/src/main/kotlin/io/github/serpro69/kfaker/games/provider/SuperMario.kt index 81918bd4c..0e1b0a930 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/SuperMario.kt +++ b/faker/games/src/main/kotlin/io/github/serpro69/kfaker/games/provider/SuperMario.kt @@ -1,9 +1,12 @@ @file:Suppress("unused") -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.games.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.Category +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate @@ -20,7 +23,7 @@ class SuperMario internal constructor(fakerService: FakerService) : YamlFakeData fakerService.load(yamlCategory, secondaryCategory) } - fun characters(): String = resolve("super_mario", "characters") - fun games(): String = resolve("super_mario", "games") - fun locations(): String = resolve("super_mario", "locations") + fun characters(): String = resolve(secondaryCategory, "characters") + fun games(): String = resolve(secondaryCategory, "games") + fun locations(): String = resolve(secondaryCategory, "locations") } diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/SuperSmashBros.kt b/faker/games/src/main/kotlin/io/github/serpro69/kfaker/games/provider/SuperSmashBros.kt similarity index 62% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/SuperSmashBros.kt rename to faker/games/src/main/kotlin/io/github/serpro69/kfaker/games/provider/SuperSmashBros.kt index 53d2d79d5..c4e9f8b32 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/SuperSmashBros.kt +++ b/faker/games/src/main/kotlin/io/github/serpro69/kfaker/games/provider/SuperSmashBros.kt @@ -1,7 +1,10 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.games.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.Category +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate @@ -19,6 +22,6 @@ class SuperSmashBros internal constructor(fakerService: FakerService) : YamlFake fakerService.load(yamlCategory, secondaryCategory) } - fun fighter() = resolve("super_smash_bros", "fighter") - fun stage() = resolve("super_smash_bros", "stage") + fun fighter() = resolve(secondaryCategory, "fighter") + fun stage() = resolve(secondaryCategory, "stage") } diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Superhero.kt b/faker/games/src/main/kotlin/io/github/serpro69/kfaker/games/provider/Superhero.kt similarity index 78% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/Superhero.kt rename to faker/games/src/main/kotlin/io/github/serpro69/kfaker/games/provider/Superhero.kt index 4474df29a..e8028eabb 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Superhero.kt +++ b/faker/games/src/main/kotlin/io/github/serpro69/kfaker/games/provider/Superhero.kt @@ -1,7 +1,9 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.games.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Tarkov.kt b/faker/games/src/main/kotlin/io/github/serpro69/kfaker/games/provider/Tarkov.kt similarity index 86% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/Tarkov.kt rename to faker/games/src/main/kotlin/io/github/serpro69/kfaker/games/provider/Tarkov.kt index 88acda058..7c69b3b6b 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Tarkov.kt +++ b/faker/games/src/main/kotlin/io/github/serpro69/kfaker/games/provider/Tarkov.kt @@ -1,9 +1,11 @@ @file:Suppress("unused") -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.games.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Touhou.kt b/faker/games/src/main/kotlin/io/github/serpro69/kfaker/games/provider/Touhou.kt similarity index 51% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/Touhou.kt rename to faker/games/src/main/kotlin/io/github/serpro69/kfaker/games/provider/Touhou.kt index 6fece6e28..7fb493e00 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Touhou.kt +++ b/faker/games/src/main/kotlin/io/github/serpro69/kfaker/games/provider/Touhou.kt @@ -1,9 +1,12 @@ @file:Suppress("unused") -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.games.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.Category +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate @@ -20,9 +23,9 @@ class Touhou internal constructor(fakerService: FakerService) : YamlFakeDataProv fakerService.load(yamlCategory, secondaryCategory) } - fun games(): String = resolve("touhou", "games") - fun characters(): String = resolve("touhou", "characters") - fun spellCards(): String = resolve("touhou", "spell_cards") - fun locations(): String = resolve("touhou", "locations") - fun songs(): String = resolve("touhou", "songs") + fun games(): String = resolve(secondaryCategory, "games") + fun characters(): String = resolve(secondaryCategory, "characters") + fun spellCards(): String = resolve(secondaryCategory, "spell_cards") + fun locations(): String = resolve(secondaryCategory, "locations") + fun songs(): String = resolve(secondaryCategory, "songs") } diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/WarhammerFantasy.kt b/faker/games/src/main/kotlin/io/github/serpro69/kfaker/games/provider/WarhammerFantasy.kt similarity index 53% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/WarhammerFantasy.kt rename to faker/games/src/main/kotlin/io/github/serpro69/kfaker/games/provider/WarhammerFantasy.kt index 6fca1dd9d..a6d863e57 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/WarhammerFantasy.kt +++ b/faker/games/src/main/kotlin/io/github/serpro69/kfaker/games/provider/WarhammerFantasy.kt @@ -1,7 +1,10 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.games.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.Category +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate @@ -19,9 +22,9 @@ class WarhammerFantasy internal constructor(fakerService: FakerService) : YamlFa fakerService.load(yamlCategory, secondaryCategory) } - fun heroes() = resolve("warhammer_fantasy", "heros") - fun quotes() = resolve("warhammer_fantasy", "quotes") - fun locations() = resolve("warhammer_fantasy", "locations") - fun factions() = resolve("warhammer_fantasy", "factions") - fun creatures() = resolve("warhammer_fantasy", "creatures") + fun heroes() = resolve(secondaryCategory, "heros") // key typo in the yml file + fun quotes() = resolve(secondaryCategory, "quotes") + fun locations() = resolve(secondaryCategory, "locations") + fun factions() = resolve(secondaryCategory, "factions") + fun creatures() = resolve(secondaryCategory, "creatures") } diff --git a/faker/games/src/main/kotlin/io/github/serpro69/kfaker/games/provider/Witcher.kt b/faker/games/src/main/kotlin/io/github/serpro69/kfaker/games/provider/Witcher.kt new file mode 100644 index 000000000..b467806df --- /dev/null +++ b/faker/games/src/main/kotlin/io/github/serpro69/kfaker/games/provider/Witcher.kt @@ -0,0 +1,34 @@ +package io.github.serpro69.kfaker.games.provider + +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.Category +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider +import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider +import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate + +/** + * [FakeDataProvider] implementation for [YamlCategory.GAMES] category. + */ +@Suppress("unused") +class Witcher internal constructor(fakerService: FakerService) : YamlFakeDataProvider(fakerService) { + override val yamlCategory = YamlCategory.GAMES + override val secondaryCategory: Category = Category.ofName("WITCHER") + override val localUniqueDataProvider = LocalUniqueDataProvider() + override val unique by UniqueProviderDelegate(localUniqueDataProvider) + + init { + fakerService.load(yamlCategory, secondaryCategory) + } + + fun characters() = resolve(secondaryCategory, "characters") + fun witchers() = resolve(secondaryCategory, "witchers") + fun schools() = resolve(secondaryCategory, "schools") + fun locations() = resolve(secondaryCategory, "locations") + fun quotes() = resolve(secondaryCategory, "quotes") + fun monsters() = resolve(secondaryCategory, "monsters") + fun signs() = resolve(secondaryCategory, "signs") + fun potions() = resolve(secondaryCategory, "potions") + fun books() = resolve(secondaryCategory, "books") +} diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/WorldOfWarcraft.kt b/faker/games/src/main/kotlin/io/github/serpro69/kfaker/games/provider/WorldOfWarcraft.kt similarity index 56% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/WorldOfWarcraft.kt rename to faker/games/src/main/kotlin/io/github/serpro69/kfaker/games/provider/WorldOfWarcraft.kt index 09bc6a5d7..380f2343f 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/WorldOfWarcraft.kt +++ b/faker/games/src/main/kotlin/io/github/serpro69/kfaker/games/provider/WorldOfWarcraft.kt @@ -1,7 +1,10 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.games.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.Category +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate @@ -19,8 +22,8 @@ class WorldOfWarcraft internal constructor(fakerService: FakerService) : YamlFak fakerService.load(yamlCategory, secondaryCategory) } - fun hero() = resolve("world_of_warcraft", "heros") - fun quotes() = resolve("world_of_warcraft", "quotes") - fun classNames() = resolve("world_of_warcraft", "class_names") - fun races() = resolve("world_of_warcraft", "races") + fun hero() = resolve(secondaryCategory, "heros") // key typo in the yml file + fun quotes() = resolve(secondaryCategory, "quotes") + fun classNames() = resolve(secondaryCategory, "class_names") + fun races() = resolve(secondaryCategory, "races") } diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Zelda.kt b/faker/games/src/main/kotlin/io/github/serpro69/kfaker/games/provider/Zelda.kt similarity index 55% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/Zelda.kt rename to faker/games/src/main/kotlin/io/github/serpro69/kfaker/games/provider/Zelda.kt index def39dbb8..2d8954606 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Zelda.kt +++ b/faker/games/src/main/kotlin/io/github/serpro69/kfaker/games/provider/Zelda.kt @@ -1,7 +1,10 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.games.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.Category +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate @@ -19,8 +22,8 @@ class Zelda internal constructor(fakerService: FakerService) : YamlFakeDataProvi fakerService.load(yamlCategory, secondaryCategory) } - fun games() = resolve("zelda", "games") - fun characters() = resolve("zelda", "characters") - fun locations() = resolve("zelda", "locations") - fun items() = resolve("zelda", "items") + fun games() = resolve(secondaryCategory, "games") + fun characters() = resolve(secondaryCategory, "characters") + fun locations() = resolve(secondaryCategory, "locations") + fun items() = resolve(secondaryCategory, "items") } diff --git a/faker/humor/README.md b/faker/humor/README.md new file mode 100644 index 000000000..09fa755b7 --- /dev/null +++ b/faker/humor/README.md @@ -0,0 +1,54 @@ +## `HumorFaker` + +[![Maven Central](https://img.shields.io/maven-central/v/io.github.serpro69/kotlin-faker-humor?style=for-the-badge)](https://search.maven.org/artifact/io.github.serpro69/kotlin-faker-humor) +[![Sonatype Nexus (Snapshots)](https://img.shields.io/nexus/s/io.github.serpro69/kotlin-faker-humor?label=snapshot-version&server=https%3A%2F%2Foss.sonatype.org&style=for-the-badge&color=yellow)](#downloading) + +Provides access to fake data generators within the Humor domain. + +## Usage + +Documentation for kotlin-faker is available at [serpro69.github.io/kotlin-faker/](https://serpro69.github.io/kotlin-faker/). + +### Downloading + +Latest releases are always available on maven central. + +**With gradle** + +```groovy +dependencies { + implementation 'io.github.serpro69:kotlin-faker:$version' + implementation 'io.github.serpro69:kotlin-faker-humor:$version' +} +``` + +**With maven** + +```xml + + + io.github.serpro69 + kotlin-faker + ${version} + + + io.github.serpro69 + kotlin-faker-humor + ${version} + + +``` + +_NB! An additional fake data provider like 'humor' requires the main `kotlin-faker` dependency to be on the classpath._ + +### Generating data + +```kotlin +// NB! the package you import if using multiple fakers +import io.github.serpro69.kfaker.humor.faker + +val faker = faker { } + +faker.chuckNorris.fact() +faker.funnyName.name() +``` diff --git a/faker/humor/build.gradle.kts b/faker/humor/build.gradle.kts new file mode 100644 index 000000000..55f6540f8 --- /dev/null +++ b/faker/humor/build.gradle.kts @@ -0,0 +1,4 @@ +plugins { + `faker-lib-conventions` + `faker-provider-conventions` +} diff --git a/faker/humor/src/integration/kotlin/io/github/serpro69/kfaker/humor/HumorFakerIT.kt b/faker/humor/src/integration/kotlin/io/github/serpro69/kfaker/humor/HumorFakerIT.kt new file mode 100644 index 000000000..28d0f7037 --- /dev/null +++ b/faker/humor/src/integration/kotlin/io/github/serpro69/kfaker/humor/HumorFakerIT.kt @@ -0,0 +1,11 @@ +package io.github.serpro69.kfaker.humor + +import io.github.serpro69.kfaker.test.helper.`every public function in each provider is invoked without exceptions` +import io.github.serpro69.kfaker.test.helper.`faker instance is initialized with custom locale` +import io.kotest.core.spec.style.DescribeSpec + +class HumorFakerIT : DescribeSpec({ + `every public function in each provider is invoked without exceptions`(HumorFaker()) + + `faker instance is initialized with custom locale` { faker { } } +}) diff --git a/faker/humor/src/main/kotlin/io/github/serpro69/kfaker/humor/HumorFaker.kt b/faker/humor/src/main/kotlin/io/github/serpro69/kfaker/humor/HumorFaker.kt new file mode 100644 index 000000000..f85f92049 --- /dev/null +++ b/faker/humor/src/main/kotlin/io/github/serpro69/kfaker/humor/HumorFaker.kt @@ -0,0 +1,52 @@ +package io.github.serpro69.kfaker.humor + +import io.github.serpro69.kfaker.AbstractFaker +import io.github.serpro69.kfaker.FakerConfig +import io.github.serpro69.kfaker.FakerDsl +import io.github.serpro69.kfaker.fakerConfig +import io.github.serpro69.kfaker.humor.provider.Chiquito +import io.github.serpro69.kfaker.humor.provider.ChuckNorris +import io.github.serpro69.kfaker.humor.provider.FunnyName +import io.github.serpro69.kfaker.humor.provider.JackHandey +import io.github.serpro69.kfaker.humor.provider.MitchHedberg + +/** + * Typealias for the [HumorFaker] + */ +typealias Faker = HumorFaker + +/** + * Provides access to fake data generators within the Humor domain. + * + * Each category (generator) from this [HumorFaker] is represented by a property + * that (usually) has the same name as the `.yml` dictionary file. + * + * @property unique global provider for generation of unique values. + */ +@Suppress("unused") +class HumorFaker @JvmOverloads constructor(config: FakerConfig = fakerConfig { }) : AbstractFaker(config) { + + val chiquito: Chiquito by lazy { Chiquito(fakerService) } + val chuckNorris: ChuckNorris by lazy { ChuckNorris(fakerService) } + val funnyName: FunnyName by lazy { FunnyName(fakerService) } + val jackHandey: JackHandey by lazy { JackHandey(fakerService) } + val mitchHedberg: MitchHedberg by lazy { MitchHedberg(fakerService) } + + @FakerDsl + /** + * DSL builder for creating instances of [Faker] + */ + class Builder internal constructor() : AbstractFaker.Builder() { + + /** + * Builds an instance of [Faker] with this [config]. + */ + override fun build(): Faker = Faker(config) + } +} + +/** + * Applies the [block] function to [HumorFaker.Builder] + * and returns as an instance of [HumorFaker] from that builder. + */ +fun faker(block: HumorFaker.Builder.() -> Unit): HumorFaker = HumorFaker.Builder().apply(block).build() diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Chiquito.kt b/faker/humor/src/main/kotlin/io/github/serpro69/kfaker/humor/provider/Chiquito.kt similarity index 74% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/Chiquito.kt rename to faker/humor/src/main/kotlin/io/github/serpro69/kfaker/humor/provider/Chiquito.kt index 395e4fd75..46f7890c1 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Chiquito.kt +++ b/faker/humor/src/main/kotlin/io/github/serpro69/kfaker/humor/provider/Chiquito.kt @@ -1,7 +1,9 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.humor.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/ChuckNorris.kt b/faker/humor/src/main/kotlin/io/github/serpro69/kfaker/humor/provider/ChuckNorris.kt similarity index 71% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/ChuckNorris.kt rename to faker/humor/src/main/kotlin/io/github/serpro69/kfaker/humor/provider/ChuckNorris.kt index dcb4d404e..ae5809577 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/ChuckNorris.kt +++ b/faker/humor/src/main/kotlin/io/github/serpro69/kfaker/humor/provider/ChuckNorris.kt @@ -1,7 +1,9 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.humor.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/FunnyName.kt b/faker/humor/src/main/kotlin/io/github/serpro69/kfaker/humor/provider/FunnyName.kt similarity index 71% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/FunnyName.kt rename to faker/humor/src/main/kotlin/io/github/serpro69/kfaker/humor/provider/FunnyName.kt index 533335071..9f25fd47d 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/FunnyName.kt +++ b/faker/humor/src/main/kotlin/io/github/serpro69/kfaker/humor/provider/FunnyName.kt @@ -1,7 +1,9 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.humor.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/JackHandey.kt b/faker/humor/src/main/kotlin/io/github/serpro69/kfaker/humor/provider/JackHandey.kt similarity index 70% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/JackHandey.kt rename to faker/humor/src/main/kotlin/io/github/serpro69/kfaker/humor/provider/JackHandey.kt index f142ff566..761a5dbdd 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/JackHandey.kt +++ b/faker/humor/src/main/kotlin/io/github/serpro69/kfaker/humor/provider/JackHandey.kt @@ -1,9 +1,12 @@ @file:Suppress("unused") -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.humor.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.Category +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/MitchHedberg.kt b/faker/humor/src/main/kotlin/io/github/serpro69/kfaker/humor/provider/MitchHedberg.kt similarity index 70% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/MitchHedberg.kt rename to faker/humor/src/main/kotlin/io/github/serpro69/kfaker/humor/provider/MitchHedberg.kt index 13d8cef2d..f3587d553 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/MitchHedberg.kt +++ b/faker/humor/src/main/kotlin/io/github/serpro69/kfaker/humor/provider/MitchHedberg.kt @@ -1,7 +1,10 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.humor.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.Category +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/faker/japmedia/README.md b/faker/japmedia/README.md new file mode 100644 index 000000000..51cf82c90 --- /dev/null +++ b/faker/japmedia/README.md @@ -0,0 +1,54 @@ +## `JapaneseMediaFaker` + +[![Maven Central](https://img.shields.io/maven-central/v/io.github.serpro69/kotlin-faker-japmedia?style=for-the-badge)](https://search.maven.org/artifact/io.github.serpro69/kotlin-faker-japmedia) +[![Sonatype Nexus (Snapshots)](https://img.shields.io/nexus/s/io.github.serpro69/kotlin-faker-japmedia?label=snapshot-version&server=https%3A%2F%2Foss.sonatype.org&style=for-the-badge&color=yellow)](#downloading) + +Provides access to fake data generators within the Japanese Media domain. + +## Usage + +Documentation for kotlin-faker is available at [serpro69.github.io/kotlin-faker/](https://serpro69.github.io/kotlin-faker/). + +### Downloading + +Latest releases are always available on maven central. + +**With gradle** + +```groovy +dependencies { + implementation 'io.github.serpro69:kotlin-faker:$version' + implementation 'io.github.serpro69:kotlin-faker-japmedia:$version' +} +``` + +**With maven** + +```xml + + + io.github.serpro69 + kotlin-faker + ${version} + + + io.github.serpro69 + kotlin-faker-japmedia + ${version} + + +``` + +_NB! An additional fake data provider like 'japmedia' requires the main `kotlin-faker` dependency to be on the classpath._ + +### Generating data + +```kotlin +// NB! the package you import if using multiple fakers +import io.github.serpro69.kfaker.japmedia.faker + +val faker = faker { } + +faker.onePiece.characters() +faker.studioGhibli.characters() +``` diff --git a/faker/japmedia/build.gradle.kts b/faker/japmedia/build.gradle.kts new file mode 100644 index 000000000..55f6540f8 --- /dev/null +++ b/faker/japmedia/build.gradle.kts @@ -0,0 +1,4 @@ +plugins { + `faker-lib-conventions` + `faker-provider-conventions` +} diff --git a/faker/japmedia/src/integration/kotlin/io/github/serpro69/kfaker/japmedia/JapaneseMediaFakerIT.kt b/faker/japmedia/src/integration/kotlin/io/github/serpro69/kfaker/japmedia/JapaneseMediaFakerIT.kt new file mode 100644 index 000000000..1913eb14a --- /dev/null +++ b/faker/japmedia/src/integration/kotlin/io/github/serpro69/kfaker/japmedia/JapaneseMediaFakerIT.kt @@ -0,0 +1,11 @@ +package io.github.serpro69.kfaker.japmedia + +import io.github.serpro69.kfaker.test.helper.`every public function in each provider is invoked without exceptions` +import io.github.serpro69.kfaker.test.helper.`faker instance is initialized with custom locale` +import io.kotest.core.spec.style.DescribeSpec + +class JapaneseMediaFakerIT : DescribeSpec({ + `every public function in each provider is invoked without exceptions`(JapaneseMediaFaker()) + + `faker instance is initialized with custom locale` { faker { } } +}) diff --git a/faker/japmedia/src/main/kotlin/io/github/serpro69/kfaker/japmedia/JapaneseMediaFaker.kt b/faker/japmedia/src/main/kotlin/io/github/serpro69/kfaker/japmedia/JapaneseMediaFaker.kt new file mode 100644 index 000000000..1701c2528 --- /dev/null +++ b/faker/japmedia/src/main/kotlin/io/github/serpro69/kfaker/japmedia/JapaneseMediaFaker.kt @@ -0,0 +1,62 @@ +package io.github.serpro69.kfaker.japmedia + +import io.github.serpro69.kfaker.AbstractFaker +import io.github.serpro69.kfaker.FakerConfig +import io.github.serpro69.kfaker.FakerDsl +import io.github.serpro69.kfaker.fakerConfig +import io.github.serpro69.kfaker.japmedia.provider.Conan +import io.github.serpro69.kfaker.japmedia.provider.CowboyBebop +import io.github.serpro69.kfaker.japmedia.provider.Doraemon +import io.github.serpro69.kfaker.japmedia.provider.DragonBall +import io.github.serpro69.kfaker.japmedia.provider.FmaBrotherhood +import io.github.serpro69.kfaker.japmedia.provider.KamenRider +import io.github.serpro69.kfaker.japmedia.provider.Naruto +import io.github.serpro69.kfaker.japmedia.provider.OnePiece +import io.github.serpro69.kfaker.japmedia.provider.StudioGhibli +import io.github.serpro69.kfaker.japmedia.provider.SwordArtOnline + +/** + * Typealias for the [JapaneseMediaFaker] + */ +typealias Faker = JapaneseMediaFaker + +/** + * Provides access to fake data generators within the JapaneseMedia domain. + * + * Each category (generator) from this [JapaneseMediaFaker] is represented by a property + * that (usually) has the same name as the `.yml` dictionary file. + * + * @property unique global provider for generation of unique values. + */ +@Suppress("unused") +class JapaneseMediaFaker @JvmOverloads constructor(config: FakerConfig = fakerConfig { }) : AbstractFaker(config) { + + val conan: Conan by lazy { Conan(fakerService) } + val cowboyBebop: CowboyBebop by lazy { CowboyBebop(fakerService) } + val doraemon: Doraemon by lazy { Doraemon(fakerService) } + val dragonBall: DragonBall by lazy { DragonBall(fakerService) } + val fmaBrotherhood: FmaBrotherhood by lazy { FmaBrotherhood(fakerService) } + val kamenRider: KamenRider by lazy { KamenRider(fakerService) } + val naruto: Naruto by lazy { Naruto(fakerService) } + val onePiece: OnePiece by lazy { OnePiece(fakerService) } + val studioGhibli: StudioGhibli by lazy { StudioGhibli(fakerService) } + val swordArtOnline: SwordArtOnline by lazy { SwordArtOnline(fakerService) } + + @FakerDsl + /** + * DSL builder for creating instances of [Faker] + */ + class Builder internal constructor() : AbstractFaker.Builder() { + + /** + * Builds an instance of [Faker] with this [config]. + */ + override fun build(): Faker = Faker(config) + } +} + +/** + * Applies the [block] function to [JapaneseMediaFaker.Builder] + * and returns as an instance of [JapaneseMediaFaker] from that builder. + */ +fun faker(block: JapaneseMediaFaker.Builder.() -> Unit): JapaneseMediaFaker = JapaneseMediaFaker.Builder().apply(block).build() diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Conan.kt b/faker/japmedia/src/main/kotlin/io/github/serpro69/kfaker/japmedia/provider/Conan.kt similarity index 61% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/Conan.kt rename to faker/japmedia/src/main/kotlin/io/github/serpro69/kfaker/japmedia/provider/Conan.kt index b32662515..d18aca705 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Conan.kt +++ b/faker/japmedia/src/main/kotlin/io/github/serpro69/kfaker/japmedia/provider/Conan.kt @@ -1,17 +1,17 @@ -@file:Suppress("unused") +package io.github.serpro69.kfaker.japmedia.provider -package io.github.serpro69.kfaker.provider - -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate /** * [FakeDataProvider] implementation for [YamlCategory.CONAN] category. */ -class Conan internal constructor(fakerService: FakerService) : - YamlFakeDataProvider(fakerService) { +@Suppress("unused") +class Conan internal constructor(fakerService: FakerService) : YamlFakeDataProvider(fakerService) { override val yamlCategory = YamlCategory.CONAN override val localUniqueDataProvider = LocalUniqueDataProvider() override val unique by UniqueProviderDelegate(localUniqueDataProvider) diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/CowboyBebop.kt b/faker/japmedia/src/main/kotlin/io/github/serpro69/kfaker/japmedia/provider/CowboyBebop.kt similarity index 74% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/CowboyBebop.kt rename to faker/japmedia/src/main/kotlin/io/github/serpro69/kfaker/japmedia/provider/CowboyBebop.kt index b1be5c544..9fbaef44d 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/CowboyBebop.kt +++ b/faker/japmedia/src/main/kotlin/io/github/serpro69/kfaker/japmedia/provider/CowboyBebop.kt @@ -1,7 +1,9 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.japmedia.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Doraemon.kt b/faker/japmedia/src/main/kotlin/io/github/serpro69/kfaker/japmedia/provider/Doraemon.kt similarity index 67% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/Doraemon.kt rename to faker/japmedia/src/main/kotlin/io/github/serpro69/kfaker/japmedia/provider/Doraemon.kt index ae712bbf2..25dc118a2 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Doraemon.kt +++ b/faker/japmedia/src/main/kotlin/io/github/serpro69/kfaker/japmedia/provider/Doraemon.kt @@ -1,17 +1,17 @@ -@file:Suppress("unused") +package io.github.serpro69.kfaker.japmedia.provider -package io.github.serpro69.kfaker.provider - -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate /** * [FakeDataProvider] implementation for [YamlCategory.DORAEMON] category. */ -class Doraemon internal constructor(fakerService: FakerService) : - YamlFakeDataProvider(fakerService) { +@Suppress("unused") +class Doraemon internal constructor(fakerService: FakerService) : YamlFakeDataProvider(fakerService) { override val yamlCategory = YamlCategory.DORAEMON override val localUniqueDataProvider = LocalUniqueDataProvider() override val unique by UniqueProviderDelegate(localUniqueDataProvider) diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/DragonBall.kt b/faker/japmedia/src/main/kotlin/io/github/serpro69/kfaker/japmedia/provider/DragonBall.kt similarity index 73% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/DragonBall.kt rename to faker/japmedia/src/main/kotlin/io/github/serpro69/kfaker/japmedia/provider/DragonBall.kt index 023fbc6fe..fdc7537b0 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/DragonBall.kt +++ b/faker/japmedia/src/main/kotlin/io/github/serpro69/kfaker/japmedia/provider/DragonBall.kt @@ -1,7 +1,9 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.japmedia.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/FmaBrotherhood.kt b/faker/japmedia/src/main/kotlin/io/github/serpro69/kfaker/japmedia/provider/FmaBrotherhood.kt similarity index 67% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/FmaBrotherhood.kt rename to faker/japmedia/src/main/kotlin/io/github/serpro69/kfaker/japmedia/provider/FmaBrotherhood.kt index 6d92a3a3b..1ab93039f 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/FmaBrotherhood.kt +++ b/faker/japmedia/src/main/kotlin/io/github/serpro69/kfaker/japmedia/provider/FmaBrotherhood.kt @@ -1,17 +1,17 @@ -@file:Suppress("unused") +package io.github.serpro69.kfaker.japmedia.provider -package io.github.serpro69.kfaker.provider - -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate /** * [FakeDataProvider] implementation for [YamlCategory.FMA_BROTHERHOOD] category. */ -class FmaBrotherhood internal constructor(fakerService: FakerService) : - YamlFakeDataProvider(fakerService) { +@Suppress("unused") +class FmaBrotherhood internal constructor(fakerService: FakerService) : YamlFakeDataProvider(fakerService) { override val yamlCategory = YamlCategory.FMA_BROTHERHOOD override val localUniqueDataProvider = LocalUniqueDataProvider() override val unique by UniqueProviderDelegate(localUniqueDataProvider) diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/KamenRider.kt b/faker/japmedia/src/main/kotlin/io/github/serpro69/kfaker/japmedia/provider/KamenRider.kt similarity index 90% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/KamenRider.kt rename to faker/japmedia/src/main/kotlin/io/github/serpro69/kfaker/japmedia/provider/KamenRider.kt index 3fbeb8fa2..916ad60b0 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/KamenRider.kt +++ b/faker/japmedia/src/main/kotlin/io/github/serpro69/kfaker/japmedia/provider/KamenRider.kt @@ -1,15 +1,16 @@ -@file:Suppress("unused") +package io.github.serpro69.kfaker.japmedia.provider -package io.github.serpro69.kfaker.provider - -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate /** * [FakeDataProvider] implementation for [YamlCategory.KAMEN_RIDER] category. */ +@Suppress("unused") class KamenRider internal constructor(fakerService: FakerService) : YamlFakeDataProvider(fakerService) { override val yamlCategory = YamlCategory.KAMEN_RIDER diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Naruto.kt b/faker/japmedia/src/main/kotlin/io/github/serpro69/kfaker/japmedia/provider/Naruto.kt similarity index 62% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/Naruto.kt rename to faker/japmedia/src/main/kotlin/io/github/serpro69/kfaker/japmedia/provider/Naruto.kt index 20581c9b4..a13751f14 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Naruto.kt +++ b/faker/japmedia/src/main/kotlin/io/github/serpro69/kfaker/japmedia/provider/Naruto.kt @@ -1,17 +1,17 @@ -@file:Suppress("unused") +package io.github.serpro69.kfaker.japmedia.provider -package io.github.serpro69.kfaker.provider - -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate /** * [FakeDataProvider] implementation for [YamlCategory.NARUTO] category. */ -class Naruto internal constructor(fakerService: FakerService) : - YamlFakeDataProvider(fakerService) { +@Suppress("unused") +class Naruto internal constructor(fakerService: FakerService) : YamlFakeDataProvider(fakerService) { override val yamlCategory = YamlCategory.NARUTO override val localUniqueDataProvider = LocalUniqueDataProvider() override val unique by UniqueProviderDelegate(localUniqueDataProvider) diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/OnePiece.kt b/faker/japmedia/src/main/kotlin/io/github/serpro69/kfaker/japmedia/provider/OnePiece.kt similarity index 79% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/OnePiece.kt rename to faker/japmedia/src/main/kotlin/io/github/serpro69/kfaker/japmedia/provider/OnePiece.kt index 06d0d12a5..c26ae1526 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/OnePiece.kt +++ b/faker/japmedia/src/main/kotlin/io/github/serpro69/kfaker/japmedia/provider/OnePiece.kt @@ -1,7 +1,9 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.japmedia.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate @@ -23,6 +25,7 @@ class OnePiece internal constructor(fakerService: FakerService) : YamlFakeDataPr fun islands() = resolve("islands") fun locations() = resolve("locations") fun quotes() = resolve("quotes") + @Deprecated( message = "This is deprecated and will be removed in future releases", replaceWith = ReplaceWith("akumaNoMi"), diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/StudioGhibli.kt b/faker/japmedia/src/main/kotlin/io/github/serpro69/kfaker/japmedia/provider/StudioGhibli.kt similarity index 67% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/StudioGhibli.kt rename to faker/japmedia/src/main/kotlin/io/github/serpro69/kfaker/japmedia/provider/StudioGhibli.kt index 7aeb07f1e..35b655eff 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/StudioGhibli.kt +++ b/faker/japmedia/src/main/kotlin/io/github/serpro69/kfaker/japmedia/provider/StudioGhibli.kt @@ -1,17 +1,17 @@ -@file:Suppress("unused") +package io.github.serpro69.kfaker.japmedia.provider -package io.github.serpro69.kfaker.provider - -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate /** * [FakeDataProvider] implementation for [YamlCategory.STUDIO_GHIBLI] category. */ -class StudioGhibli internal constructor(fakerService: FakerService) : - YamlFakeDataProvider(fakerService) { +@Suppress("unused") +class StudioGhibli internal constructor(fakerService: FakerService) : YamlFakeDataProvider(fakerService) { override val yamlCategory = YamlCategory.STUDIO_GHIBLI override val localUniqueDataProvider = LocalUniqueDataProvider() override val unique by UniqueProviderDelegate(localUniqueDataProvider) diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/SwordArtOnline.kt b/faker/japmedia/src/main/kotlin/io/github/serpro69/kfaker/japmedia/provider/SwordArtOnline.kt similarity index 74% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/SwordArtOnline.kt rename to faker/japmedia/src/main/kotlin/io/github/serpro69/kfaker/japmedia/provider/SwordArtOnline.kt index d3198e68d..88d5b39a3 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/SwordArtOnline.kt +++ b/faker/japmedia/src/main/kotlin/io/github/serpro69/kfaker/japmedia/provider/SwordArtOnline.kt @@ -1,7 +1,9 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.japmedia.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/faker/lorem/README.md b/faker/lorem/README.md new file mode 100644 index 000000000..1c4b504d9 --- /dev/null +++ b/faker/lorem/README.md @@ -0,0 +1,54 @@ +## `LoremFaker` + +[![Maven Central](https://img.shields.io/maven-central/v/io.github.serpro69/kotlin-faker-lorem?style=for-the-badge)](https://search.maven.org/artifact/io.github.serpro69/kotlin-faker-lorem) +[![Sonatype Nexus (Snapshots)](https://img.shields.io/nexus/s/io.github.serpro69/kotlin-faker-lorem?label=snapshot-version&server=https%3A%2F%2Foss.sonatype.org&style=for-the-badge&color=yellow)](#downloading) + +Provides access to fake data generators within the Lorem domain. + +## Usage + +Documentation for kotlin-faker is available at [serpro69.github.io/kotlin-faker/](https://serpro69.github.io/kotlin-faker/). + +### Downloading + +Latest releases are always available on maven central. + +**With gradle** + +```groovy +dependencies { + implementation 'io.github.serpro69:kotlin-faker:$version' + implementation 'io.github.serpro69:kotlin-faker-lorem:$version' +} +``` + +**With maven** + +```xml + + + io.github.serpro69 + kotlin-faker + ${version} + + + io.github.serpro69 + kotlin-faker-lorem + ${version} + + +``` + +_NB! An additional fake data provider like 'lorem' requires the main `kotlin-faker` dependency to be on the classpath._ + +### Generating data + +```kotlin +// NB! the package you import if using multiple fakers +import io.github.serpro69.kfaker.lorem.faker + +val faker = faker { } + +faker.adjective.positive() +faker.verbs.base() +``` diff --git a/faker/lorem/build.gradle.kts b/faker/lorem/build.gradle.kts new file mode 100644 index 000000000..55f6540f8 --- /dev/null +++ b/faker/lorem/build.gradle.kts @@ -0,0 +1,4 @@ +plugins { + `faker-lib-conventions` + `faker-provider-conventions` +} diff --git a/faker/lorem/src/integration/kotlin/io/github/serpro69/kfaker/lorem/LoremFakerIT.kt b/faker/lorem/src/integration/kotlin/io/github/serpro69/kfaker/lorem/LoremFakerIT.kt new file mode 100644 index 000000000..267cc7cc2 --- /dev/null +++ b/faker/lorem/src/integration/kotlin/io/github/serpro69/kfaker/lorem/LoremFakerIT.kt @@ -0,0 +1,11 @@ +package io.github.serpro69.kfaker.lorem + +import io.github.serpro69.kfaker.test.helper.`every public function in each provider is invoked without exceptions` +import io.github.serpro69.kfaker.test.helper.`faker instance is initialized with custom locale` +import io.kotest.core.spec.style.DescribeSpec + +class LoremFakerIT : DescribeSpec({ + `every public function in each provider is invoked without exceptions`(LoremFaker()) + + `faker instance is initialized with custom locale` { faker { } } +}) diff --git a/faker/lorem/src/main/kotlin/io/github/serpro69/kfaker/lorem/LoremFaker.kt b/faker/lorem/src/main/kotlin/io/github/serpro69/kfaker/lorem/LoremFaker.kt new file mode 100644 index 000000000..f8295b7e8 --- /dev/null +++ b/faker/lorem/src/main/kotlin/io/github/serpro69/kfaker/lorem/LoremFaker.kt @@ -0,0 +1,60 @@ +package io.github.serpro69.kfaker.lorem + +import io.github.serpro69.kfaker.AbstractFaker +import io.github.serpro69.kfaker.FakerConfig +import io.github.serpro69.kfaker.FakerDsl +import io.github.serpro69.kfaker.fakerConfig +import io.github.serpro69.kfaker.lorem.provider.Adjective +import io.github.serpro69.kfaker.lorem.provider.Emotion +import io.github.serpro69.kfaker.lorem.provider.Hipster +import io.github.serpro69.kfaker.lorem.provider.Lorem +import io.github.serpro69.kfaker.lorem.provider.Markdown +import io.github.serpro69.kfaker.lorem.provider.NatoPhoneticAlphabet +import io.github.serpro69.kfaker.lorem.provider.Quote +import io.github.serpro69.kfaker.lorem.provider.SlackEmoji +import io.github.serpro69.kfaker.lorem.provider.Verbs + +/** + * Typealias for the [LoremFaker] + */ +typealias Faker = LoremFaker + +/** + * Provides access to fake data generators within the Lorem domain. + * + * Each category (generator) from this [LoremFaker] is represented by a property + * that (usually) has the same name as the `.yml` dictionary file. + * + * @property unique global provider for generation of unique values. + */ +@Suppress("unused") +class LoremFaker @JvmOverloads constructor(config: FakerConfig = fakerConfig { }) : AbstractFaker(config) { + + val adjective: Adjective by lazy { Adjective(fakerService) } + val emotion: Emotion by lazy { Emotion(fakerService) } + val hipster: Hipster by lazy { Hipster(fakerService) } + val lorem: Lorem by lazy { Lorem(fakerService) } + val markdown: Markdown by lazy { Markdown(fakerService) } + val natoPhoneticAlphabet: NatoPhoneticAlphabet by lazy { NatoPhoneticAlphabet(fakerService) } + val slackEmoji: SlackEmoji by lazy { SlackEmoji(fakerService) } + val quote: Quote by lazy { Quote(fakerService) } + val verbs: Verbs by lazy { Verbs(fakerService) } + + @FakerDsl + /** + * DSL builder for creating instances of [Faker] + */ + class Builder internal constructor() : AbstractFaker.Builder() { + + /** + * Builds an instance of [Faker] with this [config]. + */ + override fun build(): Faker = Faker(config) + } +} + +/** + * Applies the [block] function to [LoremFaker.Builder] + * and returns as an instance of [LoremFaker] from that builder. + */ +fun faker(block: LoremFaker.Builder.() -> Unit): LoremFaker = LoremFaker.Builder().apply(block).build() diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Adjective.kt b/faker/lorem/src/main/kotlin/io/github/serpro69/kfaker/lorem/provider/Adjective.kt similarity index 70% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/Adjective.kt rename to faker/lorem/src/main/kotlin/io/github/serpro69/kfaker/lorem/provider/Adjective.kt index e5cc4a457..2b8bc063a 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Adjective.kt +++ b/faker/lorem/src/main/kotlin/io/github/serpro69/kfaker/lorem/provider/Adjective.kt @@ -1,15 +1,16 @@ -@file:Suppress("unused") +package io.github.serpro69.kfaker.lorem.provider -package io.github.serpro69.kfaker.provider - -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate /** * [FakeDataProvider] implementation for [YamlCategory.ADJECTIVE] category. */ +@Suppress("unused") class Adjective internal constructor(fakerService: FakerService) : YamlFakeDataProvider(fakerService) { override val yamlCategory = YamlCategory.ADJECTIVE override val localUniqueDataProvider = LocalUniqueDataProvider() diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Emotion.kt b/faker/lorem/src/main/kotlin/io/github/serpro69/kfaker/lorem/provider/Emotion.kt similarity index 70% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/Emotion.kt rename to faker/lorem/src/main/kotlin/io/github/serpro69/kfaker/lorem/provider/Emotion.kt index 1c8fbfd4a..6dedd9903 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Emotion.kt +++ b/faker/lorem/src/main/kotlin/io/github/serpro69/kfaker/lorem/provider/Emotion.kt @@ -1,15 +1,16 @@ -@file:Suppress("unused") +package io.github.serpro69.kfaker.lorem.provider -package io.github.serpro69.kfaker.provider - -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate /** * [FakeDataProvider] implementation for [YamlCategory.EMOTION] category. */ +@Suppress("unused") class Emotion internal constructor(fakerService: FakerService) : YamlFakeDataProvider(fakerService) { override val yamlCategory = YamlCategory.EMOTION diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Hipster.kt b/faker/lorem/src/main/kotlin/io/github/serpro69/kfaker/lorem/provider/Hipster.kt similarity index 70% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/Hipster.kt rename to faker/lorem/src/main/kotlin/io/github/serpro69/kfaker/lorem/provider/Hipster.kt index cc5286c28..218bdc7e7 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Hipster.kt +++ b/faker/lorem/src/main/kotlin/io/github/serpro69/kfaker/lorem/provider/Hipster.kt @@ -1,7 +1,9 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.lorem.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Lorem.kt b/faker/lorem/src/main/kotlin/io/github/serpro69/kfaker/lorem/provider/Lorem.kt similarity index 77% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/Lorem.kt rename to faker/lorem/src/main/kotlin/io/github/serpro69/kfaker/lorem/provider/Lorem.kt index a6d10ed1c..752374f78 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Lorem.kt +++ b/faker/lorem/src/main/kotlin/io/github/serpro69/kfaker/lorem/provider/Lorem.kt @@ -1,7 +1,9 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.lorem.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Markdown.kt b/faker/lorem/src/main/kotlin/io/github/serpro69/kfaker/lorem/provider/Markdown.kt similarity index 72% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/Markdown.kt rename to faker/lorem/src/main/kotlin/io/github/serpro69/kfaker/lorem/provider/Markdown.kt index 925d66f03..d17c27190 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Markdown.kt +++ b/faker/lorem/src/main/kotlin/io/github/serpro69/kfaker/lorem/provider/Markdown.kt @@ -1,7 +1,9 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.lorem.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/NatoPhoneticAlphabet.kt b/faker/lorem/src/main/kotlin/io/github/serpro69/kfaker/lorem/provider/NatoPhoneticAlphabet.kt similarity index 72% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/NatoPhoneticAlphabet.kt rename to faker/lorem/src/main/kotlin/io/github/serpro69/kfaker/lorem/provider/NatoPhoneticAlphabet.kt index 65bce07ab..276b52ef2 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/NatoPhoneticAlphabet.kt +++ b/faker/lorem/src/main/kotlin/io/github/serpro69/kfaker/lorem/provider/NatoPhoneticAlphabet.kt @@ -1,7 +1,9 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.lorem.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Quote.kt b/faker/lorem/src/main/kotlin/io/github/serpro69/kfaker/lorem/provider/Quote.kt similarity index 77% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/Quote.kt rename to faker/lorem/src/main/kotlin/io/github/serpro69/kfaker/lorem/provider/Quote.kt index bd2a86fd6..764e2c285 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Quote.kt +++ b/faker/lorem/src/main/kotlin/io/github/serpro69/kfaker/lorem/provider/Quote.kt @@ -1,7 +1,9 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.lorem.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/SlackEmoji.kt b/faker/lorem/src/main/kotlin/io/github/serpro69/kfaker/lorem/provider/SlackEmoji.kt similarity index 79% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/SlackEmoji.kt rename to faker/lorem/src/main/kotlin/io/github/serpro69/kfaker/lorem/provider/SlackEmoji.kt index aa22896c7..1d29d5993 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/SlackEmoji.kt +++ b/faker/lorem/src/main/kotlin/io/github/serpro69/kfaker/lorem/provider/SlackEmoji.kt @@ -1,7 +1,9 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.lorem.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Verbs.kt b/faker/lorem/src/main/kotlin/io/github/serpro69/kfaker/lorem/provider/Verbs.kt similarity index 75% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/Verbs.kt rename to faker/lorem/src/main/kotlin/io/github/serpro69/kfaker/lorem/provider/Verbs.kt index 47648ce7a..897a652e9 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Verbs.kt +++ b/faker/lorem/src/main/kotlin/io/github/serpro69/kfaker/lorem/provider/Verbs.kt @@ -1,7 +1,9 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.lorem.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/faker/misc/README.md b/faker/misc/README.md new file mode 100644 index 000000000..1a420ff19 --- /dev/null +++ b/faker/misc/README.md @@ -0,0 +1,54 @@ +## `MiscFaker` + +[![Maven Central](https://img.shields.io/maven-central/v/io.github.serpro69/kotlin-faker-misc?style=for-the-badge)](https://search.maven.org/artifact/io.github.serpro69/kotlin-faker-misc) +[![Sonatype Nexus (Snapshots)](https://img.shields.io/nexus/s/io.github.serpro69/kotlin-faker-misc?label=snapshot-version&server=https%3A%2F%2Foss.sonatype.org&style=for-the-badge&color=yellow)](#downloading) + +Provides access to fake data generators that don't belong in the core Faker, but also don't fit into any of the existing providers. + +## Usage + +Documentation for kotlin-faker is available at [serpro69.github.io/kotlin-faker/](https://serpro69.github.io/kotlin-faker/). + +### Downloading + +Latest releases are always available on maven central. + +**With gradle** + +```groovy +dependencies { + implementation 'io.github.serpro69:kotlin-faker:$version' + implementation 'io.github.serpro69:kotlin-faker-misc:$version' +} +``` + +**With maven** + +```xml + + + io.github.serpro69 + kotlin-faker + ${version} + + + io.github.serpro69 + kotlin-faker-misc + ${version} + + +``` + +_NB! An additional fake data provider like 'misc' requires the main `kotlin-faker` dependency to be on the classpath._ + +### Generating data + +```kotlin +// NB! the package you import if using multiple fakers +import io.github.serpro69.kfaker.misc.faker + +val faker = faker { } + +faker.artist.names() +faker.hobby.activity() +``` diff --git a/faker/misc/build.gradle.kts b/faker/misc/build.gradle.kts new file mode 100644 index 000000000..55f6540f8 --- /dev/null +++ b/faker/misc/build.gradle.kts @@ -0,0 +1,4 @@ +plugins { + `faker-lib-conventions` + `faker-provider-conventions` +} diff --git a/faker/misc/src/integration/kotlin/io/github/serpro69/kfaker/misc/MiscFakerIT.kt b/faker/misc/src/integration/kotlin/io/github/serpro69/kfaker/misc/MiscFakerIT.kt new file mode 100644 index 000000000..b1f280ba1 --- /dev/null +++ b/faker/misc/src/integration/kotlin/io/github/serpro69/kfaker/misc/MiscFakerIT.kt @@ -0,0 +1,11 @@ +package io.github.serpro69.kfaker.misc + +import io.github.serpro69.kfaker.test.helper.`every public function in each provider is invoked without exceptions` +import io.github.serpro69.kfaker.test.helper.`faker instance is initialized with custom locale` +import io.kotest.core.spec.style.DescribeSpec + +class MiscFakerIT : DescribeSpec({ + `every public function in each provider is invoked without exceptions`(MiscFaker()) + + `faker instance is initialized with custom locale` { faker { } } +}) diff --git a/faker/misc/src/main/kotlin/io/github/serpro69/kfaker/misc/MiscFaker.kt b/faker/misc/src/main/kotlin/io/github/serpro69/kfaker/misc/MiscFaker.kt new file mode 100644 index 000000000..975f1d829 --- /dev/null +++ b/faker/misc/src/main/kotlin/io/github/serpro69/kfaker/misc/MiscFaker.kt @@ -0,0 +1,60 @@ +package io.github.serpro69.kfaker.misc + +import io.github.serpro69.kfaker.AbstractFaker +import io.github.serpro69.kfaker.FakerConfig +import io.github.serpro69.kfaker.FakerDsl +import io.github.serpro69.kfaker.fakerConfig +import io.github.serpro69.kfaker.misc.provider.Artist +import io.github.serpro69.kfaker.misc.provider.Blood +import io.github.serpro69.kfaker.misc.provider.Demographic +import io.github.serpro69.kfaker.misc.provider.DrivingLicense +import io.github.serpro69.kfaker.misc.provider.GreekPhilosophers +import io.github.serpro69.kfaker.misc.provider.Hobby +import io.github.serpro69.kfaker.misc.provider.Military +import io.github.serpro69.kfaker.misc.provider.Relationship +import io.github.serpro69.kfaker.Faker as CoreFaker + +/** + * Typealias for the [MiscFaker] + */ +typealias Faker = MiscFaker + +/** + * Provides access to fake data generators that don't belong in the [CoreFaker] + * but also don't fit into any of the existing providers. + * + * Each category (generator) from this [MiscFaker] is represented by a property + * that (usually) has the same name as the `.yml` dictionary file. + * + * @property unique global provider for generation of unique values. + */ +@Suppress("unused") +class MiscFaker @JvmOverloads constructor(config: FakerConfig = fakerConfig { }) : AbstractFaker(config) { + + val artist: Artist by lazy { Artist(fakerService) } + val blood: Blood by lazy { Blood(fakerService) } + val demographic: Demographic by lazy { Demographic(fakerService) } + val drivingLicense: DrivingLicense by lazy { DrivingLicense(fakerService) } + val greekPhilosophers: GreekPhilosophers by lazy { GreekPhilosophers(fakerService) } + val hobby: Hobby by lazy { Hobby(fakerService) } + val military: Military by lazy { Military(fakerService) } + val relationship: Relationship by lazy { Relationship(fakerService) } + + @FakerDsl + /** + * DSL builder for creating instances of [Faker] + */ + class Builder internal constructor() : AbstractFaker.Builder() { + + /** + * Builds an instance of [Faker] with this [config]. + */ + override fun build(): Faker = Faker(config) + } +} + +/** + * Applies the [block] function to [MiscFaker.Builder] + * and returns as an instance of [MiscFaker] from that builder. + */ +fun faker(block: MiscFaker.Builder.() -> Unit): MiscFaker = MiscFaker.Builder().apply(block).build() diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Artist.kt b/faker/misc/src/main/kotlin/io/github/serpro69/kfaker/misc/provider/Artist.kt similarity index 70% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/Artist.kt rename to faker/misc/src/main/kotlin/io/github/serpro69/kfaker/misc/provider/Artist.kt index 374f6c645..d3d97ba07 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Artist.kt +++ b/faker/misc/src/main/kotlin/io/github/serpro69/kfaker/misc/provider/Artist.kt @@ -1,7 +1,9 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.misc.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Blood.kt b/faker/misc/src/main/kotlin/io/github/serpro69/kfaker/misc/provider/Blood.kt similarity index 72% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/Blood.kt rename to faker/misc/src/main/kotlin/io/github/serpro69/kfaker/misc/provider/Blood.kt index 618679c2b..d2af693c5 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Blood.kt +++ b/faker/misc/src/main/kotlin/io/github/serpro69/kfaker/misc/provider/Blood.kt @@ -1,7 +1,9 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.misc.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Demographic.kt b/faker/misc/src/main/kotlin/io/github/serpro69/kfaker/misc/provider/Demographic.kt similarity index 76% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/Demographic.kt rename to faker/misc/src/main/kotlin/io/github/serpro69/kfaker/misc/provider/Demographic.kt index 84e2400f5..b73a804fa 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Demographic.kt +++ b/faker/misc/src/main/kotlin/io/github/serpro69/kfaker/misc/provider/Demographic.kt @@ -1,7 +1,9 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.misc.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/DrivingLicense.kt b/faker/misc/src/main/kotlin/io/github/serpro69/kfaker/misc/provider/DrivingLicense.kt similarity index 75% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/DrivingLicense.kt rename to faker/misc/src/main/kotlin/io/github/serpro69/kfaker/misc/provider/DrivingLicense.kt index f77145f53..9a7fc9a57 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/DrivingLicense.kt +++ b/faker/misc/src/main/kotlin/io/github/serpro69/kfaker/misc/provider/DrivingLicense.kt @@ -1,7 +1,9 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.misc.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/GreekPhilosophers.kt b/faker/misc/src/main/kotlin/io/github/serpro69/kfaker/misc/provider/GreekPhilosophers.kt similarity index 73% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/GreekPhilosophers.kt rename to faker/misc/src/main/kotlin/io/github/serpro69/kfaker/misc/provider/GreekPhilosophers.kt index 71313e006..4d43ca661 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/GreekPhilosophers.kt +++ b/faker/misc/src/main/kotlin/io/github/serpro69/kfaker/misc/provider/GreekPhilosophers.kt @@ -1,7 +1,9 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.misc.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Hobby.kt b/faker/misc/src/main/kotlin/io/github/serpro69/kfaker/misc/provider/Hobby.kt similarity index 68% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/Hobby.kt rename to faker/misc/src/main/kotlin/io/github/serpro69/kfaker/misc/provider/Hobby.kt index 327f01334..0de5a50b1 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Hobby.kt +++ b/faker/misc/src/main/kotlin/io/github/serpro69/kfaker/misc/provider/Hobby.kt @@ -1,15 +1,16 @@ -@file:Suppress("unused") +package io.github.serpro69.kfaker.misc.provider -package io.github.serpro69.kfaker.provider - -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate /** * [FakeDataProvider] implementation for [YamlCategory.HOBBY] category. */ +@Suppress("unused") class Hobby internal constructor(fakerService: FakerService) : YamlFakeDataProvider(fakerService) { override val yamlCategory = YamlCategory.HOBBY diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Military.kt b/faker/misc/src/main/kotlin/io/github/serpro69/kfaker/misc/provider/Military.kt similarity index 78% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/Military.kt rename to faker/misc/src/main/kotlin/io/github/serpro69/kfaker/misc/provider/Military.kt index 3efc1eae3..ff82a5780 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Military.kt +++ b/faker/misc/src/main/kotlin/io/github/serpro69/kfaker/misc/provider/Military.kt @@ -1,7 +1,9 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.misc.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Relationship.kt b/faker/misc/src/main/kotlin/io/github/serpro69/kfaker/misc/provider/Relationship.kt similarity index 77% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/Relationship.kt rename to faker/misc/src/main/kotlin/io/github/serpro69/kfaker/misc/provider/Relationship.kt index 2bb4f885c..ac9f60da6 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Relationship.kt +++ b/faker/misc/src/main/kotlin/io/github/serpro69/kfaker/misc/provider/Relationship.kt @@ -1,7 +1,9 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.misc.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/faker/movies/README.md b/faker/movies/README.md new file mode 100644 index 000000000..0888f0ae8 --- /dev/null +++ b/faker/movies/README.md @@ -0,0 +1,54 @@ +## `MoviesFaker` + +[![Maven Central](https://img.shields.io/maven-central/v/io.github.serpro69/kotlin-faker-movies?style=for-the-badge)](https://search.maven.org/artifact/io.github.serpro69/kotlin-faker-movies) +[![Sonatype Nexus (Snapshots)](https://img.shields.io/nexus/s/io.github.serpro69/kotlin-faker-movies?label=snapshot-version&server=https%3A%2F%2Foss.sonatype.org&style=for-the-badge&color=yellow)](#downloading) + +Provides access to fake data generators within the Movies domain. + +## Usage + +Documentation for kotlin-faker is available at [serpro69.github.io/kotlin-faker/](https://serpro69.github.io/kotlin-faker/). + +### Downloading + +Latest releases are always available on maven central. + +**With gradle** + +```groovy +dependencies { + implementation 'io.github.serpro69:kotlin-faker:$version' + implementation 'io.github.serpro69:kotlin-faker-movies:$version' +} +``` + +**With maven** + +```xml + + + io.github.serpro69 + kotlin-faker + ${version} + + + io.github.serpro69 + kotlin-faker-movies + ${version} + + +``` + +_NB! An additional fake data provider like 'movies' requires the main `kotlin-faker` dependency to be on the classpath._ + +### Generating data + +```kotlin +// NB! the package you import if using multiple fakers +import io.github.serpro69.kfaker.movies.faker + +val faker = faker { } + +faker.departed.actors() +faker.hobbit.characters() +``` diff --git a/faker/movies/build.gradle.kts b/faker/movies/build.gradle.kts new file mode 100644 index 000000000..55f6540f8 --- /dev/null +++ b/faker/movies/build.gradle.kts @@ -0,0 +1,4 @@ +plugins { + `faker-lib-conventions` + `faker-provider-conventions` +} diff --git a/faker/movies/src/integration/kotlin/io/github/serpro69/kfaker/movies/MoviesFakerIT.kt b/faker/movies/src/integration/kotlin/io/github/serpro69/kfaker/movies/MoviesFakerIT.kt new file mode 100644 index 000000000..6e519a943 --- /dev/null +++ b/faker/movies/src/integration/kotlin/io/github/serpro69/kfaker/movies/MoviesFakerIT.kt @@ -0,0 +1,11 @@ +package io.github.serpro69.kfaker.movies + +import io.github.serpro69.kfaker.test.helper.`every public function in each provider is invoked without exceptions` +import io.github.serpro69.kfaker.test.helper.`faker instance is initialized with custom locale` +import io.kotest.core.spec.style.DescribeSpec + +class MoviesFakerIT : DescribeSpec({ + `every public function in each provider is invoked without exceptions`(MoviesFaker()) + + `faker instance is initialized with custom locale` { faker { } } +}) diff --git a/faker/movies/src/main/kotlin/io/github/serpro69/kfaker/movies/MoviesFaker.kt b/faker/movies/src/main/kotlin/io/github/serpro69/kfaker/movies/MoviesFaker.kt new file mode 100644 index 000000000..53e793314 --- /dev/null +++ b/faker/movies/src/main/kotlin/io/github/serpro69/kfaker/movies/MoviesFaker.kt @@ -0,0 +1,82 @@ +package io.github.serpro69.kfaker.movies + +import io.github.serpro69.kfaker.AbstractFaker +import io.github.serpro69.kfaker.FakerConfig +import io.github.serpro69.kfaker.FakerDsl +import io.github.serpro69.kfaker.fakerConfig +import io.github.serpro69.kfaker.movies.provider.Avatar +import io.github.serpro69.kfaker.movies.provider.BackToTheFuture +import io.github.serpro69.kfaker.movies.provider.Departed +import io.github.serpro69.kfaker.movies.provider.DumbAndDumber +import io.github.serpro69.kfaker.movies.provider.GhostBusters +import io.github.serpro69.kfaker.movies.provider.Hackers +import io.github.serpro69.kfaker.movies.provider.HarryPotter +import io.github.serpro69.kfaker.movies.provider.HitchhikersGuideToTheGalaxy +import io.github.serpro69.kfaker.movies.provider.Hobbit +import io.github.serpro69.kfaker.movies.provider.HowToTrainYourDragon +import io.github.serpro69.kfaker.movies.provider.Lebowski +import io.github.serpro69.kfaker.movies.provider.LordOfTheRings +import io.github.serpro69.kfaker.movies.provider.Movie +import io.github.serpro69.kfaker.movies.provider.PrincessBride +import io.github.serpro69.kfaker.movies.provider.Rajnikanth +import io.github.serpro69.kfaker.movies.provider.StarWars +import io.github.serpro69.kfaker.movies.provider.TheRoom +import io.github.serpro69.kfaker.movies.provider.Tron +import io.github.serpro69.kfaker.movies.provider.VForVendetta +import io.github.serpro69.kfaker.movies.provider.Yoda + +/** + * Typealias for the [MoviesFaker] + */ +typealias Faker = MoviesFaker + +/** + * Provides access to fake data generators within the Movies domain. + * + * Each category (generator) from this [MoviesFaker] is represented by a property + * that (usually) has the same name as the `.yml` dictionary file. + * + * @property unique global provider for generation of unique values. + */ +@Suppress("unused") +class MoviesFaker @JvmOverloads constructor(config: FakerConfig = fakerConfig { }): AbstractFaker(config) { + + val avatar: Avatar by lazy { Avatar(fakerService) } + val backToTheFuture: BackToTheFuture by lazy { BackToTheFuture(fakerService) } + val departed: Departed by lazy { Departed(fakerService) } + val dumbAndDumber: DumbAndDumber by lazy { DumbAndDumber(fakerService) } + val ghostBusters: GhostBusters by lazy { GhostBusters(fakerService) } + val hackers: Hackers by lazy { Hackers(fakerService) } + val harryPotter: HarryPotter by lazy { HarryPotter(fakerService) } + val hitchhikersGuideToTheGalaxy: HitchhikersGuideToTheGalaxy by lazy { HitchhikersGuideToTheGalaxy(fakerService) } + val hobbit: Hobbit by lazy { Hobbit(fakerService) } + val howToTrainYourDragon: HowToTrainYourDragon by lazy { HowToTrainYourDragon(fakerService) } + val lebowski: Lebowski by lazy { Lebowski(fakerService) } + val lordOfTheRings: LordOfTheRings by lazy { LordOfTheRings(fakerService) } + val movie: Movie by lazy { Movie(fakerService) } + val princessBride: PrincessBride by lazy { PrincessBride(fakerService) } + val rajnikanth: Rajnikanth by lazy { Rajnikanth(fakerService) } + val starWars: StarWars by lazy { StarWars(fakerService) } + val theRoom: TheRoom by lazy { TheRoom(fakerService) } + val tron: Tron by lazy { Tron(fakerService, randomService) } + val vForVendetta: VForVendetta by lazy { VForVendetta(fakerService) } + val yoda: Yoda by lazy { Yoda(fakerService) } + + @FakerDsl + /** + * DSL builder for creating instances of [Faker] + */ + class Builder internal constructor() : AbstractFaker.Builder() { + + /** + * Builds an instance of [Faker] with this [config]. + */ + override fun build(): Faker = Faker(config) + } +} + +/** + * Applies the [block] function to [MoviesFaker.Builder] + * and returns as an instance of [MoviesFaker] from that builder. + */ +fun faker(block: MoviesFaker.Builder.() -> Unit): MoviesFaker = MoviesFaker.Builder().apply(block).build() diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Avatar.kt b/faker/movies/src/main/kotlin/io/github/serpro69/kfaker/movies/provider/Avatar.kt similarity index 72% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/Avatar.kt rename to faker/movies/src/main/kotlin/io/github/serpro69/kfaker/movies/provider/Avatar.kt index 3821b0ae9..c131a5354 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Avatar.kt +++ b/faker/movies/src/main/kotlin/io/github/serpro69/kfaker/movies/provider/Avatar.kt @@ -1,9 +1,11 @@ @file:Suppress("unused") -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.movies.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/BackToTheFuture.kt b/faker/movies/src/main/kotlin/io/github/serpro69/kfaker/movies/provider/BackToTheFuture.kt similarity index 74% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/BackToTheFuture.kt rename to faker/movies/src/main/kotlin/io/github/serpro69/kfaker/movies/provider/BackToTheFuture.kt index 69bca3013..22c5a52e5 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/BackToTheFuture.kt +++ b/faker/movies/src/main/kotlin/io/github/serpro69/kfaker/movies/provider/BackToTheFuture.kt @@ -1,7 +1,9 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.movies.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Departed.kt b/faker/movies/src/main/kotlin/io/github/serpro69/kfaker/movies/provider/Departed.kt similarity index 73% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/Departed.kt rename to faker/movies/src/main/kotlin/io/github/serpro69/kfaker/movies/provider/Departed.kt index d98a45648..9c3490df2 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Departed.kt +++ b/faker/movies/src/main/kotlin/io/github/serpro69/kfaker/movies/provider/Departed.kt @@ -1,7 +1,9 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.movies.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/DumbAndDumber.kt b/faker/movies/src/main/kotlin/io/github/serpro69/kfaker/movies/provider/DumbAndDumber.kt similarity index 73% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/DumbAndDumber.kt rename to faker/movies/src/main/kotlin/io/github/serpro69/kfaker/movies/provider/DumbAndDumber.kt index d0f1e4217..426b61679 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/DumbAndDumber.kt +++ b/faker/movies/src/main/kotlin/io/github/serpro69/kfaker/movies/provider/DumbAndDumber.kt @@ -1,7 +1,9 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.movies.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/GhostBusters.kt b/faker/movies/src/main/kotlin/io/github/serpro69/kfaker/movies/provider/GhostBusters.kt similarity index 73% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/GhostBusters.kt rename to faker/movies/src/main/kotlin/io/github/serpro69/kfaker/movies/provider/GhostBusters.kt index 4ed7bf1cc..0f78b8ac1 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/GhostBusters.kt +++ b/faker/movies/src/main/kotlin/io/github/serpro69/kfaker/movies/provider/GhostBusters.kt @@ -1,7 +1,9 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.movies.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Hackers.kt b/faker/movies/src/main/kotlin/io/github/serpro69/kfaker/movies/provider/Hackers.kt similarity index 73% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/Hackers.kt rename to faker/movies/src/main/kotlin/io/github/serpro69/kfaker/movies/provider/Hackers.kt index 5c7e05879..5bb9616c5 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Hackers.kt +++ b/faker/movies/src/main/kotlin/io/github/serpro69/kfaker/movies/provider/Hackers.kt @@ -1,7 +1,9 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.movies.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/HarryPotter.kt b/faker/movies/src/main/kotlin/io/github/serpro69/kfaker/movies/provider/HarryPotter.kt similarity index 76% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/HarryPotter.kt rename to faker/movies/src/main/kotlin/io/github/serpro69/kfaker/movies/provider/HarryPotter.kt index d1e24882c..f36eaa168 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/HarryPotter.kt +++ b/faker/movies/src/main/kotlin/io/github/serpro69/kfaker/movies/provider/HarryPotter.kt @@ -1,7 +1,9 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.movies.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/HitchhikersGuideToTheGalaxy.kt b/faker/movies/src/main/kotlin/io/github/serpro69/kfaker/movies/provider/HitchhikersGuideToTheGalaxy.kt similarity index 79% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/HitchhikersGuideToTheGalaxy.kt rename to faker/movies/src/main/kotlin/io/github/serpro69/kfaker/movies/provider/HitchhikersGuideToTheGalaxy.kt index 40d56506d..180288e4a 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/HitchhikersGuideToTheGalaxy.kt +++ b/faker/movies/src/main/kotlin/io/github/serpro69/kfaker/movies/provider/HitchhikersGuideToTheGalaxy.kt @@ -1,7 +1,9 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.movies.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Hobbit.kt b/faker/movies/src/main/kotlin/io/github/serpro69/kfaker/movies/provider/Hobbit.kt similarity index 74% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/Hobbit.kt rename to faker/movies/src/main/kotlin/io/github/serpro69/kfaker/movies/provider/Hobbit.kt index bb06ced32..844430512 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Hobbit.kt +++ b/faker/movies/src/main/kotlin/io/github/serpro69/kfaker/movies/provider/Hobbit.kt @@ -1,7 +1,9 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.movies.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/HowToTrainYourDragon.kt b/faker/movies/src/main/kotlin/io/github/serpro69/kfaker/movies/provider/HowToTrainYourDragon.kt similarity index 75% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/HowToTrainYourDragon.kt rename to faker/movies/src/main/kotlin/io/github/serpro69/kfaker/movies/provider/HowToTrainYourDragon.kt index 99f584a00..456ef5956 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/HowToTrainYourDragon.kt +++ b/faker/movies/src/main/kotlin/io/github/serpro69/kfaker/movies/provider/HowToTrainYourDragon.kt @@ -1,9 +1,11 @@ @file:Suppress("unused") -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.movies.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Lebowski.kt b/faker/movies/src/main/kotlin/io/github/serpro69/kfaker/movies/provider/Lebowski.kt similarity index 73% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/Lebowski.kt rename to faker/movies/src/main/kotlin/io/github/serpro69/kfaker/movies/provider/Lebowski.kt index 6e2b711b7..452d13130 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Lebowski.kt +++ b/faker/movies/src/main/kotlin/io/github/serpro69/kfaker/movies/provider/Lebowski.kt @@ -1,7 +1,9 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.movies.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/LordOfTheRings.kt b/faker/movies/src/main/kotlin/io/github/serpro69/kfaker/movies/provider/LordOfTheRings.kt similarity index 74% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/LordOfTheRings.kt rename to faker/movies/src/main/kotlin/io/github/serpro69/kfaker/movies/provider/LordOfTheRings.kt index a26ad4a31..31d69af2a 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/LordOfTheRings.kt +++ b/faker/movies/src/main/kotlin/io/github/serpro69/kfaker/movies/provider/LordOfTheRings.kt @@ -1,7 +1,9 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.movies.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Movie.kt b/faker/movies/src/main/kotlin/io/github/serpro69/kfaker/movies/provider/Movie.kt similarity index 71% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/Movie.kt rename to faker/movies/src/main/kotlin/io/github/serpro69/kfaker/movies/provider/Movie.kt index 09ab75980..d4b89f898 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Movie.kt +++ b/faker/movies/src/main/kotlin/io/github/serpro69/kfaker/movies/provider/Movie.kt @@ -1,7 +1,9 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.movies.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/PrincessBride.kt b/faker/movies/src/main/kotlin/io/github/serpro69/kfaker/movies/provider/PrincessBride.kt similarity index 72% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/PrincessBride.kt rename to faker/movies/src/main/kotlin/io/github/serpro69/kfaker/movies/provider/PrincessBride.kt index a95160703..7a7398dd0 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/PrincessBride.kt +++ b/faker/movies/src/main/kotlin/io/github/serpro69/kfaker/movies/provider/PrincessBride.kt @@ -1,7 +1,9 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.movies.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Rajnikanth.kt b/faker/movies/src/main/kotlin/io/github/serpro69/kfaker/movies/provider/Rajnikanth.kt similarity index 70% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/Rajnikanth.kt rename to faker/movies/src/main/kotlin/io/github/serpro69/kfaker/movies/provider/Rajnikanth.kt index 655e77995..4e79a2e15 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Rajnikanth.kt +++ b/faker/movies/src/main/kotlin/io/github/serpro69/kfaker/movies/provider/Rajnikanth.kt @@ -1,7 +1,9 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.movies.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/StarWars.kt b/faker/movies/src/main/kotlin/io/github/serpro69/kfaker/movies/provider/StarWars.kt similarity index 82% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/StarWars.kt rename to faker/movies/src/main/kotlin/io/github/serpro69/kfaker/movies/provider/StarWars.kt index b065d8096..f2ce28d95 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/StarWars.kt +++ b/faker/movies/src/main/kotlin/io/github/serpro69/kfaker/movies/provider/StarWars.kt @@ -1,7 +1,9 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.movies.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/TheRoom.kt b/faker/movies/src/main/kotlin/io/github/serpro69/kfaker/movies/provider/TheRoom.kt similarity index 75% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/TheRoom.kt rename to faker/movies/src/main/kotlin/io/github/serpro69/kfaker/movies/provider/TheRoom.kt index ecd5dd2be..9dad7dce4 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/TheRoom.kt +++ b/faker/movies/src/main/kotlin/io/github/serpro69/kfaker/movies/provider/TheRoom.kt @@ -1,9 +1,11 @@ @file:Suppress("unused") -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.movies.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Tron.kt b/faker/movies/src/main/kotlin/io/github/serpro69/kfaker/movies/provider/Tron.kt similarity index 69% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/Tron.kt rename to faker/movies/src/main/kotlin/io/github/serpro69/kfaker/movies/provider/Tron.kt index fd2280842..1c64b1ab8 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Tron.kt +++ b/faker/movies/src/main/kotlin/io/github/serpro69/kfaker/movies/provider/Tron.kt @@ -1,17 +1,22 @@ @file:Suppress("unused") -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.movies.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.RandomService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate /** * [FakeDataProvider] implementation for [YamlCategory.TRON] category. */ -class Tron internal constructor(fakerService: FakerService) : - YamlFakeDataProvider(fakerService) { +class Tron internal constructor( + fakerService: FakerService, + private val randomService: RandomService +) : YamlFakeDataProvider(fakerService) { override val yamlCategory = YamlCategory.TRON override val localUniqueDataProvider = LocalUniqueDataProvider() override val unique by UniqueProviderDelegate(localUniqueDataProvider) @@ -20,19 +25,19 @@ class Tron internal constructor(fakerService: FakerService) : fakerService.load(yamlCategory) } - fun characters(type: TronCharacterType = fakerService.randomService.nextEnum()): String = + fun characters(type: TronCharacterType = randomService.nextEnum()): String = resolve("characters", type.name.lowercase()) fun games(): String = resolve("games") fun locations(): String = resolve("locations") - fun quotes(character: TronCharacter = fakerService.randomService.nextEnum()): String = + fun quotes(character: TronCharacter = randomService.nextEnum()): String = resolve("quotes", character.name.lowercase()) fun taglines(): String = resolve("taglines") fun vehicles(): String = resolve("vehicles") - fun alternateCharacterSpellings(character: TronAlternateCharacter = fakerService.randomService.nextEnum()): String = + fun alternateCharacterSpellings(character: TronAlternateCharacter = randomService.nextEnum()): String = resolve("alternate_character_spellings", character.name.lowercase()) // todo functions with enum type parameters should by default return a random value? diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/VForVendetta.kt b/faker/movies/src/main/kotlin/io/github/serpro69/kfaker/movies/provider/VForVendetta.kt similarity index 73% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/VForVendetta.kt rename to faker/movies/src/main/kotlin/io/github/serpro69/kfaker/movies/provider/VForVendetta.kt index 974e13598..c80d533d4 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/VForVendetta.kt +++ b/faker/movies/src/main/kotlin/io/github/serpro69/kfaker/movies/provider/VForVendetta.kt @@ -1,7 +1,9 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.movies.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Yoda.kt b/faker/movies/src/main/kotlin/io/github/serpro69/kfaker/movies/provider/Yoda.kt similarity index 70% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/Yoda.kt rename to faker/movies/src/main/kotlin/io/github/serpro69/kfaker/movies/provider/Yoda.kt index ef7d10342..406360ae2 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Yoda.kt +++ b/faker/movies/src/main/kotlin/io/github/serpro69/kfaker/movies/provider/Yoda.kt @@ -1,7 +1,9 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.movies.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/faker/movies/src/test/kotlin/io/github/serpro69/kfaker/movies/provider/StarWarsTest.kt b/faker/movies/src/test/kotlin/io/github/serpro69/kfaker/movies/provider/StarWarsTest.kt new file mode 100644 index 000000000..7d345e363 --- /dev/null +++ b/faker/movies/src/test/kotlin/io/github/serpro69/kfaker/movies/provider/StarWarsTest.kt @@ -0,0 +1,27 @@ +package io.github.serpro69.kfaker.movies.provider + +import io.github.serpro69.kfaker.movies.MoviesFaker +import io.kotest.core.spec.style.DescribeSpec +import io.kotest.matchers.shouldNotBe + +class StarWarsTest : DescribeSpec({ + describe("StarWars provider") { + // TODO is there a better way to test a provider directly w/o exposing constructors of FakerService? + // StarWars(FakerService(MoviesFaker()) won't work because the constructor in FakerService is internal, + // and we should try not to expose it to public + // We could expose FakerService via custom AbstractFaker implementation (e.g. see edu/FakerServiceTest) + val starWars = MoviesFaker().starWars + + context("any quote") { + it("should return any quote") { + starWars.quote() shouldNotBe null + } + } + + context("quotes filter") { + it("should return a Admiral Ackbar quote") { + starWars.quotes("admiral_ackbar") shouldNotBe null + } + } + } +}) diff --git a/faker/music/README.md b/faker/music/README.md new file mode 100644 index 000000000..459052358 --- /dev/null +++ b/faker/music/README.md @@ -0,0 +1,54 @@ +## `MucisFaker` + +[![Maven Central](https://img.shields.io/maven-central/v/io.github.serpro69/kotlin-faker-music?style=for-the-badge)](https://search.maven.org/artifact/io.github.serpro69/kotlin-faker-music) +[![Sonatype Nexus (Snapshots)](https://img.shields.io/nexus/s/io.github.serpro69/kotlin-faker-music?label=snapshot-version&server=https%3A%2F%2Foss.sonatype.org&style=for-the-badge&color=yellow)](#downloading) + +Provides access to fake data generators within the Mucis domain. + +## Usage + +Documentation for kotlin-faker is available at [serpro69.github.io/kotlin-faker/](https://serpro69.github.io/kotlin-faker/). + +### Downloading + +Latest releases are always available on maven central. + +**With gradle** + +```groovy +dependencies { + implementation 'io.github.serpro69:kotlin-faker:$version' + implementation 'io.github.serpro69:kotlin-faker-music:$version' +} +``` + +**With maven** + +```xml + + + io.github.serpro69 + kotlin-faker + ${version} + + + io.github.serpro69 + kotlin-faker-music + ${version} + + +``` + +_NB! An additional fake data provider like 'music' requires the main `kotlin-faker` dependency to be on the classpath._ + +### Generating data + +```kotlin +// NB! the package you import if using multiple fakers +import io.github.serpro69.kfaker.music.faker + +val faker = faker { } + +faker.music.instruments() +faker.opera.italian.byGiuseppeVerdi() +``` diff --git a/faker/music/build.gradle.kts b/faker/music/build.gradle.kts new file mode 100644 index 000000000..55f6540f8 --- /dev/null +++ b/faker/music/build.gradle.kts @@ -0,0 +1,4 @@ +plugins { + `faker-lib-conventions` + `faker-provider-conventions` +} diff --git a/faker/music/src/integration/kotlin/io/github/serpro69/kfaker/music/MusicFakerIT.kt b/faker/music/src/integration/kotlin/io/github/serpro69/kfaker/music/MusicFakerIT.kt new file mode 100644 index 000000000..a708d6db2 --- /dev/null +++ b/faker/music/src/integration/kotlin/io/github/serpro69/kfaker/music/MusicFakerIT.kt @@ -0,0 +1,11 @@ +package io.github.serpro69.kfaker.music + +import io.github.serpro69.kfaker.test.helper.`every public function in each provider is invoked without exceptions` +import io.github.serpro69.kfaker.test.helper.`faker instance is initialized with custom locale` +import io.kotest.core.spec.style.DescribeSpec + +class MusicFakerIT : DescribeSpec({ + `every public function in each provider is invoked without exceptions`(MusicFaker()) + + `faker instance is initialized with custom locale` { faker { } } +}) diff --git a/faker/music/src/main/kotlin/io/github/serpro69/kfaker/music/MusicFaker.kt b/faker/music/src/main/kotlin/io/github/serpro69/kfaker/music/MusicFaker.kt new file mode 100644 index 000000000..d1793bdb9 --- /dev/null +++ b/faker/music/src/main/kotlin/io/github/serpro69/kfaker/music/MusicFaker.kt @@ -0,0 +1,70 @@ +package io.github.serpro69.kfaker.music + +import io.github.serpro69.kfaker.AbstractFaker +import io.github.serpro69.kfaker.FakerConfig +import io.github.serpro69.kfaker.FakerDsl +import io.github.serpro69.kfaker.fakerConfig +import io.github.serpro69.kfaker.music.provider.BossaNova +import io.github.serpro69.kfaker.music.provider.GratefulDead +import io.github.serpro69.kfaker.music.provider.HipHop +import io.github.serpro69.kfaker.music.provider.KPop +import io.github.serpro69.kfaker.music.provider.Music +import io.github.serpro69.kfaker.music.provider.Opera +import io.github.serpro69.kfaker.music.provider.PearlJam +import io.github.serpro69.kfaker.music.provider.Phish +import io.github.serpro69.kfaker.music.provider.Prince +import io.github.serpro69.kfaker.music.provider.RockBand +import io.github.serpro69.kfaker.music.provider.Rush +import io.github.serpro69.kfaker.music.provider.Show +import io.github.serpro69.kfaker.music.provider.SmashingPumpkins +import io.github.serpro69.kfaker.music.provider.UmphreysMcgee + +/** + * Typealias for the [MusicFaker] + */ +typealias Faker = MusicFaker + +/** + * Provides access to fake data generators within the Music domain. + * + * Each category (generator) from this [MusicFaker] is represented by a property + * that (usually) has the same name as the `.yml` dictionary file. + * + * @property unique global provider for generation of unique values. + */ +@Suppress("unused") +class MusicFaker @JvmOverloads constructor(config: FakerConfig = fakerConfig { }) : AbstractFaker(config) { + + val bossaNova: BossaNova by lazy { BossaNova(fakerService) } + val gratefulDead: GratefulDead by lazy { GratefulDead(fakerService) } + val hipHop: HipHop by lazy { HipHop(fakerService) } + val kPop: KPop by lazy { KPop(fakerService) } + val music: Music by lazy { Music(fakerService) } + val opera: Opera by lazy { Opera(fakerService) } + val pearlJam: PearlJam by lazy { PearlJam(fakerService) } + val phish: Phish by lazy { Phish(fakerService) } + val prince: Prince by lazy { Prince(fakerService) } + val rockBand: RockBand by lazy { RockBand(fakerService) } + val rush: Rush by lazy { Rush(fakerService) } + val show: Show by lazy { Show(fakerService) } + val smashingPumpkins: SmashingPumpkins by lazy { SmashingPumpkins(fakerService) } + val umphreysMcgee: UmphreysMcgee by lazy { UmphreysMcgee(fakerService) } + + @FakerDsl + /** + * DSL builder for creating instances of [Faker] + */ + class Builder internal constructor() : AbstractFaker.Builder() { + + /** + * Builds an instance of [Faker] with this [config]. + */ + override fun build(): Faker = Faker(config) + } +} + +/** + * Applies the [block] function to [MusicFaker.Builder] + * and returns as an instance of [MusicFaker] from that builder. + */ +fun faker(block: MusicFaker.Builder.() -> Unit): MusicFaker = MusicFaker.Builder().apply(block).build() diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/BossaNova.kt b/faker/music/src/main/kotlin/io/github/serpro69/kfaker/music/provider/BossaNova.kt similarity index 72% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/BossaNova.kt rename to faker/music/src/main/kotlin/io/github/serpro69/kfaker/music/provider/BossaNova.kt index 19c78dbb3..5e9e0ea4a 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/BossaNova.kt +++ b/faker/music/src/main/kotlin/io/github/serpro69/kfaker/music/provider/BossaNova.kt @@ -1,7 +1,9 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.music.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/GratefulDead.kt b/faker/music/src/main/kotlin/io/github/serpro69/kfaker/music/provider/GratefulDead.kt similarity index 72% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/GratefulDead.kt rename to faker/music/src/main/kotlin/io/github/serpro69/kfaker/music/provider/GratefulDead.kt index 082fc2d8e..c0b44f4e9 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/GratefulDead.kt +++ b/faker/music/src/main/kotlin/io/github/serpro69/kfaker/music/provider/GratefulDead.kt @@ -1,7 +1,9 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.music.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/KPop.kt b/faker/music/src/main/kotlin/io/github/serpro69/kfaker/music/provider/KPop.kt similarity index 76% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/KPop.kt rename to faker/music/src/main/kotlin/io/github/serpro69/kfaker/music/provider/KPop.kt index 1d07a0a85..e7e798734 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/KPop.kt +++ b/faker/music/src/main/kotlin/io/github/serpro69/kfaker/music/provider/KPop.kt @@ -1,7 +1,9 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.music.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Music.kt b/faker/music/src/main/kotlin/io/github/serpro69/kfaker/music/provider/Music.kt similarity index 74% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/Music.kt rename to faker/music/src/main/kotlin/io/github/serpro69/kfaker/music/provider/Music.kt index 923bf3ac3..5e0e1f760 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Music.kt +++ b/faker/music/src/main/kotlin/io/github/serpro69/kfaker/music/provider/Music.kt @@ -1,7 +1,9 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.music.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate @@ -18,6 +20,11 @@ class Music internal constructor(fakerService: FakerService) : YamlFakeDataProvi fakerService.load(yamlCategory) } + @Deprecated( + message = "This property is deprecated and will be removed in future releases", + replaceWith = ReplaceWith("MusicFaker().hipHop"), + level = DeprecationLevel.WARNING + ) val hipHop by lazy { HipHop(fakerService) } fun instruments() = resolve("instruments") diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Opera.kt b/faker/music/src/main/kotlin/io/github/serpro69/kfaker/music/provider/Opera.kt similarity index 93% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/Opera.kt rename to faker/music/src/main/kotlin/io/github/serpro69/kfaker/music/provider/Opera.kt index 36a34d57c..010c6854c 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Opera.kt +++ b/faker/music/src/main/kotlin/io/github/serpro69/kfaker/music/provider/Opera.kt @@ -1,7 +1,9 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.music.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/PearlJam.kt b/faker/music/src/main/kotlin/io/github/serpro69/kfaker/music/provider/PearlJam.kt similarity index 73% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/PearlJam.kt rename to faker/music/src/main/kotlin/io/github/serpro69/kfaker/music/provider/PearlJam.kt index 109cca9cb..46524cc04 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/PearlJam.kt +++ b/faker/music/src/main/kotlin/io/github/serpro69/kfaker/music/provider/PearlJam.kt @@ -1,7 +1,9 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.music.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Phish.kt b/faker/music/src/main/kotlin/io/github/serpro69/kfaker/music/provider/Phish.kt similarity index 72% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/Phish.kt rename to faker/music/src/main/kotlin/io/github/serpro69/kfaker/music/provider/Phish.kt index b8dd28b82..7beb5e23c 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Phish.kt +++ b/faker/music/src/main/kotlin/io/github/serpro69/kfaker/music/provider/Phish.kt @@ -1,7 +1,9 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.music.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Prince.kt b/faker/music/src/main/kotlin/io/github/serpro69/kfaker/music/provider/Prince.kt similarity index 73% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/Prince.kt rename to faker/music/src/main/kotlin/io/github/serpro69/kfaker/music/provider/Prince.kt index 31eb66a33..f2748abe6 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Prince.kt +++ b/faker/music/src/main/kotlin/io/github/serpro69/kfaker/music/provider/Prince.kt @@ -1,7 +1,9 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.music.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/RockBand.kt b/faker/music/src/main/kotlin/io/github/serpro69/kfaker/music/provider/RockBand.kt similarity index 71% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/RockBand.kt rename to faker/music/src/main/kotlin/io/github/serpro69/kfaker/music/provider/RockBand.kt index d7d4062ad..8d179d4f4 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/RockBand.kt +++ b/faker/music/src/main/kotlin/io/github/serpro69/kfaker/music/provider/RockBand.kt @@ -1,7 +1,9 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.music.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Rush.kt b/faker/music/src/main/kotlin/io/github/serpro69/kfaker/music/provider/Rush.kt similarity index 71% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/Rush.kt rename to faker/music/src/main/kotlin/io/github/serpro69/kfaker/music/provider/Rush.kt index 3ebe5c467..92d32af39 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Rush.kt +++ b/faker/music/src/main/kotlin/io/github/serpro69/kfaker/music/provider/Rush.kt @@ -1,7 +1,9 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.music.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Show.kt b/faker/music/src/main/kotlin/io/github/serpro69/kfaker/music/provider/Show.kt similarity index 73% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/Show.kt rename to faker/music/src/main/kotlin/io/github/serpro69/kfaker/music/provider/Show.kt index f9a63063e..b8b8747aa 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Show.kt +++ b/faker/music/src/main/kotlin/io/github/serpro69/kfaker/music/provider/Show.kt @@ -1,7 +1,9 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.music.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/SmashingPumpkins.kt b/faker/music/src/main/kotlin/io/github/serpro69/kfaker/music/provider/SmashingPumpkins.kt similarity index 68% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/SmashingPumpkins.kt rename to faker/music/src/main/kotlin/io/github/serpro69/kfaker/music/provider/SmashingPumpkins.kt index 844fd6367..f0913d9e1 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/SmashingPumpkins.kt +++ b/faker/music/src/main/kotlin/io/github/serpro69/kfaker/music/provider/SmashingPumpkins.kt @@ -1,7 +1,9 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.music.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate @@ -9,7 +11,8 @@ import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate * [FakeDataProvider] implementation for [YamlCategory.SMASHING_PUMPKINS] category. */ @Suppress("unused") -class SmashingPumpkins internal constructor(fakerService: FakerService) : YamlFakeDataProvider(fakerService) { +class SmashingPumpkins internal constructor(fakerService: FakerService) : + YamlFakeDataProvider(fakerService) { override val yamlCategory = YamlCategory.SMASHING_PUMPKINS override val localUniqueDataProvider = LocalUniqueDataProvider() override val unique by UniqueProviderDelegate(localUniqueDataProvider) diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/UmphreysMcgee.kt b/faker/music/src/main/kotlin/io/github/serpro69/kfaker/music/provider/UmphreysMcgee.kt similarity index 65% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/UmphreysMcgee.kt rename to faker/music/src/main/kotlin/io/github/serpro69/kfaker/music/provider/UmphreysMcgee.kt index 8d1148716..241d5c755 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/UmphreysMcgee.kt +++ b/faker/music/src/main/kotlin/io/github/serpro69/kfaker/music/provider/UmphreysMcgee.kt @@ -1,7 +1,9 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.music.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate @@ -9,7 +11,8 @@ import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate * [FakeDataProvider] implementation for [YamlCategory.UMPHREYS_MCGEE] category. */ @Suppress("unused") -class UmphreysMcgee internal constructor(fakerService: FakerService) : YamlFakeDataProvider(fakerService) { +class UmphreysMcgee internal constructor(fakerService: FakerService) : + YamlFakeDataProvider(fakerService) { override val yamlCategory = YamlCategory.UMPHREYS_MCGEE override val localUniqueDataProvider = LocalUniqueDataProvider() override val unique by UniqueProviderDelegate(localUniqueDataProvider) diff --git a/faker/sports/README.md b/faker/sports/README.md new file mode 100644 index 000000000..306304250 --- /dev/null +++ b/faker/sports/README.md @@ -0,0 +1,54 @@ +## `SportsFaker` + +[![Maven Central](https://img.shields.io/maven-central/v/io.github.serpro69/kotlin-faker-sports?style=for-the-badge)](https://search.maven.org/artifact/io.github.serpro69/kotlin-faker-sports) +[![Sonatype Nexus (Snapshots)](https://img.shields.io/nexus/s/io.github.serpro69/kotlin-faker-sports?label=snapshot-version&server=https%3A%2F%2Foss.sonatype.org&style=for-the-badge&color=yellow)](#downloading) + +Provides access to fake data generators within the Sports domain. + +## Usage + +Documentation for kotlin-faker is available at [serpro69.github.io/kotlin-faker/](https://serpro69.github.io/kotlin-faker/). + +### Downloading + +Latest releases are always available on maven central. + +**With gradle** + +```groovy +dependencies { + implementation 'io.github.serpro69:kotlin-faker:$version' + implementation 'io.github.serpro69:kotlin-faker-sports:$version' +} +``` + +**With maven** + +```xml + + + io.github.serpro69 + kotlin-faker + ${version} + + + io.github.serpro69 + kotlin-faker-sports + ${version} + + +``` + +_NB! An additional fake data provider like 'sports' requires the main `kotlin-faker` dependency to be on the classpath._ + +### Generating data + +```kotlin +// NB! the package you import if using multiple fakers +import io.github.serpro69.kfaker.sports.faker + +val faker = faker { } + +faker.basketball.teams() +faker.chess.players() +``` diff --git a/faker/sports/build.gradle.kts b/faker/sports/build.gradle.kts new file mode 100644 index 000000000..55f6540f8 --- /dev/null +++ b/faker/sports/build.gradle.kts @@ -0,0 +1,4 @@ +plugins { + `faker-lib-conventions` + `faker-provider-conventions` +} diff --git a/faker/sports/src/integration/kotlin/io/github/serpro69/kfaker/sports/SportsFakerIT.kt b/faker/sports/src/integration/kotlin/io/github/serpro69/kfaker/sports/SportsFakerIT.kt new file mode 100644 index 000000000..c3f8b7cf8 --- /dev/null +++ b/faker/sports/src/integration/kotlin/io/github/serpro69/kfaker/sports/SportsFakerIT.kt @@ -0,0 +1,11 @@ +package io.github.serpro69.kfaker.sports + +import io.github.serpro69.kfaker.test.helper.`every public function in each provider is invoked without exceptions` +import io.github.serpro69.kfaker.test.helper.`faker instance is initialized with custom locale` +import io.kotest.core.spec.style.DescribeSpec + +class SportsFakerIT : DescribeSpec({ + `every public function in each provider is invoked without exceptions`(SportsFaker()) + + `faker instance is initialized with custom locale` { faker { } } +}) diff --git a/faker/sports/src/main/kotlin/io/github/serpro69/kfaker/sports/SportsFaker.kt b/faker/sports/src/main/kotlin/io/github/serpro69/kfaker/sports/SportsFaker.kt new file mode 100644 index 000000000..d43656197 --- /dev/null +++ b/faker/sports/src/main/kotlin/io/github/serpro69/kfaker/sports/SportsFaker.kt @@ -0,0 +1,62 @@ +package io.github.serpro69.kfaker.sports + +import io.github.serpro69.kfaker.AbstractFaker +import io.github.serpro69.kfaker.FakerConfig +import io.github.serpro69.kfaker.FakerDsl +import io.github.serpro69.kfaker.fakerConfig +import io.github.serpro69.kfaker.sports.provider.Basketball +import io.github.serpro69.kfaker.sports.provider.Chess +import io.github.serpro69.kfaker.sports.provider.Crossfit +import io.github.serpro69.kfaker.sports.provider.ESport +import io.github.serpro69.kfaker.sports.provider.Football +import io.github.serpro69.kfaker.sports.provider.Mountaineering +import io.github.serpro69.kfaker.sports.provider.Sport +import io.github.serpro69.kfaker.sports.provider.Team +import io.github.serpro69.kfaker.sports.provider.Volleyball +import io.github.serpro69.kfaker.sports.provider.WorldCup + +/** + * Typealias for the [SportsFaker] + */ +typealias Faker = SportsFaker + +/** + * Provides access to fake data generators within the Sports domain. + * + * Each category (generator) from this [SportsFaker] is represented by a property + * that (usually) has the same name as the `.yml` dictionary file. + * + * @property unique global provider for generation of unique values. + */ +@Suppress("unused") +class SportsFaker @JvmOverloads constructor(config: FakerConfig = fakerConfig { }): AbstractFaker(config) { + + val basketball: Basketball by lazy { Basketball(fakerService) } + val chess: Chess by lazy { Chess(fakerService) } + val crossfit: Crossfit by lazy { Crossfit(fakerService) } + val eSport: ESport by lazy { ESport(fakerService) } + val football: Football by lazy { Football(fakerService) } + val mountaineering: Mountaineering by lazy { Mountaineering(fakerService) } + val sport: Sport by lazy { Sport(fakerService) } + val team: Team by lazy { Team(fakerService) } + val volleyball: Volleyball by lazy { Volleyball(fakerService) } + val worldCup: WorldCup by lazy { WorldCup(fakerService) } + + @FakerDsl + /** + * DSL builder for creating instances of [Faker] + */ + class Builder internal constructor() : AbstractFaker.Builder() { + + /** + * Builds an instance of [Faker] with this [config]. + */ + override fun build(): Faker = Faker(config) + } +} + +/** + * Applies the [block] function to [SportsFaker.Builder] + * and returns as an instance of [SportsFaker] from that builder. + */ +fun faker(block: SportsFaker.Builder.() -> Unit): SportsFaker = SportsFaker.Builder().apply(block).build() diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Basketball.kt b/faker/sports/src/main/kotlin/io/github/serpro69/kfaker/sports/provider/Basketball.kt similarity index 74% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/Basketball.kt rename to faker/sports/src/main/kotlin/io/github/serpro69/kfaker/sports/provider/Basketball.kt index 049b78703..bdb61492e 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Basketball.kt +++ b/faker/sports/src/main/kotlin/io/github/serpro69/kfaker/sports/provider/Basketball.kt @@ -1,7 +1,9 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.sports.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Chess.kt b/faker/sports/src/main/kotlin/io/github/serpro69/kfaker/sports/provider/Chess.kt similarity index 73% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/Chess.kt rename to faker/sports/src/main/kotlin/io/github/serpro69/kfaker/sports/provider/Chess.kt index 82785347f..58881d710 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Chess.kt +++ b/faker/sports/src/main/kotlin/io/github/serpro69/kfaker/sports/provider/Chess.kt @@ -1,7 +1,9 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.sports.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Crossfit.kt b/faker/sports/src/main/kotlin/io/github/serpro69/kfaker/sports/provider/Crossfit.kt similarity index 84% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/Crossfit.kt rename to faker/sports/src/main/kotlin/io/github/serpro69/kfaker/sports/provider/Crossfit.kt index e66d2bd65..dcad1fb11 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Crossfit.kt +++ b/faker/sports/src/main/kotlin/io/github/serpro69/kfaker/sports/provider/Crossfit.kt @@ -1,13 +1,16 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.sports.provider import io.github.serpro69.kfaker.FakerService import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate /** * [FakeDataProvider] implementation for [YamlCategory.CROSSFIT] category. */ +@Suppress("unused") class Crossfit internal constructor(fakerService: FakerService): YamlFakeDataProvider(fakerService){ override val yamlCategory = YamlCategory.CROSSFIT override val localUniqueDataProvider= LocalUniqueDataProvider() diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/ESport.kt b/faker/sports/src/main/kotlin/io/github/serpro69/kfaker/sports/provider/ESport.kt similarity index 74% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/ESport.kt rename to faker/sports/src/main/kotlin/io/github/serpro69/kfaker/sports/provider/ESport.kt index 4ab0a462b..6ac6f12b9 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/ESport.kt +++ b/faker/sports/src/main/kotlin/io/github/serpro69/kfaker/sports/provider/ESport.kt @@ -1,7 +1,9 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.sports.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Football.kt b/faker/sports/src/main/kotlin/io/github/serpro69/kfaker/sports/provider/Football.kt similarity index 75% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/Football.kt rename to faker/sports/src/main/kotlin/io/github/serpro69/kfaker/sports/provider/Football.kt index 24c865559..4a86afabc 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Football.kt +++ b/faker/sports/src/main/kotlin/io/github/serpro69/kfaker/sports/provider/Football.kt @@ -1,7 +1,9 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.sports.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Mountaineering.kt b/faker/sports/src/main/kotlin/io/github/serpro69/kfaker/sports/provider/Mountaineering.kt similarity index 72% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/Mountaineering.kt rename to faker/sports/src/main/kotlin/io/github/serpro69/kfaker/sports/provider/Mountaineering.kt index 123406c0d..b3810eb88 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Mountaineering.kt +++ b/faker/sports/src/main/kotlin/io/github/serpro69/kfaker/sports/provider/Mountaineering.kt @@ -1,9 +1,11 @@ @file:Suppress("unused") -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.sports.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Sport.kt b/faker/sports/src/main/kotlin/io/github/serpro69/kfaker/sports/provider/Sport.kt similarity index 77% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/Sport.kt rename to faker/sports/src/main/kotlin/io/github/serpro69/kfaker/sports/provider/Sport.kt index 2e3b2b5f1..d2b56a1e0 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Sport.kt +++ b/faker/sports/src/main/kotlin/io/github/serpro69/kfaker/sports/provider/Sport.kt @@ -1,7 +1,9 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.sports.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Team.kt b/faker/sports/src/main/kotlin/io/github/serpro69/kfaker/sports/provider/Team.kt similarity index 72% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/Team.kt rename to faker/sports/src/main/kotlin/io/github/serpro69/kfaker/sports/provider/Team.kt index 4c9093498..546d9d8a3 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Team.kt +++ b/faker/sports/src/main/kotlin/io/github/serpro69/kfaker/sports/provider/Team.kt @@ -1,7 +1,9 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.sports.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Volleyball.kt b/faker/sports/src/main/kotlin/io/github/serpro69/kfaker/sports/provider/Volleyball.kt similarity index 76% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/Volleyball.kt rename to faker/sports/src/main/kotlin/io/github/serpro69/kfaker/sports/provider/Volleyball.kt index 8eabb6979..8677fb8d1 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Volleyball.kt +++ b/faker/sports/src/main/kotlin/io/github/serpro69/kfaker/sports/provider/Volleyball.kt @@ -1,9 +1,11 @@ @file:Suppress("unused") -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.sports.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/WorldCup.kt b/faker/sports/src/main/kotlin/io/github/serpro69/kfaker/sports/provider/WorldCup.kt similarity index 81% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/WorldCup.kt rename to faker/sports/src/main/kotlin/io/github/serpro69/kfaker/sports/provider/WorldCup.kt index 7b5b5d96a..064204510 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/WorldCup.kt +++ b/faker/sports/src/main/kotlin/io/github/serpro69/kfaker/sports/provider/WorldCup.kt @@ -1,7 +1,9 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.sports.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/faker/sports/src/test/kotlin/io/github/serpro69/kfaker/sports/provider/CrossfitTest.kt b/faker/sports/src/test/kotlin/io/github/serpro69/kfaker/sports/provider/CrossfitTest.kt new file mode 100644 index 000000000..8d09ea94f --- /dev/null +++ b/faker/sports/src/test/kotlin/io/github/serpro69/kfaker/sports/provider/CrossfitTest.kt @@ -0,0 +1,21 @@ +package io.github.serpro69.kfaker.sports.provider + +import io.github.serpro69.kfaker.sports.SportsFaker +import io.kotest.core.spec.style.DescribeSpec +import io.kotest.matchers.shouldNotBe + +class CrossfitTest : DescribeSpec({ + describe("Crossfit provider") { + // TODO is there a better way to test a provider directly w/o exposing constructors of FakerService? + // Crossfit(FakerService(SportsFaker()) won't work because the constructor in FakerService is internal, + // and we should try not to expose it to public + // We could expose FakerService via custom AbstractFaker implementation (e.g. see edu/FakerServiceTest) + val crossfit = SportsFaker().crossfit + + context("competition fun") { + it("should return a Crossfit® competition name") { + crossfit.competitions() shouldNotBe null + } + } + } +}) diff --git a/faker/tech/README.md b/faker/tech/README.md new file mode 100644 index 000000000..dee73084e --- /dev/null +++ b/faker/tech/README.md @@ -0,0 +1,54 @@ +## `TechFaker` + +[![Maven Central](https://img.shields.io/maven-central/v/io.github.serpro69/kotlin-faker-tech?style=for-the-badge)](https://search.maven.org/artifact/io.github.serpro69/kotlin-faker-tech) +[![Sonatype Nexus (Snapshots)](https://img.shields.io/nexus/s/io.github.serpro69/kotlin-faker-tech?label=snapshot-version&server=https%3A%2F%2Foss.sonatype.org&style=for-the-badge&color=yellow)](#downloading) + +Provides access to fake data generators within the Tech domain. + +## Usage + +Documentation for kotlin-faker is available at [serpro69.github.io/kotlin-faker/](https://serpro69.github.io/kotlin-faker/). + +### Downloading + +Latest releases are always available on maven central. + +**With gradle** + +```groovy +dependencies { + implementation 'io.github.serpro69:kotlin-faker:$version' + implementation 'io.github.serpro69:kotlin-faker-tech:$version' +} +``` + +**With maven** + +```xml + + + io.github.serpro69 + kotlin-faker + ${version} + + + io.github.serpro69 + kotlin-faker-tech + ${version} + + +``` + +_NB! An additional fake data provider like 'tech' requires the main `kotlin-faker` dependency to be on the classpath._ + +### Generating data + +```kotlin +// NB! the package you import if using multiple fakers +import io.github.serpro69.kfaker.tech.faker + +val faker = faker { } + +faker.app.name() +faker.device.platform() +``` diff --git a/faker/tech/build.gradle.kts b/faker/tech/build.gradle.kts new file mode 100644 index 000000000..55f6540f8 --- /dev/null +++ b/faker/tech/build.gradle.kts @@ -0,0 +1,4 @@ +plugins { + `faker-lib-conventions` + `faker-provider-conventions` +} diff --git a/faker/tech/src/integration/kotlin/io/github/serpro69/kfaker/tech/TechFakerIT.kt b/faker/tech/src/integration/kotlin/io/github/serpro69/kfaker/tech/TechFakerIT.kt new file mode 100644 index 000000000..03c0a9ba1 --- /dev/null +++ b/faker/tech/src/integration/kotlin/io/github/serpro69/kfaker/tech/TechFakerIT.kt @@ -0,0 +1,11 @@ +package io.github.serpro69.kfaker.tech + +import io.github.serpro69.kfaker.test.helper.`every public function in each provider is invoked without exceptions` +import io.github.serpro69.kfaker.test.helper.`faker instance is initialized with custom locale` +import io.kotest.core.spec.style.DescribeSpec + +class TechFakerIT : DescribeSpec({ + `every public function in each provider is invoked without exceptions`(TechFaker()) + + `faker instance is initialized with custom locale` { faker { } } +}) diff --git a/core/src/integration/kotlin/io/github/serpro69/kfaker/provider/VehicleIT.kt b/faker/tech/src/integration/kotlin/io/github/serpro69/kfaker/tech/provider/VehicleIT.kt similarity index 79% rename from core/src/integration/kotlin/io/github/serpro69/kfaker/provider/VehicleIT.kt rename to faker/tech/src/integration/kotlin/io/github/serpro69/kfaker/tech/provider/VehicleIT.kt index ad9b82587..3b0d3dc68 100644 --- a/core/src/integration/kotlin/io/github/serpro69/kfaker/provider/VehicleIT.kt +++ b/faker/tech/src/integration/kotlin/io/github/serpro69/kfaker/tech/provider/VehicleIT.kt @@ -1,10 +1,8 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.tech.provider -import io.github.serpro69.kfaker.faker +import io.github.serpro69.kfaker.tech.faker import io.kotest.assertions.assertSoftly -import io.kotest.assertions.throwables.shouldNotThrow import io.kotest.core.spec.style.DescribeSpec -import io.kotest.matchers.shouldNotHave import io.kotest.matchers.string.shouldNotContain class VehicleIT : DescribeSpec({ diff --git a/faker/tech/src/main/kotlin/io/github/serpro69/kfaker/tech/TechFaker.kt b/faker/tech/src/main/kotlin/io/github/serpro69/kfaker/tech/TechFaker.kt new file mode 100644 index 000000000..c703018ad --- /dev/null +++ b/faker/tech/src/main/kotlin/io/github/serpro69/kfaker/tech/TechFaker.kt @@ -0,0 +1,66 @@ +package io.github.serpro69.kfaker.tech + +import io.github.serpro69.kfaker.AbstractFaker +import io.github.serpro69.kfaker.FakerConfig +import io.github.serpro69.kfaker.FakerDsl +import io.github.serpro69.kfaker.fakerConfig +import io.github.serpro69.kfaker.tech.provider.App +import io.github.serpro69.kfaker.tech.provider.Appliance +import io.github.serpro69.kfaker.tech.provider.Camera +import io.github.serpro69.kfaker.tech.provider.Computer +import io.github.serpro69.kfaker.tech.provider.CryptoCoin +import io.github.serpro69.kfaker.tech.provider.Device +import io.github.serpro69.kfaker.tech.provider.Drone +import io.github.serpro69.kfaker.tech.provider.ElectricalComponents +import io.github.serpro69.kfaker.tech.provider.Hacker +import io.github.serpro69.kfaker.tech.provider.ProgrammingLanguage +import io.github.serpro69.kfaker.tech.provider.Space +import io.github.serpro69.kfaker.tech.provider.Vehicle + +/** + * Typealias for the [TechFaker] + */ +typealias Faker = TechFaker + +/** + * Provides access to fake data generators within the Tech domain. + * + * Each category (generator) from this [TechFaker] is represented by a property + * that (usually) has the same name as the `.yml` dictionary file. + * + * @property unique global provider for generation of unique values. + */ +@Suppress("unused") +class TechFaker @JvmOverloads constructor(config: FakerConfig = fakerConfig { }): AbstractFaker(config) { + + val app: App by lazy { App(fakerService) } + val appliance: Appliance by lazy { Appliance(fakerService) } + val camera: Camera by lazy { Camera(fakerService) } + val computer: Computer by lazy { Computer(fakerService) } + val cryptoCoin: CryptoCoin by lazy { CryptoCoin(fakerService) } + val device: Device by lazy { Device(fakerService) } + val drone: Drone by lazy { Drone(fakerService) } + val electricalComponents: ElectricalComponents by lazy { ElectricalComponents(fakerService) } + val hacker: Hacker by lazy { Hacker(fakerService) } + val programmingLanguage: ProgrammingLanguage by lazy { ProgrammingLanguage(fakerService) } + val space: Space by lazy { Space(fakerService) } + val vehicle: Vehicle by lazy { Vehicle(fakerService) } + + @FakerDsl + /** + * DSL builder for creating instances of [Faker] + */ + class Builder internal constructor() : AbstractFaker.Builder() { + + /** + * Builds an instance of [Faker] with this [config]. + */ + override fun build(): Faker = Faker(config) + } +} + +/** + * Applies the [block] function to [TechFaker.Builder] + * and returns as an instance of [TechFaker] from that builder. + */ +fun faker(block: TechFaker.Builder.() -> Unit): TechFaker = TechFaker.Builder().apply(block).build() diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/App.kt b/faker/tech/src/main/kotlin/io/github/serpro69/kfaker/tech/provider/App.kt similarity index 73% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/App.kt rename to faker/tech/src/main/kotlin/io/github/serpro69/kfaker/tech/provider/App.kt index b40497d14..afa8906d1 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/App.kt +++ b/faker/tech/src/main/kotlin/io/github/serpro69/kfaker/tech/provider/App.kt @@ -1,7 +1,9 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.tech.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Appliance.kt b/faker/tech/src/main/kotlin/io/github/serpro69/kfaker/tech/provider/Appliance.kt similarity index 72% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/Appliance.kt rename to faker/tech/src/main/kotlin/io/github/serpro69/kfaker/tech/provider/Appliance.kt index e548669a6..13636264d 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Appliance.kt +++ b/faker/tech/src/main/kotlin/io/github/serpro69/kfaker/tech/provider/Appliance.kt @@ -1,7 +1,9 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.tech.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Camera.kt b/faker/tech/src/main/kotlin/io/github/serpro69/kfaker/tech/provider/Camera.kt similarity index 73% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/Camera.kt rename to faker/tech/src/main/kotlin/io/github/serpro69/kfaker/tech/provider/Camera.kt index db4b99314..ab95da261 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Camera.kt +++ b/faker/tech/src/main/kotlin/io/github/serpro69/kfaker/tech/provider/Camera.kt @@ -1,9 +1,11 @@ @file:Suppress("unused") -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.tech.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Computer.kt b/faker/tech/src/main/kotlin/io/github/serpro69/kfaker/tech/provider/Computer.kt similarity index 88% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/Computer.kt rename to faker/tech/src/main/kotlin/io/github/serpro69/kfaker/tech/provider/Computer.kt index d23f0c579..4c03844e3 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Computer.kt +++ b/faker/tech/src/main/kotlin/io/github/serpro69/kfaker/tech/provider/Computer.kt @@ -1,7 +1,9 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.tech.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/CryptoCoin.kt b/faker/tech/src/main/kotlin/io/github/serpro69/kfaker/tech/provider/CryptoCoin.kt similarity index 71% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/CryptoCoin.kt rename to faker/tech/src/main/kotlin/io/github/serpro69/kfaker/tech/provider/CryptoCoin.kt index 509111cae..1ca466a59 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/CryptoCoin.kt +++ b/faker/tech/src/main/kotlin/io/github/serpro69/kfaker/tech/provider/CryptoCoin.kt @@ -1,7 +1,9 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.tech.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Device.kt b/faker/tech/src/main/kotlin/io/github/serpro69/kfaker/tech/provider/Device.kt similarity index 74% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/Device.kt rename to faker/tech/src/main/kotlin/io/github/serpro69/kfaker/tech/provider/Device.kt index 317359bb2..de4463cfd 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Device.kt +++ b/faker/tech/src/main/kotlin/io/github/serpro69/kfaker/tech/provider/Device.kt @@ -1,7 +1,9 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.tech.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Drone.kt b/faker/tech/src/main/kotlin/io/github/serpro69/kfaker/tech/provider/Drone.kt similarity index 90% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/Drone.kt rename to faker/tech/src/main/kotlin/io/github/serpro69/kfaker/tech/provider/Drone.kt index e6d7a47c8..be8ffe805 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Drone.kt +++ b/faker/tech/src/main/kotlin/io/github/serpro69/kfaker/tech/provider/Drone.kt @@ -1,7 +1,9 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.tech.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/ElectricalComponents.kt b/faker/tech/src/main/kotlin/io/github/serpro69/kfaker/tech/provider/ElectricalComponents.kt similarity index 75% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/ElectricalComponents.kt rename to faker/tech/src/main/kotlin/io/github/serpro69/kfaker/tech/provider/ElectricalComponents.kt index c225b6eb0..27ef754da 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/ElectricalComponents.kt +++ b/faker/tech/src/main/kotlin/io/github/serpro69/kfaker/tech/provider/ElectricalComponents.kt @@ -1,7 +1,9 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.tech.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Hacker.kt b/faker/tech/src/main/kotlin/io/github/serpro69/kfaker/tech/provider/Hacker.kt similarity index 75% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/Hacker.kt rename to faker/tech/src/main/kotlin/io/github/serpro69/kfaker/tech/provider/Hacker.kt index 9c8bab82a..b12aecf77 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Hacker.kt +++ b/faker/tech/src/main/kotlin/io/github/serpro69/kfaker/tech/provider/Hacker.kt @@ -1,7 +1,9 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.tech.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/ProgrammingLanguage.kt b/faker/tech/src/main/kotlin/io/github/serpro69/kfaker/tech/provider/ProgrammingLanguage.kt similarity index 73% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/ProgrammingLanguage.kt rename to faker/tech/src/main/kotlin/io/github/serpro69/kfaker/tech/provider/ProgrammingLanguage.kt index d18b51bad..4be60d40d 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/ProgrammingLanguage.kt +++ b/faker/tech/src/main/kotlin/io/github/serpro69/kfaker/tech/provider/ProgrammingLanguage.kt @@ -1,7 +1,9 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.tech.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Space.kt b/faker/tech/src/main/kotlin/io/github/serpro69/kfaker/tech/provider/Space.kt similarity index 81% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/Space.kt rename to faker/tech/src/main/kotlin/io/github/serpro69/kfaker/tech/provider/Space.kt index 0fe5b5edf..ed3f1a35d 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Space.kt +++ b/faker/tech/src/main/kotlin/io/github/serpro69/kfaker/tech/provider/Space.kt @@ -1,7 +1,9 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.tech.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Vehicle.kt b/faker/tech/src/main/kotlin/io/github/serpro69/kfaker/tech/provider/Vehicle.kt similarity index 84% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/Vehicle.kt rename to faker/tech/src/main/kotlin/io/github/serpro69/kfaker/tech/provider/Vehicle.kt index 3ed10ebc8..831e58212 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Vehicle.kt +++ b/faker/tech/src/main/kotlin/io/github/serpro69/kfaker/tech/provider/Vehicle.kt @@ -1,7 +1,9 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.tech.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/faker/travel/README.md b/faker/travel/README.md new file mode 100644 index 000000000..07ae3c6a0 --- /dev/null +++ b/faker/travel/README.md @@ -0,0 +1,54 @@ +## `TravelFaker` + +[![Maven Central](https://img.shields.io/maven-central/v/io.github.serpro69/kotlin-faker-travel?style=for-the-badge)](https://search.maven.org/artifact/io.github.serpro69/kotlin-faker-travel) +[![Sonatype Nexus (Snapshots)](https://img.shields.io/nexus/s/io.github.serpro69/kotlin-faker-travel?label=snapshot-version&server=https%3A%2F%2Foss.sonatype.org&style=for-the-badge&color=yellow)](#downloading) + +Provides access to fake data generators within the Travel domain. + +## Usage + +Documentation for kotlin-faker is available at [serpro69.github.io/kotlin-faker/](https://serpro69.github.io/kotlin-faker/). + +### Downloading + +Latest releases are always available on maven central. + +**With gradle** + +```groovy +dependencies { + implementation 'io.github.serpro69:kotlin-faker:$version' + implementation 'io.github.serpro69:kotlin-faker-travel:$version' +} +``` + +**With maven** + +```xml + + + io.github.serpro69 + kotlin-faker + ${version} + + + io.github.serpro69 + kotlin-faker-travel + ${version} + + +``` + +_NB! An additional fake data provider like 'travel' requires the main `kotlin-faker` dependency to be on the classpath._ + +### Generating data + +```kotlin +// NB! the package you import if using multiple fakers +import io.github.serpro69.kfaker.travel.faker + +val faker = faker { } + +faker.airport.europeanUnion.iataCode() +faker.mountain.name() +``` diff --git a/faker/travel/build.gradle.kts b/faker/travel/build.gradle.kts new file mode 100644 index 000000000..55f6540f8 --- /dev/null +++ b/faker/travel/build.gradle.kts @@ -0,0 +1,4 @@ +plugins { + `faker-lib-conventions` + `faker-provider-conventions` +} diff --git a/faker/travel/src/integration/kotlin/io/github/serpro69/kfaker/travel/TravelFakerIT.kt b/faker/travel/src/integration/kotlin/io/github/serpro69/kfaker/travel/TravelFakerIT.kt new file mode 100644 index 000000000..738693a57 --- /dev/null +++ b/faker/travel/src/integration/kotlin/io/github/serpro69/kfaker/travel/TravelFakerIT.kt @@ -0,0 +1,11 @@ +package io.github.serpro69.kfaker.travel + +import io.github.serpro69.kfaker.test.helper.`every public function in each provider is invoked without exceptions` +import io.github.serpro69.kfaker.test.helper.`faker instance is initialized with custom locale` +import io.kotest.core.spec.style.DescribeSpec + +class TravelFakerIT : DescribeSpec({ + `every public function in each provider is invoked without exceptions`(TravelFaker()) + + `faker instance is initialized with custom locale` { faker { } } +}) diff --git a/faker/travel/src/main/kotlin/io/github/serpro69/kfaker/travel/TravelFaker.kt b/faker/travel/src/main/kotlin/io/github/serpro69/kfaker/travel/TravelFaker.kt new file mode 100644 index 000000000..aa46ae20f --- /dev/null +++ b/faker/travel/src/main/kotlin/io/github/serpro69/kfaker/travel/TravelFaker.kt @@ -0,0 +1,53 @@ +package io.github.serpro69.kfaker.travel + +import io.github.serpro69.kfaker.AbstractFaker +import io.github.serpro69.kfaker.FakerConfig +import io.github.serpro69.kfaker.FakerDsl +import io.github.serpro69.kfaker.fakerConfig +import io.github.serpro69.kfaker.travel.provider.Airport +import io.github.serpro69.kfaker.travel.provider.Australia +import io.github.serpro69.kfaker.travel.provider.Mountain +import io.github.serpro69.kfaker.travel.provider.Nation +import io.github.serpro69.kfaker.travel.provider.TrainStation + +/** + * Typealias for the [TravelFaker] + */ +typealias Faker = TravelFaker + +/** + * Provides access to fake data generators within the Travel domain. + * + * Each category (generator) from this [TravelFaker] is represented by a property + * that (usually) has the same name as the `.yml` dictionary file. + * + * @property unique global provider for generation of unique values. + */ +@Suppress("unused") +class TravelFaker @JvmOverloads constructor(config: FakerConfig = fakerConfig { }) : AbstractFaker(config) { + + val airport: Airport by lazy { Airport(fakerService) } + val australia: Australia by lazy { Australia(fakerService) } + // TODO val compass: Compass by lazy {Compass(fakerService) } + val mountain: Mountain by lazy { Mountain(fakerService) } + val nation: Nation by lazy { Nation(fakerService) } + val trainStation: TrainStation by lazy { TrainStation(fakerService) } + + @FakerDsl + /** + * DSL builder for creating instances of [Faker] + */ + class Builder internal constructor() : AbstractFaker.Builder() { + + /** + * Builds an instance of [Faker] with this [config]. + */ + override fun build(): Faker = Faker(config) + } +} + +/** + * Applies the [block] function to [TravelFaker.Builder] + * and returns as an instance of [TravelFaker] from that builder. + */ +fun faker(block: TravelFaker.Builder.() -> Unit): TravelFaker = TravelFaker.Builder().apply(block).build() diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Airport.kt b/faker/travel/src/main/kotlin/io/github/serpro69/kfaker/travel/provider/Airport.kt similarity index 91% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/Airport.kt rename to faker/travel/src/main/kotlin/io/github/serpro69/kfaker/travel/provider/Airport.kt index 851783b76..2dff0334e 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Airport.kt +++ b/faker/travel/src/main/kotlin/io/github/serpro69/kfaker/travel/provider/Airport.kt @@ -1,16 +1,16 @@ -@file:Suppress("unused") +package io.github.serpro69.kfaker.travel.provider -package io.github.serpro69.kfaker.provider - -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate -import java.util.NoSuchElementException /** * [FakeDataProvider] implementation for [YamlCategory.AIRPORT] category. */ +@Suppress("unused") class Airport internal constructor(fakerService: FakerService) : YamlFakeDataProvider(fakerService) { override val yamlCategory = YamlCategory.AIRPORT override val localUniqueDataProvider = LocalUniqueDataProvider() diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Australia.kt b/faker/travel/src/main/kotlin/io/github/serpro69/kfaker/travel/provider/Australia.kt similarity index 73% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/Australia.kt rename to faker/travel/src/main/kotlin/io/github/serpro69/kfaker/travel/provider/Australia.kt index b11807789..d8e499f54 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Australia.kt +++ b/faker/travel/src/main/kotlin/io/github/serpro69/kfaker/travel/provider/Australia.kt @@ -1,9 +1,11 @@ @file:Suppress("unused") -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.travel.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Compass.kt b/faker/travel/src/main/kotlin/io/github/serpro69/kfaker/travel/provider/Compass.kt similarity index 71% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/Compass.kt rename to faker/travel/src/main/kotlin/io/github/serpro69/kfaker/travel/provider/Compass.kt index c53f17200..e50ee0510 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Compass.kt +++ b/faker/travel/src/main/kotlin/io/github/serpro69/kfaker/travel/provider/Compass.kt @@ -1,7 +1,9 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.travel.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Mountain.kt b/faker/travel/src/main/kotlin/io/github/serpro69/kfaker/travel/provider/Mountain.kt similarity index 72% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/Mountain.kt rename to faker/travel/src/main/kotlin/io/github/serpro69/kfaker/travel/provider/Mountain.kt index a45246c43..a235443c9 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Mountain.kt +++ b/faker/travel/src/main/kotlin/io/github/serpro69/kfaker/travel/provider/Mountain.kt @@ -1,9 +1,11 @@ @file:Suppress("unused") -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.travel.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Nation.kt b/faker/travel/src/main/kotlin/io/github/serpro69/kfaker/travel/provider/Nation.kt similarity index 77% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/Nation.kt rename to faker/travel/src/main/kotlin/io/github/serpro69/kfaker/travel/provider/Nation.kt index ffaa8fe04..237393ea6 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Nation.kt +++ b/faker/travel/src/main/kotlin/io/github/serpro69/kfaker/travel/provider/Nation.kt @@ -1,7 +1,9 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.travel.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/TrainStation.kt b/faker/travel/src/main/kotlin/io/github/serpro69/kfaker/travel/provider/TrainStation.kt similarity index 91% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/TrainStation.kt rename to faker/travel/src/main/kotlin/io/github/serpro69/kfaker/travel/provider/TrainStation.kt index 0aeda812a..daa2f4892 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/TrainStation.kt +++ b/faker/travel/src/main/kotlin/io/github/serpro69/kfaker/travel/provider/TrainStation.kt @@ -1,9 +1,11 @@ @file:Suppress("unused") -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.travel.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/faker/tvshows/README.md b/faker/tvshows/README.md new file mode 100644 index 000000000..1c53b200b --- /dev/null +++ b/faker/tvshows/README.md @@ -0,0 +1,54 @@ +## `TvShowsFaker` + +[![Maven Central](https://img.shields.io/maven-central/v/io.github.serpro69/kotlin-faker-tvshows?style=for-the-badge)](https://search.maven.org/artifact/io.github.serpro69/kotlin-faker-tvshows) +[![Sonatype Nexus (Snapshots)](https://img.shields.io/nexus/s/io.github.serpro69/kotlin-faker-tvshows?label=snapshot-version&server=https%3A%2F%2Foss.sonatype.org&style=for-the-badge&color=yellow)](#downloading) + +Provides access to fake data generators within the TV-Shows domain. + +## Usage + +Documentation for kotlin-faker is available at [serpro69.github.io/kotlin-faker/](https://serpro69.github.io/kotlin-faker/). + +### Downloading + +Latest releases are always available on maven central. + +**With gradle** + +```groovy +dependencies { + implementation 'io.github.serpro69:kotlin-faker:$version' + implementation 'io.github.serpro69:kotlin-faker-tvshows:$version' +} +``` + +**With maven** + +```xml + + + io.github.serpro69 + kotlin-faker + ${version} + + + io.github.serpro69 + kotlin-faker-tvshows + ${version} + + +``` + +_NB! An additional fake data provider like 'tvshows' requires the main `kotlin-faker` dependency to be on the classpath._ + +### Generating data + +```kotlin +// NB! the package you import if using multiple fakers +import io.github.serpro69.kfaker.tv.faker + +val faker = faker { } + +faker.bigBangTheory.characters() +faker.friends.characters() +``` diff --git a/faker/tvshows/build.gradle.kts b/faker/tvshows/build.gradle.kts new file mode 100644 index 000000000..55f6540f8 --- /dev/null +++ b/faker/tvshows/build.gradle.kts @@ -0,0 +1,4 @@ +plugins { + `faker-lib-conventions` + `faker-provider-conventions` +} diff --git a/faker/tvshows/src/integration/kotlin/io/github/serpro69/kfaker/tv/TvShowsFakerIT.kt b/faker/tvshows/src/integration/kotlin/io/github/serpro69/kfaker/tv/TvShowsFakerIT.kt new file mode 100644 index 000000000..f87b5b167 --- /dev/null +++ b/faker/tvshows/src/integration/kotlin/io/github/serpro69/kfaker/tv/TvShowsFakerIT.kt @@ -0,0 +1,11 @@ +package io.github.serpro69.kfaker.tv + +import io.github.serpro69.kfaker.test.helper.`every public function in each provider is invoked without exceptions` +import io.github.serpro69.kfaker.test.helper.`faker instance is initialized with custom locale` +import io.kotest.core.spec.style.DescribeSpec + +class TvShowsFakerIT : DescribeSpec({ + `every public function in each provider is invoked without exceptions`(TvShowsFaker()) + + `faker instance is initialized with custom locale` { faker { } } +}) diff --git a/faker/tvshows/src/main/kotlin/io/github/serpro69/kfaker/tv/TvShowsFaker.kt b/faker/tvshows/src/main/kotlin/io/github/serpro69/kfaker/tv/TvShowsFaker.kt new file mode 100644 index 000000000..3de90fe4b --- /dev/null +++ b/faker/tvshows/src/main/kotlin/io/github/serpro69/kfaker/tv/TvShowsFaker.kt @@ -0,0 +1,118 @@ +package io.github.serpro69.kfaker.tv + +import io.github.serpro69.kfaker.AbstractFaker +import io.github.serpro69.kfaker.FakerConfig +import io.github.serpro69.kfaker.FakerDsl +import io.github.serpro69.kfaker.fakerConfig +import io.github.serpro69.kfaker.tv.provider.AquaTeenHungerForce +import io.github.serpro69.kfaker.tv.provider.Archer +import io.github.serpro69.kfaker.tv.provider.BigBangTheory +import io.github.serpro69.kfaker.tv.provider.BojackHorseman +import io.github.serpro69.kfaker.tv.provider.BreakingBad +import io.github.serpro69.kfaker.tv.provider.BrooklynNineNine +import io.github.serpro69.kfaker.tv.provider.Buffy +import io.github.serpro69.kfaker.tv.provider.Community +import io.github.serpro69.kfaker.tv.provider.DrWho +import io.github.serpro69.kfaker.tv.provider.FamilyGuy +import io.github.serpro69.kfaker.tv.provider.FinalSpace +import io.github.serpro69.kfaker.tv.provider.FreshPriceOfBelAir +import io.github.serpro69.kfaker.tv.provider.Friends +import io.github.serpro69.kfaker.tv.provider.Futurama +import io.github.serpro69.kfaker.tv.provider.GameOfThrones +import io.github.serpro69.kfaker.tv.provider.HeyArnold +import io.github.serpro69.kfaker.tv.provider.HowIMetYourMother +import io.github.serpro69.kfaker.tv.provider.MichaelScott +import io.github.serpro69.kfaker.tv.provider.NewGirl +import io.github.serpro69.kfaker.tv.provider.ParksAndRec +import io.github.serpro69.kfaker.tv.provider.RickAndMorty +import io.github.serpro69.kfaker.tv.provider.Rupaul +import io.github.serpro69.kfaker.tv.provider.Seinfeld +import io.github.serpro69.kfaker.tv.provider.SiliconValley +import io.github.serpro69.kfaker.tv.provider.Simpsons +import io.github.serpro69.kfaker.tv.provider.SouthPark +import io.github.serpro69.kfaker.tv.provider.Spongebob +import io.github.serpro69.kfaker.tv.provider.StarTrek +import io.github.serpro69.kfaker.tv.provider.Stargate +import io.github.serpro69.kfaker.tv.provider.StrangerThings +import io.github.serpro69.kfaker.tv.provider.Suits +import io.github.serpro69.kfaker.tv.provider.Supernatural +import io.github.serpro69.kfaker.tv.provider.TheExpanse +import io.github.serpro69.kfaker.tv.provider.TheITCrowd +import io.github.serpro69.kfaker.tv.provider.TheOffice +import io.github.serpro69.kfaker.tv.provider.TheThickOfIt +import io.github.serpro69.kfaker.tv.provider.TwinPeaks +import io.github.serpro69.kfaker.tv.provider.VentureBros + +/** + * Typealias for the [TvShowsFaker] + */ +typealias Faker = TvShowsFaker + +/** + * Provides access to fake data generators within the TvShows domain. + * + * Each category (generator) from this [TvShowsFaker] is represented by a property + * that (usually) has the same name as the `.yml` dictionary file. + * + * @property unique global provider for generation of unique values. + */ +@Suppress("unused") +class TvShowsFaker @JvmOverloads constructor(config: FakerConfig = fakerConfig { }): AbstractFaker(config) { + + val aquaTeenHungerForce: AquaTeenHungerForce by lazy { AquaTeenHungerForce(fakerService) } + val archer: Archer by lazy { Archer(fakerService) } + val bigBangTheory: BigBangTheory by lazy { BigBangTheory(fakerService) } + val bojackHorseman: BojackHorseman by lazy { BojackHorseman(fakerService) } + val breakingBad: BreakingBad by lazy { BreakingBad(fakerService) } + val brooklynNineNine: BrooklynNineNine by lazy { BrooklynNineNine(fakerService) } + val buffy: Buffy by lazy { Buffy(fakerService) } + val community: Community by lazy { Community(fakerService) } + val drWho: DrWho by lazy { DrWho(fakerService) } + val familyGuy: FamilyGuy by lazy { FamilyGuy(fakerService) } + val finalSpace: FinalSpace by lazy { FinalSpace(fakerService) } + val freshPriceOfBelAir: FreshPriceOfBelAir by lazy { FreshPriceOfBelAir(fakerService) } + val friends: Friends by lazy { Friends(fakerService) } + val futurama: Futurama by lazy { Futurama(fakerService) } + val gameOfThrones: GameOfThrones by lazy { GameOfThrones(fakerService) } + val heyArnold: HeyArnold by lazy { HeyArnold(fakerService) } + val howIMetYourMother: HowIMetYourMother by lazy { HowIMetYourMother(fakerService) } + val michaelScott: MichaelScott by lazy { MichaelScott(fakerService) } + val newGirl: NewGirl by lazy { NewGirl(fakerService) } + val parksAndRec: ParksAndRec by lazy { ParksAndRec(fakerService) } + val rickAndMorty: RickAndMorty by lazy { RickAndMorty(fakerService) } + val rupaul: Rupaul by lazy { Rupaul(fakerService) } + val seinfeld: Seinfeld by lazy { Seinfeld(fakerService) } + val siliconValley: SiliconValley by lazy { SiliconValley(fakerService) } + val simpsons: Simpsons by lazy { Simpsons(fakerService) } + val southPark: SouthPark by lazy { SouthPark(fakerService) } + val spongebob: Spongebob by lazy { Spongebob(fakerService) } + val stargate: Stargate by lazy { Stargate(fakerService) } + val starTrek: StarTrek by lazy { StarTrek(fakerService) } + val strangerThings: StrangerThings by lazy { StrangerThings(fakerService) } + val suits: Suits by lazy { Suits(fakerService) } + val supernatural: Supernatural by lazy { Supernatural(fakerService) } + val theExpanse: TheExpanse by lazy { TheExpanse(fakerService) } + val theITCrowd: TheITCrowd by lazy { TheITCrowd(fakerService) } + val theOffice: TheOffice by lazy { TheOffice(fakerService) } + val theThickOfIt: TheThickOfIt by lazy { TheThickOfIt(fakerService) } + val twinPeaks: TwinPeaks by lazy { TwinPeaks(fakerService) } + val ventureBros: VentureBros by lazy { VentureBros(fakerService) } + + @FakerDsl + /** + * DSL builder for creating instances of [Faker] + */ + class Builder internal constructor() : AbstractFaker.Builder() { + + /** + * Builds an instance of [Faker] with this [config]. + */ + override fun build(): Faker = Faker(config) + } +} + +/** + * Applies the [block] function to [TvShowsFaker.Builder] + * and returns as an instance of [TvShowsFaker] from that builder. + */ +fun faker(block: TvShowsFaker.Builder.() -> Unit): TvShowsFaker = TvShowsFaker.Builder().apply(block).build() diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/AquaTeenHungerForce.kt b/faker/tvshows/src/main/kotlin/io/github/serpro69/kfaker/tv/provider/AquaTeenHungerForce.kt similarity index 73% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/AquaTeenHungerForce.kt rename to faker/tvshows/src/main/kotlin/io/github/serpro69/kfaker/tv/provider/AquaTeenHungerForce.kt index c68872144..114d9be6c 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/AquaTeenHungerForce.kt +++ b/faker/tvshows/src/main/kotlin/io/github/serpro69/kfaker/tv/provider/AquaTeenHungerForce.kt @@ -1,7 +1,9 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.tv.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Archer.kt b/faker/tvshows/src/main/kotlin/io/github/serpro69/kfaker/tv/provider/Archer.kt similarity index 73% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/Archer.kt rename to faker/tvshows/src/main/kotlin/io/github/serpro69/kfaker/tv/provider/Archer.kt index f986ff486..71294f1cd 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Archer.kt +++ b/faker/tvshows/src/main/kotlin/io/github/serpro69/kfaker/tv/provider/Archer.kt @@ -1,7 +1,9 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.tv.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/BigBangTheory.kt b/faker/tvshows/src/main/kotlin/io/github/serpro69/kfaker/tv/provider/BigBangTheory.kt similarity index 73% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/BigBangTheory.kt rename to faker/tvshows/src/main/kotlin/io/github/serpro69/kfaker/tv/provider/BigBangTheory.kt index 88efb1e54..d8f6973ce 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/BigBangTheory.kt +++ b/faker/tvshows/src/main/kotlin/io/github/serpro69/kfaker/tv/provider/BigBangTheory.kt @@ -1,7 +1,9 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.tv.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/BojackHorseman.kt b/faker/tvshows/src/main/kotlin/io/github/serpro69/kfaker/tv/provider/BojackHorseman.kt similarity index 74% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/BojackHorseman.kt rename to faker/tvshows/src/main/kotlin/io/github/serpro69/kfaker/tv/provider/BojackHorseman.kt index 0d52b2881..a1078556e 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/BojackHorseman.kt +++ b/faker/tvshows/src/main/kotlin/io/github/serpro69/kfaker/tv/provider/BojackHorseman.kt @@ -1,7 +1,9 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.tv.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/BreakingBad.kt b/faker/tvshows/src/main/kotlin/io/github/serpro69/kfaker/tv/provider/BreakingBad.kt similarity index 72% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/BreakingBad.kt rename to faker/tvshows/src/main/kotlin/io/github/serpro69/kfaker/tv/provider/BreakingBad.kt index a4700814a..f735c2e66 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/BreakingBad.kt +++ b/faker/tvshows/src/main/kotlin/io/github/serpro69/kfaker/tv/provider/BreakingBad.kt @@ -1,7 +1,9 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.tv.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/BrooklynNineNine.kt b/faker/tvshows/src/main/kotlin/io/github/serpro69/kfaker/tv/provider/BrooklynNineNine.kt similarity index 73% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/BrooklynNineNine.kt rename to faker/tvshows/src/main/kotlin/io/github/serpro69/kfaker/tv/provider/BrooklynNineNine.kt index 4f092ff46..b2002d229 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/BrooklynNineNine.kt +++ b/faker/tvshows/src/main/kotlin/io/github/serpro69/kfaker/tv/provider/BrooklynNineNine.kt @@ -1,9 +1,11 @@ @file:Suppress("unused") -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.tv.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Buffy.kt b/faker/tvshows/src/main/kotlin/io/github/serpro69/kfaker/tv/provider/Buffy.kt similarity index 79% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/Buffy.kt rename to faker/tvshows/src/main/kotlin/io/github/serpro69/kfaker/tv/provider/Buffy.kt index 8b4c779aa..e523b5d5b 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Buffy.kt +++ b/faker/tvshows/src/main/kotlin/io/github/serpro69/kfaker/tv/provider/Buffy.kt @@ -1,7 +1,9 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.tv.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Community.kt b/faker/tvshows/src/main/kotlin/io/github/serpro69/kfaker/tv/provider/Community.kt similarity index 72% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/Community.kt rename to faker/tvshows/src/main/kotlin/io/github/serpro69/kfaker/tv/provider/Community.kt index 0eb5ff1a6..9e55f7a10 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Community.kt +++ b/faker/tvshows/src/main/kotlin/io/github/serpro69/kfaker/tv/provider/Community.kt @@ -1,7 +1,9 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.tv.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/DrWho.kt b/faker/tvshows/src/main/kotlin/io/github/serpro69/kfaker/tv/provider/DrWho.kt similarity index 77% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/DrWho.kt rename to faker/tvshows/src/main/kotlin/io/github/serpro69/kfaker/tv/provider/DrWho.kt index 17d3f9c2e..ca8894b61 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/DrWho.kt +++ b/faker/tvshows/src/main/kotlin/io/github/serpro69/kfaker/tv/provider/DrWho.kt @@ -1,7 +1,9 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.tv.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/FamilyGuy.kt b/faker/tvshows/src/main/kotlin/io/github/serpro69/kfaker/tv/provider/FamilyGuy.kt similarity index 73% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/FamilyGuy.kt rename to faker/tvshows/src/main/kotlin/io/github/serpro69/kfaker/tv/provider/FamilyGuy.kt index 954078e61..a88fc4fe0 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/FamilyGuy.kt +++ b/faker/tvshows/src/main/kotlin/io/github/serpro69/kfaker/tv/provider/FamilyGuy.kt @@ -1,7 +1,9 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.tv.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/FinalSpace.kt b/faker/tvshows/src/main/kotlin/io/github/serpro69/kfaker/tv/provider/FinalSpace.kt similarity index 74% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/FinalSpace.kt rename to faker/tvshows/src/main/kotlin/io/github/serpro69/kfaker/tv/provider/FinalSpace.kt index 1eb469661..7fb06ffce 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/FinalSpace.kt +++ b/faker/tvshows/src/main/kotlin/io/github/serpro69/kfaker/tv/provider/FinalSpace.kt @@ -1,9 +1,11 @@ @file:Suppress("unused") -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.tv.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/FreshPriceOfBelAir.kt b/faker/tvshows/src/main/kotlin/io/github/serpro69/kfaker/tv/provider/FreshPriceOfBelAir.kt similarity index 79% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/FreshPriceOfBelAir.kt rename to faker/tvshows/src/main/kotlin/io/github/serpro69/kfaker/tv/provider/FreshPriceOfBelAir.kt index bc0741384..3a8f194a0 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/FreshPriceOfBelAir.kt +++ b/faker/tvshows/src/main/kotlin/io/github/serpro69/kfaker/tv/provider/FreshPriceOfBelAir.kt @@ -1,7 +1,9 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.tv.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Friends.kt b/faker/tvshows/src/main/kotlin/io/github/serpro69/kfaker/tv/provider/Friends.kt similarity index 73% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/Friends.kt rename to faker/tvshows/src/main/kotlin/io/github/serpro69/kfaker/tv/provider/Friends.kt index bc65fb487..59ee0d811 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Friends.kt +++ b/faker/tvshows/src/main/kotlin/io/github/serpro69/kfaker/tv/provider/Friends.kt @@ -1,7 +1,9 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.tv.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Futurama.kt b/faker/tvshows/src/main/kotlin/io/github/serpro69/kfaker/tv/provider/Futurama.kt similarity index 75% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/Futurama.kt rename to faker/tvshows/src/main/kotlin/io/github/serpro69/kfaker/tv/provider/Futurama.kt index 81a5d48fc..dc8291b24 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Futurama.kt +++ b/faker/tvshows/src/main/kotlin/io/github/serpro69/kfaker/tv/provider/Futurama.kt @@ -1,7 +1,9 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.tv.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/GameOfThrones.kt b/faker/tvshows/src/main/kotlin/io/github/serpro69/kfaker/tv/provider/GameOfThrones.kt similarity index 75% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/GameOfThrones.kt rename to faker/tvshows/src/main/kotlin/io/github/serpro69/kfaker/tv/provider/GameOfThrones.kt index f6f57441c..ffc64a702 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/GameOfThrones.kt +++ b/faker/tvshows/src/main/kotlin/io/github/serpro69/kfaker/tv/provider/GameOfThrones.kt @@ -1,7 +1,9 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.tv.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/HeyArnold.kt b/faker/tvshows/src/main/kotlin/io/github/serpro69/kfaker/tv/provider/HeyArnold.kt similarity index 73% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/HeyArnold.kt rename to faker/tvshows/src/main/kotlin/io/github/serpro69/kfaker/tv/provider/HeyArnold.kt index 8d5440aae..3c523b437 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/HeyArnold.kt +++ b/faker/tvshows/src/main/kotlin/io/github/serpro69/kfaker/tv/provider/HeyArnold.kt @@ -1,7 +1,9 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.tv.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/HowIMetYourMother.kt b/faker/tvshows/src/main/kotlin/io/github/serpro69/kfaker/tv/provider/HowIMetYourMother.kt similarity index 75% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/HowIMetYourMother.kt rename to faker/tvshows/src/main/kotlin/io/github/serpro69/kfaker/tv/provider/HowIMetYourMother.kt index 9b6555c67..9548404db 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/HowIMetYourMother.kt +++ b/faker/tvshows/src/main/kotlin/io/github/serpro69/kfaker/tv/provider/HowIMetYourMother.kt @@ -1,7 +1,9 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.tv.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/MichaelScott.kt b/faker/tvshows/src/main/kotlin/io/github/serpro69/kfaker/tv/provider/MichaelScott.kt similarity index 71% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/MichaelScott.kt rename to faker/tvshows/src/main/kotlin/io/github/serpro69/kfaker/tv/provider/MichaelScott.kt index d7862efd5..f9cb66e46 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/MichaelScott.kt +++ b/faker/tvshows/src/main/kotlin/io/github/serpro69/kfaker/tv/provider/MichaelScott.kt @@ -1,7 +1,9 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.tv.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/NewGirl.kt b/faker/tvshows/src/main/kotlin/io/github/serpro69/kfaker/tv/provider/NewGirl.kt similarity index 72% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/NewGirl.kt rename to faker/tvshows/src/main/kotlin/io/github/serpro69/kfaker/tv/provider/NewGirl.kt index cc2c4511f..b11b3b64b 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/NewGirl.kt +++ b/faker/tvshows/src/main/kotlin/io/github/serpro69/kfaker/tv/provider/NewGirl.kt @@ -1,7 +1,9 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.tv.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/ParksAndRec.kt b/faker/tvshows/src/main/kotlin/io/github/serpro69/kfaker/tv/provider/ParksAndRec.kt similarity index 73% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/ParksAndRec.kt rename to faker/tvshows/src/main/kotlin/io/github/serpro69/kfaker/tv/provider/ParksAndRec.kt index d014d6b5d..d113beaae 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/ParksAndRec.kt +++ b/faker/tvshows/src/main/kotlin/io/github/serpro69/kfaker/tv/provider/ParksAndRec.kt @@ -1,7 +1,9 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.tv.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/RickAndMorty.kt b/faker/tvshows/src/main/kotlin/io/github/serpro69/kfaker/tv/provider/RickAndMorty.kt similarity index 74% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/RickAndMorty.kt rename to faker/tvshows/src/main/kotlin/io/github/serpro69/kfaker/tv/provider/RickAndMorty.kt index fb9729d46..70f3da288 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/RickAndMorty.kt +++ b/faker/tvshows/src/main/kotlin/io/github/serpro69/kfaker/tv/provider/RickAndMorty.kt @@ -1,7 +1,9 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.tv.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Rupaul.kt b/faker/tvshows/src/main/kotlin/io/github/serpro69/kfaker/tv/provider/Rupaul.kt similarity index 71% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/Rupaul.kt rename to faker/tvshows/src/main/kotlin/io/github/serpro69/kfaker/tv/provider/Rupaul.kt index cb758129d..ec35777f3 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Rupaul.kt +++ b/faker/tvshows/src/main/kotlin/io/github/serpro69/kfaker/tv/provider/Rupaul.kt @@ -1,7 +1,9 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.tv.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Seinfeld.kt b/faker/tvshows/src/main/kotlin/io/github/serpro69/kfaker/tv/provider/Seinfeld.kt similarity index 73% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/Seinfeld.kt rename to faker/tvshows/src/main/kotlin/io/github/serpro69/kfaker/tv/provider/Seinfeld.kt index 7b6a5d71f..738c6e827 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Seinfeld.kt +++ b/faker/tvshows/src/main/kotlin/io/github/serpro69/kfaker/tv/provider/Seinfeld.kt @@ -1,7 +1,9 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.tv.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/SiliconValley.kt b/faker/tvshows/src/main/kotlin/io/github/serpro69/kfaker/tv/provider/SiliconValley.kt similarity index 78% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/SiliconValley.kt rename to faker/tvshows/src/main/kotlin/io/github/serpro69/kfaker/tv/provider/SiliconValley.kt index b8f052d6f..ccfd6e654 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/SiliconValley.kt +++ b/faker/tvshows/src/main/kotlin/io/github/serpro69/kfaker/tv/provider/SiliconValley.kt @@ -1,7 +1,9 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.tv.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Simpsons.kt b/faker/tvshows/src/main/kotlin/io/github/serpro69/kfaker/tv/provider/Simpsons.kt similarity index 74% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/Simpsons.kt rename to faker/tvshows/src/main/kotlin/io/github/serpro69/kfaker/tv/provider/Simpsons.kt index 5e3e81d89..54382841c 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Simpsons.kt +++ b/faker/tvshows/src/main/kotlin/io/github/serpro69/kfaker/tv/provider/Simpsons.kt @@ -1,7 +1,9 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.tv.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/SouthPark.kt b/faker/tvshows/src/main/kotlin/io/github/serpro69/kfaker/tv/provider/SouthPark.kt similarity index 73% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/SouthPark.kt rename to faker/tvshows/src/main/kotlin/io/github/serpro69/kfaker/tv/provider/SouthPark.kt index b0bd0645d..96b25aa71 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/SouthPark.kt +++ b/faker/tvshows/src/main/kotlin/io/github/serpro69/kfaker/tv/provider/SouthPark.kt @@ -1,7 +1,9 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.tv.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Spongebob.kt b/faker/tvshows/src/main/kotlin/io/github/serpro69/kfaker/tv/provider/Spongebob.kt similarity index 73% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/Spongebob.kt rename to faker/tvshows/src/main/kotlin/io/github/serpro69/kfaker/tv/provider/Spongebob.kt index c71efb7f5..134590314 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Spongebob.kt +++ b/faker/tvshows/src/main/kotlin/io/github/serpro69/kfaker/tv/provider/Spongebob.kt @@ -1,7 +1,9 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.tv.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/StarTrek.kt b/faker/tvshows/src/main/kotlin/io/github/serpro69/kfaker/tv/provider/StarTrek.kt similarity index 74% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/StarTrek.kt rename to faker/tvshows/src/main/kotlin/io/github/serpro69/kfaker/tv/provider/StarTrek.kt index c2141c634..68f7e5036 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/StarTrek.kt +++ b/faker/tvshows/src/main/kotlin/io/github/serpro69/kfaker/tv/provider/StarTrek.kt @@ -1,7 +1,9 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.tv.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Stargate.kt b/faker/tvshows/src/main/kotlin/io/github/serpro69/kfaker/tv/provider/Stargate.kt similarity index 73% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/Stargate.kt rename to faker/tvshows/src/main/kotlin/io/github/serpro69/kfaker/tv/provider/Stargate.kt index 954ffcd4e..f3c894422 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Stargate.kt +++ b/faker/tvshows/src/main/kotlin/io/github/serpro69/kfaker/tv/provider/Stargate.kt @@ -1,7 +1,9 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.tv.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/StrangerThings.kt b/faker/tvshows/src/main/kotlin/io/github/serpro69/kfaker/tv/provider/StrangerThings.kt similarity index 73% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/StrangerThings.kt rename to faker/tvshows/src/main/kotlin/io/github/serpro69/kfaker/tv/provider/StrangerThings.kt index 171e806bb..c61be3c9a 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/StrangerThings.kt +++ b/faker/tvshows/src/main/kotlin/io/github/serpro69/kfaker/tv/provider/StrangerThings.kt @@ -1,7 +1,9 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.tv.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Suits.kt b/faker/tvshows/src/main/kotlin/io/github/serpro69/kfaker/tv/provider/Suits.kt similarity index 72% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/Suits.kt rename to faker/tvshows/src/main/kotlin/io/github/serpro69/kfaker/tv/provider/Suits.kt index a10135538..be7088655 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Suits.kt +++ b/faker/tvshows/src/main/kotlin/io/github/serpro69/kfaker/tv/provider/Suits.kt @@ -1,7 +1,9 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.tv.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Supernatural.kt b/faker/tvshows/src/main/kotlin/io/github/serpro69/kfaker/tv/provider/Supernatural.kt similarity index 74% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/Supernatural.kt rename to faker/tvshows/src/main/kotlin/io/github/serpro69/kfaker/tv/provider/Supernatural.kt index fef25c0bf..4bd8c6421 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/Supernatural.kt +++ b/faker/tvshows/src/main/kotlin/io/github/serpro69/kfaker/tv/provider/Supernatural.kt @@ -1,9 +1,11 @@ @file:Suppress("unused") -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.tv.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/TheExpanse.kt b/faker/tvshows/src/main/kotlin/io/github/serpro69/kfaker/tv/provider/TheExpanse.kt similarity index 74% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/TheExpanse.kt rename to faker/tvshows/src/main/kotlin/io/github/serpro69/kfaker/tv/provider/TheExpanse.kt index 42be0374d..0776aaf49 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/TheExpanse.kt +++ b/faker/tvshows/src/main/kotlin/io/github/serpro69/kfaker/tv/provider/TheExpanse.kt @@ -1,7 +1,9 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.tv.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/TheITCrowd.kt b/faker/tvshows/src/main/kotlin/io/github/serpro69/kfaker/tv/provider/TheITCrowd.kt similarity index 74% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/TheITCrowd.kt rename to faker/tvshows/src/main/kotlin/io/github/serpro69/kfaker/tv/provider/TheITCrowd.kt index ed454ed01..d40409953 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/TheITCrowd.kt +++ b/faker/tvshows/src/main/kotlin/io/github/serpro69/kfaker/tv/provider/TheITCrowd.kt @@ -1,7 +1,9 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.tv.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/TheOffice.kt b/faker/tvshows/src/main/kotlin/io/github/serpro69/kfaker/tv/provider/TheOffice.kt similarity index 73% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/TheOffice.kt rename to faker/tvshows/src/main/kotlin/io/github/serpro69/kfaker/tv/provider/TheOffice.kt index f9f420535..f66032509 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/TheOffice.kt +++ b/faker/tvshows/src/main/kotlin/io/github/serpro69/kfaker/tv/provider/TheOffice.kt @@ -1,9 +1,11 @@ @file:Suppress("unused") -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.tv.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/TheThickOfIt.kt b/faker/tvshows/src/main/kotlin/io/github/serpro69/kfaker/tv/provider/TheThickOfIt.kt similarity index 74% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/TheThickOfIt.kt rename to faker/tvshows/src/main/kotlin/io/github/serpro69/kfaker/tv/provider/TheThickOfIt.kt index d4f9bc96d..1ab7da11b 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/TheThickOfIt.kt +++ b/faker/tvshows/src/main/kotlin/io/github/serpro69/kfaker/tv/provider/TheThickOfIt.kt @@ -1,7 +1,9 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.tv.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/TwinPeaks.kt b/faker/tvshows/src/main/kotlin/io/github/serpro69/kfaker/tv/provider/TwinPeaks.kt similarity index 73% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/TwinPeaks.kt rename to faker/tvshows/src/main/kotlin/io/github/serpro69/kfaker/tv/provider/TwinPeaks.kt index 845b93481..2280d530a 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/TwinPeaks.kt +++ b/faker/tvshows/src/main/kotlin/io/github/serpro69/kfaker/tv/provider/TwinPeaks.kt @@ -1,7 +1,9 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.tv.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/VentureBros.kt b/faker/tvshows/src/main/kotlin/io/github/serpro69/kfaker/tv/provider/VentureBros.kt similarity index 75% rename from core/src/main/kotlin/io/github/serpro69/kfaker/provider/VentureBros.kt rename to faker/tvshows/src/main/kotlin/io/github/serpro69/kfaker/tv/provider/VentureBros.kt index 3d660a93b..c72e19446 100644 --- a/core/src/main/kotlin/io/github/serpro69/kfaker/provider/VentureBros.kt +++ b/faker/tvshows/src/main/kotlin/io/github/serpro69/kfaker/tv/provider/VentureBros.kt @@ -1,7 +1,9 @@ -package io.github.serpro69.kfaker.provider +package io.github.serpro69.kfaker.tv.provider -import io.github.serpro69.kfaker.* -import io.github.serpro69.kfaker.dictionary.* +import io.github.serpro69.kfaker.FakerService +import io.github.serpro69.kfaker.dictionary.YamlCategory +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.YamlFakeDataProvider import io.github.serpro69.kfaker.provider.unique.LocalUniqueDataProvider import io.github.serpro69.kfaker.provider.unique.UniqueProviderDelegate diff --git a/gradle.properties b/gradle.properties index c7e460d69..675c45780 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,3 +1,4 @@ version=0.0.0 kotlin.code.style=official org.gradle.jvmargs=-Xmx3G -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 +org.gradle.configureondemand=true diff --git a/settings.gradle.kts b/settings.gradle.kts index 7fdb66d94..0d0b79011 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -16,3 +16,26 @@ include( "cli-bot", "docs" ) + +val fakers = listOf( + "books", + "commerce", + "creatures", + "edu", + "games", + "humor", + "japmedia", + "lorem", + "misc", + "movies", + "music", + "sports", + "tech", + "travel", + "tvshows", +) + +fakers.forEach { include("faker:$it") } + +// helpers for integration tests +include("test") diff --git a/test/README.md b/test/README.md new file mode 100644 index 000000000..e2d2a75a5 --- /dev/null +++ b/test/README.md @@ -0,0 +1 @@ +Contains "helper functions" for [faker providers'](../provider) integration tests. diff --git a/test/build.gradle.kts b/test/build.gradle.kts new file mode 100644 index 000000000..da45439e6 --- /dev/null +++ b/test/build.gradle.kts @@ -0,0 +1,35 @@ +plugins { +} + +dependencies { + testImplementation(project(":core")) +} + +configurations.create("testHelper") + +val testJar = tasks.create("testJar", Jar::class) { + archiveClassifier.set("test") + from(sourceSets.test.get().output) + dependsOn(tasks.testClasses) +} + +artifacts { + val testHelper by configurations + add(testHelper.name, testJar) +} + +// disable the default jar task +tasks.jar { + enabled = false +} + +// never publish +tasks.withType { + enabled = false +} + +// nothing to test in this module yet, +// and we use test sources to produce artifacts... +tasks.withType { + enabled = false +} diff --git a/test/src/test/kotlin/io/github/serpro69/kfaker/test/helper/IntegrationTestHelper.kt b/test/src/test/kotlin/io/github/serpro69/kfaker/test/helper/IntegrationTestHelper.kt new file mode 100644 index 000000000..835f033f3 --- /dev/null +++ b/test/src/test/kotlin/io/github/serpro69/kfaker/test/helper/IntegrationTestHelper.kt @@ -0,0 +1,226 @@ +package io.github.serpro69.kfaker.test.helper + +import io.github.serpro69.kfaker.AbstractFaker +import io.github.serpro69.kfaker.provider.FakeDataProvider +import io.github.serpro69.kfaker.provider.Money +import io.github.serpro69.kfaker.provider.misc.RandomProvider +import io.github.serpro69.kfaker.provider.misc.StringProvider +import io.kotest.assertions.assertSoftly +import io.kotest.core.spec.style.DescribeSpec +import org.junit.jupiter.api.assertDoesNotThrow +import kotlin.reflect.KProperty +import kotlin.reflect.KVisibility +import kotlin.reflect.full.declaredMemberFunctions +import kotlin.reflect.full.declaredMemberProperties +import kotlin.reflect.full.isSubtypeOf +import kotlin.reflect.full.starProjectedType + +fun DescribeSpec.`every public function in each provider is invoked without exceptions`(faker: AbstractFaker) { + describe("every public function in each provider is invoked without exceptions") { + // Get a list of all publicly visible providers + val providers: List> = faker::class.declaredMemberProperties.filter { + it.visibility == KVisibility.PUBLIC + && it.returnType.isSubtypeOf(FakeDataProvider::class.starProjectedType) + && it.returnType.classifier != Money::class // Ignore Money provider as it's a special case + && it.returnType.classifier != StringProvider::class // Ignore String provider + && it.returnType.classifier != RandomProvider::class // Ignore String provider + } + + // Get a list of all publicly visible functions in each provider + val providerFunctions = providers.associateBy { provider -> + provider.getter.call(faker)!!::class.declaredMemberFunctions.filter { + it.visibility == KVisibility.PUBLIC && !it.annotations.any { ann -> ann is Deprecated } + } + } + + assertSoftly { + providerFunctions.forEach { (functions, provider) -> + functions.forEach { + context("result value for ${provider.name} ${it.name} is resolved correctly") { + val regex = Regex("""#\{.*}|#++""") + + val value = when (it.parameters.size) { + 1 -> it.call(provider.getter.call(faker)).toString() + 2 -> { + if (it.parameters[1].isOptional) { // optional params are enum typed (see functions in Dune, Finance or Tron, for example) + it.callBy(mapOf(it.parameters[0] to provider.getter.call(faker))).toString() + } else it.call(provider.getter.call(faker), "").toString() + } + 3 -> { + if (it.parameters[1].isOptional && it.parameters[2].isOptional) { + it.callBy(mapOf(it.parameters[0] to provider.getter.call(faker))).toString() + } else it.call(provider.getter.call(faker), "", "").toString() + } + else -> throw IllegalArgumentException("") + } + + it("resolved value should not contain yaml expression") { + if ( + !value.contains("#chuck and #norris") + && (provider.name != "markdown" && it.name != "headers") + && value !in valuesWithHashKey + ) { + if (value.contains(regex)) { + throw AssertionError("Value '$value' for '${provider.name} ${it.name}' should not contain regex '$regex'") + } + } + } + + it("resolved value should not be empty string") { + if (value == "") { + throw AssertionError("Value for '${provider.name} ${it.name}' should not be empty string") + } + } + + it("resolved value should not contain duplicates") { + val values = value.split(" ") + + // Accounting for some exceptional cases where values are repeated + // in resolved expression + if ( + (provider.name != "coffee" && it.name != "notes") + && (provider.name != "onePiece" && it.name != "akumasNoMi") + && (provider.name != "lorem" && it.name != "punctuation" && value != " ") + && value !in duplicatedValues + ) { + // Since there's no way to modify assertion message in KotlinTest it's better to throw a custom error + if (values.odds() == values.evens()) { + throw AssertionError("Value '$value' for '${provider.name} ${it.name}' should not contain duplicates") + } + } + } + } + } + } + } + } +} + +fun DescribeSpec.`faker instance is initialized with custom locale`(fakerInit: (AbstractFaker.Builder.() -> Unit) -> AbstractFaker) { + describe("Faker instance is initialized with custom locale") { + locales.forEach { + it("Faker with locale '$it' should be initialized without exceptions") { + assertDoesNotThrow { + fakerInit { + fakerConfig { + locale = it + } + } + } + } + } + } +} + +private val locales = listOf( + "ar", + "bg", + "ca", + "ca-CAT", + "da-DK", + "de", + "de-AT", + "de-CH", + "ee", + "en", + "en-AU", + "en-au-ocker", + "en-BORK", + "en-CA", + "en-GB", + "en-IND", + "en-KE", + "en-MS", + "en-NEP", + "en-NG", + "en-NZ", + "en-PAK", + "en-SG", + "en-TH", + "en-UG", + "en-US", + "en-ZA", + "es", + "es-AR", + "es-MX", + "fa", + "fi-FI", + "fr-CA", + "fr-CH", + "he", + "hy", + "id", + "it", + "ko", + "License", + "lt", + "lv", + "mi-NZ", + "nb-NO", + "nl", + "no", + "pl", + "pt", + "pt-BR", + "ru", + "sk", + "sv", + "th", + "tr", + "uk", + "vi", + "zh-CN", + "zh-TW", +) + +private fun List.odds() = this.mapIndexedNotNull { index, s -> + if (index % 2 == 0) s else null +} + +private fun List.evens() = this.mapIndexedNotNull { index, s -> + if (index % 2 != 0) s else null +} + +private val duplicatedValues = listOf( + "Tiger! Tiger!", // book#title + "Girls Girls", // kPop#girlsGroups + "Two Two", // kPop#firstGroups + "woof woof", // creature#dog#sound + "Duran Duran", // rockBand#name + "Li Li", // heroesOfTheStorm#heroes + "Dee Dee", // theFreshPrinceOfBelAir#characters + "Lola Lola", // cannabis#brands + "Hail Hail", // pearlJam#songs + "Help Help", // pearlJam#songs + "Mr. Mr.", // kPop#thirdGroups + "Chitty Chitty Bang Bang", // show#adultMusical + "etc. etc.", // marketing#buzzwords + "Ook Ook", // ventureBros#character + "Mahi Mahi", // food#ingredients + "Cous Cous", // food#ingredients + "Boom Boom", // superMario#characters + "Pom Pom", // superMario#characters + "Min Min", // superSmashBros#fighter +) + +private val valuesWithHashKey = listOf( + "A# .NET", // programmingLanguage#name + "A# (Axiom)", // programmingLanguage#name + "C# – ISO/I EC 23270", //programmingLanguage#name + "F#", // programmingLanguage#name + "J#", // programmingLanguage#name + "M#", // programmingLanguage#name + "P#", // programmingLanguage#name + "Q# (Microsoft programming language)", // programmingLanguage#name + "Visual J#", // programmingLanguage#name + "Acoustic #1", // pearlJam#songs + "I am downloading some NP# music.", // michaelScott#quotes + "Cooler #6", // dragonBall#planets + "Cooler #98", // dragonBall#planets + "Cooler #256", // dragonBall#planets + "Frieza #17", // dragonBall#planets + "Frieza #79", // dragonBall#planets + "Frieza #448", // dragonBall#planets + "tL&^J@24CVF=zP46Lxixk`_a#=o6c5", // device#serial + "S#arp", // kPop#firstGroups +)