From 65227add3c31604a64cf4ef86671eadc78be3bde Mon Sep 17 00:00:00 2001 From: Robert Stoll Date: Thu, 29 Dec 2022 20:16:45 +0100 Subject: [PATCH] resolve TODOs for 0.19.0 expect for publishing --- .../api/infix/en_GB/FeatureWorstCaseTest.kt | 1 - .../defaultImpls.kt | 2 +- .../atrium/creating/AssertionContainer.kt | 8 +-- .../tutteli/atrium/creating/ErrorMessages.kt | 17 ------ .../atrium/creating/impl/BaseExpectImpl.kt | 4 +- .../atrium/creating/impl/FeatureExpectImpl.kt | 2 +- build.gradle | 42 ++++++-------- gradle/scripts/check-dexer.gradle | 4 +- gradle/scripts/gh-pages.gradle | 4 +- .../ch/tutteli/atrium/logic/ListAssertions.kt | 2 +- .../creators/impl/ContainsAssertionCreator.kt | 11 ---- .../CharSequenceContainsAssertionCreator.kt | 3 +- .../AssertionsOptionExplantoryExtensions.kt | 4 +- .../iterable/contains/IterableLikeContains.kt | 4 +- .../contains/checkers/AtLeastChecker.kt | 2 +- .../checkers/impl/DefaultAtLeastChecker.kt | 2 +- .../checkers/impl/DefaultNotChecker.kt | 2 +- .../impl/InAnyOrderEntriesAssertionCreator.kt | 6 -- .../impl/InAnyOrderOnlyAssertionCreator.kt | 6 +- .../impl/InAnyOrderValuesAssertionCreator.kt | 2 - .../impl/InOrderOnlyBaseAssertionCreator.kt | 4 +- .../creators/impl/InOrderOnlyMatcher.kt | 2 +- .../reporting/InOrderOnlyReportingOptions.kt | 29 +--------- .../impl/InOrderOnlyReportingOptionsImpl.kt | 8 +-- .../maplike/contains/MapLikeContains.kt | 9 --- .../contains/checkers/AtLeastChecker.kt | 15 ----- .../contains/checkers/AtMostChecker.kt | 14 ----- .../contains/checkers/ExactlyChecker.kt | 14 ----- .../maplike/contains/checkers/NotChecker.kt | 14 ----- .../checkers/impl/DefaultAtLeastChecker.kt | 28 ---------- .../checkers/impl/DefaultAtMostChecker.kt | 29 ---------- .../checkers/impl/DefaultExactlyChecker.kt | 29 ---------- .../checkers/impl/DefaultNotChecker.kt | 19 ------- .../impl/DefaultFeatureExtractor.kt | 2 +- .../atrium/logic/impl/DefaultAnyAssertions.kt | 2 +- .../impl/DefaultFloatingPointAssertions.kt | 2 +- .../logic/impl/DefaultThrowableAssertions.kt | 2 +- .../atrium/logic/impl/containsHelpers.kt | 2 +- .../kotlin/ch/tutteli/atrium/logic/utils.kt | 10 ++-- .../ch/tutteli/atrium/logic/utilsCollect.kt | 6 +- .../ch/tutteli/atrium/logic/list.kt | 2 +- .../logic/creating/filesystem/hints/hints.kt | 2 +- .../atrium-logic/src/module/module-info.java | 1 - .../integration/ResultExpectationsSpec.kt | 2 +- misc/tools/bc-tests/build.gradle.kts | 56 +++++++++---------- settings.gradle.kts | 2 - .../atrium/translations/ErrorMessages.kt | 23 +------- .../deprecatedDescriptionIterableAssertion.kt | 15 ----- .../deprecatedDescriptionListAssertion.kt | 2 - .../deprecatedDescriptionMapAssertion.kt | 3 - .../atrium/translations/ErrorMessages.kt | 20 +------ .../deprecatedDescriptionIterableAssertion.kt | 18 ------ .../deprecatedDescriptionListAssertion.kt | 3 - .../deprecatedDescriptionMapAssertion.kt | 3 - 54 files changed, 92 insertions(+), 428 deletions(-) delete mode 100644 logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/creating/maplike/contains/checkers/AtLeastChecker.kt delete mode 100644 logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/creating/maplike/contains/checkers/AtMostChecker.kt delete mode 100644 logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/creating/maplike/contains/checkers/ExactlyChecker.kt delete mode 100644 logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/creating/maplike/contains/checkers/NotChecker.kt delete mode 100644 logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/creating/maplike/contains/checkers/impl/DefaultAtLeastChecker.kt delete mode 100644 logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/creating/maplike/contains/checkers/impl/DefaultAtMostChecker.kt delete mode 100644 logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/creating/maplike/contains/checkers/impl/DefaultExactlyChecker.kt delete mode 100644 logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/creating/maplike/contains/checkers/impl/DefaultNotChecker.kt diff --git a/apis/infix-en_GB/atrium-api-infix-en_GB/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/FeatureWorstCaseTest.kt b/apis/infix-en_GB/atrium-api-infix-en_GB/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/FeatureWorstCaseTest.kt index 480dbdf2b1..7d69a4bd0b 100644 --- a/apis/infix-en_GB/atrium-api-infix-en_GB/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/FeatureWorstCaseTest.kt +++ b/apis/infix-en_GB/atrium-api-infix-en_GB/src/commonTest/kotlin/ch/tutteli/atrium/api/infix/en_GB/FeatureWorstCaseTest.kt @@ -3,7 +3,6 @@ package ch.tutteli.atrium.api.infix.en_GB import ch.tutteli.atrium.api.verbs.internal.expect -//TODO 0.19.0 complains we are not in common module but we are. Check if error disappears once we use the default src folder import kotlin.js.JsName class WorstCase { diff --git a/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/assertions/builders/impl/descriptiveWithFailureHint/defaultImpls.kt b/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/assertions/builders/impl/descriptiveWithFailureHint/defaultImpls.kt index 6ad98f65f6..bda274c6b2 100644 --- a/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/assertions/builders/impl/descriptiveWithFailureHint/defaultImpls.kt +++ b/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/assertions/builders/impl/descriptiveWithFailureHint/defaultImpls.kt @@ -1,4 +1,4 @@ -//TODO 0.19.0 rename package to proofWithHelpOnFailure when we rename DescriptiveAssertionWithFailureHint to ProofWithHelpOnFailure +//TODO 0.20.0 rename package to proofWithHelpOnFailure when we rename DescriptiveAssertionWithFailureHint to ProofWithHelpOnFailure package ch.tutteli.atrium.assertions.builders.impl.descriptiveWithFailureHint import ch.tutteli.atrium.assertions.Assertion diff --git a/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/creating/AssertionContainer.kt b/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/creating/AssertionContainer.kt index 93c38bc2dc..b1a7ff84d8 100644 --- a/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/creating/AssertionContainer.kt +++ b/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/creating/AssertionContainer.kt @@ -19,7 +19,7 @@ import kotlin.reflect.KClass * * @param T The type of the subject of `this` expectation. */ -//TODO 0.19.0 introduce ProofContainer +//TODO 0.20.0 introduce ProofContainer interface AssertionContainer { /** * Either [Some] wrapping the subject of an [Assertion] or [None] in case a previous subject transformation @@ -32,8 +32,8 @@ interface AssertionContainer { * * Might be we completely remove it without prior notice. */ - //TODO 0.19.0/0.20.0 maybe it would be better to have proofFactories as val like we have components? - //TODO 0.19.0 I guess it would make sense to get rid of getImpl and only use the ComponentFactoryContainer approach + //TODO 0.20.0/0.21.0 maybe it would be better to have proofFactories as val like we have components? + //TODO 0.20.0 I guess it would make sense to get rid of getImpl and only use the ComponentFactoryContainer approach // however, check if extensibility for a library author is still given. We don't want that a consumer of a third-party // expectation function collection-library needs to use an own expectation verb @ExperimentalNewExpectTypes @@ -99,7 +99,7 @@ interface AssertionContainer { * * @return an [Expect] for the subject of `this` expectation. */ - //TODO remove SUPPRESS with 0.19.0 once the toExpect function is in core + //TODO remove SUPPRESS with 0.20.0 once the toExpect function is in core @Suppress("UNCHECKED_CAST") fun createAndAppend(description: Translatable, expected: Any?, test: (T) -> Boolean): Expect = append( diff --git a/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/creating/ErrorMessages.kt b/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/creating/ErrorMessages.kt index a6a51ad07a..eb551bbc46 100644 --- a/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/creating/ErrorMessages.kt +++ b/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/creating/ErrorMessages.kt @@ -6,30 +6,13 @@ import ch.tutteli.atrium.reporting.translating.StringBasedTranslatable * Contains translations which are used in error like messages. */ enum class ErrorMessages(override val value: String) : StringBasedTranslatable { - @Deprecated( - "USE AT_LEAST_ONE_EXPECTATION_DEFINED, will be removed with 0.19.0", - ReplaceWith("AT_LEAST_ONE_EXPECTATION_DEFINED") - ) - AT_LEAST_ONE_ASSERTION_DEFINED("at least one assertion defined"), /** @since 0.18.0 */ AT_LEAST_ONE_EXPECTATION_DEFINED("at least one expectation defined"), - @Deprecated( - "USE FORGOT_DO_DEFINE_EXPECTATION, will be removed with 0.19.0", - ReplaceWith("FORGOT_DO_DEFINE_EXPECTATION") - ) - FORGOT_DO_DEFINE_ASSERTION("You forgot to define assertions in the assertionCreator-lambda"), - /** @since 0.18.0 */ FORGOT_DO_DEFINE_EXPECTATION("You forgot to define expectations in the expectationCreator-lambda"), - @Deprecated( - "USE HINT_AT_LEAST_ONE_EXPECTATION_DEFINED, will be removed with 0.19.0", - ReplaceWith("HINT_AT_LEAST_ONE_EXPECTATION_DEFINED") - ) - HINT_AT_LEAST_ONE_ASSERTION_DEFINED("Sometimes you can use an alternative to `{ }` For instance, instead of `toThrow<..> { }` you should use `toThrow<..>()`"), - /** @since 0.18.0 */ HINT_AT_LEAST_ONE_EXPECTATION_DEFINED("Sometimes you can use an alternative to `{ }` For instance, instead of `toThrow<..> { }` you should use `toThrow<..>()`"), } diff --git a/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/creating/impl/BaseExpectImpl.kt b/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/creating/impl/BaseExpectImpl.kt index 56660e6370..090c963fc9 100644 --- a/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/creating/impl/BaseExpectImpl.kt +++ b/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/creating/impl/BaseExpectImpl.kt @@ -18,7 +18,7 @@ abstract class BaseExpectImpl( ) : ExpectInternal { - // TODO 0.19.0 not every expect should have an own implFactories but only the root, + // TODO 0.20.0 not every expect should have an own implFactories but only the root, // maybe also FeatureExpect but surely not DelegatingExpect or CollectingExpect private val implFactories: MutableMap, (() -> Nothing) -> () -> Any> = mutableMapOf() @@ -36,7 +36,7 @@ abstract class BaseExpectImpl( implFactories[kClass] = implFactory } - //TODO 0.19.0 move to RootExpectOptions? + //TODO 0.20.0 move to RootExpectOptions? inline fun withImplFactory(noinline implFactory: (oldFactory: () -> I) -> () -> I) { registerImpl(I::class, implFactory) } diff --git a/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/creating/impl/FeatureExpectImpl.kt b/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/creating/impl/FeatureExpectImpl.kt index b8f9e05136..0203feec51 100644 --- a/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/creating/impl/FeatureExpectImpl.kt +++ b/atrium-core/src/commonMain/kotlin/ch/tutteli/atrium/creating/impl/FeatureExpectImpl.kt @@ -53,7 +53,7 @@ internal class FeatureExpectImpl( } override val components: ComponentFactoryContainer - // TODO 0.19.0 the function to turn an Expect into a ProofContainer should be located in core + // TODO 0.20.0 the function to turn an Expect into a ProofContainer should be located in core get() = (previousExpect as AssertionContainer<*>).components override fun append(assertion: Assertion): Expect { diff --git a/build.gradle b/build.gradle index df6c427eba..ce12d167d1 100644 --- a/build.gradle +++ b/build.gradle @@ -1,3 +1,7 @@ +import org.jetbrains.kotlin.gradle.dsl.KotlinCompile +import java.nio.file.Files +import java.nio.file.Paths +import java.util.stream.Collectors buildscript { rootProject.version = '0.19.0-SNAPSHOT' @@ -18,8 +22,7 @@ buildscript { junitPlatformVersion = '1.9.1' jupiterVersion = '5.9.1' spekVersion = '2.0.12' - //TODO 0.19.0 check if we can already update to kotestVersion = '4.6.4' - kotestVersion = '4.3.2' + kotestVersion = '4.6.4' spekExtensionsVersion = '1.2.1' spekExtensions = { "ch.tutteli.spek:tutteli-spek-extensions:$spekExtensionsVersion" } mockkVersion = '1.10.0' @@ -35,8 +38,7 @@ buildscript { // release gradle_nexus_publish_plugin_version = '1.1.0' - //TODO 0.19.0 add all modules and remove this afterwards - newMultiplatformProjectNames = [ + multiplatformProjectNames = [ "core", "logic", "logic-kotlin_1_3", "translations-en_GB", "translations-de_CH", @@ -153,8 +155,8 @@ subprojects { -def newMultiplatformProjects = newMultiplatformProjectNames.collect { prefixedProject(it) } -configure(newMultiplatformProjects) { subproject -> +def multiplatformProjects = multiplatformProjectNames.collect { prefixedProject(it) } +configure(multiplatformProjects) { subproject -> apply plugin: "kotlin-multiplatform" kotlin { @@ -247,14 +249,14 @@ configure(newMultiplatformProjects) { subproject -> } } - //TODO 0.19.0 update tutteli-gradle-plugins and remove as this is handled there + //TODO 0.20.0 update tutteli-gradle-plugins and remove as this is handled there // calling the Kotlin extension function in buildSrc ConfigureTestTasksKt.configureTestTasks(subproject) sourceCompatibility = 11 targetCompatibility = 11 - //TODO 0.19.0 update tutteli-gradle-plugins and remove as this is handled there and allows to use the normal java/ directory instead of module/ + //TODO 0.20.0 update tutteli-gradle-plugins and remove as this is handled there and allows to use the normal java/ directory instead of module/ def moduleInfoReplaceMe = { if (subproject.components.findByName('java') == null) throw new IllegalStateException("""\ Could not find the java component. @@ -300,12 +302,10 @@ tasks.withType(KotlinCompile).configureEach { } } -//TODO 0.19.0 cleanup this file once we have transitioned all modules to the new MPP plugin - configure(subprojects.findAll { def parentName = it.projectDir.parentFile.name it.name != "bc-tests" && parentName != "old" && parentName != "bc-tests" -} - newMultiplatformProjects) { subproject -> +} - multiplatformProjects) { subproject -> apply plugin: 'kotlin' dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlinVersion" @@ -345,8 +345,8 @@ configure(subprojects.findAll { //} -//TODO 0.19.0 configure dokka plugins again also for newMultiplatformProjects -configure(subprojects - toolProjects - newMultiplatformProjects) { Project subproject -> +//TODO 0.19.0 configure dokka plugins again also for multiplatformProjects +configure(subprojects - toolProjects - multiplatformProjects) { Project subproject -> apply plugin: 'ch.tutteli.dokka' apply plugin: 'ch.tutteli.kotlin.module.info' @@ -391,8 +391,8 @@ configure(apiProjects) { apiProject -> def bundleSmokeTests = subprojects.findAll { it.name.contains('-smoke-test') } -//TODO 0.19.0 newMultiPlatformProject have to be published differently, update to tutteli-gradle-plugins -configure(subprojects - bundleSmokeTests - toolProjects - newMultiplatformProjects) { subproject -> +//TODO 0.19.0 multiplatformProjects have to be published differently, update to tutteli-gradle-plugins +configure(subprojects - bundleSmokeTests - toolProjects - multiplatformProjects) { subproject -> apply plugin: 'ch.tutteli.publish' tutteliPublish { @@ -401,7 +401,7 @@ configure(subprojects - bundleSmokeTests - toolProjects - newMultiplatformProjec } //TODO 0.19.0 spek is used in another way, see above, but we have not yet applied the jacoco plugin -configure(jacocoMulti.jacocoProjects + getAndroidProjects() - newMultiplatformProjects) { +configure(jacocoMulti.jacocoProjects - multiplatformProjects) { apply plugin: 'ch.tutteli.spek' spek.version = spekVersion @@ -438,8 +438,8 @@ configure(jacocoMulti.jacocoProjects + getAndroidProjects() - newMultiplatformPr } -// this is already configured for newMultiplatformProjects further above, thus the substraction -configure(subprojects - toolProjects - newMultiplatformProjects) { +// this is already configured for multiplatformProjects further above, thus the substraction +configure(subprojects - toolProjects - multiplatformProjects) { sourceSets.configureEach { languageSettings { useExperimentalAnnotation('kotlin.Experimental') @@ -481,12 +481,6 @@ configure(bundleSmokeTests) { } } - -import org.jetbrains.kotlin.gradle.dsl.KotlinCompile -import java.nio.file.Files -import java.nio.file.Paths -import java.util.stream.Collectors - def getSubprojectTasks(String name) { return subprojects.collect { it.tasks.findByName(name) }.findAll { it != null } } diff --git a/gradle/scripts/check-dexer.gradle b/gradle/scripts/check-dexer.gradle index 56684fb60f..4b844332bd 100644 --- a/gradle/scripts/check-dexer.gradle +++ b/gradle/scripts/check-dexer.gradle @@ -7,8 +7,8 @@ def preCheck_ATRIUM_ANDROID_JAR = task('preCheck_ATRIUM_ANDROID_JAR') { } } -def newMultiplatformProjects = newMultiplatformProjectNames.collect { prefixedProject(it) } -def dexerProjects = newMultiplatformProjects.findAll { +def multiplatformProjects = multiplatformProjectNames.collect { prefixedProject(it) } +def dexerProjects = multiplatformProjects.findAll { !it.name.contains("-specs") } configure(dexerProjects) { subproject -> diff --git a/gradle/scripts/gh-pages.gradle b/gradle/scripts/gh-pages.gradle index 0245c00afe..0341ae85a3 100644 --- a/gradle/scripts/gh-pages.gradle +++ b/gradle/scripts/gh-pages.gradle @@ -25,8 +25,8 @@ task removeGhPages { } //TODO 0.19.0 configure dokka differently -def newMultiplatformProjects = newMultiplatformProjectNames.collect { prefixedProject(it) } -def projectsToConsider = docProjects - newMultiplatformProjects +def multiplatformProjects = multiplatformProjectNames.collect { prefixedProject(it) } +def projectsToConsider = docProjects - multiplatformProjects task ghPages { projectsToConsider.forEach { subProject -> diff --git a/logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/ListAssertions.kt b/logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/ListAssertions.kt index 29abda7ce8..780029681b 100644 --- a/logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/ListAssertions.kt +++ b/logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/ListAssertions.kt @@ -8,6 +8,6 @@ import ch.tutteli.atrium.logic.creating.transformers.FeatureExtractorBuilder * Collection of assertion functions and builders which are applicable to subjects with a [List] type. */ interface ListAssertions { - //TODO 0.19.0 change to ListLike in order that it works as well for arrays + //TODO 0.20.0 change to ListLike in order that it works as well for arrays fun > get(container: AssertionContainer, index: Int): FeatureExtractorBuilder.ExecutionStep } diff --git a/logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/creating/basic/contains/creators/impl/ContainsAssertionCreator.kt b/logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/creating/basic/contains/creators/impl/ContainsAssertionCreator.kt index fa008a3470..c5b76b3452 100644 --- a/logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/creating/basic/contains/creators/impl/ContainsAssertionCreator.kt +++ b/logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/creating/basic/contains/creators/impl/ContainsAssertionCreator.kt @@ -35,17 +35,6 @@ abstract class ContainsAssertionCreator(searchBehaviour, checkers), Creator { override val descriptionToContain: Translatable = DescriptionCharSequenceExpectation.TO_CONTAIN - @Suppress("OverridingDeprecatedMember") - override val descriptionContains: Translatable = descriptionToContain + override val descriptionNumberOfOccurrences: Translatable = DescriptionCharSequenceExpectation.NUMBER_OF_MATCHES override val descriptionNotFound: Translatable = DescriptionCharSequenceExpectation.NOT_FOUND override val descriptionNumberOfElementsFound: Translatable = diff --git a/logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/creating/collectors/AssertionsOptionExplantoryExtensions.kt b/logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/creating/collectors/AssertionsOptionExplantoryExtensions.kt index e67858703d..5c0336fd63 100644 --- a/logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/creating/collectors/AssertionsOptionExplantoryExtensions.kt +++ b/logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/creating/collectors/AssertionsOptionExplantoryExtensions.kt @@ -18,7 +18,7 @@ import ch.tutteli.atrium.logic.collectForCompositionBasedOnSubject /** * Collects the assertions [assertionCreator] creates and uses them as [AssertionGroup.assertions]. * - * //TODO 0.19.0 in case we somehow incorporate the current container in AssertionsOptions, then remove container as parameter + * //TODO 0.20.0 in case we somehow incorporate the current container in AssertionsOptions, then remove container as parameter * * TODO 1.0.0 at the latest: use type ExplanatoryGroup.FinalStep when ExplanatoryAssertionGroupFinalStep is removed */ @@ -29,7 +29,7 @@ fun , assertionCreator: Expect.() -> Unit ): ExplanatoryAssertionGroupFinalStep { - //TODO 0.19.0 simplify with new ProofContainer where we intend to return a flag for collectForCompositionBasedOnSubject which indicates whether + //TODO 0.20.0 simplify with new ProofContainer where we intend to return a flag for collectForCompositionBasedOnSubject which indicates whether // no proof was created or not, this way we don't have to collect twice. val collectingExpect = CollectingExpect(None, container.components) // not using addAssertionsCreatedBy on purpose so that we don't append a failing assertion diff --git a/logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/creating/iterable/contains/IterableLikeContains.kt b/logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/creating/iterable/contains/IterableLikeContains.kt index 108b7d0a4f..75b53af5d7 100644 --- a/logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/creating/iterable/contains/IterableLikeContains.kt +++ b/logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/creating/iterable/contains/IterableLikeContains.kt @@ -1,4 +1,4 @@ -//TODO 0.19.0 rename iterable.contains to iterablelike.contains +//TODO 0.20.0 rename iterable.contains to iterablelike.contains package ch.tutteli.atrium.logic.creating.iterable.contains import ch.tutteli.atrium.assertions.Assertion @@ -18,7 +18,7 @@ import ch.tutteli.atrium.reporting.translating.Translatable * defines which [Checker]s should be applied and * is finalized by one of the [IterableLikeContainsAssertions] which usually use a [Creator]. */ -//TODO 0.19.0 use IterableLikeToContains in combination with Proof +//TODO 0.20.0 use IterableLikeToContains in combination with Proof interface IterableLikeContains { /** diff --git a/logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/creating/iterable/contains/checkers/AtLeastChecker.kt b/logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/creating/iterable/contains/checkers/AtLeastChecker.kt index 8d7a0d7587..f8f1382242 100644 --- a/logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/creating/iterable/contains/checkers/AtLeastChecker.kt +++ b/logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/creating/iterable/contains/checkers/AtLeastChecker.kt @@ -1,4 +1,4 @@ -//TODO 0.19.0 rename package to iterableLike +//TODO 0.20.0 rename package to iterableLike package ch.tutteli.atrium.logic.creating.iterable.contains.checkers import ch.tutteli.atrium.logic.creating.iterable.contains.IterableLikeContains diff --git a/logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/creating/iterable/contains/checkers/impl/DefaultAtLeastChecker.kt b/logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/creating/iterable/contains/checkers/impl/DefaultAtLeastChecker.kt index fac9ae32a0..8dddcbbcc4 100644 --- a/logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/creating/iterable/contains/checkers/impl/DefaultAtLeastChecker.kt +++ b/logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/creating/iterable/contains/checkers/impl/DefaultAtLeastChecker.kt @@ -1,4 +1,4 @@ -//TODO 0.19.0 rename package to iterableLike +//TODO 0.20.0 rename package to iterableLike package ch.tutteli.atrium.logic.creating.iterable.contains.checkers.impl import ch.tutteli.atrium.assertions.Assertion diff --git a/logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/creating/iterable/contains/checkers/impl/DefaultNotChecker.kt b/logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/creating/iterable/contains/checkers/impl/DefaultNotChecker.kt index cc4e084b0f..51001c135d 100644 --- a/logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/creating/iterable/contains/checkers/impl/DefaultNotChecker.kt +++ b/logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/creating/iterable/contains/checkers/impl/DefaultNotChecker.kt @@ -1,4 +1,4 @@ -//TODO 0.19.0 rename package to iterablelike? +//TODO 0.20.0 rename package to iterablelike? package ch.tutteli.atrium.logic.creating.iterable.contains.checkers.impl import ch.tutteli.atrium.assertions.Assertion diff --git a/logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/creating/iterable/contains/creators/impl/InAnyOrderEntriesAssertionCreator.kt b/logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/creating/iterable/contains/creators/impl/InAnyOrderEntriesAssertionCreator.kt index cad75d19db..37d9d5ed44 100644 --- a/logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/creating/iterable/contains/creators/impl/InAnyOrderEntriesAssertionCreator.kt +++ b/logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/creating/iterable/contains/creators/impl/InAnyOrderEntriesAssertionCreator.kt @@ -51,12 +51,6 @@ class InAnyOrderEntriesAssertionCreator( override val descriptionToContain: Translatable = DescriptionIterableLikeExpectation.TO_CONTAIN - @Deprecated( - "Use descriptionToContain instead; will be removed with 0.19.0", - replaceWith = ReplaceWith("this.descriptionToContain ") - ) - @Suppress("OverridingDeprecatedMember") - override val descriptionContains: Translatable = descriptionToContain override val descriptionNotFound: Translatable = DescriptionIterableLikeExpectation.ELEMENT_NOT_FOUND override val descriptionNumberOfElementsFound: Translatable = DescriptionIterableLikeExpectation.NUMBER_OF_ELEMENTS_FOUND diff --git a/logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/creating/iterable/contains/creators/impl/InAnyOrderOnlyAssertionCreator.kt b/logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/creating/iterable/contains/creators/impl/InAnyOrderOnlyAssertionCreator.kt index 175288f74b..03a8ee6ebf 100644 --- a/logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/creating/iterable/contains/creators/impl/InAnyOrderOnlyAssertionCreator.kt +++ b/logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/creating/iterable/contains/creators/impl/InAnyOrderOnlyAssertionCreator.kt @@ -44,11 +44,11 @@ abstract class InAnyOrderOnlyAssertionCreator( searchCriteria: List ): AssertionGroup { return LazyThreadUnsafeAssertionGroup { - //TODO 0.19.0 explicit type should not be necessary + //TODO 0.20.0 explicit type should not be necessary, report val listFromWhichMatchesWillBeRemoved: MutableList = container.maybeSubject.fold({ mutableListOf() }) { converter(it).toMutableList() } val initialSize = listFromWhichMatchesWillBeRemoved.size val assertions = mutableListOf() - //TODO 0.19.0 could be moved out to a function, is also used in InOrderOnlyBaseAssertionCreator + //TODO 0.20.0 could be moved out to a function, is also used in InOrderOnlyBaseAssertionCreator val sizeAssertion = container.collectBasedOnSubject(Some(listFromWhichMatchesWillBeRemoved)) { _logic .size { it } @@ -66,7 +66,7 @@ abstract class InAnyOrderOnlyAssertionCreator( } val description = searchBehaviour.decorateDescription(TO_CONTAIN) - //TODO 0.19.0 could be moved out to a function, is also used in InOrderOnlyBaseAssertionCreator + //TODO 0.20.0 could be moved out to a function, is also used in InOrderOnlyBaseAssertionCreator val options = InAnyOrderOnlyReportingOptionsImpl().apply(reportingOptions) val assertionGroup = (if (searchCriteria.size <= options.maxNumberOfExpectedElementsForSummary) { assertionBuilder.summary.withDescription(description) diff --git a/logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/creating/iterable/contains/creators/impl/InAnyOrderValuesAssertionCreator.kt b/logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/creating/iterable/contains/creators/impl/InAnyOrderValuesAssertionCreator.kt index 6df88c7df8..3971095c15 100644 --- a/logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/creating/iterable/contains/creators/impl/InAnyOrderValuesAssertionCreator.kt +++ b/logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/creating/iterable/contains/creators/impl/InAnyOrderValuesAssertionCreator.kt @@ -40,8 +40,6 @@ class InAnyOrderValuesAssertionCreator( override val descriptionToContain: Translatable = DescriptionIterableLikeExpectation.TO_CONTAIN - @Suppress("OverridingDeprecatedMember") - override val descriptionContains: Translatable = descriptionToContain override val descriptionNumberOfOccurrences: Translatable = DescriptionIterableLikeExpectation.NUMBER_OF_SUCH_ELEMENTS override val groupDescription: Translatable = DescriptionIterableLikeExpectation.AN_ELEMENT_WHICH_EQUALS diff --git a/logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/creating/iterable/contains/creators/impl/InOrderOnlyBaseAssertionCreator.kt b/logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/creating/iterable/contains/creators/impl/InOrderOnlyBaseAssertionCreator.kt index e4aafa83f3..4f3841a683 100644 --- a/logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/creating/iterable/contains/creators/impl/InOrderOnlyBaseAssertionCreator.kt +++ b/logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/creating/iterable/contains/creators/impl/InOrderOnlyBaseAssertionCreator.kt @@ -31,9 +31,9 @@ abstract class InOrderOnlyBaseAssertionCreator( searchCriteria: List ): AssertionGroup { return LazyThreadUnsafeAssertionGroup { - // TODO 0.19.0 more efficient and pragmatic than turnSubjectToList, use at other places too + // TODO 0.20.0 more efficient and pragmatic than turnSubjectToList, use at other places too val maybeList = container.maybeSubject.map { - //TODO move into when with 1.0.0, update to Kotlin >= 1.4 respectively + //TODO move into `when` with the update to Kotlin >= 1.3 val iterable = converter(it) when (iterable) { is List -> iterable diff --git a/logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/creating/iterable/contains/creators/impl/InOrderOnlyMatcher.kt b/logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/creating/iterable/contains/creators/impl/InOrderOnlyMatcher.kt index 35d5b164bd..ad99587269 100644 --- a/logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/creating/iterable/contains/creators/impl/InOrderOnlyMatcher.kt +++ b/logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/creating/iterable/contains/creators/impl/InOrderOnlyMatcher.kt @@ -23,7 +23,7 @@ interface InOrderOnlyMatcher { } val elementAssertion = elementAssertionCreator(maybeElement, searchCriterion) val assertion = maybeElement.map { elementAssertion }.getOrElse { - //TODO 0.19.0: extract common pattern + //TODO 0.20.0: extract common pattern maybeSubject.fold({ // already in an explanatory assertion context, no need to wrap it again elementAssertion diff --git a/logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/creating/iterablelike/contains/reporting/InOrderOnlyReportingOptions.kt b/logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/creating/iterablelike/contains/reporting/InOrderOnlyReportingOptions.kt index ccd3a50045..4742b12547 100644 --- a/logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/creating/iterablelike/contains/reporting/InOrderOnlyReportingOptions.kt +++ b/logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/creating/iterablelike/contains/reporting/InOrderOnlyReportingOptions.kt @@ -7,33 +7,6 @@ import ch.tutteli.atrium.logic.creating.typeutils.IterableLike * * @since 0.17.0 */ -interface InOrderOnlyReportingOptions : OnlyReportingOptions{ - /** - * Show only failing expectations, i.e. elements which do not match, instead of a summary (which - * lists also successful expectations/elements) if there are more than [number] elements. - * - * Default shows up to 10 elements in a summary and only failing afterwards, - * i.e. default is [showOnlyFailingIfMoreElementsThan]`(10)` - * - * @since 0.17.0 - */ - @Deprecated( - "Use showOnlyFailingIfMoreExpectedElementsThan instead; will be removed with 0.19.0", - ReplaceWith("this.showOnlyFailingIfMoreExpectedElementsThan(number)") - ) - fun showOnlyFailingIfMoreElementsThan(number: Int) - - /** - * Indicates until how many elements the summary view shall be used. If there are more elements in the - * [IterableLike], then only failing expectations shall be shown. - * - * @since 0.17.0 - */ - @Deprecated( - "Use maxNumberOfExpectedElementsForSummary; will be removed with 0.19.0", - ReplaceWith("this.maxNumberOfExpectedElementsForSummary") - ) - val numberOfElementsInSummary: Int -} +interface InOrderOnlyReportingOptions : OnlyReportingOptions diff --git a/logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/creating/iterablelike/contains/reporting/impl/InOrderOnlyReportingOptionsImpl.kt b/logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/creating/iterablelike/contains/reporting/impl/InOrderOnlyReportingOptionsImpl.kt index 636a0ae953..fb63d069a2 100644 --- a/logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/creating/iterablelike/contains/reporting/impl/InOrderOnlyReportingOptionsImpl.kt +++ b/logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/creating/iterablelike/contains/reporting/impl/InOrderOnlyReportingOptionsImpl.kt @@ -2,10 +2,4 @@ package ch.tutteli.atrium.logic.creating.iterablelike.contains.reporting.impl import ch.tutteli.atrium.logic.creating.iterablelike.contains.reporting.InOrderOnlyReportingOptions -internal class InOrderOnlyReportingOptionsImpl : BaseOnlyReportingOptionsImpl(), InOrderOnlyReportingOptions{ - //TODO 0.19.0 remove - @Suppress("OverridingDeprecatedMember") - override val numberOfElementsInSummary: Int get() = maxNumberOfExpectedElementsForSummary - @Suppress("OverridingDeprecatedMember") - override fun showOnlyFailingIfMoreElementsThan(number: Int) = showOnlyFailingIfMoreExpectedElementsThan(number) -} +internal class InOrderOnlyReportingOptionsImpl : BaseOnlyReportingOptionsImpl(), InOrderOnlyReportingOptions diff --git a/logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/creating/maplike/contains/MapLikeContains.kt b/logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/creating/maplike/contains/MapLikeContains.kt index 6d24116ac1..a1738212dc 100644 --- a/logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/creating/maplike/contains/MapLikeContains.kt +++ b/logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/creating/maplike/contains/MapLikeContains.kt @@ -68,13 +68,4 @@ interface MapLikeContains { * @param SC The type of the search criteria. */ interface Creator : Contains.Creator - - /** - * Represents a check for the search result such as: - * the object is contained exactly once in the input of the search. - * - * It provides the method [createAssertion] which creates an [Assertion] representing this check. - */ - @Deprecated("Will be removed with 0.19.0 without replacement") - interface Checker : Contains.Checker } diff --git a/logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/creating/maplike/contains/checkers/AtLeastChecker.kt b/logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/creating/maplike/contains/checkers/AtLeastChecker.kt deleted file mode 100644 index 180501f4f7..0000000000 --- a/logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/creating/maplike/contains/checkers/AtLeastChecker.kt +++ /dev/null @@ -1,15 +0,0 @@ -//TODO remove file with 0.19.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.logic.creating.maplike.contains.checkers - -import ch.tutteli.atrium.logic.creating.maplike.contains.MapLikeContains - - -/** - * Represents a check that an expected search criterion is contained at least [times] in the search input. - */ -@Deprecated("Will be removed with 0.19.0 without replacement") -interface AtLeastChecker : - ch.tutteli.atrium.logic.creating.basic.contains.checkers.AtLeastChecker, - MapLikeContains.Checker diff --git a/logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/creating/maplike/contains/checkers/AtMostChecker.kt b/logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/creating/maplike/contains/checkers/AtMostChecker.kt deleted file mode 100644 index f294d96bfb..0000000000 --- a/logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/creating/maplike/contains/checkers/AtMostChecker.kt +++ /dev/null @@ -1,14 +0,0 @@ -//TODO remove file with 0.19.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.logic.creating.maplike.contains.checkers - -import ch.tutteli.atrium.logic.creating.maplike.contains.MapLikeContains - -/** - * Represents a check that an expected search criterion is contained at most [times] in the search input. - */ -@Deprecated("Will be removed with 0.19.0 without replacement") -interface AtMostChecker : - ch.tutteli.atrium.logic.creating.basic.contains.checkers.AtMostChecker, - MapLikeContains.Checker diff --git a/logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/creating/maplike/contains/checkers/ExactlyChecker.kt b/logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/creating/maplike/contains/checkers/ExactlyChecker.kt deleted file mode 100644 index f0a1620cac..0000000000 --- a/logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/creating/maplike/contains/checkers/ExactlyChecker.kt +++ /dev/null @@ -1,14 +0,0 @@ -//TODO remove file with 0.19.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.logic.creating.maplike.contains.checkers - -import ch.tutteli.atrium.logic.creating.maplike.contains.MapLikeContains - -/** - * Represents a check that an expected search criterion is contained exactly [times] in the search input. - */ -@Deprecated("Will be removed with 0.19.0 without replacement") -interface ExactlyChecker : - ch.tutteli.atrium.logic.creating.basic.contains.checkers.ExactlyChecker, - MapLikeContains.Checker diff --git a/logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/creating/maplike/contains/checkers/NotChecker.kt b/logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/creating/maplike/contains/checkers/NotChecker.kt deleted file mode 100644 index 2cfe8e1487..0000000000 --- a/logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/creating/maplike/contains/checkers/NotChecker.kt +++ /dev/null @@ -1,14 +0,0 @@ -//TODO remove file with 0.19.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.logic.creating.maplike.contains.checkers - -import ch.tutteli.atrium.logic.creating.maplike.contains.MapLikeContains - -/** - * Represents a check that an expected search criterion is not contained in the search input. - */ -@Deprecated("Will be removed with 0.19.0 without replacement") -interface NotChecker : - ch.tutteli.atrium.logic.creating.basic.contains.checkers.NotChecker, - MapLikeContains.Checker diff --git a/logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/creating/maplike/contains/checkers/impl/DefaultAtLeastChecker.kt b/logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/creating/maplike/contains/checkers/impl/DefaultAtLeastChecker.kt deleted file mode 100644 index eb4ab82238..0000000000 --- a/logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/creating/maplike/contains/checkers/impl/DefaultAtLeastChecker.kt +++ /dev/null @@ -1,28 +0,0 @@ -//TODO remove file with 0.19.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.logic.creating.maplike.contains.checkers.impl - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.logic.creating.basic.contains.checkers.impl.ContainsChecker -import ch.tutteli.atrium.logic.creating.maplike.contains.checkers.AtLeastChecker -import ch.tutteli.atrium.translations.DescriptionIterableLikeExpectation - -/** - * Represents a check that an expected entry is contained at least [times] in the [Iterable]. - * - * @param times The number which the check uses to compare against the actual number of times an expected object is - * found in the [Iterable]. - * @param nameContainsNotFun The function which should be used instead of `atLeastCall` when [times] is zero. - * @param atLeastCall The function which was used and should not be used if [times] is zero. - * @throws IllegalArgumentException In case [times] is smaller than 1. - */ -class DefaultAtLeastChecker( - times: Int, - override val nameContainsNotFun: String, - override val atLeastCall: (Int) -> String -) : AtLeastChecker, ContainsChecker(times, nameContainsNotFun, atLeastCall) { - - override fun createAssertion(foundNumberOfTimes: Int): Assertion = - createDescriptiveAssertion(DescriptionIterableLikeExpectation.AT_LEAST) { foundNumberOfTimes >= times } -} diff --git a/logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/creating/maplike/contains/checkers/impl/DefaultAtMostChecker.kt b/logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/creating/maplike/contains/checkers/impl/DefaultAtMostChecker.kt deleted file mode 100644 index b3750f6bc2..0000000000 --- a/logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/creating/maplike/contains/checkers/impl/DefaultAtMostChecker.kt +++ /dev/null @@ -1,29 +0,0 @@ -//TODO remove file with 0.19.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.logic.creating.maplike.contains.checkers.impl - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.logic.creating.basic.contains.checkers.impl.ContainsChecker -import ch.tutteli.atrium.logic.creating.maplike.contains.checkers.AtMostChecker -import ch.tutteli.atrium.translations.DescriptionIterableLikeExpectation - -/** - * Represents a check that an expected entry is contained at most [times] in the [Iterable]. - * - * @param times The number which the check uses to compare against the actual number of times an expected entry is - * found in the [Iterable]. - * @param nameContainsNotFun The function which should be used instead of `atMostCall` when [times] is zero. - * @param atMostCall The function which was used and should not be used if [times] is zero. - * - * @throws IllegalArgumentException In case [times] is smaller than 1. - */ -class DefaultAtMostChecker( - times: Int, - override val nameContainsNotFun: String, - override val atMostCall: (Int) -> String -) : AtMostChecker, ContainsChecker(times, nameContainsNotFun, atMostCall) { - - override fun createAssertion(foundNumberOfTimes: Int): Assertion = - createDescriptiveAssertion(DescriptionIterableLikeExpectation.AT_MOST) { foundNumberOfTimes <= times } -} diff --git a/logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/creating/maplike/contains/checkers/impl/DefaultExactlyChecker.kt b/logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/creating/maplike/contains/checkers/impl/DefaultExactlyChecker.kt deleted file mode 100644 index 61956ee5d7..0000000000 --- a/logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/creating/maplike/contains/checkers/impl/DefaultExactlyChecker.kt +++ /dev/null @@ -1,29 +0,0 @@ -//TODO remove file with 0.19.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.logic.creating.maplike.contains.checkers.impl - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.logic.creating.basic.contains.checkers.impl.ContainsChecker -import ch.tutteli.atrium.logic.creating.maplike.contains.checkers.ExactlyChecker -import ch.tutteli.atrium.translations.DescriptionIterableLikeExpectation - -/** - * Represents a check that an expected entry is contained exactly [times] in the [Iterable]. - * - * @param times The number which the check uses to compare against the actual number of times an expected entry is - * found in the [Iterable]. - * @param nameContainsNotFun The function which should be used instead of `exactlyCall` when [times] is zero. - * @param exactlyCall The function call which was used and should not be used if [times] is zero. - * - * @throws IllegalArgumentException In case [times] is smaller than 1. - */ -class DefaultExactlyChecker( - times: Int, - override val nameContainsNotFun: String, - override val exactlyCall: (Int) -> String -) : ExactlyChecker, ContainsChecker(times, nameContainsNotFun, exactlyCall) { - - override fun createAssertion(foundNumberOfTimes: Int): Assertion = - createDescriptiveAssertion(DescriptionIterableLikeExpectation.EXACTLY) { foundNumberOfTimes == times } -} diff --git a/logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/creating/maplike/contains/checkers/impl/DefaultNotChecker.kt b/logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/creating/maplike/contains/checkers/impl/DefaultNotChecker.kt deleted file mode 100644 index 41b5938122..0000000000 --- a/logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/creating/maplike/contains/checkers/impl/DefaultNotChecker.kt +++ /dev/null @@ -1,19 +0,0 @@ -//TODO remove file with 0.19.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.logic.creating.maplike.contains.checkers.impl - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.assertions.builders.assertionBuilder -import ch.tutteli.atrium.logic.creating.maplike.contains.checkers.NotChecker -import ch.tutteli.atrium.translations.DescriptionAnyExpectation.TO_EQUAL - -//TODO remove? looks like this is not used anymore -/** - * Represents a check that an expected entry is not contained in the [Iterable]. - */ -class DefaultNotChecker : NotChecker { - - override fun createAssertion(foundNumberOfTimes: Int): Assertion = - assertionBuilder.createDescriptive(TO_EQUAL, 0) { foundNumberOfTimes == 0 } -} diff --git a/logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/creating/transformers/impl/DefaultFeatureExtractor.kt b/logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/creating/transformers/impl/DefaultFeatureExtractor.kt index 474deca1c0..4a9df86e9d 100644 --- a/logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/creating/transformers/impl/DefaultFeatureExtractor.kt +++ b/logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/creating/transformers/impl/DefaultFeatureExtractor.kt @@ -56,7 +56,7 @@ class DefaultFeatureExtractor : FeatureExtractor { val subAssertions = maybeSubAssertions.fold({ listOf() }) { assertionCreator -> - // TODO 0.19.0: factor out in common pattern, should not be the concern of the average expectation + // TODO 0.20.0: factor out in common pattern, should not be the concern of the average expectation // function writer container.maybeSubject.fold({ // already in an explanatory expectation-group, no need to wrap again diff --git a/logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/impl/DefaultAnyAssertions.kt b/logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/impl/DefaultAnyAssertions.kt index 3dc6f5cb19..999d3f21b2 100644 --- a/logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/impl/DefaultAnyAssertions.kt +++ b/logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/impl/DefaultAnyAssertions.kt @@ -38,7 +38,7 @@ class DefaultAnyAssertions : AnyAssertions { val assertion = container.collectBasedOnSubject(collectSubject) { _logic.appendAsGroup(assertionCreatorOrNull) } - //TODO 0.19.0 this is a pattern which occurs over and over again, maybe incorporate into collect? + //TODO 0.20.0 this is a pattern which occurs over and over again, maybe incorporate into collect? container.maybeSubject.fold( { // already in an explanatory assertion context, no need to wrap it again diff --git a/logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/impl/DefaultFloatingPointAssertions.kt b/logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/impl/DefaultFloatingPointAssertions.kt index 6ec5951f03..5c0269ff61 100644 --- a/logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/impl/DefaultFloatingPointAssertions.kt +++ b/logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/impl/DefaultFloatingPointAssertions.kt @@ -76,7 +76,7 @@ internal fun > toBeWithErrorTolerance( assertionBuilder.descriptive .withTest(container.toExpect()) { absDiff(it) <= tolerance } .withHelpOnFailureBasedOnDefinedSubject(container.toExpect()) { subject -> - //TODO 0.19.0 that's not nice in case we use it in an Iterable contains assertion, for instance contains...entry { toBeWithErrorTolerance(x, 0.01) } + //TODO 0.20.0 that's not nice in case we use it in an Iterable contains assertion, for instance contains...entry { toBeWithErrorTolerance(x, 0.01) } //we do not want to see the failure nor the exact check in the 'an entry which...' part //same problematic applies to feature assertions within an identification lambda // => yet explanatory assertion should always hold diff --git a/logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/impl/DefaultThrowableAssertions.kt b/logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/impl/DefaultThrowableAssertions.kt index 6bfa701808..bce04943bb 100644 --- a/logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/impl/DefaultThrowableAssertions.kt +++ b/logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/impl/DefaultThrowableAssertions.kt @@ -23,7 +23,7 @@ class DefaultThrowableAssertions : ThrowableAssertions { expectedType: KClass ): SubjectChangerBuilder.ExecutionStep = container.manualFeature(DescriptionThrowableExpectation.CAUSE) { cause }.transform().let { previousExpect -> - //TODO 0.19.0 factor out a pattern, we are doing this more than once, in API we have withOptions + //TODO 0.20.0 factor out a pattern, we are doing this more than once, in API we have withOptions FeatureExpect( previousExpect, FeatureExpectOptions(representationInsteadOfFeature = { diff --git a/logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/impl/containsHelpers.kt b/logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/impl/containsHelpers.kt index 82d19c8ebe..53a946e368 100644 --- a/logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/impl/containsHelpers.kt +++ b/logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/impl/containsHelpers.kt @@ -39,7 +39,7 @@ internal fun createExplanatoryAssertionGroup( return assertionBuilder.explanatoryGroup .withDefaultType .let { - //TODO 0.19.0 looks a lot like toBeNullIfNullGiven + //TODO 0.20.0 looks a lot like toBeNullIfNullGiven if (assertionCreatorOrNull != null) { // we don't use a subject, we will not show it anyway it.collectAssertions(container, None, assertionCreatorOrNull) diff --git a/logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/utils.kt b/logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/utils.kt index 3f3e1897ab..8908c514ee 100644 --- a/logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/utils.kt +++ b/logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/utils.kt @@ -24,7 +24,7 @@ import ch.tutteli.atrium.reporting.translating.Translatable * @param representation The representation of the expected outcome * @param test The test which checks whether the assertion holds */ -//TODO deprecate with 0.19.0 (when ProofContainer is introduced) +//TODO deprecate with 0.20.0 (when ProofContainer is introduced) fun AssertionContainer.createDescriptiveAssertion( description: Translatable, representation: Any?, @@ -37,14 +37,14 @@ fun AssertionContainer.createDescriptiveAssertion( /** * Entry point to use the [SubjectChangerBuilder] based on this [AssertionContainer]. */ -//TODO deprecate with 0.19.0 (when ProofContainer is introduced) +//TODO deprecate with 0.20.0 (when ProofContainer is introduced) val AssertionContainer.changeSubject: SubjectChangerBuilder.KindStep get() = SubjectChangerBuilder(this) /** * Entry point to use the [FeatureExtractorBuilder] based on this [AssertionContainer]. */ -//TODO deprecate with 0.19.0 (when ProofContainer is introduced) +//TODO deprecate with 0.20.0 (when ProofContainer is introduced) val AssertionContainer.extractFeature: FeatureExtractorBuilder.DescriptionStep get() = FeatureExtractorBuilder(this) @@ -54,7 +54,7 @@ val AssertionContainer.extractFeature: FeatureExtractorBuilder.Descriptio * logic level. */ //is not internal as it is used by extensions, however it is not made visible via module-info.java -//TODO deprecate with 0.19.0 and move toProofContainer to core +//TODO deprecate with 0.20.0 and move toProofContainer to core fun Expect.toAssertionContainer(): AssertionContainer = when (this) { is ExpectInternal -> this @@ -64,7 +64,7 @@ fun Expect.toAssertionContainer(): AssertionContainer = /** * Casts this [AssertionContainer] back to an [Expect] so that you can use it in places where an [Expect] is used. */ -//TODO deprecate with 0.19.0 and move ProofContainer.toExpect to core +//TODO deprecate with 0.20.0 and move ProofContainer.toExpect to core fun AssertionContainer.toExpect(): Expect = when (this) { is ExpectInternal -> this diff --git a/logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/utilsCollect.kt b/logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/utilsCollect.kt index 9b10951653..1d9695a98b 100644 --- a/logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/utilsCollect.kt +++ b/logic/atrium-logic/src/commonMain/kotlin/ch/tutteli/atrium/logic/utilsCollect.kt @@ -50,7 +50,7 @@ inline fun AssertionContainer.collect(noinline assertionCreator: Expect`. */ -//TODO 0.19.0 refactor with ProofContainer, return a flag which indicates whether no assertion was created by the assertionCreator +//TODO 0.20.0 refactor with ProofContainer, return a flag which indicates whether no assertion was created by the assertionCreator inline fun AssertionContainer.collectForComposition( noinline assertionCreator: Expect.() -> Unit ): List = collectForCompositionBasedOnSubject(maybeSubject, assertionCreator) @@ -73,7 +73,7 @@ inline fun AssertionContainer.collectForComposition( * @return The collected assertions. */ //TODO check if it makes more sense to stay on the logic level for assertionCreator -//TODO 0.19.0 deprecate and move to ProofContainer +//TODO 0.20.0 deprecate and move to ProofContainer inline fun AssertionContainer<*>.collectBasedOnSubject( maybeSubject: Option, noinline assertionCreator: Expect.() -> Unit @@ -96,7 +96,7 @@ inline fun AssertionContainer<*>.collectBasedOnSubject( * * @return The collected assertions as a `List<[Assertion]>`. */ -//TODO 0.19.0 refactor with ProofContainer, return a flag which indicates whether no assertion was created by the assertionCreator +//TODO 0.20.0 refactor with ProofContainer, return a flag which indicates whether no assertion was created by the assertionCreator @Suppress("DEPRECATION" /* RequiresOptIn is only available since 1.3.70 which we cannot use if we want to support 1.2 */) @UseExperimental(ExperimentalComponentFactoryContainer::class) inline fun AssertionContainer<*>.collectForCompositionBasedOnSubject( diff --git a/logic/atrium-logic/src/generated/commonMain/ch/tutteli/atrium/logic/list.kt b/logic/atrium-logic/src/generated/commonMain/ch/tutteli/atrium/logic/list.kt index 63515dd672..720c6e8c02 100644 --- a/logic/atrium-logic/src/generated/commonMain/ch/tutteli/atrium/logic/list.kt +++ b/logic/atrium-logic/src/generated/commonMain/ch/tutteli/atrium/logic/list.kt @@ -12,7 +12,7 @@ import ch.tutteli.atrium.logic.creating.transformers.FeatureExtractorBuilder import ch.tutteli.atrium.core.ExperimentalNewExpectTypes import ch.tutteli.atrium.logic.impl.DefaultListAssertions - //TODO 0.19.0 change to ListLike in order that it works as well for arrays + //TODO 0.20.0 change to ListLike in order that it works as well for arrays fun > AssertionContainer.get(index: Int): FeatureExtractorBuilder.ExecutionStep = impl.get(this, index) @Suppress("DEPRECATION" /* OptIn is only available since 1.3.70 which we cannot use if we want to support 1.2 */) diff --git a/logic/atrium-logic/src/jvmMain/kotlin/ch/tutteli/atrium/logic/creating/filesystem/hints/hints.kt b/logic/atrium-logic/src/jvmMain/kotlin/ch/tutteli/atrium/logic/creating/filesystem/hints/hints.kt index bffb678aa9..19b67822db 100644 --- a/logic/atrium-logic/src/jvmMain/kotlin/ch/tutteli/atrium/logic/creating/filesystem/hints/hints.kt +++ b/logic/atrium-logic/src/jvmMain/kotlin/ch/tutteli/atrium/logic/creating/filesystem/hints/hints.kt @@ -90,7 +90,7 @@ fun explainForResolvedLink( val resolvedPathAssertion = resolvedPathAssertionProvider(realPath) return if (hintList.isNotEmpty()) { when (resolvedPathAssertion) { - //TODO 0.19.0 this should be done differently - see isEmptyDirectory `!! directory contains` is suddenly `>> directory contains.` + //TODO 0.20.0 this should be done differently - see isEmptyDirectory `!! directory contains` is suddenly `>> directory contains.` is AssertionGroup -> hintList.addAll(resolvedPathAssertion.assertions) else -> hintList.add(resolvedPathAssertion) } diff --git a/logic/atrium-logic/src/module/module-info.java b/logic/atrium-logic/src/module/module-info.java index 95580d7153..3017b4e2ed 100644 --- a/logic/atrium-logic/src/module/module-info.java +++ b/logic/atrium-logic/src/module/module-info.java @@ -25,7 +25,6 @@ exports ch.tutteli.atrium.logic.creating.iterablelike.contains.reporting; exports ch.tutteli.atrium.logic.creating.maplike.contains; - exports ch.tutteli.atrium.logic.creating.maplike.contains.checkers; exports ch.tutteli.atrium.logic.creating.maplike.contains.creators; exports ch.tutteli.atrium.logic.creating.maplike.contains.searchbehaviours; exports ch.tutteli.atrium.logic.creating.maplike.contains.steps; diff --git a/misc/atrium-specs/src/commonMain/kotlin/ch/tutteli/atrium/specs/integration/ResultExpectationsSpec.kt b/misc/atrium-specs/src/commonMain/kotlin/ch/tutteli/atrium/specs/integration/ResultExpectationsSpec.kt index d0929a4d4d..16a4435b98 100644 --- a/misc/atrium-specs/src/commonMain/kotlin/ch/tutteli/atrium/specs/integration/ResultExpectationsSpec.kt +++ b/misc/atrium-specs/src/commonMain/kotlin/ch/tutteli/atrium/specs/integration/ResultExpectationsSpec.kt @@ -120,7 +120,7 @@ abstract class ResultExpectationsSpec( } } - //TODO 0.19.0 activate once we have the workaround for #1234 implemented + //TODO 0.20.0 activate once we have the workaround for #1234 implemented // failureFunctions.forEach { (name, toBeAFailureFun, _) -> // it("$name - can perform sub-assertion which holds") { // expect(resultFailure).toBeAFailureFun { messageToContain("oh no...") } diff --git a/misc/tools/bc-tests/build.gradle.kts b/misc/tools/bc-tests/build.gradle.kts index 27eb0beb05..b6e6780512 100644 --- a/misc/tools/bc-tests/build.gradle.kts +++ b/misc/tools/bc-tests/build.gradle.kts @@ -175,8 +175,7 @@ bcConfigs.forEach { (oldVersion, apis, pair) -> configure(listOf(project(":bc-tests:$oldVersion-specs"))) { the().apply { jvm() - // TODO 0.19.0 reactivate once we have transitioned everything to the new MPP plugin -// js().nodejs {} + js().nodejs {} sourceSets { val commonMain by getting { dependencies { @@ -200,16 +199,15 @@ bcConfigs.forEach { (oldVersion, apis, pair) -> api("ch.tutteli.niok:niok:$niokVersion") } } - // TODO 0.19.0 reactivate once we have transitioned everything to the new MPP plugin -// val jsMain by getting { -// dependencies { -// api("io.mockk:mockk-dsl-js:$mockkVersion") -// api("org.spekframework.spek2:spek-dsl-js:$spekVersion") -// -// //TODO 1.0.0 should no longer be necessary once updated to kotlin 1.4.x -// implementation(kotlin("stdlib-js")) -// } -// } + val jsMain by getting { + dependencies { + api("io.mockk:mockk-dsl-js:$mockkVersion") + api("org.spekframework.spek2:spek-dsl-js:$spekVersion") + + //TODO 0.20.0 should no longer be necessary once updated to kotlin 1.4.x + implementation(kotlin("stdlib-js")) + } + } } } @@ -341,8 +339,7 @@ bcConfigs.forEach { (oldVersion, apis, pair) -> the().apply { - // TODO 0.19.0 reactivate once we have transitioned everything to the new MPP plugin -// js().nodejs {} + js().nodejs {} jvm { configureTestSetupAndJdkVersion() @@ -361,7 +358,7 @@ bcConfigs.forEach { (oldVersion, apis, pair) -> // we want to run the samples as well dependsOn(tasks.named("build")) } - //TODO 0.19.0 not yet sure if it makes more sense to include it into :check as well + //TODO 0.20.0 not yet sure if it makes more sense to include it into :check as well // tasks.named("check").configure { // dependsOn(bcTest) // } @@ -399,19 +396,18 @@ bcConfigs.forEach { (oldVersion, apis, pair) -> } } - // TODO 0.19.0 reactivate once we have transitioned everything to the new MPP plugin -// val jsTest by getting { -// dependencies { -// implementation(kotlin("test-js")) -// -// //TODO shouldn't be necessary -// api(project(":atrium-core-robstoll")) -// api(project(":atrium-domain-robstolls")) -// -// //TODO 1.0.0 should no longer be necessary once updated to kotlin 1.4.x -// implementation(kotlin("stdlib-js")) -// } -// } + val jsTest by getting { + dependencies { + implementation(kotlin("test-js")) + + //TODO shouldn't be necessary + api(project(":atrium-core-robstoll")) + api(project(":atrium-domain-robstolls")) + + //TODO 0.20.0 should no longer be necessary once updated to kotlin 1.4.x + implementation(kotlin("stdlib-js")) + } + } } } configureTestTasks() @@ -461,7 +457,7 @@ fun Project.createJacocoReportTask( else -> throw IllegalStateException("re-adjust jacoco task") } projects.forEach { - //TODO 0.19.0 simplify once all project use new MPP plugin + //TODO 0.20.0 simplify once all project use new MPP plugin val sourceSetContainer = it.extensions.findByType() if (sourceSetContainer != null) { sourceSets(sourceSetContainer["main"]) @@ -504,8 +500,6 @@ fun Project.rewriteFile(filePath: String, f: (String) -> String) { // Known source backward compatibility breaks: // remove sources if you change something here in order that the changes take effect -// TODO 0.19.0 activate again -// TODO 0.20.0 remove once we support js again //listOf("0.18.0").forEach { version -> // listOf("fluent", "infix").forEach { apiShortName -> // with(project(":bc-tests:$version-api-$apiShortName-en_GB")) { diff --git a/settings.gradle.kts b/settings.gradle.kts index 5276021271..7c645c5f1b 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -7,8 +7,6 @@ buildscript { val allTargets = listOf("common", "jvm", "js") val commonJvm = listOf("common", "jvm") - //TODO 0.19.0 or 0.20.0 change to allTargets and remove commonJvm once we have transitioned everything to the new MPP plugin - val allApisAllTargets = listOf("fluent-en_GB" to commonJvm, "infix-en_GB" to commonJvm) val bcConfigs: List>>, Pair>>> = listOf() (gradle as ExtensionAware).extra.apply { diff --git a/translations/atrium-translations-de_CH/src/commonMain/kotlin/ch/tutteli/atrium/translations/ErrorMessages.kt b/translations/atrium-translations-de_CH/src/commonMain/kotlin/ch/tutteli/atrium/translations/ErrorMessages.kt index 45fd21928b..3b54a19a1a 100644 --- a/translations/atrium-translations-de_CH/src/commonMain/kotlin/ch/tutteli/atrium/translations/ErrorMessages.kt +++ b/translations/atrium-translations-de_CH/src/commonMain/kotlin/ch/tutteli/atrium/translations/ErrorMessages.kt @@ -9,33 +9,14 @@ import ch.tutteli.atrium.reporting.translating.StringBasedTranslatable enum class ErrorMessages(override val value: String) : StringBasedTranslatable { DESCRIPTION_BASED_ON_SUBJECT("Kann die Beschreibung NICHT anzeigen, da sie auf dem Subjekt der Behauptung beruht, welches nicht definiert ist"), + @Deprecated( "Use DESCRIPTION_BASED_ON_SUBJECT; will be removed with 1.0.0 at the latest", ReplaceWith("DESCRIPTION_BASED_ON_SUBJECT") ) DEDSCRIPTION_BASED_ON_SUBJECT("Kann die Beschreibung NICHT anzeigen, da sie auf dem Subjekt der Behauptung beruht, welches nicht definiert ist"), - REPRESENTATION_BASED_ON_SUBJECT_NOT_DEFINED("kann die Representation NICHT evaluieren, da sie auf dem Subjekt der Behauptung beruht, welches nicht definiert ist."), - - @Deprecated( - "Is no longer used, use ErrorMessages of atrium-core; will be removed with 1.0.0 at the latest", - ReplaceWith("ch.tutteli.atrium.creating.ErrorMessages.AT_LEAST_ONE_ASSERTION_DEFINED") - ) - AT_LEAST_ONE_ASSERTION_DEFINED("at least one assertion defined"), - // AT_LEAST_ONE_ASSERTION_DEFINED("zumindest eine Behauptung definiert"), - @Deprecated( - "Is no longer used, use ErrorMessages of atrium-core; will be removed with 1.0.0 at the latest", - ReplaceWith("ch.tutteli.atrium.creating.ErrorMessages.FORGOT_DO_DEFINE_ASSERTION") - ) - FORGOT_DO_DEFINE_ASSERTION("You forgot to define assertions in the assertionCreator-lambda"), - // FORGOT_DO_DEFINE_ASSERTION("Sie vergassen eine Behauptung innerhalb der assertionCreator-Lambda zu definieren"), - - @Deprecated( - "Is no longer used, use ErrorMessages of atrium-core; will be removed with 1.0.0 at the latest", - ReplaceWith("ch.tutteli.atrium.creating.ErrorMessages.HINT_AT_LEAST_ONE_ASSERTION_DEFINED") - ) - HINT_AT_LEAST_ONE_ASSERTION_DEFINED("Sometimes you can use an alternative to `{ }` For instance, instead of `toThrow<..> { }` you should use `toThrow<..>()`"), - // HINT_AT_LEAST_ONE_ASSERTION_DEFINED("Manchmal kann man eine Alternative zu `{ }` verwenden. Zum Beispiel, anstelle von `wirft<..> { }` sollten Sie `wirft<..>()` verwenden."), + REPRESENTATION_BASED_ON_SUBJECT_NOT_DEFINED("kann die Representation NICHT evaluieren, da sie auf dem Subjekt der Behauptung beruht, welches nicht definiert ist."), @Deprecated("Will be removed with 1.0.0 at the latest (maybe earlier)") SUBJECT_ACCESSED_TOO_EARLY("Konnte die zusätzlichen Aussagen (Assertions) nicht auswerten; das Subjekt (subject) wurde zu früh verwendet. Bitte erfassen Sie einen Bug-Report unter $BUG_REPORT_URL inklusive Stacktrace wenn möglich -- vielen Dank."), diff --git a/translations/atrium-translations-de_CH/src/commonMain/kotlin/ch/tutteli/atrium/translations/deprecatedDescriptionIterableAssertion.kt b/translations/atrium-translations-de_CH/src/commonMain/kotlin/ch/tutteli/atrium/translations/deprecatedDescriptionIterableAssertion.kt index 809f638845..43c644b5bb 100644 --- a/translations/atrium-translations-de_CH/src/commonMain/kotlin/ch/tutteli/atrium/translations/deprecatedDescriptionIterableAssertion.kt +++ b/translations/atrium-translations-de_CH/src/commonMain/kotlin/ch/tutteli/atrium/translations/deprecatedDescriptionIterableAssertion.kt @@ -137,12 +137,6 @@ enum class DescriptionIterableAssertion(override val value: String) : StringBase ) SIZE_EXCEEDED("❗❗ hasNext() hat `false` zurückgegeben"), - @Deprecated("Will be removed with 0.19.0") - CANNOT_EVALUATE_SUBJECT_EMPTY_ITERABLE("$COULD_NOT_EVALUATE_DEFINED_ASSERTIONS -- `Iterable` gibt keinen nächsten Eintrag zurück.\n$VISIT_COULD_NOT_EVALUATE_ASSERTIONS"), - - @Deprecated("Will be removed with 0.19.0") - CANNOT_EVALUATE_SUBJECT_ONLY_NULL("$COULD_NOT_EVALUATE_DEFINED_ASSERTIONS -- `Iterable` gibt nur `null` zurück.\n$VISIT_COULD_NOT_EVALUATE_ASSERTIONS"), - @Deprecated( "Use DescriptionIterableLikeExpectation instead; will be removed with 1.0.0 at the latest", ReplaceWith("DescriptionIterableLikeExpectation.WARNING_ADDITIONAL_ELEMENTS") @@ -209,12 +203,3 @@ enum class DescriptionIterableAssertion(override val value: String) : StringBase ) NUMBER_OF_ELEMENTS_FOUND("und % Elemente wurden gefunden") } - -//TODO remove with 0.19.0 -@Deprecated("Will be removed with 0.19.0 without replacement") -internal const val COULD_NOT_EVALUATE_DEFINED_ASSERTIONS = - "Konnte die zusätzlichen Aussagen (Assertions) nicht auswerten" - -@Deprecated("Will be removed with 0.19.0 without replacement") -internal const val VISIT_COULD_NOT_EVALUATE_ASSERTIONS = - "Besuchen Sie die folgende Website für weiterführende Informationen (in Englisch): https://docs.atriumlib.org/could-not-evaluate-assertions" diff --git a/translations/atrium-translations-de_CH/src/commonMain/kotlin/ch/tutteli/atrium/translations/deprecatedDescriptionListAssertion.kt b/translations/atrium-translations-de_CH/src/commonMain/kotlin/ch/tutteli/atrium/translations/deprecatedDescriptionListAssertion.kt index 0ba98dea0d..62e0a61c37 100644 --- a/translations/atrium-translations-de_CH/src/commonMain/kotlin/ch/tutteli/atrium/translations/deprecatedDescriptionListAssertion.kt +++ b/translations/atrium-translations-de_CH/src/commonMain/kotlin/ch/tutteli/atrium/translations/deprecatedDescriptionListAssertion.kt @@ -11,8 +11,6 @@ import ch.tutteli.atrium.reporting.translating.StringBasedTranslatable */ @Deprecated("Will be removed with 1.0.0 at the latest") enum class DescriptionListAssertion(override val value: String) : StringBasedTranslatable { - @Deprecated("Will be removed with 0.19.0 without replacement") - CANNOT_EVALUATE_INDEX_OUT_OF_BOUNDS("$COULD_NOT_EVALUATE_DEFINED_ASSERTIONS -- Index ausserhalb der Grenzen (index out of bounds).\n$VISIT_COULD_NOT_EVALUATE_ASSERTIONS"), @Deprecated( "Use DescriptionListLikeExpectation instead; will be removed with 1.0.0 at the latest", diff --git a/translations/atrium-translations-de_CH/src/commonMain/kotlin/ch/tutteli/atrium/translations/deprecatedDescriptionMapAssertion.kt b/translations/atrium-translations-de_CH/src/commonMain/kotlin/ch/tutteli/atrium/translations/deprecatedDescriptionMapAssertion.kt index a9e5e0022a..7fe80f53d6 100644 --- a/translations/atrium-translations-de_CH/src/commonMain/kotlin/ch/tutteli/atrium/translations/deprecatedDescriptionMapAssertion.kt +++ b/translations/atrium-translations-de_CH/src/commonMain/kotlin/ch/tutteli/atrium/translations/deprecatedDescriptionMapAssertion.kt @@ -11,9 +11,6 @@ import ch.tutteli.atrium.reporting.translating.StringBasedTranslatable */ @Deprecated("Will be removed with 1.0.0 at the latest") enum class DescriptionMapAssertion(override val value: String) : StringBasedTranslatable { - @Deprecated("Will be removed with 1.0.0 at the latest (maybe earlier)") - CANNOT_EVALUATE_KEY_DOES_NOT_EXIST("$COULD_NOT_EVALUATE_DEFINED_ASSERTIONS -- der gegebene Key existiert nicht.\n$VISIT_COULD_NOT_EVALUATE_ASSERTIONS"), - @Deprecated("Will be removed with 1.0.0 at the latest") CONTAINS_IN_ANY_ORDER("enthält, in beliebiger Reihenfolge"), diff --git a/translations/atrium-translations-en_GB/src/commonMain/kotlin/ch/tutteli/atrium/translations/ErrorMessages.kt b/translations/atrium-translations-en_GB/src/commonMain/kotlin/ch/tutteli/atrium/translations/ErrorMessages.kt index d4ac931a66..2470625407 100644 --- a/translations/atrium-translations-en_GB/src/commonMain/kotlin/ch/tutteli/atrium/translations/ErrorMessages.kt +++ b/translations/atrium-translations-en_GB/src/commonMain/kotlin/ch/tutteli/atrium/translations/ErrorMessages.kt @@ -9,30 +9,14 @@ import ch.tutteli.atrium.reporting.translating.StringBasedTranslatable enum class ErrorMessages(override val value: String) : StringBasedTranslatable { DESCRIPTION_BASED_ON_SUBJECT("CANNOT show description as it is based on subject which is not defined"), + @Deprecated( "Use DESCRIPTION_BASED_ON_SUBJECT; will be removed with 1.0.0 at the latest", ReplaceWith("DESCRIPTION_BASED_ON_SUBJECT") ) DEDSCRIPTION_BASED_ON_SUBJECT("CANNOT show description as it is based on subject which is not defined"), - REPRESENTATION_BASED_ON_SUBJECT_NOT_DEFINED("CANNOT evaluate representation as it is based on subject which is not defined."), - - @Deprecated( - "Is no longer used, use ErrorMessages of atrium-core; will be removed with 1.0.0 at the latest", - ReplaceWith("ch.tutteli.atrium.creating.ErrorMessages.AT_LEAST_ONE_ASSERTION_DEFINED") - ) - AT_LEAST_ONE_ASSERTION_DEFINED("at least one assertion defined"), - @Deprecated( - "Is no longer used, use ErrorMessages of atrium-core; will be removed with 1.0.0 at the latest", - ReplaceWith("ch.tutteli.atrium.creating.ErrorMessages.FORGOT_DO_DEFINE_ASSERTION") - ) - FORGOT_DO_DEFINE_ASSERTION("You forgot to define assertions in the assertionCreator-lambda"), - - @Deprecated( - "Is no longer used, use ErrorMessages of atrium-core; will be removed with 1.0.0 at the latest", - ReplaceWith("ch.tutteli.atrium.creating.ErrorMessages.HINT_AT_LEAST_ONE_ASSERTION_DEFINED") - ) - HINT_AT_LEAST_ONE_ASSERTION_DEFINED("Sometimes you can use an alternative to `{ }` For instance, instead of `toThrow<..> { }` you should use `toThrow<..>()`"), + REPRESENTATION_BASED_ON_SUBJECT_NOT_DEFINED("CANNOT evaluate representation as it is based on subject which is not defined."), @Deprecated("Will be removed with 1.0.0 at the latest (maybe earlier)") SUBJECT_ACCESSED_TOO_EARLY("Could not evaluate sub-assertions; the subject was accessed too early. Please report a bug at $BUG_REPORT_URL including stacktrace if possible -- thank you"), diff --git a/translations/atrium-translations-en_GB/src/commonMain/kotlin/ch/tutteli/atrium/translations/deprecatedDescriptionIterableAssertion.kt b/translations/atrium-translations-en_GB/src/commonMain/kotlin/ch/tutteli/atrium/translations/deprecatedDescriptionIterableAssertion.kt index c877773f5e..e16d3820ed 100644 --- a/translations/atrium-translations-en_GB/src/commonMain/kotlin/ch/tutteli/atrium/translations/deprecatedDescriptionIterableAssertion.kt +++ b/translations/atrium-translations-en_GB/src/commonMain/kotlin/ch/tutteli/atrium/translations/deprecatedDescriptionIterableAssertion.kt @@ -77,10 +77,6 @@ enum class DescriptionIterableAssertion(override val value: String) : StringBase ) ENTRY_WITH_INDEX(ELEMENT_WITH_INDEX.getDefault()), - //TODO remove with 0.19.0 - @Deprecated("Will be removed with 0.19.0") - HAS_ELEMENT("has at least one element"), - @Deprecated( "Use DescriptionIterableLikeExpectation instead; will be removed with 1.0.0 at the latest", ReplaceWith("DescriptionIterableLikeExpectation.EXACTLY") @@ -141,12 +137,6 @@ enum class DescriptionIterableAssertion(override val value: String) : StringBase ) SIZE_EXCEEDED("❗❗ hasNext() returned false"), - @Deprecated("Will be removed with 0.19.0") - CANNOT_EVALUATE_SUBJECT_EMPTY_ITERABLE("$COULD_NOT_EVALUATE_DEFINED_ASSERTIONS -- `Iterable` has no next entry.\n$VISIT_COULD_NOT_EVALUATE_ASSERTIONS"), - - @Deprecated("Will be removed with 0.19.0") - CANNOT_EVALUATE_SUBJECT_ONLY_NULL("$COULD_NOT_EVALUATE_DEFINED_ASSERTIONS -- `Iterable` returns only `null` for `next()`.\n$VISIT_COULD_NOT_EVALUATE_ASSERTIONS"), - @Deprecated( "Use DescriptionIterableLikeExpectation instead; will be removed with 1.0.0 at the latest", ReplaceWith("DescriptionIterableLikeExpectation.WARNING_ADDITIONAL_ELEMENTS") @@ -213,11 +203,3 @@ enum class DescriptionIterableAssertion(override val value: String) : StringBase ) NUMBER_OF_ELEMENTS_FOUND("and %s such elements were found") } - -//TODO remove with 0.19.0 -@Deprecated("Will be removed with 0.19.0 without replacement") -internal const val COULD_NOT_EVALUATE_DEFINED_ASSERTIONS = "Could not evaluate the defined assertion(s)" - -@Deprecated("Will be removed with 0.19.0 without replacement") -internal const val VISIT_COULD_NOT_EVALUATE_ASSERTIONS = - "Visit the following site for an explanation: https://docs.atriumlib.org/could-not-evaluate-assertions" diff --git a/translations/atrium-translations-en_GB/src/commonMain/kotlin/ch/tutteli/atrium/translations/deprecatedDescriptionListAssertion.kt b/translations/atrium-translations-en_GB/src/commonMain/kotlin/ch/tutteli/atrium/translations/deprecatedDescriptionListAssertion.kt index 64996c5f8b..e00bb0b1ac 100644 --- a/translations/atrium-translations-en_GB/src/commonMain/kotlin/ch/tutteli/atrium/translations/deprecatedDescriptionListAssertion.kt +++ b/translations/atrium-translations-en_GB/src/commonMain/kotlin/ch/tutteli/atrium/translations/deprecatedDescriptionListAssertion.kt @@ -10,9 +10,6 @@ import ch.tutteli.atrium.reporting.translating.StringBasedTranslatable */ @Deprecated("Will be removed with 1.0.0 at the latest") enum class DescriptionListAssertion(override val value: String) : StringBasedTranslatable { - @Deprecated("Will be removed with 0.19.0 without replacement") - CANNOT_EVALUATE_INDEX_OUT_OF_BOUNDS("$COULD_NOT_EVALUATE_DEFINED_ASSERTIONS -- index out of bounds.\n$VISIT_COULD_NOT_EVALUATE_ASSERTIONS"), - @Deprecated( "Use DescriptionListLikeExpectation instead; will be removed with 1.0.0 at the latest", ReplaceWith("DescriptionListLikeExpectation.INDEX_OUT_OF_BOUNDS") diff --git a/translations/atrium-translations-en_GB/src/commonMain/kotlin/ch/tutteli/atrium/translations/deprecatedDescriptionMapAssertion.kt b/translations/atrium-translations-en_GB/src/commonMain/kotlin/ch/tutteli/atrium/translations/deprecatedDescriptionMapAssertion.kt index 406e3dbd05..9456dbe024 100644 --- a/translations/atrium-translations-en_GB/src/commonMain/kotlin/ch/tutteli/atrium/translations/deprecatedDescriptionMapAssertion.kt +++ b/translations/atrium-translations-en_GB/src/commonMain/kotlin/ch/tutteli/atrium/translations/deprecatedDescriptionMapAssertion.kt @@ -11,9 +11,6 @@ import ch.tutteli.atrium.reporting.translating.StringBasedTranslatable */ @Deprecated("Will be removed with 1.0.0 at the latest") enum class DescriptionMapAssertion(override val value: String) : StringBasedTranslatable { - @Deprecated("Will be removed with 1.0.0 at the latest") - CANNOT_EVALUATE_KEY_DOES_NOT_EXIST("$COULD_NOT_EVALUATE_DEFINED_ASSERTIONS -- given key does not exist.\n$VISIT_COULD_NOT_EVALUATE_ASSERTIONS"), - @Deprecated("Will be removed with 1.0.0 at the latest") CONTAINS_IN_ANY_ORDER("contains, in any order"),