From 1155c3c1dcb6f2b8e9cf07e32c5483f699cd0bf1 Mon Sep 17 00:00:00 2001 From: Robert Stoll Date: Wed, 10 Jan 2024 15:08:53 +0100 Subject: [PATCH] add component operator fun to extract the args without representation --- build.gradle.kts | 48 +- .../com/tegonal/minimalist/argsComponents.kt | 610 ++++++++++++++++++ .../components/Args10ComponentsTest.kt | 299 +++++++++ .../components/Args1ComponentsTest.kt | 29 + .../components/Args2ComponentsTest.kt | 43 ++ .../components/Args3ComponentsTest.kt | 61 ++ .../components/Args4ComponentsTest.kt | 83 +++ .../components/Args5ComponentsTest.kt | 109 ++++ .../components/Args6ComponentsTest.kt | 139 ++++ .../components/Args7ComponentsTest.kt | 173 +++++ .../components/Args8ComponentsTest.kt | 211 ++++++ .../components/Args9ComponentsTest.kt | 253 ++++++++ 12 files changed, 2056 insertions(+), 2 deletions(-) create mode 100644 src/main/generated/kotlin/com/tegonal/minimalist/argsComponents.kt create mode 100644 src/test/generated/kotlin/com/tegonal/minimalist/arguments/components/Args10ComponentsTest.kt create mode 100644 src/test/generated/kotlin/com/tegonal/minimalist/arguments/components/Args1ComponentsTest.kt create mode 100644 src/test/generated/kotlin/com/tegonal/minimalist/arguments/components/Args2ComponentsTest.kt create mode 100644 src/test/generated/kotlin/com/tegonal/minimalist/arguments/components/Args3ComponentsTest.kt create mode 100644 src/test/generated/kotlin/com/tegonal/minimalist/arguments/components/Args4ComponentsTest.kt create mode 100644 src/test/generated/kotlin/com/tegonal/minimalist/arguments/components/Args5ComponentsTest.kt create mode 100644 src/test/generated/kotlin/com/tegonal/minimalist/arguments/components/Args6ComponentsTest.kt create mode 100644 src/test/generated/kotlin/com/tegonal/minimalist/arguments/components/Args7ComponentsTest.kt create mode 100644 src/test/generated/kotlin/com/tegonal/minimalist/arguments/components/Args8ComponentsTest.kt create mode 100644 src/test/generated/kotlin/com/tegonal/minimalist/arguments/components/Args9ComponentsTest.kt diff --git a/build.gradle.kts b/build.gradle.kts index e1baef2..79fa964 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -69,8 +69,7 @@ val generate: TaskProvider = tasks.register("generate") { val argsOf = createStringBuilder(packageName) .append("import com.tegonal.minimalist.impl.*\n\n") - StringBuilder(dontModifyNotice) - .append("package ").append(packageName).append("\n\n") + val argsComponents = createStringBuilder(packageName) (1..numOfArgs).forEach { upperNumber -> val numbers = (1..upperNumber).toList() @@ -183,6 +182,24 @@ val generate: TaskProvider = tasks.register("generate") { ).appendLine() } + numbers.forEach { index -> + argsComponents.append( + """ + |/** + | * Extracts [a$index][Args$upperNumber.a$index] (the $index argument) of this Args$upperNumber. + | * + | * Be aware of that you loose the [representation$index][Args$upperNumber.representation$index] this way. Should you extract + | * the argument in order to create another Args afterwards, then ${if(upperNumber < numOfArgs)"[Args$upperNumber.append] or " else ""} + | * one of the ${if(upperNumber > 1) "[Args$upperNumber.dropArg1] or " else ""}[Args$upperNumber.withArg1] methods might be more suited. + | * + | * @since 1.1.0 + | */ + |operator fun <$typeArgs> Args$upperNumber<$typeArgs>.component$index(): A$index = a$index + | + """.trimMargin() + ).appendLine() + } + (1..numOfArgs - upperNumber).forEach { upperNumber2 -> val upperNumber3 = upperNumber + upperNumber2 @@ -314,6 +331,9 @@ val generate: TaskProvider = tasks.register("generate") { val argsOfFile = packageDir.resolve("argsOf.kt") argsOfFile.writeText(argsOf.toString()) + + val argsComponentFile = packageDir.resolve("argsComponents.kt") + argsComponentFile.writeText(argsComponents.toString()) } } generationFolder.builtBy(generate) @@ -582,6 +602,30 @@ val generateTest: TaskProvider = tasks.register("generateTest") { appendTest.append("}") val appendTestFile = packageDir.resolve("append/Args${upperNumber}AppendTest.kt") appendTestFile.writeText(appendTest.toString()) + + val argsComponentTest = createStringBuilder("$packageName.arguments.components") + .appendTest("Args${upperNumber}ComponentsTest") + + numbers.forEach { number -> + argsComponentTest.append( + """ + | @Test + | fun component$number() { + | val args = Args.of( + | ${argValues.take(upperNumber).joinToString(",\n\t\t\t")}, + | ${numbers.joinToString(",\n\t\t\t") { "representation$it = \"rep $it\"" }} + | ) + | val (${"_, ".repeat(number -1)}a$number) = args + | expect(a$number).toEqual(args.a$number) + | } + | + """.trimMargin() + ).appendLine() + } + + argsComponentTest.append("}") + val argsComponentTestFile = packageDir.resolve("arguments/components/Args${upperNumber}ComponentsTest.kt") + argsComponentTestFile.writeText(argsComponentTest.toString()) } } } diff --git a/src/main/generated/kotlin/com/tegonal/minimalist/argsComponents.kt b/src/main/generated/kotlin/com/tegonal/minimalist/argsComponents.kt new file mode 100644 index 0000000..5bad3aa --- /dev/null +++ b/src/main/generated/kotlin/com/tegonal/minimalist/argsComponents.kt @@ -0,0 +1,610 @@ +// ----------------------------------------------------------------------- +// automatically generated, don't modify here but in build.gradle.kts +// ----------------------------------------------------------------------- +package com.tegonal.minimalist + +/** + * Extracts [a1][Args1.a1] (the 1 argument) of this Args1. + * + * Be aware of that you loose the [representation1][Args1.representation1] this way. Should you extract + * the argument in order to create another Args afterwards, then [Args1.append] or + * one of the [Args1.withArg1] methods might be more suited. + * + * @since 1.1.0 + */ +operator fun Args1.component1(): A1 = a1 + +/** + * Extracts [a1][Args2.a1] (the 1 argument) of this Args2. + * + * Be aware of that you loose the [representation1][Args2.representation1] this way. Should you extract + * the argument in order to create another Args afterwards, then [Args2.append] or + * one of the [Args2.dropArg1] or [Args2.withArg1] methods might be more suited. + * + * @since 1.1.0 + */ +operator fun Args2.component1(): A1 = a1 + +/** + * Extracts [a2][Args2.a2] (the 2 argument) of this Args2. + * + * Be aware of that you loose the [representation2][Args2.representation2] this way. Should you extract + * the argument in order to create another Args afterwards, then [Args2.append] or + * one of the [Args2.dropArg1] or [Args2.withArg1] methods might be more suited. + * + * @since 1.1.0 + */ +operator fun Args2.component2(): A2 = a2 + +/** + * Extracts [a1][Args3.a1] (the 1 argument) of this Args3. + * + * Be aware of that you loose the [representation1][Args3.representation1] this way. Should you extract + * the argument in order to create another Args afterwards, then [Args3.append] or + * one of the [Args3.dropArg1] or [Args3.withArg1] methods might be more suited. + * + * @since 1.1.0 + */ +operator fun Args3.component1(): A1 = a1 + +/** + * Extracts [a2][Args3.a2] (the 2 argument) of this Args3. + * + * Be aware of that you loose the [representation2][Args3.representation2] this way. Should you extract + * the argument in order to create another Args afterwards, then [Args3.append] or + * one of the [Args3.dropArg1] or [Args3.withArg1] methods might be more suited. + * + * @since 1.1.0 + */ +operator fun Args3.component2(): A2 = a2 + +/** + * Extracts [a3][Args3.a3] (the 3 argument) of this Args3. + * + * Be aware of that you loose the [representation3][Args3.representation3] this way. Should you extract + * the argument in order to create another Args afterwards, then [Args3.append] or + * one of the [Args3.dropArg1] or [Args3.withArg1] methods might be more suited. + * + * @since 1.1.0 + */ +operator fun Args3.component3(): A3 = a3 + +/** + * Extracts [a1][Args4.a1] (the 1 argument) of this Args4. + * + * Be aware of that you loose the [representation1][Args4.representation1] this way. Should you extract + * the argument in order to create another Args afterwards, then [Args4.append] or + * one of the [Args4.dropArg1] or [Args4.withArg1] methods might be more suited. + * + * @since 1.1.0 + */ +operator fun Args4.component1(): A1 = a1 + +/** + * Extracts [a2][Args4.a2] (the 2 argument) of this Args4. + * + * Be aware of that you loose the [representation2][Args4.representation2] this way. Should you extract + * the argument in order to create another Args afterwards, then [Args4.append] or + * one of the [Args4.dropArg1] or [Args4.withArg1] methods might be more suited. + * + * @since 1.1.0 + */ +operator fun Args4.component2(): A2 = a2 + +/** + * Extracts [a3][Args4.a3] (the 3 argument) of this Args4. + * + * Be aware of that you loose the [representation3][Args4.representation3] this way. Should you extract + * the argument in order to create another Args afterwards, then [Args4.append] or + * one of the [Args4.dropArg1] or [Args4.withArg1] methods might be more suited. + * + * @since 1.1.0 + */ +operator fun Args4.component3(): A3 = a3 + +/** + * Extracts [a4][Args4.a4] (the 4 argument) of this Args4. + * + * Be aware of that you loose the [representation4][Args4.representation4] this way. Should you extract + * the argument in order to create another Args afterwards, then [Args4.append] or + * one of the [Args4.dropArg1] or [Args4.withArg1] methods might be more suited. + * + * @since 1.1.0 + */ +operator fun Args4.component4(): A4 = a4 + +/** + * Extracts [a1][Args5.a1] (the 1 argument) of this Args5. + * + * Be aware of that you loose the [representation1][Args5.representation1] this way. Should you extract + * the argument in order to create another Args afterwards, then [Args5.append] or + * one of the [Args5.dropArg1] or [Args5.withArg1] methods might be more suited. + * + * @since 1.1.0 + */ +operator fun Args5.component1(): A1 = a1 + +/** + * Extracts [a2][Args5.a2] (the 2 argument) of this Args5. + * + * Be aware of that you loose the [representation2][Args5.representation2] this way. Should you extract + * the argument in order to create another Args afterwards, then [Args5.append] or + * one of the [Args5.dropArg1] or [Args5.withArg1] methods might be more suited. + * + * @since 1.1.0 + */ +operator fun Args5.component2(): A2 = a2 + +/** + * Extracts [a3][Args5.a3] (the 3 argument) of this Args5. + * + * Be aware of that you loose the [representation3][Args5.representation3] this way. Should you extract + * the argument in order to create another Args afterwards, then [Args5.append] or + * one of the [Args5.dropArg1] or [Args5.withArg1] methods might be more suited. + * + * @since 1.1.0 + */ +operator fun Args5.component3(): A3 = a3 + +/** + * Extracts [a4][Args5.a4] (the 4 argument) of this Args5. + * + * Be aware of that you loose the [representation4][Args5.representation4] this way. Should you extract + * the argument in order to create another Args afterwards, then [Args5.append] or + * one of the [Args5.dropArg1] or [Args5.withArg1] methods might be more suited. + * + * @since 1.1.0 + */ +operator fun Args5.component4(): A4 = a4 + +/** + * Extracts [a5][Args5.a5] (the 5 argument) of this Args5. + * + * Be aware of that you loose the [representation5][Args5.representation5] this way. Should you extract + * the argument in order to create another Args afterwards, then [Args5.append] or + * one of the [Args5.dropArg1] or [Args5.withArg1] methods might be more suited. + * + * @since 1.1.0 + */ +operator fun Args5.component5(): A5 = a5 + +/** + * Extracts [a1][Args6.a1] (the 1 argument) of this Args6. + * + * Be aware of that you loose the [representation1][Args6.representation1] this way. Should you extract + * the argument in order to create another Args afterwards, then [Args6.append] or + * one of the [Args6.dropArg1] or [Args6.withArg1] methods might be more suited. + * + * @since 1.1.0 + */ +operator fun Args6.component1(): A1 = a1 + +/** + * Extracts [a2][Args6.a2] (the 2 argument) of this Args6. + * + * Be aware of that you loose the [representation2][Args6.representation2] this way. Should you extract + * the argument in order to create another Args afterwards, then [Args6.append] or + * one of the [Args6.dropArg1] or [Args6.withArg1] methods might be more suited. + * + * @since 1.1.0 + */ +operator fun Args6.component2(): A2 = a2 + +/** + * Extracts [a3][Args6.a3] (the 3 argument) of this Args6. + * + * Be aware of that you loose the [representation3][Args6.representation3] this way. Should you extract + * the argument in order to create another Args afterwards, then [Args6.append] or + * one of the [Args6.dropArg1] or [Args6.withArg1] methods might be more suited. + * + * @since 1.1.0 + */ +operator fun Args6.component3(): A3 = a3 + +/** + * Extracts [a4][Args6.a4] (the 4 argument) of this Args6. + * + * Be aware of that you loose the [representation4][Args6.representation4] this way. Should you extract + * the argument in order to create another Args afterwards, then [Args6.append] or + * one of the [Args6.dropArg1] or [Args6.withArg1] methods might be more suited. + * + * @since 1.1.0 + */ +operator fun Args6.component4(): A4 = a4 + +/** + * Extracts [a5][Args6.a5] (the 5 argument) of this Args6. + * + * Be aware of that you loose the [representation5][Args6.representation5] this way. Should you extract + * the argument in order to create another Args afterwards, then [Args6.append] or + * one of the [Args6.dropArg1] or [Args6.withArg1] methods might be more suited. + * + * @since 1.1.0 + */ +operator fun Args6.component5(): A5 = a5 + +/** + * Extracts [a6][Args6.a6] (the 6 argument) of this Args6. + * + * Be aware of that you loose the [representation6][Args6.representation6] this way. Should you extract + * the argument in order to create another Args afterwards, then [Args6.append] or + * one of the [Args6.dropArg1] or [Args6.withArg1] methods might be more suited. + * + * @since 1.1.0 + */ +operator fun Args6.component6(): A6 = a6 + +/** + * Extracts [a1][Args7.a1] (the 1 argument) of this Args7. + * + * Be aware of that you loose the [representation1][Args7.representation1] this way. Should you extract + * the argument in order to create another Args afterwards, then [Args7.append] or + * one of the [Args7.dropArg1] or [Args7.withArg1] methods might be more suited. + * + * @since 1.1.0 + */ +operator fun Args7.component1(): A1 = a1 + +/** + * Extracts [a2][Args7.a2] (the 2 argument) of this Args7. + * + * Be aware of that you loose the [representation2][Args7.representation2] this way. Should you extract + * the argument in order to create another Args afterwards, then [Args7.append] or + * one of the [Args7.dropArg1] or [Args7.withArg1] methods might be more suited. + * + * @since 1.1.0 + */ +operator fun Args7.component2(): A2 = a2 + +/** + * Extracts [a3][Args7.a3] (the 3 argument) of this Args7. + * + * Be aware of that you loose the [representation3][Args7.representation3] this way. Should you extract + * the argument in order to create another Args afterwards, then [Args7.append] or + * one of the [Args7.dropArg1] or [Args7.withArg1] methods might be more suited. + * + * @since 1.1.0 + */ +operator fun Args7.component3(): A3 = a3 + +/** + * Extracts [a4][Args7.a4] (the 4 argument) of this Args7. + * + * Be aware of that you loose the [representation4][Args7.representation4] this way. Should you extract + * the argument in order to create another Args afterwards, then [Args7.append] or + * one of the [Args7.dropArg1] or [Args7.withArg1] methods might be more suited. + * + * @since 1.1.0 + */ +operator fun Args7.component4(): A4 = a4 + +/** + * Extracts [a5][Args7.a5] (the 5 argument) of this Args7. + * + * Be aware of that you loose the [representation5][Args7.representation5] this way. Should you extract + * the argument in order to create another Args afterwards, then [Args7.append] or + * one of the [Args7.dropArg1] or [Args7.withArg1] methods might be more suited. + * + * @since 1.1.0 + */ +operator fun Args7.component5(): A5 = a5 + +/** + * Extracts [a6][Args7.a6] (the 6 argument) of this Args7. + * + * Be aware of that you loose the [representation6][Args7.representation6] this way. Should you extract + * the argument in order to create another Args afterwards, then [Args7.append] or + * one of the [Args7.dropArg1] or [Args7.withArg1] methods might be more suited. + * + * @since 1.1.0 + */ +operator fun Args7.component6(): A6 = a6 + +/** + * Extracts [a7][Args7.a7] (the 7 argument) of this Args7. + * + * Be aware of that you loose the [representation7][Args7.representation7] this way. Should you extract + * the argument in order to create another Args afterwards, then [Args7.append] or + * one of the [Args7.dropArg1] or [Args7.withArg1] methods might be more suited. + * + * @since 1.1.0 + */ +operator fun Args7.component7(): A7 = a7 + +/** + * Extracts [a1][Args8.a1] (the 1 argument) of this Args8. + * + * Be aware of that you loose the [representation1][Args8.representation1] this way. Should you extract + * the argument in order to create another Args afterwards, then [Args8.append] or + * one of the [Args8.dropArg1] or [Args8.withArg1] methods might be more suited. + * + * @since 1.1.0 + */ +operator fun Args8.component1(): A1 = a1 + +/** + * Extracts [a2][Args8.a2] (the 2 argument) of this Args8. + * + * Be aware of that you loose the [representation2][Args8.representation2] this way. Should you extract + * the argument in order to create another Args afterwards, then [Args8.append] or + * one of the [Args8.dropArg1] or [Args8.withArg1] methods might be more suited. + * + * @since 1.1.0 + */ +operator fun Args8.component2(): A2 = a2 + +/** + * Extracts [a3][Args8.a3] (the 3 argument) of this Args8. + * + * Be aware of that you loose the [representation3][Args8.representation3] this way. Should you extract + * the argument in order to create another Args afterwards, then [Args8.append] or + * one of the [Args8.dropArg1] or [Args8.withArg1] methods might be more suited. + * + * @since 1.1.0 + */ +operator fun Args8.component3(): A3 = a3 + +/** + * Extracts [a4][Args8.a4] (the 4 argument) of this Args8. + * + * Be aware of that you loose the [representation4][Args8.representation4] this way. Should you extract + * the argument in order to create another Args afterwards, then [Args8.append] or + * one of the [Args8.dropArg1] or [Args8.withArg1] methods might be more suited. + * + * @since 1.1.0 + */ +operator fun Args8.component4(): A4 = a4 + +/** + * Extracts [a5][Args8.a5] (the 5 argument) of this Args8. + * + * Be aware of that you loose the [representation5][Args8.representation5] this way. Should you extract + * the argument in order to create another Args afterwards, then [Args8.append] or + * one of the [Args8.dropArg1] or [Args8.withArg1] methods might be more suited. + * + * @since 1.1.0 + */ +operator fun Args8.component5(): A5 = a5 + +/** + * Extracts [a6][Args8.a6] (the 6 argument) of this Args8. + * + * Be aware of that you loose the [representation6][Args8.representation6] this way. Should you extract + * the argument in order to create another Args afterwards, then [Args8.append] or + * one of the [Args8.dropArg1] or [Args8.withArg1] methods might be more suited. + * + * @since 1.1.0 + */ +operator fun Args8.component6(): A6 = a6 + +/** + * Extracts [a7][Args8.a7] (the 7 argument) of this Args8. + * + * Be aware of that you loose the [representation7][Args8.representation7] this way. Should you extract + * the argument in order to create another Args afterwards, then [Args8.append] or + * one of the [Args8.dropArg1] or [Args8.withArg1] methods might be more suited. + * + * @since 1.1.0 + */ +operator fun Args8.component7(): A7 = a7 + +/** + * Extracts [a8][Args8.a8] (the 8 argument) of this Args8. + * + * Be aware of that you loose the [representation8][Args8.representation8] this way. Should you extract + * the argument in order to create another Args afterwards, then [Args8.append] or + * one of the [Args8.dropArg1] or [Args8.withArg1] methods might be more suited. + * + * @since 1.1.0 + */ +operator fun Args8.component8(): A8 = a8 + +/** + * Extracts [a1][Args9.a1] (the 1 argument) of this Args9. + * + * Be aware of that you loose the [representation1][Args9.representation1] this way. Should you extract + * the argument in order to create another Args afterwards, then [Args9.append] or + * one of the [Args9.dropArg1] or [Args9.withArg1] methods might be more suited. + * + * @since 1.1.0 + */ +operator fun Args9.component1(): A1 = a1 + +/** + * Extracts [a2][Args9.a2] (the 2 argument) of this Args9. + * + * Be aware of that you loose the [representation2][Args9.representation2] this way. Should you extract + * the argument in order to create another Args afterwards, then [Args9.append] or + * one of the [Args9.dropArg1] or [Args9.withArg1] methods might be more suited. + * + * @since 1.1.0 + */ +operator fun Args9.component2(): A2 = a2 + +/** + * Extracts [a3][Args9.a3] (the 3 argument) of this Args9. + * + * Be aware of that you loose the [representation3][Args9.representation3] this way. Should you extract + * the argument in order to create another Args afterwards, then [Args9.append] or + * one of the [Args9.dropArg1] or [Args9.withArg1] methods might be more suited. + * + * @since 1.1.0 + */ +operator fun Args9.component3(): A3 = a3 + +/** + * Extracts [a4][Args9.a4] (the 4 argument) of this Args9. + * + * Be aware of that you loose the [representation4][Args9.representation4] this way. Should you extract + * the argument in order to create another Args afterwards, then [Args9.append] or + * one of the [Args9.dropArg1] or [Args9.withArg1] methods might be more suited. + * + * @since 1.1.0 + */ +operator fun Args9.component4(): A4 = a4 + +/** + * Extracts [a5][Args9.a5] (the 5 argument) of this Args9. + * + * Be aware of that you loose the [representation5][Args9.representation5] this way. Should you extract + * the argument in order to create another Args afterwards, then [Args9.append] or + * one of the [Args9.dropArg1] or [Args9.withArg1] methods might be more suited. + * + * @since 1.1.0 + */ +operator fun Args9.component5(): A5 = a5 + +/** + * Extracts [a6][Args9.a6] (the 6 argument) of this Args9. + * + * Be aware of that you loose the [representation6][Args9.representation6] this way. Should you extract + * the argument in order to create another Args afterwards, then [Args9.append] or + * one of the [Args9.dropArg1] or [Args9.withArg1] methods might be more suited. + * + * @since 1.1.0 + */ +operator fun Args9.component6(): A6 = a6 + +/** + * Extracts [a7][Args9.a7] (the 7 argument) of this Args9. + * + * Be aware of that you loose the [representation7][Args9.representation7] this way. Should you extract + * the argument in order to create another Args afterwards, then [Args9.append] or + * one of the [Args9.dropArg1] or [Args9.withArg1] methods might be more suited. + * + * @since 1.1.0 + */ +operator fun Args9.component7(): A7 = a7 + +/** + * Extracts [a8][Args9.a8] (the 8 argument) of this Args9. + * + * Be aware of that you loose the [representation8][Args9.representation8] this way. Should you extract + * the argument in order to create another Args afterwards, then [Args9.append] or + * one of the [Args9.dropArg1] or [Args9.withArg1] methods might be more suited. + * + * @since 1.1.0 + */ +operator fun Args9.component8(): A8 = a8 + +/** + * Extracts [a9][Args9.a9] (the 9 argument) of this Args9. + * + * Be aware of that you loose the [representation9][Args9.representation9] this way. Should you extract + * the argument in order to create another Args afterwards, then [Args9.append] or + * one of the [Args9.dropArg1] or [Args9.withArg1] methods might be more suited. + * + * @since 1.1.0 + */ +operator fun Args9.component9(): A9 = a9 + +/** + * Extracts [a1][Args10.a1] (the 1 argument) of this Args10. + * + * Be aware of that you loose the [representation1][Args10.representation1] this way. Should you extract + * the argument in order to create another Args afterwards, then + * one of the [Args10.dropArg1] or [Args10.withArg1] methods might be more suited. + * + * @since 1.1.0 + */ +operator fun Args10.component1(): A1 = a1 + +/** + * Extracts [a2][Args10.a2] (the 2 argument) of this Args10. + * + * Be aware of that you loose the [representation2][Args10.representation2] this way. Should you extract + * the argument in order to create another Args afterwards, then + * one of the [Args10.dropArg1] or [Args10.withArg1] methods might be more suited. + * + * @since 1.1.0 + */ +operator fun Args10.component2(): A2 = a2 + +/** + * Extracts [a3][Args10.a3] (the 3 argument) of this Args10. + * + * Be aware of that you loose the [representation3][Args10.representation3] this way. Should you extract + * the argument in order to create another Args afterwards, then + * one of the [Args10.dropArg1] or [Args10.withArg1] methods might be more suited. + * + * @since 1.1.0 + */ +operator fun Args10.component3(): A3 = a3 + +/** + * Extracts [a4][Args10.a4] (the 4 argument) of this Args10. + * + * Be aware of that you loose the [representation4][Args10.representation4] this way. Should you extract + * the argument in order to create another Args afterwards, then + * one of the [Args10.dropArg1] or [Args10.withArg1] methods might be more suited. + * + * @since 1.1.0 + */ +operator fun Args10.component4(): A4 = a4 + +/** + * Extracts [a5][Args10.a5] (the 5 argument) of this Args10. + * + * Be aware of that you loose the [representation5][Args10.representation5] this way. Should you extract + * the argument in order to create another Args afterwards, then + * one of the [Args10.dropArg1] or [Args10.withArg1] methods might be more suited. + * + * @since 1.1.0 + */ +operator fun Args10.component5(): A5 = a5 + +/** + * Extracts [a6][Args10.a6] (the 6 argument) of this Args10. + * + * Be aware of that you loose the [representation6][Args10.representation6] this way. Should you extract + * the argument in order to create another Args afterwards, then + * one of the [Args10.dropArg1] or [Args10.withArg1] methods might be more suited. + * + * @since 1.1.0 + */ +operator fun Args10.component6(): A6 = a6 + +/** + * Extracts [a7][Args10.a7] (the 7 argument) of this Args10. + * + * Be aware of that you loose the [representation7][Args10.representation7] this way. Should you extract + * the argument in order to create another Args afterwards, then + * one of the [Args10.dropArg1] or [Args10.withArg1] methods might be more suited. + * + * @since 1.1.0 + */ +operator fun Args10.component7(): A7 = a7 + +/** + * Extracts [a8][Args10.a8] (the 8 argument) of this Args10. + * + * Be aware of that you loose the [representation8][Args10.representation8] this way. Should you extract + * the argument in order to create another Args afterwards, then + * one of the [Args10.dropArg1] or [Args10.withArg1] methods might be more suited. + * + * @since 1.1.0 + */ +operator fun Args10.component8(): A8 = a8 + +/** + * Extracts [a9][Args10.a9] (the 9 argument) of this Args10. + * + * Be aware of that you loose the [representation9][Args10.representation9] this way. Should you extract + * the argument in order to create another Args afterwards, then + * one of the [Args10.dropArg1] or [Args10.withArg1] methods might be more suited. + * + * @since 1.1.0 + */ +operator fun Args10.component9(): A9 = a9 + +/** + * Extracts [a10][Args10.a10] (the 10 argument) of this Args10. + * + * Be aware of that you loose the [representation10][Args10.representation10] this way. Should you extract + * the argument in order to create another Args afterwards, then + * one of the [Args10.dropArg1] or [Args10.withArg1] methods might be more suited. + * + * @since 1.1.0 + */ +operator fun Args10.component10(): A10 = a10 + diff --git a/src/test/generated/kotlin/com/tegonal/minimalist/arguments/components/Args10ComponentsTest.kt b/src/test/generated/kotlin/com/tegonal/minimalist/arguments/components/Args10ComponentsTest.kt new file mode 100644 index 0000000..241690e --- /dev/null +++ b/src/test/generated/kotlin/com/tegonal/minimalist/arguments/components/Args10ComponentsTest.kt @@ -0,0 +1,299 @@ +// ----------------------------------------------------------------------- +// automatically generated, don't modify here but in build.gradle.kts +// ----------------------------------------------------------------------- +package com.tegonal.minimalist.arguments.components + +import ch.tutteli.atrium.api.verbs.expect +import ch.tutteli.atrium.api.fluent.en_GB.* +import org.junit.jupiter.api.Test +import org.junit.jupiter.api.Named +import org.junit.jupiter.params.ParameterizedTest +import org.junit.jupiter.params.provider.MethodSource +import com.tegonal.minimalist.* +import com.tegonal.minimalist.atrium.* +import java.math.BigInteger +import java.time.LocalDate + +class Args10ComponentsTest { + + @Test + fun component1() { + val args = Args.of( + "string", + 1, + 2L, + 3F, + 4.0, + 'c', + LocalDate.now(), + 1.toShort(), + 2.toByte(), + 3.toBigInteger(), + representation1 = "rep 1", + representation2 = "rep 2", + representation3 = "rep 3", + representation4 = "rep 4", + representation5 = "rep 5", + representation6 = "rep 6", + representation7 = "rep 7", + representation8 = "rep 8", + representation9 = "rep 9", + representation10 = "rep 10" + ) + val (a1) = args + expect(a1).toEqual(args.a1) + } + + @Test + fun component2() { + val args = Args.of( + "string", + 1, + 2L, + 3F, + 4.0, + 'c', + LocalDate.now(), + 1.toShort(), + 2.toByte(), + 3.toBigInteger(), + representation1 = "rep 1", + representation2 = "rep 2", + representation3 = "rep 3", + representation4 = "rep 4", + representation5 = "rep 5", + representation6 = "rep 6", + representation7 = "rep 7", + representation8 = "rep 8", + representation9 = "rep 9", + representation10 = "rep 10" + ) + val (_, a2) = args + expect(a2).toEqual(args.a2) + } + + @Test + fun component3() { + val args = Args.of( + "string", + 1, + 2L, + 3F, + 4.0, + 'c', + LocalDate.now(), + 1.toShort(), + 2.toByte(), + 3.toBigInteger(), + representation1 = "rep 1", + representation2 = "rep 2", + representation3 = "rep 3", + representation4 = "rep 4", + representation5 = "rep 5", + representation6 = "rep 6", + representation7 = "rep 7", + representation8 = "rep 8", + representation9 = "rep 9", + representation10 = "rep 10" + ) + val (_, _, a3) = args + expect(a3).toEqual(args.a3) + } + + @Test + fun component4() { + val args = Args.of( + "string", + 1, + 2L, + 3F, + 4.0, + 'c', + LocalDate.now(), + 1.toShort(), + 2.toByte(), + 3.toBigInteger(), + representation1 = "rep 1", + representation2 = "rep 2", + representation3 = "rep 3", + representation4 = "rep 4", + representation5 = "rep 5", + representation6 = "rep 6", + representation7 = "rep 7", + representation8 = "rep 8", + representation9 = "rep 9", + representation10 = "rep 10" + ) + val (_, _, _, a4) = args + expect(a4).toEqual(args.a4) + } + + @Test + fun component5() { + val args = Args.of( + "string", + 1, + 2L, + 3F, + 4.0, + 'c', + LocalDate.now(), + 1.toShort(), + 2.toByte(), + 3.toBigInteger(), + representation1 = "rep 1", + representation2 = "rep 2", + representation3 = "rep 3", + representation4 = "rep 4", + representation5 = "rep 5", + representation6 = "rep 6", + representation7 = "rep 7", + representation8 = "rep 8", + representation9 = "rep 9", + representation10 = "rep 10" + ) + val (_, _, _, _, a5) = args + expect(a5).toEqual(args.a5) + } + + @Test + fun component6() { + val args = Args.of( + "string", + 1, + 2L, + 3F, + 4.0, + 'c', + LocalDate.now(), + 1.toShort(), + 2.toByte(), + 3.toBigInteger(), + representation1 = "rep 1", + representation2 = "rep 2", + representation3 = "rep 3", + representation4 = "rep 4", + representation5 = "rep 5", + representation6 = "rep 6", + representation7 = "rep 7", + representation8 = "rep 8", + representation9 = "rep 9", + representation10 = "rep 10" + ) + val (_, _, _, _, _, a6) = args + expect(a6).toEqual(args.a6) + } + + @Test + fun component7() { + val args = Args.of( + "string", + 1, + 2L, + 3F, + 4.0, + 'c', + LocalDate.now(), + 1.toShort(), + 2.toByte(), + 3.toBigInteger(), + representation1 = "rep 1", + representation2 = "rep 2", + representation3 = "rep 3", + representation4 = "rep 4", + representation5 = "rep 5", + representation6 = "rep 6", + representation7 = "rep 7", + representation8 = "rep 8", + representation9 = "rep 9", + representation10 = "rep 10" + ) + val (_, _, _, _, _, _, a7) = args + expect(a7).toEqual(args.a7) + } + + @Test + fun component8() { + val args = Args.of( + "string", + 1, + 2L, + 3F, + 4.0, + 'c', + LocalDate.now(), + 1.toShort(), + 2.toByte(), + 3.toBigInteger(), + representation1 = "rep 1", + representation2 = "rep 2", + representation3 = "rep 3", + representation4 = "rep 4", + representation5 = "rep 5", + representation6 = "rep 6", + representation7 = "rep 7", + representation8 = "rep 8", + representation9 = "rep 9", + representation10 = "rep 10" + ) + val (_, _, _, _, _, _, _, a8) = args + expect(a8).toEqual(args.a8) + } + + @Test + fun component9() { + val args = Args.of( + "string", + 1, + 2L, + 3F, + 4.0, + 'c', + LocalDate.now(), + 1.toShort(), + 2.toByte(), + 3.toBigInteger(), + representation1 = "rep 1", + representation2 = "rep 2", + representation3 = "rep 3", + representation4 = "rep 4", + representation5 = "rep 5", + representation6 = "rep 6", + representation7 = "rep 7", + representation8 = "rep 8", + representation9 = "rep 9", + representation10 = "rep 10" + ) + val (_, _, _, _, _, _, _, _, a9) = args + expect(a9).toEqual(args.a9) + } + + @Test + fun component10() { + val args = Args.of( + "string", + 1, + 2L, + 3F, + 4.0, + 'c', + LocalDate.now(), + 1.toShort(), + 2.toByte(), + 3.toBigInteger(), + representation1 = "rep 1", + representation2 = "rep 2", + representation3 = "rep 3", + representation4 = "rep 4", + representation5 = "rep 5", + representation6 = "rep 6", + representation7 = "rep 7", + representation8 = "rep 8", + representation9 = "rep 9", + representation10 = "rep 10" + ) + val (_, _, _, _, _, _, _, _, _, a10) = args + expect(a10).toEqual(args.a10) + } + +} \ No newline at end of file diff --git a/src/test/generated/kotlin/com/tegonal/minimalist/arguments/components/Args1ComponentsTest.kt b/src/test/generated/kotlin/com/tegonal/minimalist/arguments/components/Args1ComponentsTest.kt new file mode 100644 index 0000000..3898dc8 --- /dev/null +++ b/src/test/generated/kotlin/com/tegonal/minimalist/arguments/components/Args1ComponentsTest.kt @@ -0,0 +1,29 @@ +// ----------------------------------------------------------------------- +// automatically generated, don't modify here but in build.gradle.kts +// ----------------------------------------------------------------------- +package com.tegonal.minimalist.arguments.components + +import ch.tutteli.atrium.api.verbs.expect +import ch.tutteli.atrium.api.fluent.en_GB.* +import org.junit.jupiter.api.Test +import org.junit.jupiter.api.Named +import org.junit.jupiter.params.ParameterizedTest +import org.junit.jupiter.params.provider.MethodSource +import com.tegonal.minimalist.* +import com.tegonal.minimalist.atrium.* +import java.math.BigInteger +import java.time.LocalDate + +class Args1ComponentsTest { + + @Test + fun component1() { + val args = Args.of( + "string", + representation1 = "rep 1" + ) + val (a1) = args + expect(a1).toEqual(args.a1) + } + +} \ No newline at end of file diff --git a/src/test/generated/kotlin/com/tegonal/minimalist/arguments/components/Args2ComponentsTest.kt b/src/test/generated/kotlin/com/tegonal/minimalist/arguments/components/Args2ComponentsTest.kt new file mode 100644 index 0000000..2e84b3a --- /dev/null +++ b/src/test/generated/kotlin/com/tegonal/minimalist/arguments/components/Args2ComponentsTest.kt @@ -0,0 +1,43 @@ +// ----------------------------------------------------------------------- +// automatically generated, don't modify here but in build.gradle.kts +// ----------------------------------------------------------------------- +package com.tegonal.minimalist.arguments.components + +import ch.tutteli.atrium.api.verbs.expect +import ch.tutteli.atrium.api.fluent.en_GB.* +import org.junit.jupiter.api.Test +import org.junit.jupiter.api.Named +import org.junit.jupiter.params.ParameterizedTest +import org.junit.jupiter.params.provider.MethodSource +import com.tegonal.minimalist.* +import com.tegonal.minimalist.atrium.* +import java.math.BigInteger +import java.time.LocalDate + +class Args2ComponentsTest { + + @Test + fun component1() { + val args = Args.of( + "string", + 1, + representation1 = "rep 1", + representation2 = "rep 2" + ) + val (a1) = args + expect(a1).toEqual(args.a1) + } + + @Test + fun component2() { + val args = Args.of( + "string", + 1, + representation1 = "rep 1", + representation2 = "rep 2" + ) + val (_, a2) = args + expect(a2).toEqual(args.a2) + } + +} \ No newline at end of file diff --git a/src/test/generated/kotlin/com/tegonal/minimalist/arguments/components/Args3ComponentsTest.kt b/src/test/generated/kotlin/com/tegonal/minimalist/arguments/components/Args3ComponentsTest.kt new file mode 100644 index 0000000..3328396 --- /dev/null +++ b/src/test/generated/kotlin/com/tegonal/minimalist/arguments/components/Args3ComponentsTest.kt @@ -0,0 +1,61 @@ +// ----------------------------------------------------------------------- +// automatically generated, don't modify here but in build.gradle.kts +// ----------------------------------------------------------------------- +package com.tegonal.minimalist.arguments.components + +import ch.tutteli.atrium.api.verbs.expect +import ch.tutteli.atrium.api.fluent.en_GB.* +import org.junit.jupiter.api.Test +import org.junit.jupiter.api.Named +import org.junit.jupiter.params.ParameterizedTest +import org.junit.jupiter.params.provider.MethodSource +import com.tegonal.minimalist.* +import com.tegonal.minimalist.atrium.* +import java.math.BigInteger +import java.time.LocalDate + +class Args3ComponentsTest { + + @Test + fun component1() { + val args = Args.of( + "string", + 1, + 2L, + representation1 = "rep 1", + representation2 = "rep 2", + representation3 = "rep 3" + ) + val (a1) = args + expect(a1).toEqual(args.a1) + } + + @Test + fun component2() { + val args = Args.of( + "string", + 1, + 2L, + representation1 = "rep 1", + representation2 = "rep 2", + representation3 = "rep 3" + ) + val (_, a2) = args + expect(a2).toEqual(args.a2) + } + + @Test + fun component3() { + val args = Args.of( + "string", + 1, + 2L, + representation1 = "rep 1", + representation2 = "rep 2", + representation3 = "rep 3" + ) + val (_, _, a3) = args + expect(a3).toEqual(args.a3) + } + +} \ No newline at end of file diff --git a/src/test/generated/kotlin/com/tegonal/minimalist/arguments/components/Args4ComponentsTest.kt b/src/test/generated/kotlin/com/tegonal/minimalist/arguments/components/Args4ComponentsTest.kt new file mode 100644 index 0000000..1525a64 --- /dev/null +++ b/src/test/generated/kotlin/com/tegonal/minimalist/arguments/components/Args4ComponentsTest.kt @@ -0,0 +1,83 @@ +// ----------------------------------------------------------------------- +// automatically generated, don't modify here but in build.gradle.kts +// ----------------------------------------------------------------------- +package com.tegonal.minimalist.arguments.components + +import ch.tutteli.atrium.api.verbs.expect +import ch.tutteli.atrium.api.fluent.en_GB.* +import org.junit.jupiter.api.Test +import org.junit.jupiter.api.Named +import org.junit.jupiter.params.ParameterizedTest +import org.junit.jupiter.params.provider.MethodSource +import com.tegonal.minimalist.* +import com.tegonal.minimalist.atrium.* +import java.math.BigInteger +import java.time.LocalDate + +class Args4ComponentsTest { + + @Test + fun component1() { + val args = Args.of( + "string", + 1, + 2L, + 3F, + representation1 = "rep 1", + representation2 = "rep 2", + representation3 = "rep 3", + representation4 = "rep 4" + ) + val (a1) = args + expect(a1).toEqual(args.a1) + } + + @Test + fun component2() { + val args = Args.of( + "string", + 1, + 2L, + 3F, + representation1 = "rep 1", + representation2 = "rep 2", + representation3 = "rep 3", + representation4 = "rep 4" + ) + val (_, a2) = args + expect(a2).toEqual(args.a2) + } + + @Test + fun component3() { + val args = Args.of( + "string", + 1, + 2L, + 3F, + representation1 = "rep 1", + representation2 = "rep 2", + representation3 = "rep 3", + representation4 = "rep 4" + ) + val (_, _, a3) = args + expect(a3).toEqual(args.a3) + } + + @Test + fun component4() { + val args = Args.of( + "string", + 1, + 2L, + 3F, + representation1 = "rep 1", + representation2 = "rep 2", + representation3 = "rep 3", + representation4 = "rep 4" + ) + val (_, _, _, a4) = args + expect(a4).toEqual(args.a4) + } + +} \ No newline at end of file diff --git a/src/test/generated/kotlin/com/tegonal/minimalist/arguments/components/Args5ComponentsTest.kt b/src/test/generated/kotlin/com/tegonal/minimalist/arguments/components/Args5ComponentsTest.kt new file mode 100644 index 0000000..1d2d4ea --- /dev/null +++ b/src/test/generated/kotlin/com/tegonal/minimalist/arguments/components/Args5ComponentsTest.kt @@ -0,0 +1,109 @@ +// ----------------------------------------------------------------------- +// automatically generated, don't modify here but in build.gradle.kts +// ----------------------------------------------------------------------- +package com.tegonal.minimalist.arguments.components + +import ch.tutteli.atrium.api.verbs.expect +import ch.tutteli.atrium.api.fluent.en_GB.* +import org.junit.jupiter.api.Test +import org.junit.jupiter.api.Named +import org.junit.jupiter.params.ParameterizedTest +import org.junit.jupiter.params.provider.MethodSource +import com.tegonal.minimalist.* +import com.tegonal.minimalist.atrium.* +import java.math.BigInteger +import java.time.LocalDate + +class Args5ComponentsTest { + + @Test + fun component1() { + val args = Args.of( + "string", + 1, + 2L, + 3F, + 4.0, + representation1 = "rep 1", + representation2 = "rep 2", + representation3 = "rep 3", + representation4 = "rep 4", + representation5 = "rep 5" + ) + val (a1) = args + expect(a1).toEqual(args.a1) + } + + @Test + fun component2() { + val args = Args.of( + "string", + 1, + 2L, + 3F, + 4.0, + representation1 = "rep 1", + representation2 = "rep 2", + representation3 = "rep 3", + representation4 = "rep 4", + representation5 = "rep 5" + ) + val (_, a2) = args + expect(a2).toEqual(args.a2) + } + + @Test + fun component3() { + val args = Args.of( + "string", + 1, + 2L, + 3F, + 4.0, + representation1 = "rep 1", + representation2 = "rep 2", + representation3 = "rep 3", + representation4 = "rep 4", + representation5 = "rep 5" + ) + val (_, _, a3) = args + expect(a3).toEqual(args.a3) + } + + @Test + fun component4() { + val args = Args.of( + "string", + 1, + 2L, + 3F, + 4.0, + representation1 = "rep 1", + representation2 = "rep 2", + representation3 = "rep 3", + representation4 = "rep 4", + representation5 = "rep 5" + ) + val (_, _, _, a4) = args + expect(a4).toEqual(args.a4) + } + + @Test + fun component5() { + val args = Args.of( + "string", + 1, + 2L, + 3F, + 4.0, + representation1 = "rep 1", + representation2 = "rep 2", + representation3 = "rep 3", + representation4 = "rep 4", + representation5 = "rep 5" + ) + val (_, _, _, _, a5) = args + expect(a5).toEqual(args.a5) + } + +} \ No newline at end of file diff --git a/src/test/generated/kotlin/com/tegonal/minimalist/arguments/components/Args6ComponentsTest.kt b/src/test/generated/kotlin/com/tegonal/minimalist/arguments/components/Args6ComponentsTest.kt new file mode 100644 index 0000000..acce479 --- /dev/null +++ b/src/test/generated/kotlin/com/tegonal/minimalist/arguments/components/Args6ComponentsTest.kt @@ -0,0 +1,139 @@ +// ----------------------------------------------------------------------- +// automatically generated, don't modify here but in build.gradle.kts +// ----------------------------------------------------------------------- +package com.tegonal.minimalist.arguments.components + +import ch.tutteli.atrium.api.verbs.expect +import ch.tutteli.atrium.api.fluent.en_GB.* +import org.junit.jupiter.api.Test +import org.junit.jupiter.api.Named +import org.junit.jupiter.params.ParameterizedTest +import org.junit.jupiter.params.provider.MethodSource +import com.tegonal.minimalist.* +import com.tegonal.minimalist.atrium.* +import java.math.BigInteger +import java.time.LocalDate + +class Args6ComponentsTest { + + @Test + fun component1() { + val args = Args.of( + "string", + 1, + 2L, + 3F, + 4.0, + 'c', + representation1 = "rep 1", + representation2 = "rep 2", + representation3 = "rep 3", + representation4 = "rep 4", + representation5 = "rep 5", + representation6 = "rep 6" + ) + val (a1) = args + expect(a1).toEqual(args.a1) + } + + @Test + fun component2() { + val args = Args.of( + "string", + 1, + 2L, + 3F, + 4.0, + 'c', + representation1 = "rep 1", + representation2 = "rep 2", + representation3 = "rep 3", + representation4 = "rep 4", + representation5 = "rep 5", + representation6 = "rep 6" + ) + val (_, a2) = args + expect(a2).toEqual(args.a2) + } + + @Test + fun component3() { + val args = Args.of( + "string", + 1, + 2L, + 3F, + 4.0, + 'c', + representation1 = "rep 1", + representation2 = "rep 2", + representation3 = "rep 3", + representation4 = "rep 4", + representation5 = "rep 5", + representation6 = "rep 6" + ) + val (_, _, a3) = args + expect(a3).toEqual(args.a3) + } + + @Test + fun component4() { + val args = Args.of( + "string", + 1, + 2L, + 3F, + 4.0, + 'c', + representation1 = "rep 1", + representation2 = "rep 2", + representation3 = "rep 3", + representation4 = "rep 4", + representation5 = "rep 5", + representation6 = "rep 6" + ) + val (_, _, _, a4) = args + expect(a4).toEqual(args.a4) + } + + @Test + fun component5() { + val args = Args.of( + "string", + 1, + 2L, + 3F, + 4.0, + 'c', + representation1 = "rep 1", + representation2 = "rep 2", + representation3 = "rep 3", + representation4 = "rep 4", + representation5 = "rep 5", + representation6 = "rep 6" + ) + val (_, _, _, _, a5) = args + expect(a5).toEqual(args.a5) + } + + @Test + fun component6() { + val args = Args.of( + "string", + 1, + 2L, + 3F, + 4.0, + 'c', + representation1 = "rep 1", + representation2 = "rep 2", + representation3 = "rep 3", + representation4 = "rep 4", + representation5 = "rep 5", + representation6 = "rep 6" + ) + val (_, _, _, _, _, a6) = args + expect(a6).toEqual(args.a6) + } + +} \ No newline at end of file diff --git a/src/test/generated/kotlin/com/tegonal/minimalist/arguments/components/Args7ComponentsTest.kt b/src/test/generated/kotlin/com/tegonal/minimalist/arguments/components/Args7ComponentsTest.kt new file mode 100644 index 0000000..098e98c --- /dev/null +++ b/src/test/generated/kotlin/com/tegonal/minimalist/arguments/components/Args7ComponentsTest.kt @@ -0,0 +1,173 @@ +// ----------------------------------------------------------------------- +// automatically generated, don't modify here but in build.gradle.kts +// ----------------------------------------------------------------------- +package com.tegonal.minimalist.arguments.components + +import ch.tutteli.atrium.api.verbs.expect +import ch.tutteli.atrium.api.fluent.en_GB.* +import org.junit.jupiter.api.Test +import org.junit.jupiter.api.Named +import org.junit.jupiter.params.ParameterizedTest +import org.junit.jupiter.params.provider.MethodSource +import com.tegonal.minimalist.* +import com.tegonal.minimalist.atrium.* +import java.math.BigInteger +import java.time.LocalDate + +class Args7ComponentsTest { + + @Test + fun component1() { + val args = Args.of( + "string", + 1, + 2L, + 3F, + 4.0, + 'c', + LocalDate.now(), + representation1 = "rep 1", + representation2 = "rep 2", + representation3 = "rep 3", + representation4 = "rep 4", + representation5 = "rep 5", + representation6 = "rep 6", + representation7 = "rep 7" + ) + val (a1) = args + expect(a1).toEqual(args.a1) + } + + @Test + fun component2() { + val args = Args.of( + "string", + 1, + 2L, + 3F, + 4.0, + 'c', + LocalDate.now(), + representation1 = "rep 1", + representation2 = "rep 2", + representation3 = "rep 3", + representation4 = "rep 4", + representation5 = "rep 5", + representation6 = "rep 6", + representation7 = "rep 7" + ) + val (_, a2) = args + expect(a2).toEqual(args.a2) + } + + @Test + fun component3() { + val args = Args.of( + "string", + 1, + 2L, + 3F, + 4.0, + 'c', + LocalDate.now(), + representation1 = "rep 1", + representation2 = "rep 2", + representation3 = "rep 3", + representation4 = "rep 4", + representation5 = "rep 5", + representation6 = "rep 6", + representation7 = "rep 7" + ) + val (_, _, a3) = args + expect(a3).toEqual(args.a3) + } + + @Test + fun component4() { + val args = Args.of( + "string", + 1, + 2L, + 3F, + 4.0, + 'c', + LocalDate.now(), + representation1 = "rep 1", + representation2 = "rep 2", + representation3 = "rep 3", + representation4 = "rep 4", + representation5 = "rep 5", + representation6 = "rep 6", + representation7 = "rep 7" + ) + val (_, _, _, a4) = args + expect(a4).toEqual(args.a4) + } + + @Test + fun component5() { + val args = Args.of( + "string", + 1, + 2L, + 3F, + 4.0, + 'c', + LocalDate.now(), + representation1 = "rep 1", + representation2 = "rep 2", + representation3 = "rep 3", + representation4 = "rep 4", + representation5 = "rep 5", + representation6 = "rep 6", + representation7 = "rep 7" + ) + val (_, _, _, _, a5) = args + expect(a5).toEqual(args.a5) + } + + @Test + fun component6() { + val args = Args.of( + "string", + 1, + 2L, + 3F, + 4.0, + 'c', + LocalDate.now(), + representation1 = "rep 1", + representation2 = "rep 2", + representation3 = "rep 3", + representation4 = "rep 4", + representation5 = "rep 5", + representation6 = "rep 6", + representation7 = "rep 7" + ) + val (_, _, _, _, _, a6) = args + expect(a6).toEqual(args.a6) + } + + @Test + fun component7() { + val args = Args.of( + "string", + 1, + 2L, + 3F, + 4.0, + 'c', + LocalDate.now(), + representation1 = "rep 1", + representation2 = "rep 2", + representation3 = "rep 3", + representation4 = "rep 4", + representation5 = "rep 5", + representation6 = "rep 6", + representation7 = "rep 7" + ) + val (_, _, _, _, _, _, a7) = args + expect(a7).toEqual(args.a7) + } + +} \ No newline at end of file diff --git a/src/test/generated/kotlin/com/tegonal/minimalist/arguments/components/Args8ComponentsTest.kt b/src/test/generated/kotlin/com/tegonal/minimalist/arguments/components/Args8ComponentsTest.kt new file mode 100644 index 0000000..9d3fded --- /dev/null +++ b/src/test/generated/kotlin/com/tegonal/minimalist/arguments/components/Args8ComponentsTest.kt @@ -0,0 +1,211 @@ +// ----------------------------------------------------------------------- +// automatically generated, don't modify here but in build.gradle.kts +// ----------------------------------------------------------------------- +package com.tegonal.minimalist.arguments.components + +import ch.tutteli.atrium.api.verbs.expect +import ch.tutteli.atrium.api.fluent.en_GB.* +import org.junit.jupiter.api.Test +import org.junit.jupiter.api.Named +import org.junit.jupiter.params.ParameterizedTest +import org.junit.jupiter.params.provider.MethodSource +import com.tegonal.minimalist.* +import com.tegonal.minimalist.atrium.* +import java.math.BigInteger +import java.time.LocalDate + +class Args8ComponentsTest { + + @Test + fun component1() { + val args = Args.of( + "string", + 1, + 2L, + 3F, + 4.0, + 'c', + LocalDate.now(), + 1.toShort(), + representation1 = "rep 1", + representation2 = "rep 2", + representation3 = "rep 3", + representation4 = "rep 4", + representation5 = "rep 5", + representation6 = "rep 6", + representation7 = "rep 7", + representation8 = "rep 8" + ) + val (a1) = args + expect(a1).toEqual(args.a1) + } + + @Test + fun component2() { + val args = Args.of( + "string", + 1, + 2L, + 3F, + 4.0, + 'c', + LocalDate.now(), + 1.toShort(), + representation1 = "rep 1", + representation2 = "rep 2", + representation3 = "rep 3", + representation4 = "rep 4", + representation5 = "rep 5", + representation6 = "rep 6", + representation7 = "rep 7", + representation8 = "rep 8" + ) + val (_, a2) = args + expect(a2).toEqual(args.a2) + } + + @Test + fun component3() { + val args = Args.of( + "string", + 1, + 2L, + 3F, + 4.0, + 'c', + LocalDate.now(), + 1.toShort(), + representation1 = "rep 1", + representation2 = "rep 2", + representation3 = "rep 3", + representation4 = "rep 4", + representation5 = "rep 5", + representation6 = "rep 6", + representation7 = "rep 7", + representation8 = "rep 8" + ) + val (_, _, a3) = args + expect(a3).toEqual(args.a3) + } + + @Test + fun component4() { + val args = Args.of( + "string", + 1, + 2L, + 3F, + 4.0, + 'c', + LocalDate.now(), + 1.toShort(), + representation1 = "rep 1", + representation2 = "rep 2", + representation3 = "rep 3", + representation4 = "rep 4", + representation5 = "rep 5", + representation6 = "rep 6", + representation7 = "rep 7", + representation8 = "rep 8" + ) + val (_, _, _, a4) = args + expect(a4).toEqual(args.a4) + } + + @Test + fun component5() { + val args = Args.of( + "string", + 1, + 2L, + 3F, + 4.0, + 'c', + LocalDate.now(), + 1.toShort(), + representation1 = "rep 1", + representation2 = "rep 2", + representation3 = "rep 3", + representation4 = "rep 4", + representation5 = "rep 5", + representation6 = "rep 6", + representation7 = "rep 7", + representation8 = "rep 8" + ) + val (_, _, _, _, a5) = args + expect(a5).toEqual(args.a5) + } + + @Test + fun component6() { + val args = Args.of( + "string", + 1, + 2L, + 3F, + 4.0, + 'c', + LocalDate.now(), + 1.toShort(), + representation1 = "rep 1", + representation2 = "rep 2", + representation3 = "rep 3", + representation4 = "rep 4", + representation5 = "rep 5", + representation6 = "rep 6", + representation7 = "rep 7", + representation8 = "rep 8" + ) + val (_, _, _, _, _, a6) = args + expect(a6).toEqual(args.a6) + } + + @Test + fun component7() { + val args = Args.of( + "string", + 1, + 2L, + 3F, + 4.0, + 'c', + LocalDate.now(), + 1.toShort(), + representation1 = "rep 1", + representation2 = "rep 2", + representation3 = "rep 3", + representation4 = "rep 4", + representation5 = "rep 5", + representation6 = "rep 6", + representation7 = "rep 7", + representation8 = "rep 8" + ) + val (_, _, _, _, _, _, a7) = args + expect(a7).toEqual(args.a7) + } + + @Test + fun component8() { + val args = Args.of( + "string", + 1, + 2L, + 3F, + 4.0, + 'c', + LocalDate.now(), + 1.toShort(), + representation1 = "rep 1", + representation2 = "rep 2", + representation3 = "rep 3", + representation4 = "rep 4", + representation5 = "rep 5", + representation6 = "rep 6", + representation7 = "rep 7", + representation8 = "rep 8" + ) + val (_, _, _, _, _, _, _, a8) = args + expect(a8).toEqual(args.a8) + } + +} \ No newline at end of file diff --git a/src/test/generated/kotlin/com/tegonal/minimalist/arguments/components/Args9ComponentsTest.kt b/src/test/generated/kotlin/com/tegonal/minimalist/arguments/components/Args9ComponentsTest.kt new file mode 100644 index 0000000..a4e782f --- /dev/null +++ b/src/test/generated/kotlin/com/tegonal/minimalist/arguments/components/Args9ComponentsTest.kt @@ -0,0 +1,253 @@ +// ----------------------------------------------------------------------- +// automatically generated, don't modify here but in build.gradle.kts +// ----------------------------------------------------------------------- +package com.tegonal.minimalist.arguments.components + +import ch.tutteli.atrium.api.verbs.expect +import ch.tutteli.atrium.api.fluent.en_GB.* +import org.junit.jupiter.api.Test +import org.junit.jupiter.api.Named +import org.junit.jupiter.params.ParameterizedTest +import org.junit.jupiter.params.provider.MethodSource +import com.tegonal.minimalist.* +import com.tegonal.minimalist.atrium.* +import java.math.BigInteger +import java.time.LocalDate + +class Args9ComponentsTest { + + @Test + fun component1() { + val args = Args.of( + "string", + 1, + 2L, + 3F, + 4.0, + 'c', + LocalDate.now(), + 1.toShort(), + 2.toByte(), + representation1 = "rep 1", + representation2 = "rep 2", + representation3 = "rep 3", + representation4 = "rep 4", + representation5 = "rep 5", + representation6 = "rep 6", + representation7 = "rep 7", + representation8 = "rep 8", + representation9 = "rep 9" + ) + val (a1) = args + expect(a1).toEqual(args.a1) + } + + @Test + fun component2() { + val args = Args.of( + "string", + 1, + 2L, + 3F, + 4.0, + 'c', + LocalDate.now(), + 1.toShort(), + 2.toByte(), + representation1 = "rep 1", + representation2 = "rep 2", + representation3 = "rep 3", + representation4 = "rep 4", + representation5 = "rep 5", + representation6 = "rep 6", + representation7 = "rep 7", + representation8 = "rep 8", + representation9 = "rep 9" + ) + val (_, a2) = args + expect(a2).toEqual(args.a2) + } + + @Test + fun component3() { + val args = Args.of( + "string", + 1, + 2L, + 3F, + 4.0, + 'c', + LocalDate.now(), + 1.toShort(), + 2.toByte(), + representation1 = "rep 1", + representation2 = "rep 2", + representation3 = "rep 3", + representation4 = "rep 4", + representation5 = "rep 5", + representation6 = "rep 6", + representation7 = "rep 7", + representation8 = "rep 8", + representation9 = "rep 9" + ) + val (_, _, a3) = args + expect(a3).toEqual(args.a3) + } + + @Test + fun component4() { + val args = Args.of( + "string", + 1, + 2L, + 3F, + 4.0, + 'c', + LocalDate.now(), + 1.toShort(), + 2.toByte(), + representation1 = "rep 1", + representation2 = "rep 2", + representation3 = "rep 3", + representation4 = "rep 4", + representation5 = "rep 5", + representation6 = "rep 6", + representation7 = "rep 7", + representation8 = "rep 8", + representation9 = "rep 9" + ) + val (_, _, _, a4) = args + expect(a4).toEqual(args.a4) + } + + @Test + fun component5() { + val args = Args.of( + "string", + 1, + 2L, + 3F, + 4.0, + 'c', + LocalDate.now(), + 1.toShort(), + 2.toByte(), + representation1 = "rep 1", + representation2 = "rep 2", + representation3 = "rep 3", + representation4 = "rep 4", + representation5 = "rep 5", + representation6 = "rep 6", + representation7 = "rep 7", + representation8 = "rep 8", + representation9 = "rep 9" + ) + val (_, _, _, _, a5) = args + expect(a5).toEqual(args.a5) + } + + @Test + fun component6() { + val args = Args.of( + "string", + 1, + 2L, + 3F, + 4.0, + 'c', + LocalDate.now(), + 1.toShort(), + 2.toByte(), + representation1 = "rep 1", + representation2 = "rep 2", + representation3 = "rep 3", + representation4 = "rep 4", + representation5 = "rep 5", + representation6 = "rep 6", + representation7 = "rep 7", + representation8 = "rep 8", + representation9 = "rep 9" + ) + val (_, _, _, _, _, a6) = args + expect(a6).toEqual(args.a6) + } + + @Test + fun component7() { + val args = Args.of( + "string", + 1, + 2L, + 3F, + 4.0, + 'c', + LocalDate.now(), + 1.toShort(), + 2.toByte(), + representation1 = "rep 1", + representation2 = "rep 2", + representation3 = "rep 3", + representation4 = "rep 4", + representation5 = "rep 5", + representation6 = "rep 6", + representation7 = "rep 7", + representation8 = "rep 8", + representation9 = "rep 9" + ) + val (_, _, _, _, _, _, a7) = args + expect(a7).toEqual(args.a7) + } + + @Test + fun component8() { + val args = Args.of( + "string", + 1, + 2L, + 3F, + 4.0, + 'c', + LocalDate.now(), + 1.toShort(), + 2.toByte(), + representation1 = "rep 1", + representation2 = "rep 2", + representation3 = "rep 3", + representation4 = "rep 4", + representation5 = "rep 5", + representation6 = "rep 6", + representation7 = "rep 7", + representation8 = "rep 8", + representation9 = "rep 9" + ) + val (_, _, _, _, _, _, _, a8) = args + expect(a8).toEqual(args.a8) + } + + @Test + fun component9() { + val args = Args.of( + "string", + 1, + 2L, + 3F, + 4.0, + 'c', + LocalDate.now(), + 1.toShort(), + 2.toByte(), + representation1 = "rep 1", + representation2 = "rep 2", + representation3 = "rep 3", + representation4 = "rep 4", + representation5 = "rep 5", + representation6 = "rep 6", + representation7 = "rep 7", + representation8 = "rep 8", + representation9 = "rep 9" + ) + val (_, _, _, _, _, _, _, _, a9) = args + expect(a9).toEqual(args.a9) + } + +} \ No newline at end of file