From 636fe9079ea284dba1d96e63c20d8d2ea6abbaf8 Mon Sep 17 00:00:00 2001 From: Robert Stoll Date: Thu, 24 Dec 2020 20:36:06 +0100 Subject: [PATCH] remove deprecated APIs, bundles, domain/core and part of domain-builders moreover: - remove deprecated translation modules - remove functions in api-fluent and api-infix which were only there due to bbc, we are going to break binary compatibility anyway, so we can remove them. - remove Assert/AssertionPlant and co. - remove AssertionChecker and co. - remove deprecated verbs using still Assert - remove ExpectImpl and co. - remove AssertImpl and co. - remove subject from SubjectProvider (was only there because of Assert) - also remove PlantHasNoSubjectException and simplify corresponding code catching it. - remove all deprecated functionality in domain-api, domain-builders domain-robstoll and domain-robstoll-lib which were only used by the deprecated APIs - remove atrium-spec, was only used by deprecated APIs - remove spek1 dependencies, all projects are now using spek2 - move spec about disjunctive matches from domain-builders into the corresponding APIs --- README.md | 144 ++- .../en_GB/charSequenceAssertionsDeprecated.kt | 37 - .../charSequenceContainsCheckersDeprecated.kt | 97 -- .../charSequenceContainsCreatorsDeprecated.kt | 454 ------- ...uenceContainsSearchBehavioursDeprecated.kt | 34 - .../contains/builders/AtLeastCheckerOption.kt | 21 - .../contains/builders/AtMostCheckerOption.kt | 20 - .../builders/ButAtMostCheckerOption.kt | 20 - .../contains/builders/ExactlyCheckerOption.kt | 20 - .../contains/builders/NotCheckerOption.kt | 20 - .../builders/NotOrAtMostCheckerOption.kt | 20 - .../builders/impl/AtLeastCheckerOptionImpl.kt | 32 - .../builders/impl/AtMostCheckerOptionImpl.kt | 34 - .../impl/ButAtMostCheckerOptionImpl.kt | 39 - .../builders/impl/ExactlyCheckerOptionImpl.kt | 32 - .../builders/impl/NotCheckerOptionImpl.kt | 24 - .../impl/NotOrAtMostCheckerOptionImpl.kt | 32 - .../builders/impl/nameContainsNotFun.kt | 12 - .../contains/builders/AtLeastCheckerOption.kt | 21 - .../contains/builders/AtMostCheckerOption.kt | 21 - .../builders/ButAtMostCheckerOption.kt | 21 - .../contains/builders/ExactlyCheckerOption.kt | 21 - .../contains/builders/NotCheckerOption.kt | 20 - .../builders/NotOrAtMostCheckerOption.kt | 21 - .../builders/impl/AtLeastCheckerOptionImpl.kt | 32 - .../builders/impl/AtMostCheckerOptionImpl.kt | 34 - .../impl/ButAtMostCheckerOptionImpl.kt | 39 - .../builders/impl/ExactlyCheckerOptionImpl.kt | 32 - .../builders/impl/NotCheckerOptionImpl.kt | 25 - .../impl/NotOrAtMostCheckerOptionImpl.kt | 32 - .../builders/impl/nameContainsNotFun.kt | 14 - .../en_GB/iterableAssertionsDeprecated.kt | 36 - .../fluent/en_GB/iterableContainsCheckers.kt | 93 -- .../iterableContainsInAnyOrderCreators.kt | 138 --- .../iterableContainsInAnyOrderOnlyCreators.kt | 163 --- .../iterableContainsInOrderOnlyCreators.kt | 153 --- ...rableContainsInOrderOnlyGroupedCreators.kt | 65 - .../en_GB/iterableContainsSearchBehaviours.kt | 65 - ...CharSequenceContainsRegexAssertionsSpec.kt | 11 + .../atrium-api-fluent-en_GB-jvm/build.gradle | 2 +- .../src/module/module-info.java | 2 - .../build.gradle | 2 +- .../api/infix/en_GB/charSequenceAssertions.kt | 3 +- .../en_GB/charSequenceAssertionsDeprecated.kt | 44 - .../charSequenceContainsCheckersDeprecated.kt | 97 -- .../charSequenceContainsCreatorsDeprecated.kt | 506 -------- ...uenceContainsSearchBehavioursDeprecated.kt | 40 - .../contains.builders/AtLeastCheckerOption.kt | 21 - .../contains.builders/AtMostCheckerOption.kt | 20 - .../ButAtMostCheckerOption.kt | 20 - .../contains.builders/ExactlyCheckerOption.kt | 20 - .../contains.builders/NotCheckerOption.kt | 20 - .../NotOrAtMostCheckerOption.kt | 20 - .../impl/AtLeastCheckerOptionImpl.kt | 32 - .../impl/AtMostCheckerOptionImpl.kt | 34 - .../impl/ButAtMostCheckerOptionImpl.kt | 43 - .../impl/ExactlyCheckerOptionImpl.kt | 33 - .../impl/NotCheckerOptionImpl.kt | 24 - .../impl/NotOrAtMostCheckerOptionImpl.kt | 33 - .../impl/nameContainsNotFun.kt | 18 - .../contains/impl/checkerNames.kt | 4 +- .../contains/builders/AtLeastCheckerOption.kt | 21 - .../contains/builders/AtMostCheckerOption.kt | 21 - .../builders/ButAtMostCheckerOption.kt | 21 - .../contains/builders/ExactlyCheckerOption.kt | 21 - .../contains/builders/NotCheckerOption.kt | 20 - .../builders/NotOrAtMostCheckerOption.kt | 21 - .../builders/impl/AtLeastCheckerOptionImpl.kt | 32 - .../builders/impl/AtMostCheckerOptionImpl.kt | 34 - .../impl/ButAtMostCheckerOptionImpl.kt | 39 - .../builders/impl/ExactlyCheckerOptionImpl.kt | 32 - .../builders/impl/NotCheckerOptionImpl.kt | 25 - .../impl/NotOrAtMostCheckerOptionImpl.kt | 32 - .../builders/impl/nameContainsNotFun.kt | 8 - .../iterable/contains/impl/checkerNames.kt | 4 +- .../en_GB/iterableAssertionsDeprecated.kt | 42 - .../infix/en_GB/iterableContainsCheckers.kt | 93 -- .../iterableContainsInAnyOrderCreators.kt | 129 -- .../iterableContainsInAnyOrderOnlyCreators.kt | 153 --- .../iterableContainsInOrderOnlyCreators.kt | 144 --- ...rableContainsInOrderOnlyGroupedCreators.kt | 74 -- .../en_GB/iterableContainsSearchBehaviours.kt | 71 -- ...eLikeContainsInOrderOnlyGroupedCreators.kt | 9 + ...CharSequenceContainsRegexAssertionsSpec.kt | 12 + .../infix/en_GB/IterableAnyAssertionsSpec.kt | 1 - .../atrium-api-infix-en_GB-jvm/build.gradle | 2 +- .../src/module/module-info.java | 2 - .../build.gradle | 2 +- build.gradle | 62 +- .../atrium-fluent-en_GB-jvm/build.gradle | 3 - .../src/test/kotlin/custom/SmokeSpec.kt | 3 +- .../build.gradle | 1 - .../atrium-infix-en_GB-jvm/build.gradle | 3 - .../build.gradle | 1 - .../assertions/BasicDescriptiveAssertion.kt | 12 +- .../defaultImpls.kt | 8 +- .../atrium/checking/AssertionChecker.kt | 31 - .../ch/tutteli/atrium/core/CoreFactory.kt | 489 -------- .../ch/tutteli/atrium/creating/Assert.kt | 16 - .../tutteli/atrium/creating/AssertionPlant.kt | 50 - .../atrium/creating/AssertionPlantNullable.kt | 15 - .../AssertionPlantWithCommonFields.kt | 78 -- .../atrium/creating/BaseAssertionPlant.kt | 48 - .../creating/BaseCollectingAssertionPlant.kt | 37 - .../creating/BaseReportingAssertionPlant.kt | 17 - .../atrium/creating/CheckingAssertionPlant.kt | 37 - .../creating/CollectingAssertionContainer.kt | 30 - .../creating/CollectingAssertionPlant.kt | 22 - .../CollectingAssertionPlantNullable.kt | 18 - .../tutteli/atrium/creating/ErrorMessages.kt | 3 - .../tutteli/atrium/creating/MaybeSubject.kt | 49 - .../creating/PlantHasNoSubjectException.kt | 21 - .../creating/ReportingAssertionContainer.kt | 94 -- .../creating/ReportingAssertionPlant.kt | 16 - .../ReportingAssertionPlantNullable.kt | 17 - .../atrium/creating/SubjectProvider.kt | 106 +- .../atrium/creating/impl/BaseExpectImpl.kt | 13 - .../creating/impl/CollectingExpectImpl.kt | 42 +- .../ch/tutteli/atrium/core/CoreFactory.kt | 103 +- .../ch/tutteli/atrium/core/CoreFactory.kt | 98 -- .../src/module/module-info.java | 1 - .../checking/DelegatingAssertionChecker.kt | 19 - .../lib/checking/FeatureAssertionChecker.kt | 56 - .../lib/checking/ThrowingAssertionChecker.kt | 50 - .../creating/CheckingAssertionPlantImpl.kt | 32 - .../CollectingAssertionContainerImpl.kt | 62 - .../creating/CollectingAssertionPlantImpl.kt | 18 - .../CollectingAssertionPlantNullableImpl.kt | 14 - .../MutableListBasedAssertionContainer.kt | 48 - .../MutableListBasedAssertionPlant.kt | 39 - ...MutableListBasedReportingAssertionPlant.kt | 30 - .../ReportingAssertionContainerImpl.kt | 44 - .../creating/ReportingAssertionPlantImpl.kt | 41 - .../ReportingAssertionPlantNullableImpl.kt | 23 - .../lib/reporting/DetailedObjectFormatter.kt | 11 +- .../DelegatingAssertionCheckerSpec.kt | 8 - .../checking/FeatureAssertionCheckerSpec.kt | 8 - .../checking/ThrowingAssertionCheckerSpec.kt | 8 - .../CollectingAssertionContainerSpec.kt | 6 - .../ReportingAssertionContainerSpec.kt | 8 - .../atrium-core-robstoll-lib-js/build.gradle | 2 +- .../atrium-core-robstoll-lib-jvm/build.gradle | 5 +- .../src/module/module-info.java | 2 - .../creating/CheckingAssertionPlantSpec.kt | 10 - .../creating/CollectingAssertionPlantSpec.kt | 10 - .../creating/ReportingAssertionPlantSpec.kt | 10 - .../core/robstoll/CoreFactoryCommonImpl.kt | 88 -- gradle/scripts/gh-pages.gradle | 8 +- .../LazyThreadUnsafeAssertionGroupSpec.kt | 2 +- .../atrium/logic/utils/MapArgumentsSpec.kt | 2 - .../build.gradle | 1 - .../atrium-logic-kotlin_1_3-js/build.gradle | 1 - .../atrium-logic-kotlin_1_3-jvm/build.gradle | 1 - .../apis/atrium-api-cc-en_UK/build.gradle | 10 - .../en_UK/CharSequenceContainsSearchersKt.kt | 104 -- .../atrium/api/cc/en_UK/anyAssertions.kt | 103 -- ...arSequenceContainsAtLeastCheckerBuilder.kt | 33 - ...harSequenceContainsAtMostCheckerBuilder.kt | 32 - ...SequenceContainsButAtMostCheckerBuilder.kt | 33 - ...arSequenceContainsExactlyCheckerBuilder.kt | 32 - .../CharSequenceContainsNotCheckerBuilder.kt | 30 - ...quenceContainsNotOrAtMostCheckerBuilder.kt | 32 - .../IterableContainsAtLeastCheckerBuilder.kt | 32 - .../IterableContainsAtMostCheckerBuilder.kt | 32 - ...IterableContainsButAtMostCheckerBuilder.kt | 33 - .../IterableContainsExactlyCheckerBuilder.kt | 32 - .../IterableContainsNotCheckerBuilder.kt | 31 - ...erableContainsNotOrAtMostCheckerBuilder.kt | 32 - .../api/cc/en_UK/bigDecimalAssertions.kt | 100 -- .../atrium/api/cc/en_UK/booleanAssertions.kt | 28 - .../api/cc/en_UK/charSequenceAssertions.kt | 220 ---- .../cc/en_UK/charSequenceContainsCheckers.kt | 125 -- .../cc/en_UK/charSequenceContainsCreators.kt | 229 ---- .../en_UK/charSequenceContainsDecorators.kt | 47 - .../api/cc/en_UK/collectionAssertions.kt | 39 - .../api/cc/en_UK/comparableAssertions.kt | 49 - .../contains/builders/AtLeastCheckerOption.kt | 44 - .../contains/builders/AtMostCheckerOption.kt | 46 - .../builders/ButAtMostCheckerOption.kt | 51 - .../contains/builders/ExactlyCheckerOption.kt | 42 - .../contains/builders/NotCheckerOption.kt | 34 - .../builders/NotOrAtMostCheckerOption.kt | 42 - .../contains/builders/nameContainsNotFun.kt | 12 - .../contains/builders/AtLeastCheckerOption.kt | 42 - .../contains/builders/AtMostCheckerOption.kt | 46 - .../builders/ButAtMostCheckerOption.kt | 51 - .../contains/builders/ExactlyCheckerOption.kt | 42 - .../contains/builders/NotCheckerOption.kt | 34 - .../builders/NotOrAtMostCheckerOption.kt | 42 - .../contains/builders/nameContainsNotFun.kt | 12 - .../atrium/api/cc/en_UK/featureAssertions.kt | 272 ----- .../api/cc/en_UK/floatingPointAssertions.kt | 60 - .../atrium/api/cc/en_UK/iterableAssertions.kt | 161 --- .../api/cc/en_UK/iterableContainsCheckers.kt | 122 -- .../cc/en_UK/iterableContainsDecorators.kt | 69 -- .../iterableContainsInAnyOrderCreators.kt | 242 ---- .../iterableContainsInAnyOrderOnlyCreators.kt | 237 ---- .../iterableContainsInOrderOnlyCreators.kt | 215 ---- .../api/cc/en_UK/throwableAssertions.kt | 57 - .../cc/en_UK/typeTransformationAssertions.kt | 42 - .../atrium-api-cc-infix-en_UK/build.gradle | 10 - .../en_UK/CharSequenceContainsSearchersKt.kt | 140 --- .../api/cc/infix/en_UK/anyAssertions.kt | 90 -- ...arSequenceContainsAtLeastCheckerBuilder.kt | 33 - ...harSequenceContainsAtMostCheckerBuilder.kt | 32 - ...SequenceContainsButAtMostCheckerBuilder.kt | 33 - ...arSequenceContainsExactlyCheckerBuilder.kt | 32 - .../CharSequenceContainsNotCheckerBuilder.kt | 29 - ...quenceContainsNotOrAtMostCheckerBuilder.kt | 32 - .../contains/builders/nameContainsNotFun.kt | 13 - .../IterableContainsAtLeastCheckerBuilder.kt | 32 - .../IterableContainsAtMostCheckerBuilder.kt | 33 - ...IterableContainsButAtMostCheckerBuilder.kt | 33 - .../IterableContainsExactlyCheckerBuilder.kt | 32 - .../IterableContainsNotCheckerBuilder.kt | 31 - ...erableContainsNotOrAtMostCheckerBuilder.kt | 32 - .../cc/infix/en_UK/bigDecimalAssertions.kt | 98 -- .../cc/infix/en_UK/charSequenceAssertions.kt | 281 ----- .../en_UK/charSequenceContainsCheckers.kt | 123 -- .../en_UK/charSequenceContainsCreators.kt | 285 ----- .../en_UK/charSequenceContainsDecorators.kt | 44 - .../cc/infix/en_UK/collectionAssertions.kt | 38 - .../cc/infix/en_UK/comparableAssertions.kt | 48 - .../contains/builders/AtLeastCheckerOption.kt | 44 - .../contains/builders/AtMostCheckerOption.kt | 46 - .../builders/ButAtMostCheckerOption.kt | 51 - .../contains/builders/ExactlyCheckerOption.kt | 42 - .../contains/builders/NotCheckerOption.kt | 34 - .../builders/NotOrAtMostCheckerOption.kt | 42 - .../contains/builders/nameContainsNotFun.kt | 14 - .../contains/builders/AtLeastCheckerOption.kt | 42 - .../contains/builders/AtMostCheckerOption.kt | 46 - .../builders/ButAtMostCheckerOption.kt | 51 - .../contains/builders/ExactlyCheckerOption.kt | 42 - .../contains/builders/NotCheckerOption.kt | 34 - .../builders/NotOrAtMostCheckerOption.kt | 42 - .../contains/builders/nameContainsNotFun.kt | 14 - .../api/cc/infix/en_UK/featureAssertions.kt | 272 ----- .../api/cc/infix/en_UK/helperKeywords.kt | 34 - .../api/cc/infix/en_UK/iterableAssertions.kt | 303 ----- .../infix/en_UK/iterableContainsCheckers.kt | 122 -- .../infix/en_UK/iterableContainsDecorators.kt | 72 -- .../iterableContainsInAnyOrderCreators.kt | 171 --- .../iterableContainsInAnyOrderOnlyCreators.kt | 175 --- .../iterableContainsInOrderOnlyCreators.kt | 149 --- .../api/cc/infix/en_UK/methodObjects.kt | 52 - .../api/cc/infix/en_UK/throwableAssertions.kt | 57 - .../en_UK/typeTransformationAssertions.kt | 42 - .../atrium-api-cc-de_CH-common/build.gradle | 5 - .../atrium/api/cc/de_CH/anyAssertions.kt | 127 -- .../atrium/api/cc/de_CH/arrayAssertions.kt | 265 ----- .../api/cc/de_CH/charSequenceAssertions.kt | 185 --- .../cc/de_CH/charSequenceContainsCheckers.kt | 95 -- .../cc/de_CH/charSequenceContainsCreators.kt | 244 ---- .../de_CH/charSequenceContainsDecorators.kt | 33 - .../api/cc/de_CH/collectionAssertions.kt | 69 -- .../api/cc/de_CH/comparableAssertions.kt | 49 - .../contains/builders/AtLeastCheckerOption.kt | 18 - .../contains/builders/AtMostCheckerOption.kt | 17 - .../builders/ButAtMostCheckerOption.kt | 17 - .../contains/builders/ExactlyCheckerOption.kt | 17 - .../contains/builders/NotCheckerOption.kt | 17 - .../builders/NotOrAtMostCheckerOption.kt | 17 - .../builders/impl/AtLeastCheckerOptionImpl.kt | 31 - .../builders/impl/AtMostCheckerOptionImpl.kt | 35 - .../impl/ButAtMostCheckerOptionImpl.kt | 41 - .../builders/impl/ExactlyCheckerOptionImpl.kt | 31 - .../builders/impl/NotCheckerOptionImpl.kt | 23 - .../impl/NotOrAtMostCheckerOptionImpl.kt | 31 - .../builders/impl/nameContainsNotFun.kt | 11 - .../contains/builders/AtLeastCheckerOption.kt | 18 - .../contains/builders/AtMostCheckerOption.kt | 18 - .../builders/ButAtMostCheckerOption.kt | 18 - .../contains/builders/ExactlyCheckerOption.kt | 18 - .../contains/builders/NotCheckerOption.kt | 17 - .../builders/NotOrAtMostCheckerOption.kt | 18 - .../builders/impl/AtLeastCheckerOptionImpl.kt | 31 - .../builders/impl/AtMostCheckerOptionImpl.kt | 35 - .../impl/ButAtMostCheckerOptionImpl.kt | 41 - .../builders/impl/ExactlyCheckerOptionImpl.kt | 31 - .../builders/impl/NotCheckerOptionImpl.kt | 24 - .../impl/NotOrAtMostCheckerOptionImpl.kt | 31 - .../builders/impl/nameContainsNotFun.kt | 11 - .../atrium/api/cc/de_CH/featureAssertions.kt | 677 ----------- .../api/cc/de_CH/floatingPointAssertions.kt | 47 - .../atrium/api/cc/de_CH/iterableAssertions.kt | 186 --- .../api/cc/de_CH/iterableContainsCheckers.kt | 95 -- .../cc/de_CH/iterableContainsDecorators.kt | 72 -- .../iterableContainsInAnyOrderCreators.kt | 110 -- .../iterableContainsInAnyOrderOnlyCreators.kt | 108 -- .../iterableContainsInOrderOnlyCreators.kt | 85 -- ...rableContainsInOrderOnlyGroupedCreators.kt | 72 -- .../atrium/api/cc/de_CH/listAssertions.kt | 48 - .../atrium/api/cc/de_CH/mapAssertions.kt | 221 ---- .../atrium/api/cc/de_CH/mapEntryAssertions.kt | 105 -- .../atrium/api/cc/de_CH/pairAssertions.kt | 90 -- .../atrium/api/cc/de_CH/parameterObjects.kt | 87 -- .../atrium/api/cc/de_CH/sequenceAssertions.kt | 20 - .../api/cc/de_CH/throwableAssertions.kt | 83 -- .../cc/de_CH/typeTransformationAssertions.kt | 57 - .../atrium-api-cc-de_CH-js/build.gradle | 8 - .../atrium-api-cc-de_CH-jvm/build.gradle | 30 - .../de_CH/CharSequenceContainsSearchersKt.kt | 104 -- .../api/cc/de_CH/anyDeprecatedAssertions.kt | 28 - ...arSequenceContainsAtLeastCheckerBuilder.kt | 33 - ...harSequenceContainsAtMostCheckerBuilder.kt | 32 - ...SequenceContainsButAtMostCheckerBuilder.kt | 33 - ...arSequenceContainsExactlyCheckerBuilder.kt | 32 - .../CharSequenceContainsNotCheckerBuilder.kt | 30 - ...quenceContainsNotOrAtMostCheckerBuilder.kt | 32 - .../IterableContainsAtLeastCheckerBuilder.kt | 32 - .../IterableContainsAtMostCheckerBuilder.kt | 32 - ...IterableContainsButAtMostCheckerBuilder.kt | 33 - .../IterableContainsExactlyCheckerBuilder.kt | 32 - .../IterableContainsNotCheckerBuilder.kt | 31 - ...erableContainsNotOrAtMostCheckerBuilder.kt | 32 - .../api/cc/de_CH/bigDecimalAssertions.kt | 110 -- .../cc/de_CH/booleanDeprecatedAssertions.kt | 30 - .../de_CH/charSequenceDeprecatedAssertions.kt | 67 -- .../charSequenceDeprecatedContainsCheckers.kt | 36 - .../charSequenceDeprecatedContainsCreators.kt | 72 -- ...harSequenceDeprecatedContainsDecorators.kt | 20 - .../cc/de_CH/deprecatedParameterObjects.kt | 43 - .../cc/de_CH/floatingPointJvmAssertions.kt | 29 - .../cc/de_CH/iterableDeprecatedAssertions.kt | 122 -- .../iterableDeprecatedContainsCheckers.kt | 33 - .../iterableDeprecatedContainsDecorators.kt | 23 - ...bleDeprecatedContainsInAnyOrderCreators.kt | 79 -- ...eprecatedContainsInAnyOrderOnlyCreators.kt | 80 -- ...leDeprecatedContainsInOrderOnlyCreators.kt | 78 -- ...catedContainsInOrderOnlyGroupedCreators.kt | 61 - .../cc/de_CH/throwableDeprecatedAssertions.kt | 22 - .../typeTransformationDeprecatedAssertions.kt | 23 - .../atrium-api-cc-en_GB-common/build.gradle | 5 - .../atrium/api/cc/en_GB/anyAssertions.kt | 169 --- .../atrium/api/cc/en_GB/arrayAssertions.kt | 400 ------- .../api/cc/en_GB/charSequenceAssertions.kt | 270 ----- .../cc/en_GB/charSequenceContainsCheckers.kt | 122 -- .../cc/en_GB/charSequenceContainsCreators.kt | 326 ------ .../charSequenceContainsSearchBehaviours.kt | 42 - .../api/cc/en_GB/collectionAssertions.kt | 105 -- .../api/cc/en_GB/comparableAssertions.kt | 80 -- .../contains/builders/AtLeastCheckerOption.kt | 18 - .../contains/builders/AtMostCheckerOption.kt | 17 - .../builders/ButAtMostCheckerOption.kt | 17 - .../contains/builders/ExactlyCheckerOption.kt | 17 - .../contains/builders/NotCheckerOption.kt | 17 - .../builders/NotOrAtMostCheckerOption.kt | 17 - .../builders/impl/AtLeastCheckerOptionImpl.kt | 30 - .../builders/impl/AtMostCheckerOptionImpl.kt | 34 - .../impl/ButAtMostCheckerOptionImpl.kt | 40 - .../builders/impl/ExactlyCheckerOptionImpl.kt | 30 - .../builders/impl/NotCheckerOptionImpl.kt | 22 - .../impl/NotOrAtMostCheckerOptionImpl.kt | 30 - .../builders/impl/nameContainsNotFun.kt | 11 - .../contains/builders/AtLeastCheckerOption.kt | 18 - .../contains/builders/AtMostCheckerOption.kt | 18 - .../builders/ButAtMostCheckerOption.kt | 17 - .../contains/builders/ExactlyCheckerOption.kt | 18 - .../contains/builders/NotCheckerOption.kt | 17 - .../builders/NotOrAtMostCheckerOption.kt | 18 - .../builders/impl/AtLeastCheckerOptionImpl.kt | 30 - .../builders/impl/AtMostCheckerOptionImpl.kt | 34 - .../impl/ButAtMostCheckerOptionImpl.kt | 40 - .../builders/impl/ExactlyCheckerOptionImpl.kt | 30 - .../builders/impl/NotCheckerOptionImpl.kt | 23 - .../impl/NotOrAtMostCheckerOptionImpl.kt | 30 - .../builders/impl/nameContainsNotFun.kt | 12 - .../atrium/api/cc/en_GB/featureAssertions.kt | 1017 ---------------- .../api/cc/en_GB/floatingPointAssertions.kt | 62 - .../atrium/api/cc/en_GB/iterableAssertions.kt | 315 ----- .../api/cc/en_GB/iterableContainsCheckers.kt | 121 -- .../iterableContainsInAnyOrderCreators.kt | 136 --- .../iterableContainsInAnyOrderOnlyCreators.kt | 137 --- .../iterableContainsInOrderOnlyCreators.kt | 113 -- ...rableContainsInOrderOnlyGroupedCreators.kt | 92 -- .../en_GB/iterableContainsSearchBehaviours.kt | 106 -- .../atrium/api/cc/en_GB/listAssertions.kt | 68 -- .../atrium/api/cc/en_GB/mapAssertions.kt | 340 ------ .../atrium/api/cc/en_GB/mapEntryAssertions.kt | 153 --- .../atrium/api/cc/en_GB/pairAssertions.kt | 132 --- .../atrium/api/cc/en_GB/parameterObjects.kt | 83 -- .../atrium/api/cc/en_GB/sequenceAssertions.kt | 26 - .../api/cc/en_GB/throwableAssertions.kt | 104 -- .../cc/en_GB/typeTransformationAssertions.kt | 71 -- .../atrium-api-cc-en_GB-js/build.gradle | 8 - .../atrium-api-cc-en_GB-jvm/build.gradle | 27 - .../api/cc/en_GB/anyDeprecatedAssertions.kt | 13 - .../api/cc/en_GB/bigDecimalAssertions.kt | 142 --- .../cc/en_GB/deprecatedParameterObjects.kt | 41 - .../cc/en_GB/floatingPointJvmAssertions.kt | 36 - ...bleContainsInAnyOrderDeprecatedCreators.kt | 28 - ...ontainsInAnyOrderOnlyDeprecatedCreators.kt | 30 - ...leContainsInOrderOnlyDeprecatedCreators.kt | 30 - .../cc/en_GB/iterableDeprecatedAssertions.kt | 80 -- ...catedContainsInOrderOnlyGroupedCreators.kt | 60 - .../typeTransformationDeprecatedAssertions.kt | 31 - .../src/module/module-info.java | 9 - .../build.gradle | 5 - .../api/cc/infix/en_GB/anyAssertions.kt | 202 ---- .../api/cc/infix/en_GB/arrayAssertions.kt | 429 ------- .../cc/infix/en_GB/charSequenceAssertions.kt | 363 ------ .../en_GB/charSequenceContainsCheckers.kt | 121 -- .../en_GB/charSequenceContainsCreators.kt | 384 ------ .../charSequenceContainsSearchBehaviours.kt | 44 - .../cc/infix/en_GB/collectionAssertions.kt | 112 -- .../cc/infix/en_GB/comparableAssertions.kt | 81 -- .../contains/builders/AtLeastCheckerOption.kt | 18 - .../contains/builders/AtMostCheckerOption.kt | 17 - .../builders/ButAtMostCheckerOption.kt | 17 - .../contains/builders/ExactlyCheckerOption.kt | 18 - .../contains/builders/NotCheckerOption.kt | 17 - .../builders/NotOrAtMostCheckerOption.kt | 17 - .../builders/impl/AtLeastCheckerOptionImpl.kt | 30 - .../builders/impl/AtMostCheckerOptionImpl.kt | 34 - .../impl/ButAtMostCheckerOptionImpl.kt | 40 - .../builders/impl/ExactlyCheckerOptionImpl.kt | 30 - .../builders/impl/NotCheckerOptionImpl.kt | 22 - .../impl/NotOrAtMostCheckerOptionImpl.kt | 30 - .../builders/impl/nameContainsNotFun.kt | 13 - .../contains/builders/AtLeastCheckerOption.kt | 18 - .../contains/builders/AtMostCheckerOption.kt | 18 - .../builders/ButAtMostCheckerOption.kt | 18 - .../contains/builders/ExactlyCheckerOption.kt | 18 - .../contains/builders/NotCheckerOption.kt | 17 - .../builders/NotOrAtMostCheckerOption.kt | 18 - .../builders/impl/AtLeastCheckerOptionImpl.kt | 30 - .../builders/impl/AtMostCheckerOptionImpl.kt | 34 - .../impl/ButAtMostCheckerOptionImpl.kt | 40 - .../builders/impl/ExactlyCheckerOptionImpl.kt | 30 - .../builders/impl/NotCheckerOptionImpl.kt | 23 - .../impl/NotOrAtMostCheckerOptionImpl.kt | 30 - .../builders/impl/nameContainsNotFun.kt | 13 - .../get/builders/ListGetNullableOption.kt | 51 - .../list/get/builders/ListGetOption.kt | 47 - .../impl/ListGetNullableOptionImpl.kt | 19 - .../get/builders/impl/ListGetOptionImpl.kt | 18 - .../map/get/builders/MapGetNullableOption.kt | 52 - .../creating/map/get/builders/MapGetOption.kt | 51 - .../builders/impl/MapGetNullableOptionImpl.kt | 19 - .../map/get/builders/impl/MapGetOptionImpl.kt | 18 - .../api/cc/infix/en_GB/featureAssertions.kt | 1041 ----------------- .../api/cc/infix/en_GB/iterableAssertions.kt | 375 ------ .../infix/en_GB/iterableContainsCheckers.kt | 121 -- .../iterableContainsInAnyOrderCreators.kt | 129 -- .../iterableContainsInAnyOrderOnlyCreators.kt | 124 -- .../iterableContainsInOrderOnlyCreators.kt | 105 -- ...rableContainsInOrderOnlyGroupedCreators.kt | 79 -- .../en_GB/iterableContainsSearchBehaviours.kt | 117 -- .../api/cc/infix/en_GB/keywords/keywords.kt | 59 - .../api/cc/infix/en_GB/listAssertions.kt | 91 -- .../api/cc/infix/en_GB/mapAssertions.kt | 389 ------ .../api/cc/infix/en_GB/mapEntryAssertions.kt | 157 --- .../api/cc/infix/en_GB/pairAssertions.kt | 134 --- .../api/cc/infix/en_GB/parameterObjects.kt | 166 --- .../api/cc/infix/en_GB/sequenceAssertions.kt | 27 - .../api/cc/infix/en_GB/throwableAssertions.kt | 134 --- .../en_GB/typeTransformationAssertions.kt | 76 -- .../atrium-api-cc-infix-en_GB-js/build.gradle | 6 - .../build.gradle | 25 - .../cc/infix/en_GB/anyDeprecatedAssertions.kt | 13 - .../cc/infix/en_GB/bigDecimalAssertions.kt | 105 -- .../infix/en_GB/deprecatedParameterObjects.kt | 41 - ...bleContainsInAnyOrderDeprecatedCreators.kt | 27 - ...ontainsInAnyOrderOnlyDeprecatedCreators.kt | 26 - ...leContainsInOrderOnlyDeprecatedCreators.kt | 27 - ...insInOrderOnlyGroupedDeprecatedCreators.kt | 31 - .../en_GB/iterableDeprecatedAssertions.kt | 96 -- .../typeTransformationDeprecatedAssertions.kt | 32 - .../src/module/module-info.java | 11 - .../build.gradle | 9 - .../build.gradle | 26 - .../en_GB/jdk8/chronoLocalDateAssertions.kt | 94 -- .../jdk8/chronoLocalDateTimeAssertions.kt | 97 -- .../jdk8/chronoZonedDateTimeAssertions.kt | 98 -- .../api/fluent/en_GB/jdk8/fileAssertions.kt | 50 - .../fluent/en_GB/jdk8/localDateAssertions.kt | 145 --- .../en_GB/jdk8/localDateTimeAssertions.kt | 145 --- .../fluent/en_GB/jdk8/optionalAssertions.kt | 63 - .../api/fluent/en_GB/jdk8/pathAssertions.kt | 412 ------- .../en_GB/jdk8/zonedDateTimeAssertions.kt | 144 --- .../src/module/module-info.java | 10 - .../jdk8/ChronoLocalDateAssertionsSpec.kt | 73 -- .../jdk8/ChronoLocalDateTimeAssertionSpec.kt | 92 -- .../jdk8/ChronoZonedDateTimeAssertionSpec.kt | 93 -- .../en_GB/jdk8/FileAsPathAssertionsSpec.kt | 20 - .../en_GB/jdk8/LocalDateAssertionsSpec.kt | 40 - .../en_GB/jdk8/LocalDateTimeAssertionsSpec.kt | 39 - .../en_GB/jdk8/OptionalAssertionsSpec.kt | 35 - .../fluent/en_GB/jdk8/PathAssertionsSpec.kt | 62 - .../en_GB/jdk8/PathFeatureAssertionsSpec.kt | 41 - .../en_GB/jdk8/ZonedDateTimeAssertionsSpec.kt | 39 - .../deprecated/atrium-assertions/build.gradle | 12 - .../AnyTypeTransformation.kt | 57 - .../any/typetransformation/DownCaster.kt | 64 - ...anatoryTypeTransformationFailureHandler.kt | 66 -- .../any/typetransformation/TypeTransformer.kt | 55 - .../atrium/assertions/anyAssertions.kt | 53 - .../contains/builders/containsValidators.kt | 39 - .../contains/checkers/ContainsChecker.kt | 52 - .../creators/ContainsAssertionCreator.kt | 79 -- .../ContainsObjectsAssertionCreator.kt | 72 -- .../atrium/assertions/bigDecimalAssertions.kt | 45 - .../assertions/charSequenceAssertions.kt | 80 -- ...quenceContainsAtLeastCheckerBuilderBase.kt | 39 - ...equenceContainsAtMostCheckerBuilderBase.kt | 51 - ...enceContainsButAtMostCheckerBuilderBase.kt | 54 - ...quenceContainsExactlyCheckerBuilderBase.kt | 39 - ...arSequenceContainsNotCheckerBuilderBase.kt | 27 - ...ceContainsNotOrAtMostCheckerBuilderBase.kt | 40 - .../CharSequenceContainsAtLeastChecker.kt | 26 - .../CharSequenceContainsAtMostChecker.kt | 26 - .../checkers/CharSequenceContainsChecker.kt | 25 - .../CharSequenceContainsExactlyChecker.kt | 26 - .../CharSequenceContainsNotChecker.kt | 17 - .../CharSequenceContainsAssertionCreator.kt | 40 - .../contains/creators/creators.kt | 113 -- .../searchbehaviours/searchBehaviours.kt | 13 - ...quenceContainsIgnoringCaseIndexSearcher.kt | 17 - ...quenceContainsIgnoringCaseRegexSearcher.kt | 20 - .../CharSequenceContainsIndexSearcher.kt | 22 - .../CharSequenceContainsRegexSearcher.kt | 26 - .../atrium/assertions/collectionAssertions.kt | 34 - .../atrium/assertions/comparableAssertions.kt | 42 - .../atrium/assertions/featureAssertions.kt | 370 ------ .../assertions/floatingPointAssertions.kt | 34 - ...erableContainsAtLeastCheckerBuilderBase.kt | 39 - ...terableContainsAtMostCheckerBuilderBase.kt | 51 - ...ableContainsButAtMostCheckerBuilderBase.kt | 54 - ...erableContainsExactlyCheckerBuilderBase.kt | 40 - .../IterableContainsNotCheckerBuilderBase.kt | 28 - ...leContainsNotOrAtMostCheckerBuilderBase.kt | 37 - .../IterableContainsAtLeastChecker.kt | 25 - .../checkers/IterableContainsAtMostChecker.kt | 25 - .../checkers/IterableContainsChecker.kt | 23 - .../IterableContainsExactlyChecker.kt | 26 - .../checkers/IterableContainsNotChecker.kt | 17 - ...ntainsInAnyOrderEntriesAssertionCreator.kt | 85 -- ...ntainsInAnyOrderObjectsAssertionCreator.kt | 37 - ...eContainsInAnyOrderOnlyAssertionCreator.kt | 118 -- ...nsInAnyOrderOnlyEntriesAssertionCreator.kt | 45 - ...nsInAnyOrderOnlyObjectsAssertionCreator.kt | 33 - ...ableContainsInOrderOnlyAssertionCreator.kt | 120 -- ...tainsInOrderOnlyEntriesAssertionCreator.kt | 39 - ...tainsInOrderOnlyObjectsAssertionCreator.kt | 37 - .../contains/creators/containsEntriesFun.kt | 65 - .../iterable/contains/creators/creators.kt | 166 --- .../searchbehaviours/searchBehaviours.kt | 40 - .../atrium/assertions/iterableAssertions.kt | 24 - .../ThrowableThrownAssertionCreator.kt | 64 - ...latableAsAbsentThrowableMessageProvider.kt | 15 - .../atrium/assertions/throwableAssertions.kt | 20 - .../typeTransformationAssertions.kt | 75 -- misc/deprecated/atrium-spec/build.gradle | 24 - .../ch/tutteli/atrium/spec/AssertionVerb.kt | 26 - .../atrium/spec/AssertionVerbFactory.kt | 20 - .../tutteli/atrium/spec/SpecBodyExtensions.kt | 51 - .../ch/tutteli/atrium/spec/SpekExtensions.kt | 59 - .../creating/CheckingAssertionPlantSpec.kt | 100 -- .../creating/CollectingAssertionPlantSpec.kt | 73 -- .../creating/ReportingAssertionPlantSpec.kt | 145 --- .../spec/integration/AnyAssertionsSpec.kt | 319 ----- .../ArrayAsIterableAssertionsSpec.kt | 192 --- .../integration/BigDecimalAssertionsSpec.kt | 243 ---- .../spec/integration/BooleanAssertionsSpec.kt | 68 -- .../integration/CharSequenceAssertionsSpec.kt | 264 ----- ...arSequenceContainsAtLeastAssertionsSpec.kt | 326 ------ ...harSequenceContainsAtMostAssertionsSpec.kt | 225 ---- ...quenceContainsContainsNotAssertionsSpec.kt | 205 ---- ...ontainsDefaultTranslationAssertionsSpec.kt | 100 -- ...arSequenceContainsExactlyAssertionsSpec.kt | 225 ---- .../CharSequenceContainsNotAssertionsSpec.kt | 153 --- ...quenceContainsNotOrAtMostAssertionsSpec.kt | 192 --- ...CharSequenceContainsRegexAssertionsSpec.kt | 218 ---- .../CharSequenceContainsSpecBase.kt | 29 - .../spec/integration/CheckingAssertionSpec.kt | 44 - .../integration/CollectionAssertionsSpec.kt | 100 -- .../CollectionFeatureAssertionsSpec.kt | 80 -- .../integration/ComparableAssertionsSpec.kt | 112 -- ...BoundedReferenceWhenCollectingPlantSpec.kt | 78 -- .../spec/integration/FeatureAssertionsSpec.kt | 167 --- ...ngPointWithErrorToleranceAssertionsSpec.kt | 118 -- .../integration/IterableAllAssertionsSpec.kt | 145 --- .../integration/IterableAnyAssertionsSpec.kt | 161 --- .../IterableContainsEntriesSpecBase.kt | 62 - ...InAnyOrderAtLeast1EntriesAssertionsSpec.kt | 230 ---- ...sInAnyOrderAtLeast1ValuesAssertionsSpec.kt | 164 --- ...insInAnyOrderAtLeastValuesAssertionSpec.kt | 240 ---- ...ainsInAnyOrderAtMostValuesAssertionSpec.kt | 176 --- ...nsInAnyOrderExactlyValuesAssertionsSpec.kt | 186 --- ...AnyOrderNotOrAtMostValuesAssertionsSpec.kt | 172 --- ...ainsInAnyOrderOnlyEntriesAssertionsSpec.kt | 368 ------ ...tainsInAnyOrderOnlyValuesAssertionsSpec.kt | 256 ---- ...ontainsInOrderOnlyEntriesAssertionsSpec.kt | 337 ------ ...InOrderOnlyGroupedEntriesAssertionsSpec.kt | 468 -------- ...sInOrderOnlyGroupedValuesAssertionsSpec.kt | 388 ------ ...ContainsInOrderOnlyValuesAssertionsSpec.kt | 247 ---- ...terableContainsNotEntriesAssertionsSpec.kt | 213 ---- ...IterableContainsNotValuesAssertionsSpec.kt | 220 ---- .../integration/IterableContainsSpecBase.kt | 69 -- .../integration/IterableNoneAssertionsSpec.kt | 146 --- .../integration/IterablePredicateSpecBase.kt | 33 - .../KeyValueLikeFeatureAssertionsSpec.kt | 209 ---- .../integration/ListFeatureAssertionsSpec.kt | 143 --- .../integration/MapAsEntriesAssertionsSpec.kt | 48 - .../spec/integration/MapAssertionsSpec.kt | 391 ------- .../integration/MapEntryAssertionsSpec.kt | 74 -- .../MapEntryFeatureAssertionsSpec.kt | 33 - .../integration/MapFeatureAssertionsSpec.kt | 228 ---- .../integration/PairFeatureAssertionsSpec.kt | 33 - .../atrium/spec/integration/SimpleMapEntry.kt | 13 - .../integration/SubjectLessAssertionSpec.kt | 52 - .../integration/ThrowableAssertionsSpec.kt | 283 ----- .../TypeTransformationAssertionsSpec.kt | 286 ----- .../integration/iterableAbsentSubjectTest.kt | 69 -- .../ch/tutteli/atrium/spec/verbs/VerbSpec.kt | 196 ---- .../atrium-cc-en_UK-robstoll/build.gradle | 22 - .../src/test/kotlin/SmokeSpec.kt | 42 - .../build.gradle | 22 - .../src/test/kotlin/SmokeSpec.kt | 45 - .../build.gradle | 14 - .../src/test/kotlin/SmokeTest.kt | 78 -- .../atrium-cc-de_CH-robstoll-js/build.gradle | 15 - .../atrium/cc/de_CH/robstoll/dependOnMe.kt | 17 - .../src/test/kotlin/testSetup.kt | 4 - .../atrium-cc-de_CH-robstoll-jvm/build.gradle | 26 - .../build.gradle | 16 - .../src/test/kotlin/SmokeTest.kt | 118 -- .../atrium-cc-en_GB-robstoll-js/build.gradle | 17 - .../atrium/cc/en_GB/robstoll/dependOnMe.kt | 17 - .../src/test/kotlin/testSetup.kt | 4 - .../atrium-cc-en_GB-robstoll-jvm/build.gradle | 21 - .../src/module/module-info.java | 7 - .../src/test/kotlin/custom/SmokeSpec.kt | 44 - .../src/test/kotlin/module-info.java | 9 - .../build.gradle | 16 - .../src/test/kotlin/SmokeTest.kt | 69 -- .../build.gradle | 17 - .../cc/infix/en_GB/robstoll/dependOnMe.kt | 17 - .../src/test/kotlin/testSetup.kt | 4 - .../build.gradle | 21 - .../src/module/module-info.java | 7 - .../src/test/kotlin/custom/SmokeSpec.kt | 46 - .../src/test/kotlin/module-info.java | 9 - .../atrium-core-api-deprecated/build.gradle | 5 - .../ch/tutteli/atrium/IAtriumFactory.kt | 573 --------- .../build.gradle | 7 - .../kotlin/ch/tutteli/atrium/AtriumFactory.kt | 161 --- .../assertions/composers/AssertionComposer.kt | 45 - .../atrium/domain/creating/AnyAssertions.kt | 88 -- .../domain/creating/CharSequenceAssertions.kt | 45 - .../domain/creating/CollectionAssertions.kt | 44 - .../domain/creating/ComparableAssertions.kt | 46 - .../domain/creating/FeatureAssertions.kt | 66 -- .../creating/FloatingPointAssertions.kt | 37 - .../atrium/domain/creating/Fun0Assertions.kt | 36 - .../domain/creating/IterableAssertions.kt | 50 - .../domain/creating/IteratorAssertions.kt | 29 - .../atrium/domain/creating/ListAssertions.kt | 57 - .../atrium/domain/creating/MapAssertions.kt | 91 -- .../domain/creating/MapEntryAssertions.kt | 60 - .../domain/creating/NewFeatureAssertions.kt | 37 - .../atrium/domain/creating/PairAssertions.kt | 52 - .../domain/creating/ThrowableAssertions.kt | 70 -- .../AnyTypeTransformation.kt | 101 -- .../AnyTypeTransformationAssertions.kt | 62 - .../failurehandlers/FailureHandlerFactory.kt | 50 - .../creating/basic/contains/Contains.kt | 115 -- .../changers/ChangedSubjectPostStep.kt | 32 - .../changers/ExtractedFeaturePostStep.kt | 33 - .../creating/changers/FeatureExtractor.kt | 69 -- .../domain/creating/changers/PostFinalStep.kt | 68 -- .../creating/changers/SubjectChanger.kt | 178 --- .../contains/CharSequenceContains.kt | 86 -- .../contains/checkers/CheckerFactory.kt | 80 -- .../CharSequenceContainsAssertions.kt | 63 - .../IgnoringCaseSearchBehaviour.kt | 13 - .../searchbehaviours/NoOpSearchBehaviour.kt | 22 - .../searchbehaviours/NotSearchBehaviour.kt | 13 - .../SearchBehaviourFactory.kt | 28 - .../creating/collectors/AssertionCollector.kt | 278 ----- .../AssertionCollectorForExplanation.kt | 137 --- .../feature/extract/FeatureExtractor.kt | 174 --- .../FeatureExtractorCreatorFactory.kt | 53 - .../feature/extract/impl/deprecatedImpl.kt | 17 - .../iterable/contains/IterableContains.kt | 58 - .../contains/checkers/CheckerFactory.kt | 74 -- .../creators/IterableContainsAssertions.kt | 96 -- .../InAnyOrderOnlySearchBehaviour.kt | 9 - .../InAnyOrderSearchBehaviour.kt | 8 - .../InOrderOnlyGroupedSearchBehaviour.kt | 10 - ...InOrderOnlyGroupedWithinSearchBehaviour.kt | 7 - .../InOrderOnlySearchBehaviour.kt | 9 - .../InOrderSearchBehaviour.kt | 8 - .../searchbehaviours/NoOpSearchBehaviour.kt | 18 - .../searchbehaviours/NotSearchBehaviour.kt | 6 - .../SearchBehaviourFactory.kt | 43 - .../throwable/thrown/ThrowableThrown.kt | 88 -- .../creators/ThrowableThrownAssertions.kt | 35 - .../AbsentThrowableMessageProviderFactory.kt | 27 - .../typeutils/CharSequenceOrNumberOrChar.kt | 11 - .../domain/creating/typeutils/IterableLike.kt | 11 - .../creating/FloatingPointAssertions.kt | 11 - .../domain/creating/BigDecimalAssertions.kt | 41 - .../creating/ChronoLocalDateAssertions.kt | 35 - .../creating/ChronoLocalDateTimeAssertions.kt | 55 - .../creating/ChronoZonedDateTimeAssertions.kt | 55 - .../creating/FloatingPointAssertions.kt | 27 - .../domain/creating/LocalDateAssertions.kt | 41 - .../creating/LocalDateTimeAssertions.kt | 41 - .../domain/creating/OptionalAssertions.kt | 33 - .../atrium/domain/creating/PathAssertions.kt | 53 - .../creating/ZonedDateTimeAssertions.kt | 41 - .../src/module/module-info.java | 20 - .../build.gradle | 9 - .../kotlin_1_3/creating/ResultAssertions.kt | 34 - .../build.gradle | 9 - .../build.gradle | 9 - .../src/module/module-info.java | 7 - .../atrium-domain-api-deprecated/build.gradle | 8 - .../assertions/basic/contains/Contains.kt | 35 - .../contains/builders/ContainsBuilder.kt | 34 - .../builders/ContainsCheckerBuilder.kt | 30 - .../contains/CharSequenceContains.kt | 70 -- .../builders/CharSequenceContainsBuilder.kt | 34 - .../CharSequenceContainsCheckerBuilder.kt | 26 - ...enceContainsIgnoringCaseSearchBehaviour.kt | 29 - ...CharSequenceContainsNoOpSearchBehaviour.kt | 20 - .../CharSequenceContainsNotSearchBehaviour.kt | 26 - .../iterable/contains/IterableContains.kt | 53 - .../builders/IterableContainsBuilder.kt | 33 - .../IterableContainsCheckerBuilder.kt | 26 - .../IterableContainsNoOpCheckerBuilder.kt | 25 - ...leContainsInAnyOrderOnlySearchBehaviour.kt | 25 - ...erableContainsInAnyOrderSearchBehaviour.kt | 24 - ...rableContainsInOrderOnlySearchBehaviour.kt | 25 - .../IterableContainsInOrderSearchBehaviour.kt | 24 - .../IterableContainsNoOpSearchBehaviour.kt | 20 - .../IterableContainsNotSearchBehaviour.kt | 22 - .../throwable/thrown/ThrowableThrown.kt | 70 -- .../thrown/builders/ThrowableThrownBuilder.kt | 38 - .../atrium/reporting/ReporterBuilder.kt | 263 ----- .../atrium/domain/builders/AssertImpl.kt | 235 ---- .../atrium/domain/builders/ExpectImpl.kt | 166 --- .../creating/CollectionAssertionsBuilder.kt | 45 - .../creating/ComparableAssertionsBuilder.kt | 44 - .../creating/FeatureAssertionsBuilder.kt | 893 -------------- .../FloatingPointAssertionsBuilder.kt | 15 - .../creating/Fun0AssertionsBuilder.kt | 27 - .../creating/IteratorAssertionsBuilder.kt | 25 - .../creating/ListAssertionsBuilder.kt | 54 - .../builders/creating/MapAssertionsBuilder.kt | 122 -- .../creating/MapEntryAssertionsBuilder.kt | 70 -- .../creating/NewFeatureAssertionsBuilder.kt | 153 +-- .../creating/PairAssertionsBuilder.kt | 55 - .../creating/PleaseUseReplacementException.kt | 1 + .../creating/anyAssertionsBuilders.kt | 157 --- .../basic/contains/CheckOptionExtension.kt | 84 -- .../changers/FeatureExtractorBuilder.kt | 388 ------ .../changers/SubjectChangerBuilder.kt | 326 ------ .../featureextractor/OptionsChooserImpl.kt | 23 - .../impl/featureextractor/defaultImpls.kt | 86 -- .../DefaultFailureHandlerImpl.kt | 34 - .../impl/subjectchanger/defaultImpls.kt | 92 -- .../charSequenceAssertionsBuilders.kt | 135 --- .../builders/AtLeastCheckerOptionBase.kt | 40 - .../builders/AtMostCheckerOptionBase.kt | 55 - .../builders/ButAtMostCheckerOptionBase.kt | 61 - .../builders/ExactlyCheckerOptionBase.kt | 40 - .../contains/builders/NotCheckerOptionBase.kt | 29 - .../builders/NotOrAtMostCheckerOptionBase.kt | 40 - .../builders/WithTimesCheckerOption.kt | 16 - .../collectors/AssertionCollectorBuilder.kt | 90 -- .../AssertionOptionExplantoryExtensions.kt | 9 - .../builders/AtLeastCheckerOptionBase.kt | 40 - .../builders/AtMostCheckerOptionBase.kt | 55 - .../builders/ButAtMostCheckerOptionBase.kt | 61 - .../builders/ExactlyCheckerOptionBase.kt | 40 - .../contains/builders/NotCheckerOptionBase.kt | 29 - .../builders/NotOrAtMostCheckerOptionBase.kt | 37 - .../builders/WithTimesCheckerOption.kt | 16 - .../creating/iterableAssertionsBuilders.kt | 180 --- .../creating/throwableAssertionsBuilders.kt | 101 -- .../builders/migration/assertToExpect.kt | 107 -- .../domain/builders/utils/VarArgHelper.kt | 39 - .../domain/builders/utils/mapArguments.kt | 40 - .../atrium/domain/builders/utils/subAssert.kt | 43 - .../domain/builders/utils/MapArgumentsSpec.kt | 262 ----- .../atrium-domain-builders-js/build.gradle | 1 - .../FloatingPointAssertionsBuilder.kt | 30 - .../atrium-domain-builders-jvm/build.gradle | 6 - .../atrium/domain/builders/AssertImpl.kt | 13 - .../atrium/domain/builders/ExpectImpl.kt | 73 -- .../creating/BigDecimalAssertionsBuilder.kt | 39 - .../ChronoLocalDateAssertionsBuilder.kt | 39 - .../ChronoLocalDateTimeAssertionsBuilder.kt | 50 - .../ChronoZonedDateTimeAssertionsBuilder.kt | 50 - .../FloatingPointAssertionsBuilder.kt | 42 - .../creating/LocalDateAssertionsBuilder.kt | 35 - .../LocalDateTimeAssertionsBuilder.kt | 35 - .../creating/OptionalAssertionsBuilder.kt | 31 - .../creating/PathAssertionsBuilder.kt | 75 -- .../ZonedDateTimeAssertionsBuilder.kt | 35 - .../src/module/module-info.java | 6 - ...AssertionsBuilderNameRepresentationSpec.kt | 106 -- .../FeatureAssertionsBuilderNameSpec.kt | 108 -- .../domain/builders/utils/NullableSpec.kt | 165 --- .../build.gradle | 12 - .../kotlin_1_3/ExpectImplExtensions.kt | 14 - .../creating/ResultAssertionsBuilder.kt | 26 - .../build.gradle | 12 - .../build.gradle | 21 - .../src/module/module-info.java | 10 - .../build.gradle | 5 - .../LazyThreadUnsafeAssertionGroup.kt | 25 - .../LazyThreadUnsafeBasicAssertion.kt | 20 - .../composers/descriptiveWithFailureHint.kt | 31 - .../creators/DownCastAssertionCreator.kt | 67 -- .../TypeTransformationAssertionCreator.kt | 34 - .../creators/deprecatedCreators.kt | 58 - .../ExplanatoryFailureHandler.kt | 16 - .../ExplanatoryFailureHandlerBase.kt | 39 - .../ExplanatoryFailureHandlerWithHint.kt | 29 - .../ThrowableThrownFailureHandler.kt | 62 - .../robstoll/lib/creating/anyAssertions.kt | 70 -- .../lib/creating/anyAssertionsDeprecated.kt | 50 - .../contains/builders/ContainsBuilder.kt | 9 - .../contains/checkers/ContainsChecker.kt | 49 - .../creators/ContainsAssertionCreator.kt | 84 -- .../ContainsObjectsAssertionCreator.kt | 80 -- .../lib/creating/changers/changeSubject.kt | 59 - .../lib/creating/changers/extractFeature.kt | 70 -- .../lib/creating/charSequenceAssertions.kt | 69 -- .../builders/CharSequenceContainsBuilder.kt | 14 - .../contains/checkers/AtLeastChecker.kt | 28 - .../contains/checkers/AtMostChecker.kt | 28 - .../charsequence/contains/checkers/Checker.kt | 27 - .../contains/checkers/ExactlyChecker.kt | 28 - .../contains/checkers/NotChecker.kt | 19 - .../CharSequenceContainsAssertionCreator.kt | 60 - .../contains/creators/creators.kt | 98 -- .../IgnoringCaseSearchBehaviourImpl.kt | 26 - .../NoOpSearchBehaviourImpl.kt | 15 - .../NotSearchBehaviourImpl.kt | 23 - .../searchbehaviours/searchBehaviours.kt | 16 - .../searchers/IgnoringCaseIndexSearcher.kt | 19 - .../searchers/IgnoringCaseRegexSearcher.kt | 19 - .../contains/searchers/IndexSearcher.kt | 24 - .../contains/searchers/RegexSearcher.kt | 25 - .../lib/creating/collectionAssertions.kt | 29 - .../collectionAssertionsDeprecated.kt | 21 - .../AssertionCollectorForExplanationImpl.kt | 62 - .../collectors/collectAssertionsDeprecated.kt | 23 - .../collectors/collectOrExplainDeprecated.kt | 30 - .../lib/creating/comparableAssertions.kt | 31 - .../creators/FeatureExtractorCreatorImpl.kt | 128 -- .../lib/creating/featureAssertions.kt | 21 - .../creating/featureAssertionsDeprecated.kt | 145 --- .../lib/creating/floatingPointAssertions.kt | 82 -- .../robstoll/lib/creating/fun0Assertions.kt | 77 -- .../builders/IterableContainsBuilder.kt | 9 - .../contains/builders/NoOpCheckerOption.kt | 24 - .../contains/checkers/AtLeastChecker.kt | 23 - .../contains/checkers/AtMostChecker.kt | 24 - .../iterable/contains/checkers/Checker.kt | 21 - .../contains/checkers/ExactlyChecker.kt | 24 - .../iterable/contains/checkers/NotChecker.kt | 15 - .../iterable/contains/containsHelperFun.kt | 133 --- .../InAnyOrderEntriesAssertionCreator.kt | 130 -- ...yOrderEntriesDeprecatedAssertionCreator.kt | 119 -- .../InAnyOrderOnlyAssertionCreator.kt | 127 -- .../InAnyOrderOnlyEntriesAssertionCreator.kt | 48 - ...erOnlyEntriesDeprecatedAssertionCreator.kt | 55 - .../InAnyOrderOnlyValuesAssertionCreator.kt | 33 - .../InAnyOrderValuesAssertionCreator.kt | 66 -- .../creators/InOrderOnlyAssertionCreator.kt | 39 - .../InOrderOnlyBaseAssertionCreator.kt | 46 - .../InOrderOnlyDeprecatedAssertionCreator.kt | 66 -- .../creators/InOrderOnlyDeprecatedMatcher.kt | 32 - .../InOrderOnlyEntriesAssertionCreator.kt | 24 - ...erOnlyEntriesDeprecatedAssertionCreator.kt | 29 - .../InOrderOnlyEntriesDeprecatedMatcher.kt | 25 - .../creators/InOrderOnlyEntriesMatcher.kt | 23 - .../InOrderOnlyGroupedAssertionCreator.kt | 61 - ...erOnlyGroupedDeprecatedAssertionCreator.kt | 78 -- ...OrderOnlyGroupedEntriesAssertionCreator.kt | 20 - ...roupedEntriesDeprecatedAssertionCreator.kt | 32 - ...nOrderOnlyGroupedValuesAssertionCreator.kt | 20 - .../contains/creators/InOrderOnlyMatcher.kt | 28 - .../creators/InOrderOnlyValueMatcher.kt | 18 - .../InOrderOnlyValuesAssertionCreator.kt | 24 - .../iterable/contains/creators/creators.kt | 92 -- .../contains/creators/creatorsDeprecated.kt | 72 -- .../creators/iterableMultiConsumable.kt | 29 - .../contains/deprecatedContainsHelperFun.kt | 120 -- .../InAnyOrderOnlySearchBehaviourImpl.kt | 11 - .../InAnyOrderSearchBehaviourImpl.kt | 11 - .../InOrderOnlyGroupedSearchBehaviourImpl.kt | 11 - ...derOnlyGroupedWithinSearchBehaviourImpl.kt | 11 - .../InOrderOnlySearchBehaviourImpl.kt | 11 - .../InOrderSearchBehaviourImpl.kt | 11 - .../NoOpSearchBehaviourImpl.kt | 5 - .../NotSearchBehaviourImpl.kt | 11 - .../searchbehaviours/searchBehaviours.kt | 35 - .../lib/creating/iterableAssertions.kt | 133 --- .../creating/iterableAssertionsDeprecated.kt | 85 -- .../lib/creating/iteratorAssertions.kt | 20 - .../robstoll/lib/creating/listAssertions.kt | 26 - .../lib/creating/listAssertionsDeprecated.kt | 61 - .../robstoll/lib/creating/mapAssertions.kt | 126 -- .../lib/creating/mapAssertionsDeprecated.kt | 157 --- .../lib/creating/mapEntryAssertions.kt | 29 - .../creating/mapEntryAssertionsDeprecated.kt | 38 - .../robstoll/lib/creating/pairAssertions.kt | 17 - .../lib/creating/pairAssertionsDeprecated.kt | 26 - .../thrown/builders/ThrowableThrownBuilder.kt | 31 - .../ThrowableThrownAssertionCreator.kt | 79 -- .../creators/ThrowableThrownFailureHandler.kt | 183 --- .../thrown/creators/creatorsDeprecated.kt | 31 - .../AbsentThrowableMessageProvider.kt | 17 - .../throwable/thrown/providers/providers.kt | 11 - .../lib/creating/throwableAssertions.kt | 33 - .../LazyThreadUnsafeAssertionGroupSpec.kt | 73 -- .../LazyThreadUnsafeBasicAssertionSpec.kt | 63 - .../CharSequenceContainsIndexSearcherSpec.kt | 18 - .../CharSequenceContainsRegexSearcherSpec.kt | 21 - .../build.gradle | 5 - .../thrown/creators/createAdditionalHints.kt | 7 - .../build.gradle | 4 - .../lib/creating/bigDecimalAssertions.kt | 69 -- .../lib/creating/chronoLocalDateAssertions.kt | 46 - .../creating/chronoLocalDateTimeAssertions.kt | 96 -- .../creating/chronoZonedDateTimeAssertions.kt | 57 - .../lib/creating/filesystem/IoResult.kt | 28 - .../filesystem/symbolicLinkResolving.kt | 106 -- .../creating/floatingPointJvmAssertions.kt | 29 - .../lib/creating/localDateAssertions.kt | 39 - .../lib/creating/localDateTimeAssertions.kt | 38 - .../lib/creating/optionalAssertions.kt | 34 - .../robstoll/lib/creating/pathAssertions.kt | 458 -------- .../thrown/creators/createAdditionalHints.kt | 25 - .../lib/creating/zonedDateTimeAssertions.kt | 37 - .../src/module/module-info.java | 22 - .../assertions/filesystem/IoResultSpec.kt | 43 - .../filesystem/SymbolicLinkResolvingSpec.kt | 288 ----- .../build.gradle | 17 - .../creating/resultAssertions.kt | 50 - .../build.gradle | 16 - .../build.gradle | 30 - .../src/module/module-info.java | 8 - .../composers/AssertionComposerImpl.kt | 20 - .../creating/AnyAssertionsDeprecatedImpl.kt | 40 - .../robstoll/creating/AnyAssertionsImpl.kt | 29 - .../creating/CharSequenceAssertionsImpl.kt | 41 - .../CollectionAssertionsDeprecatedImpl.kt | 21 - .../creating/CollectionAssertionsImpl.kt | 20 - .../creating/ComparableAssertionsImpl.kt | 31 - .../creating/FeatureAssertionsImpl.kt | 89 -- .../robstoll/creating/Fun0AssertionsImpl.kt | 20 - .../IterableAssertionsDeprecatedImpl.kt | 17 - .../creating/IterableAssertionsImpl.kt | 41 - .../creating/IteratorAssertionsImpl.kt | 16 - .../creating/ListAssertionsDeprecatedImpl.kt | 30 - .../robstoll/creating/ListAssertionsImpl.kt | 16 - .../creating/MapAssertionsDeprecatedImpl.kt | 55 - .../robstoll/creating/MapAssertionsImpl.kt | 42 - .../MapEntryAssertionsDeprecatedImpl.kt | 38 - .../creating/MapEntryAssertionsImpl.kt | 18 - .../creating/NewFeatureAssertionsImpl.kt | 15 - .../robstoll/creating/PairAssertionsImpl.kt | 41 - .../creating/ThrowableAssertionsImpl.kt | 33 - .../AnyTypeTransformationAssertionsImpl.kt | 56 - .../FailureHandlerFactoryImpl.kt | 22 - .../creating/changers/FeatureExtractoImpl.kt | 30 - .../creating/changers/SubjectChangerImpl.kt | 75 -- .../contains/checkers/CheckerFactoryImpl.kt | 35 - .../CharSequenceContainsAssertionsImpl.kt | 50 - .../SearchBehaviourFactoryImpl.kt | 18 - .../AssertionCollectorDeprecatedImpl.kt | 31 - .../collectors/AssertionCollectorImpl.kt | 5 +- .../assertionCollectorsForExplanation.kt | 41 - .../FeatureExtractorCreatorFactoryImpl.kt | 26 - .../contains/checkers/CheckerFactoryImpl.kt | 32 - ...terableContainsAssertionsDeprecatedImpl.kt | 40 - .../IterableContainsAssertionsImpl.kt | 55 - .../SearchBehaviourFactoryImpl.kt | 34 - .../creators/ThrowableThrownAssertionsImpl.kt | 25 - ...sentThrowableMessageProviderFactoryImpl.kt | 15 - .../creating/FloatingPointAssertionsImpl.kt | 24 - .../domain/robstoll/registerServices.kt | 31 - .../creating/BigDecimalAssertionsImpl.kt | 35 - .../creating/ChronoLocalDateAssertionsImpl.kt | 33 - .../ChronoLocalDateTimeAssertionsImpl.kt | 44 - .../ChronoZonedDateTimeAssertionsImpl.kt | 43 - .../creating/FloatingPointAssertionsImpl.kt | 36 - .../creating/LocalDateAssertionsImpl.kt | 27 - .../creating/LocalDateTimeAssertionsImpl.kt | 27 - .../creating/OptionalAssertionsImpl.kt | 22 - .../robstoll/creating/PathAssertionsImpl.kt | 52 - .../creating/ZonedDateTimeAssertionsImpl.kt | 27 - ...ain.assertions.composers.AssertionComposer | 1 - ...tteli.atrium.domain.creating.AnyAssertions | 1 - ...trium.domain.creating.BigDecimalAssertions | 1 - ...ium.domain.creating.CharSequenceAssertions | 1 - ....domain.creating.ChronoLocalDateAssertions | 1 - ...ain.creating.ChronoLocalDateTimeAssertions | 1 - ...ain.creating.ChronoZonedDateTimeAssertions | 1 - ...trium.domain.creating.CollectionAssertions | 1 - ...trium.domain.creating.ComparableAssertions | 1 - ...i.atrium.domain.creating.FeatureAssertions | 1 - ...um.domain.creating.FloatingPointAssertions | 1 - ...teli.atrium.domain.creating.Fun0Assertions | 1 - ....atrium.domain.creating.IterableAssertions | 1 - ....atrium.domain.creating.IteratorAssertions | 1 - ...teli.atrium.domain.creating.ListAssertions | 1 - ...atrium.domain.creating.LocalDateAssertions | 1 - ...um.domain.creating.LocalDateTimeAssertions | 1 - ...tteli.atrium.domain.creating.MapAssertions | 1 - ....atrium.domain.creating.MapEntryAssertions | 1 - ...trium.domain.creating.NewFeatureAssertions | 1 - ....atrium.domain.creating.OptionalAssertions | 1 - ...teli.atrium.domain.creating.PairAssertions | 1 - ...teli.atrium.domain.creating.PathAssertions | 1 - ...atrium.domain.creating.ThrowableAssertions | 1 - ...um.domain.creating.ZonedDateTimeAssertions | 1 - ...n.creators.AnyTypeTransformationAssertions | 1 - ...tion.failurehandlers.FailureHandlerFactory | 1 - ....domain.creating.changers.FeatureExtractor | 1 - ...um.domain.creating.changers.SubjectChanger | 1 - ...rsequence.contains.checkers.CheckerFactory | 1 - ...ns.creators.CharSequenceContainsAssertions | 1 - ...ns.searchbehaviours.SearchBehaviourFactory | 1 - ...onThrowingAssertionCollectorForExplanation | 1 - ...s.ThrowingAssertionCollectorForExplanation | 1 - ...ct.creators.FeatureExtractorCreatorFactory | 1 - ....iterable.contains.checkers.CheckerFactory | 1 - ...ntains.creators.IterableContainsAssertions | 1 - ...ns.searchbehaviours.SearchBehaviourFactory | 1 - ....thrown.creators.ThrowableThrownAssertions | 1 - ...ders.AbsentThrowableMessageProviderFactory | 1 - .../src/module/module-info.java | 93 -- .../build.gradle | 7 - .../creating/ResultAssertionsImpl.kt | 18 - .../build.gradle | 7 - .../domain/kotlin_1_3/registerServices.kt | 11 - .../build.gradle | 7 - ...omain.kotlin_1_3.creating.ResultAssertions | 1 - .../src/module/module-info.java | 8 - .../build.gradle | 6 - .../assertions/DescriptionAnyAssertion.kt | 19 - .../atrium/assertions/DescriptionBasic.kt | 17 - .../DescriptionBigDecimalAssertion.kt | 20 - .../DescriptionCharSequenceAssertion.kt | 26 - .../DescriptionCollectionAssertion.kt | 16 - .../DescriptionComparableAssertion.kt | 18 - .../DescriptionFloatingPointAssertion.kt | 19 - .../DescriptionIterableAssertion.kt | 33 - .../DescriptionThrowableAssertion.kt | 16 - .../DescriptionTypeTransformationAssertion.kt | 18 - .../build.gradle | 6 - .../assertions/DescriptionAnyAssertion.kt | 20 - .../atrium/assertions/DescriptionBasic.kt | 17 - .../DescriptionBigDecimalAssertion.kt | 20 - .../DescriptionCharSequenceAssertion.kt | 26 - .../DescriptionCollectionAssertion.kt | 16 - .../DescriptionComparableAssertion.kt | 18 - .../DescriptionFloatingPointAssertion.kt | 19 - .../DescriptionIterableAssertion.kt | 33 - .../DescriptionThrowableAssertion.kt | 16 - .../DescriptionTypeTransformationAssertion.kt | 18 - misc/kdoc/packages.md | 322 +---- misc/specs/atrium-specs-common/build.gradle | 5 +- .../DelegatingAssertionCheckerSpec.kt | 76 -- .../checking/FeatureAssertionCheckerSpec.kt | 77 -- .../checking/ThrowingAssertionCheckerSpec.kt | 68 -- .../creating/CollectingAssertionPlantSpec.kt | 64 - .../ReportingAssertionContainerSpec.kt | 148 --- ...arSequenceContainsExactlyAssertionsSpec.kt | 14 +- ...CharSequenceContainsRegexAssertionsSpec.kt | 4 +- .../integration/IterableAnyAssertionsSpec.kt | 16 - ...InAnyOrderAtLeast1EntriesAssertionsSpec.kt | 16 - ...ainsInAnyOrderOnlyEntriesAssertionsSpec.kt | 17 - ...ontainsInOrderOnlyEntriesAssertionsSpec.kt | 17 +- .../ch/tutteli/atrium/specs/verbs/VerbSpec.kt | 1 - misc/specs/atrium-specs-js/build.gradle | 4 - misc/specs/atrium-specs-jvm/build.gradle | 6 - misc/tools/atrium-bc-test/build.gradle | 397 ++----- .../bctest/DeprecationSpek1TestEngine.kt | 93 -- .../ch/tutteil/atrium/bctest/ForgivingTest.kt | 36 - .../org.junit.platform.engine.TestEngine | 1 - .../main/kotlin/readme/examples/ReadmeSpec.kt | 3 +- .../atrium-verbs-internal-common/build.gradle | 1 - .../atrium/verbs/internal/atriumVerbs.kt | 80 -- .../atrium-verbs-internal-js/build.gradle | 1 - .../atrium/verbs/internal/registerServices.kt | 2 +- .../atrium-verbs-internal-jvm/build.gradle | 2 - .../verbs/internal/AssertionVerbFactory.kt | 24 - ...h.tutteli.atrium.reporting.ReporterFactory | 2 +- .../src/module/module-info.java | 2 +- .../tutteli/atrium/verbs/internal/VerbSpec.kt | 13 - .../ch/tutteli/atrium/verbs/AssertionVerb.kt | 18 - .../kotlin/ch/tutteli/atrium/verbs/assert.kt | 67 -- .../ch/tutteli/atrium/verbs/assertThat.kt | 67 -- .../kotlin/ch/tutteli/atrium/verbs/expect.kt | 67 -- misc/verbs/atrium-verbs-jvm/build.gradle | 4 - .../ch/tutteli/atrium/verbs/assert/Assert.kt | 23 - .../atrium/verbs/assertthat/AssertThat.kt | 23 - .../ch/tutteli/atrium/verbs/expect/Expect.kt | 22 - .../src/module/module-info.java | 1 - .../ch/tutteli/atrium/verbs/VerbSpec.kt | 48 - settings.gradle | 63 - 1111 files changed, 275 insertions(+), 68510 deletions(-) delete mode 100644 apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/charSequenceAssertionsDeprecated.kt delete mode 100644 apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/charSequenceContainsCheckersDeprecated.kt delete mode 100644 apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/charSequenceContainsCreatorsDeprecated.kt delete mode 100644 apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/charSequenceContainsSearchBehavioursDeprecated.kt delete mode 100644 apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/creating/charsequence/contains/builders/AtLeastCheckerOption.kt delete mode 100644 apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/creating/charsequence/contains/builders/AtMostCheckerOption.kt delete mode 100644 apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/creating/charsequence/contains/builders/ButAtMostCheckerOption.kt delete mode 100644 apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/creating/charsequence/contains/builders/ExactlyCheckerOption.kt delete mode 100644 apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/creating/charsequence/contains/builders/NotCheckerOption.kt delete mode 100644 apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/creating/charsequence/contains/builders/NotOrAtMostCheckerOption.kt delete mode 100644 apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/creating/charsequence/contains/builders/impl/AtLeastCheckerOptionImpl.kt delete mode 100644 apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/creating/charsequence/contains/builders/impl/AtMostCheckerOptionImpl.kt delete mode 100644 apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/creating/charsequence/contains/builders/impl/ButAtMostCheckerOptionImpl.kt delete mode 100644 apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/creating/charsequence/contains/builders/impl/ExactlyCheckerOptionImpl.kt delete mode 100644 apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/creating/charsequence/contains/builders/impl/NotCheckerOptionImpl.kt delete mode 100644 apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/creating/charsequence/contains/builders/impl/NotOrAtMostCheckerOptionImpl.kt delete mode 100644 apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/creating/charsequence/contains/builders/impl/nameContainsNotFun.kt delete mode 100644 apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/creating/iterable/contains/builders/AtLeastCheckerOption.kt delete mode 100644 apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/creating/iterable/contains/builders/AtMostCheckerOption.kt delete mode 100644 apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/creating/iterable/contains/builders/ButAtMostCheckerOption.kt delete mode 100644 apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/creating/iterable/contains/builders/ExactlyCheckerOption.kt delete mode 100644 apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/creating/iterable/contains/builders/NotCheckerOption.kt delete mode 100644 apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/creating/iterable/contains/builders/NotOrAtMostCheckerOption.kt delete mode 100644 apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/creating/iterable/contains/builders/impl/AtLeastCheckerOptionImpl.kt delete mode 100644 apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/creating/iterable/contains/builders/impl/AtMostCheckerOptionImpl.kt delete mode 100644 apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/creating/iterable/contains/builders/impl/ButAtMostCheckerOptionImpl.kt delete mode 100644 apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/creating/iterable/contains/builders/impl/ExactlyCheckerOptionImpl.kt delete mode 100644 apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/creating/iterable/contains/builders/impl/NotCheckerOptionImpl.kt delete mode 100644 apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/creating/iterable/contains/builders/impl/NotOrAtMostCheckerOptionImpl.kt delete mode 100644 apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/creating/iterable/contains/builders/impl/nameContainsNotFun.kt delete mode 100644 apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/iterableAssertionsDeprecated.kt delete mode 100644 apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/iterableContainsCheckers.kt delete mode 100644 apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/iterableContainsInAnyOrderCreators.kt delete mode 100644 apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/iterableContainsInAnyOrderOnlyCreators.kt delete mode 100644 apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/iterableContainsInOrderOnlyCreators.kt delete mode 100644 apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/iterableContainsInOrderOnlyGroupedCreators.kt delete mode 100644 apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/iterableContainsSearchBehaviours.kt delete mode 100644 apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/charSequenceAssertionsDeprecated.kt delete mode 100644 apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/charSequenceContainsCheckersDeprecated.kt delete mode 100644 apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/charSequenceContainsCreatorsDeprecated.kt delete mode 100644 apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/charSequenceContainsSearchBehavioursDeprecated.kt delete mode 100644 apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/creating/charsequence/contains.builders/AtLeastCheckerOption.kt delete mode 100644 apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/creating/charsequence/contains.builders/AtMostCheckerOption.kt delete mode 100644 apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/creating/charsequence/contains.builders/ButAtMostCheckerOption.kt delete mode 100644 apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/creating/charsequence/contains.builders/ExactlyCheckerOption.kt delete mode 100644 apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/creating/charsequence/contains.builders/NotCheckerOption.kt delete mode 100644 apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/creating/charsequence/contains.builders/NotOrAtMostCheckerOption.kt delete mode 100644 apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/creating/charsequence/contains.builders/impl/AtLeastCheckerOptionImpl.kt delete mode 100644 apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/creating/charsequence/contains.builders/impl/AtMostCheckerOptionImpl.kt delete mode 100644 apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/creating/charsequence/contains.builders/impl/ButAtMostCheckerOptionImpl.kt delete mode 100644 apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/creating/charsequence/contains.builders/impl/ExactlyCheckerOptionImpl.kt delete mode 100644 apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/creating/charsequence/contains.builders/impl/NotCheckerOptionImpl.kt delete mode 100644 apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/creating/charsequence/contains.builders/impl/NotOrAtMostCheckerOptionImpl.kt delete mode 100644 apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/creating/charsequence/contains.builders/impl/nameContainsNotFun.kt delete mode 100644 apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/creating/iterable/contains/builders/AtLeastCheckerOption.kt delete mode 100644 apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/creating/iterable/contains/builders/AtMostCheckerOption.kt delete mode 100644 apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/creating/iterable/contains/builders/ButAtMostCheckerOption.kt delete mode 100644 apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/creating/iterable/contains/builders/ExactlyCheckerOption.kt delete mode 100644 apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/creating/iterable/contains/builders/NotCheckerOption.kt delete mode 100644 apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/creating/iterable/contains/builders/NotOrAtMostCheckerOption.kt delete mode 100644 apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/creating/iterable/contains/builders/impl/AtLeastCheckerOptionImpl.kt delete mode 100644 apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/creating/iterable/contains/builders/impl/AtMostCheckerOptionImpl.kt delete mode 100644 apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/creating/iterable/contains/builders/impl/ButAtMostCheckerOptionImpl.kt delete mode 100644 apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/creating/iterable/contains/builders/impl/ExactlyCheckerOptionImpl.kt delete mode 100644 apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/creating/iterable/contains/builders/impl/NotCheckerOptionImpl.kt delete mode 100644 apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/creating/iterable/contains/builders/impl/NotOrAtMostCheckerOptionImpl.kt delete mode 100644 apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/creating/iterable/contains/builders/impl/nameContainsNotFun.kt delete mode 100644 apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/iterableAssertionsDeprecated.kt delete mode 100644 apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/iterableContainsCheckers.kt delete mode 100644 apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/iterableContainsInAnyOrderCreators.kt delete mode 100644 apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/iterableContainsInAnyOrderOnlyCreators.kt delete mode 100644 apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/iterableContainsInOrderOnlyCreators.kt delete mode 100644 apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/iterableContainsInOrderOnlyGroupedCreators.kt delete mode 100644 apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/iterableContainsSearchBehaviours.kt delete mode 100644 core/api/atrium-core-api-common/src/main/kotlin/ch/tutteli/atrium/checking/AssertionChecker.kt delete mode 100644 core/api/atrium-core-api-common/src/main/kotlin/ch/tutteli/atrium/creating/Assert.kt delete mode 100644 core/api/atrium-core-api-common/src/main/kotlin/ch/tutteli/atrium/creating/AssertionPlant.kt delete mode 100644 core/api/atrium-core-api-common/src/main/kotlin/ch/tutteli/atrium/creating/AssertionPlantNullable.kt delete mode 100644 core/api/atrium-core-api-common/src/main/kotlin/ch/tutteli/atrium/creating/AssertionPlantWithCommonFields.kt delete mode 100644 core/api/atrium-core-api-common/src/main/kotlin/ch/tutteli/atrium/creating/BaseAssertionPlant.kt delete mode 100644 core/api/atrium-core-api-common/src/main/kotlin/ch/tutteli/atrium/creating/BaseCollectingAssertionPlant.kt delete mode 100644 core/api/atrium-core-api-common/src/main/kotlin/ch/tutteli/atrium/creating/BaseReportingAssertionPlant.kt delete mode 100644 core/api/atrium-core-api-common/src/main/kotlin/ch/tutteli/atrium/creating/CheckingAssertionPlant.kt delete mode 100644 core/api/atrium-core-api-common/src/main/kotlin/ch/tutteli/atrium/creating/CollectingAssertionContainer.kt delete mode 100644 core/api/atrium-core-api-common/src/main/kotlin/ch/tutteli/atrium/creating/CollectingAssertionPlant.kt delete mode 100644 core/api/atrium-core-api-common/src/main/kotlin/ch/tutteli/atrium/creating/CollectingAssertionPlantNullable.kt delete mode 100644 core/api/atrium-core-api-common/src/main/kotlin/ch/tutteli/atrium/creating/MaybeSubject.kt delete mode 100644 core/api/atrium-core-api-common/src/main/kotlin/ch/tutteli/atrium/creating/PlantHasNoSubjectException.kt delete mode 100644 core/api/atrium-core-api-common/src/main/kotlin/ch/tutteli/atrium/creating/ReportingAssertionContainer.kt delete mode 100644 core/api/atrium-core-api-common/src/main/kotlin/ch/tutteli/atrium/creating/ReportingAssertionPlant.kt delete mode 100644 core/api/atrium-core-api-common/src/main/kotlin/ch/tutteli/atrium/creating/ReportingAssertionPlantNullable.kt delete mode 100644 core/robstoll-lib/atrium-core-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/core/robstoll/lib/checking/DelegatingAssertionChecker.kt delete mode 100644 core/robstoll-lib/atrium-core-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/core/robstoll/lib/checking/FeatureAssertionChecker.kt delete mode 100644 core/robstoll-lib/atrium-core-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/core/robstoll/lib/checking/ThrowingAssertionChecker.kt delete mode 100644 core/robstoll-lib/atrium-core-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/core/robstoll/lib/creating/CheckingAssertionPlantImpl.kt delete mode 100644 core/robstoll-lib/atrium-core-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/core/robstoll/lib/creating/CollectingAssertionContainerImpl.kt delete mode 100644 core/robstoll-lib/atrium-core-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/core/robstoll/lib/creating/CollectingAssertionPlantImpl.kt delete mode 100644 core/robstoll-lib/atrium-core-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/core/robstoll/lib/creating/CollectingAssertionPlantNullableImpl.kt delete mode 100644 core/robstoll-lib/atrium-core-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/core/robstoll/lib/creating/MutableListBasedAssertionContainer.kt delete mode 100644 core/robstoll-lib/atrium-core-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/core/robstoll/lib/creating/MutableListBasedAssertionPlant.kt delete mode 100644 core/robstoll-lib/atrium-core-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/core/robstoll/lib/creating/MutableListBasedReportingAssertionPlant.kt delete mode 100644 core/robstoll-lib/atrium-core-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/core/robstoll/lib/creating/ReportingAssertionContainerImpl.kt delete mode 100644 core/robstoll-lib/atrium-core-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/core/robstoll/lib/creating/ReportingAssertionPlantImpl.kt delete mode 100644 core/robstoll-lib/atrium-core-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/core/robstoll/lib/creating/ReportingAssertionPlantNullableImpl.kt delete mode 100644 core/robstoll-lib/atrium-core-robstoll-lib-common/src/test/kotlin/ch/tutteli/atrium/core/robstoll/lib/checking/DelegatingAssertionCheckerSpec.kt delete mode 100644 core/robstoll-lib/atrium-core-robstoll-lib-common/src/test/kotlin/ch/tutteli/atrium/core/robstoll/lib/checking/FeatureAssertionCheckerSpec.kt delete mode 100644 core/robstoll-lib/atrium-core-robstoll-lib-common/src/test/kotlin/ch/tutteli/atrium/core/robstoll/lib/checking/ThrowingAssertionCheckerSpec.kt delete mode 100644 core/robstoll-lib/atrium-core-robstoll-lib-common/src/test/kotlin/ch/tutteli/atrium/core/robstoll/lib/creating/CollectingAssertionContainerSpec.kt delete mode 100644 core/robstoll-lib/atrium-core-robstoll-lib-common/src/test/kotlin/ch/tutteli/atrium/core/robstoll/lib/creating/ReportingAssertionContainerSpec.kt delete mode 100644 core/robstoll-lib/atrium-core-robstoll-lib-jvm/src/test/kotlin/ch/tutteli/atrium/core/robstoll/lib/creating/CheckingAssertionPlantSpec.kt delete mode 100644 core/robstoll-lib/atrium-core-robstoll-lib-jvm/src/test/kotlin/ch/tutteli/atrium/core/robstoll/lib/creating/CollectingAssertionPlantSpec.kt delete mode 100644 core/robstoll-lib/atrium-core-robstoll-lib-jvm/src/test/kotlin/ch/tutteli/atrium/core/robstoll/lib/creating/ReportingAssertionPlantSpec.kt rename logic/atrium-logic-common/src/test/kotlin/ch/tutteli/atrium/logic/{ => assertions}/LazyThreadUnsafeAssertionGroupSpec.kt (98%) delete mode 100644 misc/deprecated/apis/atrium-api-cc-en_UK/build.gradle delete mode 100644 misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/CharSequenceContainsSearchersKt.kt delete mode 100644 misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/anyAssertions.kt delete mode 100644 misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/assertions/charsequence/contains/builders/CharSequenceContainsAtLeastCheckerBuilder.kt delete mode 100644 misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/assertions/charsequence/contains/builders/CharSequenceContainsAtMostCheckerBuilder.kt delete mode 100644 misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/assertions/charsequence/contains/builders/CharSequenceContainsButAtMostCheckerBuilder.kt delete mode 100644 misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/assertions/charsequence/contains/builders/CharSequenceContainsExactlyCheckerBuilder.kt delete mode 100644 misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/assertions/charsequence/contains/builders/CharSequenceContainsNotCheckerBuilder.kt delete mode 100644 misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/assertions/charsequence/contains/builders/CharSequenceContainsNotOrAtMostCheckerBuilder.kt delete mode 100644 misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/assertions/iterable/contains/builders/IterableContainsAtLeastCheckerBuilder.kt delete mode 100644 misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/assertions/iterable/contains/builders/IterableContainsAtMostCheckerBuilder.kt delete mode 100644 misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/assertions/iterable/contains/builders/IterableContainsButAtMostCheckerBuilder.kt delete mode 100644 misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/assertions/iterable/contains/builders/IterableContainsExactlyCheckerBuilder.kt delete mode 100644 misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/assertions/iterable/contains/builders/IterableContainsNotCheckerBuilder.kt delete mode 100644 misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/assertions/iterable/contains/builders/IterableContainsNotOrAtMostCheckerBuilder.kt delete mode 100644 misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/bigDecimalAssertions.kt delete mode 100644 misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/booleanAssertions.kt delete mode 100644 misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/charSequenceAssertions.kt delete mode 100644 misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/charSequenceContainsCheckers.kt delete mode 100644 misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/charSequenceContainsCreators.kt delete mode 100644 misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/charSequenceContainsDecorators.kt delete mode 100644 misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/collectionAssertions.kt delete mode 100644 misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/comparableAssertions.kt delete mode 100644 misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/creating/charsequence/contains/builders/AtLeastCheckerOption.kt delete mode 100644 misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/creating/charsequence/contains/builders/AtMostCheckerOption.kt delete mode 100644 misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/creating/charsequence/contains/builders/ButAtMostCheckerOption.kt delete mode 100644 misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/creating/charsequence/contains/builders/ExactlyCheckerOption.kt delete mode 100644 misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/creating/charsequence/contains/builders/NotCheckerOption.kt delete mode 100644 misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/creating/charsequence/contains/builders/NotOrAtMostCheckerOption.kt delete mode 100644 misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/creating/charsequence/contains/builders/nameContainsNotFun.kt delete mode 100644 misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/creating/iterable/contains/builders/AtLeastCheckerOption.kt delete mode 100644 misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/creating/iterable/contains/builders/AtMostCheckerOption.kt delete mode 100644 misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/creating/iterable/contains/builders/ButAtMostCheckerOption.kt delete mode 100644 misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/creating/iterable/contains/builders/ExactlyCheckerOption.kt delete mode 100644 misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/creating/iterable/contains/builders/NotCheckerOption.kt delete mode 100644 misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/creating/iterable/contains/builders/NotOrAtMostCheckerOption.kt delete mode 100644 misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/creating/iterable/contains/builders/nameContainsNotFun.kt delete mode 100644 misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/featureAssertions.kt delete mode 100644 misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/floatingPointAssertions.kt delete mode 100644 misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/iterableAssertions.kt delete mode 100644 misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/iterableContainsCheckers.kt delete mode 100644 misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/iterableContainsDecorators.kt delete mode 100644 misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/iterableContainsInAnyOrderCreators.kt delete mode 100644 misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/iterableContainsInAnyOrderOnlyCreators.kt delete mode 100644 misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/iterableContainsInOrderOnlyCreators.kt delete mode 100644 misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/throwableAssertions.kt delete mode 100644 misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/typeTransformationAssertions.kt delete mode 100644 misc/deprecated/apis/atrium-api-cc-infix-en_UK/build.gradle delete mode 100644 misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/CharSequenceContainsSearchersKt.kt delete mode 100644 misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/anyAssertions.kt delete mode 100644 misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/assertions/charsequence/contains/builders/CharSequenceContainsAtLeastCheckerBuilder.kt delete mode 100644 misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/assertions/charsequence/contains/builders/CharSequenceContainsAtMostCheckerBuilder.kt delete mode 100644 misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/assertions/charsequence/contains/builders/CharSequenceContainsButAtMostCheckerBuilder.kt delete mode 100644 misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/assertions/charsequence/contains/builders/CharSequenceContainsExactlyCheckerBuilder.kt delete mode 100644 misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/assertions/charsequence/contains/builders/CharSequenceContainsNotCheckerBuilder.kt delete mode 100644 misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/assertions/charsequence/contains/builders/CharSequenceContainsNotOrAtMostCheckerBuilder.kt delete mode 100644 misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/assertions/charsequence/contains/builders/nameContainsNotFun.kt delete mode 100644 misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/assertions/iterable/contains/builders/IterableContainsAtLeastCheckerBuilder.kt delete mode 100644 misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/assertions/iterable/contains/builders/IterableContainsAtMostCheckerBuilder.kt delete mode 100644 misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/assertions/iterable/contains/builders/IterableContainsButAtMostCheckerBuilder.kt delete mode 100644 misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/assertions/iterable/contains/builders/IterableContainsExactlyCheckerBuilder.kt delete mode 100644 misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/assertions/iterable/contains/builders/IterableContainsNotCheckerBuilder.kt delete mode 100644 misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/assertions/iterable/contains/builders/IterableContainsNotOrAtMostCheckerBuilder.kt delete mode 100644 misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/bigDecimalAssertions.kt delete mode 100644 misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/charSequenceAssertions.kt delete mode 100644 misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/charSequenceContainsCheckers.kt delete mode 100644 misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/charSequenceContainsCreators.kt delete mode 100644 misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/charSequenceContainsDecorators.kt delete mode 100644 misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/collectionAssertions.kt delete mode 100644 misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/comparableAssertions.kt delete mode 100644 misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/creating/charsequence/contains/builders/AtLeastCheckerOption.kt delete mode 100644 misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/creating/charsequence/contains/builders/AtMostCheckerOption.kt delete mode 100644 misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/creating/charsequence/contains/builders/ButAtMostCheckerOption.kt delete mode 100644 misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/creating/charsequence/contains/builders/ExactlyCheckerOption.kt delete mode 100644 misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/creating/charsequence/contains/builders/NotCheckerOption.kt delete mode 100644 misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/creating/charsequence/contains/builders/NotOrAtMostCheckerOption.kt delete mode 100644 misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/creating/charsequence/contains/builders/nameContainsNotFun.kt delete mode 100644 misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/creating/iterable/contains/builders/AtLeastCheckerOption.kt delete mode 100644 misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/creating/iterable/contains/builders/AtMostCheckerOption.kt delete mode 100644 misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/creating/iterable/contains/builders/ButAtMostCheckerOption.kt delete mode 100644 misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/creating/iterable/contains/builders/ExactlyCheckerOption.kt delete mode 100644 misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/creating/iterable/contains/builders/NotCheckerOption.kt delete mode 100644 misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/creating/iterable/contains/builders/NotOrAtMostCheckerOption.kt delete mode 100644 misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/creating/iterable/contains/builders/nameContainsNotFun.kt delete mode 100644 misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/featureAssertions.kt delete mode 100644 misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/helperKeywords.kt delete mode 100644 misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/iterableAssertions.kt delete mode 100644 misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/iterableContainsCheckers.kt delete mode 100644 misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/iterableContainsDecorators.kt delete mode 100644 misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/iterableContainsInAnyOrderCreators.kt delete mode 100644 misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/iterableContainsInAnyOrderOnlyCreators.kt delete mode 100644 misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/iterableContainsInOrderOnlyCreators.kt delete mode 100644 misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/methodObjects.kt delete mode 100644 misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/throwableAssertions.kt delete mode 100644 misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/typeTransformationAssertions.kt delete mode 100644 misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/build.gradle delete mode 100644 misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/anyAssertions.kt delete mode 100644 misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/arrayAssertions.kt delete mode 100644 misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/charSequenceAssertions.kt delete mode 100644 misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/charSequenceContainsCheckers.kt delete mode 100644 misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/charSequenceContainsCreators.kt delete mode 100644 misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/charSequenceContainsDecorators.kt delete mode 100644 misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/collectionAssertions.kt delete mode 100644 misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/comparableAssertions.kt delete mode 100644 misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/creating/charsequence/contains/builders/AtLeastCheckerOption.kt delete mode 100644 misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/creating/charsequence/contains/builders/AtMostCheckerOption.kt delete mode 100644 misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/creating/charsequence/contains/builders/ButAtMostCheckerOption.kt delete mode 100644 misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/creating/charsequence/contains/builders/ExactlyCheckerOption.kt delete mode 100644 misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/creating/charsequence/contains/builders/NotCheckerOption.kt delete mode 100644 misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/creating/charsequence/contains/builders/NotOrAtMostCheckerOption.kt delete mode 100644 misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/creating/charsequence/contains/builders/impl/AtLeastCheckerOptionImpl.kt delete mode 100644 misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/creating/charsequence/contains/builders/impl/AtMostCheckerOptionImpl.kt delete mode 100644 misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/creating/charsequence/contains/builders/impl/ButAtMostCheckerOptionImpl.kt delete mode 100644 misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/creating/charsequence/contains/builders/impl/ExactlyCheckerOptionImpl.kt delete mode 100644 misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/creating/charsequence/contains/builders/impl/NotCheckerOptionImpl.kt delete mode 100644 misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/creating/charsequence/contains/builders/impl/NotOrAtMostCheckerOptionImpl.kt delete mode 100644 misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/creating/charsequence/contains/builders/impl/nameContainsNotFun.kt delete mode 100644 misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/creating/iterable/contains/builders/AtLeastCheckerOption.kt delete mode 100644 misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/creating/iterable/contains/builders/AtMostCheckerOption.kt delete mode 100644 misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/creating/iterable/contains/builders/ButAtMostCheckerOption.kt delete mode 100644 misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/creating/iterable/contains/builders/ExactlyCheckerOption.kt delete mode 100644 misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/creating/iterable/contains/builders/NotCheckerOption.kt delete mode 100644 misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/creating/iterable/contains/builders/NotOrAtMostCheckerOption.kt delete mode 100644 misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/creating/iterable/contains/builders/impl/AtLeastCheckerOptionImpl.kt delete mode 100644 misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/creating/iterable/contains/builders/impl/AtMostCheckerOptionImpl.kt delete mode 100644 misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/creating/iterable/contains/builders/impl/ButAtMostCheckerOptionImpl.kt delete mode 100644 misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/creating/iterable/contains/builders/impl/ExactlyCheckerOptionImpl.kt delete mode 100644 misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/creating/iterable/contains/builders/impl/NotCheckerOptionImpl.kt delete mode 100644 misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/creating/iterable/contains/builders/impl/NotOrAtMostCheckerOptionImpl.kt delete mode 100644 misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/creating/iterable/contains/builders/impl/nameContainsNotFun.kt delete mode 100644 misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/featureAssertions.kt delete mode 100644 misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/floatingPointAssertions.kt delete mode 100644 misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/iterableAssertions.kt delete mode 100644 misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/iterableContainsCheckers.kt delete mode 100644 misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/iterableContainsDecorators.kt delete mode 100644 misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/iterableContainsInAnyOrderCreators.kt delete mode 100644 misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/iterableContainsInAnyOrderOnlyCreators.kt delete mode 100644 misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/iterableContainsInOrderOnlyCreators.kt delete mode 100644 misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/iterableContainsInOrderOnlyGroupedCreators.kt delete mode 100644 misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/listAssertions.kt delete mode 100644 misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/mapAssertions.kt delete mode 100644 misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/mapEntryAssertions.kt delete mode 100644 misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/pairAssertions.kt delete mode 100644 misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/parameterObjects.kt delete mode 100644 misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/sequenceAssertions.kt delete mode 100644 misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/throwableAssertions.kt delete mode 100644 misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/typeTransformationAssertions.kt delete mode 100644 misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-js/build.gradle delete mode 100644 misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-jvm/build.gradle delete mode 100644 misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/CharSequenceContainsSearchersKt.kt delete mode 100644 misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/anyDeprecatedAssertions.kt delete mode 100644 misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/assertions/charsequence/contains/builders/CharSequenceContainsAtLeastCheckerBuilder.kt delete mode 100644 misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/assertions/charsequence/contains/builders/CharSequenceContainsAtMostCheckerBuilder.kt delete mode 100644 misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/assertions/charsequence/contains/builders/CharSequenceContainsButAtMostCheckerBuilder.kt delete mode 100644 misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/assertions/charsequence/contains/builders/CharSequenceContainsExactlyCheckerBuilder.kt delete mode 100644 misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/assertions/charsequence/contains/builders/CharSequenceContainsNotCheckerBuilder.kt delete mode 100644 misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/assertions/charsequence/contains/builders/CharSequenceContainsNotOrAtMostCheckerBuilder.kt delete mode 100644 misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/assertions/iterable/contains/builders/IterableContainsAtLeastCheckerBuilder.kt delete mode 100644 misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/assertions/iterable/contains/builders/IterableContainsAtMostCheckerBuilder.kt delete mode 100644 misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/assertions/iterable/contains/builders/IterableContainsButAtMostCheckerBuilder.kt delete mode 100644 misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/assertions/iterable/contains/builders/IterableContainsExactlyCheckerBuilder.kt delete mode 100644 misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/assertions/iterable/contains/builders/IterableContainsNotCheckerBuilder.kt delete mode 100644 misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/assertions/iterable/contains/builders/IterableContainsNotOrAtMostCheckerBuilder.kt delete mode 100644 misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/bigDecimalAssertions.kt delete mode 100644 misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/booleanDeprecatedAssertions.kt delete mode 100644 misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/charSequenceDeprecatedAssertions.kt delete mode 100644 misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/charSequenceDeprecatedContainsCheckers.kt delete mode 100644 misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/charSequenceDeprecatedContainsCreators.kt delete mode 100644 misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/charSequenceDeprecatedContainsDecorators.kt delete mode 100644 misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/deprecatedParameterObjects.kt delete mode 100644 misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/floatingPointJvmAssertions.kt delete mode 100644 misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/iterableDeprecatedAssertions.kt delete mode 100644 misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/iterableDeprecatedContainsCheckers.kt delete mode 100644 misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/iterableDeprecatedContainsDecorators.kt delete mode 100644 misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/iterableDeprecatedContainsInAnyOrderCreators.kt delete mode 100644 misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/iterableDeprecatedContainsInAnyOrderOnlyCreators.kt delete mode 100644 misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/iterableDeprecatedContainsInOrderOnlyCreators.kt delete mode 100644 misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/iterableDeprecatedContainsInOrderOnlyGroupedCreators.kt delete mode 100644 misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/throwableDeprecatedAssertions.kt delete mode 100644 misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/typeTransformationDeprecatedAssertions.kt delete mode 100644 misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/build.gradle delete mode 100644 misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/anyAssertions.kt delete mode 100644 misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/arrayAssertions.kt delete mode 100644 misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/charSequenceAssertions.kt delete mode 100644 misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/charSequenceContainsCheckers.kt delete mode 100644 misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/charSequenceContainsCreators.kt delete mode 100644 misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/charSequenceContainsSearchBehaviours.kt delete mode 100644 misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/collectionAssertions.kt delete mode 100644 misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/comparableAssertions.kt delete mode 100644 misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/creating/charsequence/contains/builders/AtLeastCheckerOption.kt delete mode 100644 misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/creating/charsequence/contains/builders/AtMostCheckerOption.kt delete mode 100644 misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/creating/charsequence/contains/builders/ButAtMostCheckerOption.kt delete mode 100644 misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/creating/charsequence/contains/builders/ExactlyCheckerOption.kt delete mode 100644 misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/creating/charsequence/contains/builders/NotCheckerOption.kt delete mode 100644 misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/creating/charsequence/contains/builders/NotOrAtMostCheckerOption.kt delete mode 100644 misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/creating/charsequence/contains/builders/impl/AtLeastCheckerOptionImpl.kt delete mode 100644 misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/creating/charsequence/contains/builders/impl/AtMostCheckerOptionImpl.kt delete mode 100644 misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/creating/charsequence/contains/builders/impl/ButAtMostCheckerOptionImpl.kt delete mode 100644 misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/creating/charsequence/contains/builders/impl/ExactlyCheckerOptionImpl.kt delete mode 100644 misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/creating/charsequence/contains/builders/impl/NotCheckerOptionImpl.kt delete mode 100644 misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/creating/charsequence/contains/builders/impl/NotOrAtMostCheckerOptionImpl.kt delete mode 100644 misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/creating/charsequence/contains/builders/impl/nameContainsNotFun.kt delete mode 100644 misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/creating/iterable/contains/builders/AtLeastCheckerOption.kt delete mode 100644 misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/creating/iterable/contains/builders/AtMostCheckerOption.kt delete mode 100644 misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/creating/iterable/contains/builders/ButAtMostCheckerOption.kt delete mode 100644 misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/creating/iterable/contains/builders/ExactlyCheckerOption.kt delete mode 100644 misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/creating/iterable/contains/builders/NotCheckerOption.kt delete mode 100644 misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/creating/iterable/contains/builders/NotOrAtMostCheckerOption.kt delete mode 100644 misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/creating/iterable/contains/builders/impl/AtLeastCheckerOptionImpl.kt delete mode 100644 misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/creating/iterable/contains/builders/impl/AtMostCheckerOptionImpl.kt delete mode 100644 misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/creating/iterable/contains/builders/impl/ButAtMostCheckerOptionImpl.kt delete mode 100644 misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/creating/iterable/contains/builders/impl/ExactlyCheckerOptionImpl.kt delete mode 100644 misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/creating/iterable/contains/builders/impl/NotCheckerOptionImpl.kt delete mode 100644 misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/creating/iterable/contains/builders/impl/NotOrAtMostCheckerOptionImpl.kt delete mode 100644 misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/creating/iterable/contains/builders/impl/nameContainsNotFun.kt delete mode 100644 misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/featureAssertions.kt delete mode 100644 misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/floatingPointAssertions.kt delete mode 100644 misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/iterableAssertions.kt delete mode 100644 misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/iterableContainsCheckers.kt delete mode 100644 misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/iterableContainsInAnyOrderCreators.kt delete mode 100644 misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/iterableContainsInAnyOrderOnlyCreators.kt delete mode 100644 misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/iterableContainsInOrderOnlyCreators.kt delete mode 100644 misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/iterableContainsInOrderOnlyGroupedCreators.kt delete mode 100644 misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/iterableContainsSearchBehaviours.kt delete mode 100644 misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/listAssertions.kt delete mode 100644 misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/mapAssertions.kt delete mode 100644 misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/mapEntryAssertions.kt delete mode 100644 misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/pairAssertions.kt delete mode 100644 misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/parameterObjects.kt delete mode 100644 misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/sequenceAssertions.kt delete mode 100644 misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/throwableAssertions.kt delete mode 100644 misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/typeTransformationAssertions.kt delete mode 100644 misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-js/build.gradle delete mode 100644 misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-jvm/build.gradle delete mode 100644 misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/anyDeprecatedAssertions.kt delete mode 100644 misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/bigDecimalAssertions.kt delete mode 100644 misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/deprecatedParameterObjects.kt delete mode 100644 misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/floatingPointJvmAssertions.kt delete mode 100644 misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/iterableContainsInAnyOrderDeprecatedCreators.kt delete mode 100644 misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/iterableContainsInAnyOrderOnlyDeprecatedCreators.kt delete mode 100644 misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/iterableContainsInOrderOnlyDeprecatedCreators.kt delete mode 100644 misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/iterableDeprecatedAssertions.kt delete mode 100644 misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/iterableDeprecatedContainsInOrderOnlyGroupedCreators.kt delete mode 100644 misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/typeTransformationDeprecatedAssertions.kt delete mode 100644 misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-jvm/src/module/module-info.java delete mode 100644 misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/build.gradle delete mode 100644 misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/anyAssertions.kt delete mode 100644 misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/arrayAssertions.kt delete mode 100644 misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/charSequenceAssertions.kt delete mode 100644 misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/charSequenceContainsCheckers.kt delete mode 100644 misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/charSequenceContainsCreators.kt delete mode 100644 misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/charSequenceContainsSearchBehaviours.kt delete mode 100644 misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/collectionAssertions.kt delete mode 100644 misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/comparableAssertions.kt delete mode 100644 misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/charsequence/contains/builders/AtLeastCheckerOption.kt delete mode 100644 misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/charsequence/contains/builders/AtMostCheckerOption.kt delete mode 100644 misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/charsequence/contains/builders/ButAtMostCheckerOption.kt delete mode 100644 misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/charsequence/contains/builders/ExactlyCheckerOption.kt delete mode 100644 misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/charsequence/contains/builders/NotCheckerOption.kt delete mode 100644 misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/charsequence/contains/builders/NotOrAtMostCheckerOption.kt delete mode 100644 misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/charsequence/contains/builders/impl/AtLeastCheckerOptionImpl.kt delete mode 100644 misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/charsequence/contains/builders/impl/AtMostCheckerOptionImpl.kt delete mode 100644 misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/charsequence/contains/builders/impl/ButAtMostCheckerOptionImpl.kt delete mode 100644 misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/charsequence/contains/builders/impl/ExactlyCheckerOptionImpl.kt delete mode 100644 misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/charsequence/contains/builders/impl/NotCheckerOptionImpl.kt delete mode 100644 misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/charsequence/contains/builders/impl/NotOrAtMostCheckerOptionImpl.kt delete mode 100644 misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/charsequence/contains/builders/impl/nameContainsNotFun.kt delete mode 100644 misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/iterable/contains/builders/AtLeastCheckerOption.kt delete mode 100644 misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/iterable/contains/builders/AtMostCheckerOption.kt delete mode 100644 misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/iterable/contains/builders/ButAtMostCheckerOption.kt delete mode 100644 misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/iterable/contains/builders/ExactlyCheckerOption.kt delete mode 100644 misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/iterable/contains/builders/NotCheckerOption.kt delete mode 100644 misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/iterable/contains/builders/NotOrAtMostCheckerOption.kt delete mode 100644 misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/iterable/contains/builders/impl/AtLeastCheckerOptionImpl.kt delete mode 100644 misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/iterable/contains/builders/impl/AtMostCheckerOptionImpl.kt delete mode 100644 misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/iterable/contains/builders/impl/ButAtMostCheckerOptionImpl.kt delete mode 100644 misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/iterable/contains/builders/impl/ExactlyCheckerOptionImpl.kt delete mode 100644 misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/iterable/contains/builders/impl/NotCheckerOptionImpl.kt delete mode 100644 misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/iterable/contains/builders/impl/NotOrAtMostCheckerOptionImpl.kt delete mode 100644 misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/iterable/contains/builders/impl/nameContainsNotFun.kt delete mode 100644 misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/list/get/builders/ListGetNullableOption.kt delete mode 100644 misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/list/get/builders/ListGetOption.kt delete mode 100644 misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/list/get/builders/impl/ListGetNullableOptionImpl.kt delete mode 100644 misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/list/get/builders/impl/ListGetOptionImpl.kt delete mode 100644 misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/map/get/builders/MapGetNullableOption.kt delete mode 100644 misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/map/get/builders/MapGetOption.kt delete mode 100644 misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/map/get/builders/impl/MapGetNullableOptionImpl.kt delete mode 100644 misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/map/get/builders/impl/MapGetOptionImpl.kt delete mode 100644 misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/featureAssertions.kt delete mode 100644 misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/iterableAssertions.kt delete mode 100644 misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/iterableContainsCheckers.kt delete mode 100644 misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/iterableContainsInAnyOrderCreators.kt delete mode 100644 misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/iterableContainsInAnyOrderOnlyCreators.kt delete mode 100644 misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/iterableContainsInOrderOnlyCreators.kt delete mode 100644 misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/iterableContainsInOrderOnlyGroupedCreators.kt delete mode 100644 misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/iterableContainsSearchBehaviours.kt delete mode 100644 misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/keywords/keywords.kt delete mode 100644 misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/listAssertions.kt delete mode 100644 misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/mapAssertions.kt delete mode 100644 misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/mapEntryAssertions.kt delete mode 100644 misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/pairAssertions.kt delete mode 100644 misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/parameterObjects.kt delete mode 100644 misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/sequenceAssertions.kt delete mode 100644 misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/throwableAssertions.kt delete mode 100644 misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/typeTransformationAssertions.kt delete mode 100644 misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-js/build.gradle delete mode 100644 misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-jvm/build.gradle delete mode 100644 misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/anyDeprecatedAssertions.kt delete mode 100644 misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/bigDecimalAssertions.kt delete mode 100644 misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/deprecatedParameterObjects.kt delete mode 100644 misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/iterableContainsInAnyOrderDeprecatedCreators.kt delete mode 100644 misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/iterableContainsInAnyOrderOnlyDeprecatedCreators.kt delete mode 100644 misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/iterableContainsInOrderOnlyDeprecatedCreators.kt delete mode 100644 misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/iterableContainsInOrderOnlyGroupedDeprecatedCreators.kt delete mode 100644 misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/iterableDeprecatedAssertions.kt delete mode 100644 misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/typeTransformationDeprecatedAssertions.kt delete mode 100644 misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-jvm/src/module/module-info.java delete mode 100644 misc/deprecated/apis/fluent-en_GB-jdk8/atrium-api-fluent-en_GB-jdk8-common/build.gradle delete mode 100644 misc/deprecated/apis/fluent-en_GB-jdk8/atrium-api-fluent-en_GB-jdk8-jvm/build.gradle delete mode 100644 misc/deprecated/apis/fluent-en_GB-jdk8/atrium-api-fluent-en_GB-jdk8-jvm/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/jdk8/chronoLocalDateAssertions.kt delete mode 100644 misc/deprecated/apis/fluent-en_GB-jdk8/atrium-api-fluent-en_GB-jdk8-jvm/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/jdk8/chronoLocalDateTimeAssertions.kt delete mode 100644 misc/deprecated/apis/fluent-en_GB-jdk8/atrium-api-fluent-en_GB-jdk8-jvm/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/jdk8/chronoZonedDateTimeAssertions.kt delete mode 100644 misc/deprecated/apis/fluent-en_GB-jdk8/atrium-api-fluent-en_GB-jdk8-jvm/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/jdk8/fileAssertions.kt delete mode 100644 misc/deprecated/apis/fluent-en_GB-jdk8/atrium-api-fluent-en_GB-jdk8-jvm/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/jdk8/localDateAssertions.kt delete mode 100644 misc/deprecated/apis/fluent-en_GB-jdk8/atrium-api-fluent-en_GB-jdk8-jvm/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/jdk8/localDateTimeAssertions.kt delete mode 100644 misc/deprecated/apis/fluent-en_GB-jdk8/atrium-api-fluent-en_GB-jdk8-jvm/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/jdk8/optionalAssertions.kt delete mode 100644 misc/deprecated/apis/fluent-en_GB-jdk8/atrium-api-fluent-en_GB-jdk8-jvm/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/jdk8/pathAssertions.kt delete mode 100644 misc/deprecated/apis/fluent-en_GB-jdk8/atrium-api-fluent-en_GB-jdk8-jvm/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/jdk8/zonedDateTimeAssertions.kt delete mode 100644 misc/deprecated/apis/fluent-en_GB-jdk8/atrium-api-fluent-en_GB-jdk8-jvm/src/module/module-info.java delete mode 100644 misc/deprecated/apis/fluent-en_GB-jdk8/atrium-api-fluent-en_GB-jdk8-jvm/src/test/kotlin/ch/tutteli/atrium/api/fluent/en_GB/jdk8/ChronoLocalDateAssertionsSpec.kt delete mode 100644 misc/deprecated/apis/fluent-en_GB-jdk8/atrium-api-fluent-en_GB-jdk8-jvm/src/test/kotlin/ch/tutteli/atrium/api/fluent/en_GB/jdk8/ChronoLocalDateTimeAssertionSpec.kt delete mode 100644 misc/deprecated/apis/fluent-en_GB-jdk8/atrium-api-fluent-en_GB-jdk8-jvm/src/test/kotlin/ch/tutteli/atrium/api/fluent/en_GB/jdk8/ChronoZonedDateTimeAssertionSpec.kt delete mode 100644 misc/deprecated/apis/fluent-en_GB-jdk8/atrium-api-fluent-en_GB-jdk8-jvm/src/test/kotlin/ch/tutteli/atrium/api/fluent/en_GB/jdk8/FileAsPathAssertionsSpec.kt delete mode 100644 misc/deprecated/apis/fluent-en_GB-jdk8/atrium-api-fluent-en_GB-jdk8-jvm/src/test/kotlin/ch/tutteli/atrium/api/fluent/en_GB/jdk8/LocalDateAssertionsSpec.kt delete mode 100644 misc/deprecated/apis/fluent-en_GB-jdk8/atrium-api-fluent-en_GB-jdk8-jvm/src/test/kotlin/ch/tutteli/atrium/api/fluent/en_GB/jdk8/LocalDateTimeAssertionsSpec.kt delete mode 100644 misc/deprecated/apis/fluent-en_GB-jdk8/atrium-api-fluent-en_GB-jdk8-jvm/src/test/kotlin/ch/tutteli/atrium/api/fluent/en_GB/jdk8/OptionalAssertionsSpec.kt delete mode 100644 misc/deprecated/apis/fluent-en_GB-jdk8/atrium-api-fluent-en_GB-jdk8-jvm/src/test/kotlin/ch/tutteli/atrium/api/fluent/en_GB/jdk8/PathAssertionsSpec.kt delete mode 100644 misc/deprecated/apis/fluent-en_GB-jdk8/atrium-api-fluent-en_GB-jdk8-jvm/src/test/kotlin/ch/tutteli/atrium/api/fluent/en_GB/jdk8/PathFeatureAssertionsSpec.kt delete mode 100644 misc/deprecated/apis/fluent-en_GB-jdk8/atrium-api-fluent-en_GB-jdk8-jvm/src/test/kotlin/ch/tutteli/atrium/api/fluent/en_GB/jdk8/ZonedDateTimeAssertionsSpec.kt delete mode 100644 misc/deprecated/atrium-assertions/build.gradle delete mode 100644 misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/any/typetransformation/AnyTypeTransformation.kt delete mode 100644 misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/any/typetransformation/DownCaster.kt delete mode 100644 misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/any/typetransformation/ExplanatoryTypeTransformationFailureHandler.kt delete mode 100644 misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/any/typetransformation/TypeTransformer.kt delete mode 100644 misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/anyAssertions.kt delete mode 100644 misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/basic/contains/builders/containsValidators.kt delete mode 100644 misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/basic/contains/checkers/ContainsChecker.kt delete mode 100644 misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/basic/contains/creators/ContainsAssertionCreator.kt delete mode 100644 misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/basic/contains/creators/ContainsObjectsAssertionCreator.kt delete mode 100644 misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/bigDecimalAssertions.kt delete mode 100644 misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/charSequenceAssertions.kt delete mode 100644 misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/charsequence/contains/builders/CharSequenceContainsAtLeastCheckerBuilderBase.kt delete mode 100644 misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/charsequence/contains/builders/CharSequenceContainsAtMostCheckerBuilderBase.kt delete mode 100644 misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/charsequence/contains/builders/CharSequenceContainsButAtMostCheckerBuilderBase.kt delete mode 100644 misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/charsequence/contains/builders/CharSequenceContainsExactlyCheckerBuilderBase.kt delete mode 100644 misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/charsequence/contains/builders/CharSequenceContainsNotCheckerBuilderBase.kt delete mode 100644 misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/charsequence/contains/builders/CharSequenceContainsNotOrAtMostCheckerBuilderBase.kt delete mode 100644 misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/charsequence/contains/checkers/CharSequenceContainsAtLeastChecker.kt delete mode 100644 misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/charsequence/contains/checkers/CharSequenceContainsAtMostChecker.kt delete mode 100644 misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/charsequence/contains/checkers/CharSequenceContainsChecker.kt delete mode 100644 misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/charsequence/contains/checkers/CharSequenceContainsExactlyChecker.kt delete mode 100644 misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/charsequence/contains/checkers/CharSequenceContainsNotChecker.kt delete mode 100644 misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/charsequence/contains/creators/CharSequenceContainsAssertionCreator.kt delete mode 100644 misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/charsequence/contains/creators/creators.kt delete mode 100644 misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/charsequence/contains/searchbehaviours/searchBehaviours.kt delete mode 100644 misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/charsequence/contains/searchers/CharSequenceContainsIgnoringCaseIndexSearcher.kt delete mode 100644 misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/charsequence/contains/searchers/CharSequenceContainsIgnoringCaseRegexSearcher.kt delete mode 100644 misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/charsequence/contains/searchers/CharSequenceContainsIndexSearcher.kt delete mode 100644 misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/charsequence/contains/searchers/CharSequenceContainsRegexSearcher.kt delete mode 100644 misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/collectionAssertions.kt delete mode 100644 misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/comparableAssertions.kt delete mode 100644 misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/featureAssertions.kt delete mode 100644 misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/floatingPointAssertions.kt delete mode 100644 misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/iterable/contains/builders/IterableContainsAtLeastCheckerBuilderBase.kt delete mode 100644 misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/iterable/contains/builders/IterableContainsAtMostCheckerBuilderBase.kt delete mode 100644 misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/iterable/contains/builders/IterableContainsButAtMostCheckerBuilderBase.kt delete mode 100644 misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/iterable/contains/builders/IterableContainsExactlyCheckerBuilderBase.kt delete mode 100644 misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/iterable/contains/builders/IterableContainsNotCheckerBuilderBase.kt delete mode 100644 misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/iterable/contains/builders/IterableContainsNotOrAtMostCheckerBuilderBase.kt delete mode 100644 misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/iterable/contains/checkers/IterableContainsAtLeastChecker.kt delete mode 100644 misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/iterable/contains/checkers/IterableContainsAtMostChecker.kt delete mode 100644 misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/iterable/contains/checkers/IterableContainsChecker.kt delete mode 100644 misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/iterable/contains/checkers/IterableContainsExactlyChecker.kt delete mode 100644 misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/iterable/contains/checkers/IterableContainsNotChecker.kt delete mode 100644 misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/iterable/contains/creators/IterableContainsInAnyOrderEntriesAssertionCreator.kt delete mode 100644 misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/iterable/contains/creators/IterableContainsInAnyOrderObjectsAssertionCreator.kt delete mode 100644 misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/iterable/contains/creators/IterableContainsInAnyOrderOnlyAssertionCreator.kt delete mode 100644 misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/iterable/contains/creators/IterableContainsInAnyOrderOnlyEntriesAssertionCreator.kt delete mode 100644 misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/iterable/contains/creators/IterableContainsInAnyOrderOnlyObjectsAssertionCreator.kt delete mode 100644 misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/iterable/contains/creators/IterableContainsInOrderOnlyAssertionCreator.kt delete mode 100644 misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/iterable/contains/creators/IterableContainsInOrderOnlyEntriesAssertionCreator.kt delete mode 100644 misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/iterable/contains/creators/IterableContainsInOrderOnlyObjectsAssertionCreator.kt delete mode 100644 misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/iterable/contains/creators/containsEntriesFun.kt delete mode 100644 misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/iterable/contains/creators/creators.kt delete mode 100644 misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/iterable/contains/searchbehaviours/searchBehaviours.kt delete mode 100644 misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/iterableAssertions.kt delete mode 100644 misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/throwable/thrown/creators/ThrowableThrownAssertionCreator.kt delete mode 100644 misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/throwable/thrown/providers/TranslatableAsAbsentThrowableMessageProvider.kt delete mode 100644 misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/throwableAssertions.kt delete mode 100644 misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/typeTransformationAssertions.kt delete mode 100644 misc/deprecated/atrium-spec/build.gradle delete mode 100644 misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/AssertionVerb.kt delete mode 100644 misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/AssertionVerbFactory.kt delete mode 100644 misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/SpecBodyExtensions.kt delete mode 100644 misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/SpekExtensions.kt delete mode 100644 misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/creating/CheckingAssertionPlantSpec.kt delete mode 100644 misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/creating/CollectingAssertionPlantSpec.kt delete mode 100644 misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/creating/ReportingAssertionPlantSpec.kt delete mode 100644 misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/AnyAssertionsSpec.kt delete mode 100644 misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/ArrayAsIterableAssertionsSpec.kt delete mode 100644 misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/BigDecimalAssertionsSpec.kt delete mode 100644 misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/BooleanAssertionsSpec.kt delete mode 100644 misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/CharSequenceAssertionsSpec.kt delete mode 100644 misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/CharSequenceContainsAtLeastAssertionsSpec.kt delete mode 100644 misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/CharSequenceContainsAtMostAssertionsSpec.kt delete mode 100644 misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/CharSequenceContainsContainsNotAssertionsSpec.kt delete mode 100644 misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/CharSequenceContainsDefaultTranslationAssertionsSpec.kt delete mode 100644 misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/CharSequenceContainsExactlyAssertionsSpec.kt delete mode 100644 misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/CharSequenceContainsNotAssertionsSpec.kt delete mode 100644 misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/CharSequenceContainsNotOrAtMostAssertionsSpec.kt delete mode 100644 misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/CharSequenceContainsRegexAssertionsSpec.kt delete mode 100644 misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/CharSequenceContainsSpecBase.kt delete mode 100644 misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/CheckingAssertionSpec.kt delete mode 100644 misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/CollectionAssertionsSpec.kt delete mode 100644 misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/CollectionFeatureAssertionsSpec.kt delete mode 100644 misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/ComparableAssertionsSpec.kt delete mode 100644 misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/FeatureAssertionsBoundedReferenceWhenCollectingPlantSpec.kt delete mode 100644 misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/FeatureAssertionsSpec.kt delete mode 100644 misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/FloatingPointWithErrorToleranceAssertionsSpec.kt delete mode 100644 misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/IterableAllAssertionsSpec.kt delete mode 100644 misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/IterableAnyAssertionsSpec.kt delete mode 100644 misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/IterableContainsEntriesSpecBase.kt delete mode 100644 misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/IterableContainsInAnyOrderAtLeast1EntriesAssertionsSpec.kt delete mode 100644 misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/IterableContainsInAnyOrderAtLeast1ValuesAssertionsSpec.kt delete mode 100644 misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/IterableContainsInAnyOrderAtLeastValuesAssertionSpec.kt delete mode 100644 misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/IterableContainsInAnyOrderAtMostValuesAssertionSpec.kt delete mode 100644 misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/IterableContainsInAnyOrderExactlyValuesAssertionsSpec.kt delete mode 100644 misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/IterableContainsInAnyOrderNotOrAtMostValuesAssertionsSpec.kt delete mode 100644 misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/IterableContainsInAnyOrderOnlyEntriesAssertionsSpec.kt delete mode 100644 misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/IterableContainsInAnyOrderOnlyValuesAssertionsSpec.kt delete mode 100644 misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/IterableContainsInOrderOnlyEntriesAssertionsSpec.kt delete mode 100644 misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/IterableContainsInOrderOnlyGroupedEntriesAssertionsSpec.kt delete mode 100644 misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/IterableContainsInOrderOnlyGroupedValuesAssertionsSpec.kt delete mode 100644 misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/IterableContainsInOrderOnlyValuesAssertionsSpec.kt delete mode 100644 misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/IterableContainsNotEntriesAssertionsSpec.kt delete mode 100644 misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/IterableContainsNotValuesAssertionsSpec.kt delete mode 100644 misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/IterableContainsSpecBase.kt delete mode 100644 misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/IterableNoneAssertionsSpec.kt delete mode 100644 misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/IterablePredicateSpecBase.kt delete mode 100644 misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/KeyValueLikeFeatureAssertionsSpec.kt delete mode 100644 misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/ListFeatureAssertionsSpec.kt delete mode 100644 misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/MapAsEntriesAssertionsSpec.kt delete mode 100644 misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/MapAssertionsSpec.kt delete mode 100644 misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/MapEntryAssertionsSpec.kt delete mode 100644 misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/MapEntryFeatureAssertionsSpec.kt delete mode 100644 misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/MapFeatureAssertionsSpec.kt delete mode 100644 misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/PairFeatureAssertionsSpec.kt delete mode 100644 misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/SimpleMapEntry.kt delete mode 100644 misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/SubjectLessAssertionSpec.kt delete mode 100644 misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/ThrowableAssertionsSpec.kt delete mode 100644 misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/TypeTransformationAssertionsSpec.kt delete mode 100644 misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/iterableAbsentSubjectTest.kt delete mode 100644 misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/verbs/VerbSpec.kt delete mode 100644 misc/deprecated/bundles/atrium-cc-en_UK-robstoll/build.gradle delete mode 100644 misc/deprecated/bundles/atrium-cc-en_UK-robstoll/src/test/kotlin/SmokeSpec.kt delete mode 100644 misc/deprecated/bundles/atrium-cc-infix-en_UK-robstoll/build.gradle delete mode 100644 misc/deprecated/bundles/atrium-cc-infix-en_UK-robstoll/src/test/kotlin/SmokeSpec.kt delete mode 100644 misc/deprecated/bundles/cc-de_CH-robstoll/atrium-cc-de_CH-robstoll-common/build.gradle delete mode 100644 misc/deprecated/bundles/cc-de_CH-robstoll/atrium-cc-de_CH-robstoll-common/src/test/kotlin/SmokeTest.kt delete mode 100644 misc/deprecated/bundles/cc-de_CH-robstoll/atrium-cc-de_CH-robstoll-js/build.gradle delete mode 100644 misc/deprecated/bundles/cc-de_CH-robstoll/atrium-cc-de_CH-robstoll-js/src/main/kotlin/ch/tutteli/atrium/cc/de_CH/robstoll/dependOnMe.kt delete mode 100644 misc/deprecated/bundles/cc-de_CH-robstoll/atrium-cc-de_CH-robstoll-js/src/test/kotlin/testSetup.kt delete mode 100644 misc/deprecated/bundles/cc-de_CH-robstoll/atrium-cc-de_CH-robstoll-jvm/build.gradle delete mode 100644 misc/deprecated/bundles/cc-en_GB-robstoll/atrium-cc-en_GB-robstoll-common/build.gradle delete mode 100644 misc/deprecated/bundles/cc-en_GB-robstoll/atrium-cc-en_GB-robstoll-common/src/test/kotlin/SmokeTest.kt delete mode 100644 misc/deprecated/bundles/cc-en_GB-robstoll/atrium-cc-en_GB-robstoll-js/build.gradle delete mode 100644 misc/deprecated/bundles/cc-en_GB-robstoll/atrium-cc-en_GB-robstoll-js/src/main/kotlin/ch/tutteli/atrium/cc/en_GB/robstoll/dependOnMe.kt delete mode 100644 misc/deprecated/bundles/cc-en_GB-robstoll/atrium-cc-en_GB-robstoll-js/src/test/kotlin/testSetup.kt delete mode 100644 misc/deprecated/bundles/cc-en_GB-robstoll/atrium-cc-en_GB-robstoll-jvm/build.gradle delete mode 100644 misc/deprecated/bundles/cc-en_GB-robstoll/atrium-cc-en_GB-robstoll-jvm/src/module/module-info.java delete mode 100644 misc/deprecated/bundles/cc-en_GB-robstoll/atrium-cc-en_GB-robstoll-jvm/src/test/kotlin/custom/SmokeSpec.kt delete mode 100644 misc/deprecated/bundles/cc-en_GB-robstoll/atrium-cc-en_GB-robstoll-smoke-test/src/test/kotlin/module-info.java delete mode 100644 misc/deprecated/bundles/cc-infix-en_GB-robstoll/atrium-cc-infix-en_GB-robstoll-common/build.gradle delete mode 100644 misc/deprecated/bundles/cc-infix-en_GB-robstoll/atrium-cc-infix-en_GB-robstoll-common/src/test/kotlin/SmokeTest.kt delete mode 100644 misc/deprecated/bundles/cc-infix-en_GB-robstoll/atrium-cc-infix-en_GB-robstoll-js/build.gradle delete mode 100644 misc/deprecated/bundles/cc-infix-en_GB-robstoll/atrium-cc-infix-en_GB-robstoll-js/src/main/kotlin/ch/tutteli/atrium/cc/infix/en_GB/robstoll/dependOnMe.kt delete mode 100644 misc/deprecated/bundles/cc-infix-en_GB-robstoll/atrium-cc-infix-en_GB-robstoll-js/src/test/kotlin/testSetup.kt delete mode 100644 misc/deprecated/bundles/cc-infix-en_GB-robstoll/atrium-cc-infix-en_GB-robstoll-jvm/build.gradle delete mode 100644 misc/deprecated/bundles/cc-infix-en_GB-robstoll/atrium-cc-infix-en_GB-robstoll-jvm/src/module/module-info.java delete mode 100644 misc/deprecated/bundles/cc-infix-en_GB-robstoll/atrium-cc-infix-en_GB-robstoll-jvm/src/test/kotlin/custom/SmokeSpec.kt delete mode 100644 misc/deprecated/bundles/cc-infix-en_GB-robstoll/atrium-cc-infix-en_GB-robstoll-smoke-test/src/test/kotlin/module-info.java delete mode 100644 misc/deprecated/core/atrium-core-api-deprecated/build.gradle delete mode 100644 misc/deprecated/core/atrium-core-api-deprecated/src/main/kotlin/ch/tutteli/atrium/IAtriumFactory.kt delete mode 100644 misc/deprecated/core/atrium-core-robstoll-deprecated/build.gradle delete mode 100644 misc/deprecated/core/atrium-core-robstoll-deprecated/src/main/kotlin/ch/tutteli/atrium/AtriumFactory.kt delete mode 100644 misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/assertions/composers/AssertionComposer.kt delete mode 100644 misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/AnyAssertions.kt delete mode 100644 misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/CharSequenceAssertions.kt delete mode 100644 misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/CollectionAssertions.kt delete mode 100644 misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/ComparableAssertions.kt delete mode 100644 misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/FeatureAssertions.kt delete mode 100644 misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/FloatingPointAssertions.kt delete mode 100644 misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/Fun0Assertions.kt delete mode 100644 misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/IterableAssertions.kt delete mode 100644 misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/IteratorAssertions.kt delete mode 100644 misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/ListAssertions.kt delete mode 100644 misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/MapAssertions.kt delete mode 100644 misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/MapEntryAssertions.kt delete mode 100644 misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/PairAssertions.kt delete mode 100644 misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/ThrowableAssertions.kt delete mode 100644 misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/any/typetransformation/AnyTypeTransformation.kt delete mode 100644 misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/any/typetransformation/creators/AnyTypeTransformationAssertions.kt delete mode 100644 misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/any/typetransformation/failurehandlers/FailureHandlerFactory.kt delete mode 100644 misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/basic/contains/Contains.kt delete mode 100644 misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/changers/ChangedSubjectPostStep.kt delete mode 100644 misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/changers/ExtractedFeaturePostStep.kt delete mode 100644 misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/changers/FeatureExtractor.kt delete mode 100644 misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/changers/PostFinalStep.kt delete mode 100644 misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/changers/SubjectChanger.kt delete mode 100644 misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/charsequence/contains/CharSequenceContains.kt delete mode 100644 misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/charsequence/contains/checkers/CheckerFactory.kt delete mode 100644 misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/charsequence/contains/creators/CharSequenceContainsAssertions.kt delete mode 100644 misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/charsequence/contains/searchbehaviours/IgnoringCaseSearchBehaviour.kt delete mode 100644 misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/charsequence/contains/searchbehaviours/NoOpSearchBehaviour.kt delete mode 100644 misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/charsequence/contains/searchbehaviours/NotSearchBehaviour.kt delete mode 100644 misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/charsequence/contains/searchbehaviours/SearchBehaviourFactory.kt delete mode 100644 misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/collectors/AssertionCollectorForExplanation.kt delete mode 100644 misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/feature/extract/FeatureExtractor.kt delete mode 100644 misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/feature/extract/creators/FeatureExtractorCreatorFactory.kt delete mode 100644 misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/feature/extract/impl/deprecatedImpl.kt delete mode 100644 misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/iterable/contains/IterableContains.kt delete mode 100644 misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/iterable/contains/checkers/CheckerFactory.kt delete mode 100644 misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/iterable/contains/creators/IterableContainsAssertions.kt delete mode 100644 misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/iterable/contains/searchbehaviours/InAnyOrderOnlySearchBehaviour.kt delete mode 100644 misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/iterable/contains/searchbehaviours/InAnyOrderSearchBehaviour.kt delete mode 100644 misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/iterable/contains/searchbehaviours/InOrderOnlyGroupedSearchBehaviour.kt delete mode 100644 misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/iterable/contains/searchbehaviours/InOrderOnlyGroupedWithinSearchBehaviour.kt delete mode 100644 misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/iterable/contains/searchbehaviours/InOrderOnlySearchBehaviour.kt delete mode 100644 misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/iterable/contains/searchbehaviours/InOrderSearchBehaviour.kt delete mode 100644 misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/iterable/contains/searchbehaviours/NoOpSearchBehaviour.kt delete mode 100644 misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/iterable/contains/searchbehaviours/NotSearchBehaviour.kt delete mode 100644 misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/iterable/contains/searchbehaviours/SearchBehaviourFactory.kt delete mode 100644 misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/throwable/thrown/ThrowableThrown.kt delete mode 100644 misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/throwable/thrown/creators/ThrowableThrownAssertions.kt delete mode 100644 misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/throwable/thrown/providers/AbsentThrowableMessageProviderFactory.kt delete mode 100644 misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/typeutils/CharSequenceOrNumberOrChar.kt delete mode 100644 misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/typeutils/IterableLike.kt delete mode 100644 misc/deprecated/domain/api/atrium-domain-api-js/src/main/kotlin/ch/tutteli/atrium/domain/creating/FloatingPointAssertions.kt delete mode 100644 misc/deprecated/domain/api/atrium-domain-api-jvm/src/main/kotlin/ch/tutteli/atrium/domain/creating/BigDecimalAssertions.kt delete mode 100644 misc/deprecated/domain/api/atrium-domain-api-jvm/src/main/kotlin/ch/tutteli/atrium/domain/creating/ChronoLocalDateAssertions.kt delete mode 100644 misc/deprecated/domain/api/atrium-domain-api-jvm/src/main/kotlin/ch/tutteli/atrium/domain/creating/ChronoLocalDateTimeAssertions.kt delete mode 100644 misc/deprecated/domain/api/atrium-domain-api-jvm/src/main/kotlin/ch/tutteli/atrium/domain/creating/ChronoZonedDateTimeAssertions.kt delete mode 100644 misc/deprecated/domain/api/atrium-domain-api-jvm/src/main/kotlin/ch/tutteli/atrium/domain/creating/FloatingPointAssertions.kt delete mode 100644 misc/deprecated/domain/api/atrium-domain-api-jvm/src/main/kotlin/ch/tutteli/atrium/domain/creating/LocalDateAssertions.kt delete mode 100644 misc/deprecated/domain/api/atrium-domain-api-jvm/src/main/kotlin/ch/tutteli/atrium/domain/creating/LocalDateTimeAssertions.kt delete mode 100644 misc/deprecated/domain/api/atrium-domain-api-jvm/src/main/kotlin/ch/tutteli/atrium/domain/creating/OptionalAssertions.kt delete mode 100644 misc/deprecated/domain/api/atrium-domain-api-jvm/src/main/kotlin/ch/tutteli/atrium/domain/creating/PathAssertions.kt delete mode 100644 misc/deprecated/domain/api/atrium-domain-api-jvm/src/main/kotlin/ch/tutteli/atrium/domain/creating/ZonedDateTimeAssertions.kt delete mode 100644 misc/deprecated/domain/api/extensions/kotlin_1_3/atrium-domain-api-kotlin_1_3-common/build.gradle delete mode 100644 misc/deprecated/domain/api/extensions/kotlin_1_3/atrium-domain-api-kotlin_1_3-common/src/main/kotlin/ch/tutteli/atrium/domain/kotlin_1_3/creating/ResultAssertions.kt delete mode 100644 misc/deprecated/domain/api/extensions/kotlin_1_3/atrium-domain-api-kotlin_1_3-js/build.gradle delete mode 100644 misc/deprecated/domain/api/extensions/kotlin_1_3/atrium-domain-api-kotlin_1_3-jvm/build.gradle delete mode 100644 misc/deprecated/domain/api/extensions/kotlin_1_3/atrium-domain-api-kotlin_1_3-jvm/src/module/module-info.java delete mode 100644 misc/deprecated/domain/atrium-domain-api-deprecated/build.gradle delete mode 100644 misc/deprecated/domain/atrium-domain-api-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/basic/contains/Contains.kt delete mode 100644 misc/deprecated/domain/atrium-domain-api-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/basic/contains/builders/ContainsBuilder.kt delete mode 100644 misc/deprecated/domain/atrium-domain-api-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/basic/contains/builders/ContainsCheckerBuilder.kt delete mode 100644 misc/deprecated/domain/atrium-domain-api-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/charsequence/contains/CharSequenceContains.kt delete mode 100644 misc/deprecated/domain/atrium-domain-api-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/charsequence/contains/builders/CharSequenceContainsBuilder.kt delete mode 100644 misc/deprecated/domain/atrium-domain-api-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/charsequence/contains/builders/CharSequenceContainsCheckerBuilder.kt delete mode 100644 misc/deprecated/domain/atrium-domain-api-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/charsequence/contains/searchbehaviours/CharSequenceContainsIgnoringCaseSearchBehaviour.kt delete mode 100644 misc/deprecated/domain/atrium-domain-api-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/charsequence/contains/searchbehaviours/CharSequenceContainsNoOpSearchBehaviour.kt delete mode 100644 misc/deprecated/domain/atrium-domain-api-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/charsequence/contains/searchbehaviours/CharSequenceContainsNotSearchBehaviour.kt delete mode 100644 misc/deprecated/domain/atrium-domain-api-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/iterable/contains/IterableContains.kt delete mode 100644 misc/deprecated/domain/atrium-domain-api-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/iterable/contains/builders/IterableContainsBuilder.kt delete mode 100644 misc/deprecated/domain/atrium-domain-api-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/iterable/contains/builders/IterableContainsCheckerBuilder.kt delete mode 100644 misc/deprecated/domain/atrium-domain-api-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/iterable/contains/builders/IterableContainsNoOpCheckerBuilder.kt delete mode 100644 misc/deprecated/domain/atrium-domain-api-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/iterable/contains/searchbehaviours/IterableContainsInAnyOrderOnlySearchBehaviour.kt delete mode 100644 misc/deprecated/domain/atrium-domain-api-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/iterable/contains/searchbehaviours/IterableContainsInAnyOrderSearchBehaviour.kt delete mode 100644 misc/deprecated/domain/atrium-domain-api-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/iterable/contains/searchbehaviours/IterableContainsInOrderOnlySearchBehaviour.kt delete mode 100644 misc/deprecated/domain/atrium-domain-api-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/iterable/contains/searchbehaviours/IterableContainsInOrderSearchBehaviour.kt delete mode 100644 misc/deprecated/domain/atrium-domain-api-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/iterable/contains/searchbehaviours/IterableContainsNoOpSearchBehaviour.kt delete mode 100644 misc/deprecated/domain/atrium-domain-api-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/iterable/contains/searchbehaviours/IterableContainsNotSearchBehaviour.kt delete mode 100644 misc/deprecated/domain/atrium-domain-api-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/throwable/thrown/ThrowableThrown.kt delete mode 100644 misc/deprecated/domain/atrium-domain-api-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/throwable/thrown/builders/ThrowableThrownBuilder.kt delete mode 100644 misc/deprecated/domain/atrium-domain-api-deprecated/src/main/kotlin/ch/tutteli/atrium/reporting/ReporterBuilder.kt delete mode 100644 misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/AssertImpl.kt delete mode 100644 misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/ExpectImpl.kt delete mode 100644 misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/CollectionAssertionsBuilder.kt delete mode 100644 misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/ComparableAssertionsBuilder.kt delete mode 100644 misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/FeatureAssertionsBuilder.kt delete mode 100644 misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/FloatingPointAssertionsBuilder.kt delete mode 100644 misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/Fun0AssertionsBuilder.kt delete mode 100644 misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/IteratorAssertionsBuilder.kt delete mode 100644 misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/ListAssertionsBuilder.kt delete mode 100644 misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/MapAssertionsBuilder.kt delete mode 100644 misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/MapEntryAssertionsBuilder.kt delete mode 100644 misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/PairAssertionsBuilder.kt delete mode 100644 misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/anyAssertionsBuilders.kt delete mode 100644 misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/basic/contains/CheckOptionExtension.kt delete mode 100644 misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/changers/FeatureExtractorBuilder.kt delete mode 100644 misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/changers/SubjectChangerBuilder.kt delete mode 100644 misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/changers/impl/featureextractor/OptionsChooserImpl.kt delete mode 100644 misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/changers/impl/featureextractor/defaultImpls.kt delete mode 100644 misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/changers/impl/subjectchanger/DefaultFailureHandlerImpl.kt delete mode 100644 misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/changers/impl/subjectchanger/defaultImpls.kt delete mode 100644 misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/charSequenceAssertionsBuilders.kt delete mode 100644 misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/charsequence/contains/builders/AtLeastCheckerOptionBase.kt delete mode 100644 misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/charsequence/contains/builders/AtMostCheckerOptionBase.kt delete mode 100644 misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/charsequence/contains/builders/ButAtMostCheckerOptionBase.kt delete mode 100644 misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/charsequence/contains/builders/ExactlyCheckerOptionBase.kt delete mode 100644 misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/charsequence/contains/builders/NotCheckerOptionBase.kt delete mode 100644 misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/charsequence/contains/builders/NotOrAtMostCheckerOptionBase.kt delete mode 100644 misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/charsequence/contains/builders/WithTimesCheckerOption.kt delete mode 100644 misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/collectors/AssertionCollectorBuilder.kt delete mode 100644 misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/iterable/contains/builders/AtLeastCheckerOptionBase.kt delete mode 100644 misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/iterable/contains/builders/AtMostCheckerOptionBase.kt delete mode 100644 misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/iterable/contains/builders/ButAtMostCheckerOptionBase.kt delete mode 100644 misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/iterable/contains/builders/ExactlyCheckerOptionBase.kt delete mode 100644 misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/iterable/contains/builders/NotCheckerOptionBase.kt delete mode 100644 misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/iterable/contains/builders/NotOrAtMostCheckerOptionBase.kt delete mode 100644 misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/iterable/contains/builders/WithTimesCheckerOption.kt delete mode 100644 misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/iterableAssertionsBuilders.kt delete mode 100644 misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/throwableAssertionsBuilders.kt delete mode 100644 misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/migration/assertToExpect.kt delete mode 100644 misc/deprecated/domain/builders/atrium-domain-builders-common/src/test/kotlin/ch/tutteli/atrium/domain/builders/utils/MapArgumentsSpec.kt delete mode 100644 misc/deprecated/domain/builders/atrium-domain-builders-js/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/FloatingPointAssertionsBuilder.kt delete mode 100644 misc/deprecated/domain/builders/atrium-domain-builders-jvm/src/main/kotlin/ch/tutteli/atrium/domain/builders/AssertImpl.kt delete mode 100644 misc/deprecated/domain/builders/atrium-domain-builders-jvm/src/main/kotlin/ch/tutteli/atrium/domain/builders/ExpectImpl.kt delete mode 100644 misc/deprecated/domain/builders/atrium-domain-builders-jvm/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/BigDecimalAssertionsBuilder.kt delete mode 100644 misc/deprecated/domain/builders/atrium-domain-builders-jvm/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/ChronoLocalDateAssertionsBuilder.kt delete mode 100644 misc/deprecated/domain/builders/atrium-domain-builders-jvm/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/ChronoLocalDateTimeAssertionsBuilder.kt delete mode 100644 misc/deprecated/domain/builders/atrium-domain-builders-jvm/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/ChronoZonedDateTimeAssertionsBuilder.kt delete mode 100644 misc/deprecated/domain/builders/atrium-domain-builders-jvm/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/FloatingPointAssertionsBuilder.kt delete mode 100644 misc/deprecated/domain/builders/atrium-domain-builders-jvm/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/LocalDateAssertionsBuilder.kt delete mode 100644 misc/deprecated/domain/builders/atrium-domain-builders-jvm/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/LocalDateTimeAssertionsBuilder.kt delete mode 100644 misc/deprecated/domain/builders/atrium-domain-builders-jvm/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/OptionalAssertionsBuilder.kt delete mode 100644 misc/deprecated/domain/builders/atrium-domain-builders-jvm/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/PathAssertionsBuilder.kt delete mode 100644 misc/deprecated/domain/builders/atrium-domain-builders-jvm/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/ZonedDateTimeAssertionsBuilder.kt delete mode 100644 misc/deprecated/domain/builders/atrium-domain-builders-jvm/src/test/kotlin/ch/tutteli/atrium/domain/builders/creating/FeatureAssertionsBuilderNameRepresentationSpec.kt delete mode 100644 misc/deprecated/domain/builders/atrium-domain-builders-jvm/src/test/kotlin/ch/tutteli/atrium/domain/builders/creating/FeatureAssertionsBuilderNameSpec.kt delete mode 100644 misc/deprecated/domain/builders/atrium-domain-builders-jvm/src/test/kotlin/ch/tutteli/atrium/domain/builders/utils/NullableSpec.kt delete mode 100644 misc/deprecated/domain/builders/extensions/kotlin_1_3/atrium-domain-builders-kotlin_1_3-common/build.gradle delete mode 100644 misc/deprecated/domain/builders/extensions/kotlin_1_3/atrium-domain-builders-kotlin_1_3-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/kotlin_1_3/ExpectImplExtensions.kt delete mode 100644 misc/deprecated/domain/builders/extensions/kotlin_1_3/atrium-domain-builders-kotlin_1_3-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/kotlin_1_3/creating/ResultAssertionsBuilder.kt delete mode 100644 misc/deprecated/domain/builders/extensions/kotlin_1_3/atrium-domain-builders-kotlin_1_3-js/build.gradle delete mode 100644 misc/deprecated/domain/builders/extensions/kotlin_1_3/atrium-domain-builders-kotlin_1_3-jvm/build.gradle delete mode 100644 misc/deprecated/domain/builders/extensions/kotlin_1_3/atrium-domain-builders-kotlin_1_3-jvm/src/module/module-info.java delete mode 100644 misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/assertions/LazyThreadUnsafeAssertionGroup.kt delete mode 100644 misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/assertions/LazyThreadUnsafeBasicAssertion.kt delete mode 100644 misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/assertions/composers/descriptiveWithFailureHint.kt delete mode 100644 misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/any/typetransformation/creators/DownCastAssertionCreator.kt delete mode 100644 misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/any/typetransformation/creators/TypeTransformationAssertionCreator.kt delete mode 100644 misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/any/typetransformation/creators/deprecatedCreators.kt delete mode 100644 misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/any/typetransformation/failurehandlers/ExplanatoryFailureHandler.kt delete mode 100644 misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/any/typetransformation/failurehandlers/ExplanatoryFailureHandlerBase.kt delete mode 100644 misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/any/typetransformation/failurehandlers/ExplanatoryFailureHandlerWithHint.kt delete mode 100644 misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/any/typetransformation/failurehandlers/ThrowableThrownFailureHandler.kt delete mode 100644 misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/anyAssertions.kt delete mode 100644 misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/anyAssertionsDeprecated.kt delete mode 100644 misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/basic/contains/builders/ContainsBuilder.kt delete mode 100644 misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/basic/contains/checkers/ContainsChecker.kt delete mode 100644 misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/basic/contains/creators/ContainsAssertionCreator.kt delete mode 100644 misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/basic/contains/creators/ContainsObjectsAssertionCreator.kt delete mode 100644 misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/changers/changeSubject.kt delete mode 100644 misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/changers/extractFeature.kt delete mode 100644 misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/charSequenceAssertions.kt delete mode 100644 misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/charsequence/contains/builders/CharSequenceContainsBuilder.kt delete mode 100644 misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/charsequence/contains/checkers/AtLeastChecker.kt delete mode 100644 misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/charsequence/contains/checkers/AtMostChecker.kt delete mode 100644 misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/charsequence/contains/checkers/Checker.kt delete mode 100644 misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/charsequence/contains/checkers/ExactlyChecker.kt delete mode 100644 misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/charsequence/contains/checkers/NotChecker.kt delete mode 100644 misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/charsequence/contains/creators/CharSequenceContainsAssertionCreator.kt delete mode 100644 misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/charsequence/contains/creators/creators.kt delete mode 100644 misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/charsequence/contains/searchbehaviours/IgnoringCaseSearchBehaviourImpl.kt delete mode 100644 misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/charsequence/contains/searchbehaviours/NoOpSearchBehaviourImpl.kt delete mode 100644 misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/charsequence/contains/searchbehaviours/NotSearchBehaviourImpl.kt delete mode 100644 misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/charsequence/contains/searchbehaviours/searchBehaviours.kt delete mode 100644 misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/charsequence/contains/searchers/IgnoringCaseIndexSearcher.kt delete mode 100644 misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/charsequence/contains/searchers/IgnoringCaseRegexSearcher.kt delete mode 100644 misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/charsequence/contains/searchers/IndexSearcher.kt delete mode 100644 misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/charsequence/contains/searchers/RegexSearcher.kt delete mode 100644 misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/collectionAssertions.kt delete mode 100644 misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/collectionAssertionsDeprecated.kt delete mode 100644 misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/collectors/AssertionCollectorForExplanationImpl.kt delete mode 100644 misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/collectors/collectAssertionsDeprecated.kt delete mode 100644 misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/collectors/collectOrExplainDeprecated.kt delete mode 100644 misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/comparableAssertions.kt delete mode 100644 misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/feature/extract/creators/FeatureExtractorCreatorImpl.kt delete mode 100644 misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/featureAssertions.kt delete mode 100644 misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/featureAssertionsDeprecated.kt delete mode 100644 misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/floatingPointAssertions.kt delete mode 100644 misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/fun0Assertions.kt delete mode 100644 misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/builders/IterableContainsBuilder.kt delete mode 100644 misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/builders/NoOpCheckerOption.kt delete mode 100644 misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/checkers/AtLeastChecker.kt delete mode 100644 misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/checkers/AtMostChecker.kt delete mode 100644 misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/checkers/Checker.kt delete mode 100644 misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/checkers/ExactlyChecker.kt delete mode 100644 misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/checkers/NotChecker.kt delete mode 100644 misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/containsHelperFun.kt delete mode 100644 misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/creators/InAnyOrderEntriesAssertionCreator.kt delete mode 100644 misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/creators/InAnyOrderEntriesDeprecatedAssertionCreator.kt delete mode 100644 misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/creators/InAnyOrderOnlyAssertionCreator.kt delete mode 100644 misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/creators/InAnyOrderOnlyEntriesAssertionCreator.kt delete mode 100644 misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/creators/InAnyOrderOnlyEntriesDeprecatedAssertionCreator.kt delete mode 100644 misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/creators/InAnyOrderOnlyValuesAssertionCreator.kt delete mode 100644 misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/creators/InAnyOrderValuesAssertionCreator.kt delete mode 100644 misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/creators/InOrderOnlyAssertionCreator.kt delete mode 100644 misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/creators/InOrderOnlyBaseAssertionCreator.kt delete mode 100644 misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/creators/InOrderOnlyDeprecatedAssertionCreator.kt delete mode 100644 misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/creators/InOrderOnlyDeprecatedMatcher.kt delete mode 100644 misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/creators/InOrderOnlyEntriesAssertionCreator.kt delete mode 100644 misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/creators/InOrderOnlyEntriesDeprecatedAssertionCreator.kt delete mode 100644 misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/creators/InOrderOnlyEntriesDeprecatedMatcher.kt delete mode 100644 misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/creators/InOrderOnlyEntriesMatcher.kt delete mode 100644 misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/creators/InOrderOnlyGroupedAssertionCreator.kt delete mode 100644 misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/creators/InOrderOnlyGroupedDeprecatedAssertionCreator.kt delete mode 100644 misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/creators/InOrderOnlyGroupedEntriesAssertionCreator.kt delete mode 100644 misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/creators/InOrderOnlyGroupedEntriesDeprecatedAssertionCreator.kt delete mode 100644 misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/creators/InOrderOnlyGroupedValuesAssertionCreator.kt delete mode 100644 misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/creators/InOrderOnlyMatcher.kt delete mode 100644 misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/creators/InOrderOnlyValueMatcher.kt delete mode 100644 misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/creators/InOrderOnlyValuesAssertionCreator.kt delete mode 100644 misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/creators/creators.kt delete mode 100644 misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/creators/creatorsDeprecated.kt delete mode 100644 misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/creators/iterableMultiConsumable.kt delete mode 100644 misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/deprecatedContainsHelperFun.kt delete mode 100644 misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/searchbehaviours/InAnyOrderOnlySearchBehaviourImpl.kt delete mode 100644 misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/searchbehaviours/InAnyOrderSearchBehaviourImpl.kt delete mode 100644 misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/searchbehaviours/InOrderOnlyGroupedSearchBehaviourImpl.kt delete mode 100644 misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/searchbehaviours/InOrderOnlyGroupedWithinSearchBehaviourImpl.kt delete mode 100644 misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/searchbehaviours/InOrderOnlySearchBehaviourImpl.kt delete mode 100644 misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/searchbehaviours/InOrderSearchBehaviourImpl.kt delete mode 100644 misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/searchbehaviours/NoOpSearchBehaviourImpl.kt delete mode 100644 misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/searchbehaviours/NotSearchBehaviourImpl.kt delete mode 100644 misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/searchbehaviours/searchBehaviours.kt delete mode 100644 misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterableAssertions.kt delete mode 100644 misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterableAssertionsDeprecated.kt delete mode 100644 misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iteratorAssertions.kt delete mode 100644 misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/listAssertions.kt delete mode 100644 misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/listAssertionsDeprecated.kt delete mode 100644 misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/mapAssertions.kt delete mode 100644 misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/mapAssertionsDeprecated.kt delete mode 100644 misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/mapEntryAssertions.kt delete mode 100644 misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/mapEntryAssertionsDeprecated.kt delete mode 100644 misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/pairAssertions.kt delete mode 100644 misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/pairAssertionsDeprecated.kt delete mode 100644 misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/throwable/thrown/builders/ThrowableThrownBuilder.kt delete mode 100644 misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/throwable/thrown/creators/ThrowableThrownAssertionCreator.kt delete mode 100644 misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/throwable/thrown/creators/ThrowableThrownFailureHandler.kt delete mode 100644 misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/throwable/thrown/creators/creatorsDeprecated.kt delete mode 100644 misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/throwable/thrown/providers/AbsentThrowableMessageProvider.kt delete mode 100644 misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/throwable/thrown/providers/providers.kt delete mode 100644 misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/throwableAssertions.kt delete mode 100644 misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/test/kotlin/ch/tutteli/atrium/assertions/LazyThreadUnsafeAssertionGroupSpec.kt delete mode 100644 misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/test/kotlin/ch/tutteli/atrium/assertions/LazyThreadUnsafeBasicAssertionSpec.kt delete mode 100644 misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/test/kotlin/ch/tutteli/atrium/creating/charsequence/contains/searchers/CharSequenceContainsIndexSearcherSpec.kt delete mode 100644 misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/test/kotlin/ch/tutteli/atrium/creating/charsequence/contains/searchers/CharSequenceContainsRegexSearcherSpec.kt delete mode 100644 misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-js/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/throwable/thrown/creators/createAdditionalHints.kt delete mode 100644 misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-jvm/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/bigDecimalAssertions.kt delete mode 100644 misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-jvm/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/chronoLocalDateAssertions.kt delete mode 100644 misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-jvm/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/chronoLocalDateTimeAssertions.kt delete mode 100644 misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-jvm/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/chronoZonedDateTimeAssertions.kt delete mode 100644 misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-jvm/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/filesystem/IoResult.kt delete mode 100644 misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-jvm/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/filesystem/symbolicLinkResolving.kt delete mode 100644 misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-jvm/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/floatingPointJvmAssertions.kt delete mode 100644 misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-jvm/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/localDateAssertions.kt delete mode 100644 misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-jvm/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/localDateTimeAssertions.kt delete mode 100644 misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-jvm/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/optionalAssertions.kt delete mode 100644 misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-jvm/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/pathAssertions.kt delete mode 100644 misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-jvm/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/throwable/thrown/creators/createAdditionalHints.kt delete mode 100644 misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-jvm/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/zonedDateTimeAssertions.kt delete mode 100644 misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-jvm/src/test/kotlin/ch/tutteli/atrium/assertions/filesystem/IoResultSpec.kt delete mode 100644 misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-jvm/src/test/kotlin/ch/tutteli/atrium/assertions/filesystem/SymbolicLinkResolvingSpec.kt delete mode 100644 misc/deprecated/domain/robstoll-lib/extensions/kotlin_1_3/atrium-domain-robstoll-lib-kotlin_1_3-common/build.gradle delete mode 100644 misc/deprecated/domain/robstoll-lib/extensions/kotlin_1_3/atrium-domain-robstoll-lib-kotlin_1_3-common/src/main/kotlin/ch/tutteli/atrium/domain.robstoll.lib.kotlin_1_3/creating/resultAssertions.kt delete mode 100644 misc/deprecated/domain/robstoll-lib/extensions/kotlin_1_3/atrium-domain-robstoll-lib-kotlin_1_3-js/build.gradle delete mode 100644 misc/deprecated/domain/robstoll-lib/extensions/kotlin_1_3/atrium-domain-robstoll-lib-kotlin_1_3-jvm/build.gradle delete mode 100644 misc/deprecated/domain/robstoll-lib/extensions/kotlin_1_3/atrium-domain-robstoll-lib-kotlin_1_3-jvm/src/module/module-info.java delete mode 100644 misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/assertions/composers/AssertionComposerImpl.kt delete mode 100644 misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/AnyAssertionsDeprecatedImpl.kt delete mode 100644 misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/AnyAssertionsImpl.kt delete mode 100644 misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/CharSequenceAssertionsImpl.kt delete mode 100644 misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/CollectionAssertionsDeprecatedImpl.kt delete mode 100644 misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/CollectionAssertionsImpl.kt delete mode 100644 misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/ComparableAssertionsImpl.kt delete mode 100644 misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/FeatureAssertionsImpl.kt delete mode 100644 misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/Fun0AssertionsImpl.kt delete mode 100644 misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/IterableAssertionsDeprecatedImpl.kt delete mode 100644 misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/IterableAssertionsImpl.kt delete mode 100644 misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/IteratorAssertionsImpl.kt delete mode 100644 misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/ListAssertionsDeprecatedImpl.kt delete mode 100644 misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/ListAssertionsImpl.kt delete mode 100644 misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/MapAssertionsDeprecatedImpl.kt delete mode 100644 misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/MapAssertionsImpl.kt delete mode 100644 misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/MapEntryAssertionsDeprecatedImpl.kt delete mode 100644 misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/MapEntryAssertionsImpl.kt delete mode 100644 misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/NewFeatureAssertionsImpl.kt delete mode 100644 misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/PairAssertionsImpl.kt delete mode 100644 misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/ThrowableAssertionsImpl.kt delete mode 100644 misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/any/typetransformation/creators/AnyTypeTransformationAssertionsImpl.kt delete mode 100644 misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/any/typetransformation/failurehandlers/FailureHandlerFactoryImpl.kt delete mode 100644 misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/changers/FeatureExtractoImpl.kt delete mode 100644 misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/changers/SubjectChangerImpl.kt delete mode 100644 misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/charsequence/contains/checkers/CheckerFactoryImpl.kt delete mode 100644 misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/charsequence/contains/creators/CharSequenceContainsAssertionsImpl.kt delete mode 100644 misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/charsequence/contains/searchbehaviours/SearchBehaviourFactoryImpl.kt delete mode 100644 misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/collectors/AssertionCollectorDeprecatedImpl.kt delete mode 100644 misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/collectors/assertionCollectorsForExplanation.kt delete mode 100644 misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/feature/extract/creators/FeatureExtractorCreatorFactoryImpl.kt delete mode 100644 misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/iterable/contains/checkers/CheckerFactoryImpl.kt delete mode 100644 misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/iterable/contains/creators/IterableContainsAssertionsDeprecatedImpl.kt delete mode 100644 misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/iterable/contains/creators/IterableContainsAssertionsImpl.kt delete mode 100644 misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/iterable/contains/searchbehaviours/SearchBehaviourFactoryImpl.kt delete mode 100644 misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/throwable/thrown/creators/ThrowableThrownAssertionsImpl.kt delete mode 100644 misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/throwable/thrown/providers/AbsentThrowableMessageProviderFactoryImpl.kt delete mode 100644 misc/deprecated/domain/robstoll/atrium-domain-robstoll-js/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/FloatingPointAssertionsImpl.kt delete mode 100644 misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/BigDecimalAssertionsImpl.kt delete mode 100644 misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/ChronoLocalDateAssertionsImpl.kt delete mode 100644 misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/ChronoLocalDateTimeAssertionsImpl.kt delete mode 100644 misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/ChronoZonedDateTimeAssertionsImpl.kt delete mode 100644 misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/FloatingPointAssertionsImpl.kt delete mode 100644 misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/LocalDateAssertionsImpl.kt delete mode 100644 misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/LocalDateTimeAssertionsImpl.kt delete mode 100644 misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/OptionalAssertionsImpl.kt delete mode 100644 misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/PathAssertionsImpl.kt delete mode 100644 misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/ZonedDateTimeAssertionsImpl.kt delete mode 100644 misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.assertions.composers.AssertionComposer delete mode 100644 misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.AnyAssertions delete mode 100644 misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.BigDecimalAssertions delete mode 100644 misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.CharSequenceAssertions delete mode 100644 misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.ChronoLocalDateAssertions delete mode 100644 misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.ChronoLocalDateTimeAssertions delete mode 100644 misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.ChronoZonedDateTimeAssertions delete mode 100644 misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.CollectionAssertions delete mode 100644 misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.ComparableAssertions delete mode 100644 misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.FeatureAssertions delete mode 100644 misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.FloatingPointAssertions delete mode 100644 misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.Fun0Assertions delete mode 100644 misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.IterableAssertions delete mode 100644 misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.IteratorAssertions delete mode 100644 misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.ListAssertions delete mode 100644 misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.LocalDateAssertions delete mode 100644 misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.LocalDateTimeAssertions delete mode 100644 misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.MapAssertions delete mode 100644 misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.MapEntryAssertions delete mode 100644 misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.NewFeatureAssertions delete mode 100644 misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.OptionalAssertions delete mode 100644 misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.PairAssertions delete mode 100644 misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.PathAssertions delete mode 100644 misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.ThrowableAssertions delete mode 100644 misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.ZonedDateTimeAssertions delete mode 100644 misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.any.typetransformation.creators.AnyTypeTransformationAssertions delete mode 100644 misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.any.typetransformation.failurehandlers.FailureHandlerFactory delete mode 100644 misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.changers.FeatureExtractor delete mode 100644 misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.changers.SubjectChanger delete mode 100644 misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.charsequence.contains.checkers.CheckerFactory delete mode 100644 misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.charsequence.contains.creators.CharSequenceContainsAssertions delete mode 100644 misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.charsequence.contains.searchbehaviours.SearchBehaviourFactory delete mode 100644 misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.collectors.NonThrowingAssertionCollectorForExplanation delete mode 100644 misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.collectors.ThrowingAssertionCollectorForExplanation delete mode 100644 misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.feature.extract.creators.FeatureExtractorCreatorFactory delete mode 100644 misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.iterable.contains.checkers.CheckerFactory delete mode 100644 misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.iterable.contains.creators.IterableContainsAssertions delete mode 100644 misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.SearchBehaviourFactory delete mode 100644 misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.throwable.thrown.creators.ThrowableThrownAssertions delete mode 100644 misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.throwable.thrown.providers.AbsentThrowableMessageProviderFactory delete mode 100644 misc/deprecated/domain/robstoll/extensions/kotlin_1_3/atrium-domain-robstoll-kotlin_1_3-common/build.gradle delete mode 100644 misc/deprecated/domain/robstoll/extensions/kotlin_1_3/atrium-domain-robstoll-kotlin_1_3-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll.kotlin_1_3/creating/ResultAssertionsImpl.kt delete mode 100644 misc/deprecated/domain/robstoll/extensions/kotlin_1_3/atrium-domain-robstoll-kotlin_1_3-js/build.gradle delete mode 100644 misc/deprecated/domain/robstoll/extensions/kotlin_1_3/atrium-domain-robstoll-kotlin_1_3-js/src/main/kotlin/ch/tutteli/atrium/domain/kotlin_1_3/registerServices.kt delete mode 100644 misc/deprecated/domain/robstoll/extensions/kotlin_1_3/atrium-domain-robstoll-kotlin_1_3-jvm/build.gradle delete mode 100644 misc/deprecated/domain/robstoll/extensions/kotlin_1_3/atrium-domain-robstoll-kotlin_1_3-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.kotlin_1_3.creating.ResultAssertions delete mode 100644 misc/deprecated/domain/robstoll/extensions/kotlin_1_3/atrium-domain-robstoll-kotlin_1_3-jvm/src/module/module-info.java delete mode 100644 misc/deprecated/translations/atrium-translations-de_CH-deprecated/build.gradle delete mode 100644 misc/deprecated/translations/atrium-translations-de_CH-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/DescriptionAnyAssertion.kt delete mode 100644 misc/deprecated/translations/atrium-translations-de_CH-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/DescriptionBasic.kt delete mode 100644 misc/deprecated/translations/atrium-translations-de_CH-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/DescriptionBigDecimalAssertion.kt delete mode 100644 misc/deprecated/translations/atrium-translations-de_CH-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/DescriptionCharSequenceAssertion.kt delete mode 100644 misc/deprecated/translations/atrium-translations-de_CH-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/DescriptionCollectionAssertion.kt delete mode 100644 misc/deprecated/translations/atrium-translations-de_CH-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/DescriptionComparableAssertion.kt delete mode 100644 misc/deprecated/translations/atrium-translations-de_CH-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/DescriptionFloatingPointAssertion.kt delete mode 100644 misc/deprecated/translations/atrium-translations-de_CH-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/DescriptionIterableAssertion.kt delete mode 100644 misc/deprecated/translations/atrium-translations-de_CH-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/DescriptionThrowableAssertion.kt delete mode 100644 misc/deprecated/translations/atrium-translations-de_CH-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/DescriptionTypeTransformationAssertion.kt delete mode 100644 misc/deprecated/translations/atrium-translations-en_UK-deprecated/build.gradle delete mode 100644 misc/deprecated/translations/atrium-translations-en_UK-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/DescriptionAnyAssertion.kt delete mode 100644 misc/deprecated/translations/atrium-translations-en_UK-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/DescriptionBasic.kt delete mode 100644 misc/deprecated/translations/atrium-translations-en_UK-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/DescriptionBigDecimalAssertion.kt delete mode 100644 misc/deprecated/translations/atrium-translations-en_UK-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/DescriptionCharSequenceAssertion.kt delete mode 100644 misc/deprecated/translations/atrium-translations-en_UK-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/DescriptionCollectionAssertion.kt delete mode 100644 misc/deprecated/translations/atrium-translations-en_UK-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/DescriptionComparableAssertion.kt delete mode 100644 misc/deprecated/translations/atrium-translations-en_UK-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/DescriptionFloatingPointAssertion.kt delete mode 100644 misc/deprecated/translations/atrium-translations-en_UK-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/DescriptionIterableAssertion.kt delete mode 100644 misc/deprecated/translations/atrium-translations-en_UK-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/DescriptionThrowableAssertion.kt delete mode 100644 misc/deprecated/translations/atrium-translations-en_UK-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/DescriptionTypeTransformationAssertion.kt delete mode 100644 misc/specs/atrium-specs-common/src/main/kotlin/ch/tutteli/atrium/specs/checking/DelegatingAssertionCheckerSpec.kt delete mode 100644 misc/specs/atrium-specs-common/src/main/kotlin/ch/tutteli/atrium/specs/checking/FeatureAssertionCheckerSpec.kt delete mode 100644 misc/specs/atrium-specs-common/src/main/kotlin/ch/tutteli/atrium/specs/checking/ThrowingAssertionCheckerSpec.kt delete mode 100644 misc/specs/atrium-specs-common/src/main/kotlin/ch/tutteli/atrium/specs/creating/CollectingAssertionPlantSpec.kt delete mode 100644 misc/specs/atrium-specs-common/src/main/kotlin/ch/tutteli/atrium/specs/creating/ReportingAssertionContainerSpec.kt delete mode 100644 misc/tools/atrium-bc-test/src/main/kotlin/ch/tutteil/atrium/bctest/DeprecationSpek1TestEngine.kt delete mode 100644 misc/tools/atrium-bc-test/src/main/kotlin/ch/tutteil/atrium/bctest/ForgivingTest.kt delete mode 100644 misc/verbs-internal/atrium-verbs-internal-common/src/main/kotlin/ch/tutteli/atrium/verbs/internal/atriumVerbs.kt delete mode 100644 misc/verbs-internal/atrium-verbs-internal-jvm/src/main/kotlin/ch/tutteli/atrium/verbs/internal/AssertionVerbFactory.kt delete mode 100644 misc/verbs-internal/atrium-verbs-internal-jvm/src/test/kotlin/ch/tutteli/atrium/verbs/internal/VerbSpec.kt delete mode 100644 misc/verbs/atrium-verbs-common/src/main/kotlin/ch/tutteli/atrium/verbs/AssertionVerb.kt delete mode 100644 misc/verbs/atrium-verbs-common/src/main/kotlin/ch/tutteli/atrium/verbs/assert.kt delete mode 100644 misc/verbs/atrium-verbs-common/src/main/kotlin/ch/tutteli/atrium/verbs/assertThat.kt delete mode 100644 misc/verbs/atrium-verbs-common/src/main/kotlin/ch/tutteli/atrium/verbs/expect.kt delete mode 100644 misc/verbs/atrium-verbs-jvm/src/main/kotlin/ch/tutteli/atrium/verbs/assert/Assert.kt delete mode 100644 misc/verbs/atrium-verbs-jvm/src/main/kotlin/ch/tutteli/atrium/verbs/assertthat/AssertThat.kt delete mode 100644 misc/verbs/atrium-verbs-jvm/src/main/kotlin/ch/tutteli/atrium/verbs/expect/Expect.kt delete mode 100644 misc/verbs/atrium-verbs-jvm/src/test/kotlin/ch/tutteli/atrium/verbs/VerbSpec.kt diff --git a/README.md b/README.md index b62addd88..7c262ff0f 100644 --- a/README.md +++ b/README.md @@ -271,7 +271,7 @@ import ch.tutteli.atrium.api.verbs.expect val x = 10 expect(x).toBe(9) ``` -↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/ReadmeSpec.kt#L53) ↓ [Output](#ex-first) +↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/ReadmeSpec.kt#L54) ↓ [Output](#ex-first) ```text expected that subject: 10 (kotlin.Int <1234789>) @@ -314,7 +314,7 @@ The next section shows how you can define multiple assertions for the same subje // two single assertions, only first evaluated expect(4 + 6).isLessThan(5).isGreaterThan(10) ``` -↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/ReadmeSpec.kt#L60) ↓ [Output](#ex-single) +↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/ReadmeSpec.kt#L61) ↓ [Output](#ex-single) ```text expected that subject: 10 (kotlin.Int <1234789>) @@ -347,7 +347,7 @@ expect(4 + 6) { isGreaterThan(10) } ``` -↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/ReadmeSpec.kt#L65) ↓ [Output](#ex-group) +↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/ReadmeSpec.kt#L66) ↓ [Output](#ex-group) ```text expected that subject: 10 (kotlin.Int <1234789>) @@ -379,7 +379,7 @@ expect { throw IllegalArgumentException("name is empty") }.toThrow() ``` -↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/ReadmeSpec.kt#L73) ↓ [Output](#ex-toThrow1) +↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/ReadmeSpec.kt#L74) ↓ [Output](#ex-toThrow1) ```text expected that subject: () -> kotlin.Nothing (readme.examples.ReadmeSpec$1$4$1 <1234789>) @@ -388,10 +388,10 @@ expected that subject: () -> kotlin.Nothing (readme.examples.ReadmeSpec$1 ℹ Properties of the unexpected IllegalArgumentException » message: "name is empty" <1234789> » stacktrace: - ⚬ readme.examples.ReadmeSpec$1$4$1.invoke(ReadmeSpec.kt:76) - ⚬ readme.examples.ReadmeSpec$1$4$1.invoke(ReadmeSpec.kt:51) - ⚬ readme.examples.ReadmeSpec$1$4.invoke(ReadmeSpec.kt:691) - ⚬ readme.examples.ReadmeSpec$1$4.invoke(ReadmeSpec.kt:51) + ⚬ readme.examples.ReadmeSpec$1$4$1.invoke(ReadmeSpec.kt:77) + ⚬ readme.examples.ReadmeSpec$1$4$1.invoke(ReadmeSpec.kt:52) + ⚬ readme.examples.ReadmeSpec$1$4.invoke(ReadmeSpec.kt:662) + ⚬ readme.examples.ReadmeSpec$1$4.invoke(ReadmeSpec.kt:52) ``` @@ -415,7 +415,7 @@ expect { throw IllegalArgumentException() }.toThrow().message.startsWith("firstName") ``` -↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/ReadmeSpec.kt#L80) ↓ [Output](#ex-toThrow2) +↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/ReadmeSpec.kt#L81) ↓ [Output](#ex-toThrow2) ```text expected that subject: () -> kotlin.Nothing (readme.examples.ReadmeSpec$1$5$1 <1234789>) @@ -436,7 +436,7 @@ expect { message { startsWith("firstName") } } ``` -↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/ReadmeSpec.kt#L86) ↓ [Output](#ex-toThrow3) +↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/ReadmeSpec.kt#L87) ↓ [Output](#ex-toThrow3) ```text expected that subject: () -> kotlin.Nothing (readme.examples.ReadmeSpec$1$6$1 <1234789>) @@ -460,7 +460,7 @@ expect { throw IllegalArgumentException("name is empty", RuntimeException("a cause")) }.notToThrow() ``` -↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/ReadmeSpec.kt#L94) ↓ [Output](#ex-notToThrow) +↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/ReadmeSpec.kt#L95) ↓ [Output](#ex-notToThrow) ```text expected that subject: () -> kotlin.Nothing (readme.examples.ReadmeSpec$1$7$1 <1234789>) @@ -468,14 +468,14 @@ expected that subject: () -> kotlin.Nothing (readme.examples.ReadmeSpec$1 ℹ Properties of the unexpected IllegalArgumentException » message: "name is empty" <1234789> » stacktrace: - ⚬ readme.examples.ReadmeSpec$1$7$1.invoke(ReadmeSpec.kt:97) - ⚬ readme.examples.ReadmeSpec$1$7$1.invoke(ReadmeSpec.kt:51) - ⚬ readme.examples.ReadmeSpec$1$7.invoke(ReadmeSpec.kt:98) - ⚬ readme.examples.ReadmeSpec$1$7.invoke(ReadmeSpec.kt:51) + ⚬ readme.examples.ReadmeSpec$1$7$1.invoke(ReadmeSpec.kt:98) + ⚬ readme.examples.ReadmeSpec$1$7$1.invoke(ReadmeSpec.kt:52) + ⚬ readme.examples.ReadmeSpec$1$7.invoke(ReadmeSpec.kt:99) + ⚬ readme.examples.ReadmeSpec$1$7.invoke(ReadmeSpec.kt:52) » cause: java.lang.RuntimeException » message: "a cause" <1234789> » stacktrace: - ⚬ readme.examples.ReadmeSpec$1$7$1.invoke(ReadmeSpec.kt:97) + ⚬ readme.examples.ReadmeSpec$1$7$1.invoke(ReadmeSpec.kt:98) ``` @@ -514,7 +514,7 @@ expect(myPerson) .feature { f(it::fullName) } // not evaluated anymore, subject String afterwards .startsWith("rob") // not evaluated anymore ``` -↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/ReadmeSpec.kt#L113) ↓ [Output](#ex-property-methods-single) +↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/ReadmeSpec.kt#L114) ↓ [Output](#ex-property-methods-single) ```text expected that subject: Person(firstName=Robert, lastName=Stoll, isStudent=false) (readme.examples.ReadmeSpec$1$Person <1234789>) @@ -567,7 +567,7 @@ Feature assertions follow the common pattern of having two overloads: feature { f(it::lastName) }.toBe("Dummy") } ``` - ↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/ReadmeSpec.kt#L122) ↓ [Output](#ex-property-methods-group) + ↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/ReadmeSpec.kt#L123) ↓ [Output](#ex-property-methods-group) ```text expected that subject: Person(firstName=Robert, lastName=Stoll, isStudent=false) (readme.examples.ReadmeSpec$1$Person <1234789>) @@ -618,7 +618,7 @@ expect(myPerson) .toBe("Robert aka. Stoll") // fails .startsWith("llotS") // not evaluated anymore ``` -↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/ReadmeSpec.kt#L136) ↓ [Output](#ex-methods-args) +↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/ReadmeSpec.kt#L137) ↓ [Output](#ex-methods-args) ```text expected that subject: Person(firstName=Robert, lastName=Stoll, isStudent=false) (readme.examples.ReadmeSpec$1$Person <1234789>) @@ -671,7 +671,7 @@ expect(myFamily) .feature("first member's name") { members.first().name } // subject narrowed to String .toBe("Peter") ``` -↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/ReadmeSpec.kt#L153) ↓ [Output](#ex-arbitrary-features) +↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/ReadmeSpec.kt#L154) ↓ [Output](#ex-arbitrary-features) ```text expected that subject: Family(members=[FamilyMember(name=Robert)]) (readme.examples.ReadmeSpec$1$Family <1234789>) @@ -718,7 +718,7 @@ expect(listOf(1 to "a", 2 to "b")).get(10) { firstToBe(1) } ``` -↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/ReadmeSpec.kt#L169) ↓ [Output](#ex-within-assertion-functions) +↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/ReadmeSpec.kt#L170) ↓ [Output](#ex-within-assertion-functions) ```text expected that subject: [(1, a), (2, b)] (java.util.Arrays.ArrayList <1234789>) @@ -805,7 +805,7 @@ expect(x).isA() .feature { f(it::number) } .toBe(2) ``` -↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/ReadmeSpec.kt#L202) ↓ [Output](#ex-type-assertions-1) +↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/ReadmeSpec.kt#L203) ↓ [Output](#ex-type-assertions-1) ```text expected that subject: SubType2(word=hello, flag=true) (readme.examples.SubType2 <1234789>) @@ -827,7 +827,7 @@ expect(x).isA { feature { f(it::flag) }.toBe(false) } ``` -↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/ReadmeSpec.kt#L208) ↓ [Output](#ex-type-assertions-2) +↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/ReadmeSpec.kt#L209) ↓ [Output](#ex-type-assertions-2) ```text expected that subject: SubType2(word=hello, flag=true) (readme.examples.SubType2 <1234789>) @@ -856,7 +856,7 @@ Let us look at the case where the subject of the assertion has a [nullable type] val slogan1: String? = "postulating assertions made easy" expect(slogan1).toBe(null) ``` -↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/ReadmeSpec.kt#L234) ↓ [Output](#ex-nullable-1) +↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/ReadmeSpec.kt#L235) ↓ [Output](#ex-nullable-1) ```text expected that subject: "postulating assertions made easy" <1234789> @@ -870,7 +870,7 @@ expected that subject: "postulating assertions made easy" <1234789> val slogan2: String? = null expect(slogan2).toBe("postulating assertions made easy") ``` -↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/ReadmeSpec.kt#L238) ↓ [Output](#ex-nullable-2) +↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/ReadmeSpec.kt#L239) ↓ [Output](#ex-nullable-2) ```text expected that subject: null @@ -891,7 +891,7 @@ expect(slogan2) // subject has type String? .notToBeNull() // subject narrowed to String .startsWith("atrium") ``` -↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/ReadmeSpec.kt#L243) ↓ [Output](#ex-nullable-3) +↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/ReadmeSpec.kt#L244) ↓ [Output](#ex-nullable-3) ```text expected that subject: null @@ -908,7 +908,7 @@ one without (example above) and one with `assertionCreator`-lambda (example belo ```kotlin expect(slogan2).notToBeNull { startsWith("atrium") } ``` -↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/ReadmeSpec.kt#L248) ↓ [Output](#ex-nullable-4) +↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/ReadmeSpec.kt#L249) ↓ [Output](#ex-nullable-4) ```text expected that subject: null @@ -944,7 +944,7 @@ The following sub sections show both use cases by examples. ```kotlin expect(listOf(1, 2, 2, 4)).contains(2, 3) ``` -↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/ReadmeSpec.kt#L252) ↓ [Output](#ex-collection-short-1) +↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/ReadmeSpec.kt#L253) ↓ [Output](#ex-collection-short-1) ```text expected that subject: [1, 2, 2, 4] (java.util.Arrays.ArrayList <1234789>) @@ -985,7 +985,7 @@ expect(listOf(1, 2, 2, 4)).contains( { isGreaterThan(2).isLessThan(4) } ) ``` -↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/ReadmeSpec.kt#L256) ↓ [Output](#ex-collection-short-2) +↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/ReadmeSpec.kt#L257) ↓ [Output](#ex-collection-short-2) ```text expected that subject: [1, 2, 2, 4] (java.util.Arrays.ArrayList <1234789>) @@ -1025,7 +1025,7 @@ Following each in action: ```kotlin expect(listOf(1, 2, 3, 4)).any { isLessThan(0) } ``` -↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/ReadmeSpec.kt#L263) ↓ [Output](#ex-collection-any) +↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/ReadmeSpec.kt#L264) ↓ [Output](#ex-collection-any) ```text expected that subject: [1, 2, 3, 4] (java.util.Arrays.ArrayList <1234789>) @@ -1042,7 +1042,7 @@ expected that subject: [1, 2, 3, 4] (java.util.Arrays.ArrayList <1234789> ```kotlin expect(listOf(1, 2, 3, 4)).none { isGreaterThan(2) } ``` -↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/ReadmeSpec.kt#L266) ↓ [Output](#ex-collection-none) +↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/ReadmeSpec.kt#L267) ↓ [Output](#ex-collection-none) ```text expected that subject: [1, 2, 3, 4] (java.util.Arrays.ArrayList <1234789>) @@ -1061,7 +1061,7 @@ expected that subject: [1, 2, 3, 4] (java.util.Arrays.ArrayList <1234789> ```kotlin expect(listOf(1, 2, 3, 4)).all { isGreaterThan(2) } ``` -↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/ReadmeSpec.kt#L269) ↓ [Output](#ex-collection-all) +↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/ReadmeSpec.kt#L270) ↓ [Output](#ex-collection-all) ```text expected that subject: [1, 2, 3, 4] (java.util.Arrays.ArrayList <1234789>) @@ -1091,7 +1091,7 @@ Following on the last section we will start with an `inOrder` example: ```kotlin expect(listOf(1, 2, 2, 4)).contains.inOrder.only.entries({ isLessThan(3) }, { isLessThan(2) }) ``` -↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/ReadmeSpec.kt#L273) ↓ [Output](#ex-collection-builder-1) +↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/ReadmeSpec.kt#L274) ↓ [Output](#ex-collection-builder-1) ```text expected that subject: [1, 2, 2, 4] (java.util.Arrays.ArrayList <1234789>) @@ -1139,7 +1139,7 @@ and we happily answer your question there. ```kotlin expect(listOf(1, 2, 2, 4)).contains.inOrder.only.values(1, 2, 2, 3, 4) ``` -↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/ReadmeSpec.kt#L276) ↓ [Output](#ex-collection-builder-2) +↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/ReadmeSpec.kt#L277) ↓ [Output](#ex-collection-builder-2) ```text expected that subject: [1, 2, 2, 4] (java.util.Arrays.ArrayList <1234789>) @@ -1164,7 +1164,7 @@ expected that subject: [1, 2, 2, 4] (java.util.Arrays.ArrayList <1234789> ```kotlin expect(listOf(1, 2, 2, 4)).contains.inAnyOrder.atLeast(1).butAtMost(2).entries({ isLessThan(3) }) ``` -↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/ReadmeSpec.kt#L279) ↓ [Output](#ex-collection-builder-3) +↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/ReadmeSpec.kt#L280) ↓ [Output](#ex-collection-builder-3) ```text expected that subject: [1, 2, 2, 4] (java.util.Arrays.ArrayList <1234789>) @@ -1181,7 +1181,7 @@ expected that subject: [1, 2, 2, 4] (java.util.Arrays.ArrayList <1234789> ```kotlin expect(listOf(1, 2, 2, 4)).contains.inAnyOrder.only.values(1, 2, 3, 4) ``` -↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/ReadmeSpec.kt#L282) ↓ [Output](#ex-collection-builder-4) +↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/ReadmeSpec.kt#L283) ↓ [Output](#ex-collection-builder-4) ```text expected that subject: [1, 2, 2, 4] (java.util.Arrays.ArrayList <1234789>) @@ -1202,7 +1202,7 @@ expected that subject: [1, 2, 2, 4] (java.util.Arrays.ArrayList <1234789> ```kotlin expect(listOf(1, 2, 2, 4)).contains.inAnyOrder.only.values(4, 3, 2, 2, 1) ``` -↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/ReadmeSpec.kt#L285) ↓ [Output](#ex-collection-builder-5) +↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/ReadmeSpec.kt#L286) ↓ [Output](#ex-collection-builder-5) ```text expected that subject: [1, 2, 2, 4] (java.util.Arrays.ArrayList <1234789>) @@ -1232,7 +1232,7 @@ and more [Sophisticated Assertion Builder](#sophisticated-assertion-builders-1) ```kotlin expect(mapOf("a" to 1, "b" to 2)).contains("c" to 2, "a" to 1, "b" to 1) ``` -↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/ReadmeSpec.kt#L289) ↓ [Output](#ex-map-1) +↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/ReadmeSpec.kt#L290) ↓ [Output](#ex-map-1) ```text expected that subject: {a=1, b=2} (java.util.LinkedHashMap <1234789>) @@ -1256,7 +1256,7 @@ expect(mapOf("a" to 1, "b" to 2)).contains( KeyValue("b") { isLessThan(2) } ) ``` -↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/ReadmeSpec.kt#L292) ↓ [Output](#ex-map-2) +↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/ReadmeSpec.kt#L293) ↓ [Output](#ex-map-2) ```text expected that subject: {a=1, b=2} (java.util.LinkedHashMap <1234789>) @@ -1278,7 +1278,7 @@ Again both overloads are provided, one for key-value `Pair`s: ```kotlin expect(mapOf("a" to 1, "b" to 2)).containsOnly("b" to 2) ``` -↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/ReadmeSpec.kt#L300) ↓ [Output](#ex-map-only-1) +↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/ReadmeSpec.kt#L301) ↓ [Output](#ex-map-only-1) ```text expected that subject: {a=1, b=2} (java.util.LinkedHashMap <1234789>) @@ -1303,7 +1303,7 @@ expect(mapOf("a" to 1, "b" to 2)).containsOnly( KeyValue("b") { isLessThan(2) } ) ``` -↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/ReadmeSpec.kt#L303) ↓ [Output](#ex-map-only-2) +↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/ReadmeSpec.kt#L304) ↓ [Output](#ex-map-only-2) ```text expected that subject: {a=1, b=2} (java.util.LinkedHashMap <1234789>) @@ -1331,7 +1331,7 @@ again provide two overloads, one expecting key-value `Pair`s: ```kotlin expect(mapOf("a" to 1, "b" to 2)).contains.inOrder.only.entries("b" to 2, "a" to 1) ``` -↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/ReadmeSpec.kt#L311) ↓ [Output](#ex-map-builder-1) +↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/ReadmeSpec.kt#L312) ↓ [Output](#ex-map-builder-1) ```text expected that subject: {a=1, b=2} (java.util.LinkedHashMap <1234789>) @@ -1360,7 +1360,7 @@ expect(mapOf("a" to 1, "b" to 2)).contains.inOrder.only.entries( KeyValue("a") { isLessThan(2) }, KeyValue("b") { isLessThan(2) }) ``` -↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/ReadmeSpec.kt#L314) ↓ [Output](#ex-map-builder-2) +↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/ReadmeSpec.kt#L315) ↓ [Output](#ex-map-builder-2) ```text expected that subject: {a=1, b=2} (java.util.LinkedHashMap <1234789>) @@ -1399,7 +1399,7 @@ expect(mapOf("bernstein" to bernstein)) feature { f(it::firstName) }.toBe("Albert") } ``` -↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/ReadmeSpec.kt#L324) ↓ [Output](#ex-map-3) +↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/ReadmeSpec.kt#L325) ↓ [Output](#ex-map-3) ```text expected that subject: {bernstein=Person(firstName=Leonard, lastName=Bernstein, age=50)} (java.util.Collections.SingletonMap <1234789>) @@ -1419,7 +1419,7 @@ expect(mapOf("a" to 1, "b" to 2)) { values { none { isGreaterThan(1) } } } ``` -↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/ReadmeSpec.kt#L336) ↓ [Output](#ex-map-4) +↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/ReadmeSpec.kt#L337) ↓ [Output](#ex-map-4) ```text expected that subject: {a=1, b=2} (java.util.LinkedHashMap <1234789>) @@ -1457,7 +1457,7 @@ expect(linkedMapOf("a" to 1, "b" to 2)).asEntries().contains.inOrder.only.entrie } ) ``` -↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/ReadmeSpec.kt#L342) ↓ [Output](#ex-map-5) +↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/ReadmeSpec.kt#L343) ↓ [Output](#ex-map-5) ```text expected that subject: {a=1, b=2} (java.util.LinkedHashMap <1234789>) @@ -1492,7 +1492,7 @@ For example, `exists` will explain which entry was the first one missing: ```kotlin expect(Paths.get("/usr/bin/noprogram")).exists() ``` -↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/ReadmeSpec.kt#L352) ↓ [Output](#ex-path-exists) +↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/ReadmeSpec.kt#L353) ↓ [Output](#ex-path-exists) ```text expected that subject: /usr/bin/noprogram (sun.nio.fs.UnixPath <1234789>) @@ -1508,7 +1508,7 @@ Atrium will give details about why something cannot be accessed, for example whe ```kotlin expect(Paths.get("/root/.ssh/config")).isWritable() ``` -↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/ReadmeSpec.kt#L356) ↓ [Output](#ex-path-writable) +↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/ReadmeSpec.kt#L357) ↓ [Output](#ex-path-writable) ```text expected that subject: /root/.ssh/config (sun.nio.fs.UnixPath <1234789>) @@ -1531,9 +1531,8 @@ val filePointer = Files.createSymbolicLink(directory.resolve("directory"), file) expect(filePointer.resolve("subfolder/file")).isRegularFile() ``` -↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/ReadmeSpec.kt#L361) ↓ [Output](#ex-path-symlink-and-parent-not-folder) +↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/ReadmeSpec.kt#L362) ↓ [Output](#ex-path-symlink-and-parent-not-folder) - ```text expected that subject: /tmp/atrium-path/directory/subfolder/file (sun.nio.fs.UnixPath <1234789>) ◆ is: a file @@ -1541,7 +1540,6 @@ expected that subject: /tmp/atrium-path/directory/subfolder/file (sun.nio » failure at parent path: /tmp/atrium-path/file (sun.nio.fs.UnixPath <1234789>) » was a file instead of a directory ``` - ## Attaching a Reason @@ -1557,9 +1555,7 @@ expect("filename?") containsNot("?") } ``` - -↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/ReadmeSpec.kt#L370) -↓ [Output](#ex-because-1) +↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/ReadmeSpec.kt#L371) ↓ [Output](#ex-because-1) ```text expected that subject: "filename?" <1234789> @@ -1614,7 +1610,7 @@ expect("calling myFun with...") { } } ``` -↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/ReadmeSpec.kt#L411) ↓ [Output](#ex-data-driven-1) +↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/ReadmeSpec.kt#L382) ↓ [Output](#ex-data-driven-1) ```text expected that subject: "calling myFun with..." <1234789> @@ -1649,7 +1645,7 @@ expect("calling myFun with ...") { } } ``` -↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/ReadmeSpec.kt#L425) ↓ [Output](#ex-data-driven-2) +↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/ReadmeSpec.kt#L396) ↓ [Output](#ex-data-driven-2) ```text expected that subject: "calling myFun with ..." <1234789> @@ -1690,7 +1686,7 @@ expect("calling myNullableFun with ...") { } } ``` -↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/ReadmeSpec.kt#L443) ↓ [Output](#ex-data-driven-3) +↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/ReadmeSpec.kt#L414) ↓ [Output](#ex-data-driven-3) ```text expected that subject: "calling myNullableFun with ..." <1234789> @@ -1836,10 +1832,10 @@ expect { } }.toThrow { messageContains("no no no") } ``` -↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/ReadmeSpec.kt#L467) ↓ [Output](#ex-add-info-3) +↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/ReadmeSpec.kt#L438) ↓ [Output](#ex-add-info-3) ```text -expected that subject: () -> kotlin.Nothing (readme.examples.ReadmeSpec2$1$42$1 <1234789>) +expected that subject: () -> kotlin.Nothing (readme.examples.ReadmeSpec2$1$36$1 <1234789>) ◆ ▶ thrown exception when called: java.lang.IllegalArgumentException ◾ is instance of type: IllegalStateException (java.lang.IllegalStateException) » ▶ message: @@ -1851,14 +1847,14 @@ expected that subject: () -> kotlin.Nothing (readme.examples.ReadmeSpec2$ ℹ Properties of the unexpected IllegalArgumentException » message: "no no no..." <1234789> » stacktrace: - ⚬ readme.examples.ReadmeSpec2$1$42$1.invoke(ReadmeSpec.kt:472) - ⚬ readme.examples.ReadmeSpec2$1$42$1.invoke(ReadmeSpec.kt:227) - ⚬ readme.examples.ReadmeSpec2$1$42.invoke(ReadmeSpec.kt:691) - ⚬ readme.examples.ReadmeSpec2$1$42.invoke(ReadmeSpec.kt:227) + ⚬ readme.examples.ReadmeSpec2$1$36$1.invoke(ReadmeSpec.kt:443) + ⚬ readme.examples.ReadmeSpec2$1$36$1.invoke(ReadmeSpec.kt:228) + ⚬ readme.examples.ReadmeSpec2$1$36.invoke(ReadmeSpec.kt:662) + ⚬ readme.examples.ReadmeSpec2$1$36.invoke(ReadmeSpec.kt:228) » cause: java.lang.UnsupportedOperationException » message: "not supported" <1234789> » stacktrace: - ⚬ readme.examples.ReadmeSpec2$1$42$1.invoke(ReadmeSpec.kt:470) + ⚬ readme.examples.ReadmeSpec2$1$36$1.invoke(ReadmeSpec.kt:441) ``` @@ -1879,7 +1875,7 @@ then Atrium reminds us of the possible pitfall. For instance: ```kotlin expect(BigDecimal.TEN).isEqualIncludingScale(BigDecimal("10.0")) ``` -↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/ReadmeSpec.kt#L477) ↓ [Output](#ex-pitfall-1) +↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/ReadmeSpec.kt#L448) ↓ [Output](#ex-pitfall-1) ```text expected that subject: 10 (java.math.BigDecimal <1234789>) @@ -1897,7 +1893,7 @@ For instance: ```kotlin expect(listOf(1)).get(0) {} ``` -↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/ReadmeSpec.kt#L480) ↓ [Output](#ex-pitfall-2) +↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/ReadmeSpec.kt#L451) ↓ [Output](#ex-pitfall-2) ```text expected that subject: [1] (java.util.Collections.SingletonList <1234789>) @@ -1974,7 +1970,7 @@ and its usage: ```kotlin expect(12).isMultipleOf(5) ``` -↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/ReadmeSpec.kt#L492) ↓ [Output](#ex-own-boolean-1) +↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/ReadmeSpec.kt#L463) ↓ [Output](#ex-own-boolean-1) ```text expected that subject: 12 (kotlin.Int <1234789>) @@ -2024,7 +2020,7 @@ Its usage looks then as follows: ```kotlin expect(13).isEven() ``` -↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/ReadmeSpec.kt#L503) ↓ [Output](#ex-own-boolean-2) +↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/ReadmeSpec.kt#L474) ↓ [Output](#ex-own-boolean-2) ```text expected that subject: 13 (kotlin.Int <1234789>) @@ -2123,7 +2119,7 @@ Its usage is then as follows: expect(Person("Susanne", "Whitley", 43, listOf())) .hasNumberOfChildren(2) ``` -↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/ReadmeSpec.kt#L542) ↓ [Output](#ex-own-compose-3) +↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/ReadmeSpec.kt#L513) ↓ [Output](#ex-own-compose-3) ```text expected that subject: Person(firstName=Susanne, lastName=Whitley, age=43, children=[]) (readme.examples.Person <1234789>) @@ -2157,7 +2153,7 @@ but we do not have to, as `all` already checks that there is at least one elemen expect(Person("Susanne", "Whitley", 43, listOf())) .hasAdultChildren() ``` -↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/ReadmeSpec.kt#L557) ↓ [Output](#ex-own-compose-4) +↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/ReadmeSpec.kt#L528) ↓ [Output](#ex-own-compose-4) ```text expected that subject: Person(firstName=Susanne, lastName=Whitley, age=43, children=[]) (readme.examples.Person <1234789>) @@ -2199,7 +2195,7 @@ expect(Person("Susanne", "Whitley", 43, listOf(Person("Petra", "Whitley", 12, li .children // using the val -> subsequent assertions are about children and fail fast .hasSize(2) ``` -↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/ReadmeSpec.kt#L567) ↓ [Output](#ex-own-compose-5) +↑ [Example](https://github.com/robstoll/atrium/tree/master/misc/tools/readme-examples/src/main/kotlin/readme/examples/ReadmeSpec.kt#L538) ↓ [Output](#ex-own-compose-5) ```text expected that subject: Person(firstName=Susanne, lastName=Whitley, age=43, children=[Person(firstName=Petra, lastName=Whitley, age=12, children=[])]) (readme.examples.Person <1234789>) @@ -2620,12 +2616,6 @@ Atrium provides KDoc for all APIs - have a look at their KDoc: - [atrium-api-fluent-en_GB](https://docs.atriumlib.org/latest#/doc/ch.tutteli.atrium.api.fluent.en_-g-b/index.html) - [atrium-api-infix-en_GB](https://docs.atriumlib.org/latest#/doc/ch.tutteli.atrium.api.infix.en_-g-b/index.html) -Deprecated APIs: -- [atrium-api-cc-en_GB](https://docs.atriumlib.org/latest#/doc/ch.tutteli.atrium.api.cc.en_-g-b/index.html) -- [atrium-api-cc-en_UK](https://docs.atriumlib.org/latest#/doc/ch.tutteli.atrium.api.cc.en_-u-k/index.html) -- [atrium-api-cc-de_CH](https://docs.atriumlib.org/latest#/doc/ch.tutteli.atrium.api.cc.de_-d-e/index.html) -- [atrium-api-cc-infix-en_GB](https://docs.atriumlib.org/latest#/doc/ch.tutteli.atrium.api.cc.infix.en_-g-b/index.html) - ## Problems in conjunction with `feature` See [Ambiguity Problems](#ambiguity-problems) and [Property does not exist](#property-does-not-exist). diff --git a/apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/charSequenceAssertionsDeprecated.kt b/apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/charSequenceAssertionsDeprecated.kt deleted file mode 100644 index 1895f18db..000000000 --- a/apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/charSequenceAssertionsDeprecated.kt +++ /dev/null @@ -1,37 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "DeprecatedCallableAddReplaceWith") -@file:JvmMultifileClass -@file:JvmName("CharSequenceAssertionsKt") - -package ch.tutteli.atrium.api.fluent.en_GB - -import ch.tutteli.atrium.api.fluent.en_GB.creating.charsequence.contains.builders.NotCheckerOption -import ch.tutteli.atrium.api.fluent.en_GB.creating.charsequence.contains.builders.impl.NotCheckerOptionImpl -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.domain.builders.ExpectImpl -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains.Builder -import ch.tutteli.atrium.domain.creating.charsequence.contains.searchbehaviours.NoOpSearchBehaviour -import ch.tutteli.atrium.domain.creating.charsequence.contains.searchbehaviours.NotSearchBehaviour -import kotlin.jvm.JvmMultifileClass -import kotlin.jvm.JvmName - -/** - * Creates a [CharSequenceContains.Builder] based on this [Expect] which allows to define - * more sophisticated `contains` assertions. - * - * @return The newly created builder. - */ -@Deprecated("Only here to retain binary backward compatibility; will be removed with 1.0.0") -fun getContains(expect: Expect): Builder = - ExpectImpl.charSequence.containsBuilder(expect) - -/** - * Creates a [CharSequenceContains.Builder] based on this [Expect] which allows to define - * more sophisticated `contains not` assertions. - * - * @return The newly created builder. - */ -@Deprecated("Only here to retain binary backward compatibility; will be removed with 1.0.0") -fun getContainsNot(expect: Expect): NotCheckerOption = - NotCheckerOptionImpl(ExpectImpl.charSequence.containsNotBuilder(expect)) diff --git a/apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/charSequenceContainsCheckersDeprecated.kt b/apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/charSequenceContainsCheckersDeprecated.kt deleted file mode 100644 index 8d8a878c3..000000000 --- a/apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/charSequenceContainsCheckersDeprecated.kt +++ /dev/null @@ -1,97 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "DeprecatedCallableAddReplaceWith") -@file:JvmMultifileClass -@file:JvmName("CharSequenceContainsCheckersKt") - -package ch.tutteli.atrium.api.fluent.en_GB - -import ch.tutteli.atrium.api.fluent.en_GB.creating.charsequence.contains.builders.* -import ch.tutteli.atrium.api.fluent.en_GB.creating.charsequence.contains.builders.impl.* -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains.SearchBehaviour -import kotlin.jvm.JvmMultifileClass -import kotlin.jvm.JvmName - -/** - * Restricts a `contains` assertion by specifying that the number of occurrences of the value which we are looking - * for occurs `at least` number of [times] within the search input. - * - * @param times The number which the check will compare against the actual number of times an expected value is - * found in the input of the search. - * - * @return The newly created builder. - * @throws IllegalArgumentException In case [times] is smaller than zero. - * @throws IllegalArgumentException In case [times] equals to zero; use [containsNot] instead. - */ -fun CharSequenceContains.Builder.atLeast( - times: Int -): AtLeastCheckerOption = AtLeastCheckerOptionImpl(times, this) - -/** - * Restricts a `contains at least` assertion by specifying that the number of occurrences of the value which we - * are looking for occurs `at most` number of [times] within the search input. - * - * The resulting restriction will be a `contains at least but at most` assertion. - * - * @param times The number which the check will compare against the actual number of times an expected value is - * found in the input of the search. - * - * @return The newly created builder. - * @throws IllegalArgumentException In case [times] is smaller than zero. - * @throws IllegalArgumentException In case [times] equals to zero; use [containsNot] instead. - * @throws IllegalArgumentException In case [times] of this `at most` restriction equals to the number of the - * `at least` restriction; use the [exactly] restriction instead. - */ -fun AtLeastCheckerOption.butAtMost( - times: Int -): ButAtMostCheckerOption = ButAtMostCheckerOptionImpl(times, this, containsBuilder) - -/** - * Restricts a `contains` assertion by specifying that the number of occurrences of the value which we - * are looking for occurs `exactly` number of [times] within the search input. - * - * @param times The number which the check will compare against the actual number of times an expected value is - * found in the input of the search. - * - * @return The newly created builder. - * @throws IllegalArgumentException In case [times] is smaller than zero. - * @throws IllegalArgumentException In case [times] equals to zero; use [containsNot] instead. - */ -fun CharSequenceContains.Builder.exactly( - times: Int -): ExactlyCheckerOption = ExactlyCheckerOptionImpl(times, this) - -/** - * Restricts a `contains` assertion by specifying that the number of occurrences of the value which we - * are looking for occurs `at least` once but `at most` number of [times] within the search input. - * - * If you want to use a higher lower bound than one, then use `atLeast(2).butAtMost(3)` instead of `atMost(3)`. - * And in case you want to state that it is either not contained at all or at most a certain number of times, - * then use `notOrAtMost(2)` instead. - * - * @param times The number which the check will compare against the actual number of times an expected value is - * found in the input of the search. - * - * @return The newly created builder. - * @throws IllegalArgumentException In case [times] is smaller than zero. - * @throws IllegalArgumentException In case [times] equals to zero; use [containsNot] instead. - * @throws IllegalArgumentException In case [times] equals to one; use [exactly] instead. - */ -fun CharSequenceContains.Builder.atMost( - times: Int -): AtMostCheckerOption = AtMostCheckerOptionImpl(times, this) - -/** - * Restricts a `contains` assertion by specifying that the number of occurrences of the value which we - * are looking for occurs `not at all or at most` number of [times] within the search input. - * - * @param times The number which the check will compare against the actual number of times an expected value is - * found in the input of the search. - * - * @return The newly created builder. - * @throws IllegalArgumentException In case [times] is smaller than zero. - * @throws IllegalArgumentException In case [times] equals to zero; use [containsNot] instead. - */ -fun CharSequenceContains.Builder.notOrAtMost( - times: Int -): NotOrAtMostCheckerOption = NotOrAtMostCheckerOptionImpl(times, this) diff --git a/apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/charSequenceContainsCreatorsDeprecated.kt b/apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/charSequenceContainsCreatorsDeprecated.kt deleted file mode 100644 index a425c0619..000000000 --- a/apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/charSequenceContainsCreatorsDeprecated.kt +++ /dev/null @@ -1,454 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "DeprecatedCallableAddReplaceWith") -@file:JvmMultifileClass -@file:JvmName("CharSequenceContainsCreatorsKt") - -package ch.tutteli.atrium.api.fluent.en_GB - -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.domain.builders.ExpectImpl -import ch.tutteli.atrium.domain.builders.creating.basic.contains.addAssertion -import ch.tutteli.atrium.domain.builders.utils.toVarArg -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains.Builder -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains.CheckerOption -import ch.tutteli.atrium.domain.creating.charsequence.contains.searchbehaviours.IgnoringCaseSearchBehaviour -import ch.tutteli.atrium.domain.creating.charsequence.contains.searchbehaviours.NoOpSearchBehaviour -import ch.tutteli.atrium.logic.creating.typeutils.CharSequenceOrNumberOrChar -import ch.tutteli.atrium.logic.creating.typeutils.IterableLike -import ch.tutteli.kbox.glue -import kotlin.jvm.JvmMultifileClass -import kotlin.jvm.JvmName - -/** - * Finishes the specification of the sophisticated `contains` assertion where the [expected] object shall be searched, - * using a non disjoint search. - * - * Delegates to [values]. - * - * Notice that a runtime check applies which assures that only [CharSequence], [Number] and [Char] are passed. - * This function expects [CharSequenceOrNumberOrChar] (which is a typealias for [Any]) for your convenience, - * so that you can mix [String] and [Int] for instance. - * - * By non disjoint is meant that "aa" in "aaaa" is found three times and not only two times. - * - * @param expected The value which is expected to be contained within the input of the search. - * - * @return An [Expect] for the current subject of the assertion. - * @throws IllegalArgumentException in case [expected] is not a [CharSequence], [Number] or [Char]. - */ -fun CheckerOption.value(expected: CharSequenceOrNumberOrChar): Expect = - values(expected) - -/** - * Finishes the specification of the sophisticated `contains` assertion where the [expected] value as well as - * the [otherExpected] values shall be searched, using a non disjoint search. - * - * Notice that a runtime check applies which assures that only [CharSequence], [Number] and [Char] are passed. - * This function expects [CharSequenceOrNumberOrChar] (which is a typealias for [Any]) for your convenience, - * so that you can mix [String] and [Int] for instance. - * - * By non disjoint is meant that `"aa"` in `"aaaa"` is found three times and not only two times. - * Also notice, that it does not search for unique matches. Meaning, if the input of the search is `"a"` and [expected] - * is defined as `"a"` and one [otherExpected] is defined as `"a"` as well, then both match, even though they match the - * same sequence in the input of the search. Use an option such as [atLeast], [atMost] and [exactly] to control - * the number of occurrences you expect. - * - * Meaning you might want to use: - * `contains.exactly(2).value("a")` - * instead of: - * `contains.atLeast(1).values("a", "a")` - * - * @param expected The value which is expected to be contained within the input of the search. - * @param otherExpected Additional values which are expected to be contained within the input of the search. - * - * @return An [Expect] for the current subject of the assertion. - * @throws IllegalArgumentException in case [expected] or one of the [otherExpected] is not a - * [CharSequence], [Number] or [Char]. - */ -fun CheckerOption.values( - expected: CharSequenceOrNumberOrChar, - vararg otherExpected: CharSequenceOrNumberOrChar -): Expect = addAssertion(ExpectImpl.charSequence.contains.values(this, expected glue otherExpected)) - - -/** - * Finishes the specification of the sophisticated `contains` assertion where the [expected] value shall be searched - * (ignoring case), using a non disjoint search. - * - * Delegates to `values(expected)`. - * - * Notice that a runtime check applies which assures that only [CharSequence], [Number] and [Char] are passed. - * This function expects [CharSequenceOrNumberOrChar] (which is a typealias for [Any]) for your convenience, - * so that you can mix [String] and [Int] for instance. - * - * By non disjoint is meant that "aa" in "aaaa" is found three times and not only two times. - * - * @param expected The value which is expected to be contained within the input of the search. - * - * @return An [Expect] for the current subject of the assertion. - * @throws IllegalArgumentException in case [expected] is not a [CharSequence], [Number] or [Char]. - */ -@JvmName("valueIgnoringCase") -fun CheckerOption.value( - expected: CharSequenceOrNumberOrChar -): Expect = values(expected) - -/** - * Finishes the specification of the sophisticated `contains` assertion where the [expected] value as well as - * the [otherExpected] values shall be searched (ignoring case), using a non disjoint search. - * - * Notice that a runtime check applies which assures that only [CharSequence], [Number] and [Char] are passed. - * This function expects [CharSequenceOrNumberOrChar] (which is a typealias for [Any]) for your convenience, - * so that you can mix [String] and [Int] for instance. - * - * By non disjoint is meant that `"aa"` in `"aaaa"` is found three times and not only two times. - * Also notice, that it does not search for unique matches. Meaning, if the input of the search is `"a"` and [expected] - * is defined as `"a"` and one [otherExpected] is defined as `"a"` as well, then both match, even though they match the - * same sequence in the input of the search. Use an option such as [atLeast], [atMost] and [exactly] to control - * the number of occurrences you expect. - * - * Meaning you might want to use: - * `contains.ignoringCase.exactly(2).value("a")` - * instead of: - * `contains.ignoringCase.atLeast(1).values("a", "a")` - * - * @param expected The value which is expected to be contained within the input of the search. - * @param otherExpected Additional values which are expected to be contained within the input of the search. - * - * @return An [Expect] for the current subject of the assertion. - * @throws IllegalArgumentException in case [expected] or one of the [otherExpected] is not a - * [CharSequence], [Number] or [Char]. - */ -@JvmName("valuesIgnoringCase") -fun CheckerOption.values( - expected: CharSequenceOrNumberOrChar, - vararg otherExpected: CharSequenceOrNumberOrChar -): Expect = addAssertion(ExpectImpl.charSequence.contains.valuesIgnoringCase(this, expected glue otherExpected)) - - -/** - * Finishes the specification of the sophisticated `contains` assertion where the [expected] value shall be searched - * (ignoring case), using a non disjoint search where it needs to be contained at least once. - * - * Delegates to `atLeast(1).value(expected)`. - * - * Notice that a runtime check applies which assures that only [CharSequence], [Number] and [Char] are passed. - * This function expects [CharSequenceOrNumberOrChar] (which is a typealias for [Any]) for your convenience, - * so that you can mix [String] and [Int] for instance. - * - * By non disjoint is meant that "aa" in "aaaa" is found three times and not only two times. - * - * @param expected The value which is expected to be contained within the input of the search. - * - * @return An [Expect] for the current subject of the assertion. - * @throws IllegalArgumentException in case [expected] is not a [CharSequence], [Number] or [Char]. - */ -fun Builder.value(expected: CharSequenceOrNumberOrChar): Expect = - atLeast(1).value(expected) - -/** - * Finishes the specification of the sophisticated `contains` assertion where the [expected] value as well as - * the [otherExpected] values shall be searched (ignoring case), using a non disjoint search - * where each need to be contained at least once. - * - * Delegates to `atLeast(1).values(expected, otherExpected)` - * - * Notice that a runtime check applies which assures that only [CharSequence], [Number] and [Char] are passed. - * This function expects [CharSequenceOrNumberOrChar] (which is a typealias for [Any]) for your convenience, - * so that you can mix [String] and [Int] for instance. - * - * By non disjoint is meant that `"aa"` in `"aaaa"` is found three times and not only two times. - * Also notice, that it does not search for unique matches. Meaning, if the input of the search is `"a"` and [expected] - * is defined as `"a"` and one [otherExpected] is defined as `"a"` as well, then both match, even though they match the - * same sequence in the input of the search. - * - * @param expected The value which is expected to be contained within the input of the search. - * @param otherExpected Additional values which are expected to be contained within the input of the search. - * - * @return An [Expect] for the current subject of the assertion. - * @throws IllegalArgumentException in case [expected] or one of the [otherExpected] is not a - * [CharSequence], [Number] or [Char]. - */ -fun Builder.values( - expected: CharSequenceOrNumberOrChar, - vararg otherExpected: CharSequenceOrNumberOrChar -): Expect = atLeast(1).values(expected, *otherExpected) - -/** - * Finishes the specification of the sophisticated `contains` assertion where the given regular expression [pattern] - * as well as the [otherPatterns] are expected to have a match, using a non disjoint search. - * - * By non disjoint is meant that `"aa"` in `"aaaa"` is found three times and not only two times. - * Also notice, that it does not search for unique matches. Meaning, if the input of the search is `"ab"` and [pattern] - * is defined as `"a(b)?"` and one of the [otherPatterns] is defined as `"a(b)?"` as well, then both match, even though - * they match the same sequence in the input of the search. Use an option such as [atLeast], [atMost] and [exactly] to - * control the number of occurrences you expect. - * - * Meaning you might want to use: - * `contains.exactly(2).regex("a(b)?")` - * instead of: - * `contains.atLeast(1).regex("a(b)?", "a(b)?")` - * - * @param pattern The pattern which is expected to have a match against the input of the search. - * @param otherPatterns Additional patterns which are expected to have a match against the input of the search. - * - * @return An [Expect] for the current subject of the assertion. - */ -fun CheckerOption.regex( - pattern: String, - vararg otherPatterns: String -): Expect = addAssertion(ExpectImpl.charSequence.contains.regex(this, pattern glue otherPatterns)) - -/** - * Finishes the specification of the sophisticated `contains` assertion where the given [Regex] [pattern] - * as well as the [otherPatterns] are expected to have a match, using a non disjoint search. - * - * By non disjoint is meant that `"aa"` in `"aaaa"` is found three times and not only two times. - * Also notice, that it does not search for unique matches. Meaning, if the input of the search is `"ab"` and [pattern] - * is defined as `"a(b)?"` and one of the [otherPatterns] is defined as `"a(b)?"` as well, then both match, even though - * they match the same sequence in the input of the search. Use an option such as [atLeast], [atMost] and [exactly] to - * control the number of occurrences you expect. - * - * Meaning you might want to use: - * `contains.exactly(2).regex(Regex("a(b)?"))` - * instead of: - * `contains.atLeast(1).regex(Regex("a(b)?"), Regex("a(b)?"))` - * - * @param pattern The pattern which is expected to have a match against the input of the search. - * @param otherPatterns Additional patterns which are expected to have a match against the input of the search. - * - * @return An [Expect] for the current subject of the assertion. - * - * @since 0.9.0 - */ -//TODO rename to `matchFor` with 1.0.0 -fun CheckerOption.regex( - pattern: Regex, - vararg otherPatterns: Regex -): Expect = addAssertion(ExpectImpl.charSequence.contains.regex(this, pattern glue otherPatterns)) - -/** - * Finishes the specification of the sophisticated `contains` assertion where the given regular expression [pattern] - * as well as the [otherPatterns] are expected to have a match (ignoring case), using a non disjoint search. - * - * By non disjoint is meant that `"aa"` in `"aaaa"` is found three times and not only two times. - * Also notice, that it does not search for unique matches. Meaning, if the input of the search is `"ab"` and [pattern] - * is defined as `"a(b)?"` and one of the [otherPatterns] is defined as `"a(b)?"` as well, then both match, even though - * they match the same sequence in the input of the search. Use an option such as [atLeast], [atMost] and [exactly] to - * control the number of occurrences you expect. - * - * Meaning you might want to use: - * `contains.ignoringCase.exactly(2).regex("a(b)?")` - * instead of: - * `contains.ignoringCase.atLeast(1).regex("a(b)?", "a(b)?")` - * - * @param pattern The pattern which is expected to have a match against the input of the search. - * @param otherPatterns Additional patterns which are expected to have a match against the input of the search. - * - * @return An [Expect] for the current subject of the assertion. - */ -@JvmName("regexIgnoringCase") -fun CheckerOption.regex( - pattern: String, - vararg otherPatterns: String -): Expect = addAssertion(ExpectImpl.charSequence.contains.regexIgnoringCase(this, pattern glue otherPatterns)) - -/** - * Finishes the specification of the sophisticated `contains` assertion where the given regular expression [pattern] - * as well as the [otherPatterns] are expected to to have at least one match (ignoring case), - * using a non disjoint search. - * - * Delegates to `atLeast(1).regex(pattern, otherPatterns)` - * - * By non disjoint is meant that `"aa"` in `"aaaa"` is found three times and not only two times. - * Also notice, that it does not search for unique matches. Meaning, if the input of the search is `"ab"` and [pattern] - * is defined as `"a(b)?"` and one of the [otherPatterns] is defined as `"a(b)?"` as well, then both match, even though - * they match the same sequence in the input of the search. Use an option such as [atLeast], [atMost] and [exactly] - * to control the number of occurrences you expect. - * - * Meaning you might want to use: - * `contains.ignoringCase.exactly(2).regex("a(b)?")` - * instead of: - * `contains.ignoringCase.atLeast(1).regex("a(b)?", "a(b)?")` - * - * @param pattern The pattern which is expected to have a match against the input of the search. - * @param otherPatterns Additional patterns which are expected to have a match against the input of the search. - * - * @return An [Expect] for the current subject of the assertion. - */ -fun Builder.regex( - pattern: String, - vararg otherPatterns: String -): Expect = atLeast(1).regex(pattern, *otherPatterns) - -/** - * Finishes the specification of the sophisticated `contains` assertion where all elements of the [expectedIterable] - * shall be searched, using a non disjoint search. - * - * Delegates to `values(expectedIterable.first(), *expectedIterable.drop(1).toTypedArray())` - * (see [values] for more information). - * - * Notice that a runtime check applies which assures that only [CharSequence], [Number] and [Char] are passed. - * This function expects [CharSequenceOrNumberOrChar] (which is a typealias for [Any]) for your convenience, - * so that you can mix [String] and [Int] for instance. - * - * By non disjoint is meant that "aa" in "aaaa" is found three times and not only two times. - * - * @param expectedIterable The [Iterable] whose elements are expected to be contained within the input of the search. - * - * @return An [Expect] for the current subject of the assertion. - * @throws IllegalArgumentException in case [expectedIterable] is not a [CharSequence], [Number] or [Char] or the given - * [expectedIterable] does not have elements (is empty). - * - * @since 0.9.0 - * TODO remove with 1.0.0 - */ -fun CheckerOption.elementsOf( - expectedIterable: Iterable -): Expect { - val (first, rest) = toVarArg(expectedIterable) - return values(first, *rest) -} - -/** - * Finishes the specification of the sophisticated `contains` assertion where all elements of the [expectedIterable] - * shall be searched (ignoring case), using a non disjoint search. - * - * Delegates to `values(expectedIterable.first(), *expectedIterable.drop(1).toTypedArray())` - * (see [values] for more information). - * - * Notice that a runtime check applies which assures that only [CharSequence], [Number] and [Char] are passed. - * This function expects [CharSequenceOrNumberOrChar] (which is a typealias for [Any]) for your convenience, - * so that you can mix [String] and [Int] for instance. - * - * By non disjoint is meant that "aa" in "aaaa" is found three times and not only two times. - * - * @param expectedIterable The [Iterable] whose elements are expected to be contained within the input of the search. - * - * @return An [Expect] for the current subject of the assertion. - * @throws IllegalArgumentException in case [expectedIterable] is not a [CharSequence], [Number] or [Char] or the given - * [expectedIterable] does not have elements (is empty). - * - * @since 0.9.0 - * TODO remove with 1.0.0 - */ -@JvmName("elementsOfIgnoringCase") -fun CheckerOption.elementsOf( - expectedIterable: Iterable -): Expect { - val (first, rest) = toVarArg(expectedIterable) - return values(first, *rest) -} - -/** - * Finishes the specification of the sophisticated `contains` assertion where all elements of the [expectedIterable] - * shall be searched (ignoring case), using a non disjoint search. - * - * Delegates to `values(expectedIterable.first(), *expectedIterable.drop(1).toTypedArray())` - * (see [values] for more information). - * - * Notice that a runtime check applies which assures that only [CharSequence], [Number] and [Char] are passed. - * This function expects [CharSequenceOrNumberOrChar] (which is a typealias for [Any]) for your convenience, - * so that you can mix [String] and [Int] for instance. - * - * By non disjoint is meant that "aa" in "aaaa" is found three times and not only two times. - * - * @param expectedIterable The [Iterable] whose elements are expected to be contained within the input of the search. - * - * @return An [Expect] for the current subject of the assertion. - * @throws IllegalArgumentException in case [expectedIterable] is not a [CharSequence], [Number] or [Char] or the given - * [expectedIterable] does not have elements (is empty). - * - * @since 0.11.0 - * TODO remove with 1.0.0 - */ -@JvmName("elementsOfIgnoringCase") -fun Builder.elementsOf( - expectedIterable: Iterable -): Expect { - val (first, rest) = toVarArg(expectedIterable) - return values(first, *rest) -} - -/** - * Finishes the specification of the sophisticated `contains` assertion where all elements of the [expectedIterableLike] - * shall be searched, using a non disjoint search. - * - * Delegates to `values(expectedIterable.first(), *expectedIterable.drop(1).toTypedArray())` - * (see [values] for more information). - * - * Notice that a runtime check applies which assures that only [Iterable], [Sequence] or one of the [Array] types - * are passed. This function expects [IterableLike] (which is a typealias for [Any]) to avoid cluttering the API. - * - * By non disjoint is meant that "aa" in "aaaa" is found three times and not only two times. - * - * @param expectedIterableLike The [IterableLike] whose elements are expected to be contained within the input of the search. - * - * @return An [Expect] for the current subject of the assertion. - * @throws IllegalArgumentException in case [expectedIterableLike] is not an [Iterable], [Sequence] or one of the [Array] types or the given - * [expectedIterableLike] does not have elements (is empty). - * - * @since 0.13.0 - */ -fun CheckerOption.elementsOf( - expectedIterableLike: IterableLike -): Expect { - val (first, rest) = toVarArg(expectedIterableLike) - return values(first, *rest) -} - -/** - * Finishes the specification of the sophisticated `contains` assertion where all elements of the [expectedIterableLike] - * shall be searched (ignoring case), using a non disjoint search. - * - * Delegates to `values(expectedIterable.first(), *expectedIterable.drop(1).toTypedArray())` - * (see [values] for more information). - * - * Notice that a runtime check applies which assures that only [Iterable], [Sequence] or one of the [Array] types - * are passed. This function expects [IterableLike] (which is a typealias for [Any]) to avoid cluttering the API. - * - * By non disjoint is meant that "aa" in "aaaa" is found three times and not only two times. - * - * @param expectedIterableLike The [IterableLike] whose elements are expected to be contained within the input of the search. - * - * @return An [Expect] for the current subject of the assertion. - * @throws IllegalArgumentException in case [expectedIterableLike] is not an [Iterable], [Sequence] or one of the [Array] types or the given - * [expectedIterableLike] does not have elements (is empty). - * - * @since 0.13.0 - */ -@JvmName("elementsOfIgnoringCase") -fun CheckerOption.elementsOf( - expectedIterableLike: IterableLike -): Expect { - val (first, rest) = toVarArg(expectedIterableLike) - return values(first, *rest) -} - -/** - * Finishes the specification of the sophisticated `contains` assertion where all elements of the [expectedIterableLike] - * shall be searched (ignoring case), using a non disjoint search. - * - * Delegates to `values(expectedIterable.first(), *expectedIterable.drop(1).toTypedArray())` - * (see [values] for more information). - * - * Notice that a runtime check applies which assures that only [Iterable], [Sequence] or one of the [Array] types - * are passed. This function expects [IterableLike] (which is a typealias for [Any]) to avoid cluttering the API. - * - * By non disjoint is meant that "aa" in "aaaa" is found three times and not only two times. - * - * @param expectedIterableLike The [IterableLike] whose elements are expected to be contained within the input of the search. - * - * @return An [Expect] for the current subject of the assertion. - * @throws IllegalArgumentException in case [expectedIterableLike] is not an [Iterable], [Sequence] or one of the [Array] types or the given - * [expectedIterableLike] does not have elements (is empty). - * - * @since 0.13.0 - */ -@JvmName("elementsOfIgnoringCase") -fun Builder.elementsOf( - expectedIterableLike: IterableLike -): Expect { - val (first, rest) = toVarArg(expectedIterableLike) - return values(first, *rest) -} diff --git a/apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/charSequenceContainsSearchBehavioursDeprecated.kt b/apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/charSequenceContainsSearchBehavioursDeprecated.kt deleted file mode 100644 index 540f40d0f..000000000 --- a/apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/charSequenceContainsSearchBehavioursDeprecated.kt +++ /dev/null @@ -1,34 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "DeprecatedCallableAddReplaceWith") -@file:JvmMultifileClass -@file:JvmName("CharSequenceContainsSearchBehavioursKt") - -package ch.tutteli.atrium.api.fluent.en_GB - -import ch.tutteli.atrium.api.fluent.en_GB.creating.charsequence.contains.builders.NotCheckerOption -import ch.tutteli.atrium.api.fluent.en_GB.creating.charsequence.contains.builders.impl.NotCheckerOptionImpl -import ch.tutteli.atrium.domain.builders.ExpectImpl -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains -import ch.tutteli.atrium.domain.creating.charsequence.contains.searchbehaviours.IgnoringCaseSearchBehaviour -import ch.tutteli.atrium.domain.creating.charsequence.contains.searchbehaviours.NoOpSearchBehaviour -import ch.tutteli.atrium.domain.creating.charsequence.contains.searchbehaviours.NotSearchBehaviour -import kotlin.jvm.JvmMultifileClass -import kotlin.jvm.JvmName - -/** - * Defines that the v behaviour `ignore case` shall be applied to this sophisticated `contains` assertion. - * - * @return The newly created builder. - */ -val CharSequenceContains.Builder.ignoringCase: CharSequenceContains.Builder - get() : CharSequenceContains.Builder = - ExpectImpl.charSequence.contains.searchBehaviours.ignoringCase(this) - -/** - * Defines that the search behaviour `ignore case` shall be applied to this sophisticated `contains not` assertion. - * - * @return The newly created builder. - */ -val NotCheckerOption.ignoringCase: NotCheckerOption - get() : NotCheckerOption = - NotCheckerOptionImpl(containsBuilder.ignoringCase) diff --git a/apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/creating/charsequence/contains/builders/AtLeastCheckerOption.kt b/apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/creating/charsequence/contains/builders/AtLeastCheckerOption.kt deleted file mode 100644 index 00aa646af..000000000 --- a/apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/creating/charsequence/contains/builders/AtLeastCheckerOption.kt +++ /dev/null @@ -1,21 +0,0 @@ -//TODO remove with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.api.fluent.en_GB.creating.charsequence.contains.builders - -import ch.tutteli.atrium.domain.builders.creating.charsequence.contains.builders.WithTimesCheckerOption -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains - -/** - * Represents the extension point for another option after a `contains at least`-check within a sophisticated - * `contains` assertion building process for [CharSequence]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - */ -@Deprecated( - "Use AtLeastCheckerStep from atrium-logic; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.logic.creating.charsequence.contains.steps.AtLeastCheckerStep") -) -interface AtLeastCheckerOption - : WithTimesCheckerOption diff --git a/apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/creating/charsequence/contains/builders/AtMostCheckerOption.kt b/apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/creating/charsequence/contains/builders/AtMostCheckerOption.kt deleted file mode 100644 index 3a65f029e..000000000 --- a/apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/creating/charsequence/contains/builders/AtMostCheckerOption.kt +++ /dev/null @@ -1,20 +0,0 @@ -//TODO remove with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.api.fluent.en_GB.creating.charsequence.contains.builders - -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains - -/** - * Represents the extension point for another option after a `contains at least once but at most`-check within - * a sophisticated `contains` assertion building process for [CharSequence]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - */ -@Deprecated( - "Use AtMostCheckerStep from atrium-logic; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.logic.creating.charsequence.contains.steps.AtMostCheckerStep") -) -interface AtMostCheckerOption - : CharSequenceContains.CheckerOption diff --git a/apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/creating/charsequence/contains/builders/ButAtMostCheckerOption.kt b/apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/creating/charsequence/contains/builders/ButAtMostCheckerOption.kt deleted file mode 100644 index 8a8e6b0ed..000000000 --- a/apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/creating/charsequence/contains/builders/ButAtMostCheckerOption.kt +++ /dev/null @@ -1,20 +0,0 @@ -//TODO remove with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.api.fluent.en_GB.creating.charsequence.contains.builders - -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains - -/** - * Represents the extension point for another option after a `contains at least but at most`-check within - * a sophisticated `contains` assertion building process for [CharSequence]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - */ -@Deprecated( - "Use ButAtMostCheckerStep from atrium-logic; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.logic.creating.charsequence.contains.steps.ButAtMostCheckerStep") -) -interface ButAtMostCheckerOption - : CharSequenceContains.CheckerOption diff --git a/apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/creating/charsequence/contains/builders/ExactlyCheckerOption.kt b/apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/creating/charsequence/contains/builders/ExactlyCheckerOption.kt deleted file mode 100644 index 3836123d0..000000000 --- a/apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/creating/charsequence/contains/builders/ExactlyCheckerOption.kt +++ /dev/null @@ -1,20 +0,0 @@ -//TODO remove with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.api.fluent.en_GB.creating.charsequence.contains.builders - -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains - -/** - * Represents the extension point for another option after a `contains exactly`-check within - * a sophisticated `contains` assertion building process for [CharSequence]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - */ -@Deprecated( - "Use ExactlyCheckerStep from atrium-logic; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.logic.creating.charsequence.contains.steps.ExactlyCheckerStep") -) -interface ExactlyCheckerOption - : CharSequenceContains.CheckerOption diff --git a/apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/creating/charsequence/contains/builders/NotCheckerOption.kt b/apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/creating/charsequence/contains/builders/NotCheckerOption.kt deleted file mode 100644 index fef4a8a98..000000000 --- a/apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/creating/charsequence/contains/builders/NotCheckerOption.kt +++ /dev/null @@ -1,20 +0,0 @@ -//TODO remove with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.api.fluent.en_GB.creating.charsequence.contains.builders - -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains - -/** - * Represents the extension point for another option after a `contains not at all`-check within - * a sophisticated `contains` assertion building process for [CharSequence]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - */ -@Deprecated( - "Use NotCheckerStep from atrium-logic; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.logic.creating.charsequence.contains.steps.NotCheckerStep") -) -interface NotCheckerOption - : CharSequenceContains.CheckerOption diff --git a/apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/creating/charsequence/contains/builders/NotOrAtMostCheckerOption.kt b/apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/creating/charsequence/contains/builders/NotOrAtMostCheckerOption.kt deleted file mode 100644 index 28c06a880..000000000 --- a/apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/creating/charsequence/contains/builders/NotOrAtMostCheckerOption.kt +++ /dev/null @@ -1,20 +0,0 @@ -//TODO remove with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.api.fluent.en_GB.creating.charsequence.contains.builders - -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains - -/** - * Represents the extension point for another option after a `contains not or at most`-check within - * a sophisticated `contains` assertion building process for [CharSequence]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - */ -@Deprecated( - "use NotOrAtMostCheckerStep from atrium-logic; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.logic.creating.charsequence.contains.steps.NotOrAtMostCheckerStep") -) -interface NotOrAtMostCheckerOption - : CharSequenceContains.CheckerOption diff --git a/apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/creating/charsequence/contains/builders/impl/AtLeastCheckerOptionImpl.kt b/apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/creating/charsequence/contains/builders/impl/AtLeastCheckerOptionImpl.kt deleted file mode 100644 index eb417f8be..000000000 --- a/apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/creating/charsequence/contains/builders/impl/AtLeastCheckerOptionImpl.kt +++ /dev/null @@ -1,32 +0,0 @@ -//TODO remove with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.api.fluent.en_GB.creating.charsequence.contains.builders.impl - -import ch.tutteli.atrium.api.fluent.en_GB.creating.charsequence.contains.builders.AtLeastCheckerOption -import ch.tutteli.atrium.api.fluent.en_GB.creating.charsequence.contains.builders.impl.StaticName.nameContainsNotValuesFun -import ch.tutteli.atrium.domain.builders.creating.charsequence.contains.builders.AtLeastCheckerOptionBase -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains - -/** - * Represents the builder of a `contains at least`-check within the fluent API of a sophisticated - * `contains` assertion for [CharSequence]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - * - * @constructor Represents the builder of a `contains at least` check within the fluent API of a sophisticated - * `contains` assertion for [CharSequence]. - * @param times The number which the check will compare against the actual number of times an expected object is - * found in the input of the search. - * @param containsBuilder The previously used [CharSequenceContains.Builder]. - */ -internal class AtLeastCheckerOptionImpl( - times: Int, - containsBuilder: CharSequenceContains.Builder -) : AtLeastCheckerOptionBase( - times, - containsBuilder, - nameContainsNotValuesFun, - { "atLeast($it)" } -), AtLeastCheckerOption diff --git a/apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/creating/charsequence/contains/builders/impl/AtMostCheckerOptionImpl.kt b/apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/creating/charsequence/contains/builders/impl/AtMostCheckerOptionImpl.kt deleted file mode 100644 index 430b45864..000000000 --- a/apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/creating/charsequence/contains/builders/impl/AtMostCheckerOptionImpl.kt +++ /dev/null @@ -1,34 +0,0 @@ -//TODO remove with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.api.fluent.en_GB.creating.charsequence.contains.builders.impl - -import ch.tutteli.atrium.api.fluent.en_GB.creating.charsequence.contains.builders.AtMostCheckerOption -import ch.tutteli.atrium.api.fluent.en_GB.creating.charsequence.contains.builders.impl.StaticName.nameContainsNotValuesFun -import ch.tutteli.atrium.domain.builders.creating.charsequence.contains.builders.AtMostCheckerOptionBase -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains - -/** - * Represents the builder of a `contains at least once but at most` check within the fluent API of a - * sophisticated `contains` assertion for [CharSequence]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - * - * @constructor Represents the builder of a `contains at least once but at most` check within the fluent API of a - * sophisticated `contains` assertion for [CharSequence]. - * @param times The number which the check will compare against the actual number of times an expected object is - * found in the input of the search. - * @param containsBuilder The previously used [CharSequenceContains.Builder]. - */ -internal class AtMostCheckerOptionImpl( - times: Int, - containsBuilder: CharSequenceContains.Builder -) : AtMostCheckerOptionBase( - times, - containsBuilder, - nameContainsNotValuesFun, - { "atMost($it)" }, - { "atLeast($it)" }, - { "exactly($it)" } -), AtMostCheckerOption diff --git a/apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/creating/charsequence/contains/builders/impl/ButAtMostCheckerOptionImpl.kt b/apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/creating/charsequence/contains/builders/impl/ButAtMostCheckerOptionImpl.kt deleted file mode 100644 index 5e643f88b..000000000 --- a/apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/creating/charsequence/contains/builders/impl/ButAtMostCheckerOptionImpl.kt +++ /dev/null @@ -1,39 +0,0 @@ -//TODO remove with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.api.fluent.en_GB.creating.charsequence.contains.builders.impl - -import ch.tutteli.atrium.api.fluent.en_GB.creating.charsequence.contains.builders.AtLeastCheckerOption -import ch.tutteli.atrium.api.fluent.en_GB.creating.charsequence.contains.builders.ButAtMostCheckerOption -import ch.tutteli.atrium.api.fluent.en_GB.creating.charsequence.contains.builders.impl.StaticName.nameContainsNotValuesFun -import ch.tutteli.atrium.domain.builders.creating.charsequence.contains.builders.ButAtMostCheckerOptionBase -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains - -/** - * Represents the builder of the second step of a `contains at least but at most` check within the - * fluent API of a sophisticated `contains` assertion for [CharSequence]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied to the input of the search. - * - * @constructor Represents the builder of the second step of a `contains at least but at most` check within the - * fluent API of a sophisticated `contains` assertion for [CharSequence]. - * @param times The number which the check will compare against the actual number of times an expected object is - * found in the input of the search. - * @param containsBuilder The previously used [CharSequenceContains.Builder]. - */ -internal class ButAtMostCheckerOptionImpl( - times: Int, - atLeastBuilder: AtLeastCheckerOption, - containsBuilder: CharSequenceContains.Builder -) : ButAtMostCheckerOptionBase( - times, - atLeastBuilder, - containsBuilder, - nameContainsNotValuesFun, - { l, u -> "atLeast($l).butAtMost($u)" }, - { "atMost($it)" }, - { "atLeast($it)" }, - { "butAtMost($it)" }, - { "exactly($it)" } -), ButAtMostCheckerOption diff --git a/apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/creating/charsequence/contains/builders/impl/ExactlyCheckerOptionImpl.kt b/apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/creating/charsequence/contains/builders/impl/ExactlyCheckerOptionImpl.kt deleted file mode 100644 index 3e0644907..000000000 --- a/apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/creating/charsequence/contains/builders/impl/ExactlyCheckerOptionImpl.kt +++ /dev/null @@ -1,32 +0,0 @@ -//TODO remove with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.api.fluent.en_GB.creating.charsequence.contains.builders.impl - -import ch.tutteli.atrium.api.fluent.en_GB.creating.charsequence.contains.builders.ExactlyCheckerOption -import ch.tutteli.atrium.api.fluent.en_GB.creating.charsequence.contains.builders.impl.StaticName.nameContainsNotValuesFun -import ch.tutteli.atrium.domain.builders.creating.charsequence.contains.builders.ExactlyCheckerOptionBase -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains - -/** - * Represents the builder of a `contains exactly` check within the fluent API of a sophisticated - * `contains` assertion for [CharSequence]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - * - * @constructor Represents the builder of a `contains exactly` check within the fluent API of a sophisticated - * `contains` assertion for [CharSequence]. - * @param times The number which the check will compare against the actual number of times an expected object is - * found in the input of the search. - * @param containsBuilder The previously used [CharSequenceContains.Builder]. - */ -internal class ExactlyCheckerOptionImpl( - times: Int, - containsBuilder: CharSequenceContains.Builder -) : ExactlyCheckerOptionBase( - times, - containsBuilder, - nameContainsNotValuesFun, - { "exactly($it)" } -), ExactlyCheckerOption diff --git a/apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/creating/charsequence/contains/builders/impl/NotCheckerOptionImpl.kt b/apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/creating/charsequence/contains/builders/impl/NotCheckerOptionImpl.kt deleted file mode 100644 index d2e618769..000000000 --- a/apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/creating/charsequence/contains/builders/impl/NotCheckerOptionImpl.kt +++ /dev/null @@ -1,24 +0,0 @@ -//TODO remove with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.api.fluent.en_GB.creating.charsequence.contains.builders.impl - -import ch.tutteli.atrium.api.fluent.en_GB.creating.charsequence.contains.builders.NotCheckerOption -import ch.tutteli.atrium.domain.builders.creating.charsequence.contains.builders.NotCheckerOptionBase -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains - -/** - * Represents the builder of a `contains not at all` check within the fluent API of a sophisticated - * `contains` assertion for [CharSequence]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - * - * @constructor Represents the builder of a `contains not at all` check within the fluent API of a sophisticated - * `contains` assertion for [CharSequence]. - * @param containsBuilder The previously used [CharSequenceContains.Builder]. - */ -internal class NotCheckerOptionImpl( - containsBuilder: CharSequenceContains.Builder -) : NotCheckerOptionBase(containsBuilder), - NotCheckerOption diff --git a/apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/creating/charsequence/contains/builders/impl/NotOrAtMostCheckerOptionImpl.kt b/apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/creating/charsequence/contains/builders/impl/NotOrAtMostCheckerOptionImpl.kt deleted file mode 100644 index a18cac191..000000000 --- a/apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/creating/charsequence/contains/builders/impl/NotOrAtMostCheckerOptionImpl.kt +++ /dev/null @@ -1,32 +0,0 @@ -//TODO remove with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.api.fluent.en_GB.creating.charsequence.contains.builders.impl - -import ch.tutteli.atrium.api.fluent.en_GB.creating.charsequence.contains.builders.NotOrAtMostCheckerOption -import ch.tutteli.atrium.api.fluent.en_GB.creating.charsequence.contains.builders.impl.StaticName.nameContainsNotValuesFun -import ch.tutteli.atrium.domain.builders.creating.charsequence.contains.builders.NotOrAtMostCheckerOptionBase -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains - -/** - * Represents the builder of a `contains not or at most` check within the fluent API of a - * sophisticated `contains` assertion for [CharSequence]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - * - * @constructor Represents the builder of a `contains not or at most` check within the fluent API of a - * sophisticated `contains` assertion for [CharSequence]. - * @param times The number which the check will compare against the actual number of times an expected object is - * found in the input of the search. - * @param containsBuilder The previously used [CharSequenceContains.Builder]. - */ -internal class NotOrAtMostCheckerOptionImpl( - times: Int, - containsBuilder: CharSequenceContains.Builder -) : NotOrAtMostCheckerOptionBase( - times, - containsBuilder, - nameContainsNotValuesFun, - { "notOrAtMost($it)" } -), NotOrAtMostCheckerOption diff --git a/apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/creating/charsequence/contains/builders/impl/nameContainsNotFun.kt b/apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/creating/charsequence/contains/builders/impl/nameContainsNotFun.kt deleted file mode 100644 index 862ca3fa1..000000000 --- a/apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/creating/charsequence/contains/builders/impl/nameContainsNotFun.kt +++ /dev/null @@ -1,12 +0,0 @@ -@file:Suppress("DEPRECATION" /* will be removed with 1.0.0 */) -package ch.tutteli.atrium.api.fluent.en_GB.creating.charsequence.contains.builders.impl - -import ch.tutteli.atrium.api.fluent.en_GB.containsNot -import ch.tutteli.atrium.creating.Expect -import kotlin.reflect.KFunction3 - -internal object StaticName { - private val f: KFunction3, Any, Array, Expect> = - Expect::containsNot - val nameContainsNotValuesFun = f.name -} diff --git a/apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/creating/iterable/contains/builders/AtLeastCheckerOption.kt b/apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/creating/iterable/contains/builders/AtLeastCheckerOption.kt deleted file mode 100644 index f13b15a58..000000000 --- a/apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/creating/iterable/contains/builders/AtLeastCheckerOption.kt +++ /dev/null @@ -1,21 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.api.fluent.en_GB.creating.iterable.contains.builders - -import ch.tutteli.atrium.domain.builders.creating.iterable.contains.builders.WithTimesCheckerOption -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains - -/** - * Represents the extension point for another option after a `contains at least`-check within a sophisticated - * `contains` assertion building process for [Iterable]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - */ -@Deprecated( - "Use AtLeastCheckerStep from atrium-logic; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.logic.creating.iterable.contains.steps.AtLeastCheckerStep") -) -interface AtLeastCheckerOption, out S : IterableContains.SearchBehaviour> - : WithTimesCheckerOption diff --git a/apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/creating/iterable/contains/builders/AtMostCheckerOption.kt b/apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/creating/iterable/contains/builders/AtMostCheckerOption.kt deleted file mode 100644 index e0e14699b..000000000 --- a/apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/creating/iterable/contains/builders/AtMostCheckerOption.kt +++ /dev/null @@ -1,21 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.api.fluent.en_GB.creating.iterable.contains.builders - -import ch.tutteli.atrium.domain.builders.creating.iterable.contains.builders.WithTimesCheckerOption -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains - -/** - * Represents the extension point for another option after a `contains at least once but at most`-check within - * a sophisticated `contains` assertion building process for [Iterable]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - */ -@Deprecated( - "Use AtMostCheckerStep from atrium-logic; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.logic.creating.iterable.contains.steps.AtMostCheckerStep") -) -interface AtMostCheckerOption, out S : IterableContains.SearchBehaviour> - : WithTimesCheckerOption diff --git a/apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/creating/iterable/contains/builders/ButAtMostCheckerOption.kt b/apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/creating/iterable/contains/builders/ButAtMostCheckerOption.kt deleted file mode 100644 index f298c57f0..000000000 --- a/apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/creating/iterable/contains/builders/ButAtMostCheckerOption.kt +++ /dev/null @@ -1,21 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.api.fluent.en_GB.creating.iterable.contains.builders - -import ch.tutteli.atrium.domain.builders.creating.iterable.contains.builders.WithTimesCheckerOption -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains - -/** - * Represents the extension point for another option after a `contains at least but at most`-check within a - * sophisticated `contains` assertion building process for [Iterable]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - */ -@Deprecated( - "Use ButAtMostCheckerStep from atrium-logic; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.logic.creating.iterable.contains.steps.ButAtMostCheckerStep") -) -interface ButAtMostCheckerOption, out S : IterableContains.SearchBehaviour> - : WithTimesCheckerOption diff --git a/apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/creating/iterable/contains/builders/ExactlyCheckerOption.kt b/apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/creating/iterable/contains/builders/ExactlyCheckerOption.kt deleted file mode 100644 index 7701f9cc3..000000000 --- a/apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/creating/iterable/contains/builders/ExactlyCheckerOption.kt +++ /dev/null @@ -1,21 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.api.fluent.en_GB.creating.iterable.contains.builders - -import ch.tutteli.atrium.domain.builders.creating.iterable.contains.builders.WithTimesCheckerOption -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains - -/** - * Represents the extension point for another option after a `contains exactly`-check within - * a sophisticated `contains` assertion building process for [Iterable]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - */ -@Deprecated( - "Use ExactlyCheckerStep from atrium-logic; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.logic.creating.iterable.contains.steps.ExactlyCheckerStep") -) -interface ExactlyCheckerOption, out S : IterableContains.SearchBehaviour> - : WithTimesCheckerOption diff --git a/apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/creating/iterable/contains/builders/NotCheckerOption.kt b/apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/creating/iterable/contains/builders/NotCheckerOption.kt deleted file mode 100644 index f353bae28..000000000 --- a/apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/creating/iterable/contains/builders/NotCheckerOption.kt +++ /dev/null @@ -1,20 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.api.fluent.en_GB.creating.iterable.contains.builders - -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains - -/** - * Represents the extension point for another option after a `contains not at all`-check within - * a sophisticated `contains` assertion building process for [Iterable]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - */ -@Deprecated( - "Use NotCheckerStep from atrium-logic; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.logic.creating.iterable.contains.steps.NotCheckerStep") -) -interface NotCheckerOption, out S : IterableContains.SearchBehaviour> - : IterableContains.CheckerOption diff --git a/apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/creating/iterable/contains/builders/NotOrAtMostCheckerOption.kt b/apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/creating/iterable/contains/builders/NotOrAtMostCheckerOption.kt deleted file mode 100644 index d4c78b316..000000000 --- a/apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/creating/iterable/contains/builders/NotOrAtMostCheckerOption.kt +++ /dev/null @@ -1,21 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.api.fluent.en_GB.creating.iterable.contains.builders - -import ch.tutteli.atrium.domain.builders.creating.iterable.contains.builders.WithTimesCheckerOption -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains - -/** - * Represents the extension point for another option after a `contains not or at most`-check within - * a sophisticated `contains` assertion building process for [Iterable]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - */ -@Deprecated( - "Use NotOrAtMostCheckerStep from atrium-logic; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.logic.creating.iterable.contains.steps.NotOrAtMostCheckerStep") -) -interface NotOrAtMostCheckerOption, out S : IterableContains.SearchBehaviour> - : WithTimesCheckerOption diff --git a/apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/creating/iterable/contains/builders/impl/AtLeastCheckerOptionImpl.kt b/apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/creating/iterable/contains/builders/impl/AtLeastCheckerOptionImpl.kt deleted file mode 100644 index eeee6c6f9..000000000 --- a/apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/creating/iterable/contains/builders/impl/AtLeastCheckerOptionImpl.kt +++ /dev/null @@ -1,32 +0,0 @@ -//TODO remove with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.api.fluent.en_GB.creating.iterable.contains.builders.impl - -import ch.tutteli.atrium.api.fluent.en_GB.creating.iterable.contains.builders.AtLeastCheckerOption -import ch.tutteli.atrium.api.fluent.en_GB.creating.iterable.contains.builders.impl.StaticName.nameContainsNotValuesFun -import ch.tutteli.atrium.domain.builders.creating.iterable.contains.builders.AtLeastCheckerOptionBase -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InAnyOrderSearchBehaviour - -/** - * Represents the builder of a `contains at least` check within the fluent API of a sophisticated - * `contains` assertion for [Iterable]. - * - * @param T The input type of the search. - * - * @constructor Represents the builder of a `contains at least` check within the fluent API of a sophisticated - * `contains` assertion for [Iterable]. - * @param times The number which the check will compare against the actual number of times an expected entry is - * found in the [Iterable]. - * @param containsBuilder The previously used [IterableContains.Builder]. - */ -internal class AtLeastCheckerOptionImpl, out S : InAnyOrderSearchBehaviour>( - times: Int, - containsBuilder: IterableContains.Builder -) : AtLeastCheckerOptionBase( - times, - containsBuilder, - nameContainsNotValuesFun, - { "atLeast($it)" } -), AtLeastCheckerOption diff --git a/apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/creating/iterable/contains/builders/impl/AtMostCheckerOptionImpl.kt b/apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/creating/iterable/contains/builders/impl/AtMostCheckerOptionImpl.kt deleted file mode 100644 index 08133069c..000000000 --- a/apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/creating/iterable/contains/builders/impl/AtMostCheckerOptionImpl.kt +++ /dev/null @@ -1,34 +0,0 @@ -//TODO remove with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.api.fluent.en_GB.creating.iterable.contains.builders.impl - -import ch.tutteli.atrium.api.fluent.en_GB.creating.iterable.contains.builders.AtMostCheckerOption -import ch.tutteli.atrium.api.fluent.en_GB.creating.iterable.contains.builders.impl.StaticName.nameContainsNotValuesFun -import ch.tutteli.atrium.domain.builders.creating.iterable.contains.builders.AtMostCheckerOptionBase -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InAnyOrderSearchBehaviour - -/** - * Represents the builder of a `contains at least once but at most` check within the fluent API of a - * sophisticated `contains` assertion for [Iterable]. - * - * @param T The input type of the search. - * - * @constructor Represents the builder of a `contains at least once but at most` check within the fluent API of a - * sophisticated `contains` assertion for [Iterable]. - * @param times The number which the check will compare against the actual number of times an expected entry is - * found in the [Iterable]. - * @param containsBuilder The previously used [IterableContains.Builder]. - */ -internal class AtMostCheckerOptionImpl, out S : InAnyOrderSearchBehaviour>( - times: Int, - containsBuilder: IterableContains.Builder -) : AtMostCheckerOptionBase( - times, - containsBuilder, - nameContainsNotValuesFun, - { "atMost($it)" }, - { "atLeast($it)" }, - { "exactly($it)" } -), AtMostCheckerOption diff --git a/apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/creating/iterable/contains/builders/impl/ButAtMostCheckerOptionImpl.kt b/apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/creating/iterable/contains/builders/impl/ButAtMostCheckerOptionImpl.kt deleted file mode 100644 index 6577f4b34..000000000 --- a/apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/creating/iterable/contains/builders/impl/ButAtMostCheckerOptionImpl.kt +++ /dev/null @@ -1,39 +0,0 @@ -//TODO remove with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.api.fluent.en_GB.creating.iterable.contains.builders.impl - -import ch.tutteli.atrium.api.fluent.en_GB.creating.iterable.contains.builders.AtLeastCheckerOption -import ch.tutteli.atrium.api.fluent.en_GB.creating.iterable.contains.builders.ButAtMostCheckerOption -import ch.tutteli.atrium.api.fluent.en_GB.creating.iterable.contains.builders.impl.StaticName.nameContainsNotValuesFun -import ch.tutteli.atrium.domain.builders.creating.iterable.contains.builders.ButAtMostCheckerOptionBase -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InAnyOrderSearchBehaviour - -/** - * Represents the builder of the second step of a `contains at least but at most` check within the - * fluent API of a sophisticated `contains` assertion for [Iterable]. - * - * @param T The input type of the search. - * - * @constructor Represents the builder of the second step of a `contains at least but at most` check within the - * fluent API of a sophisticated `contains` assertion for [Iterable]. - * @param times The number which the check will compare against the actual number of times an expected entry is - * found in the [Iterable]. - * @param containsBuilder The previously used [IterableContains.Builder]. - */ -internal class ButAtMostCheckerOptionImpl, out S : InAnyOrderSearchBehaviour>( - times: Int, - atLeastBuilder: AtLeastCheckerOption, - containsBuilder: IterableContains.Builder -) : ButAtMostCheckerOptionBase( - times, - atLeastBuilder, - containsBuilder, - nameContainsNotValuesFun, - { l, u -> "atLeast($l).butAtMost($u)" }, - { "atMost($it)" }, - { "atLeast($it)" }, - { "butAtMost($it)" }, - { "exactly($it)" } -), ButAtMostCheckerOption diff --git a/apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/creating/iterable/contains/builders/impl/ExactlyCheckerOptionImpl.kt b/apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/creating/iterable/contains/builders/impl/ExactlyCheckerOptionImpl.kt deleted file mode 100644 index d356c40df..000000000 --- a/apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/creating/iterable/contains/builders/impl/ExactlyCheckerOptionImpl.kt +++ /dev/null @@ -1,32 +0,0 @@ -//TODO remove with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.api.fluent.en_GB.creating.iterable.contains.builders.impl - -import ch.tutteli.atrium.api.fluent.en_GB.creating.iterable.contains.builders.ExactlyCheckerOption -import ch.tutteli.atrium.api.fluent.en_GB.creating.iterable.contains.builders.impl.StaticName.nameContainsNotValuesFun -import ch.tutteli.atrium.domain.builders.creating.iterable.contains.builders.ExactlyCheckerOptionBase -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InAnyOrderSearchBehaviour - -/** - * Represents the builder of a `contains exactly` check within the fluent API of a sophisticated - * `contains` assertion for [Iterable]. - * - * @param T The input type of the search. - * - * @constructor Represents the builder of a `contains exactly` check within the fluent API of a sophisticated - * `contains` assertion for [Iterable]. - * @param times The number which the check will compare against the actual number of times an expected entry is - * found in the [Iterable]. - * @param containsBuilder The previously used [IterableContains.Builder]. - */ -internal class ExactlyCheckerOptionImpl, out S : InAnyOrderSearchBehaviour>( - times: Int, - containsBuilder: IterableContains.Builder -) : ExactlyCheckerOptionBase( - times, - containsBuilder, - nameContainsNotValuesFun, - { "exactly($it)" } -), ExactlyCheckerOption diff --git a/apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/creating/iterable/contains/builders/impl/NotCheckerOptionImpl.kt b/apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/creating/iterable/contains/builders/impl/NotCheckerOptionImpl.kt deleted file mode 100644 index a88eb5e48..000000000 --- a/apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/creating/iterable/contains/builders/impl/NotCheckerOptionImpl.kt +++ /dev/null @@ -1,25 +0,0 @@ -//TODO remove with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.api.fluent.en_GB.creating.iterable.contains.builders.impl - -import ch.tutteli.atrium.api.fluent.en_GB.creating.iterable.contains.builders.NotCheckerOption -import ch.tutteli.atrium.domain.builders.creating.iterable.contains.builders.NotCheckerOptionBase -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InAnyOrderSearchBehaviour - -/** - * Represents the builder of a `contains not at all` check within the fluent API of a sophisticated - * `contains` assertion for [Iterable]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - * - * @constructor Represents the builder of a `contains not at all` check within the fluent API of a sophisticated - * `contains not` assertion for [Iterable]. - * @param containsBuilder The previously used [IterableContains.Builder]. - */ -internal class NotCheckerOptionImpl, out S : InAnyOrderSearchBehaviour>( - containsBuilder: IterableContains.Builder -) : NotCheckerOptionBase(containsBuilder), - NotCheckerOption diff --git a/apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/creating/iterable/contains/builders/impl/NotOrAtMostCheckerOptionImpl.kt b/apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/creating/iterable/contains/builders/impl/NotOrAtMostCheckerOptionImpl.kt deleted file mode 100644 index d975414b5..000000000 --- a/apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/creating/iterable/contains/builders/impl/NotOrAtMostCheckerOptionImpl.kt +++ /dev/null @@ -1,32 +0,0 @@ -//TODO remove with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.api.fluent.en_GB.creating.iterable.contains.builders.impl - -import ch.tutteli.atrium.api.fluent.en_GB.creating.iterable.contains.builders.NotOrAtMostCheckerOption -import ch.tutteli.atrium.api.fluent.en_GB.creating.iterable.contains.builders.impl.StaticName.nameContainsNotValuesFun -import ch.tutteli.atrium.domain.builders.creating.iterable.contains.builders.NotOrAtMostCheckerOptionBase -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InAnyOrderSearchBehaviour - -/** - * Represents the builder of a `contains not or at most` check within the fluent API of a - * sophisticated `contains` assertion for [Iterable]. - * - * @param T The input type of the search. - * - * @constructor Represents the builder of a `contains at least once but at most` check within the fluent API of a - * sophisticated `contains` assertion for [Iterable]. - * @param times The number which the check will compare against the actual number of times an expected entry is - * found in the [Iterable]. - * @param containsBuilder The previously used [IterableContains.Builder]. - */ -internal class NotOrAtMostCheckerOptionImpl, out S : InAnyOrderSearchBehaviour>( - times: Int, - containsBuilder: IterableContains.Builder -) : NotOrAtMostCheckerOptionBase( - times, - containsBuilder, - nameContainsNotValuesFun, - { "notOrAtMost($it)" } -), NotOrAtMostCheckerOption diff --git a/apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/creating/iterable/contains/builders/impl/nameContainsNotFun.kt b/apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/creating/iterable/contains/builders/impl/nameContainsNotFun.kt deleted file mode 100644 index dbdb57993..000000000 --- a/apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/creating/iterable/contains/builders/impl/nameContainsNotFun.kt +++ /dev/null @@ -1,14 +0,0 @@ -//TODO remove with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.api.fluent.en_GB.creating.iterable.contains.builders.impl - -import ch.tutteli.atrium.api.fluent.en_GB.containsNot -import ch.tutteli.atrium.creating.Expect -import kotlin.reflect.KFunction3 - -internal object StaticName { - private val f: KFunction3>, Double, Array, Expect>> = - Expect>::containsNot - val nameContainsNotValuesFun = f.name -} diff --git a/apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/iterableAssertionsDeprecated.kt b/apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/iterableAssertionsDeprecated.kt deleted file mode 100644 index 29e64469b..000000000 --- a/apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/iterableAssertionsDeprecated.kt +++ /dev/null @@ -1,36 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "DeprecatedCallableAddReplaceWith") -@file:JvmMultifileClass -@file:JvmName("IterableAssertionsKt") - -package ch.tutteli.atrium.api.fluent.en_GB - -import ch.tutteli.atrium.api.fluent.en_GB.creating.iterable.contains.builders.NotCheckerOption -import ch.tutteli.atrium.api.fluent.en_GB.creating.iterable.contains.builders.impl.NotCheckerOptionImpl -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.domain.builders.ExpectImpl -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.NoOpSearchBehaviour -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.NotSearchBehaviour -import kotlin.jvm.JvmMultifileClass -import kotlin.jvm.JvmName - -/** - * Creates an [IterableContains.Builder] based on this [Expect] which allows to define - * more sophisticated `contains` assertions. - * - * @return The newly created builder. - */ -@Deprecated("Only here to retain binary backward compatibility; will be removed with 1.0.0") -fun > getContains(expect: Expect): IterableContains.Builder = - ExpectImpl.iterable.containsBuilder(expect) - -/** - * Creates an [IterableContains.Builder] based on this [Expect] which allows to define - * more sophisticated `contains not` assertions. - * - * @return The newly created builder. - */ -@Deprecated("Only here to retain binary backward compatibility; will be removed with 1.0.0") -fun > getContainsNot(expect: Expect): NotCheckerOption = - NotCheckerOptionImpl(ExpectImpl.iterable.containsNotBuilder(expect)) diff --git a/apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/iterableContainsCheckers.kt b/apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/iterableContainsCheckers.kt deleted file mode 100644 index 37656e893..000000000 --- a/apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/iterableContainsCheckers.kt +++ /dev/null @@ -1,93 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "DeprecatedCallableAddReplaceWith") - -package ch.tutteli.atrium.api.fluent.en_GB - -import ch.tutteli.atrium.api.fluent.en_GB.creating.iterable.contains.builders.* -import ch.tutteli.atrium.api.fluent.en_GB.creating.iterable.contains.builders.impl.* -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InAnyOrderSearchBehaviour - -/** - * Restricts a `contains` assertion by specifying that the number of occurrences of the entry which we are looking - * for occurs `at least` number of [times] within the [Iterable]. - * - * @param times The number which the check will compare against the actual number of times an expected entry is - * found in the [Iterable]. - * - * @return The newly created builder. - * @throws IllegalArgumentException In case [times] is smaller than zero. - * @throws IllegalArgumentException In case [times] equals to zero; use [containsNot] instead. - */ -fun , S : InAnyOrderSearchBehaviour> IterableContains.Builder.atLeast( - times: Int -): AtLeastCheckerOption = AtLeastCheckerOptionImpl(times, this) - -/** - * Restricts a `contains at least` assertion by specifying that the number of occurrences of the entry which we - * are looking for occurs `at most` number of [times] within the [Iterable]. - * - * The resulting restriction will be a `contains at least but at most` assertion. - * - * @param times The number which the check will compare against the actual number of times an expected entry is - * found in the [Iterable]. - * - * @return The newly created builder. - * @throws IllegalArgumentException In case [times] is smaller than zero. - * @throws IllegalArgumentException In case [times] equals to zero; use [containsNot] instead. - * @throws IllegalArgumentException In case [times] of this `at most` restriction equals to the number of the - * `at least` restriction; use the [exactly] restriction instead. - */ -fun , S : InAnyOrderSearchBehaviour> AtLeastCheckerOption.butAtMost( - times: Int -): ButAtMostCheckerOption = ButAtMostCheckerOptionImpl(times, this, containsBuilder) - -/** - * Restricts a `contains` assertion by specifying that the number of occurrences of the entry which we - * are looking for occurs `exactly` number of [times] within the [Iterable]. - * - * @param times The number which the check will compare against the actual number of times an expected entry is - * found in the [Iterable]. - * - * @return The newly created builder. - * @throws IllegalArgumentException In case [times] is smaller than zero. - * @throws IllegalArgumentException In case [times] equals to zero; use [containsNot] instead. - */ -fun , S : InAnyOrderSearchBehaviour> IterableContains.Builder.exactly( - times: Int -): ExactlyCheckerOption = ExactlyCheckerOptionImpl(times, this) - -/** - * Restricts a `contains` assertion by specifying that the number of occurrences of the entry which we - * are looking for occurs `at least` once but `at most` number of [times] within the [Iterable]. - * - * If you want to use a higher lower bound than one, then use `atLeast(2).butAtMost(3)` instead of `atMost(3)`. - * And in case you want to state that it is either not contained at all or at most a certain number of times, - * then use `notOrAtMost(2)` instead. - * - * @param times The number which the check will compare against the actual number of times an expected entry is - * found in the [Iterable]. - * - * @return The newly created builder. - * @throws IllegalArgumentException In case [times] is smaller than zero. - * @throws IllegalArgumentException In case [times] equals to zero; use [containsNot] instead. - * @throws IllegalArgumentException In case [times] equals to one; use [exactly] instead. - */ -fun , S : InAnyOrderSearchBehaviour> IterableContains.Builder.atMost( - times: Int -): AtMostCheckerOption = AtMostCheckerOptionImpl(times, this) - -/** - * Restricts a `contains` assertion by specifying that the number of occurrences of the entry which we - * are looking for occurs `not at all or at most` number of [times] within the [Iterable]. - * - * @param times The number which the check will compare against the actual number of times an expected entry is - * found in the [Iterable]. - * - * @return The newly created builder. - * @throws IllegalArgumentException In case [times] is smaller than zero. - * @throws IllegalArgumentException In case [times] equals to zero; use [containsNot] instead. - */ -fun , S : InAnyOrderSearchBehaviour> IterableContains.Builder.notOrAtMost( - times: Int -): NotOrAtMostCheckerOption = NotOrAtMostCheckerOptionImpl(times, this) diff --git a/apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/iterableContainsInAnyOrderCreators.kt b/apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/iterableContainsInAnyOrderCreators.kt deleted file mode 100644 index 96be0d9b0..000000000 --- a/apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/iterableContainsInAnyOrderCreators.kt +++ /dev/null @@ -1,138 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "DeprecatedCallableAddReplaceWith") - -package ch.tutteli.atrium.api.fluent.en_GB - -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.domain.builders.ExpectImpl -import ch.tutteli.atrium.domain.builders.creating.basic.contains.addAssertion -import ch.tutteli.atrium.domain.builders.utils.toVarArg -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains.CheckerOption -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InAnyOrderSearchBehaviour -import ch.tutteli.atrium.domain.creating.typeutils.IterableLike -import ch.tutteli.kbox.glue - -/** - * Finishes the specification of the sophisticated `contains` assertion where the [expected] - * value shall be searched within the [Iterable]. - * - * Delegates to [values]. - * - * @param expected The value which is expected to be contained within this [Iterable]. - * - * @return An [Expect] for the current subject of the assertion. - */ -fun > CheckerOption.value(expected: E): Expect = - values(expected) - -/** - * Finishes the specification of the sophisticated `contains` assertion where the [expected] - * value as well as the [otherExpected] values (if given) shall be searched within the [Iterable]. - * - * Notice, that it does not search for unique matches. Meaning, if the iterable is `setOf('a', 'b')` and - * [expected] is defined as `'a'` and one [otherExpected] is defined as `'a'` as well, then both match, - * even though they match the same entry. Use an option such as [atLeast], [atMost] and [exactly] to control the - * number of occurrences you expect. - * - * Meaning you might want to use: - * `contains.inAnyOrder.exactly(2).values('a')` - * instead of: - * `contains.inAnyOrder.atLeast(1).values('a', 'a')` - * - * @param expected The object which is expected to be contained within this [Iterable]. - * @param otherExpected Additional objects which are expected to be contained within this [Iterable]. - * - * @return An [Expect] for the current subject of the assertion. - */ -fun > CheckerOption.values( - expected: E, - vararg otherExpected: E -): Expect = addAssertion(ExpectImpl.iterable.contains.valuesInAnyOrder(this, expected glue otherExpected)) - -/** - * Finishes the specification of the sophisticated `contains` assertion where an entry shall be searched which either - * holds all assertions [assertionCreatorOrNull] creates or needs to be `null` in case [assertionCreatorOrNull] - * is defined as `null`. - * - * Delegates to [entries]. - * - * @param assertionCreatorOrNull The identification lambda which creates the assertions which the entry we are looking - * for has to hold; or in other words, the function which defines whether an entry is the one we are looking for - * or not. In case it is defined as `null`, then an entry is identified if it is `null` as well. - * - * @return An [Expect] for the current subject of the assertion. - */ -fun > CheckerOption.entry( - assertionCreatorOrNull: (Expect.() -> Unit)? -): Expect = entries(assertionCreatorOrNull) - -/** - * Finishes the specification of the sophisticated `contains` assertion where an entry shall be searched which either - * holds all assertions [assertionCreatorOrNull] creates or needs to be `null` in case - * [assertionCreatorOrNull] is defined as `null` -- likewise an entry (can be the same) is searched for each - * of the [otherAssertionCreatorsOrNulls]. - * - * @param assertionCreatorOrNull The identification lambda which creates the assertions which the entry we are looking - * for has to hold; or in other words, the function which defines whether an entry is the one we are looking for - * or not. In case it is defined as `null`, then an entry is identified if it is `null` as well. - * @param otherAssertionCreatorsOrNulls Additional identification lambdas which each identify (separately) an entry - * which we are looking for (see [assertionCreatorOrNull] for more information). - * - * @return An [Expect] for the current subject of the assertion. - */ -fun > CheckerOption.entries( - assertionCreatorOrNull: (Expect.() -> Unit)?, - vararg otherAssertionCreatorsOrNulls: (Expect.() -> Unit)? -): Expect = addAssertion( - ExpectImpl.iterable.contains.entriesInAnyOrder( - this, - assertionCreatorOrNull glue otherAssertionCreatorsOrNulls - ) -) - -/** - * Finishes the specification of the sophisticated `contains` assertion where all elements of the [expectedIterable] - * shall be searched within the [Iterable]. - * - * Delegates to [values] which also means that it does not search for unique matches - * (see [values] for more information). - * - * @param expectedIterable The [Iterable] whose elements are expected to be contained within this [Iterable]. - * - * @return An [Expect] for the current subject of the assertion. - * @throws IllegalArgumentException in case the given [expectedIterable] does not have elements (is empty). - * - * @since 0.9.0 - * TODO remove with 1.0.0 - */ -inline fun > CheckerOption.elementsOf( - expectedIterable: Iterable -): Expect { - val (first, rest) = toVarArg(expectedIterable) - return values(first, *rest) -} - -/** - * Finishes the specification of the sophisticated `contains` assertion where all elements of the [expectedIterableLike] - * shall be searched within the [Iterable]. - * - * Delegates to [values] which also means that it does not search for unique matches - * (see [values] for more information). - * - * Notice that a runtime check applies which assures that only [Iterable], [Sequence] or one of the [Array] types - * are passed. This function expects [IterableLike] (which is a typealias for [Any]) to avoid cluttering the API. - * - * @param expectedIterableLike The [IterableLike] whose elements are expected to be contained within this [Iterable]. - * - * @return An [Expect] for the current subject of the assertion. - * @throws IllegalArgumentException in case [expectedIterableLike] is not an [Iterable], [Sequence] or one of the [Array] types - * or the given [expectedIterableLike] does not have elements (is empty). - * - * @since 0.13.0 - */ -inline fun > CheckerOption.elementsOf( - expectedIterableLike: IterableLike -): Expect { - val (first, rest) = toVarArg(expectedIterableLike) - return values(first, *rest) -} diff --git a/apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/iterableContainsInAnyOrderOnlyCreators.kt b/apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/iterableContainsInAnyOrderOnlyCreators.kt deleted file mode 100644 index ea57dd528..000000000 --- a/apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/iterableContainsInAnyOrderOnlyCreators.kt +++ /dev/null @@ -1,163 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "DeprecatedCallableAddReplaceWith") - -package ch.tutteli.atrium.api.fluent.en_GB - -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.domain.builders.ExpectImpl -import ch.tutteli.atrium.domain.builders.creating.basic.contains.addAssertion -import ch.tutteli.atrium.domain.builders.utils.toVarArg -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains.Builder -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InAnyOrderOnlySearchBehaviour -import ch.tutteli.atrium.domain.creating.typeutils.IterableLike -import ch.tutteli.kbox.glue - -/** - * Finishes the specification of the sophisticated `contains` assertion where the [Iterable] needs to contain only the - * [expected] value. - * - * Delegates to [values]. - * - * Note that we might change the signature of this function with the next version - * which will cause a binary backward compatibility break (see - * [#292](https://github.com/robstoll/atrium/issues/292) for more information) - * - * @param expected The value which is expected to be contained within the [Iterable]. - * - * @return An [Expect] for the current subject of the assertion. - */ -fun > Builder.value(expected: E): Expect = - values(expected) - -/** - * Finishes the specification of the sophisticated `contains` assertion where the [expected] - * value as well as the [otherExpected] values (if given) need to be - * contained in [Iterable] where it does not matter in which order but only as - * many entries should be returned by the [Iterable] as values defined. - * - * Note that we might change the signature of this function with the next version - * which will cause a binary backward compatibility break (see - * [#292](https://github.com/robstoll/atrium/issues/292) for more information) - * - * @param expected The value which is expected to be contained within the [Iterable]. - * @param otherExpected Additional values which are expected to be contained within [Iterable]. - * - * @return An [Expect] for the current subject of the assertion. - */ -fun > Builder.values( - expected: E, - vararg otherExpected: E -): Expect = addAssertion(ExpectImpl.iterable.contains.valuesInAnyOrderOnly(this, expected glue otherExpected)) - -/** - * Finishes the specification of the sophisticated `contains` assertion where the [Iterable] needs to contain only one - * entry which holds all assertions created by the given [assertionCreatorOrNull] or is `null` in case - * [assertionCreatorOrNull] is defined as `null`. - * - * Delegates to [entries]. - * - * Note that we might change the signature of this function with the next version - * which will cause a binary backward compatibility break (see - * [#292](https://github.com/robstoll/atrium/issues/292) for more information) - * - * @param assertionCreatorOrNull The identification lambda which creates the assertions which the entry we are looking - * for has to hold; or in other words, the function which defines whether an entry is the one we are looking for - * or not. In case it is defined as `null`, then an entry is identified if it is `null` as well. - * - * @return An [Expect] for the current subject of the assertion. - */ -fun > Builder.entry( - assertionCreatorOrNull: (Expect.() -> Unit)? -): Expect = entries(assertionCreatorOrNull) - -/** - * Finishes the specification of the sophisticated `contains` assertion where an entry needs to be contained in the - * [Iterable] which holds all assertions [assertionCreatorOrNull] creates or needs to be `null` in case - * [assertionCreatorOrNull] is defined as `null` -- likewise an entry for each - * [otherAssertionCreatorsOrNulls] needs to be contained in the [Iterable] where it does not matter in which order the - * entries appear but only as many entries should be returned by the [Iterable] as assertion creators are defined. - * - * Notice, that a first-wins strategy applies which means your assertion creator lambdas -- which kind of serve as - * identification lambdas -- should be ordered in such a way that the most specific identification lambda appears - * first, not that a less specific lambda wins. For instance, given a `setOf(1, 2)` you should not search for - * `entries({ isGreaterThan(0) }, { toBe(1) })` but for - * `entries({ toBe(1) }, { isGreaterThan(0) })` otherwise - * `isGreaterThan(0)` matches `1` before `toBe(1)` would match it. As a consequence `toBe(1)` could only match the - * entry which is left -- in this case `2` -- and of course this would fail. - * - * Note that we might change the signature of this function with the next version - * which will cause a binary backward compatibility break (see - * [#292](https://github.com/robstoll/atrium/issues/292) for more information) - * - * @param assertionCreatorOrNull The identification lambda which creates the assertions which the entry we are looking - * for has to hold; or in other words, the function which defines whether an entry is the one we are looking for - * or not. In case it is defined as `null`, then an entry is identified if it is `null` as well. - * @param otherAssertionCreatorsOrNulls Additional identification lambdas which each identify (separately) an entry - * which we are looking for (see [assertionCreatorOrNull] for more information). - * - * @return An [Expect] for the current subject of the assertion. - */ -fun > Builder.entries( - assertionCreatorOrNull: (Expect.() -> Unit)?, - vararg otherAssertionCreatorsOrNulls: (Expect.() -> Unit)? -): Expect = addAssertion( - ExpectImpl.iterable.contains.entriesInAnyOrderOnly( - this, - assertionCreatorOrNull glue otherAssertionCreatorsOrNulls - ) -) - -/** - * Finishes the specification of the sophisticated `contains` assertion where all elements in - * [expectedIterable] need to be contained in [Iterable] where it does not matter in which order but only as - * many entries should be returned by the [Iterable] as values defined. - * - * Delegates to [values]. - * - * Note that we might change the signature of this function with the next version - * which will cause a binary backward compatibility break (see - * [#292](https://github.com/robstoll/atrium/issues/292) for more information) - * - * @param expectedIterable The [Iterable] whose elements are expected to be contained within this [Iterable] - * - * @return An [Expect] for the current subject of the assertion. - * @throws IllegalArgumentException in case the given [expectedIterable] does not have elements (is empty). - * - * @since 0.9.0 - * TODO remove with 1.0.0 - */ -inline fun > Builder.elementsOf( - expectedIterable: Iterable -): Expect { - val (first, rest) = toVarArg(expectedIterable) - return values(first, *rest) -} - -/** - * Finishes the specification of the sophisticated `contains` assertion where all elements in - * [expectedIterableLike] need to be contained in [Iterable] where it does not matter in which order but only as - * many entries should be returned by the [Iterable] as values defined. - * - * Delegates to [values]. - * - * Notice that a runtime check applies which assures that only [Iterable], [Sequence] or one of the [Array] types - * are passed. This function expects [IterableLike] (which is a typealias for [Any]) to avoid cluttering the API. - * - * Note that we might change the signature of this function with the next version - * which will cause a binary backward compatibility break (see - * [#292](https://github.com/robstoll/atrium/issues/292) for more information) - * - * @param expectedIterableLike The [IterableLike] whose elements are expected to be contained within this [Iterable] - * - * @return An [Expect] for the current subject of the assertion. - * @throws IllegalArgumentException in case [expectedIterableLike] is not an [Iterable], [Sequence] or one of the [Array] types - * or the given [expectedIterableLike] does not have elements (is empty). - * - * @since 0.13.0 - */ -inline fun > Builder.elementsOf( - expectedIterableLike: IterableLike -): Expect { - val (first, rest) = toVarArg(expectedIterableLike) - return values(first, *rest) -} diff --git a/apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/iterableContainsInOrderOnlyCreators.kt b/apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/iterableContainsInOrderOnlyCreators.kt deleted file mode 100644 index 242004454..000000000 --- a/apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/iterableContainsInOrderOnlyCreators.kt +++ /dev/null @@ -1,153 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "DeprecatedCallableAddReplaceWith") - -package ch.tutteli.atrium.api.fluent.en_GB - -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.domain.builders.ExpectImpl -import ch.tutteli.atrium.domain.builders.creating.basic.contains.addAssertion -import ch.tutteli.atrium.domain.builders.utils.toVarArg -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains.Builder -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InOrderOnlySearchBehaviour -import ch.tutteli.atrium.domain.creating.typeutils.IterableLike -import ch.tutteli.kbox.glue - -/** - * Finishes the specification of the sophisticated `contains` assertion where the [Iterable] needs to contain only the - * [expected] value. - * - * Delegates to [values]. - * - * Note that we might change the signature of this function with the next version - * which will cause a binary backward compatibility break (see - * [#292](https://github.com/robstoll/atrium/issues/292) for more information) - * - * @param expected The value which is expected to be contained within the [Iterable]. - * - * @return An [Expect] for the current subject of the assertion. - */ -fun > Builder.value(expected: E): Expect = - values(expected) - -/** - * Finishes the specification of the sophisticated `contains` assertion where the [Iterable] needs to contain only the - * [expected] value as well as the [otherExpected] values - * (if given) in the specified order. - * - * Note that we might change the signature of this function with the next version - * which will cause a binary backward compatibility break (see - * [#292](https://github.com/robstoll/atrium/issues/292) for more information) - * - * @param expected The value which is expected to be contained within the [Iterable]. - * @param otherExpected Additional values which are expected to be contained within [Iterable]. - * - * @return An [Expect] for the current subject of the assertion. - */ -fun > Builder.values( - expected: E, - vararg otherExpected: E -): Expect = addAssertion(ExpectImpl.iterable.contains.valuesInOrderOnly(this, expected glue otherExpected)) - -/** - * Finishes the specification of the sophisticated `contains` assertion where the [Iterable] needs to contain only a - * single entry which holds all assertions created by the given [assertionCreatorOrNull] or needs to be `null` - * in case [assertionCreatorOrNull] is defined as `null`. - * - * Delegates to `entries(assertionCreatorOrNull)`. - * - * Note that we might change the signature of this function with the next version - * which will cause a binary backward compatibility break (see - * [#292](https://github.com/robstoll/atrium/issues/292) for more information) - * - * @param assertionCreatorOrNull The identification lambda which creates the assertions which the entry we are looking - * for has to hold; or in other words, the function which defines whether an entry is the one we are looking for - * or not. In case it is defined as `null`, then an entry is identified if it is `null` as well. - * - * @return An [Expect] for the current subject of the assertion. - */ -fun > Builder.entry( - assertionCreatorOrNull: (Expect.() -> Unit)? -): Expect = entries(assertionCreatorOrNull) - -/** - * Finishes the specification of the sophisticated `contains` assertion where the [Iterable] needs to contain only an - * entry which holds all assertions [assertionCreatorOrNull] creates or is `null` in case [assertionCreatorOrNull] - * is defined as `null` and likewise a further entry for each - * [otherAssertionCreatorsOrNulls] (if given) whereas the entries have to appear in the specified order. - * - * Note that we might change the signature of this function with the next version - * which will cause a binary backward compatibility break (see - * [#292](https://github.com/robstoll/atrium/issues/292) for more information) - * - * @param assertionCreatorOrNull The identification lambda which creates the assertions which the entry we are looking - * for has to hold; or in other words, the function which defines whether an entry is the one we are looking for - * or not. In case it is defined as `null`, then an entry is identified if it is `null` as well. - * @param otherAssertionCreatorsOrNulls Additional identification lambdas which each identify (separately) an entry - * which we are looking for (see [assertionCreatorOrNull] for more information). - * - * @return An [Expect] for the current subject of the assertion. - */ -fun > Builder.entries( - assertionCreatorOrNull: (Expect.() -> Unit)?, - vararg otherAssertionCreatorsOrNulls: (Expect.() -> Unit)? -): Expect = addAssertion( - ExpectImpl.iterable.contains.entriesInOrderOnly( - this, - assertionCreatorOrNull glue otherAssertionCreatorsOrNulls - ) -) - -/** - * Finishes the specification of the sophisticated `contains` assertion where all elements of the [expectedIterable] - * shall be searched within the [Iterable] - * (if given) in the specified order. - * - * Delegates to [values]. - * - * Note that we might change the signature of this function with the next version - * which will cause a binary backward compatibility break (see - * [#292](https://github.com/robstoll/atrium/issues/292) for more information) - * - * @param expectedIterable The [Iterable] whose elements are expected to be contained within this [Iterable]. - * - * @return An [Expect] for the current subject of the assertion. - * @throws IllegalArgumentException in case the given [expectedIterable] does not have elements (is empty). - * - * @since 0.9.0 - * TODO remove with 1.0.0 - */ -inline fun > Builder.elementsOf( - expectedIterable: Iterable -): Expect { - val (first, rest) = toVarArg(expectedIterable) - return values(first, *rest) -} - -/** - * Finishes the specification of the sophisticated `contains` assertion where all elements of the [expectedIterableLike] - * shall be searched within the [Iterable] - * (if given) in the specified order. - * - * Delegates to [values]. - * - * Notice that a runtime check applies which assures that only [Iterable], [Sequence] or one of the [Array] types - * are passed. This function expects [IterableLike] (which is a typealias for [Any]) to avoid cluttering the API. - * - * Note that we might change the signature of this function with the next version - * which will cause a binary backward compatibility break (see - * [#292](https://github.com/robstoll/atrium/issues/292) for more information) - * - * @param expectedIterableLike The [IterableLike] whose elements are expected to be contained within this [Iterable]. - * - * @return An [Expect] for the current subject of the assertion. - * @throws IllegalArgumentException in case [expectedIterableLike] is not an [Iterable], [Sequence] or one of the [Array] types - * or the given [expectedIterableLike] does not have elements (is empty). - * - * @since 0.13.0 - */ -inline fun > Builder.elementsOf( - expectedIterableLike: IterableLike -): Expect { - val (first, rest) = toVarArg(expectedIterableLike) - return values(first, *rest) -} diff --git a/apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/iterableContainsInOrderOnlyGroupedCreators.kt b/apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/iterableContainsInOrderOnlyGroupedCreators.kt deleted file mode 100644 index e6158b337..000000000 --- a/apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/iterableContainsInOrderOnlyGroupedCreators.kt +++ /dev/null @@ -1,65 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "DeprecatedCallableAddReplaceWith") - -package ch.tutteli.atrium.api.fluent.en_GB - -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.domain.builders.ExpectImpl -import ch.tutteli.atrium.domain.builders.creating.basic.contains.addAssertion -import ch.tutteli.atrium.domain.builders.utils.Group -import ch.tutteli.atrium.domain.builders.utils.groupsToList -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains.Builder -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InOrderOnlyGroupedWithinSearchBehaviour -import kotlin.jvm.JvmName - -/** - * Finishes the specification of the sophisticated `contains` assertion where the expected [firstGroup] as well as - * the [secondGroup] and optionally [otherExpectedGroups] of values need to be contained in [Iterable] - * as only elements and in the specified order whereas the values within the groups can occur in any order. - * - * @param firstGroup A group of values which have to appear at first within the [Iterable]. - * @param secondGroup A group of values which have to appear after the values of the [firstGroup] within the [Iterable]. - * @param otherExpectedGroups Additional groups of values which are expected to appear after the [secondGroup] within - * [Iterable] whereas the groups have to appear in the given order. - * - * @return An [Expect] for the current subject of the assertion. - */ -fun > Builder.inAnyOrder( - firstGroup: Group, - secondGroup: Group, - vararg otherExpectedGroups: Group -): Expect = addAssertion( - ExpectImpl.iterable.contains.valuesInOrderOnlyGrouped( - this, - groupsToList(firstGroup, secondGroup, otherExpectedGroups) - ) -) - -/** - * Finishes the specification of the sophisticated `contains` assertion where the expected [firstGroup] as well as - * the [secondGroup] and optionally [otherExpectedGroups] of identification lambdas, identifying an entry, - * need to be contained in [Iterable] as only elements and in the specified order whereas - * the identification lambdas within the groups can occur in any order. - * - * An identification lambda can also be defined as `null` in which case it matches an entry which is `null` as well. - * Have a look at [entries] for more information about identification lambdas. - * - * @param firstGroup A group of identification lambdas which have to appear at first within the [Iterable]. - * @param secondGroup A group of identification lambdas which have to appear after the values of the [firstGroup] - * within the [Iterable]. - * @param otherExpectedGroups Additional groups of values which are expected to appear after the [secondGroup] within - * [Iterable] whereas the groups have to appear in the given order. - * - * @return An [Expect] for the current subject of the assertion. - */ -@JvmName("inAnyOrderEntries") -fun > Builder.inAnyOrder( - firstGroup: Group<(Expect.() -> Unit)?>, - secondGroup: Group<(Expect.() -> Unit)?>, - vararg otherExpectedGroups: Group<(Expect.() -> Unit)?> -): Expect = addAssertion( - ExpectImpl.iterable.contains.entriesInOrderOnlyGrouped( - this, - groupsToList(firstGroup, secondGroup, otherExpectedGroups) - ) -) diff --git a/apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/iterableContainsSearchBehaviours.kt b/apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/iterableContainsSearchBehaviours.kt deleted file mode 100644 index 437ba2346..000000000 --- a/apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/iterableContainsSearchBehaviours.kt +++ /dev/null @@ -1,65 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "DeprecatedCallableAddReplaceWith") - -package ch.tutteli.atrium.api.fluent.en_GB - -import ch.tutteli.atrium.domain.builders.ExpectImpl -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains.Builder -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.* -import kotlin.jvm.JvmName - -/** - * Defines that the search behaviour "find entries `in any order` in the [Iterable]" shall be applied to this - * sophisticated `contains` in [Iterable] assertion. - * - * @return The newly created builder. - */ -val > Builder.inAnyOrder: Builder - get() = ExpectImpl.iterable.contains.searchBehaviours.inAnyOrder(this) - -/** - * Defines that the constraint "`only` the specified entries exist in the [Iterable]" shall be applied to this - * sophisticated `contains` [Iterable] assertion. - * - * @return The newly created builder. - */ -val > Builder.only: Builder - @JvmName("butOnly") - get() = ExpectImpl.iterable.contains.searchBehaviours.inAnyOrderOnly(this) - - -/** - * Defines that the search behaviour "find entries `in order` in the [Iterable]" shall be applied to this - * sophisticated `contains` in [Iterable] assertion. - * - * @return The newly created builder. - */ -val > Builder.inOrder: Builder - get() = ExpectImpl.iterable.contains.searchBehaviours.inOrder(this) - -/** - * Defines that the constraint "`only` the specified entries exist in the [Iterable]" shall be applied to this - * sophisticated `contains in order` [Iterable] assertion. - * - * @return The newly created builder. - */ -val > Builder.only: Builder - @JvmName("andOnly") - get() = ExpectImpl.iterable.contains.searchBehaviours.inOrderOnly(this) - -/** - * Defines that the [Iterable] contains `in order only` groups of entries - * whereas the order within the group is specified as next step. - * - * @return The newly created builder. - */ -val > Builder.grouped: Builder - get() = ExpectImpl.iterable.contains.searchBehaviours.inOrderOnlyGrouped(this) - -/** - * A filler word to emphasis that the next step defines the order within expected groups of values. - * - * @return The newly created builder. - */ -val > Builder.within: Builder - get() = ExpectImpl.iterable.contains.searchBehaviours.inOrderOnlyGroupedWithin(this) diff --git a/apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/test/kotlin/ch/tutteli/atrium/api/fluent/en_GB/CharSequenceContainsRegexAssertionsSpec.kt b/apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/test/kotlin/ch/tutteli/atrium/api/fluent/en_GB/CharSequenceContainsRegexAssertionsSpec.kt index f94139889..337abe5e3 100644 --- a/apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/test/kotlin/ch/tutteli/atrium/api/fluent/en_GB/CharSequenceContainsRegexAssertionsSpec.kt +++ b/apis/fluent-en_GB/atrium-api-fluent-en_GB-common/src/test/kotlin/ch/tutteli/atrium/api/fluent/en_GB/CharSequenceContainsRegexAssertionsSpec.kt @@ -1,11 +1,22 @@ package ch.tutteli.atrium.api.fluent.en_GB +import ch.tutteli.atrium.api.verbs.internal.expect import ch.tutteli.atrium.creating.Expect import org.spekframework.spek2.Spek +import org.spekframework.spek2.style.specification.describe class CharSequenceContainsRegexAssertionsSpec : Spek({ include(StringSpec) include(RegexSpec) + + describe("context 'aaaa'") { + it("search for 'aa' finds 3 hits since we want non disjoint matches") { + expect("aaaa").contains.exactly(3).regex("aa") + } + it("search for 'aa?' finds 4 hits since we want non disjoint matches") { + expect("aaaa").contains.exactly(4).regex("aa?") + } + } }) { object StringSpec : ch.tutteli.atrium.specs.integration.CharSequenceContainsRegexAssertionsSpec( getNameContainsRegex(), diff --git a/apis/fluent-en_GB/atrium-api-fluent-en_GB-jvm/build.gradle b/apis/fluent-en_GB/atrium-api-fluent-en_GB-jvm/build.gradle index 9c1838268..958cad747 100644 --- a/apis/fluent-en_GB/atrium-api-fluent-en_GB-jvm/build.gradle +++ b/apis/fluent-en_GB/atrium-api-fluent-en_GB-jvm/build.gradle @@ -17,7 +17,7 @@ dependencies { } -//TODO should not be necessary https://youtrack.jetbrains.com/issue/KT-28124 +//TODO 0.16.0 or 0.17.0 should not be necessary https://youtrack.jetbrains.com/issue/KT-28124 compileTestKotlin.dependsOn( prefixedProject('core-robstoll-jvm').compileKotlin, prefixedProject('core-robstoll-jvm').processResources, diff --git a/apis/fluent-en_GB/atrium-api-fluent-en_GB-jvm/src/module/module-info.java b/apis/fluent-en_GB/atrium-api-fluent-en_GB-jvm/src/module/module-info.java index a3c4c919a..cdb4fa65d 100644 --- a/apis/fluent-en_GB/atrium-api-fluent-en_GB-jvm/src/module/module-info.java +++ b/apis/fluent-en_GB/atrium-api-fluent-en_GB-jvm/src/module/module-info.java @@ -4,6 +4,4 @@ module ch.tutteli.atrium.api.fluent.en_GB { requires ch.tutteli.kbox; exports ch.tutteli.atrium.api.fluent.en_GB; - exports ch.tutteli.atrium.api.fluent.en_GB.creating.charsequence.contains.builders; - exports ch.tutteli.atrium.api.fluent.en_GB.creating.iterable.contains.builders; } diff --git a/apis/fluent-en_GB/extensions/kotlin_1_3/atrium-api-fluent-en_GB-kotlin_1_3-jvm/build.gradle b/apis/fluent-en_GB/extensions/kotlin_1_3/atrium-api-fluent-en_GB-kotlin_1_3-jvm/build.gradle index 399e17518..b621b646c 100644 --- a/apis/fluent-en_GB/extensions/kotlin_1_3/atrium-api-fluent-en_GB-kotlin_1_3-jvm/build.gradle +++ b/apis/fluent-en_GB/extensions/kotlin_1_3/atrium-api-fluent-en_GB-kotlin_1_3-jvm/build.gradle @@ -16,7 +16,7 @@ dependencies { } -//TODO should not be necessary https://youtrack.jetbrains.com/issue/KT-28124 +//TODO 0.16.0 or 0.17.0 should not be necessary https://youtrack.jetbrains.com/issue/KT-28124 compileTestKotlin.dependsOn( prefixedProject('core-robstoll-jvm').compileKotlin, prefixedProject('core-robstoll-jvm').processResources, diff --git a/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/charSequenceAssertions.kt b/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/charSequenceAssertions.kt index 63abac71b..956685a98 100644 --- a/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/charSequenceAssertions.kt +++ b/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/charSequenceAssertions.kt @@ -1,4 +1,4 @@ -//TODO remove both annotations with 1.0.0 +//TODO remove both annotations with 0.16.0 @file:JvmMultifileClass @file:JvmName("CharSequenceAssertionsKt") @@ -9,7 +9,6 @@ import ch.tutteli.atrium.api.infix.en_GB.creating.RegexPatterns import ch.tutteli.atrium.api.infix.en_GB.creating.Values import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.domain.builders.ExpectImpl import ch.tutteli.atrium.logic.creating.typeutils.CharSequenceOrNumberOrChar import ch.tutteli.atrium.logic.* import ch.tutteli.atrium.logic.creating.charsequence.contains.CharSequenceContains diff --git a/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/charSequenceAssertionsDeprecated.kt b/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/charSequenceAssertionsDeprecated.kt deleted file mode 100644 index 06efe5bb2..000000000 --- a/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/charSequenceAssertionsDeprecated.kt +++ /dev/null @@ -1,44 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "DeprecatedCallableAddReplaceWith") -@file:JvmMultifileClass -@file:JvmName("CharSequenceAssertionsKt") - -package ch.tutteli.atrium.api.infix.en_GB - -import ch.tutteli.atrium.api.infix.en_GB.creating.charsequence.contains.builders.NotCheckerOption -import ch.tutteli.atrium.api.infix.en_GB.creating.charsequence.contains.builders.impl.NotCheckerOptionImpl -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.domain.builders.ExpectImpl -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains -import ch.tutteli.atrium.domain.creating.charsequence.contains.searchbehaviours.NoOpSearchBehaviour -import ch.tutteli.atrium.domain.creating.charsequence.contains.searchbehaviours.NotSearchBehaviour -import kotlin.jvm.JvmMultifileClass -import kotlin.jvm.JvmName - -/** - * Creates a [CharSequenceContains.Builder] based on this [Expect] which allows to define - * a sophisticated `contains` assertion. - * - * @param o The filler object [o]. - * - * @return The newly created builder. - */ -@Deprecated("Only here to retain binary backward compatibility; will be removed with 1.0.0") -fun contains( - expect: Expect, - @Suppress("UNUSED_PARAMETER") o: o -): CharSequenceContains.Builder = ExpectImpl.charSequence.containsBuilder(expect) - -/** - * Creates a [CharSequenceContains.Builder] based on this [Expect] which allows to define - * more sophisticated `contains not` assertion. - * - * @param o The filler object [o]. - * - * @return The newly created builder. - */ -@Deprecated("Only here to retain binary backward compatibility; will be removed with 1.0.0") -fun containsNot( - expect: Expect, - @Suppress("UNUSED_PARAMETER") o: o -): NotCheckerOption = NotCheckerOptionImpl(ExpectImpl.charSequence.containsNotBuilder(expect)) diff --git a/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/charSequenceContainsCheckersDeprecated.kt b/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/charSequenceContainsCheckersDeprecated.kt deleted file mode 100644 index add87e379..000000000 --- a/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/charSequenceContainsCheckersDeprecated.kt +++ /dev/null @@ -1,97 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "DeprecatedCallableAddReplaceWith") -@file:JvmMultifileClass -@file:JvmName("CharSequenceContainsCheckersKt") - -package ch.tutteli.atrium.api.infix.en_GB - -import ch.tutteli.atrium.api.infix.en_GB.creating.charsequence.contains.builders.* -import ch.tutteli.atrium.api.infix.en_GB.creating.charsequence.contains.builders.impl.* -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains.SearchBehaviour -import kotlin.jvm.JvmMultifileClass -import kotlin.jvm.JvmName - -/** - * Restricts a `contains` assertion by specifying that the number of occurrences of the value which we are looking - * for occurs `at least` number of [times] within the search input. - * - * @param times The number which the check will compare against the actual number of times an expected value is - * found in the input of the search. - * - * @return The newly created builder. - * @throws IllegalArgumentException In case [times] is smaller than zero. - * @throws IllegalArgumentException In case [times] equals to zero; use [containsNot] instead. - */ -infix fun CharSequenceContains.Builder.atLeast( - times: Int -): AtLeastCheckerOption = AtLeastCheckerOptionImpl(times, this) - -/** - * Restricts a `contains at least` assertion by specifying that the number of occurrences of the value which we - * are looking for occurs `at most` number of [times] within the search input. - * - * The resulting restriction will be a `contains at least but at most` assertion. - * - * @param times The number which the check will compare against the actual number of times an expected value is - * found in the input of the search. - * - * @return The newly created builder. - * @throws IllegalArgumentException In case [times] is smaller than zero. - * @throws IllegalArgumentException In case [times] equals to zero; use [containsNot] instead. - * @throws IllegalArgumentException In case [times] of this `at most` restriction equals to the number of the - * `at least` restriction; use the [exactly] restriction instead. - */ -infix fun AtLeastCheckerOption.butAtMost( - times: Int -): ButAtMostCheckerOption = ButAtMostCheckerOptionImpl(times, this, containsBuilder) - -/** - * Restricts a `contains` assertion by specifying that the number of occurrences of the value which we - * are looking for occurs `exactly` number of [times] within the search input. - * - * @param times The number which the check will compare against the actual number of times an expected value is - * found in the input of the search. - * - * @return The newly created builder. - * @throws IllegalArgumentException In case [times] is smaller than zero. - * @throws IllegalArgumentException In case [times] equals to zero; use [containsNot] instead. - */ -infix fun CharSequenceContains.Builder.exactly( - times: Int -): ExactlyCheckerOption = ExactlyCheckerOptionImpl(times, this) - -/** - * Restricts a `contains` assertion by specifying that the number of occurrences of the value which we - * are looking for occurs `at least` once but `at most` number of [times] within the search input. - * - * If you want to use a higher lower bound than one, then use `atLeast(2).butAtMost(3)` instead of `atMost(3)`. - * And in case you want to state that it is either not contained at all or at most a certain number of times, - * then use `notOrAtMost(2)` instead. - * - * @param times The number which the check will compare against the actual number of times an expected value is - * found in the input of the search. - * - * @return The newly created builder. - * @throws IllegalArgumentException In case [times] is smaller than zero. - * @throws IllegalArgumentException In case [times] equals to zero; use [containsNot] instead. - * @throws IllegalArgumentException In case [times] equals to one; use [exactly] instead. - */ -infix fun CharSequenceContains.Builder.atMost( - times: Int -): AtMostCheckerOption = AtMostCheckerOptionImpl(times, this) - -/** - * Restricts a `contains` assertion by specifying that the number of occurrences of the value which we - * are looking for occurs `not at all or at most` number of [times] within the search input. - * - * @param times The number which the check will compare against the actual number of times an expected value is - * found in the input of the search. - * - * @return The newly created builder. - * @throws IllegalArgumentException In case [times] is smaller than zero. - * @throws IllegalArgumentException In case [times] equals to zero; use [containsNot] instead. - */ -infix fun CharSequenceContains.Builder.notOrAtMost( - times: Int -): NotOrAtMostCheckerOption = NotOrAtMostCheckerOptionImpl(times, this) diff --git a/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/charSequenceContainsCreatorsDeprecated.kt b/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/charSequenceContainsCreatorsDeprecated.kt deleted file mode 100644 index e1403737c..000000000 --- a/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/charSequenceContainsCreatorsDeprecated.kt +++ /dev/null @@ -1,506 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "DeprecatedCallableAddReplaceWith") -@file:JvmMultifileClass -@file:JvmName("CharSequenceContainsCreatorsKt") - -package ch.tutteli.atrium.api.infix.en_GB - -import ch.tutteli.atrium.api.infix.en_GB.creating.All -import ch.tutteli.atrium.api.infix.en_GB.creating.RegexPatterns -import ch.tutteli.atrium.api.infix.en_GB.creating.Values -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.domain.builders.ExpectImpl -import ch.tutteli.atrium.domain.builders.creating.basic.contains.addAssertion -import ch.tutteli.atrium.domain.builders.utils.toVarArg -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains.Builder -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains.CheckerOption -import ch.tutteli.atrium.domain.creating.charsequence.contains.searchbehaviours.IgnoringCaseSearchBehaviour -import ch.tutteli.atrium.domain.creating.charsequence.contains.searchbehaviours.NoOpSearchBehaviour -import ch.tutteli.atrium.logic.creating.typeutils.CharSequenceOrNumberOrChar -import ch.tutteli.atrium.logic.creating.typeutils.IterableLike -import kotlin.jvm.JvmMultifileClass -import kotlin.jvm.JvmName - -/** - * Finishes the specification of the sophisticated `contains` assertion where the [expected] object shall be searched, - * using a non disjoint search. - * - * Delegates to `the values(expected)`. - * - * Notice that a runtime check applies which assures that only [CharSequence], [Number] and [Char] are passed. - * This function expects [CharSequenceOrNumberOrChar] (which is a typealias for [Any]) for your convenience, - * so that you can mix [String] and [Int] for instance. - * - * By non disjoint is meant that "aa" in "aaaa" is found three times and not only two times. - * - * @param expected The value which is expected to be contained within the input of the search. - * - * @return An [Expect] for the current subject of the assertion. - * @throws IllegalArgumentException in case [expected] is not a [CharSequence], [Number] or [Char]. - */ -infix fun CheckerOption.value( - expected: CharSequenceOrNumberOrChar -): Expect = this the values(expected) - -/** - * Finishes the specification of the sophisticated `contains` assertion where the given [values] - * shall be searched, using a non disjoint search. - * - * Notice that a runtime check applies which assures that only [CharSequence], [Number] and [Char] are passed. - * This function expects [CharSequenceOrNumberOrChar] (which is a typealias for [Any]) for your convenience, - * so that you can mix [String] and [Int] for instance. - * - * By non disjoint is meant that `"aa"` in `"aaaa"` is found three times and not only two times. - * Also notice, that it does not search for unique matches. Meaning, if the input of the search is `"a"` and - * [Values] is defined as `values("a", "a")`, then both match, - * even though they match the same sequence in the input of the search. - * Use an option such as [atLeast], [atMost] and [exactly] to control the number of occurrences you expect. - * - * Meaning you might want to use: - * `contains o exactly 2 the value "a"` - * instead of: - * `contains o atLeast 1 the values("a", "a")` - * - * @param values The values which should not be found within the input of the search - * -- use the function `values(t, ...)` to create a [Values]. - * - * @return An [Expect] for the current subject of the assertion. - * @throws IllegalArgumentException in case one of the [values] is not a [CharSequence], [Number] or [Char]. - */ -infix fun CheckerOption.the( - values: Values -): Expect = addAssertion(ExpectImpl.charSequence.contains.values(this, values.toList())) - - -/** - * Finishes the specification of the sophisticated `contains` assertion where the [expected] value shall be searched - * (ignoring case), using a non disjoint search. - * - * Delegates to `the values(expected)`. - * - * Notice that a runtime check applies which assures that only [CharSequence], [Number] and [Char] are passed. - * This function expects [CharSequenceOrNumberOrChar] (which is a typealias for [Any]) for your convenience, - * so that you can mix [String] and [Int] for instance. - * - * By non disjoint is meant that "aa" in "aaaa" is found three times and not only two times. - * - * @param expected The value which is expected to be contained within the input of the search. - * - * @return An [Expect] for the current subject of the assertion. - * @throws IllegalArgumentException in case [expected] is not a [CharSequence], [Number] or [Char]. - */ -@JvmName("valueIgnoringCase") -infix fun CheckerOption.value( - expected: CharSequenceOrNumberOrChar -): Expect = this the values(expected) - -/** - * Finishes the specification of the sophisticated `contains` assertion where the [values] - * shall be searched (ignoring case), using a non disjoint search. - * - * Notice that a runtime check applies which assures that only [CharSequence], [Number] and [Char] are passed. - * This function expects [CharSequenceOrNumberOrChar] (which is a typealias for [Any]) for your convenience, - * so that you can mix [String] and [Int] for instance. - * - * By non disjoint is meant that `"aa"` in `"aaaa"` is found three times and not only two times. - * Also notice, that it does not search for unique matches. Meaning, if the input of the search is `"a"` and - * [Values] is defined as `values("a", "a")`, then both match, - * even though they match the same sequence in the input of the search. - * Use an option such as [atLeast], [atMost] and [exactly] to control the number of occurrences you expect. - * - * Meaning you might want to use: - * `contains o ignoring case exactly 2 the value "a"` - * instead of: - * `contains o ignoring case atLeast 1 the values("a", "a")` - * - * @param values The values which are expected to be contained within the input of the search - * -- use the function `values(t, ...)` to create a [Values]. - * - * @return An [Expect] for the current subject of the assertion. - * @throws IllegalArgumentException in case one of the [values] is not a [CharSequence], [Number] or [Char]. - */ -@JvmName("valuesIgnoringCase") -infix fun CheckerOption.the( - values: Values -): Expect = addAssertion(ExpectImpl.charSequence.contains.valuesIgnoringCase(this, values.toList())) - -/** - * Finishes the specification of the sophisticated `contains` assertion where the [expected] value shall be searched - * (ignoring case), using a non disjoint search where it needs to be contained at least once. - * - * Delegates to `atLeast 1 value expected`. - * - * Notice that a runtime check applies which assures that only [CharSequence], [Number] and [Char] are passed. - * This function expects [CharSequenceOrNumberOrChar] (which is a typealias for [Any]) for your convenience, - * so that you can mix [String] and [Int] for instance. - * - * By non disjoint is meant that "aa" in "aaaa" is found three times and not only two times. - * - * @param expected The value which is expected to be contained within the input of the search. - * - * @return An [Expect] for the current subject of the assertion. - * @throws IllegalArgumentException in case [expected] is not a [CharSequence], [Number] or [Char]. - */ -infix fun Builder.value( - expected: CharSequenceOrNumberOrChar -): Expect = this atLeast 1 value expected - -/** - * Finishes the specification of the sophisticated `contains` assertion where the [values] - * shall be searched (ignoring case), using a non disjoint search - * where each need to be contained at least once. - * - * Delegates to `atLeast 1 the value`. - * - * Notice that a runtime check applies which assures that only [CharSequence], [Number] and [Char] are passed. - * This function expects [CharSequenceOrNumberOrChar] (which is a typealias for [Any]) for your convenience, - * so that you can mix [String] and [Int] for instance. - * - * By non disjoint is meant that `"aa"` in `"aaaa"` is found three times and not only two times. - * Also notice, that it does not search for unique matches. Meaning, if the input of the search is `"a"` and - * [Values] is defined as `values("a", "a")`, then both match, - * even though they match the same sequence in the input of the search. - * Use an option such as [atLeast], [atMost] and [exactly] to control the number of occurrences you expect. - * - * Meaning you might want to use: - * `contains o ignoring case exactly 2 the value "a"` - * instead of: - * `contains o ignoring case atLeast 1 the values("a", "a")` - * - * @param values The values which are expected to be contained within the input of the search - * -- use the function `values(t, ...)` to create a [Values]. - * - * @return An [Expect] for the current subject of the assertion. - * @throws IllegalArgumentException in case one of the [values] is not a [CharSequence], [Number] or [Char]. - */ -infix fun Builder.the( - values: Values -): Expect = this atLeast 1 the values - -/** - * Finishes the specification of the sophisticated `contains` assertion where the given regular expression [pattern] - * is expected to have a match, using a non disjoint search. - * - * Delegates to `the regexPatterns(pattern)`. - * - * @param pattern The pattern which is expected to have a match against the input of the search. - * - * @return An [Expect] for the current subject of the assertion. - */ -infix fun CheckerOption.regex(pattern: String): Expect = - this the regexPatterns(pattern) - -/** - * Finishes the specification of the sophisticated `contains` assertion where the given [Regex] [pattern] - * is expected to have a match. - * - * Delegates to `matchFor all(pattern)` - * - * @param pattern The pattern which is expected to have a match against the input of the search. - * - * @return An [Expect] for the current subject of the assertion. - * - * @since 0.12.0 - */ -infix fun CheckerOption.matchFor( - pattern: Regex -): Expect = this matchFor all(pattern) - -/** - * Finishes the specification of the sophisticated `contains` assertion where the given regular expression [patterns] - * are expected to have a match, using a non disjoint search. - * - * By non disjoint is meant that `"aa"` in `"aaaa"` is found three times and not only two times. - * Also notice, that it does not search for unique matches. Meaning, if the input of the search is `"ab"` and - * [RegexPatterns] is defined as `regexPatterns("a(b)?", "a(b)?")` as well, then both match, - * even though they match the same sequence in the input of the search. - * Use an option such as [atLeast], [atMost] and [exactly] to control the number of occurrences you expect. - * - * Meaning you might want to use: - * `contains o exactly 2 regex "a(b)?"` - * instead of: - * `contains o atLeast 1 the regexPatterns("a(b)?", "a(b)?")` - * - * @param patterns The patterns which are expected to have a match against the input of the search - * -- use the function `regexPatterns(t, ...)` to create a [RegexPatterns]. - * - * @return An [Expect] for the current subject of the assertion. - */ -infix fun CheckerOption.the(patterns: RegexPatterns): Expect = - addAssertion(ExpectImpl.charSequence.contains.regex(this, patterns.toList())) - -/** - * Finishes the specification of the sophisticated `contains` assertion where the given [Regex] [patterns] - * are expected to have a match, using a non disjoint search. - * - * By non disjoint is meant that `"aa"` in `"aaaa"` is found three times and not only two times. - * Also notice, that it does not search for unique matches. Meaning, if the input of the search is `"ab"` and - * [All] is defined as `all(Regex("a(b)?"), Regex("a(b)?"))` as well, then both match, - * even though they match the same sequence in the input of the search. - * Use an option such as [atLeast], [atMost] and [exactly] to control the number of occurrences you expect. - * - * Meaning you might want to use: - * `contains o exactly 2 regex "a(b)?"` - * instead of: - * `contains o atLeast 1 the all(Regex("a(b)?"), Regex("a(b)?"))` - * - * @param patterns The patterns which are expected to have a match against the input of the search -- - * use the function `all(Regex(...), ...)` to create a [All]. - * - * @return An [Expect] for the current subject of the assertion. - * - * @since 0.12.0 - */ -infix fun CheckerOption.matchFor(patterns: All): Expect = - addAssertion(ExpectImpl.charSequence.contains.regex(this, patterns.toList())) - - -/** - * Finishes the specification of the sophisticated `contains` assertion where the given regular expression [pattern] - * is expected to have a match (ignoring case), using a non disjoint search. - * - * Delegates to `the regexPatterns(pattern)`. - * - * @param pattern The patterns which is expected to have a match against the input of the search. - * - * @return An [Expect] for the current subject of the assertion. - */ -@JvmName("regexIgnoringCase") -infix fun CheckerOption.regex(pattern: String): Expect = - this the regexPatterns(pattern) - -/** - * Finishes the specification of the sophisticated `contains` assertion where the given regular expression [patterns] - * are expected to have a match (ignoring case), using a non disjoint search. - * - * By non disjoint is meant that `"aa"` in `"aaaa"` is found three times and not only two times. - * Also notice, that it does not search for unique matches. Meaning, if the input of the search is `"ab"` and - * [RegexPatterns] is defined as `regexPatterns("a(b)?", "a(b)?")` as well, then both match, - * even though they match the same sequence in the input of the search. - * Use an option such as [atLeast], [atMost] and [exactly] to control the number of occurrences you expect. - * - * Meaning you might want to use: - * `contains o ignoring case exactly 2 the regex "a(b)?"` - * instead of: - * `contains o ignoring case atLeast 1 the regexPatterns("a(b)?", "a(b)?")` - * - * @param patterns The patterns which are expected to have a match against the input of the search - * -- use the function `regexPatterns(t, ...)` to create a [RegexPatterns]. - * - * @return An [Expect] for the current subject of the assertion. - */ -@JvmName("regexIgnoringCase") -infix fun CheckerOption.the(patterns: RegexPatterns): Expect = - addAssertion(ExpectImpl.charSequence.contains.regexIgnoringCase(this, patterns.toList())) - -/** - * Finishes the specification of the sophisticated `contains` assertion where the given regular expression [pattern] - * is expected to have at least one match (ignoring case), using a non disjoint search. - * - * Delegates to `atLeast 1 regex pattern`. - * - * @param pattern The patterns which is expected to have a match against the input of the search. - * - * @return An [Expect] for the current subject of the assertion. - */ -infix fun Builder.regex(pattern: String): Expect = - this atLeast 1 regex pattern - -/** - * Finishes the specification of the sophisticated `contains` assertion where the given regular expression [patterns] - * are expected to have at least one match (ignoring case), using a non disjoint search. - * - * Delegates to `atLeast 1 the patterns`. - * - * By non disjoint is meant that `"aa"` in `"aaaa"` is found three times and not only two times. - * Also notice, that it does not search for unique matches. Meaning, if the input of the search is `"ab"` and - * [RegexPatterns] is defined as `regexPatterns("a(b)?", "a(b)?")` as well, then both match, - * even though they match the same sequence in the input of the search. - * Use an option such as [atLeast], [atMost] and [exactly] to control the number of occurrences you expect. - * - * Meaning you might want to use: - * `contains o ignoring case exactly 2 the regex "a(b)?"` - * instead of: - * `contains o ignoring case atLeast 1 the RegexPatterns("a(b)?", "a(b)?")` - * - * @param patterns The patterns which are expected to have a match against the input of the search -- - * use the function `regexPatterns(t, ...)` to create a [RegexPatterns]. - * - * @return An [Expect] for the current subject of the assertion. - */ -infix fun Builder.the(patterns: RegexPatterns): Expect = - this atLeast 1 the patterns - -/** - * Finishes the specification of the sophisticated `contains` assertion where all elements of the [expectedIterable] - * shall be searched, using a non disjoint search. - * - * Delegates to `the values(expectedIterable.first(), *expectedIterable.drop(1).toTypedArray())` - * (see [the] for more information). - * - * Notice that a runtime check applies which assures that only [CharSequence], [Number] and [Char] are passed. - * This function expects [CharSequenceOrNumberOrChar] (which is a typealias for [Any]) for your convenience, - * so that you can mix [String] and [Int] for instance. - * - * By non disjoint is meant that "aa" in "aaaa" is found three times and not only two times. - * - * @param expectedIterable The [Iterable] whose elements are expected to be contained within the input of the search. - * - * @return An [Expect] for the current subject of the assertion. - * @throws IllegalArgumentException in case [expectedIterable] is not a [CharSequence], [Number] or [Char] or the given - * [expectedIterable] does not have elements (is empty). - * - * TODO remove with 1.0.0 - * @since 0.12.0 - */ -infix fun CheckerOption.elementsOf( - expectedIterable: Iterable -): Expect { - val (first, rest) = toVarArg(expectedIterable) - return this the Values(first, rest) -} - - -/** - * Finishes the specification of the sophisticated `contains` assertion where all elements of the [expectedIterable] - * shall be searched (ignoring case), using a non disjoint search. - * - * Delegates to `the values(expectedIterable.first(), *expectedIterable.drop(1).toTypedArray())` - * (see [the] for more information). - * - * Notice that a runtime check applies which assures that only [CharSequence], [Number] and [Char] are passed. - * This function expects [CharSequenceOrNumberOrChar] (which is a typealias for [Any]) for your convenience, - * so that you can mix [String] and [Int] for instance. - * - * By non disjoint is meant that "aa" in "aaaa" is found three times and not only two times. - * - * @param expectedIterable The [Iterable] whose elements are expected to be contained within the input of the search. - * - * @return An [Expect] for the current subject of the assertion. - * @throws IllegalArgumentException in case [expectedIterable] is not a [CharSequence], [Number] or [Char] or the given - * [expectedIterable] does not have elements (is empty). - * - * TODO remove with 1.0.0 - * @since 0.12.0 - */ -@JvmName("elementsOfIgnoringCase") -infix fun CheckerOption.elementsOf( - expectedIterable: Iterable -): Expect { - val (first, rest) = toVarArg(expectedIterable) - return this the Values(first, rest) -} - -/** - * Finishes the specification of the sophisticated `contains` assertion where all elements of the [expectedIterable] - * shall be searched (ignoring case), using a non disjoint search. - * - * Delegates to `the values(expectedIterable.first(), *expectedIterable.drop(1).toTypedArray())` - * (see [the] for more information). - * - * Notice that a runtime check applies which assures that only [CharSequence], [Number] and [Char] are passed. - * This function expects [CharSequenceOrNumberOrChar] (which is a typealias for [Any]) for your convenience, - * so that you can mix [String] and [Int] for instance. - * - * By non disjoint is meant that "aa" in "aaaa" is found three times and not only two times. - * - * @param expectedIterable The [Iterable] whose elements are expected to be contained within the input of the search. - * - * @return An [Expect] for the current subject of the assertion. - * @throws IllegalArgumentException in case [expectedIterable] is not a [CharSequence], [Number] or [Char] or the given - * [expectedIterable] does not have elements (is empty). - * - * TODO remove with 1.0.0 - * @since 0.12.0 - */ -@JvmName("elementsOfIgnoringCase") -infix fun Builder.elementsOf( - expectedIterable: Iterable -): Expect { - val (first, rest) = toVarArg(expectedIterable) - return this the Values(first, rest) -} - -/** - * Finishes the specification of the sophisticated `contains` assertion where all elements of the [expectedIterableLike] - * shall be searched, using a non disjoint search. - * - * Delegates to `the values(expectedIterable.first(), *expectedIterable.drop(1).toTypedArray())` - * (see [the] for more information). - * - * Notice that a runtime check applies which assures that only [Iterable], [Sequence] or one of the [Array] types - * are passed. This function expects [IterableLike] (which is a typealias for [Any]) to avoid cluttering the API. - * - * By non disjoint is meant that "aa" in "aaaa" is found three times and not only two times. - * - * @param expectedIterableLike The [IterableLike] whose elements are expected to be contained within the input of the search. - * - * @return An [Expect] for the current subject of the assertion. - * @throws IllegalArgumentException in case [expectedIterableLike] is not an [Iterable], [Sequence] or one of the [Array] types or the given - * [expectedIterableLike] does not have elements (is empty). - * - * @since 0.13.0 - */ -infix fun CheckerOption.elementsOf( - expectedIterableLike: IterableLike -): Expect { - val (first, rest) = toVarArg(expectedIterableLike) - return this the Values(first, rest) -} - - -/** - * Finishes the specification of the sophisticated `contains` assertion where all elements of the [expectedIterableLike] - * shall be searched (ignoring case), using a non disjoint search. - * - * Delegates to `the values(expectedIterable.first(), *expectedIterable.drop(1).toTypedArray())` - * (see [the] for more information). - * - * Notice that a runtime check applies which assures that only [Iterable], [Sequence] or one of the [Array] types - * are passed. This function expects [IterableLike] (which is a typealias for [Any]) to avoid cluttering the API. - * - * By non disjoint is meant that "aa" in "aaaa" is found three times and not only two times. - * - * @param expectedIterableLike The [IterableLike] whose elements are expected to be contained within the input of the search. - * - * @return An [Expect] for the current subject of the assertion. - * @throws IllegalArgumentException in case [expectedIterableLike] is not an [Iterable], [Sequence] or one of the [Array] types or the given - * [expectedIterableLike] does not have elements (is empty). - * - * @since 0.13.0 - */ -@JvmName("elementsOfIgnoringCase") -infix fun CheckerOption.elementsOf( - expectedIterableLike: IterableLike -): Expect { - val (first, rest) = toVarArg(expectedIterableLike) - return this the Values(first, rest) -} - -/** - * Finishes the specification of the sophisticated `contains` assertion where all elements of the [expectedIterableLike] - * shall be searched (ignoring case), using a non disjoint search. - * - * Delegates to `the values(expectedIterable.first(), *expectedIterable.drop(1).toTypedArray())` - * (see [the] for more information). - * - * Notice that a runtime check applies which assures that only [Iterable], [Sequence] or one of the [Array] types - * are passed. This function expects [IterableLike] (which is a typealias for [Any]) to avoid cluttering the API. - * - * By non disjoint is meant that "aa" in "aaaa" is found three times and not only two times. - * - * @param expectedIterableLike The [IterableLike] whose elements are expected to be contained within the input of the search. - * - * @return An [Expect] for the current subject of the assertion. - * @throws IllegalArgumentException in case [expectedIterableLike] is not an [Iterable], [Sequence] or one of the [Array] types or the given - * [expectedIterableLike] does not have elements (is empty). - * - * @since 0.13.0 - */ -@JvmName("elementsOfIgnoringCase") -infix fun Builder.elementsOf( - expectedIterableLike: IterableLike -): Expect { - val (first, rest) = toVarArg(expectedIterableLike) - return this the Values(first, rest) -} diff --git a/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/charSequenceContainsSearchBehavioursDeprecated.kt b/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/charSequenceContainsSearchBehavioursDeprecated.kt deleted file mode 100644 index 2ae960be0..000000000 --- a/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/charSequenceContainsSearchBehavioursDeprecated.kt +++ /dev/null @@ -1,40 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "DeprecatedCallableAddReplaceWith") -@file:JvmMultifileClass -@file:JvmName("CharSequenceContainsSearchBehavioursKt") - -package ch.tutteli.atrium.api.infix.en_GB - -import ch.tutteli.atrium.api.infix.en_GB.creating.charsequence.contains.builders.NotCheckerOption -import ch.tutteli.atrium.api.infix.en_GB.creating.charsequence.contains.builders.impl.NotCheckerOptionImpl -import ch.tutteli.atrium.domain.builders.ExpectImpl -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains -import ch.tutteli.atrium.domain.creating.charsequence.contains.searchbehaviours.IgnoringCaseSearchBehaviour -import ch.tutteli.atrium.domain.creating.charsequence.contains.searchbehaviours.NoOpSearchBehaviour -import ch.tutteli.atrium.domain.creating.charsequence.contains.searchbehaviours.NotSearchBehaviour -import kotlin.jvm.JvmMultifileClass -import kotlin.jvm.JvmName - -/** - * Defines that the search behaviour `ignore case` shall be applied to this sophisticated `contains` assertion. - * - * @param case Has to be `case`. - * - * @return The newly created builder. - */ -infix fun CharSequenceContains.Builder.ignoring( - @Suppress("UNUSED_PARAMETER") case: case -): CharSequenceContains.Builder = - ExpectImpl.charSequence.contains.searchBehaviours.ignoringCase(this) - -/** - * Defines that the search behaviour `ignore case` shall be applied to this sophisticated `contains not` assertion. - * - * @param case Has to be `case`. - * - * @return The newly created builder. - */ -infix fun NotCheckerOption.ignoring( - @Suppress("UNUSED_PARAMETER") case: case -): NotCheckerOption = - NotCheckerOptionImpl(containsBuilder ignoring case) diff --git a/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/creating/charsequence/contains.builders/AtLeastCheckerOption.kt b/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/creating/charsequence/contains.builders/AtLeastCheckerOption.kt deleted file mode 100644 index ff803e238..000000000 --- a/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/creating/charsequence/contains.builders/AtLeastCheckerOption.kt +++ /dev/null @@ -1,21 +0,0 @@ -//TODO remove with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.api.infix.en_GB.creating.charsequence.contains.builders - -import ch.tutteli.atrium.domain.builders.creating.charsequence.contains.builders.WithTimesCheckerOption -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains - -/** - * Represents the extension point for another option after a `contains at least`-check within a sophisticated - * `contains` assertion building process for [CharSequence]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - */ -@Deprecated( - "Use AtLeastCheckerStep from atrium-logic; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.logic.creating.charsequence.contains.steps.AtLeastCheckerStep") -) -interface AtLeastCheckerOption - : WithTimesCheckerOption diff --git a/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/creating/charsequence/contains.builders/AtMostCheckerOption.kt b/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/creating/charsequence/contains.builders/AtMostCheckerOption.kt deleted file mode 100644 index ee7d80411..000000000 --- a/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/creating/charsequence/contains.builders/AtMostCheckerOption.kt +++ /dev/null @@ -1,20 +0,0 @@ -//TODO remove with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.api.infix.en_GB.creating.charsequence.contains.builders - -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains - -/** - * Represents the extension point for another option after a `contains at least once but at most`-check within - * a sophisticated `contains` assertion building process for [CharSequence]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - */ -@Deprecated( - "Use AtMostCheckerStep from atrium-logic; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.logic.creating.charsequence.contains.steps.AtMostCheckerStep") -) -interface AtMostCheckerOption - : CharSequenceContains.CheckerOption diff --git a/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/creating/charsequence/contains.builders/ButAtMostCheckerOption.kt b/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/creating/charsequence/contains.builders/ButAtMostCheckerOption.kt deleted file mode 100644 index 402c4084b..000000000 --- a/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/creating/charsequence/contains.builders/ButAtMostCheckerOption.kt +++ /dev/null @@ -1,20 +0,0 @@ -//TODO remove with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.api.infix.en_GB.creating.charsequence.contains.builders - -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains - -/** - * Represents the extension point for another option after a `contains at least but at most`-check within - * a sophisticated `contains` assertion building process for [CharSequence]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - */ -@Deprecated( - "Use ButAtMostCheckerStep from atrium-logic; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.logic.creating.charsequence.contains.steps.ButAtMostCheckerStep") -) -interface ButAtMostCheckerOption - : CharSequenceContains.CheckerOption diff --git a/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/creating/charsequence/contains.builders/ExactlyCheckerOption.kt b/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/creating/charsequence/contains.builders/ExactlyCheckerOption.kt deleted file mode 100644 index d8254ed3b..000000000 --- a/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/creating/charsequence/contains.builders/ExactlyCheckerOption.kt +++ /dev/null @@ -1,20 +0,0 @@ -//TODO remove with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.api.infix.en_GB.creating.charsequence.contains.builders - -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains - -/** - * Represents the extension point for another option after a `contains exactly`-check within - * a sophisticated `contains` assertion building process for [CharSequence]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - */ -@Deprecated( - "Use ExactlyCheckerStep from atrium-logic; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.logic.creating.charsequence.contains.steps.ExactlyCheckerStep") -) -interface ExactlyCheckerOption - : CharSequenceContains.CheckerOption diff --git a/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/creating/charsequence/contains.builders/NotCheckerOption.kt b/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/creating/charsequence/contains.builders/NotCheckerOption.kt deleted file mode 100644 index 991cd9312..000000000 --- a/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/creating/charsequence/contains.builders/NotCheckerOption.kt +++ /dev/null @@ -1,20 +0,0 @@ -//TODO remove with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.api.infix.en_GB.creating.charsequence.contains.builders - -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains - -/** - * Represents the extension point for another option after a `contains not at all`-check within - * a sophisticated `contains` assertion building process for [CharSequence]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - */ -@Deprecated( - "Use NotCheckerStep from atrium-logic; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.logic.creating.charsequence.contains.steps.NotCheckerStep") -) -interface NotCheckerOption - : CharSequenceContains.CheckerOption diff --git a/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/creating/charsequence/contains.builders/NotOrAtMostCheckerOption.kt b/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/creating/charsequence/contains.builders/NotOrAtMostCheckerOption.kt deleted file mode 100644 index e7e41af56..000000000 --- a/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/creating/charsequence/contains.builders/NotOrAtMostCheckerOption.kt +++ /dev/null @@ -1,20 +0,0 @@ -//TODO remove with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.api.infix.en_GB.creating.charsequence.contains.builders - -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains - -/** - * Represents the extension point for another option after a `contains not or at most`-check within - * a sophisticated `contains` assertion building process for [CharSequence]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - */ -@Deprecated( - "Use NotOrAtMostCheckerStep from atrium-logic; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.logic.creating.charsequence.contains.steps.NotOrAtMostCheckerStep") -) -interface NotOrAtMostCheckerOption - : CharSequenceContains.CheckerOption diff --git a/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/creating/charsequence/contains.builders/impl/AtLeastCheckerOptionImpl.kt b/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/creating/charsequence/contains.builders/impl/AtLeastCheckerOptionImpl.kt deleted file mode 100644 index 75ec07d11..000000000 --- a/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/creating/charsequence/contains.builders/impl/AtLeastCheckerOptionImpl.kt +++ /dev/null @@ -1,32 +0,0 @@ -//TODO remove with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.api.infix.en_GB.creating.charsequence.contains.builders.impl - -import ch.tutteli.atrium.api.infix.en_GB.creating.charsequence.contains.builders.AtLeastCheckerOption -import ch.tutteli.atrium.api.infix.en_GB.creating.charsequence.contains.builders.impl.StaticName.nameContainsNotValuesFun -import ch.tutteli.atrium.domain.builders.creating.charsequence.contains.builders.AtLeastCheckerOptionBase -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains - -/** - * Represents the builder of a `contains at least`-check within the fluent API of a sophisticated - * `contains` assertion for [CharSequence]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - * - * @constructor Represents the builder of a `contains at least` check within the fluent API of a sophisticated - * `contains` assertion for [CharSequence]. - * @param times The number which the check will compare against the actual number of times an expected object is - * found in the input of the search. - * @param containsBuilder The previously used [CharSequenceContains.Builder]. - */ -internal class AtLeastCheckerOptionImpl( - times: Int, - containsBuilder: CharSequenceContains.Builder -) : AtLeastCheckerOptionBase( - times, - containsBuilder, - nameContainsNotValuesFun, - { "`atLeast $it`" } -), AtLeastCheckerOption diff --git a/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/creating/charsequence/contains.builders/impl/AtMostCheckerOptionImpl.kt b/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/creating/charsequence/contains.builders/impl/AtMostCheckerOptionImpl.kt deleted file mode 100644 index f178d23b1..000000000 --- a/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/creating/charsequence/contains.builders/impl/AtMostCheckerOptionImpl.kt +++ /dev/null @@ -1,34 +0,0 @@ -//TODO remove with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.api.infix.en_GB.creating.charsequence.contains.builders.impl - -import ch.tutteli.atrium.api.infix.en_GB.creating.charsequence.contains.builders.AtMostCheckerOption -import ch.tutteli.atrium.api.infix.en_GB.creating.charsequence.contains.builders.impl.StaticName.nameContainsNotValuesFun -import ch.tutteli.atrium.domain.builders.creating.charsequence.contains.builders.AtMostCheckerOptionBase -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains - -/** - * Represents the builder of a `contains at least once but at most` check within the fluent API of a - * sophisticated `contains` assertion for [CharSequence]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - * - * @constructor Represents the builder of a `contains at least once but at most` check within the fluent API of a - * sophisticated `contains` assertion for [CharSequence]. - * @param times The number which the check will compare against the actual number of times an expected object is - * found in the input of the search. - * @param containsBuilder The previously used [CharSequenceContains.Builder]. - */ -internal class AtMostCheckerOptionImpl( - times: Int, - containsBuilder: CharSequenceContains.Builder -) : AtMostCheckerOptionBase( - times, - containsBuilder, - nameContainsNotValuesFun, - { "`atMost $it`" }, - { "`atLeast $it`" }, - { "`exactly $it`" } -), AtMostCheckerOption diff --git a/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/creating/charsequence/contains.builders/impl/ButAtMostCheckerOptionImpl.kt b/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/creating/charsequence/contains.builders/impl/ButAtMostCheckerOptionImpl.kt deleted file mode 100644 index e9a635e76..000000000 --- a/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/creating/charsequence/contains.builders/impl/ButAtMostCheckerOptionImpl.kt +++ /dev/null @@ -1,43 +0,0 @@ -//TODO remove with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.api.infix.en_GB.creating.charsequence.contains.builders.impl - -import ch.tutteli.atrium.api.infix.en_GB.atLeast -import ch.tutteli.atrium.api.infix.en_GB.atMost -import ch.tutteli.atrium.api.infix.en_GB.butAtMost -import ch.tutteli.atrium.api.infix.en_GB.creating.charsequence.contains.builders.AtLeastCheckerOption -import ch.tutteli.atrium.api.infix.en_GB.creating.charsequence.contains.builders.ButAtMostCheckerOption -import ch.tutteli.atrium.api.infix.en_GB.creating.charsequence.contains.builders.impl.StaticName.nameContainsNotValuesFun -import ch.tutteli.atrium.api.infix.en_GB.exactly -import ch.tutteli.atrium.domain.builders.creating.charsequence.contains.builders.ButAtMostCheckerOptionBase -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains - -/** - * Represents the builder of the second step of a `contains at least but at most` check within the - * fluent API of a sophisticated `contains` assertion for [CharSequence]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied to the input of the search. - * - * @constructor Represents the builder of the second step of a `contains at least but at most` check within the - * fluent API of a sophisticated `contains` assertion for [CharSequence]. - * @param times The number which the check will compare against the actual number of times an expected object is - * found in the input of the search. - * @param containsBuilder The previously used [CharSequenceContains.Builder]. - */ -internal class ButAtMostCheckerOptionImpl( - times: Int, - atLeastBuilder: AtLeastCheckerOption, - containsBuilder: CharSequenceContains.Builder -) : ButAtMostCheckerOptionBase( - times, - atLeastBuilder, - containsBuilder, - nameContainsNotValuesFun, - { l, u -> "`atLeast $l butAtMost $u`" }, - { "`atMost $it`" }, - { "`atLeast $it`" }, - { "`butAtMost $it`" }, - { "`exactly $it`" } -), ButAtMostCheckerOption diff --git a/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/creating/charsequence/contains.builders/impl/ExactlyCheckerOptionImpl.kt b/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/creating/charsequence/contains.builders/impl/ExactlyCheckerOptionImpl.kt deleted file mode 100644 index 4ae5aac4a..000000000 --- a/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/creating/charsequence/contains.builders/impl/ExactlyCheckerOptionImpl.kt +++ /dev/null @@ -1,33 +0,0 @@ -//TODO remove with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.api.infix.en_GB.creating.charsequence.contains.builders.impl - -import ch.tutteli.atrium.api.infix.en_GB.creating.charsequence.contains.builders.ExactlyCheckerOption -import ch.tutteli.atrium.api.infix.en_GB.creating.charsequence.contains.builders.impl.StaticName.nameContainsNotValuesFun -import ch.tutteli.atrium.api.infix.en_GB.exactly -import ch.tutteli.atrium.domain.builders.creating.charsequence.contains.builders.ExactlyCheckerOptionBase -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains - -/** - * Represents the builder of a `contains exactly` check within the fluent API of a sophisticated - * `contains` assertion for [CharSequence]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - * - * @constructor Represents the builder of a `contains exactly` check within the fluent API of a sophisticated - * `contains` assertion for [CharSequence]. - * @param times The number which the check will compare against the actual number of times an expected object is - * found in the input of the search. - * @param containsBuilder The previously used [CharSequenceContains.Builder]. - */ -internal class ExactlyCheckerOptionImpl( - times: Int, - containsBuilder: CharSequenceContains.Builder -) : ExactlyCheckerOptionBase( - times, - containsBuilder, - nameContainsNotValuesFun, - { "`exactly $it`" } -), ExactlyCheckerOption diff --git a/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/creating/charsequence/contains.builders/impl/NotCheckerOptionImpl.kt b/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/creating/charsequence/contains.builders/impl/NotCheckerOptionImpl.kt deleted file mode 100644 index 4c4b52b37..000000000 --- a/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/creating/charsequence/contains.builders/impl/NotCheckerOptionImpl.kt +++ /dev/null @@ -1,24 +0,0 @@ -//TODO remove with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.api.infix.en_GB.creating.charsequence.contains.builders.impl - -import ch.tutteli.atrium.api.infix.en_GB.creating.charsequence.contains.builders.NotCheckerOption -import ch.tutteli.atrium.domain.builders.creating.charsequence.contains.builders.NotCheckerOptionBase -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains - -/** - * Represents the builder of a `contains not at all` check within the fluent API of a sophisticated - * `contains` assertion for [CharSequence]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - * - * @constructor Represents the builder of a `contains not at all` check within the fluent API of a sophisticated - * `contains` assertion for [CharSequence]. - * @param containsBuilder The previously used [CharSequenceContains.Builder]. - */ -internal class NotCheckerOptionImpl( - containsBuilder: CharSequenceContains.Builder -) : NotCheckerOptionBase(containsBuilder), - NotCheckerOption diff --git a/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/creating/charsequence/contains.builders/impl/NotOrAtMostCheckerOptionImpl.kt b/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/creating/charsequence/contains.builders/impl/NotOrAtMostCheckerOptionImpl.kt deleted file mode 100644 index a6f9fdfb9..000000000 --- a/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/creating/charsequence/contains.builders/impl/NotOrAtMostCheckerOptionImpl.kt +++ /dev/null @@ -1,33 +0,0 @@ -//TODO remove with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.api.infix.en_GB.creating.charsequence.contains.builders.impl - -import ch.tutteli.atrium.api.infix.en_GB.creating.charsequence.contains.builders.NotOrAtMostCheckerOption -import ch.tutteli.atrium.api.infix.en_GB.creating.charsequence.contains.builders.impl.StaticName.nameContainsNotValuesFun -import ch.tutteli.atrium.api.infix.en_GB.notOrAtMost -import ch.tutteli.atrium.domain.builders.creating.charsequence.contains.builders.NotOrAtMostCheckerOptionBase -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains - -/** - * Represents the builder of a `contains not or at most` check within the fluent API of a - * sophisticated `contains` assertion for [CharSequence]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - * - * @constructor Represents the builder of a `contains not or at most` check within the fluent API of a - * sophisticated `contains` assertion for [CharSequence]. - * @param times The number which the check will compare against the actual number of times an expected object is - * found in the input of the search. - * @param containsBuilder The previously used [CharSequenceContains.Builder]. - */ -internal class NotOrAtMostCheckerOptionImpl( - times: Int, - containsBuilder: CharSequenceContains.Builder -) : NotOrAtMostCheckerOptionBase( - times, - containsBuilder, - nameContainsNotValuesFun, - { "`notOrAtMost $it`" } -), NotOrAtMostCheckerOption diff --git a/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/creating/charsequence/contains.builders/impl/nameContainsNotFun.kt b/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/creating/charsequence/contains.builders/impl/nameContainsNotFun.kt deleted file mode 100644 index dd77c66fb..000000000 --- a/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/creating/charsequence/contains.builders/impl/nameContainsNotFun.kt +++ /dev/null @@ -1,18 +0,0 @@ -@file:Suppress("DEPRECATION" /* will be removed with 1.0.0 */) -package ch.tutteli.atrium.api.infix.en_GB.creating.charsequence.contains.builders.impl - -import ch.tutteli.atrium.api.infix.en_GB.creating.Values -import ch.tutteli.atrium.api.infix.en_GB.containsNot -import ch.tutteli.atrium.creating.Expect -import kotlin.reflect.KFunction2 - -internal object StaticName { - val nameContainsNotValuesFun: String = { - val f: KFunction2, Values, Expect> = - Expect::containsNot - //TODO use once https://youtrack.jetbrains.com/issue/KT-38013 is fixed (there are other places where "values" is hard-coded) -// val values : KFunction2, Values> = ::values -// "`${f.name} ${values.name}`" - "`${f.name} values`" - }() -} diff --git a/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/creating/charsequence/contains/impl/checkerNames.kt b/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/creating/charsequence/contains/impl/checkerNames.kt index 30e170b81..ead3d552f 100644 --- a/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/creating/charsequence/contains/impl/checkerNames.kt +++ b/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/creating/charsequence/contains/impl/checkerNames.kt @@ -8,14 +8,14 @@ import ch.tutteli.atrium.logic.creating.charsequence.contains.steps.AtLeastCheck import kotlin.reflect.KFunction2 internal object StaticName { - val containsNotValuesFun: String = { + val containsNotValuesFun: String = run { val f: KFunction2, Values, Expect> = Expect::containsNot //TODO use once https://youtrack.jetbrains.com/issue/KT-38013 is fixed (there are other places where "values" is hard-coded) // val values : KFunction2, Values> = ::values // "`${f.name} ${values.name}`" "`${f.name} values`" - }() + } val atLeast = CharSequenceContains.EntryPointStep<*, *>::atLeast.name val butAtMost = AtLeastCheckerStep<*, *>::butAtMost.name diff --git a/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/creating/iterable/contains/builders/AtLeastCheckerOption.kt b/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/creating/iterable/contains/builders/AtLeastCheckerOption.kt deleted file mode 100644 index e4c0fc85e..000000000 --- a/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/creating/iterable/contains/builders/AtLeastCheckerOption.kt +++ /dev/null @@ -1,21 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.api.infix.en_GB.creating.iterable.contains.builders - -import ch.tutteli.atrium.domain.builders.creating.iterable.contains.builders.WithTimesCheckerOption -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains - -/** - * Represents the extension point for another option after a `contains at least`-check within a sophisticated - * `contains` assertion building process for [Iterable]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - */ -@Deprecated( - "Use AtLeastCheckerStep from atrium-logic; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.logic.creating.iterable.contains.steps.AtLeastCheckerStep") -) -interface AtLeastCheckerOption, out S : IterableContains.SearchBehaviour> - : WithTimesCheckerOption diff --git a/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/creating/iterable/contains/builders/AtMostCheckerOption.kt b/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/creating/iterable/contains/builders/AtMostCheckerOption.kt deleted file mode 100644 index 2db1d0c1c..000000000 --- a/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/creating/iterable/contains/builders/AtMostCheckerOption.kt +++ /dev/null @@ -1,21 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.api.infix.en_GB.creating.iterable.contains.builders - -import ch.tutteli.atrium.domain.builders.creating.iterable.contains.builders.WithTimesCheckerOption -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains - -/** - * Represents the extension point for another option after a `contains at least once but at most`-check within - * a sophisticated `contains` assertion building process for [Iterable]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - */ -@Deprecated( - "Use AtMostCheckerStep from atrium-logic; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.logic.creating.iterable.contains.steps.AtMostCheckerStep") -) -interface AtMostCheckerOption, out S : IterableContains.SearchBehaviour> - : WithTimesCheckerOption diff --git a/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/creating/iterable/contains/builders/ButAtMostCheckerOption.kt b/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/creating/iterable/contains/builders/ButAtMostCheckerOption.kt deleted file mode 100644 index f188490b5..000000000 --- a/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/creating/iterable/contains/builders/ButAtMostCheckerOption.kt +++ /dev/null @@ -1,21 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.api.infix.en_GB.creating.iterable.contains.builders - -import ch.tutteli.atrium.domain.builders.creating.iterable.contains.builders.WithTimesCheckerOption -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains - -/** - * Represents the extension point for another option after a `contains at least but at most`-check within a - * sophisticated `contains` assertion building process for [Iterable]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - */ -@Deprecated( - "Use ButAtMostCheckerStep from atrium-logic; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.logic.creating.iterable.contains.steps.ButAtMostCheckerStep") -) -interface ButAtMostCheckerOption, out S : IterableContains.SearchBehaviour> - : WithTimesCheckerOption diff --git a/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/creating/iterable/contains/builders/ExactlyCheckerOption.kt b/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/creating/iterable/contains/builders/ExactlyCheckerOption.kt deleted file mode 100644 index 51b6639f9..000000000 --- a/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/creating/iterable/contains/builders/ExactlyCheckerOption.kt +++ /dev/null @@ -1,21 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.api.infix.en_GB.creating.iterable.contains.builders - -import ch.tutteli.atrium.domain.builders.creating.iterable.contains.builders.WithTimesCheckerOption -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains - -/** - * Represents the extension point for another option after a `contains exactly`-check within - * a sophisticated `contains` assertion building process for [Iterable]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - */ -@Deprecated( - "Use ExactlyCheckerStep from atrium-logic; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.logic.creating.iterable.contains.steps.ExactlyCheckerStep") -) -interface ExactlyCheckerOption, out S : IterableContains.SearchBehaviour> - : WithTimesCheckerOption diff --git a/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/creating/iterable/contains/builders/NotCheckerOption.kt b/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/creating/iterable/contains/builders/NotCheckerOption.kt deleted file mode 100644 index eb6808eb8..000000000 --- a/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/creating/iterable/contains/builders/NotCheckerOption.kt +++ /dev/null @@ -1,20 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.api.infix.en_GB.creating.iterable.contains.builders - -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains - -/** - * Represents the extension point for another option after a `contains not at all`-check within - * a sophisticated `contains` assertion building process for [Iterable]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - */ -@Deprecated( - "Use NotCheckerStep from atrium-logic; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.logic.creating.iterable.contains.steps.NotCheckerStep") -) -interface NotCheckerOption, out S : IterableContains.SearchBehaviour> - : IterableContains.CheckerOption diff --git a/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/creating/iterable/contains/builders/NotOrAtMostCheckerOption.kt b/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/creating/iterable/contains/builders/NotOrAtMostCheckerOption.kt deleted file mode 100644 index b371f3ce0..000000000 --- a/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/creating/iterable/contains/builders/NotOrAtMostCheckerOption.kt +++ /dev/null @@ -1,21 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.api.infix.en_GB.creating.iterable.contains.builders - -import ch.tutteli.atrium.domain.builders.creating.iterable.contains.builders.WithTimesCheckerOption -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains - -/** - * Represents the extension point for another option after a `contains not or at most`-check within - * a sophisticated `contains` assertion building process for [Iterable]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - */ -@Deprecated( - "Use NotOrAtMostCheckerStep from atrium-logic; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.logic.creating.iterable.contains.steps.NotOrAtMostCheckerStep") -) -interface NotOrAtMostCheckerOption, out S : IterableContains.SearchBehaviour> - : WithTimesCheckerOption diff --git a/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/creating/iterable/contains/builders/impl/AtLeastCheckerOptionImpl.kt b/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/creating/iterable/contains/builders/impl/AtLeastCheckerOptionImpl.kt deleted file mode 100644 index f0daf47c5..000000000 --- a/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/creating/iterable/contains/builders/impl/AtLeastCheckerOptionImpl.kt +++ /dev/null @@ -1,32 +0,0 @@ -//TODO remove with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.api.infix.en_GB.creating.iterable.contains.builders.impl - -import ch.tutteli.atrium.api.infix.en_GB.creating.iterable.contains.builders.AtLeastCheckerOption -import ch.tutteli.atrium.api.infix.en_GB.creating.iterable.contains.builders.impl.StaticName.nameContainsNotValuesFun -import ch.tutteli.atrium.domain.builders.creating.iterable.contains.builders.AtLeastCheckerOptionBase -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InAnyOrderSearchBehaviour - -/** - * Represents the builder of a `contains at least` check within the fluent API of a sophisticated - * `contains` assertion for [Iterable]. - * - * @param T The input type of the search. - * - * @constructor Represents the builder of a `contains at least` check within the fluent API of a sophisticated - * `contains` assertion for [Iterable]. - * @param times The number which the check will compare against the actual number of times an expected entry is - * found in the [Iterable]. - * @param containsBuilder The previously used [IterableContains.Builder]. - */ -internal class AtLeastCheckerOptionImpl, out S : InAnyOrderSearchBehaviour>( - times: Int, - containsBuilder: IterableContains.Builder -) : AtLeastCheckerOptionBase( - times, - containsBuilder, - nameContainsNotValuesFun, - { "`atLeast $it`" } -), AtLeastCheckerOption diff --git a/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/creating/iterable/contains/builders/impl/AtMostCheckerOptionImpl.kt b/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/creating/iterable/contains/builders/impl/AtMostCheckerOptionImpl.kt deleted file mode 100644 index 7bfce7115..000000000 --- a/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/creating/iterable/contains/builders/impl/AtMostCheckerOptionImpl.kt +++ /dev/null @@ -1,34 +0,0 @@ -//TODO remove with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.api.infix.en_GB.creating.iterable.contains.builders.impl - -import ch.tutteli.atrium.api.infix.en_GB.creating.iterable.contains.builders.AtMostCheckerOption -import ch.tutteli.atrium.api.infix.en_GB.creating.iterable.contains.builders.impl.StaticName.nameContainsNotValuesFun -import ch.tutteli.atrium.domain.builders.creating.iterable.contains.builders.AtMostCheckerOptionBase -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InAnyOrderSearchBehaviour - -/** - * Represents the builder of a `contains at least once but at most` check within the fluent API of a - * sophisticated `contains` assertion for [Iterable]. - * - * @param T The input type of the search. - * - * @constructor Represents the builder of a `contains at least once but at most` check within the fluent API of a - * sophisticated `contains` assertion for [Iterable]. - * @param times The number which the check will compare against the actual number of times an expected entry is - * found in the [Iterable]. - * @param containsBuilder The previously used [IterableContains.Builder]. - */ -internal class AtMostCheckerOptionImpl, out S : InAnyOrderSearchBehaviour>( - times: Int, - containsBuilder: IterableContains.Builder -) : AtMostCheckerOptionBase( - times, - containsBuilder, - nameContainsNotValuesFun, - { "`atMost $it`" }, - { "`atLeast $it`" }, - { "`exactly $it`" } -), AtMostCheckerOption diff --git a/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/creating/iterable/contains/builders/impl/ButAtMostCheckerOptionImpl.kt b/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/creating/iterable/contains/builders/impl/ButAtMostCheckerOptionImpl.kt deleted file mode 100644 index 41e3f911a..000000000 --- a/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/creating/iterable/contains/builders/impl/ButAtMostCheckerOptionImpl.kt +++ /dev/null @@ -1,39 +0,0 @@ -//TODO remove with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.api.infix.en_GB.creating.iterable.contains.builders.impl - -import ch.tutteli.atrium.api.infix.en_GB.creating.iterable.contains.builders.AtLeastCheckerOption -import ch.tutteli.atrium.api.infix.en_GB.creating.iterable.contains.builders.ButAtMostCheckerOption -import ch.tutteli.atrium.api.infix.en_GB.creating.iterable.contains.builders.impl.StaticName.nameContainsNotValuesFun -import ch.tutteli.atrium.domain.builders.creating.iterable.contains.builders.ButAtMostCheckerOptionBase -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InAnyOrderSearchBehaviour - -/** - * Represents the builder of the second step of a `contains at least but at most` check within the - * fluent API of a sophisticated `contains` assertion for [Iterable]. - * - * @param T The input type of the search. - * - * @constructor Represents the builder of the second step of a `contains at least but at most` check within the - * fluent API of a sophisticated `contains` assertion for [Iterable]. - * @param times The number which the check will compare against the actual number of times an expected entry is - * found in the [Iterable]. - * @param containsBuilder The previously used [IterableContains.Builder]. - */ -internal class ButAtMostCheckerOptionImpl, out S : InAnyOrderSearchBehaviour>( - times: Int, - atLeastBuilder: AtLeastCheckerOption, - containsBuilder: IterableContains.Builder -) : ButAtMostCheckerOptionBase( - times, - atLeastBuilder, - containsBuilder, - nameContainsNotValuesFun, - { l, u -> "`atLeast $l butAtMost $u`" }, - { "`atMost $it`" }, - { "`atLeast $it`" }, - { "`butAtMost $it`" }, - { "`exactly $it`" } -), ButAtMostCheckerOption diff --git a/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/creating/iterable/contains/builders/impl/ExactlyCheckerOptionImpl.kt b/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/creating/iterable/contains/builders/impl/ExactlyCheckerOptionImpl.kt deleted file mode 100644 index da7b86e16..000000000 --- a/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/creating/iterable/contains/builders/impl/ExactlyCheckerOptionImpl.kt +++ /dev/null @@ -1,32 +0,0 @@ -//TODO remove with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.api.infix.en_GB.creating.iterable.contains.builders.impl - -import ch.tutteli.atrium.api.infix.en_GB.creating.iterable.contains.builders.ExactlyCheckerOption -import ch.tutteli.atrium.api.infix.en_GB.creating.iterable.contains.builders.impl.StaticName.nameContainsNotValuesFun -import ch.tutteli.atrium.domain.builders.creating.iterable.contains.builders.ExactlyCheckerOptionBase -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InAnyOrderSearchBehaviour - -/** - * Represents the builder of a `contains exactly` check within the fluent API of a sophisticated - * `contains` assertion for [Iterable]. - * - * @param T The input type of the search. - * - * @constructor Represents the builder of a `contains exactly` check within the fluent API of a sophisticated - * `contains` assertion for [Iterable]. - * @param times The number which the check will compare against the actual number of times an expected entry is - * found in the [Iterable]. - * @param containsBuilder The previously used [IterableContains.Builder]. - */ -internal class ExactlyCheckerOptionImpl, out S : InAnyOrderSearchBehaviour>( - times: Int, - containsBuilder: IterableContains.Builder -) : ExactlyCheckerOptionBase( - times, - containsBuilder, - nameContainsNotValuesFun, - { "`exactly $it`" } -), ExactlyCheckerOption diff --git a/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/creating/iterable/contains/builders/impl/NotCheckerOptionImpl.kt b/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/creating/iterable/contains/builders/impl/NotCheckerOptionImpl.kt deleted file mode 100644 index 00d6a0b32..000000000 --- a/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/creating/iterable/contains/builders/impl/NotCheckerOptionImpl.kt +++ /dev/null @@ -1,25 +0,0 @@ -//TODO remove with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.api.infix.en_GB.creating.iterable.contains.builders.impl - -import ch.tutteli.atrium.api.infix.en_GB.creating.iterable.contains.builders.NotCheckerOption -import ch.tutteli.atrium.domain.builders.creating.iterable.contains.builders.NotCheckerOptionBase -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InAnyOrderSearchBehaviour - -/** - * Represents the builder of a `contains not at all` check within the fluent API of a sophisticated - * `contains` assertion for [Iterable]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - * - * @constructor Represents the builder of a `contains not at all` check within the fluent API of a sophisticated - * `contains not` assertion for [Iterable]. - * @param containsBuilder The previously used [IterableContains.Builder]. - */ -internal class NotCheckerOptionImpl, out S : InAnyOrderSearchBehaviour>( - containsBuilder: IterableContains.Builder -) : NotCheckerOptionBase(containsBuilder), - NotCheckerOption diff --git a/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/creating/iterable/contains/builders/impl/NotOrAtMostCheckerOptionImpl.kt b/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/creating/iterable/contains/builders/impl/NotOrAtMostCheckerOptionImpl.kt deleted file mode 100644 index c779f995b..000000000 --- a/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/creating/iterable/contains/builders/impl/NotOrAtMostCheckerOptionImpl.kt +++ /dev/null @@ -1,32 +0,0 @@ -//TODO remove with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.api.infix.en_GB.creating.iterable.contains.builders.impl - -import ch.tutteli.atrium.api.infix.en_GB.creating.iterable.contains.builders.NotOrAtMostCheckerOption -import ch.tutteli.atrium.api.infix.en_GB.creating.iterable.contains.builders.impl.StaticName.nameContainsNotValuesFun -import ch.tutteli.atrium.domain.builders.creating.iterable.contains.builders.NotOrAtMostCheckerOptionBase -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InAnyOrderSearchBehaviour - -/** - * Represents the builder of a `contains not or at most` check within the fluent API of a - * sophisticated `contains` assertion for [Iterable]. - * - * @param T The input type of the search. - * - * @constructor Represents the builder of a `contains at least once but at most` check within the fluent API of a - * sophisticated `contains` assertion for [Iterable]. - * @param times The number which the check will compare against the actual number of times an expected entry is - * found in the [Iterable]. - * @param containsBuilder The previously used [IterableContains.Builder]. - */ -internal class NotOrAtMostCheckerOptionImpl, out S : InAnyOrderSearchBehaviour>( - times: Int, - containsBuilder: IterableContains.Builder -) : NotOrAtMostCheckerOptionBase( - times, - containsBuilder, - nameContainsNotValuesFun, - { "`notOrAtMost $it`" } -), NotOrAtMostCheckerOption diff --git a/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/creating/iterable/contains/builders/impl/nameContainsNotFun.kt b/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/creating/iterable/contains/builders/impl/nameContainsNotFun.kt deleted file mode 100644 index 9df54d532..000000000 --- a/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/creating/iterable/contains/builders/impl/nameContainsNotFun.kt +++ /dev/null @@ -1,8 +0,0 @@ -//TODO remove with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.api.infix.en_GB.creating.iterable.contains.builders.impl - -internal object StaticName { - val nameContainsNotValuesFun: String = "`containsNot values`" -} diff --git a/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/creating/iterable/contains/impl/checkerNames.kt b/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/creating/iterable/contains/impl/checkerNames.kt index bb3f505e7..27534139c 100644 --- a/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/creating/iterable/contains/impl/checkerNames.kt +++ b/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/creating/iterable/contains/impl/checkerNames.kt @@ -10,14 +10,14 @@ import ch.tutteli.atrium.logic.creating.iterable.contains.steps.NotCheckerStep import kotlin.reflect.KFunction2 internal object StaticName { - val containsNotValuesFun = { + val containsNotValuesFun = run { val containsNotKf: KFunction2>, o, NotCheckerStep, NotSearchBehaviour>> = Expect>::containsNot //TODO use once https://youtrack.jetbrains.com/issue/KT-38013 is fixed (there are other places where "values" is hard-coded) // val values : KFunction2, Values> = ::values // "`${f.name} ${o::class.simpleName} ${fThe.name} ${values.name}`" "`${containsNotKf.name} values`" - }() + } val atLeast = IterableLikeContains.EntryPointStep<*, *, InAnyOrderSearchBehaviour>::atLeast.name val butAtMost = AtLeastCheckerStep<*, *, InAnyOrderSearchBehaviour>::butAtMost.name diff --git a/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/iterableAssertionsDeprecated.kt b/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/iterableAssertionsDeprecated.kt deleted file mode 100644 index 46a238c3b..000000000 --- a/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/iterableAssertionsDeprecated.kt +++ /dev/null @@ -1,42 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "DeprecatedCallableAddReplaceWith") -@file:JvmMultifileClass -@file:JvmName("IterableAssertionsKt") - -package ch.tutteli.atrium.api.infix.en_GB - -import ch.tutteli.atrium.api.infix.en_GB.creating.iterable.contains.builders.NotCheckerOption -import ch.tutteli.atrium.api.infix.en_GB.creating.iterable.contains.builders.impl.NotCheckerOptionImpl -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.domain.builders.ExpectImpl -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.NoOpSearchBehaviour -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.NotSearchBehaviour -import kotlin.jvm.JvmMultifileClass -import kotlin.jvm.JvmName - -/** - * Creates an [IterableContains.Builder] based on this [Expect] which allows to define - * more sophisticated `contains` assertions. - * - * @return The newly created builder. - */ -@Deprecated("Only here to retain binary backward compatibility; will be removed with 1.0.0") -fun > contains( - expect: Expect, - @Suppress("UNUSED_PARAMETER") o: o -): IterableContains.Builder = - ExpectImpl.iterable.containsBuilder(expect) - -/** - * Creates an [IterableContains.Builder] based on this [Expect] which allows to define - * more sophisticated `contains not` assertions. - * - * @return The newly created builder. - */ -@Deprecated("Only here to retain binary backward compatibility; will be removed with 1.0.0") -fun > containsNot( - expect: Expect, - @Suppress("UNUSED_PARAMETER") o: o -): NotCheckerOption = - NotCheckerOptionImpl(ExpectImpl.iterable.containsNotBuilder(expect)) diff --git a/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/iterableContainsCheckers.kt b/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/iterableContainsCheckers.kt deleted file mode 100644 index f4ed7d904..000000000 --- a/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/iterableContainsCheckers.kt +++ /dev/null @@ -1,93 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "DeprecatedCallableAddReplaceWith") - -package ch.tutteli.atrium.api.infix.en_GB - -import ch.tutteli.atrium.api.infix.en_GB.creating.iterable.contains.builders.* -import ch.tutteli.atrium.api.infix.en_GB.creating.iterable.contains.builders.impl.* -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InAnyOrderSearchBehaviour - -/** - * Restricts a `contains` assertion by specifying that the number of occurrences of the entry which we are looking - * for occurs `at least` number of [times] within the [Iterable]. - * - * @param times The number which the check will compare against the actual number of times an expected entry is - * found in the [Iterable]. - * - * @return The newly created builder. - * @throws IllegalArgumentException In case [times] is smaller than zero. - * @throws IllegalArgumentException In case [times] equals to zero; use [containsNot] instead. - */ -infix fun , S : InAnyOrderSearchBehaviour> IterableContains.Builder.atLeast( - times: Int -): AtLeastCheckerOption = AtLeastCheckerOptionImpl(times, this) - -/** - * Restricts a `contains at least` assertion by specifying that the number of occurrences of the entry which we - * are looking for occurs `at most` number of [times] within the [Iterable]. - * - * The resulting restriction will be a `contains at least but at most` assertion. - * - * @param times The number which the check will compare against the actual number of times an expected entry is - * found in the [Iterable]. - * - * @return The newly created builder. - * @throws IllegalArgumentException In case [times] is smaller than zero. - * @throws IllegalArgumentException In case [times] equals to zero; use [containsNot] instead. - * @throws IllegalArgumentException In case [times] of this `at most` restriction equals to the number of the - * `at least` restriction; use the [exactly] restriction instead. - */ -infix fun , S : InAnyOrderSearchBehaviour> AtLeastCheckerOption.butAtMost( - times: Int -): ButAtMostCheckerOption = ButAtMostCheckerOptionImpl(times, this, containsBuilder) - -/** - * Restricts a `contains` assertion by specifying that the number of occurrences of the entry which we - * are looking for occurs `exactly` number of [times] within the [Iterable]. - * - * @param times The number which the check will compare against the actual number of times an expected entry is - * found in the [Iterable]. - * - * @return The newly created builder. - * @throws IllegalArgumentException In case [times] is smaller than zero. - * @throws IllegalArgumentException In case [times] equals to zero; use [containsNot] instead. - */ -infix fun , S : InAnyOrderSearchBehaviour> IterableContains.Builder.exactly( - times: Int -): ExactlyCheckerOption = ExactlyCheckerOptionImpl(times, this) - -/** - * Restricts a `contains` assertion by specifying that the number of occurrences of the entry which we - * are looking for occurs `at least` once but `at most` number of [times] within the [Iterable]. - * - * If you want to use a higher lower bound than one, then use `atLeast(2).butAtMost(3)` instead of `atMost(3)`. - * And in case you want to state that it is either not contained at all or at most a certain number of times, - * then use `notOrAtMost(2)` instead. - * - * @param times The number which the check will compare against the actual number of times an expected entry is - * found in the [Iterable]. - * - * @return The newly created builder. - * @throws IllegalArgumentException In case [times] is smaller than zero. - * @throws IllegalArgumentException In case [times] equals to zero; use [containsNot] instead. - * @throws IllegalArgumentException In case [times] equals to one; use [exactly] instead. - */ -infix fun , S : InAnyOrderSearchBehaviour> IterableContains.Builder.atMost( - times: Int -): AtMostCheckerOption = AtMostCheckerOptionImpl(times, this) - -/** - * Restricts a `contains` assertion by specifying that the number of occurrences of the entry which we - * are looking for occurs `not at all or at most` number of [times] within the [Iterable]. - * - * @param times The number which the check will compare against the actual number of times an expected entry is - * found in the [Iterable]. - * - * @return The newly created builder. - * @throws IllegalArgumentException In case [times] is smaller than zero. - * @throws IllegalArgumentException In case [times] equals to zero; use [containsNot] instead. - */ -infix fun , S : InAnyOrderSearchBehaviour> IterableContains.Builder.notOrAtMost( - times: Int -): NotOrAtMostCheckerOption = NotOrAtMostCheckerOptionImpl(times, this) diff --git a/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/iterableContainsInAnyOrderCreators.kt b/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/iterableContainsInAnyOrderCreators.kt deleted file mode 100644 index fe159e90c..000000000 --- a/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/iterableContainsInAnyOrderCreators.kt +++ /dev/null @@ -1,129 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "DeprecatedCallableAddReplaceWith") - -package ch.tutteli.atrium.api.infix.en_GB - -import ch.tutteli.atrium.api.infix.en_GB.creating.Values -import ch.tutteli.atrium.api.infix.en_GB.creating.Entries -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.domain.builders.ExpectImpl -import ch.tutteli.atrium.domain.builders.creating.basic.contains.addAssertion -import ch.tutteli.atrium.domain.builders.utils.toVarArg -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains.CheckerOption -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InAnyOrderSearchBehaviour -import ch.tutteli.atrium.domain.creating.typeutils.IterableLike - -/** - * Finishes the specification of the sophisticated `contains` assertion where the [expected] - * value shall be searched within the [Iterable]. - * - * Delegates to `the values(expected)`. - * - * @param expected The value which is expected to be contained within this [Iterable]. - * - * @return An [Expect] for the current subject of the assertion. - */ -infix fun > CheckerOption.value(expected: E): Expect = - this the values(expected) - -/** - * Finishes the specification of the sophisticated `contains` assertion where the expected [values] - * shall be searched within the [Iterable]. - * - * Notice, that it does not search for unique matches. Meaning, if the iterable is `setOf('a', 'b')` and - * [Values] is defined as `values("a", "a")`, then both match, - * even though they match the same sequence in the input of the search. - * Use an option such as [atLeast], [atMost] and [exactly] to control the number of occurrences you expect. - * - * Meaning you might want to use: - * `to contain inAny order exactly 2 value 'a'` - * instead of: - * `to contain inAny order exactly 1 the values('a', 'a')` - * - * @param values The values which are expected to be contained within the [Iterable] - * -- use the function `values(t, ...)` to create a [Values]. - * - * @return An [Expect] for the current subject of the assertion. - */ -infix fun > CheckerOption.the(values: Values): Expect = - addAssertion(ExpectImpl.iterable.contains.valuesInAnyOrder(this, values.toList())) - -/** - * Finishes the specification of the sophisticated `contains` assertion where an entry shall be searched which either - * holds all assertions [assertionCreatorOrNull] creates or needs to be `null` in case [assertionCreatorOrNull] - * is defined as `null`. - * - * Delegates to `the entries(assertionCreatorOrNull)` - * - * @param assertionCreatorOrNull The identification lambda which creates the assertions which the entry we are looking - * for has to hold; or in other words, the function which defines whether an entry is the one we are looking for - * or not. In case it is defined as `null`, then an entry is identified if it is `null` as well. - * - * @return An [Expect] for the current subject of the assertion. - */ -infix fun > CheckerOption.entry( - assertionCreatorOrNull: (Expect.() -> Unit)? -): Expect = this the entries(assertionCreatorOrNull) - -/** - * Finishes the specification of the sophisticated `contains` assertion where an entry shall be searched which either - * holds all assertions [entries].[assertionCreatorOrNull][Entries.assertionCreatorOrNull] creates or - * needs to be `null` in case [entries].[assertionCreatorOrNull][Entries.otherAssertionCreatorsOrNulls] - * is defined as `null` -- likewise an entry (can be the same) is searched for each of - * the [entries].[otherAssertionCreatorsOrNulls][Entries.otherAssertionCreatorsOrNulls]. - * - * @param entries The entries which are expected to be contained within the [Iterable] - * -- use the function `entries(t, ...)` to create an [Entries]. - * - * @return An [Expect] for the current subject of the assertion. - */ -infix fun > CheckerOption.the( - entries: Entries -): Expect = addAssertion(ExpectImpl.iterable.contains.entriesInAnyOrder(this, entries.toList())) - -/** - * Finishes the specification of the sophisticated `contains` assertion where all elements of the [expectedIterable] - * shall be searched within the [Iterable]. - * - * Delegates to [values] which also means that it does not search for unique matches - * (see [values] for more information). - * - * @param expectedIterable The [Iterable] whose elements are expected to be contained within this [Iterable]. - * - * @return An [Expect] for the current subject of the assertion. - * @throws IllegalArgumentException in case the given [expectedIterable] does not have elements (is empty). - * - * TODO remove with 1.0.0 - * @since 0.12.0 - */ -inline infix fun > CheckerOption.elementsOf( - expectedIterable: Iterable -): Expect { - val (first, rest) = toVarArg(expectedIterable) - return this the values(first, *rest) -} - -/** - * Finishes the specification of the sophisticated `contains` assertion where all elements of the [expectedIterableLike] - * shall be searched within the [Iterable]. - * - * Delegates to [values] which also means that it does not search for unique matches - * (see [values] for more information). - * - * Notice that a runtime check applies which assures that only [Iterable], [Sequence] or one of the [Array] types - * are passed. This function expects [IterableLike] (which is a typealias for [Any]) to avoid cluttering the API. - * - * @param expectedIterableLike The [IterableLike] whose elements are expected to be contained within this [Iterable]. - * - * @return An [Expect] for the current subject of the assertion. - * @throws IllegalArgumentException in case [expectedIterableLike] is not an [Iterable], [Sequence] or one of the [Array] types - * or the given [expectedIterableLike] does not have elements (is empty). - * - * @since 0.13.0 - */ -inline infix fun > CheckerOption.elementsOf( - expectedIterableLike: IterableLike -): Expect { - val (first, rest) = toVarArg(expectedIterableLike) - return this the values(first, *rest) -} diff --git a/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/iterableContainsInAnyOrderOnlyCreators.kt b/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/iterableContainsInAnyOrderOnlyCreators.kt deleted file mode 100644 index a747201ac..000000000 --- a/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/iterableContainsInAnyOrderOnlyCreators.kt +++ /dev/null @@ -1,153 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "DeprecatedCallableAddReplaceWith") - -package ch.tutteli.atrium.api.infix.en_GB - -import ch.tutteli.atrium.api.infix.en_GB.creating.Values -import ch.tutteli.atrium.api.infix.en_GB.creating.Entries -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.domain.builders.ExpectImpl -import ch.tutteli.atrium.domain.builders.creating.basic.contains.addAssertion -import ch.tutteli.atrium.domain.builders.utils.toVarArg -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains.Builder -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InAnyOrderOnlySearchBehaviour -import ch.tutteli.atrium.domain.creating.typeutils.IterableLike - -/** - * Finishes the specification of the sophisticated `contains` assertion where the [Iterable] needs to contain only the - * [expected] value. - * - * Delegates to `the values(expected)`. - * - * Note that we might change the signature of this function with the next version - * which will cause a binary backward compatibility break (see - * [#292](https://github.com/robstoll/atrium/issues/292) for more information) - * - * @param expected The value which is expected to be contained within the [Iterable]. - * - * @return An [Expect] for the current subject of the assertion. - */ -infix fun > Builder.value(expected: E): Expect = - this the values(expected) - -/** - * Finishes the specification of the sophisticated `contains` assertion where the expected [values] - * must be contained in [Iterable] but it does not matter in which order. - * - * Note that we might change the signature of this function with the next version - * which will cause a binary backward compatibility break (see - * [#292](https://github.com/robstoll/atrium/issues/292) for more information) - * - * @param values The values which are expected to be contained within the [Iterable] - * -- use the function `values(t, ...)` to create a [Values]. - * - * @return An [Expect] for the current subject of the assertion. - */ -infix fun > Builder.the(values: Values): Expect = - addAssertion(ExpectImpl.iterable.contains.valuesInAnyOrderOnly(this, values.toList())) - -/** - * Finishes the specification of the sophisticated `contains` assertion where the [Iterable] needs to contain only one - * entry which holds all assertions created by the given [assertionCreatorOrNull] or is `null` in case - * [assertionCreatorOrNull] is defined as `null`. - * - * Delegates to `the entries(assertionCreatorOrNull)` - * - * Note that we might change the signature of this function with the next version - * which will cause a binary backward compatibility break (see - * [#292](https://github.com/robstoll/atrium/issues/292) for more information) - * - * @param assertionCreatorOrNull The identification lambda which creates the assertions which the entry we are looking - * for has to hold; or in other words, the function which defines whether an entry is the one we are looking for - * or not. In case it is defined as `null`, then an entry is identified if it is `null` as well. - * - * @return An [Expect] for the current subject of the assertion. - */ -infix fun > Builder.entry( - assertionCreatorOrNull: (Expect.() -> Unit)? -): Expect = this the entries(assertionCreatorOrNull) - -/** - * Finishes the specification of the sophisticated `contains` assertion where an entry needs to be contained in the - * [Iterable] which holds all assertions [entries].[assertionCreatorOrNull][Entries.assertionCreatorOrNull] - * creates or it needs to be `null` in case - * [entries].[assertionCreatorOrNull][Entries.assertionCreatorOrNull] is defined as `null` -- likewise an - * entry for each [entries].[otherAssertionCreatorsOrNulls][Entries.otherAssertionCreatorsOrNulls] needs to - * be contained in the [Iterable] where it does not matter in which order the entries appear but only as many entries - * should be returned by the [Iterable] as assertion creators are defined. - * - * Notice, that a first-wins strategy applies which means your assertion creator lambdas -- which kind of serve as - * identification lambdas -- should be ordered in such a way that the most specific identification lambda appears - * first, not that a less specific lambda wins. For instance, given a `setOf(1, 2)` you should not search for - * `entries({ isGreaterThan(0) }, { toBe(1) })` but for `entries({ toBe(1) }, { isGreaterThan(0) })` - * otherwise `isGreaterThan(0)` matches `1` before `toBe(1)` would match it. As a consequence `toBe(1)` could - * only match the entry which is left -- in this case `2` -- and of course this would fail. - * - * Note that we might change the signature of this function with the next version - * which will cause a binary backward compatibility break (see - * [#292](https://github.com/robstoll/atrium/issues/292) for more information) - * - * @param entries The entries which are expected to be contained within the [Iterable] - * -- use the function `entries(t, ...)` to create an [Entries]. - * - * @return An [Expect] for the current subject of the assertion. - */ - -infix fun > Builder.the( - entries: Entries -): Expect = addAssertion(ExpectImpl.iterable.contains.entriesInAnyOrderOnly(this, entries.toList())) - -/** - * Finishes the specification of the sophisticated `contains` assertion where all elements in - * [expectedIterable] need to be contained in [Iterable] where it does not matter in which order but only as - * many entries should be returned by the [Iterable] as values defined. - * - * Delegates to [values]. - * - * Note that we might change the signature of this function with the next version - * which will cause a binary backward compatibility break (see - * [#292](https://github.com/robstoll/atrium/issues/292) for more information) - * - * @param expectedIterable The [Iterable] whose elements are expected to be contained within this [Iterable] - * - * @return An [Expect] for the current subject of the assertion. - * @throws IllegalArgumentException in case the given [expectedIterable] does not have elements (is empty). - * - * TODO remove with 1.0.0 - * @since 0.12.0 - */ -inline infix fun > Builder.elementsOf( - expectedIterable: Iterable -): Expect { - val (first, rest) = toVarArg(expectedIterable) - return this the values(first, *rest) -} - -/** - * Finishes the specification of the sophisticated `contains` assertion where all elements in - * [expectedIterableLike] need to be contained in [Iterable] where it does not matter in which order but only as - * many entries should be returned by the [Iterable] as values defined. - * - * Delegates to [values]. - * - * Notice that a runtime check applies which assures that only [Iterable], [Sequence] or one of the [Array] types - * are passed. This function expects [IterableLike] (which is a typealias for [Any]) to avoid cluttering the API. - * - * Note that we might change the signature of this function with the next version - * which will cause a binary backward compatibility break (see - * [#292](https://github.com/robstoll/atrium/issues/292) for more information) - * - * @param expectedIterableLike The [IterableLike] whose elements are expected to be contained within this [Iterable] - * - * @return An [Expect] for the current subject of the assertion. - * @throws IllegalArgumentException in case [expectedIterableLike] is not an [Iterable], [Sequence] or one of the [Array] types - * or the given [expectedIterableLike] does not have elements (is empty). - * - * @since 0.13.0 - */ -inline infix fun > Builder.elementsOf( - expectedIterableLike: IterableLike -): Expect { - val (first, rest) = toVarArg(expectedIterableLike) - return this the values(first, *rest) -} diff --git a/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/iterableContainsInOrderOnlyCreators.kt b/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/iterableContainsInOrderOnlyCreators.kt deleted file mode 100644 index c02785c1f..000000000 --- a/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/iterableContainsInOrderOnlyCreators.kt +++ /dev/null @@ -1,144 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "DeprecatedCallableAddReplaceWith") - -package ch.tutteli.atrium.api.infix.en_GB - -import ch.tutteli.atrium.api.infix.en_GB.creating.Values -import ch.tutteli.atrium.api.infix.en_GB.creating.Entries -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.domain.builders.ExpectImpl -import ch.tutteli.atrium.domain.builders.creating.basic.contains.addAssertion -import ch.tutteli.atrium.domain.builders.utils.toVarArg -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains.Builder -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InOrderOnlySearchBehaviour -import ch.tutteli.atrium.domain.creating.typeutils.IterableLike - -/** - * Finishes the specification of the sophisticated `contains` assertion where the [Iterable] needs to contain only the - * [expected] value. - * - * Delegates to `the values(expected)`. - * - * Note that we might change the signature of this function with the next version - * which will cause a binary backward compatibility break (see - * [#292](https://github.com/robstoll/atrium/issues/292) for more information) - * - * @param expected The value which is expected to be contained within the [Iterable]. - * - * @return An [Expect] for the current subject of the assertion. - */ -infix fun > Builder.value(expected: E): Expect = - this the values(expected) - -/** - * Finishes the specification of the sophisticated `contains` assertion where the [Iterable] needs to contain only the - * expected [values] in the specified order. - * - * Note that we might change the signature of this function with the next version - * which will cause a binary backward compatibility break (see - * [#292](https://github.com/robstoll/atrium/issues/292) for more information) - * - * @param values The values which are expected to be contained within the [Iterable] - * -- use the function `values(t, ...)` to create a [Values]. - * - * @return An [Expect] for the current subject of the assertion. - */ -infix fun > Builder.the(values: Values): Expect = - addAssertion(ExpectImpl.iterable.contains.valuesInOrderOnly(this, values.toList())) - -/** - * Finishes the specification of the sophisticated `contains` assertion where the [Iterable] needs to contain only a - * single entry which holds all assertions created by the given [assertionCreatorOrNull] or needs to be `null` - * in case [assertionCreatorOrNull] is defined as `null`. - * - * Delegates to `the entries(assertionCreatorOrNull)`. - * - * Note that we might change the signature of this function with the next version - * which will cause a binary backward compatibility break (see - * [#292](https://github.com/robstoll/atrium/issues/292) for more information) - * - * @param assertionCreatorOrNull The identification lambda which creates the assertions which the entry we are looking - * for has to hold; or in other words, the function which defines whether an entry is the one we are looking for - * or not. In case it is defined as `null`, then an entry is identified if it is `null` as well. - * - * @return An [Expect] for the current subject of the assertion. - */ -infix fun > Builder.entry( - assertionCreatorOrNull: (Expect.() -> Unit)? -): Expect = this the entries(assertionCreatorOrNull) - -/** - * Finishes the specification of the sophisticated `contains` assertion where the [Iterable] needs to contain only an - * entry which holds all assertions [entries].[assertionCreatorOrNull][Entries.assertionCreatorOrNull] - * creates or is `null` in case [entries].[assertionCreatorOrNull][Entries.otherAssertionCreatorsOrNulls] - * is defined as `null` and likewise a further entry for each - * [entries].[otherAssertionCreatorsOrNulls][Entries.otherAssertionCreatorsOrNulls] - * (if given) whereas the entries have to appear in the specified order. - * - * Note that we might change the signature of this function with the next version - * which will cause a binary backward compatibility break (see - * [#292](https://github.com/robstoll/atrium/issues/292) for more information) - * - * @param entries The entries which are expected to be contained within the [Iterable] - * -- use the function `entries(t, ...)` to create an [Entries]. - * - * @return An [Expect] for the current subject of the assertion. - */ -infix fun > Builder.the( - entries: Entries -): Expect = addAssertion(ExpectImpl.iterable.contains.entriesInOrderOnly(this, entries.toList())) - -/** - * Finishes the specification of the sophisticated `contains` assertion where all elements of the [expectedIterable] - * shall be searched within the [Iterable] - * (if given) in the specified order. - * - * Delegates to [values]. - * - * Note that we might change the signature of this function with the next version - * which will cause a binary backward compatibility break (see - * [#292](https://github.com/robstoll/atrium/issues/292) for more information) - * - * @param expectedIterable The [Iterable] whose elements are expected to be contained within this [Iterable]. - * - * @return An [Expect] for the current subject of the assertion. - * @throws IllegalArgumentException in case the given [expectedIterable] does not have elements (is empty). - * - * @since 0.12.0 - * TODO remove with 1.0.0 - */ -inline infix fun > Builder.elementsOf( - expectedIterable: Iterable -): Expect { - val (first, rest) = toVarArg(expectedIterable) - return this the values(first, *rest) -} - -/** - * Finishes the specification of the sophisticated `contains` assertion where all elements of the [expectedIterableLike] - * shall be searched within the [Iterable] - * (if given) in the specified order. - * - * Delegates to [values]. - * - * Notice that a runtime check applies which assures that only [Iterable], [Sequence] or one of the [Array] types - * are passed. This function expects [IterableLike] (which is a typealias for [Any]) to avoid cluttering the API. - * - * Note that we might change the signature of this function with the next version - * which will cause a binary backward compatibility break (see - * [#292](https://github.com/robstoll/atrium/issues/292) for more information) - * - * @param expectedIterableLike The [IterableLike] whose elements are expected to be contained within this [Iterable]. - * - * @return An [Expect] for the current subject of the assertion. - * @throws IllegalArgumentException in case [expectedIterableLike] is not an [Iterable], [Sequence] or one of the [Array] types - * or the given [expectedIterableLike] does not have elements (is empty). - * - * @since 0.13.0 - */ -inline infix fun > Builder.elementsOf( - expectedIterableLike: IterableLike -): Expect { - val (first, rest) = toVarArg(expectedIterableLike) - return this the values(first, *rest) -} diff --git a/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/iterableContainsInOrderOnlyGroupedCreators.kt b/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/iterableContainsInOrderOnlyGroupedCreators.kt deleted file mode 100644 index f8fe7dc67..000000000 --- a/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/iterableContainsInOrderOnlyGroupedCreators.kt +++ /dev/null @@ -1,74 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "DeprecatedCallableAddReplaceWith") - -package ch.tutteli.atrium.api.infix.en_GB - -import ch.tutteli.atrium.api.infix.en_GB.creating.iterable.Order -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.domain.builders.ExpectImpl -import ch.tutteli.atrium.domain.builders.creating.basic.contains.addAssertion -import ch.tutteli.atrium.domain.builders.utils.Group -import ch.tutteli.atrium.domain.builders.utils.groupsToList -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains.Builder -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InOrderOnlyGroupedWithinSearchBehaviour -import kotlin.jvm.JvmName - -/** - * Finishes the specification of the sophisticated `contains` assertion where the expected [Order.firstGroup] as well as - * the [Order.secondGroup] and optionally [Order.otherExpectedGroups] of values need to be - * contained in [Iterable] in the specified order whereas the values within the groups can occur in any order. - * - * @param order A parameter object containing the different groups which have to appear in order in the [Iterable] - * -- use `order(group, group, ...)` to create an [Order] where group is either `value(e)` or `values(e, ...)`; - * so a call could look as follows: `inAny order(values(1, 2), value(2), values(3, 2)) - * - * @return An [Expect] for the current subject of the assertion. - */ -infix fun > Builder.inAny( - order: Order> -): Expect = addAssertion( - ExpectImpl.iterable.contains.valuesInOrderOnlyGrouped( - this, - groupsToList(order.firstGroup, order.secondGroup, order.otherExpectedGroups) - ) -) - -/** - * Helper function to create an [Order] based on the given [firstGroup], [secondGroup] and [otherExpectedGroups]. - */ -//TODO move to iterableLikeContainsInOrderOnlyGroupedCreators with 1.0.0 - here to retain bbc -fun order( - firstGroup: Group, - secondGroup: Group, - vararg otherExpectedGroups: Group -): Order> = Order(firstGroup, secondGroup, otherExpectedGroups) - -/** - * Finishes the specification of the sophisticated `contains` assertion where the expected [Order.firstGroup] as well as - * the [Order.secondGroup] and optionally [Order.otherExpectedGroups] of identification lambdas, identifying an entry, - * need to be contained in [Iterable] in the specified order whereas the identification lambdas within the groups - * can occur in any order. - * - * An identification lambda can also be defined as `null` in which case it matches an entry which is `null` as well. - * - * @param order A parameter object containing the different groups which have to appear in order in the [Iterable] - * -- use `order(group, group, ...)` to create an [Order] where group is either `entry { ... }` or - * `entries({ ... }, ...)`; so a call could look as follows: - * ``` - * inAny order( - * entry { it toBe 1 }, - * entries({ it lessThan 2 }, {it toBe 3 }) - * ) - * ``` - * - * @return An [Expect] for the current subject of the assertion. - */ -@JvmName("inAnyOrderEntries") -infix fun > Builder.inAny( - order: Order<(Expect.() -> Unit)?, Group<(Expect.() -> Unit)?>> -): Expect = addAssertion( - ExpectImpl.iterable.contains.entriesInOrderOnlyGrouped( - this, - groupsToList(order.firstGroup, order.secondGroup, order.otherExpectedGroups) - ) -) diff --git a/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/iterableContainsSearchBehaviours.kt b/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/iterableContainsSearchBehaviours.kt deleted file mode 100644 index dbc2770d4..000000000 --- a/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/iterableContainsSearchBehaviours.kt +++ /dev/null @@ -1,71 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "DeprecatedCallableAddReplaceWith") - -package ch.tutteli.atrium.api.infix.en_GB - -import ch.tutteli.atrium.domain.builders.ExpectImpl -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains.Builder -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.* - -/** - * Defines that the search behaviour "find entries `in any order` in the [Iterable]" shall be applied to this - * sophisticated `contains` in [Iterable] assertion. - * - * @return The newly created builder. - */ -infix fun > Builder.inAny( - @Suppress("UNUSED_PARAMETER") order: order -): Builder = ExpectImpl.iterable.contains.searchBehaviours.inAnyOrder(this) - -/** - * Defines that the constraint "`only` the specified entries exist in the [Iterable]" shall be applied to this - * sophisticated `contains` [Iterable] assertion. - * - * @return The newly created builder. - */ -infix fun > Builder.but( - @Suppress("UNUSED_PARAMETER") only: only -): Builder = ExpectImpl.iterable.contains.searchBehaviours.inAnyOrderOnly(this) - - -/** - * Defines that the search behaviour "find entries `in order` in the [Iterable]" shall be applied to this - * sophisticated `contains` in [Iterable] assertion. - * - * @return The newly created builder. - */ -infix fun > Builder.inGiven( - @Suppress("UNUSED_PARAMETER") order: order -): Builder = ExpectImpl.iterable.contains.searchBehaviours.inOrder(this) - -/** - * Defines that the constraint "`only` the specified entries exist in the [Iterable]" shall be applied to this - * sophisticated `contains in order` [Iterable] assertion. - * - * @return The newly created builder. - */ -infix fun > Builder.and( - @Suppress("UNUSED_PARAMETER") only: only -): Builder = ExpectImpl.iterable.contains.searchBehaviours.inOrderOnly(this) - -/** - * Defines that the [Iterable] contains `in order only` groups of entries - * whereas the order within the group is specified as next step. - * - * @return The newly created builder. - */ -infix fun > Builder.grouped( - @Suppress("UNUSED_PARAMETER") entries: entries -): Builder = - ExpectImpl.iterable.contains.searchBehaviours.inOrderOnlyGrouped(this) - -/** - * A filler word to emphasis that the next step defines the order within expected groups of values. - * - * @return The newly created builder. - */ -infix fun > Builder.within( - @Suppress("UNUSED_PARAMETER") group: group -): Builder = - ExpectImpl.iterable.contains.searchBehaviours.inOrderOnlyGroupedWithin(this) - diff --git a/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/iterableLikeContainsInOrderOnlyGroupedCreators.kt b/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/iterableLikeContainsInOrderOnlyGroupedCreators.kt index 0f269d239..c4408cd5d 100644 --- a/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/iterableLikeContainsInOrderOnlyGroupedCreators.kt +++ b/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/infix/en_GB/iterableLikeContainsInOrderOnlyGroupedCreators.kt @@ -54,3 +54,12 @@ infix fun EntryPointStep EntryPointStep.inAny( order: Order<(Expect.() -> Unit)?, Group<(Expect.() -> Unit)?>> ): Expect = _logicAppend { entriesInOrderOnlyGrouped(order.toList()) } + +/** + * Helper function to create an [Order] based on the given [firstGroup], [secondGroup] and [otherExpectedGroups]. + */ +fun order( + firstGroup: Group, + secondGroup: Group, + vararg otherExpectedGroups: Group +): Order> = Order(firstGroup, secondGroup, otherExpectedGroups) diff --git a/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/test/kotlin/ch/tutteli/atrium/api/infix/en_GB/CharSequenceContainsRegexAssertionsSpec.kt b/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/test/kotlin/ch/tutteli/atrium/api/infix/en_GB/CharSequenceContainsRegexAssertionsSpec.kt index 2d2d17b97..25ff78b50 100644 --- a/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/test/kotlin/ch/tutteli/atrium/api/infix/en_GB/CharSequenceContainsRegexAssertionsSpec.kt +++ b/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/test/kotlin/ch/tutteli/atrium/api/infix/en_GB/CharSequenceContainsRegexAssertionsSpec.kt @@ -1,11 +1,23 @@ package ch.tutteli.atrium.api.infix.en_GB +import ch.tutteli.atrium.api.verbs.internal.expect import ch.tutteli.atrium.creating.Expect import org.spekframework.spek2.Spek +import org.spekframework.spek2.style.specification.describe class CharSequenceContainsRegexAssertionsSpec : Spek({ include(StringSpec) include(RegexSpec) + + + describe("context 'aaaa'") { + it("search for 'aa' finds 3 hits since we want non disjoint matches") { + expect("aaaa") contains o exactly 3 regex "aa" + } + it("search for 'aa?' finds 4 hits since we want non disjoint matches") { + expect("aaaa")contains o exactly 4 regex "aa?" + } + } }) { object StringSpec : ch.tutteli.atrium.specs.integration.CharSequenceContainsRegexAssertionsSpec( getNameContainsRegex(), diff --git a/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/test/kotlin/ch/tutteli/atrium/api/infix/en_GB/IterableAnyAssertionsSpec.kt b/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/test/kotlin/ch/tutteli/atrium/api/infix/en_GB/IterableAnyAssertionsSpec.kt index 649af354a..8743b7db9 100644 --- a/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/test/kotlin/ch/tutteli/atrium/api/infix/en_GB/IterableAnyAssertionsSpec.kt +++ b/apis/infix-en_GB/atrium-api-infix-en_GB-common/src/test/kotlin/ch/tutteli/atrium/api/infix/en_GB/IterableAnyAssertionsSpec.kt @@ -1,7 +1,6 @@ package ch.tutteli.atrium.api.infix.en_GB import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.domain.builders.ExpectImpl import ch.tutteli.atrium.logic._logic import ch.tutteli.atrium.logic.changeSubject import ch.tutteli.atrium.specs.fun1 diff --git a/apis/infix-en_GB/atrium-api-infix-en_GB-jvm/build.gradle b/apis/infix-en_GB/atrium-api-infix-en_GB-jvm/build.gradle index eb9a9b275..40e13d9e5 100644 --- a/apis/infix-en_GB/atrium-api-infix-en_GB-jvm/build.gradle +++ b/apis/infix-en_GB/atrium-api-infix-en_GB-jvm/build.gradle @@ -19,7 +19,7 @@ dependencies { } -//TODO should not be necessary https://youtrack.jetbrains.com/issue/KT-28124 +//TODO 0.16.0 or 0.17.0 should not be necessary https://youtrack.jetbrains.com/issue/KT-28124 compileTestKotlin.dependsOn( prefixedProject('core-robstoll-jvm').compileKotlin, prefixedProject('core-robstoll-jvm').processResources, diff --git a/apis/infix-en_GB/atrium-api-infix-en_GB-jvm/src/module/module-info.java b/apis/infix-en_GB/atrium-api-infix-en_GB-jvm/src/module/module-info.java index 935139024..7cc62be16 100644 --- a/apis/infix-en_GB/atrium-api-infix-en_GB-jvm/src/module/module-info.java +++ b/apis/infix-en_GB/atrium-api-infix-en_GB-jvm/src/module/module-info.java @@ -6,10 +6,8 @@ module ch.tutteli.atrium.api.infix.en_GB { exports ch.tutteli.atrium.api.infix.en_GB; exports ch.tutteli.atrium.api.infix.en_GB.creating; - exports ch.tutteli.atrium.api.infix.en_GB.creating.charsequence.contains.builders; exports ch.tutteli.atrium.api.infix.en_GB.creating.feature; exports ch.tutteli.atrium.api.infix.en_GB.creating.iterable; - exports ch.tutteli.atrium.api.infix.en_GB.creating.iterable.contains.builders; exports ch.tutteli.atrium.api.infix.en_GB.creating.map; exports ch.tutteli.atrium.api.infix.en_GB.creating.path; exports ch.tutteli.atrium.api.infix.en_GB.workaround; diff --git a/apis/infix-en_GB/extensions/kotlin_1_3/atrium-api-infix-en_GB-kotlin_1_3-jvm/build.gradle b/apis/infix-en_GB/extensions/kotlin_1_3/atrium-api-infix-en_GB-kotlin_1_3-jvm/build.gradle index 6a49d3278..70f0fba41 100644 --- a/apis/infix-en_GB/extensions/kotlin_1_3/atrium-api-infix-en_GB-kotlin_1_3-jvm/build.gradle +++ b/apis/infix-en_GB/extensions/kotlin_1_3/atrium-api-infix-en_GB-kotlin_1_3-jvm/build.gradle @@ -16,7 +16,7 @@ dependencies { } -//TODO should not be necessary https://youtrack.jetbrains.com/issue/KT-28124 +//TODO 0.16.0 or 0.17.0 should not be necessary https://youtrack.jetbrains.com/issue/KT-28124 compileTestKotlin.dependsOn( prefixedProject('core-robstoll-jvm').compileKotlin, prefixedProject('core-robstoll-jvm').processResources, diff --git a/build.gradle b/build.gradle index d092cb3dc..ca3c81fb9 100644 --- a/build.gradle +++ b/build.gradle @@ -17,7 +17,6 @@ buildscript { jacoco_tool_version = '0.8.6' junit_platform_version = '1.7.0' jupiter_version = '5.7.0' - spek_version = '1.1.5' spek2_version = '2.0.12' spekExtensions_version = '1.1.0' spekExtensions = { "ch.tutteli.spek:tutteli-spek-extensions:$spekExtensions_version" } @@ -64,10 +63,9 @@ buildscript { toolProjects = toolProjectsFun // jacoco-multi-project.gradle - def deprecatedProjects = subprojects.findAll { it.name.endsWith("-deprecated") } jacocoMulti = [ sourceProjects: - (subprojects - deprecatedProjects - toolProjectsFun).findAll { + (subprojects - toolProjectsFun).findAll { !it.name.endsWith("-js") && !it.name.endsWith("-android") && // would have two classes with the same name if we add it as project as well, @@ -78,33 +76,20 @@ buildscript { !it.name.startsWith("${rootProject.name}-specs") }, jacocoProjects: - (subprojects - deprecatedProjects - toolProjectsFun).findAll { + (subprojects - toolProjectsFun).findAll { !(it.projectDir.path.contains("/translations/") || it.projectDir.path.contains("\\translations\\")) && !it.name.endsWith("-common") && !it.name.endsWith("-js") && !it.name.endsWith("-android") && it.name != "${rootProject.name}-domain-api-jvm" && - it.name != "${rootProject.name}-domain-robstoll-jvm" && it.name != "${rootProject.name}-core-robstoll-jvm" && it.name != "${rootProject.name}-spec" && !it.name.startsWith("${rootProject.name}-specs") && - //TODO remove with 1.0.0 - it.name != "${rootProject.name}-assertions" && - it.name != "${rootProject.name}-core-api-deprecated" && - it.name != "${rootProject.name}-core-robstoll-deprecated" && - it.name != "${rootProject.name}-domain-api-deprecated" + //TODO remove with 0.17.0 + it.name != "${rootProject.name}-domain-robstoll-jvm" && + it.name != "${rootProject.name}-domain-builders-jvm" } ] - - //TODO dependencies no longer required once all specs are with spek2 where they are set via spek plugin - spekDep = { closure -> - delegate = closure - testRuntimeOnly "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" - testRuntimeOnly "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" - testImplementation "org.spekframework.spek2:spek-dsl-jvm:$spek2_version", excludeKotlin - testRuntimeOnly "org.spekframework.spek2:spek-runner-junit5:$spek2_version", excludeKotlin - } - } repositories { @@ -273,7 +258,7 @@ configure(subprojects - bundleSmokeTests - toolProjects) { subproject -> configure(jacocoMulti.jacocoProjects + getAndroidProjects()) { apply plugin: 'ch.tutteli.spek' - spek.version = '1.1.5' + spek.version = spek2_version dependencies { testImplementation mockito(), excludeKotlin @@ -298,18 +283,6 @@ configure(jacocoMulti.jacocoProjects + getAndroidProjects()) { } } } - - test { - //TODO remove once all specs are migrated to spek2 - options { - if (project.name != 'atrium-spec') { - includeEngines 'spek2' - } - if (!project.name.startsWith('atrium-specs')) { - includeEngines 'spek' - } - } - } } configure(subprojects - toolProjects) { @@ -350,13 +323,6 @@ configure(bundleSmokeTests) { dependencies { //I don't see how to set up compileTestKotlin with --patch-module, so we have put the module-info.java directly in src/test/kotlin instead testImplementation bundle - //TODO remove once all specs are with spek2 where they are set via spek plugin - spekDep(delegate) - } - } else { - //TODO remove once all specs are with spek2 where they are set via spek plugin - dependencies { - spekDep(delegate) } } } @@ -409,7 +375,10 @@ def createRegisterJsServicesTask(String projectName, String packageName, Functio } createRegisterJsServicesTask('core-robstoll-js', 'ch.tutteli.atrium.core.robstoll') { true } -createRegisterJsServicesTask('domain-robstoll-kotlin_1_3-js', 'ch.tutteli.atrium.domain.kotlin_1_3') { true } + +createRegisterJsServicesTask('verbs-internal-js', 'ch.tutteli.atrium.verbs.internal') { true } +//TODO remove with 0.17.0 +createRegisterJsServicesTask('domain-builders-js', 'ch.tutteli.atrium.domain.builders') { true } createRegisterJsServicesTask('domain-robstoll-js', 'ch.tutteli.atrium.domain.robstoll') { !(it in [ 'ch.tutteli.atrium.domain.creating.BigDecimalAssertions', @@ -423,8 +392,6 @@ createRegisterJsServicesTask('domain-robstoll-js', 'ch.tutteli.atrium.domain.rob 'ch.tutteli.atrium.domain.creating.ChronoZonedDateTimeAssertions' ]) } -createRegisterJsServicesTask('domain-builders-js', 'ch.tutteli.atrium.domain.builders') { true } -createRegisterJsServicesTask('verbs-internal-js', 'ch.tutteli.atrium.verbs.internal') { true } List projectNamesToProject(String[] names) { names.collect { projectName -> prefixedProject(projectName) } @@ -479,11 +446,7 @@ createJsTestTask( 'core-robstoll-lib-js', 'api-fluent-en_GB-js', 'api-infix-en_GB-js', - 'fluent-en_GB-js', - //TODO remove with 1.0.0 - 'cc-de_CH-robstoll-js', - 'cc-en_GB-robstoll-js', - 'cc-infix-en_GB-robstoll-js', + 'fluent-en_GB-js' ) def useJupiter(String... projectNames) { @@ -503,9 +466,6 @@ useJupiter( 'core-api-jvm', 'api-fluent-en_GB-jvm', 'api-infix-en_GB-jvm', - 'cc-de_CH-robstoll-jvm', - 'cc-en_GB-robstoll-jvm', - 'cc-infix-en_GB-robstoll-jvm', ) def buildNonDeprecatedJvm = task('buildNonDeprecatedJvm', group: 'build', description: 'builds all JVM modules') diff --git a/bundles/fluent-en_GB/atrium-fluent-en_GB-jvm/build.gradle b/bundles/fluent-en_GB/atrium-fluent-en_GB-jvm/build.gradle index 7b58b830f..d56d7f4c5 100644 --- a/bundles/fluent-en_GB/atrium-fluent-en_GB-jvm/build.gradle +++ b/bundles/fluent-en_GB/atrium-fluent-en_GB-jvm/build.gradle @@ -10,7 +10,4 @@ dependencies { runtimeOnly prefixedProject('domain-robstoll-jvm') runtimeOnly prefixedProject('core-robstoll-jvm') - - //TODO remove once all specs are with spek2 where they are set via spek plugin - spekDep(delegate) } diff --git a/bundles/fluent-en_GB/atrium-fluent-en_GB-jvm/src/test/kotlin/custom/SmokeSpec.kt b/bundles/fluent-en_GB/atrium-fluent-en_GB-jvm/src/test/kotlin/custom/SmokeSpec.kt index dc2f2c771..fb369e6c6 100644 --- a/bundles/fluent-en_GB/atrium-fluent-en_GB-jvm/src/test/kotlin/custom/SmokeSpec.kt +++ b/bundles/fluent-en_GB/atrium-fluent-en_GB-jvm/src/test/kotlin/custom/SmokeSpec.kt @@ -31,9 +31,8 @@ object SmokeSpec : Spek({ } }) -@Suppress("DEPRECATION") fun Expect.isEven() = - createAndAddAssertion(DescriptionBasic.IS, Text("an even number")) { subject % 2 == 0 } + createAndAddAssertion(DescriptionBasic.IS, Text("an even number")) { it % 2 == 0 } fun Expect.isMultipleOf(base: Int) = addAssertion(_isMultipleOf(this, base)) diff --git a/bundles/fluent-en_GB/extensions/atrium-fluent-en_GB-smoke-test-kotlin_1_3/build.gradle b/bundles/fluent-en_GB/extensions/atrium-fluent-en_GB-smoke-test-kotlin_1_3/build.gradle index f0f65dfa3..cf6eddc31 100644 --- a/bundles/fluent-en_GB/extensions/atrium-fluent-en_GB-smoke-test-kotlin_1_3/build.gradle +++ b/bundles/fluent-en_GB/extensions/atrium-fluent-en_GB-smoke-test-kotlin_1_3/build.gradle @@ -7,5 +7,4 @@ dependencies { //I don't see how to set up compileTestKotlin with --patch-module, so we have put the module-info.java directly in src/test/kotlin instead testImplementation prefixedProject('fluent-en_GB-jvm') testImplementation prefixedProject('api-fluent-en_GB-kotlin_1_3-jvm') - testRuntimeOnly prefixedProject('domain-robstoll-kotlin_1_3-jvm') } diff --git a/bundles/infix-en_GB/atrium-infix-en_GB-jvm/build.gradle b/bundles/infix-en_GB/atrium-infix-en_GB-jvm/build.gradle index b8296a9b4..e422ce8f7 100644 --- a/bundles/infix-en_GB/atrium-infix-en_GB-jvm/build.gradle +++ b/bundles/infix-en_GB/atrium-infix-en_GB-jvm/build.gradle @@ -10,7 +10,4 @@ dependencies { runtimeOnly prefixedProject('domain-robstoll-jvm') runtimeOnly prefixedProject('core-robstoll-jvm') - - //TODO remove once all specs are with spek2 where they are set via spek plugin - spekDep(delegate) } diff --git a/bundles/infix-en_GB/extensions/atrium-infix-en_GB-smoke-test-kotlin_1_3/build.gradle b/bundles/infix-en_GB/extensions/atrium-infix-en_GB-smoke-test-kotlin_1_3/build.gradle index d5bfa324b..8b67718a2 100644 --- a/bundles/infix-en_GB/extensions/atrium-infix-en_GB-smoke-test-kotlin_1_3/build.gradle +++ b/bundles/infix-en_GB/extensions/atrium-infix-en_GB-smoke-test-kotlin_1_3/build.gradle @@ -7,5 +7,4 @@ dependencies { //I don't see how to set up compileTestKotlin with --patch-module, so we have put the module-info.java directly in src/test/kotlin instead testImplementation prefixedProject('infix-en_GB-jvm') testImplementation prefixedProject('api-infix-en_GB-kotlin_1_3-jvm') - testRuntimeOnly prefixedProject('domain-robstoll-kotlin_1_3-jvm') } diff --git a/core/api/atrium-core-api-common/src/main/kotlin/ch/tutteli/atrium/assertions/BasicDescriptiveAssertion.kt b/core/api/atrium-core-api-common/src/main/kotlin/ch/tutteli/atrium/assertions/BasicDescriptiveAssertion.kt index 3e711ad6b..99f7dbee1 100644 --- a/core/api/atrium-core-api-common/src/main/kotlin/ch/tutteli/atrium/assertions/BasicDescriptiveAssertion.kt +++ b/core/api/atrium-core-api-common/src/main/kotlin/ch/tutteli/atrium/assertions/BasicDescriptiveAssertion.kt @@ -34,7 +34,7 @@ constructor( * @param representation The [BasicDescriptiveAssertion.representation]. * @param holds Determines whether [BasicDescriptiveAssertion.holds] or not */ - @Suppress("DEPRECATION" /* TODO remove with 1.0.0 */) + @Suppress("DEPRECATION" /* TODO remove with 0.16.0 */) @Deprecated( "Use `AssertImpl.builder.descriptive` instead, will be made `internal` with 1.0.0", ReplaceWith( @@ -50,13 +50,5 @@ constructor( /** * @suppress */ - override fun toString() = "$description: $representation (holds=${safeHoldsForToString()})" - - private fun safeHoldsForToString(): String = - //TODO remove try-catch with 1.0.0, should no longer be necessary - try { - holds().toString() - } catch (@Suppress("DEPRECATION") e: ch.tutteli.atrium.creating.PlantHasNoSubjectException) { - "PlantHasNoSubjectException" - } + override fun toString() = "$description: $representation (holds=${holds().toString()})" } diff --git a/core/api/atrium-core-api-common/src/main/kotlin/ch/tutteli/atrium/assertions/builders/impl/descriptiveWithFailureHint/defaultImpls.kt b/core/api/atrium-core-api-common/src/main/kotlin/ch/tutteli/atrium/assertions/builders/impl/descriptiveWithFailureHint/defaultImpls.kt index 23899af71..38f3f225d 100644 --- a/core/api/atrium-core-api-common/src/main/kotlin/ch/tutteli/atrium/assertions/builders/impl/descriptiveWithFailureHint/defaultImpls.kt +++ b/core/api/atrium-core-api-common/src/main/kotlin/ch/tutteli/atrium/assertions/builders/impl/descriptiveWithFailureHint/defaultImpls.kt @@ -64,13 +64,7 @@ internal class FinalStepImpl( ) : DescriptiveAssertionWithFailureHint.FinalStep { override fun build(): Assertion { - //TODO remove try catch with 1.0.0, should no longer be necessary - val holds = try { - test() - } catch (@Suppress("DEPRECATION") e: ch.tutteli.atrium.creating.PlantHasNoSubjectException) { - // failure hint does not need to be shown if plant is absent - false - } + val holds = test() return if (holds || !showHint()) { assertionBuilder.createDescriptive(description, representation) { holds } } else { diff --git a/core/api/atrium-core-api-common/src/main/kotlin/ch/tutteli/atrium/checking/AssertionChecker.kt b/core/api/atrium-core-api-common/src/main/kotlin/ch/tutteli/atrium/checking/AssertionChecker.kt deleted file mode 100644 index 977eb07f2..000000000 --- a/core/api/atrium-core-api-common/src/main/kotlin/ch/tutteli/atrium/checking/AssertionChecker.kt +++ /dev/null @@ -1,31 +0,0 @@ -package ch.tutteli.atrium.checking - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.reporting.LazyRepresentation -import ch.tutteli.atrium.reporting.translating.Translatable - -/** - * Checks given [Assertion]s and reports if one of them fails. - */ -@Deprecated("Do no longer use AssertionCheckers, use a specialised Expect instead; e.g. DelegatingExpect, FeatureExpect; will be removed with 1.0.0") -interface AssertionChecker { - - /** - * Checks given [assertions] and reports if one of them fails (does not hold). - * - * @param assertionVerb The assertion verb which will be used in reporting. - * @param representation The representation of the subject for which the [assertions] - * have been created. - * @param assertions The [assertions] which shall be checked. - * - * @throws AssertionError An implementation is allowed to throw [AssertionError] if an assertion fails. - */ - fun check(assertionVerb: Translatable, representation: Any?, assertions: List) - - @Deprecated( - "Use the overload which expects a representation instead of a representationProvider, use LazyRepresentation if needed; will be removed with 1.0.0", - ReplaceWith("check(assertionVerb, LazyRepresentation(representationProvider), assertions)") - ) - fun check(assertionVerb: Translatable, representationProvider: () -> Any, assertions: List) = - check(assertionVerb, LazyRepresentation(representationProvider), assertions) -} diff --git a/core/api/atrium-core-api-common/src/main/kotlin/ch/tutteli/atrium/core/CoreFactory.kt b/core/api/atrium-core-api-common/src/main/kotlin/ch/tutteli/atrium/core/CoreFactory.kt index 023142cac..3beae6008 100644 --- a/core/api/atrium-core-api-common/src/main/kotlin/ch/tutteli/atrium/core/CoreFactory.kt +++ b/core/api/atrium-core-api-common/src/main/kotlin/ch/tutteli/atrium/core/CoreFactory.kt @@ -52,400 +52,6 @@ expect interface CoreFactory : CoreFactoryCommon */ interface CoreFactoryCommon { - /** - * Creates a [ReportingAssertionPlant] which checks and reports added [Assertion]s. - * - * It creates a [newThrowingAssertionChecker] based on the given [reporter] for assertion checking, - * uses [subjectProvider] as [AssertionPlantWithCommonFields.CommonFields.subjectProvider] but also as - * [AssertionPlantWithCommonFields.CommonFields.representationProvider]. - * Notice that [evalOnce] is applied to the given [subjectProvider] to avoid undesired side effects - * (the provider is most likely called more than once). - * - * @param assertionVerb The assertion verb which will be used inter alia in reporting - * (see [AssertionPlantWithCommonFields.CommonFields.assertionVerb]). - * @param subjectProvider Used as [AssertionPlantWithCommonFields.CommonFields.subjectProvider] but - * also as [AssertionPlantWithCommonFields.CommonFields.representationProvider]. - * @param reporter The reporter which will be used for a [newThrowingAssertionChecker]. - * - * @return The newly created assertion plant. - */ - @Suppress("DEPRECATION") - @Deprecated( - "Switch to Expect instead of Assert, thus use newReportingAssertionContainer instead; will be removed with 1.0.0", - ReplaceWith( - "ExpectBuilder.forSubject(\n" + - "// define the subject here instead of subjectProvider(), for instance just `subject` instead of `{ subject }`\n" + - "// in case you have a transformation from an existing subject, then use this.maybeSubject.map { transform(it) }\n" + - "subjectProvider()\n" + - ")\n" + - ".withVerb(assertionVerb)\n" + - ".withOptions { withReporter(reporter) }\n" + - ".build()", - "ch.tutteli.atrium.domain.builders.reporting.ExpectBuilder" - ) - ) - fun newReportingPlant( - assertionVerb: Translatable, - subjectProvider: () -> T, - reporter: Reporter - ): ReportingAssertionPlant = newReportingPlant( - assertionVerb, subjectProvider, newThrowingAssertionChecker(reporter) - ) - - /** - * Creates a [ReportingAssertionContainer] which delegates checking and reporting [Assertion]s to the given - * [originalAssertionHolder]. - * - * In Detail: it uses [SHOULD_NOT_BE_SHOWN_TO_THE_USER_BUG_TRANSLATABLE] as assertion verb and creates an - * delegating [ch.tutteli.atrium.checking.AssertionChecker] via [newDelegatingAssertionChecker]. - * - * @param maybeSubject Used as [ReportingAssertionContainer.maybeSubject] and - * also as representation in reporting. - * - * @return The newly created assertion container. - */ - @Suppress("DeprecatedCallableAddReplaceWith", "DEPRECATION") - @Deprecated( - "Use DelegatingExpect(...) instead which does not use an AssertionChecker; will be removed with 1.0.0", - ReplaceWith("DelegatingExpect(originalAssertionHolder, maybeSubject)") - ) - fun newDelegatingReportingAssertionContainer( - originalAssertionHolder: AssertionHolder, - maybeSubject: Option - ): Expect = DelegatingExpect(originalAssertionHolder, maybeSubject) - - /** - * Creates a [ReportingAssertionContainer] which checks and reports added [Assertion]s. - * - * It uses the given [assertionChecker] for assertion checking, uses [maybeSubject] as - * [ReportingAssertionContainer.maybeSubject] and also as representation in reporting. - * - * @param assertionVerb The assertion verb which will be used inter alia in reporting. - * @param maybeSubject Used as [ReportingAssertionContainer.maybeSubject] and - * also as representation in reporting. - * @param assertionChecker The checker which will be used to check [Assertion]s. - * (see [ReportingAssertionContainer.AssertionCheckerDecorator.assertionChecker]). - * - * @return The newly created assertion container. - */ - @Suppress("DeprecatedCallableAddReplaceWith", "DEPRECATION") - @Deprecated("Use RootExpect(...) or DelegatingExpect(..) or FeatureExpect(...) which all do not use a deprecated AssertionChecker; will be removed with 1.0.0") - fun newReportingAssertionContainer( - assertionVerb: Translatable, - maybeSubject: Option, - assertionChecker: ch.tutteli.atrium.checking.AssertionChecker - ): ReportingAssertionContainer { - return newReportingAssertionContainer( - ReportingAssertionContainer.AssertionCheckerDecorator.create( - assertionVerb, - maybeSubject, - maybeSubject.getOrElse { Text(SHOULD_NOT_BE_SHOWN_TO_THE_USER_BUG) }, - assertionChecker - ) - ) - } - - /** - * Creates a [ReportingAssertionPlant] which checks and reports added [Assertion]s. - * - * It uses the given [assertionChecker] for assertion checking, uses [subjectProvider] as - * [AssertionPlantWithCommonFields.CommonFields.subjectProvider] but also as - * [AssertionPlantWithCommonFields.CommonFields.representationProvider]. - * Notice that [evalOnce] is applied to the given [subjectProvider] to avoid side effects - * (the provider is most likely called more than once). - * - * @param assertionVerb The assertion verb which will be used inter alia in reporting - * (see [AssertionPlantWithCommonFields.CommonFields.assertionVerb]). - * @param subjectProvider Used as [AssertionPlantWithCommonFields.CommonFields.subjectProvider] but - * also as [AssertionPlantWithCommonFields.CommonFields.representationProvider]. - * @param assertionChecker The checker which will be used to check [Assertion]s. - * (see [AssertionPlantWithCommonFields.CommonFields.assertionChecker]). - * - * @return The newly created assertion plant. - */ - @Suppress("DEPRECATION") - @Deprecated( - "Switch to Expect instead of Assert, thus use newReportingAssertionContainer instead; will be removed with 1.0.0", - ReplaceWith( - "this.newReportingAssertionContainer(\n" + - "assertionVerb,\n" + - "// define the subject here instead of subjectProvider(), for instance just `subject` instead of `{ subject }`\n" + - "// in case you have a transformation from an existing subject, then use this.maybeSubject.map { transform(it) }\n" + - "Some(subjectProvider()),\n" + - "assertionChecker\n" + - ")", - "ch.tutteli.atrium.core.coreFactory", - "ch.tutteli.atrium.core.Some", - "ch.tutteli.atrium.domain.builders.ExpectImpl" - ) - ) - fun newReportingPlant( - assertionVerb: Translatable, - subjectProvider: () -> T, - assertionChecker: ch.tutteli.atrium.checking.AssertionChecker - ): ReportingAssertionPlant { - val evalOnceSubjectProvider = subjectProvider.evalOnce() - return newReportingPlant( - AssertionPlantWithCommonFields.CommonFields( - assertionVerb, - evalOnceSubjectProvider, - evalOnceSubjectProvider, - assertionChecker, - Text.NULL - ) - ) - } - - /** - * Creates a [ReportingAssertionContainer] which checks and reports added [Assertion]s. - * - * It uses the given [assertionCheckerDecorator] for assertion checking. - * - * @param assertionCheckerDecorator The [ReportingAssertionContainer.AssertionCheckerDecorator] which will - * be used for assertion checking. - * - * @return The newly created assertion container. - */ - @Suppress("DeprecatedCallableAddReplaceWith", "DEPRECATION") - @Deprecated("Use RootExpect(...) or DelegatingExpect(..) or FeatureExpect(...) which all do not use a deprecated AssertionChecker; will be removed with 1.0.0") - fun newReportingAssertionContainer( - assertionCheckerDecorator: ReportingAssertionContainer.AssertionCheckerDecorator - ): ReportingAssertionContainer - - /** - * Creates a [ReportingAssertionPlant] which checks and reports added [Assertion]s. - * - * It uses the [AssertionPlantWithCommonFields.CommonFields.assertionChecker] of the given [commonFields] for - * assertion checking - * - * @param commonFields The commonFields for the new assertion plant. - * - * @return The newly created assertion plant. - */ - @Suppress("DEPRECATION") - @Deprecated( - "Switch to Expect instead of Assert, thus use newReportingAssertionContainer instead; will be removed with 1.0.0", - ReplaceWith("this.newReportingAssertionContainer(commonFields)") - ) - fun newReportingPlant( - commonFields: AssertionPlantWithCommonFields.CommonFields - ): ReportingAssertionPlant - - /** - * Creates a [ReportingAssertionPlant] which [AssertionPlant.addAssertionsCreatedBy] the - * given [assertionCreator] lambda where the created [Assertion]s are added as a group and usually (depending on - * the configured [Reporter]) reported as a whole. - * - * It creates a [CoreFactory.newThrowingAssertionChecker] based on the given [reporter] for assertion checking, - * uses [subjectProvider] as [AssertionPlantWithCommonFields.CommonFields.subjectProvider] but also as - * [AssertionPlantWithCommonFields.CommonFields.representationProvider]. - * Notice that [evalOnce] is applied to the given [subjectProvider] to avoid side effects - * (the provider is most likely called more than once). - * - * @param assertionVerb The assertion verb which will be used inter alia in reporting - * (see [AssertionPlantWithCommonFields.CommonFields.assertionVerb]). - * @param subjectProvider Used as [AssertionPlantWithCommonFields.CommonFields.subjectProvider] but - * also as [AssertionPlantWithCommonFields.CommonFields.representationProvider]. - * @param reporter The reporter which will be used for a [newThrowingAssertionChecker]. - * @param assertionCreator The - * - * @return The newly created [AssertionPlant] which can be used to postulate further assertions. - * - * @throws AssertionError The newly created [AssertionPlant] might throw an [AssertionError] in case a - * created [Assertion] does not hold. - */ - @Suppress("DEPRECATION") - @Deprecated( - "Switch to Expect instead of Assert, thus use newReportingAssertionContainer instead; will be removed with 1.0.0", - ReplaceWith( - "ExpectBuilder.forSubject(\n" + - "// !!!! in case you define an assertion verb function, remove it entirely, this is no longer required !!!! otherwise:\n" + - "// define the subject here instead of subjectProvider(), for instance just `subject` instead of `{ subject }`\n" + - "// in case you have a transformation from an existing subject, then use this.maybeSubject.map { transform(it) }\n" + - "subjectProvider()\n" + - ")\n" + - ".withVerb(assertionVerb)\n" + - ".withOptions { withReporter(reporter) }\n" + - ".build()\n" + - ".addAssertionsCreatedBy(assertionCreator)", - "ch.tutteli.atrium.domain.builders.reporting.ExpectBuilder" - ) - ) - fun newReportingPlantAndAddAssertionsCreatedBy( - assertionVerb: Translatable, - subjectProvider: () -> T, - reporter: Reporter, - assertionCreator: AssertionPlant.() -> Unit - ) = newReportingPlant(assertionVerb, subjectProvider, reporter) - .addAssertionsCreatedBy(assertionCreator) - - /** - * Creates a [ReportingAssertionPlantNullable] which is the entry point for assertions about nullable types. - * - * It uses the [AssertionPlantWithCommonFields.CommonFields.assertionChecker] of the given [commonFields] for - * assertion checking. - * - * @param commonFields The commonFields for the new assertion plant. - * - * @return The newly created assertion plant. - */ - @Suppress("DEPRECATION") - @Deprecated( - "Switch to Expect instead of Assert, thus use newReportingAssertionContainer instead; will be removed with 1.0.0", - ReplaceWith("this.newReportingAssertionContainer(commonFields)") - ) - fun newReportingPlantNullable(commonFields: AssertionPlantWithCommonFields.CommonFields): ReportingAssertionPlantNullable - - /** - * Creates a [CheckingAssertionPlant] which provides a method to check whether - * [allAssertionsHold][CheckingAssertionPlant.allAssertionsHold]. - * - * @param subjectProvider The provider which provides the subject for which this plant will - * create and check [Assertion]s. - * - * @return The newly created assertion plant. - */ - @Suppress("DEPRECATION") - @Deprecated( - "Switch from Assert to Expect and use newCollectingAssertionContainer instead, there is no CheckingAssertionContainer, you can use `getAsssertions.holds()`; will be removed with 1.0.0", - ReplaceWith( - "this.newCollectingAssertionContainer(\n" + - "// define the subject here instead of subjectProvider(), for instance just `subject` instead of `{ subject }`\n" + - "// in case you have a transformation from an existing subject, then use this.maybeSubject.map { transform(it) }\n" + - "Some(subjectProvider())\n" + - ")", - "ch.tutteli.atrium.core.Some" - ) - ) - fun newCheckingPlant(subjectProvider: () -> T): CheckingAssertionPlant - - /** - * Creates a [CollectingAssertionContainer] which is intended to be used as receiver object in lambdas so that it - * can collect [Assertion]s created inside the lambda. - * - * @param maybeSubject Either [Some] wrapping the subject of the current assertion or - * [None] in case a previous subject change was not successful. - * - * @return The newly created assertion container. - */ - @Suppress("DEPRECATION") - @Deprecated( - "Use CollectingExpect instead; will be removed with 1.0.0", - ReplaceWith("(maybeSubject)", "ch.tutteli.atrium.creating.CollectingExpect") - ) - fun newCollectingAssertionContainer(maybeSubject: Option): CollectingAssertionContainer - - /** - * Creates a [CollectingAssertionPlant] which is intended to be used as receiver object in lambdas to - * collect created [Assertion]s inside the lambda. - * - * Notice, that the plant might not provide a [CollectingAssertionPlant.subject] in which case it - * throws a [PlantHasNoSubjectException] if subject is accessed. - * Use [newCheckingPlant] instead if you want to know whether the assertions hold. - * - * @param subjectProvider The function which will either provide the subject for this plant or throw an - * [PlantHasNoSubjectException] in case it cannot provide it. A [CollectingAssertionPlant] should evaluate the - * [subjectProvider] only once. - * - * @return The newly created assertion plant. - */ - @Suppress("DEPRECATION") - @Deprecated( - "Switch to Expect instead of Assert, thus use newCollectingAssertionContainer instead; will be removed with 1.0.0", - ReplaceWith( - "this.newCollectingAssertionContainer(\n" + - "// define the subject here instead of subjectProvider(), for instance just `subject` instead of `{ subject }`\n" + - "// in case you have a transformation from an existing subject, then use this.maybeSubject.map { transform(it) }\n" + - "Some(subjectProvider())\n" + - ")", - "ch.tutteli.atrium.core.Some" - ) - ) - fun newCollectingPlant(subjectProvider: () -> T): CollectingAssertionPlant - - - /** - * Creates a [CollectingAssertionPlantNullable] which is intended to be used as receiver object in lambdas to - * collect created [Assertion]s inside the lambda. - * - * Notice, that the plant might not provide a [CollectingAssertionPlantNullable.subject] in which case it - * throws a [PlantHasNoSubjectException] if subject is accessed. - * - * @param subjectProvider The function which will either provide the subject for this plant or throw an - * [PlantHasNoSubjectException] in case it cannot provide it. A [CollectingAssertionPlant] should evaluate the - * [subjectProvider] only once. - * - * @return The newly created assertion plant. - */ - @Suppress("DEPRECATION") - @Deprecated( - "Switch to Expect instead of Assert, thus use newCollectingAssertionContainer instead; will be removed with 1.0.0", - ReplaceWith( - "this.newCollectingAssertionContainer(\n" + - "// define the subject here instead of subjectProvider(), for instance just `subject` instead of `{ subject }`\n" + - "// in case you have a transformation from an existing subject, then use this.maybeSubject.map { transform(it) }\n" + - "Some(subjectProvider())\n" + - ")", - "ch.tutteli.atrium.core.Some" - ) - ) - fun newCollectingPlantNullable(subjectProvider: () -> T): CollectingAssertionPlantNullable - - - /** - * Creates an [ch.tutteli.atrium.checking.AssertionChecker] which throws [AtriumError]s in case an assertion fails - * and uses the given [reporter] for reporting. - * - * @param reporter The reporter which is used to report [Assertion]s. - * - * @return The newly created assertion checker. - */ - @Suppress("DEPRECATION") - @Deprecated("Do no longer use AssertionCheckers, use a specialised Expect instead; e.g. DelegatingExpect, FeaturExpect; will be removed with 1.0.0") - fun newThrowingAssertionChecker(reporter: Reporter): ch.tutteli.atrium.checking.AssertionChecker - - /** - * Creates an [ch.tutteli.atrium.checking.AssertionChecker] which creates an [AssertionGroup] of [type][AssertionGroup.type] - * [FeatureAssertionGroupType] instead of checking assertions and delegates this task to the given - * [originalAssertionHolder] by adding (see [AssertionPlant.addAssertion]) the created assertion group to it. - * - * @param originalAssertionHolder The assertion plant to which the created [AssertionGroup] of [type][AssertionGroup.type] - * [FeatureAssertionGroupType] will be [added][AssertionPlant.addAssertion]. - * - * @return The newly created assertion checker. - */ - @Suppress("DEPRECATION") - @Deprecated("Do no longer use AssertionCheckers, use a specialised Expect instead; e.g. DelegatingExpect, FeatureExpect; will be removed with 1.0.0") - fun newFeatureAssertionChecker(originalAssertionHolder: AssertionHolder): ch.tutteli.atrium.checking.AssertionChecker - - /** - * Creates an [ch.tutteli.atrium.checking.AssertionChecker] which delegates the checking of [Assertion]s to the given - * [originalAssertionHolder] by adding (see [AssertionHolder.addAssertion]) the assertions to the given - * [originalAssertionHolder]. - * - * @param originalAssertionHolder The assertion container to which the [Assertion]s will - * be [added][AssertionPlant.addAssertion]. - * - * @return The newly created assertion checker. - */ - @Suppress("DEPRECATION") - @Deprecated("Do no longer use AssertionCheckers, use a specialised Expect instead; e.g. DelegatingExpect, FeatureExpect; will be removed with 1.0.0") - fun newDelegatingAssertionChecker(originalAssertionHolder: AssertionHolder): ch.tutteli.atrium.checking.AssertionChecker - - - /** - * Creates an [ch.tutteli.atrium.checking.AssertionChecker] which delegates the checking of [Assertion]s to the given [subjectPlant] - * by adding (see [AssertionPlant.addAssertion]) the assertions to the given [subjectPlant]. - * - * @param subjectPlant The assertion plant to which the [Assertion]s will be [added][AssertionPlant.addAssertion]. - * - * @return The newly created assertion checker. - */ - @Suppress("DEPRECATION") - @Deprecated("Do no longer use AssertionCheckers, use a specialised Expect instead; e.g. DelegatingExpect, FeatureExpect; will be removed with 1.0.0") - fun newDelegatingAssertionChecker(subjectPlant: BaseAssertionPlant): ch.tutteli.atrium.checking.AssertionChecker - - /** * Creates a [MethodCallFormatter] which represents arguments of a method call by using their [Any.toString] * representation with the exception of: @@ -742,98 +348,3 @@ interface CoreFactoryCommon { otherAdjusters: List ): AtriumErrorAdjuster } - - -/** - * Creates a [ReportingAssertionPlantNullable] which is the entry point for assertions about nullable types. - * - * It creates a [CoreFactory.newThrowingAssertionChecker] based on the given [reporter] for assertion checking, - * uses [subjectProvider] as [AssertionPlantWithCommonFields.CommonFields.subjectProvider] but also as - * [AssertionPlantWithCommonFields.CommonFields.representationProvider]. - * Notice that [evalOnce] is applied to the given [subjectProvider] to avoid side effects - * (the provider is most likely called more than once). - * - * @param assertionVerb The assertion verb which will be used inter alia in reporting - * (see [AssertionPlantWithCommonFields.CommonFields.assertionVerb]). - * @param subjectProvider Used as [AssertionPlantWithCommonFields.CommonFields.subjectProvider] but - * also as [AssertionPlantWithCommonFields.CommonFields.representationProvider]. - * @param reporter The reporter which will be used for a [CoreFactory.newThrowingAssertionChecker]. - * - * @return The newly created assertion plant. - */ -@Suppress("DEPRECATION") -@Deprecated( - "Switch to Expect instead of Assert, thus use newReportingAssertionContainer instead; will be removed with 1.0.0", - ReplaceWith( - "ExpectImpl\n" + - ".assertionVerbBuilder(\n" + - "// define the subject here instead of subjectProvider(), for instance just `subject` instead of `{ subject }`\n" + - "// in case you have a transformation from an existing subject, then use this.maybeSubject.map { transform(it) }\n" + - "subjectProvider()\n" + - ")\n" + - ".withVerb(assertionVerb)\n" + - ".withCustomReporter(reporter)\n" + - ".build()", - "ch.tutteli.atrium.domain.builders.ExpectImpl" - ) -) -fun CoreFactoryCommon.newReportingPlantNullable( - assertionVerb: Translatable, - subjectProvider: () -> T, - reporter: Reporter, - nullRepresentation: Any = Text.NULL -): ReportingAssertionPlantNullable = newReportingPlantNullable( - assertionVerb, subjectProvider, newThrowingAssertionChecker(reporter), nullRepresentation -) - -/** - * Creates a [ReportingAssertionPlantNullable] which is the entry point for assertions about nullable types. - * - * It uses the given [assertionChecker] for assertion checking, uses [subjectProvider] as - * [AssertionPlantWithCommonFields.CommonFields.subjectProvider] but also as - * [AssertionPlantWithCommonFields.CommonFields.representationProvider]. - * Notice that [evalOnce] is applied to the given [subjectProvider] to avoid side effects - * (the provider is most likely called more than once). - * - * @param assertionVerb The assertion verb which will be used inter alia in reporting - * (see [AssertionPlantWithCommonFields.CommonFields.assertionVerb]). - * @param subjectProvider Used as [AssertionPlantWithCommonFields.CommonFields.subjectProvider] but - * also as [AssertionPlantWithCommonFields.CommonFields.representationProvider]. - * @param assertionChecker The checker which will be used to check [Assertion]s. - * (see [AssertionPlantWithCommonFields.CommonFields.assertionChecker]). - * - * @return The newly created assertion plant. - */ -@Suppress("DEPRECATION") -@Deprecated( - "Switch to Expect instead of Assert, thus use newReportingAssertionContainer instead; will be removed with 1.0.0", - ReplaceWith( - "this.newReportingAssertionContainer(\n" + - "assertionVerb,\n" + - "// define the subject here instead of subjectProvider(), for instance just `subject` instead of `{ subject }`\n" + - "// in case you have a transformation from an existing subject, then use this.maybeSubject.map { transform(it) }\n" + - "Some(subjectProvider()),\n" + - "assertionChecker\n" + - ")", - "ch.tutteli.atrium.core.coreFactory", - "ch.tutteli.atrium.core.Some", - "ch.tutteli.atrium.domain.builders.ExpectImpl" - ) -) -fun CoreFactoryCommon.newReportingPlantNullable( - assertionVerb: Translatable, - subjectProvider: () -> T, - assertionChecker: ch.tutteli.atrium.checking.AssertionChecker, - nullRepresentation: Any = Text.NULL -): ReportingAssertionPlantNullable { - val evalOnceSubjectProvider = subjectProvider.evalOnce() - return newReportingPlantNullable( - AssertionPlantWithCommonFields.CommonFields( - assertionVerb, - evalOnceSubjectProvider, - evalOnceSubjectProvider, - assertionChecker, - nullRepresentation - ) - ) -} diff --git a/core/api/atrium-core-api-common/src/main/kotlin/ch/tutteli/atrium/creating/Assert.kt b/core/api/atrium-core-api-common/src/main/kotlin/ch/tutteli/atrium/creating/Assert.kt deleted file mode 100644 index 6ec3a4913..000000000 --- a/core/api/atrium-core-api-common/src/main/kotlin/ch/tutteli/atrium/creating/Assert.kt +++ /dev/null @@ -1,16 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove file with 1.0.0 */) - -package ch.tutteli.atrium.creating - -/** - * Type alias for [AssertionPlant] which should be used in API modules. - */ -@Deprecated("Switch from Assert to Expect; will be removed with 1.0.0") -typealias Assert = AssertionPlant - -/** - * DSL Marker for [AssertionPlant] (and its type alias [Assert]). - */ -@DslMarker -@Deprecated("Switch from AssertMarker to ExpectMarker; will be removed with 1.0.0") -annotation class AssertMarker diff --git a/core/api/atrium-core-api-common/src/main/kotlin/ch/tutteli/atrium/creating/AssertionPlant.kt b/core/api/atrium-core-api-common/src/main/kotlin/ch/tutteli/atrium/creating/AssertionPlant.kt deleted file mode 100644 index 566c567bd..000000000 --- a/core/api/atrium-core-api-common/src/main/kotlin/ch/tutteli/atrium/creating/AssertionPlant.kt +++ /dev/null @@ -1,50 +0,0 @@ -@file:Suppress("DEPRECATION" /* will be removed with 1.0.0 */) - -package ch.tutteli.atrium.creating - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.assertions.DescriptiveAssertion -import ch.tutteli.atrium.assertions.builders.assertionBuilder -import ch.tutteli.atrium.reporting.translating.Translatable - -/** - * Represents a plant for [Assertion]s based on a non nullable [subject]. - * - * It is the entry point for most assertion functions and provides only a reduced set of [ReportingAssertionPlant] - * which is actually created when a user of Atrium is using an assertion verb function. - * - * @param T The type of the [subject] of this [AssertionPlant]. - */ -@AssertMarker -@Deprecated("Switch from AssertionPlant to Expect; will be removed with 1.0.0", ReplaceWith("Expect")) -interface AssertionPlant : BaseAssertionPlant> { - - /** - * Adds the assertions created by the [assertionCreator] lambda to this plant. - * - * @param assertionCreator The receiver function which might create and add assertions to this plant. - * - * @return This plant to support a fluent API. - * - * @throws AssertionError Might throw an [AssertionError] in case [Assertion]s are immediately - * evaluated (see [ReportingAssertionPlant]). - */ - fun addAssertionsCreatedBy(assertionCreator: AssertionPlant.() -> Unit): AssertionPlant - - /** - * Creates a [DescriptiveAssertion] based on the given [description], [expected] and [test] and - * [adds][addAssertion] it to the plant. - * - * @param description The description of the assertion, e.g., `is less than`. - * @param expected The expected value, e.g., `5` - * @param test Indicates whether the assertion holds or fails. - * - * @return This plant to support a fluent API. - * - * @throws AssertionError Might throw an [AssertionError] in case [Assertion]s are immediately - * evaluated (see [ReportingAssertionPlant]). - */ - fun createAndAddAssertion(description: Translatable, expected: Any, test: () -> Boolean): AssertionPlant = - addAssertion(assertionBuilder.createDescriptive(description, expected, test)) -} - diff --git a/core/api/atrium-core-api-common/src/main/kotlin/ch/tutteli/atrium/creating/AssertionPlantNullable.kt b/core/api/atrium-core-api-common/src/main/kotlin/ch/tutteli/atrium/creating/AssertionPlantNullable.kt deleted file mode 100644 index 0a32a6d62..000000000 --- a/core/api/atrium-core-api-common/src/main/kotlin/ch/tutteli/atrium/creating/AssertionPlantNullable.kt +++ /dev/null @@ -1,15 +0,0 @@ -@file:Suppress("DEPRECATION" /* will be removed with 1.0.0 */) - -package ch.tutteli.atrium.creating - -/** - * Represents an assertion plant for nullable types. - * - * It is the entry point for two assertion functions, the first makes the assumption that [subject] is `null` - * and the other that [subject] is not `null`. It only provides a reduced set of [ReportingAssertionPlantNullable] - * which is actually created when a user of Atrium is using an assertion verb function. - * - * @param T The type of the [subject] of this [AssertionPlant]. - */ -@Deprecated("Switch from AssertionPlantNullable to Expect; will be removed with 1.0.0", ReplaceWith("Expect")) -interface AssertionPlantNullable : BaseAssertionPlant> diff --git a/core/api/atrium-core-api-common/src/main/kotlin/ch/tutteli/atrium/creating/AssertionPlantWithCommonFields.kt b/core/api/atrium-core-api-common/src/main/kotlin/ch/tutteli/atrium/creating/AssertionPlantWithCommonFields.kt deleted file mode 100644 index a5bbc030a..000000000 --- a/core/api/atrium-core-api-common/src/main/kotlin/ch/tutteli/atrium/creating/AssertionPlantWithCommonFields.kt +++ /dev/null @@ -1,78 +0,0 @@ -@file:Suppress("DEPRECATION" /* will be removed with 1.0.0 */) - -package ch.tutteli.atrium.creating - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.checking.AssertionChecker -import ch.tutteli.atrium.core.evalOnce -import ch.tutteli.atrium.creating.AssertionPlantWithCommonFields.CommonFields -import ch.tutteli.atrium.reporting.translating.Translatable - -/** - * An assertion plant which has [CommonFields]. - * - * @param T The type of the [AssertionPlant.subject][SubjectProvider.subject]. - */ -@Deprecated("Switch from Assert to Expect, use ReportingAssertionContainer.AssertionCheckerDecorator instead; will be removed with 1.0.0") -interface AssertionPlantWithCommonFields { - - /** - * [CommonFields] of this plant. - */ - val commonFields: CommonFields - - /** - * Common fields of an assertion plant. - * - * @param T The type of the [AssertionPlant.subject][SubjectProvider.subject]. - * - * @property assertionVerb The assertion verb which will be used inter alia in reporting. - * @property assertionChecker The checker which will be used to check [Assertion]s. - * @property subjectProvider Provides the [AssertionPlant.subject][SubjectProvider.subject] for which this plant will - * create/check [Assertion]s. - * @property nullRepresentation The representation used in reporting in case [representationProvider] - * cannot provide a representation, provides `null` respectively. - * - * @constructor - * @param assertionVerb The assertion verb which will be used inter alia in reporting. - * @param subjectProvider Provides the [AssertionPlant.subject][SubjectProvider.subject] for which this plant will create/check [Assertion]s. - * @param assertionChecker The checker which will be used to check [Assertion]s. - * @property nullRepresentation The representation used in reporting in case [representationProvider] - * cannot provide a representation, provides `null` respectively. - * - */ - class CommonFields( - val assertionVerb: Translatable, - val subjectProvider: () -> T, - private val representationProvider: () -> Any?, - val assertionChecker: AssertionChecker, - private val nullRepresentation: Any - ) { - private val representation: () -> Any by lazy { - { representationProvider() ?: nullRepresentation } - } - - @Deprecated( - "Use the overload with a subject provider instead. This constructor will be removed with 1.0.0", - ReplaceWith("this.CommonFields(assertionVerb, { subject }.evalOnce(), { subject }.evalOnce() /* better assign to a variable than duplicating it, also this way subject gets called twice */, assertionChecker, nullRepresentation)") - ) - constructor( - assertionVerb: Translatable, - subject: T, - assertionChecker: AssertionChecker, - nullRepresentation: Any - ) : this(assertionVerb, { subject }.evalOnce(), { subject }.evalOnce(), assertionChecker, nullRepresentation) - - /** - * Uses [assertionChecker] to check the given [assertions] (see [AssertionChecker.check]). - * - * @param assertions The assertions which shall be checked. - * - * @throws AssertionError Might throw an [AssertionError] if any of the [assertions] does not hold. - */ - fun check(assertions: List) { - @Suppress("DEPRECATION") - assertionChecker.check(assertionVerb, representation, assertions) - } - } -} diff --git a/core/api/atrium-core-api-common/src/main/kotlin/ch/tutteli/atrium/creating/BaseAssertionPlant.kt b/core/api/atrium-core-api-common/src/main/kotlin/ch/tutteli/atrium/creating/BaseAssertionPlant.kt deleted file mode 100644 index f9f8aed9f..000000000 --- a/core/api/atrium-core-api-common/src/main/kotlin/ch/tutteli/atrium/creating/BaseAssertionPlant.kt +++ /dev/null @@ -1,48 +0,0 @@ -@file:Suppress("DEPRECATION" /* will be removed with 1.0.0 */) - -package ch.tutteli.atrium.creating - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.core.None -import ch.tutteli.atrium.core.Option -import ch.tutteli.atrium.core.Some - -/** - * Represents a plant for [Assertion]s and offers methods to [addAssertion]s to this plant. - * - * It defines what [AssertionPlant] and [AssertionPlantNullable] have in common. However it is typically not used as - * entry point for assertion functions. Most of the time you want to define an assertion function for [AssertionPlant], - * [Assert] respectively ([Assert] is a `typealias` of [AssertionPlant]). - * - * @param T The type of the [subject] of this [BaseAssertionPlant]. - * @param A A subtype of [BaseAssertionPlant] which is used in the fluent style API and as self type. - */ -@Deprecated("Switch from Assert to Expect; will be removed with 1.0.0") -interface BaseAssertionPlant> : SubjectProvider { - - /** - * The provider which provides [subject]. - */ - val subjectProvider: () -> T - - override val maybeSubject: Option - get() { - return try { - Some(subject) - } catch (e: PlantHasNoSubjectException) { - None - } - } - - /** - * Adds the given [assertion] to this plant. - * - * @param assertion The assertion which will be added to this plant. - * - * @return This plant to support a fluent API. - * - * @throws AssertionError Might throw an [AssertionError] in case [Assertion]s are immediately - * evaluated (see [ReportingAssertionPlant]). - */ - override fun addAssertion(assertion: Assertion): A -} diff --git a/core/api/atrium-core-api-common/src/main/kotlin/ch/tutteli/atrium/creating/BaseCollectingAssertionPlant.kt b/core/api/atrium-core-api-common/src/main/kotlin/ch/tutteli/atrium/creating/BaseCollectingAssertionPlant.kt deleted file mode 100644 index 49ba34796..000000000 --- a/core/api/atrium-core-api-common/src/main/kotlin/ch/tutteli/atrium/creating/BaseCollectingAssertionPlant.kt +++ /dev/null @@ -1,37 +0,0 @@ -@file:Suppress("DEPRECATION" /* will be removed with 1.0.0 */) - -package ch.tutteli.atrium.creating - -import ch.tutteli.atrium.assertions.Assertion - -/** - * Represents a [BaseAssertionPlant] which is intended to serve as receiver object for lambdas which create - * [Assertion]s, in which this assertion plant collects the so created assertions. - * - * In contrast to [BaseReportingAssertionPlant], this plant does not offer reporting capabilities. - * It merely offers a method to [getAssertions] (the collected ones). - * - * @param T The type of the [subject] of this plant. - * @param A A subtype of [BaseAssertionPlant] -- has to correspond to `A` in [C] - * @param C A subtype of [BaseCollectingAssertionPlant] which is used in the fluent style API and as self type. - */ -@Deprecated("Switch from Assert to Expect; will be removed with 1.0.0") -interface BaseCollectingAssertionPlant< - out T, - out A : BaseAssertionPlant, - out C : BaseCollectingAssertionPlant - > : BaseAssertionPlant { - - /** - * The subject for which this plant will create [Assertion]s or it throws a [PlantHasNoSubjectException] if absent. - * @throws PlantHasNoSubjectException in case there was not a [subject] defined for this plant. - */ - override val subject: T - - /** - * Returns the [Assertion]s which have been [added][addAssertion] to this plant. - * - * @return The [Assertion]s which have been [added][addAssertion] to this plant. - */ - fun getAssertions(): List -} diff --git a/core/api/atrium-core-api-common/src/main/kotlin/ch/tutteli/atrium/creating/BaseReportingAssertionPlant.kt b/core/api/atrium-core-api-common/src/main/kotlin/ch/tutteli/atrium/creating/BaseReportingAssertionPlant.kt deleted file mode 100644 index 4b6f492ec..000000000 --- a/core/api/atrium-core-api-common/src/main/kotlin/ch/tutteli/atrium/creating/BaseReportingAssertionPlant.kt +++ /dev/null @@ -1,17 +0,0 @@ -@file:Suppress("DEPRECATION" /* will be removed with 1.0.0 */) - -package ch.tutteli.atrium.creating - -import ch.tutteli.atrium.assertions.Assertion - -/** - * Represents a plant for [Assertion]s and offers methods to [addAssertion]s to this plant. - * - * It defines what [ReportingAssertionPlant] and [ReportingAssertionPlantNullable] have in common. - * - * @param T The type of the [subject] of this [AssertionPlant]. - * @param A A subtype of [BaseAssertionPlant] which is used in the fluent style API. - */ -@Deprecated("Switch from Assert to Expect; will be removed with 1.0.0") -interface BaseReportingAssertionPlant> - : BaseAssertionPlant, AssertionPlantWithCommonFields diff --git a/core/api/atrium-core-api-common/src/main/kotlin/ch/tutteli/atrium/creating/CheckingAssertionPlant.kt b/core/api/atrium-core-api-common/src/main/kotlin/ch/tutteli/atrium/creating/CheckingAssertionPlant.kt deleted file mode 100644 index be3da37db..000000000 --- a/core/api/atrium-core-api-common/src/main/kotlin/ch/tutteli/atrium/creating/CheckingAssertionPlant.kt +++ /dev/null @@ -1,37 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove file with 1.0.0 */) - -package ch.tutteli.atrium.creating - -import ch.tutteli.atrium.assertions.Assertion - -/** - * Represents a plant for [Assertion]s and offers the possibility to check whether [allAssertionsHold] which have been - * [added][addAssertion] to this plant (since the last check). - * - * In contrast to [ReportingAssertionPlant], this plant does not offer reporting capabilities but merely indicates - * whether the added [Assertion]s hold. - * - * @param T The type of the [subject] of this [AssertionPlant]. - */ -@Deprecated("Switch from CheckingAssertionPlant to Expect; will be removed with 1.0.0", ReplaceWith("Expect")) -interface CheckingAssertionPlant : AssertionPlant { - - override fun addAssertionsCreatedBy(assertionCreator: AssertionPlant.() -> Unit): CheckingAssertionPlant - - /** - * Checks whether the newly [added][addAssertion] [Assertion]s hold. - * - * Calling this method more than once should not re-check previously [added][addAssertion] [Assertion]s. - * In contrast to [ReportingAssertionPlant], this method should not report or throw an exception - * if an assertion does not hold. It merely states whether the newly [added][addAssertion] [Assertion]s hold. - * - * However, it should throw an [IllegalStateException] in case no new assertions have been added to this plant. - * Particularly after one called [allAssertionsHold] and a second call happens without adding an additional - * assertion in between. - * - * @return `true` if the [added][addAssertion] [Assertion]s hold; `false` otherwise. - * - * @throws IllegalStateException in case no new assertions have been added to this plant. - */ - fun allAssertionsHold(): Boolean -} diff --git a/core/api/atrium-core-api-common/src/main/kotlin/ch/tutteli/atrium/creating/CollectingAssertionContainer.kt b/core/api/atrium-core-api-common/src/main/kotlin/ch/tutteli/atrium/creating/CollectingAssertionContainer.kt deleted file mode 100644 index 360525360..000000000 --- a/core/api/atrium-core-api-common/src/main/kotlin/ch/tutteli/atrium/creating/CollectingAssertionContainer.kt +++ /dev/null @@ -1,30 +0,0 @@ -//TODO remove with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.creating - -import ch.tutteli.atrium.assertions.Assertion - -/** - * Represents a container for [Assertion] which is intended to serve as receiver object for lambdas which create - * [Assertion]s, in which this [Expect] collects the assertions created this ways. - * - * This container does not offer reporting capabilities in contrast to [ReportingAssertionContainer]. - * It merely offers a method to [getAssertions] (the collected ones). - * - * @param T The type of the [subject] of this [Expect]. - */ -@Deprecated("Use CollectingExpect instead; will be removed with 1.0.0", ReplaceWith("CollectingExpect")) -interface CollectingAssertionContainer : Expect { - - override fun addAssertionsCreatedBy(assertionCreator: Expect.() -> Unit): CollectingAssertionContainer - - override fun addAssertion(assertion: Assertion): CollectingAssertionContainer - - /** - * Returns the [Assertion]s which have been [added][addAssertion] to this container. - * - * @return The [Assertion]s which have been [added][addAssertion] to this container. - */ - fun getAssertions(): List -} diff --git a/core/api/atrium-core-api-common/src/main/kotlin/ch/tutteli/atrium/creating/CollectingAssertionPlant.kt b/core/api/atrium-core-api-common/src/main/kotlin/ch/tutteli/atrium/creating/CollectingAssertionPlant.kt deleted file mode 100644 index 849412172..000000000 --- a/core/api/atrium-core-api-common/src/main/kotlin/ch/tutteli/atrium/creating/CollectingAssertionPlant.kt +++ /dev/null @@ -1,22 +0,0 @@ -@file:Suppress("DEPRECATION" /* will be removed with 1.0.0 */) - -package ch.tutteli.atrium.creating - -import ch.tutteli.atrium.assertions.Assertion - -/** - * Represents an [AssertionPlant] which is intended to serve as receiver object for lambdas which create - * [Assertion]s, in which this assertion plant collects the so created assertions. - * - * In contrast to [ReportingAssertionPlant], this plant does not offer reporting capabilities and in contrast to - * [CheckingAssertionPlant] it does not offer checking capabilities either. - * It merely offers a method to [getAssertions] (the collected ones). - * - * @param T The type of the [subject] of this [AssertionPlant]. - */ -@Deprecated("Switch from CollectingAssertionPlant to CollectingAssertionContainer; will be removed with 1.0.0", ReplaceWith("CollectingAssertionContainer")) -interface CollectingAssertionPlant : AssertionPlant, - BaseCollectingAssertionPlant, CollectingAssertionPlant> { - - override fun addAssertionsCreatedBy(assertionCreator: AssertionPlant.() -> Unit): CollectingAssertionPlant -} diff --git a/core/api/atrium-core-api-common/src/main/kotlin/ch/tutteli/atrium/creating/CollectingAssertionPlantNullable.kt b/core/api/atrium-core-api-common/src/main/kotlin/ch/tutteli/atrium/creating/CollectingAssertionPlantNullable.kt deleted file mode 100644 index c24525154..000000000 --- a/core/api/atrium-core-api-common/src/main/kotlin/ch/tutteli/atrium/creating/CollectingAssertionPlantNullable.kt +++ /dev/null @@ -1,18 +0,0 @@ -@file:Suppress("DEPRECATION" /* will be removed with 1.0.0 */) - -package ch.tutteli.atrium.creating - -import ch.tutteli.atrium.assertions.Assertion - -/** - * Represents an [AssertionPlantNullable] which is intended to serve as receiver object for lambdas which create - * [Assertion]s, in which this assertion plant collects the so created assertions. - * - * In contrast to [ReportingAssertionPlantNullable], this plant does not offer reporting capabilities. - * It merely offers a method to [getAssertions] (the collected ones). - * - * @param T The type of the [subject] of this [AssertionPlant]. - */ -@Deprecated("Switch from CollectingAssertionPlantNullable to CollectingAssertionContainer; will be removed with 1.0.0", ReplaceWith("CollectingAssertionContainer")) -interface CollectingAssertionPlantNullable : AssertionPlantNullable, - BaseCollectingAssertionPlant, CollectingAssertionPlantNullable> diff --git a/core/api/atrium-core-api-common/src/main/kotlin/ch/tutteli/atrium/creating/ErrorMessages.kt b/core/api/atrium-core-api-common/src/main/kotlin/ch/tutteli/atrium/creating/ErrorMessages.kt index 733d712a3..086c699df 100644 --- a/core/api/atrium-core-api-common/src/main/kotlin/ch/tutteli/atrium/creating/ErrorMessages.kt +++ b/core/api/atrium-core-api-common/src/main/kotlin/ch/tutteli/atrium/creating/ErrorMessages.kt @@ -1,6 +1,5 @@ package ch.tutteli.atrium.creating -import ch.tutteli.atrium.reporting.BUG_REPORT_URL import ch.tutteli.atrium.reporting.translating.StringBasedTranslatable /** @@ -10,6 +9,4 @@ enum class ErrorMessages(override val value: String) : StringBasedTranslatable { AT_LEAST_ONE_ASSERTION_DEFINED("at least one assertion defined"), FORGOT_DO_DEFINE_ASSERTION("You forgot to define assertions in the assertionCreator-lambda"), HINT_AT_LEAST_ONE_ASSERTION_DEFINED("Sometimes you can use an alternative to `{ }` For instance, instead of `toThrow<..> { }` you should use `toThrow<..>()`"), - @Deprecated("Will be removed with 0.16.0") - 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/core/api/atrium-core-api-common/src/main/kotlin/ch/tutteli/atrium/creating/MaybeSubject.kt b/core/api/atrium-core-api-common/src/main/kotlin/ch/tutteli/atrium/creating/MaybeSubject.kt deleted file mode 100644 index c0186f4ae..000000000 --- a/core/api/atrium-core-api-common/src/main/kotlin/ch/tutteli/atrium/creating/MaybeSubject.kt +++ /dev/null @@ -1,49 +0,0 @@ -package ch.tutteli.atrium.creating - -/** - * Represents a subject of an assertion which might be [Present] or [Absent]. - * - * It provides a method [get] where one can get the underlying subject (if [Present]). - **/ -@Deprecated("Use something like ch.tutteli.atrium.core.Option instead; will be removed with 1.0.0") -sealed class MaybeSubject { - - /** - * Returns the underlying subject or throws a [PlantHasNoSubjectException] if it is [Absent]. - */ - abstract fun get(): T - - /** - * Represents an absent subject. - */ - @Suppress("DEPRECATION") - @Deprecated("Use something like ch.tutteli.atrium.core.None instead; will be removed with 1.0.0") - object Absent : MaybeSubject() { - /** - * Throws a [PlantHasNoSubjectException]. - * @throws PlantHasNoSubjectException if this method is called. - */ - override fun get(): Nothing = throw PlantHasNoSubjectException() - } - - /** - * Represents a present subject. - * - * @property subject The underlying subject. - */ - @Suppress("DEPRECATION") - @Deprecated("Use something like ch.tutteli.atrium.core.Some instead; will be removed with 1.0.0") - data class Present(val subject: T) : MaybeSubject() { - /** - * Returns the [subject]. - */ - override fun get(): T = subject - } - - companion object { - @Suppress("DEPRECATION") - operator fun invoke(subject: T?) = - if (subject == null) Absent - else Present(subject) - } -} diff --git a/core/api/atrium-core-api-common/src/main/kotlin/ch/tutteli/atrium/creating/PlantHasNoSubjectException.kt b/core/api/atrium-core-api-common/src/main/kotlin/ch/tutteli/atrium/creating/PlantHasNoSubjectException.kt deleted file mode 100644 index 897cb0fd6..000000000 --- a/core/api/atrium-core-api-common/src/main/kotlin/ch/tutteli/atrium/creating/PlantHasNoSubjectException.kt +++ /dev/null @@ -1,21 +0,0 @@ -package ch.tutteli.atrium.creating - -import ch.tutteli.atrium.reporting.BUG_REPORT_URL - -/** - * Represents the [Exception] that an [AssertionPlant.subject][SubjectProvider.subject] was not defined but one tried to access it. - */ -@Deprecated("No longer required with Expect; will be removed with 1.0.0") -class PlantHasNoSubjectException -@Deprecated( - "Use the constructor without argument; will be removed with 1.0.0", - ReplaceWith("PlantHasNoSubjectException()") -) -constructor(message: String) : RuntimeException(message) { - - @Suppress("DEPRECATION" /* TODO remove with 1.0.0 */) - constructor() : this( - "subject is not available, you as user should not see this message.\n" + - "Please file a bug report (including stacktrace if possible): $BUG_REPORT_URL" - ) -} diff --git a/core/api/atrium-core-api-common/src/main/kotlin/ch/tutteli/atrium/creating/ReportingAssertionContainer.kt b/core/api/atrium-core-api-common/src/main/kotlin/ch/tutteli/atrium/creating/ReportingAssertionContainer.kt deleted file mode 100644 index 7c7e0caaa..000000000 --- a/core/api/atrium-core-api-common/src/main/kotlin/ch/tutteli/atrium/creating/ReportingAssertionContainer.kt +++ /dev/null @@ -1,94 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.creating - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.checking.AssertionChecker -import ch.tutteli.atrium.core.None -import ch.tutteli.atrium.core.Option -import ch.tutteli.atrium.core.Some -import ch.tutteli.atrium.reporting.translating.Translatable - -/** - * Represents a container for [Assertion]s and offers the possibility to [addAssertion]s which are reported - * in case they do not hold. - * - * @param T The type of the [subject] of this [Assert]. - */ -@Deprecated("Use RootExpect instead; will be removed with 1.0.0", ReplaceWith("RootExpect")) -interface ReportingAssertionContainer : RootExpect { - - /** - * The [AssertionChecker] which shall be used for checking the assertions. - */ - val assertionChecker: AssertionChecker - - /** - * Represents a decorator for [AssertionChecker] which passes a specified assertion verb, representation - * and assertions to [AssertionChecker.check] for the given [maybeSubject]. - * - * @param T The type of the [maybeSubject]. - */ - interface AssertionCheckerDecorator { - - val assertionVerb: Translatable - - val representation: Any? - - /** - * Either [Some] wrapping the subject of the current assertion or - * [None] in case a previous subject change was not successful. - */ - val maybeSubject: Option - - /** - * The [AssertionChecker] which shall be used for checking the assertions. - */ - val assertionChecker: AssertionChecker - - /** - * Uses [assertionChecker] to check the given [assertions] (see [AssertionChecker.check]). - * - * @param assertions The assertions which shall be checked. - * - * @throws AssertionError Might throw an [AssertionError] if any of the [assertions] does not hold. - */ - fun check(assertions: List) - - - companion object { - - /** - * Creates an [AssertionCheckerDecorator]. - * - * @param assertionVerb The assertion verb which will be used inter alia in reporting. - * @param maybeSubject Either [Some] wrapping the subject of the assertion or - * [None] in case a previous subject change could not be performed. The assertion container will - * store (check/report) [Assertion]s for the subject of the assertion. - * @param representation The representation which will be used to represent the subject in reporting. - * @param assertionChecker The checker which will be used to check [Assertion]s. - */ - fun create( - assertionVerb: Translatable, - maybeSubject: Option, - representation: Any?, - assertionChecker: AssertionChecker - ): AssertionCheckerDecorator = EagerCommonFields( - assertionVerb, maybeSubject, representation, assertionChecker - ) - } - } - - private class EagerCommonFields( - override val assertionVerb: Translatable, - override val maybeSubject: Option, - override val representation: Any?, - override val assertionChecker: AssertionChecker - ) : AssertionCheckerDecorator { - - override fun check(assertions: List) { - assertionChecker.check(assertionVerb, representation, assertions) - } - } -} diff --git a/core/api/atrium-core-api-common/src/main/kotlin/ch/tutteli/atrium/creating/ReportingAssertionPlant.kt b/core/api/atrium-core-api-common/src/main/kotlin/ch/tutteli/atrium/creating/ReportingAssertionPlant.kt deleted file mode 100644 index f5e7e7f95..000000000 --- a/core/api/atrium-core-api-common/src/main/kotlin/ch/tutteli/atrium/creating/ReportingAssertionPlant.kt +++ /dev/null @@ -1,16 +0,0 @@ -@file:Suppress("DEPRECATION" /* will be removed with 1.0.0 */) - -package ch.tutteli.atrium.creating - -import ch.tutteli.atrium.assertions.Assertion - -/** - * Represents a plant for [Assertion]s and offers the possibility to [addAssertion]s and to report them. - * - * You can think of it as an [Assertion] factory which does more than just factoring - * but also provides quality assurance capabilities. - * - * @param T The type of the [subject] of this [AssertionPlant]. - */ -@Deprecated("Switch from ReportingAssertionPlant to ReportingAssertionContainer; will be removed with 1.0.0", ReplaceWith("ReportingAssertionContainer")) -interface ReportingAssertionPlant : AssertionPlant, BaseReportingAssertionPlant> diff --git a/core/api/atrium-core-api-common/src/main/kotlin/ch/tutteli/atrium/creating/ReportingAssertionPlantNullable.kt b/core/api/atrium-core-api-common/src/main/kotlin/ch/tutteli/atrium/creating/ReportingAssertionPlantNullable.kt deleted file mode 100644 index ea518c68e..000000000 --- a/core/api/atrium-core-api-common/src/main/kotlin/ch/tutteli/atrium/creating/ReportingAssertionPlantNullable.kt +++ /dev/null @@ -1,17 +0,0 @@ -@file:Suppress("DEPRECATION" /* will be removed with 1.0.0 */) - -package ch.tutteli.atrium.creating - -import ch.tutteli.atrium.assertions.Assertion - -/** - * Represents an assertion plant for nullable types and offers the possibility to [addAssertion]s and to report them. - * - * You can think of it as an [Assertion] factory which does more than just factoring - * but also provides quality assurance capabilities. - * - * @param T The type of the [subject] of this [AssertionPlant]. - */ -@Deprecated("Switch from ReportingAssertionPlantNullable to ReportingAssertionContainer; will be removed with 1.0.0", ReplaceWith("ReportingAssertionContainer")) -interface ReportingAssertionPlantNullable - : AssertionPlantNullable, BaseReportingAssertionPlant> diff --git a/core/api/atrium-core-api-common/src/main/kotlin/ch/tutteli/atrium/creating/SubjectProvider.kt b/core/api/atrium-core-api-common/src/main/kotlin/ch/tutteli/atrium/creating/SubjectProvider.kt index 8b226218d..6102af1a6 100644 --- a/core/api/atrium-core-api-common/src/main/kotlin/ch/tutteli/atrium/creating/SubjectProvider.kt +++ b/core/api/atrium-core-api-common/src/main/kotlin/ch/tutteli/atrium/creating/SubjectProvider.kt @@ -5,6 +5,7 @@ import ch.tutteli.atrium.core.None import ch.tutteli.atrium.core.Option import ch.tutteli.atrium.core.Some +//TODO remove with 0.16.0 /** * Provides the subject of an [Assertion]. * @@ -14,111 +15,6 @@ import ch.tutteli.atrium.core.Some */ interface SubjectProvider : AssertionHolder { - /** - * The subject of an [Assertion] -- deprecated, will be removed with 1.0.0. - * - * Accessing the subject in places which are not safe for reporting breaks reporting and can hinder - * that all assertions can be evaluated. For instance: - * ``` - * expect(person).isA { // is not a student -> subject is now undefined, throws PlantHasNoSubjectException if accessed - * property(subject::firstName).toBe("Robert") - * property(Person::lastName).toBe("Stoll") // is not evaluated as subject one line above already threw PlantHasNoSubjectException - * } - * ``` - * - * For this reason we refactored our design and now pass subject as arguments in places where you need it and - * where it is safe to use it. - * - * It's best if you switch entirely from [Assert] to [Expect] and from `AssertImpl` to `ExpectImpl`. - * Have a look at the migration guide given in [https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration](https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration) - * for a fast way to migrate everything. - * - * In case you want to migrate part by part then the following, non-exhaustive list, tries to explain - * how you need to migrate to use the new design: - * - * 1. - * ``` - * fun Assert.isEven() = createAndAddAssertion(IS, Text("even")) { subject % 2 == 0 } // old - * fun Expect.isEven() = createAndAddAssertion(IS, Text("even")) { it % 2 == 0 } // new - * ``` - * notice the switch from `Assert` to `Expect` - * - * 2. - * ``` - * AssertImpl.builder.createDescriptive(TO_BE, expected) { subject == expected } // old - * AssertImpl.builder.createDescriptive(this, TO_BE, expected) { it == expected } // new - * ``` - * - * 3. - * ``` - * AssertImpl.builder.descriptive.withTest { subject == expected } // old - * AssertImpl.builder.descriptive.withTest(this) { it == expected } // new - `this` refers to Assert or Expect - * ``` - * - * 4. - * ``` - * AssertImpl.builder.descriptive.withTest(...).withFailureHint { ... subject ... } // old - * AssertImpl.builder.descriptive.withTest(...).withFailureHint(this) { ... it ... } // new - `this` refers to Assert or Expect - * ``` - * - * 5. - * ``` - * AssertImpl.builder.descriptive.withTest(...).withFailureHint(...).showOnlyIf { ... subject ... } // old - * AssertImpl.builder.descriptive.withTest(...).withFailureHint(...).showOnlyIf(this) { ... it ... } // new - `this` refers to Assert or Expect - * ``` - * - * 6. - * ``` - * AssertImpl.changeSubject(this) { subject.asIterable() } // old - * ExpectImpl.changeSubject(this).unreported { it.asIterable() } // new - * ``` - * notice the switch from `AssertImpl` to `ExpectImpl` - * - * 7. Feature assertions - * Those are not straight forward and require that you migrate to Expect first or that you use `asExpect` - * ``` - * import ch.tutteli.atrium.verbs.expect - * expect(person) { - * property(subject::firstName).startsWith("hello") - * returnValueOf(subject::myFun, "arg1").toBe(42) - * } and { - * property(subject::lastName).toBe("world") - * } - * - * // using asExpect - * - * expect(person).asExpect { // everything within the brackets is in the Expect world - * feature { f(it::firstName) }.startsWith("hello") - * feature { f(it::myFun, "arg1") }.toBe(42) - * } // back to the Assert world - * .and { - * asExpect() // switch to Expect world, all subsequent calls in Expect world - * .feature{ f(subject::lastName) } - * .toBe("world") - * } - * ``` - * Have a look at the migration guides if you want to switch entirely to Expect as there is a fast - * search & replace strategy. - * - * 8. nested `expect`, `assert `or `assertThat` - * ``` - * //old - * expect(1 to 2) { - * expect(subject.second).toBe(2) - * } - * - * //new - * expect(1 to 2) { - * feature { f(it::second) }.toBe(2) - * } - * ``` - * same same but different for `assert` and `assertThat` - */ - @Deprecated( - "Switch from Assert to Expect and do no longer access subject as it might break reporting. In contexts where it is safe to access the subject, it is passed by parameter and can be accessed via `it`. See KDoc for migration hints; will be removed with 1.0.0", - ReplaceWith("it") - ) - val subject: T /** * Either [Some] wrapping the subject of an [Assertion] or [None] in case a previous subject change could not be diff --git a/core/api/atrium-core-api-common/src/main/kotlin/ch/tutteli/atrium/creating/impl/BaseExpectImpl.kt b/core/api/atrium-core-api-common/src/main/kotlin/ch/tutteli/atrium/creating/impl/BaseExpectImpl.kt index a23308320..524b3162b 100644 --- a/core/api/atrium-core-api-common/src/main/kotlin/ch/tutteli/atrium/creating/impl/BaseExpectImpl.kt +++ b/core/api/atrium-core-api-common/src/main/kotlin/ch/tutteli/atrium/creating/impl/BaseExpectImpl.kt @@ -39,19 +39,6 @@ abstract class BaseExpectImpl( registerImpl(I::class, implFactory) } - - //TODO remove with 0.16.0 - @Deprecated( - "Do not access subject as it might break reporting. In contexts where it is safe to access the subject, it is passed by parameter and can be accessed via `it`. See KDoc for migration hints; will be removed with 1.0.0", - ReplaceWith("it") - ) - final override val subject: T by lazy { - maybeSubject.getOrElse { - @Suppress("DEPRECATION") - throw PlantHasNoSubjectException() - } - } - override fun addAssertionsCreatedBy(assertionCreator: Expect.() -> Unit): Expect { val assertions = CollectingExpect(maybeSubject) .addAssertionsCreatedBy(assertionCreator) diff --git a/core/api/atrium-core-api-common/src/main/kotlin/ch/tutteli/atrium/creating/impl/CollectingExpectImpl.kt b/core/api/atrium-core-api-common/src/main/kotlin/ch/tutteli/atrium/creating/impl/CollectingExpectImpl.kt index e5c46875c..792e6f4ac 100644 --- a/core/api/atrium-core-api-common/src/main/kotlin/ch/tutteli/atrium/creating/impl/CollectingExpectImpl.kt +++ b/core/api/atrium-core-api-common/src/main/kotlin/ch/tutteli/atrium/creating/impl/CollectingExpectImpl.kt @@ -1,7 +1,6 @@ package ch.tutteli.atrium.creating.impl import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.assertions.AssertionGroup import ch.tutteli.atrium.assertions.builders.* import ch.tutteli.atrium.core.ExperimentalNewExpectTypes import ch.tutteli.atrium.core.Option @@ -24,7 +23,8 @@ internal class CollectingExpectImpl(maybeSubject: Option) : BaseExpectImpl allAssertions.addAll(getAssertions()) assertions.clear() - val newAssertions = collectAssertions(assertionCreator) + assertionCreator(this) + val newAssertions = getAssertions() assertions.clear() @@ -52,42 +52,4 @@ internal class CollectingExpectImpl(maybeSubject: Option) : BaseExpectImpl allAssertions.forEach { addAssertion(it) } return this } - - private fun collectAssertions(assertionCreator: Expect.() -> Unit) = - //TODO remove try-catch with 0.16.0 should no longer be needed once PlantHasNoSubjectException is removed - try { - this.assertionCreator() - val collectedAssertions = getAssertions() - - //TODO remove with 0.16.0 - // Required as we support mixing Expect with Assert. - // And since assertions can be lazily computed we have to provoke their creation here, - // so that a potential PlantHasNoSubjectException is thrown. It's fine to provoke the computation - // because we require the assertions for the explanation anyway. - expandAssertionGroups(collectedAssertions) - - collectedAssertions - } catch (@Suppress("DEPRECATION") e: PlantHasNoSubjectException) { - @Suppress("DEPRECATION") - listOf( - assertionBuilder.explanatoryGroup - .withWarningType - .withExplanatoryAssertion(ErrorMessages.SUBJECT_ACCESSED_TOO_EARLY) - .build() - ) - } - - //TODO remove with 0.16.0 - private tailrec fun expandAssertionGroups(assertions: List) { - if (assertions.isEmpty()) return - - expandAssertionGroups( - assertions - .asSequence() - .filterIsInstance() - .flatMap { it.assertions.asSequence() } - .toList() - ) - } - } diff --git a/core/api/atrium-core-api-js/src/main/kotlin/ch/tutteli/atrium/core/CoreFactory.kt b/core/api/atrium-core-api-js/src/main/kotlin/ch/tutteli/atrium/core/CoreFactory.kt index bbeb6fbbd..45f3b756e 100644 --- a/core/api/atrium-core-api-js/src/main/kotlin/ch/tutteli/atrium/core/CoreFactory.kt +++ b/core/api/atrium-core-api-js/src/main/kotlin/ch/tutteli/atrium/core/CoreFactory.kt @@ -1,104 +1,3 @@ package ch.tutteli.atrium.core -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.reporting.Reporter -import ch.tutteli.atrium.reporting.Text -import ch.tutteli.atrium.reporting.translating.Translatable -import ch.tutteli.atrium.core.newReportingPlantNullable as newReportingPlantNullableFromCommon - -actual interface CoreFactory : CoreFactoryCommon { - - // we need to define the following methods here so that we can retain binary backward compatibility in JVM - // => Kotlin generates an object called CoreFactory$DefaultImpls due to the optional parameters - // hence we need to place the methods here and cannot move them to CoreFactoryCommon as well - - /** - * Creates a [ch.tutteli.atrium.creating.ReportingAssertionPlantNullable] which is the entry point for assertions about nullable types. - * - * It creates a [newThrowingAssertionChecker] based on the given [reporter] for assertion checking, - * uses [subjectProvider] as [ch.tutteli.atrium.creating.AssertionPlantWithCommonFields.CommonFields.subjectProvider] but also as - * [ch.tutteli.atrium.creating.AssertionPlantWithCommonFields.CommonFields.representationProvider]. - * Notice that [evalOnce] is applied to the given [subjectProvider] to avoid side effects - * (the provider is most likely called more than once). - * - * Notice, this method will be moved to [CoreFactoryCommon] with 1.0.0. - * - * @param assertionVerb The assertion verb which will be used inter alia in reporting - * (see [ch.tutteli.atrium.creating.AssertionPlantWithCommonFields.CommonFields.assertionVerb]). - * @param subjectProvider Used as [ch.tutteli.atrium.creating.AssertionPlantWithCommonFields.CommonFields.subjectProvider] but - * also as [ch.tutteli.atrium.creating.AssertionPlantWithCommonFields.CommonFields.representationProvider]. - * @param reporter The reporter which will be used for a [newThrowingAssertionChecker]. - * - * - * @return The newly created assertion plant. - */ - @Suppress("DEPRECATION") - @Deprecated( - "Switch to Expect instead of Assert, thus use newReportingAssertionContainer instead; will be removed with 1.0.0\"", - ReplaceWith( - "ExpectImpl\n" + - ".assertionVerbBuilder(\n" + - "// define the subject here instead of subjectProvider(), for instance just `subject` instead of `{ subject }`\n" + - "// in case you have a transformation from an existing subject, then use this.maybeSubject.map { transform(it) }\n" + - "subjectProvider()\n" + - ")\n" + - ".withVerb(assertionVerb)\n" + - ".withCustomReporter(reporter)\n" + - ".build()", - "ch.tutteli.atrium.domain.builders.ExpectImpl" - ) - ) - fun newReportingPlantNullable( - assertionVerb: Translatable, - subjectProvider: () -> T, - reporter: Reporter, - nullRepresentation: Any = Text.NULL - ): ch.tutteli.atrium.creating.ReportingAssertionPlantNullable = newReportingPlantNullableFromCommon( - assertionVerb, subjectProvider, reporter, nullRepresentation - ) - - /** - * Creates a [ch.tutteli.atrium.creating.ReportingAssertionPlantNullable] which is the entry point for assertions about nullable types. - * - * It uses the given [assertionChecker] for assertion checking, uses [subjectProvider] as - * [ch.tutteli.atrium.creating.AssertionPlantWithCommonFields.CommonFields.subjectProvider] but also as - * [ch.tutteli.atrium.creating.AssertionPlantWithCommonFields.CommonFields.representationProvider]. - * Notice that [evalOnce] is applied to the given [subjectProvider] to avoid side effects - * (the provider is most likely called more than once). - * - * Notice, this method will be moved to [CoreFactoryCommon] with 1.0.0. - * - * @param assertionVerb The assertion verb which will be used inter alia in reporting - * (see [ch.tutteli.atrium.creating.AssertionPlantWithCommonFields.CommonFields.assertionVerb]). - * @param subjectProvider Used as [ch.tutteli.atrium.creating.AssertionPlantWithCommonFields.CommonFields.subjectProvider] but - * also as [ch.tutteli.atrium.creating.AssertionPlantWithCommonFields.CommonFields.representationProvider]. - * @param assertionChecker The checker which will be used to check [Assertion]s. - * (see [ch.tutteli.atrium.creating.AssertionPlantWithCommonFields.CommonFields.assertionChecker]). - * - * @return The newly created assertion plant. - */ - @Suppress("DEPRECATION") - @Deprecated( - "Switch to Expect instead of Assert, thus use newReportingAssertionContainer instead; will be removed with 1.0.0\"", - ReplaceWith( - "this.newReportingAssertionContainer(\n" + - "assertionVerb,\n" + - "// define the subject here instead of subjectProvider(), for instance just `subject` instead of `{ subject }`\n" + - "// in case you have a transformation from an existing subject, then use this.maybeSubject.map { transform(it) }\n" + - "Some(subjectProvider()),\n" + - "assertionChecker\n" + - ")", - "ch.tutteli.atrium.core.coreFactory", - "ch.tutteli.atrium.core.Some", - "ch.tutteli.atrium.domain.builders.ExpectImpl" - ) - ) - fun newReportingPlantNullable( - assertionVerb: Translatable, - subjectProvider: () -> T, - assertionChecker: ch.tutteli.atrium.checking.AssertionChecker, - nullRepresentation: Any = Text.NULL - ): ch.tutteli.atrium.creating.ReportingAssertionPlantNullable = newReportingPlantNullableFromCommon( - assertionVerb, subjectProvider, assertionChecker, nullRepresentation - ) -} +actual interface CoreFactory : CoreFactoryCommon diff --git a/core/api/atrium-core-api-jvm/src/main/kotlin/ch/tutteli/atrium/core/CoreFactory.kt b/core/api/atrium-core-api-jvm/src/main/kotlin/ch/tutteli/atrium/core/CoreFactory.kt index be283a9c0..99b3e6a18 100644 --- a/core/api/atrium-core-api-jvm/src/main/kotlin/ch/tutteli/atrium/core/CoreFactory.kt +++ b/core/api/atrium-core-api-jvm/src/main/kotlin/ch/tutteli/atrium/core/CoreFactory.kt @@ -5,15 +5,11 @@ package ch.tutteli.atrium.core -import ch.tutteli.atrium.assertions.Assertion import ch.tutteli.atrium.reporting.AssertionFormatterFacade import ch.tutteli.atrium.reporting.Reporter -import ch.tutteli.atrium.reporting.Text import ch.tutteli.atrium.reporting.translating.Locale -import ch.tutteli.atrium.reporting.translating.Translatable import ch.tutteli.atrium.reporting.translating.TranslationSupplier import java.util.* -import ch.tutteli.atrium.core.newReportingPlantNullable as newReportingPlantNullableFromCommon actual interface CoreFactory : CoreFactoryCommon { @@ -37,98 +33,4 @@ actual interface CoreFactory : CoreFactoryCommon { ReplaceWith("this.newOnlyFailureReporter(assertionFormatterFacade, this.newNoOpAtriumErrorAdjuster())") ) fun newOnlyFailureReporter(assertionFormatterFacade: AssertionFormatterFacade): Reporter - - // we need to define the following methods here so that we can retain binary backward compatibility - // => Kotlin generates an object called CoreFactory$DefaultImpls due to the optional parameters - // hence we need to place the methods here and cannot move them to CoreFactoryCommon as well - // => will be change with 1.0.0 - - /** - * Creates a [ch.tutteli.atrium.creating.ReportingAssertionPlantNullable] which is the entry point for assertions about nullable types. - * - * It creates a [newThrowingAssertionChecker] based on the given [reporter] for assertion checking, - * uses [subjectProvider] as [ch.tutteli.atrium.creating.AssertionPlantWithCommonFields.CommonFields.subjectProvider] but also as - * [ch.tutteli.atrium.creating.AssertionPlantWithCommonFields.CommonFields.representationProvider]. - * Notice that [evalOnce] is applied to the given [subjectProvider] to avoid side effects - * (the provider is most likely called more than once). - * - * Notice, this method will be moved to [CoreFactoryCommon] with 1.0.0. - * - * @param assertionVerb The assertion verb which will be used inter alia in reporting - * (see [ch.tutteli.atrium.creating.AssertionPlantWithCommonFields.CommonFields.assertionVerb]). - * @param subjectProvider Used as [ch.tutteli.atrium.creating.AssertionPlantWithCommonFields.CommonFields.subjectProvider] but - * also as [ch.tutteli.atrium.creating.AssertionPlantWithCommonFields.CommonFields.representationProvider]. - * @param reporter The reporter which will be used for a [newThrowingAssertionChecker]. - * - * @return The newly created assertion plant. - */ - @Suppress("DEPRECATION") - @Deprecated( - "Switch to Expect instead of Assert, thus use newReportingAssertionContainer instead; will be removed with 1.0.0\"", - ReplaceWith( - "ExpectBuilder.forSubject(\n" + - "// !!!! in case you define an assertion verb function, remove it entirely, this is no longer required !!!! otherwise:\n" + - "// define the subject here instead of subjectProvider(), for instance just `subject` instead of `{ subject }`\n" + - "// in case you have a transformation from an existing subject, then use this.maybeSubject.map { transform(it) }\n" + - "subjectProvider()\n" + - ")\n" + - ".withVerb(assertionVerb)\n" + - ".withOptions { withReporter(reporter) }\n" + - ".build()", - "ch.tutteli.atrium.domain.builders.reporting.ExpectBuilder" - ) - ) - fun newReportingPlantNullable( - assertionVerb: Translatable, - subjectProvider: () -> T, - reporter: Reporter, - nullRepresentation: Any = Text.NULL - ): ch.tutteli.atrium.creating.ReportingAssertionPlantNullable = newReportingPlantNullableFromCommon( - assertionVerb, subjectProvider, reporter, nullRepresentation - ) - - /** - * Creates a [ch.tutteli.atrium.creating.ReportingAssertionPlantNullable] which is the entry point for assertions about nullable types. - * - * It uses the given [assertionChecker] for assertion checking, uses [subjectProvider] as - * [ch.tutteli.atrium.creating.AssertionPlantWithCommonFields.CommonFields.subjectProvider] but also as - * [ch.tutteli.atrium.creating.AssertionPlantWithCommonFields.CommonFields.representationProvider]. - * Notice that [evalOnce] is applied to the given [subjectProvider] to avoid side effects - * (the provider is most likely called more than once). - * - * Notice, this method will be moved to [CoreFactoryCommon] with 1.0.0. - * - * @param assertionVerb The assertion verb which will be used inter alia in reporting - * (see [ch.tutteli.atrium.creating.AssertionPlantWithCommonFields.CommonFields.assertionVerb]). - * @param subjectProvider Used as [ch.tutteli.atrium.creating.AssertionPlantWithCommonFields.CommonFields.subjectProvider] but - * also as [ch.tutteli.atrium.creating.AssertionPlantWithCommonFields.CommonFields.representationProvider]. - * @param assertionChecker The checker which will be used to check [Assertion]s. - * (see [ch.tutteli.atrium.creating.AssertionPlantWithCommonFields.CommonFields.assertionChecker]). - * - * @return The newly created assertion plant. - */ - @Suppress("DEPRECATION") - @Deprecated( - "Switch to Expect instead of Assert, thus use newReportingAssertionContainer instead; will be removed with 1.0.0\"", - ReplaceWith( - "this.newReportingAssertionContainer(\n" + - "assertionVerb,\n" + - "// define the subject here instead of subjectProvider(), for instance just `subject` instead of `{ subject }`\n" + - "// in case you have a transformation from an existing subject, then use this.maybeSubject.map { transform(it) }\n" + - "Some(subjectProvider()),\n" + - "assertionChecker\n" + - ")", - "ch.tutteli.atrium.core.coreFactory", - "ch.tutteli.atrium.core.Some", - "ch.tutteli.atrium.domain.builders.ExpectImpl" - ) - ) - fun newReportingPlantNullable( - assertionVerb: Translatable, - subjectProvider: () -> T, - assertionChecker: ch.tutteli.atrium.checking.AssertionChecker, - nullRepresentation: Any = Text.NULL - ): ch.tutteli.atrium.creating.ReportingAssertionPlantNullable = newReportingPlantNullableFromCommon( - assertionVerb, subjectProvider, assertionChecker, nullRepresentation - ) } diff --git a/core/api/atrium-core-api-jvm/src/module/module-info.java b/core/api/atrium-core-api-jvm/src/module/module-info.java index a0b24e11d..b088f86df 100644 --- a/core/api/atrium-core-api-jvm/src/module/module-info.java +++ b/core/api/atrium-core-api-jvm/src/module/module-info.java @@ -6,7 +6,6 @@ module ch.tutteli.atrium.core.api { exports ch.tutteli.atrium.assertions; exports ch.tutteli.atrium.assertions.builders; exports ch.tutteli.atrium.assertions.builders.common; - exports ch.tutteli.atrium.checking; exports ch.tutteli.atrium.core; exports ch.tutteli.atrium.core.migration; exports ch.tutteli.atrium.core.polyfills; diff --git a/core/robstoll-lib/atrium-core-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/core/robstoll/lib/checking/DelegatingAssertionChecker.kt b/core/robstoll-lib/atrium-core-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/core/robstoll/lib/checking/DelegatingAssertionChecker.kt deleted file mode 100644 index 5fb06e37b..000000000 --- a/core/robstoll-lib/atrium-core-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/core/robstoll/lib/checking/DelegatingAssertionChecker.kt +++ /dev/null @@ -1,19 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.core.robstoll.lib.checking - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.assertions.builders.assertionBuilder -import ch.tutteli.atrium.assertions.builders.invisibleGroup -import ch.tutteli.atrium.checking.AssertionChecker -import ch.tutteli.atrium.creating.AssertionHolder -import ch.tutteli.atrium.reporting.translating.Translatable - -@Deprecated("Do no longer use AssertionCheckers, use DelegatingExpect instead; will be removed with 1.0.0") -class DelegatingAssertionChecker(private val originalAssertionHolder: AssertionHolder) : AssertionChecker { - - override fun check(assertionVerb: Translatable, representation: Any?, assertions: List) { - originalAssertionHolder.addAssertion(assertionBuilder.invisibleGroup.withAssertions(assertions).build()) - } -} diff --git a/core/robstoll-lib/atrium-core-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/core/robstoll/lib/checking/FeatureAssertionChecker.kt b/core/robstoll-lib/atrium-core-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/core/robstoll/lib/checking/FeatureAssertionChecker.kt deleted file mode 100644 index 6b0c3de3c..000000000 --- a/core/robstoll-lib/atrium-core-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/core/robstoll/lib/checking/FeatureAssertionChecker.kt +++ /dev/null @@ -1,56 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.core.robstoll.lib.checking - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.assertions.AssertionGroup -import ch.tutteli.atrium.assertions.FeatureAssertionGroupType -import ch.tutteli.atrium.assertions.builders.assertionBuilder -import ch.tutteli.atrium.checking.AssertionChecker -import ch.tutteli.atrium.creating.AssertionHolder -import ch.tutteli.atrium.reporting.translating.Translatable - -/** - * An [AssertionChecker] useful for feature assertions. It creates an [AssertionGroup] of [type][AssertionGroup] - * [FeatureAssertionGroupType], adds the given assertions to it and finally adds the group to the given - * [originalAssertionHolder]. - * - * Or in other words, instead of checking the given assertions itself, it wraps them into a feature assertion group - * and delegates checking of this group (hence including the given assertion) to the [originalAssertionHolder]. - * - * @property originalAssertionHolder The plant which holds the assertions of the subject of the feature. - * For instance, if the feature is `Person::name` then [originalAssertionHolder] holds the assertions for - * the corresponding `Person`. - * - * @constructor An [AssertionChecker] useful for feature assertions. It creates an [AssertionGroup] of - * [type][AssertionGroup] [FeatureAssertionGroupType], adds the given assertions to it and finally adds the - * group to the given [originalAssertionHolder]. - * @param originalAssertionHolder The plant which holds the assertions of the subject of the feature. - * For instance, if the feature is `Person::name` then [originalAssertionHolder] holds the assertions for - * the corresponding `Person`. - */ -@Deprecated("Do no longer use AssertionCheckers, use FeatureExpect instead; will be removed with 1.0.0") -class FeatureAssertionChecker(private val originalAssertionHolder: AssertionHolder) : AssertionChecker { - - /** - * Creates an [AssertionGroup]s of [type][AssertionGroup] [FeatureAssertionGroupType] based on the - * given [assertionVerb], [representation] and [assertions] and [adds][AssertionHolder.addAssertion] the - * assertion group to the [originalAssertionHolder] instead of checking it itself. - * - * @param assertionVerb Is used as [AssertionGroup.description] -- as side notice, - * the parameter was not renamed to `featureName` due to potential issues with named parameters. - * @param representation Is used as [AssertionGroup.representation]. - * @param assertions Is used as [AssertionGroup.assertions]. - * - * @throws AssertionError Might throw an [AssertionError] in case one of the given [assertions] does not hold. - */ - override fun check(assertionVerb: Translatable, representation: Any?, assertions: List) { - originalAssertionHolder.addAssertion( - assertionBuilder.feature - .withDescriptionAndRepresentation(assertionVerb, representation) - .withAssertions(ArrayList(assertions)) - .build() - ) - } -} diff --git a/core/robstoll-lib/atrium-core-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/core/robstoll/lib/checking/ThrowingAssertionChecker.kt b/core/robstoll-lib/atrium-core-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/core/robstoll/lib/checking/ThrowingAssertionChecker.kt deleted file mode 100644 index 46c6117a1..000000000 --- a/core/robstoll-lib/atrium-core-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/core/robstoll/lib/checking/ThrowingAssertionChecker.kt +++ /dev/null @@ -1,50 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.core.robstoll.lib.checking - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.assertions.AssertionGroup -import ch.tutteli.atrium.assertions.builders.assertionBuilder -import ch.tutteli.atrium.assertions.builders.root -import ch.tutteli.atrium.checking.AssertionChecker -import ch.tutteli.atrium.reporting.AtriumError -import ch.tutteli.atrium.reporting.Reporter -import ch.tutteli.atrium.reporting.translating.Translatable - -/** - * An [AssertionChecker] which throws [AtriumError]s in case an assertion fails - * and uses the given [reporter] for reporting. - * - * @property reporter Will be used for reporting. - * - * @constructor An [AssertionChecker] which throws [AtriumError]s in case an assertion fails - * and uses the given [reporter] for reporting. - * @param reporter Will be used for reporting. - */ -@Deprecated("Do no longer use AssertionCheckers, use RootExpect instead; will be removed with 1.0.0") -class ThrowingAssertionChecker(private val reporter: Reporter) : AssertionChecker { - - /** - * Creates an [AssertionGroup] -- based on the given [assertionVerb], [representation] and [assertions] -- - * formats it for reporting using the [reporter] and checks whether it holds. - * - * @param assertionVerb Is used as [AssertionGroup.description]. - * @param representation Provides the [AssertionGroup.representation]. - * @param assertions Is used as [AssertionGroup.assertions]. - * - * @throws AssertionError In case the created [AssertionGroup] does not hold. - */ - override fun check(assertionVerb: Translatable, representation: Any?, assertions: List) { - val assertionGroup = assertionBuilder.root - .withDescriptionAndRepresentation(assertionVerb, representation) - .withAssertions(assertions) - .build() - - val sb = StringBuilder() - reporter.format(assertionGroup, sb) - if (!assertionGroup.holds()) { - throw AtriumError.create(sb.toString(), reporter.atriumErrorAdjuster) - } - } -} diff --git a/core/robstoll-lib/atrium-core-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/core/robstoll/lib/creating/CheckingAssertionPlantImpl.kt b/core/robstoll-lib/atrium-core-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/core/robstoll/lib/creating/CheckingAssertionPlantImpl.kt deleted file mode 100644 index e4b32ad1e..000000000 --- a/core/robstoll-lib/atrium-core-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/core/robstoll/lib/creating/CheckingAssertionPlantImpl.kt +++ /dev/null @@ -1,32 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove file with 1.0.0 */) - -package ch.tutteli.atrium.core.robstoll.lib.creating - -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.creating.CheckingAssertionPlant - -class CheckingAssertionPlantImpl( - subjectProvider: () -> T -) : MutableListBasedAssertionPlant>(subjectProvider), - CheckingAssertionPlant { - - override val self = this - - override fun addAssertionsCreatedBy(assertionCreator: AssertionPlant.() -> Unit): CheckingAssertionPlant { - this.assertionCreator() - return this - } - - override fun allAssertionsHold(): Boolean { - val assertions = getAssertions() - check(assertions.isNotEmpty()) { "You need to create assertions first before checking whether they all hold." } - - try { - return assertions.all { it.holds() } - } finally { - clearAssertions() - } - } - -} - diff --git a/core/robstoll-lib/atrium-core-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/core/robstoll/lib/creating/CollectingAssertionContainerImpl.kt b/core/robstoll-lib/atrium-core-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/core/robstoll/lib/creating/CollectingAssertionContainerImpl.kt deleted file mode 100644 index a593fdbab..000000000 --- a/core/robstoll-lib/atrium-core-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/core/robstoll/lib/creating/CollectingAssertionContainerImpl.kt +++ /dev/null @@ -1,62 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.core.robstoll.lib.creating - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.assertions.builders.assertionBuilder -import ch.tutteli.atrium.assertions.builders.withFailureHint -import ch.tutteli.atrium.core.ExperimentalNewExpectTypes -import ch.tutteli.atrium.core.Option -import ch.tutteli.atrium.creating.CollectingAssertionContainer -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.creating.ExpectInternal -import ch.tutteli.atrium.translations.ErrorMessages -import kotlin.reflect.KClass - -class CollectingAssertionContainerImpl( - maybeSubject: Option -) : MutableListBasedAssertionContainer(maybeSubject), CollectingAssertionContainer, ExpectInternal{ - - override fun getAssertions(): List = getCopyOfAssertions() - - override fun addAssertion(assertion: Assertion): CollectingAssertionContainer { - super.addAssertion(assertion) - return this - } - - override fun addAssertionsCreatedBy(assertionCreator: Expect.() -> Unit): CollectingAssertionContainer { - // in case we run into performance problems, the code below is certainly not ideal - val allAssertions = mutableListOf() - allAssertions.addAll(getAssertions()) - clearAssertions() - this.assertionCreator() - val newAssertions = getAssertions() - clearAssertions() - - if (newAssertions.isNotEmpty()) { - allAssertions.addAll(newAssertions) - } else { - allAssertions.add(assertionBuilder.descriptive - .failing - .withFailureHint { - assertionBuilder.explanatoryGroup - .withDefaultType - .withAssertions( - assertionBuilder.explanatory.withExplanation(ErrorMessages.FORGOT_DO_DEFINE_ASSERTION).build(), - assertionBuilder.explanatory.withExplanation(ErrorMessages.HINT_AT_LEAST_ONE_ASSERTION_DEFINED).build() - ) - .build() - } - .showForAnyFailure - .withDescriptionAndRepresentation(ErrorMessages.AT_LEAST_ONE_ASSERTION_DEFINED, false) - .build() - ) - } - allAssertions.forEach { addAssertion(it) } - return this - } - - @ExperimentalNewExpectTypes - override fun getImpl(kClass: KClass, defaultFactory: () -> I): I = defaultFactory() -} diff --git a/core/robstoll-lib/atrium-core-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/core/robstoll/lib/creating/CollectingAssertionPlantImpl.kt b/core/robstoll-lib/atrium-core-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/core/robstoll/lib/creating/CollectingAssertionPlantImpl.kt deleted file mode 100644 index 55fe83ee9..000000000 --- a/core/robstoll-lib/atrium-core-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/core/robstoll/lib/creating/CollectingAssertionPlantImpl.kt +++ /dev/null @@ -1,18 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove file with 1.0.0 */) -package ch.tutteli.atrium.core.robstoll.lib.creating - -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.creating.CollectingAssertionPlant - -class CollectingAssertionPlantImpl( - subjectProvider: () -> T -) : MutableListBasedAssertionPlant>(subjectProvider), - CollectingAssertionPlant { - - override val self = this - - override fun addAssertionsCreatedBy(assertionCreator: AssertionPlant.() -> Unit): CollectingAssertionPlant { - this.assertionCreator() - return this - } -} diff --git a/core/robstoll-lib/atrium-core-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/core/robstoll/lib/creating/CollectingAssertionPlantNullableImpl.kt b/core/robstoll-lib/atrium-core-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/core/robstoll/lib/creating/CollectingAssertionPlantNullableImpl.kt deleted file mode 100644 index d857288e4..000000000 --- a/core/robstoll-lib/atrium-core-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/core/robstoll/lib/creating/CollectingAssertionPlantNullableImpl.kt +++ /dev/null @@ -1,14 +0,0 @@ -@file:Suppress("DEPRECATION" /* will be removed with 1.0.0 */) - -package ch.tutteli.atrium.core.robstoll.lib.creating - -import ch.tutteli.atrium.creating.AssertionPlantNullable -import ch.tutteli.atrium.creating.CollectingAssertionPlantNullable - -class CollectingAssertionPlantNullableImpl( - subjectProvider: () -> T -) : MutableListBasedAssertionPlant>(subjectProvider), - CollectingAssertionPlantNullable { - - override val self = this -} diff --git a/core/robstoll-lib/atrium-core-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/core/robstoll/lib/creating/MutableListBasedAssertionContainer.kt b/core/robstoll-lib/atrium-core-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/core/robstoll/lib/creating/MutableListBasedAssertionContainer.kt deleted file mode 100644 index e5bcf8314..000000000 --- a/core/robstoll-lib/atrium-core-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/core/robstoll/lib/creating/MutableListBasedAssertionContainer.kt +++ /dev/null @@ -1,48 +0,0 @@ -package ch.tutteli.atrium.core.robstoll.lib.creating - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.core.Option -import ch.tutteli.atrium.core.getOrElse -import ch.tutteli.atrium.creating.Expect - -/** - * A base class for assertion containers which are based on a mutable list, it provides [getCopyOfAssertions] to get - * so far added assertions as well as [clearAssertions] to reset them -- this class is intentionally not thread-safe - * and thus not intended for multi-thread usage. - */ -abstract class MutableListBasedAssertionContainer( - override val maybeSubject: Option -) : Expect { - - @Deprecated( - "Do not access subject as it might break reporting. In contexts where it is safe to access the subject, it is passed by parameter and can be accessed via `it`. See KDoc for migration hints; will be removed with 1.0.0", - ReplaceWith("it") - ) - final override val subject: T by lazy { - maybeSubject.getOrElse { - @Suppress("DEPRECATION") - throw ch.tutteli.atrium.creating.PlantHasNoSubjectException() - } - } - - /** - * All made assertions so far. They can be cleared calling [clearAssertions]. - * This list is intentionally not thread-safe, this class is not intended for multi-thread usage. - */ - private val assertions: MutableList = mutableListOf() - - override fun addAssertion(assertion: Assertion): Expect { - assertions.add(assertion) - return this - } - - /** - * Returns a copy of the so far added assertions (assertions can be cleared calling [clearAssertions]). - */ - protected fun getCopyOfAssertions(): List = assertions.toList() - - /** - * Clears the list of assertions - */ - protected fun clearAssertions(): Unit = assertions.clear() -} diff --git a/core/robstoll-lib/atrium-core-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/core/robstoll/lib/creating/MutableListBasedAssertionPlant.kt b/core/robstoll-lib/atrium-core-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/core/robstoll/lib/creating/MutableListBasedAssertionPlant.kt deleted file mode 100644 index 64ccc159f..000000000 --- a/core/robstoll-lib/atrium-core-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/core/robstoll/lib/creating/MutableListBasedAssertionPlant.kt +++ /dev/null @@ -1,39 +0,0 @@ -@file:Suppress("DEPRECATION" /* will be removed with 1.0.0 */) - -package ch.tutteli.atrium.core.robstoll.lib.creating - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.creating.BaseAssertionPlant - -abstract class MutableListBasedAssertionPlant>( - override val subjectProvider: () -> T -) : BaseAssertionPlant { - - /** - * The subject of an [Assertion]. - */ - @Deprecated( - "Do not access subject as it might break reporting. In contexts where it is safe to access the subject, it is passed by parameter." - ) - final override val subject: T by lazy { subjectProvider() } - - /** - * The instance itself but typed as [A] which is the type used for the fluent style API. - */ - protected abstract val self: A - - /** - * All made assertions so far. They can be cleared calling [clearAssertions]. - * This list is intentionally not thread-safe, this class is not intended for multi-thread usage. - */ - private val assertions: MutableList = mutableListOf() - - - override fun addAssertion(assertion: Assertion): A { - assertions.add(assertion) - return self - } - - fun getAssertions(): List = assertions.toList() - protected fun clearAssertions() = assertions.clear() -} diff --git a/core/robstoll-lib/atrium-core-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/core/robstoll/lib/creating/MutableListBasedReportingAssertionPlant.kt b/core/robstoll-lib/atrium-core-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/core/robstoll/lib/creating/MutableListBasedReportingAssertionPlant.kt deleted file mode 100644 index a672aecfd..000000000 --- a/core/robstoll-lib/atrium-core-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/core/robstoll/lib/creating/MutableListBasedReportingAssertionPlant.kt +++ /dev/null @@ -1,30 +0,0 @@ -@file:Suppress("DEPRECATION" /* will be removed with 1.0.0 */) - -package ch.tutteli.atrium.core.robstoll.lib.creating - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.creating.AssertionPlantWithCommonFields -import ch.tutteli.atrium.creating.BaseAssertionPlant -import ch.tutteli.atrium.creating.BaseReportingAssertionPlant - -@Deprecated("Switch from Assert to Expect, will be removed with 1.0.0") -abstract class MutableListBasedReportingAssertionPlant>( - override val commonFields: AssertionPlantWithCommonFields.CommonFields -) : MutableListBasedAssertionPlant(commonFields.subjectProvider), - BaseReportingAssertionPlant { - - final override fun addAssertion(assertion: Assertion): A { - super.addAssertion(assertion) - checkAssertions() - return self - } - - private fun checkAssertions(): A { - try { - commonFields.check(getAssertions()) - } finally { - clearAssertions() - } - return self - } -} diff --git a/core/robstoll-lib/atrium-core-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/core/robstoll/lib/creating/ReportingAssertionContainerImpl.kt b/core/robstoll-lib/atrium-core-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/core/robstoll/lib/creating/ReportingAssertionContainerImpl.kt deleted file mode 100644 index 0a541964f..000000000 --- a/core/robstoll-lib/atrium-core-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/core/robstoll/lib/creating/ReportingAssertionContainerImpl.kt +++ /dev/null @@ -1,44 +0,0 @@ -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.core.robstoll.lib.creating - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.assertions.builders.assertionBuilder -import ch.tutteli.atrium.assertions.builders.invisibleGroup -import ch.tutteli.atrium.checking.AssertionChecker -import ch.tutteli.atrium.creating.* - -@Deprecated("Use RootExpect, will be removed with 1.0.0") -class ReportingAssertionContainerImpl( - private val assertionCheckerDecorator: ReportingAssertionContainer.AssertionCheckerDecorator -) : MutableListBasedAssertionContainer(assertionCheckerDecorator.maybeSubject), - ReportingAssertionContainer { - - override val assertionChecker: AssertionChecker get() = assertionCheckerDecorator.assertionChecker - - override fun addAssertionsCreatedBy(assertionCreator: Expect.() -> Unit): Expect { - val assertions = CollectingExpect(maybeSubject) - .addAssertionsCreatedBy(assertionCreator) - .getAssertions() - return when (assertions.size) { - 0 -> this - 1 -> addAssertion(assertions.first()) - else -> addAssertion(assertionBuilder.invisibleGroup.withAssertions(assertions).build()) - } - } - - override fun addAssertion(assertion: Assertion): Expect { - super.addAssertion(assertion) - checkAndClearAssertions() - return this - } - - private fun checkAndClearAssertions(): Expect { - try { - assertionCheckerDecorator.check(getCopyOfAssertions()) - } finally { - clearAssertions() - } - return this - } -} diff --git a/core/robstoll-lib/atrium-core-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/core/robstoll/lib/creating/ReportingAssertionPlantImpl.kt b/core/robstoll-lib/atrium-core-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/core/robstoll/lib/creating/ReportingAssertionPlantImpl.kt deleted file mode 100644 index 5f5abccdc..000000000 --- a/core/robstoll-lib/atrium-core-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/core/robstoll/lib/creating/ReportingAssertionPlantImpl.kt +++ /dev/null @@ -1,41 +0,0 @@ -@file:Suppress("DEPRECATION" /* will be removed with 1.0.0 */) - -package ch.tutteli.atrium.core.robstoll.lib.creating - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.assertions.builders.assertionBuilder -import ch.tutteli.atrium.assertions.builders.invisibleGroup -import ch.tutteli.atrium.core.coreFactory -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.creating.AssertionPlantWithCommonFields -import ch.tutteli.atrium.creating.ReportingAssertionPlant - -/** - * An [AssertionPlant] which checks each added [Assertion] immediately. - * - * @param T The type of the [subject] of this [AssertionPlant]. - * - * @constructor An [AssertionPlant] which checks each added [Assertion] immediately. - * @param commonFields The [AssertionPlantWithCommonFields.CommonFields] of this [AssertionPlant]. - * - * This class is not thread-safe, but is also not intended for long-running procedures. - */ -class ReportingAssertionPlantImpl( - commonFields: AssertionPlantWithCommonFields.CommonFields -) : MutableListBasedReportingAssertionPlant>(commonFields), - ReportingAssertionPlant { - - override val self = this - - override fun addAssertionsCreatedBy(assertionCreator: AssertionPlant.() -> Unit): AssertionPlant { - @Suppress("DEPRECATION") - val assertions = coreFactory.newCollectingPlant { subject } - .addAssertionsCreatedBy(assertionCreator) - .getAssertions() - return when(assertions.size){ - 0 -> this - 1 -> addAssertion(assertions.first()) - else -> addAssertion(assertionBuilder.invisibleGroup.withAssertions(assertions).build()) - } - } -} diff --git a/core/robstoll-lib/atrium-core-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/core/robstoll/lib/creating/ReportingAssertionPlantNullableImpl.kt b/core/robstoll-lib/atrium-core-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/core/robstoll/lib/creating/ReportingAssertionPlantNullableImpl.kt deleted file mode 100644 index 7f38d0e71..000000000 --- a/core/robstoll-lib/atrium-core-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/core/robstoll/lib/creating/ReportingAssertionPlantNullableImpl.kt +++ /dev/null @@ -1,23 +0,0 @@ -@file:Suppress("DEPRECATION" /* will be removed with 1.0.0 */) - -package ch.tutteli.atrium.core.robstoll.lib.creating - -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.creating.AssertionPlantNullable -import ch.tutteli.atrium.creating.AssertionPlantWithCommonFields -import ch.tutteli.atrium.creating.ReportingAssertionPlantNullable - -/** - * An [AssertionPlant] for nullable types. - * - * @param T The type of the [subject] of this [AssertionPlant]. - * - * @constructor An [AssertionPlant] for nullable types. - * @param commonFields The [AssertionPlantWithCommonFields.CommonFields] of this [AssertionPlant]. - */ -class ReportingAssertionPlantNullableImpl( - commonFields: AssertionPlantWithCommonFields.CommonFields -) : MutableListBasedReportingAssertionPlant>(commonFields), - ReportingAssertionPlantNullable { - override val self = this -} diff --git a/core/robstoll-lib/atrium-core-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/core/robstoll/lib/reporting/DetailedObjectFormatter.kt b/core/robstoll-lib/atrium-core-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/core/robstoll/lib/reporting/DetailedObjectFormatter.kt index c6137b17c..7f72b537a 100644 --- a/core/robstoll-lib/atrium-core-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/core/robstoll/lib/reporting/DetailedObjectFormatter.kt +++ b/core/robstoll-lib/atrium-core-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/core/robstoll/lib/reporting/DetailedObjectFormatter.kt @@ -4,7 +4,6 @@ import ch.tutteli.atrium.core.polyfills.fullName import ch.tutteli.atrium.reporting.* import ch.tutteli.atrium.reporting.translating.Translatable import ch.tutteli.atrium.reporting.translating.Translator -import ch.tutteli.atrium.translations.ErrorMessages import kotlin.reflect.KClass expect class DetailedObjectFormatter(translator: Translator) : ObjectFormatter @@ -43,7 +42,7 @@ abstract class DetailedObjectFormatterCommon( @Suppress( /* TODO remove with 1.0.0 */ "DEPRECATION") override fun format(value: Any?): String = when (value) { null -> Text.NULL.string - is LazyRepresentation -> format(safeEval(value)) + is LazyRepresentation -> format(value.eval()) is Char -> "'$value'" is Boolean -> value.toString() is String -> format(value) @@ -60,14 +59,6 @@ abstract class DetailedObjectFormatterCommon( else -> limitRepresentation(value.toString()) + classNameAndIdentity(value) } - private fun safeEval(lazyRepresentation: LazyRepresentation) = - //TODO remove try-catch with 1.0.0 should no longer be necessary - try { - lazyRepresentation.eval() - } catch (@Suppress("DEPRECATION") e: ch.tutteli.atrium.creating.PlantHasNoSubjectException) { - ErrorMessages.REPRESENTATION_BASED_ON_SUBJECT_NOT_DEFINED - } - private fun format(string: String) = "\"${limitRepresentation(string)}\"" + identityHash(INDENT, string) private fun format(charSequence: CharSequence) = "\"${limitRepresentation(charSequence.toString())}\"" + classNameAndIdentity(charSequence) private fun format(enum: Enum<*>) = diff --git a/core/robstoll-lib/atrium-core-robstoll-lib-common/src/test/kotlin/ch/tutteli/atrium/core/robstoll/lib/checking/DelegatingAssertionCheckerSpec.kt b/core/robstoll-lib/atrium-core-robstoll-lib-common/src/test/kotlin/ch/tutteli/atrium/core/robstoll/lib/checking/DelegatingAssertionCheckerSpec.kt deleted file mode 100644 index 9d6f11dff..000000000 --- a/core/robstoll-lib/atrium-core-robstoll-lib-common/src/test/kotlin/ch/tutteli/atrium/core/robstoll/lib/checking/DelegatingAssertionCheckerSpec.kt +++ /dev/null @@ -1,8 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.core.robstoll.lib.checking - -object DelegatingAssertionCheckerSpec : ch.tutteli.atrium.specs.checking.DelegatingAssertionCheckerSpec( - ::DelegatingAssertionChecker -) diff --git a/core/robstoll-lib/atrium-core-robstoll-lib-common/src/test/kotlin/ch/tutteli/atrium/core/robstoll/lib/checking/FeatureAssertionCheckerSpec.kt b/core/robstoll-lib/atrium-core-robstoll-lib-common/src/test/kotlin/ch/tutteli/atrium/core/robstoll/lib/checking/FeatureAssertionCheckerSpec.kt deleted file mode 100644 index 24704cb16..000000000 --- a/core/robstoll-lib/atrium-core-robstoll-lib-common/src/test/kotlin/ch/tutteli/atrium/core/robstoll/lib/checking/FeatureAssertionCheckerSpec.kt +++ /dev/null @@ -1,8 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.core.robstoll.lib.checking - -object FeatureAssertionCheckerSpec : ch.tutteli.atrium.specs.checking.FeatureAssertionCheckerSpec( - ::FeatureAssertionChecker -) diff --git a/core/robstoll-lib/atrium-core-robstoll-lib-common/src/test/kotlin/ch/tutteli/atrium/core/robstoll/lib/checking/ThrowingAssertionCheckerSpec.kt b/core/robstoll-lib/atrium-core-robstoll-lib-common/src/test/kotlin/ch/tutteli/atrium/core/robstoll/lib/checking/ThrowingAssertionCheckerSpec.kt deleted file mode 100644 index 9adfd934a..000000000 --- a/core/robstoll-lib/atrium-core-robstoll-lib-common/src/test/kotlin/ch/tutteli/atrium/core/robstoll/lib/checking/ThrowingAssertionCheckerSpec.kt +++ /dev/null @@ -1,8 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.core.robstoll.lib.checking - -object ThrowingAssertionCheckerSpec : ch.tutteli.atrium.specs.checking.ThrowingAssertionCheckerSpec( - ::ThrowingAssertionChecker -) diff --git a/core/robstoll-lib/atrium-core-robstoll-lib-common/src/test/kotlin/ch/tutteli/atrium/core/robstoll/lib/creating/CollectingAssertionContainerSpec.kt b/core/robstoll-lib/atrium-core-robstoll-lib-common/src/test/kotlin/ch/tutteli/atrium/core/robstoll/lib/creating/CollectingAssertionContainerSpec.kt deleted file mode 100644 index 307d4ddfa..000000000 --- a/core/robstoll-lib/atrium-core-robstoll-lib-common/src/test/kotlin/ch/tutteli/atrium/core/robstoll/lib/creating/CollectingAssertionContainerSpec.kt +++ /dev/null @@ -1,6 +0,0 @@ -package ch.tutteli.atrium.core.robstoll.lib.creating - - -object CollectingAssertionContainerSpec : ch.tutteli.atrium.specs.creating.CollectingAssertionContainerSpec( - ::CollectingAssertionContainerImpl -) diff --git a/core/robstoll-lib/atrium-core-robstoll-lib-common/src/test/kotlin/ch/tutteli/atrium/core/robstoll/lib/creating/ReportingAssertionContainerSpec.kt b/core/robstoll-lib/atrium-core-robstoll-lib-common/src/test/kotlin/ch/tutteli/atrium/core/robstoll/lib/creating/ReportingAssertionContainerSpec.kt deleted file mode 100644 index e0fbb4827..000000000 --- a/core/robstoll-lib/atrium-core-robstoll-lib-common/src/test/kotlin/ch/tutteli/atrium/core/robstoll/lib/creating/ReportingAssertionContainerSpec.kt +++ /dev/null @@ -1,8 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.core.robstoll.lib.creating - -object ReportingAssertionContainerSpec : ch.tutteli.atrium.specs.creating.ReportingAssertionContainerSpec( - ::ReportingAssertionContainerImpl -) diff --git a/core/robstoll-lib/atrium-core-robstoll-lib-js/build.gradle b/core/robstoll-lib/atrium-core-robstoll-lib-js/build.gradle index 170154164..396a44062 100644 --- a/core/robstoll-lib/atrium-core-robstoll-lib-js/build.gradle +++ b/core/robstoll-lib/atrium-core-robstoll-lib-js/build.gradle @@ -14,7 +14,7 @@ dependencies { testImplementation prefixedProject('specs-js') } -//TODO should not be necessary https://youtrack.jetbrains.com/issue/KT-27797 +//TODO 0.16.0 or 0.17.0 should not be necessary https://youtrack.jetbrains.com/issue/KT-27797 compileTestKotlin2Js.dependsOn( prefixedProject('core-robstoll-js').jar, prefixedProject('domain-robstoll-js').jar diff --git a/core/robstoll-lib/atrium-core-robstoll-lib-jvm/build.gradle b/core/robstoll-lib/atrium-core-robstoll-lib-jvm/build.gradle index 680ccd6c4..8b0b73222 100644 --- a/core/robstoll-lib/atrium-core-robstoll-lib-jvm/build.gradle +++ b/core/robstoll-lib/atrium-core-robstoll-lib-jvm/build.gradle @@ -11,12 +11,9 @@ dependencies { testImplementation prefixedProject('api-fluent-en_GB-jvm') testImplementation prefixedProject('specs-jvm') - - //TODO remove with 1.0.0 - testImplementation prefixedProject('spec') } -//TODO should not be necessary https://youtrack.jetbrains.com/issue/KT-28124 +//TODO 0.16.0 or 0.17.0 should not be necessary https://youtrack.jetbrains.com/issue/KT-28124 compileTestKotlin.dependsOn( prefixedProject('core-robstoll-jvm').compileKotlin, prefixedProject('core-robstoll-jvm').processResources, diff --git a/core/robstoll-lib/atrium-core-robstoll-lib-jvm/src/module/module-info.java b/core/robstoll-lib/atrium-core-robstoll-lib-jvm/src/module/module-info.java index 42043b15c..4c8f02a2b 100644 --- a/core/robstoll-lib/atrium-core-robstoll-lib-jvm/src/module/module-info.java +++ b/core/robstoll-lib/atrium-core-robstoll-lib-jvm/src/module/module-info.java @@ -4,8 +4,6 @@ module ch.tutteli.atrium.core.robstoll.lib { requires static ch.tutteli.atrium.translations.en_GB; requires kotlin.stdlib; - exports ch.tutteli.atrium.core.robstoll.lib.checking; - exports ch.tutteli.atrium.core.robstoll.lib.creating; exports ch.tutteli.atrium.core.robstoll.lib.reporting; exports ch.tutteli.atrium.core.robstoll.lib.reporting.translating; } diff --git a/core/robstoll-lib/atrium-core-robstoll-lib-jvm/src/test/kotlin/ch/tutteli/atrium/core/robstoll/lib/creating/CheckingAssertionPlantSpec.kt b/core/robstoll-lib/atrium-core-robstoll-lib-jvm/src/test/kotlin/ch/tutteli/atrium/core/robstoll/lib/creating/CheckingAssertionPlantSpec.kt deleted file mode 100644 index d546cf8ee..000000000 --- a/core/robstoll-lib/atrium-core-robstoll-lib-jvm/src/test/kotlin/ch/tutteli/atrium/core/robstoll/lib/creating/CheckingAssertionPlantSpec.kt +++ /dev/null @@ -1,10 +0,0 @@ -@file:Suppress("DEPRECATION" /* will be removed with 1.0.0 */) - -package ch.tutteli.atrium.core.robstoll.lib.creating - -import ch.tutteli.atrium.verbs.internal.AssertionVerbFactory - -//TODO remove with 1.0.0 - no need to migrate to Spek2 -object CheckingAssertionPlantSpec : ch.tutteli.atrium.spec.creating.CheckingAssertionPlantSpec( - AssertionVerbFactory, { a -> CheckingAssertionPlantImpl { a } } -) diff --git a/core/robstoll-lib/atrium-core-robstoll-lib-jvm/src/test/kotlin/ch/tutteli/atrium/core/robstoll/lib/creating/CollectingAssertionPlantSpec.kt b/core/robstoll-lib/atrium-core-robstoll-lib-jvm/src/test/kotlin/ch/tutteli/atrium/core/robstoll/lib/creating/CollectingAssertionPlantSpec.kt deleted file mode 100644 index 9e8f40fd2..000000000 --- a/core/robstoll-lib/atrium-core-robstoll-lib-jvm/src/test/kotlin/ch/tutteli/atrium/core/robstoll/lib/creating/CollectingAssertionPlantSpec.kt +++ /dev/null @@ -1,10 +0,0 @@ -@file:Suppress("DEPRECATION" /* will be removed with 1.0.0 */) - -package ch.tutteli.atrium.core.robstoll.lib.creating - -import ch.tutteli.atrium.verbs.internal.AssertionVerbFactory - -//TODO remove with 1.0.0 - no need to migrate to Spek2 -object CollectingAssertionPlantSpec : ch.tutteli.atrium.spec.creating.CollectingAssertionPlantSpec( - AssertionVerbFactory, ::CollectingAssertionPlantImpl -) diff --git a/core/robstoll-lib/atrium-core-robstoll-lib-jvm/src/test/kotlin/ch/tutteli/atrium/core/robstoll/lib/creating/ReportingAssertionPlantSpec.kt b/core/robstoll-lib/atrium-core-robstoll-lib-jvm/src/test/kotlin/ch/tutteli/atrium/core/robstoll/lib/creating/ReportingAssertionPlantSpec.kt deleted file mode 100644 index cfeb02a33..000000000 --- a/core/robstoll-lib/atrium-core-robstoll-lib-jvm/src/test/kotlin/ch/tutteli/atrium/core/robstoll/lib/creating/ReportingAssertionPlantSpec.kt +++ /dev/null @@ -1,10 +0,0 @@ -@file:Suppress("DEPRECATION" /* will be removed with 1.0.0 */) - -package ch.tutteli.atrium.core.robstoll.lib.creating - -import ch.tutteli.atrium.verbs.internal.AssertionVerbFactory - -//TODO remove with 1.0.0 - no need to migrate to Spek2 -object ReportingAssertionPlantSpec : ch.tutteli.atrium.spec.creating.ReportingAssertionPlantSpec( - AssertionVerbFactory, ::ReportingAssertionPlantImpl -) diff --git a/core/robstoll/atrium-core-robstoll-common/src/main/kotlin/ch/tutteli/atrium/core/robstoll/CoreFactoryCommonImpl.kt b/core/robstoll/atrium-core-robstoll-common/src/main/kotlin/ch/tutteli/atrium/core/robstoll/CoreFactoryCommonImpl.kt index 72bb9693b..670218465 100644 --- a/core/robstoll/atrium-core-robstoll-common/src/main/kotlin/ch/tutteli/atrium/core/robstoll/CoreFactoryCommonImpl.kt +++ b/core/robstoll/atrium-core-robstoll-common/src/main/kotlin/ch/tutteli/atrium/core/robstoll/CoreFactoryCommonImpl.kt @@ -2,12 +2,9 @@ package ch.tutteli.atrium.core.robstoll import ch.tutteli.atrium.assertions.BulletPointIdentifier import ch.tutteli.atrium.core.CoreFactoryCommon -import ch.tutteli.atrium.core.Option -import ch.tutteli.atrium.core.robstoll.lib.creating.* import ch.tutteli.atrium.core.robstoll.lib.reporting.* import ch.tutteli.atrium.core.robstoll.lib.reporting.translating.CoroutineBasedLocaleOrderDecider import ch.tutteli.atrium.core.robstoll.lib.reporting.translating.TranslationSupplierBasedTranslator -import ch.tutteli.atrium.creating.* import ch.tutteli.atrium.reporting.* import ch.tutteli.atrium.reporting.translating.Locale import ch.tutteli.atrium.reporting.translating.LocaleOrderDecider @@ -20,91 +17,6 @@ import kotlin.reflect.KClass */ abstract class CoreFactoryCommonImpl : CoreFactoryCommon { - @Suppress("OverridingDeprecatedMember", "DEPRECATION") - final override fun newReportingAssertionContainer( - assertionCheckerDecorator: ReportingAssertionContainer.AssertionCheckerDecorator - ): ReportingAssertionContainer = ReportingAssertionContainerImpl(assertionCheckerDecorator) - - @Suppress("DEPRECATION") - @Deprecated( - "Switch to Expect instead of Assert, thus use newReportingAssertionContainer instead", - ReplaceWith("this.newReportingAssertionContainer(commonFields)") - ) - final override fun newReportingPlant( - commonFields: AssertionPlantWithCommonFields.CommonFields - ): ReportingAssertionPlant = ReportingAssertionPlantImpl(commonFields) - - @Suppress("DEPRECATION") - @Deprecated( - "Switch to Expect instead of Assert, thus use newReportingAssertionContainer instead", - ReplaceWith("this.newReportingAssertionContainer(commonFields)") - ) - final override fun newReportingPlantNullable( - commonFields: AssertionPlantWithCommonFields.CommonFields - ): ReportingAssertionPlantNullable = ReportingAssertionPlantNullableImpl(commonFields) - - @Suppress("DEPRECATION") - @Deprecated( - "Switch from Assert to Expect and use newCollectingAssertionContainer instead", - ReplaceWith( - "this.newCollectingAssertionContainer(Some(subjectProvider - /* define the subject here instead of subjectProvider - in case you have a transformation from an existing subject, then use maybeSubject.map { } */))", - "ch.tutteli.atrium.core.Some" - ) - ) - final override fun newCheckingPlant( - subjectProvider: () -> T - ): CheckingAssertionPlant = CheckingAssertionPlantImpl(subjectProvider) - - - @Suppress("OverridingDeprecatedMember", "DEPRECATION") - final override fun newCollectingAssertionContainer( - maybeSubject: Option - ): CollectingAssertionContainer = CollectingAssertionContainerImpl(maybeSubject) - - @Suppress("DEPRECATION") - @Deprecated( - "Switch to Expect instead of Assert, thus use newCollectingAssertionContainer instead", - ReplaceWith( - "this.newCollectingAssertionContainer(Some(subjectProvider - /* define the subject here instead of subjectProvider - in case you have a transformation from an existing subject, then use maybeSubject.map { } */))", - "ch.tutteli.atrium.core.Some" - ) - ) - final override fun newCollectingPlant( - subjectProvider: () -> T - ): CollectingAssertionPlant = CollectingAssertionPlantImpl(subjectProvider) - - @Suppress("DEPRECATION") - @Deprecated( - "Switch to Expect instead of Assert, thus use newCollectingAssertionContainer instead", - ReplaceWith( - "this.newCollectingAssertionContainer(Some(subjectProvider - /* define the subject here instead of subjectProvider - in case you have a transformation from an existing subject, then use maybeSubject.map { } */))", - "ch.tutteli.atrium.core.Some" - ) - ) - final override fun newCollectingPlantNullable( - subjectProvider: () -> T - ): CollectingAssertionPlantNullable = CollectingAssertionPlantNullableImpl(subjectProvider) - - @Suppress("OverridingDeprecatedMember", "DEPRECATION") - final override fun newThrowingAssertionChecker( - reporter: Reporter - ): ch.tutteli.atrium.checking.AssertionChecker = ch.tutteli.atrium.core.robstoll.lib.checking.ThrowingAssertionChecker(reporter) - - @Suppress("OverridingDeprecatedMember", "DEPRECATION") - final override fun newFeatureAssertionChecker( - originalAssertionHolder: AssertionHolder - ): ch.tutteli.atrium.checking.AssertionChecker = ch.tutteli.atrium.core.robstoll.lib.checking.FeatureAssertionChecker(originalAssertionHolder) - - @Suppress("OverridingDeprecatedMember", "DEPRECATION") - override fun newDelegatingAssertionChecker( - originalAssertionHolder: AssertionHolder - ): ch.tutteli.atrium.checking.AssertionChecker = ch.tutteli.atrium.core.robstoll.lib.checking.DelegatingAssertionChecker(originalAssertionHolder) - - @Suppress("OverridingDeprecatedMember", "DEPRECATION") - final override fun newDelegatingAssertionChecker( - subjectPlant: BaseAssertionPlant - ): ch.tutteli.atrium.checking.AssertionChecker = newDelegatingAssertionChecker(subjectPlant as AssertionHolder) - final override fun newMethodCallFormatter(): MethodCallFormatter = TextMethodCallFormatter final override fun newTranslator( diff --git a/gradle/scripts/gh-pages.gradle b/gradle/scripts/gh-pages.gradle index 9edca5e57..3024df696 100644 --- a/gradle/scripts/gh-pages.gradle +++ b/gradle/scripts/gh-pages.gradle @@ -68,14 +68,8 @@ dokka { [ "ch.tutteli.atrium.creating.impl", "ch.tutteli.atrium.api.verbs.internal", - "ch.tutteli.atrium.logic.creating.basic.contains.steps.impl", - "ch.tutteli.atrium.logic.creating.charsequence.contains.steps.impl", - //TODO remove the below with 1.0.0 - "ch.tutteli.atrium.api.cc.de_CH.creating.charsequence.contains.builders.impl", - "ch.tutteli.atrium.api.cc.de_CH.creating.iterable.contains.builders.impl", - "ch.tutteli.atrium.assertions.builders.impl", + //TODO remove the below with 0.17.0 "ch.tutteli.atrium.domain.builders.reporting.impl", - "ch.tutteli.atrium.domain.builders.creating.changers.impl", ].each { pkg -> packageOptions { diff --git a/logic/atrium-logic-common/src/test/kotlin/ch/tutteli/atrium/logic/LazyThreadUnsafeAssertionGroupSpec.kt b/logic/atrium-logic-common/src/test/kotlin/ch/tutteli/atrium/logic/assertions/LazyThreadUnsafeAssertionGroupSpec.kt similarity index 98% rename from logic/atrium-logic-common/src/test/kotlin/ch/tutteli/atrium/logic/LazyThreadUnsafeAssertionGroupSpec.kt rename to logic/atrium-logic-common/src/test/kotlin/ch/tutteli/atrium/logic/assertions/LazyThreadUnsafeAssertionGroupSpec.kt index 6d677b92d..14ecbfa57 100644 --- a/logic/atrium-logic-common/src/test/kotlin/ch/tutteli/atrium/logic/LazyThreadUnsafeAssertionGroupSpec.kt +++ b/logic/atrium-logic-common/src/test/kotlin/ch/tutteli/atrium/logic/assertions/LazyThreadUnsafeAssertionGroupSpec.kt @@ -1,4 +1,4 @@ -package ch.tutteli.atrium.logic +package ch.tutteli.atrium.logic.assertions import ch.tutteli.atrium.api.fluent.en_GB.containsExactly import ch.tutteli.atrium.api.fluent.en_GB.toBe diff --git a/logic/atrium-logic-common/src/test/kotlin/ch/tutteli/atrium/logic/utils/MapArgumentsSpec.kt b/logic/atrium-logic-common/src/test/kotlin/ch/tutteli/atrium/logic/utils/MapArgumentsSpec.kt index 2449d6798..e813416d9 100644 --- a/logic/atrium-logic-common/src/test/kotlin/ch/tutteli/atrium/logic/utils/MapArgumentsSpec.kt +++ b/logic/atrium-logic-common/src/test/kotlin/ch/tutteli/atrium/logic/utils/MapArgumentsSpec.kt @@ -4,12 +4,10 @@ package ch.tutteli.atrium.logic.utils import ch.tutteli.atrium.api.fluent.en_GB.* import ch.tutteli.atrium.api.verbs.internal.expect import ch.tutteli.atrium.domain.builders.creating.PleaseUseReplacementException -import ch.tutteli.atrium.domain.builders.migration.asExpect import ch.tutteli.atrium.logic._logic import ch.tutteli.atrium.logic.changeSubject import org.spekframework.spek2.Spek import org.spekframework.spek2.style.specification.describe -import ch.tutteli.atrium.verbs.internal.assert as deprecatedAssert object MapArgumentsSpec : Spek({ diff --git a/logic/extensions/kotlin_1_3/atrium-logic-kotlin_1_3-common/build.gradle b/logic/extensions/kotlin_1_3/atrium-logic-kotlin_1_3-common/build.gradle index 55e50bf91..f6be93f39 100644 --- a/logic/extensions/kotlin_1_3/atrium-logic-kotlin_1_3-common/build.gradle +++ b/logic/extensions/kotlin_1_3/atrium-logic-kotlin_1_3-common/build.gradle @@ -6,7 +6,6 @@ dependencies { // it is up to the consumer which atrium-translations module is used at runtime compileOnly prefixedProject('translations-en_GB-common') - testImplementation prefixedProject('api-fluent-en_GB-common') testImplementation prefixedProject('specs-common') } diff --git a/logic/extensions/kotlin_1_3/atrium-logic-kotlin_1_3-js/build.gradle b/logic/extensions/kotlin_1_3/atrium-logic-kotlin_1_3-js/build.gradle index d36517632..4c574c380 100644 --- a/logic/extensions/kotlin_1_3/atrium-logic-kotlin_1_3-js/build.gradle +++ b/logic/extensions/kotlin_1_3/atrium-logic-kotlin_1_3-js/build.gradle @@ -6,6 +6,5 @@ dependencies { // it is up to the consumer which atrium-translations module is used at runtime compileOnly prefixedProject('translations-en_GB-js') - testImplementation prefixedProject('api-fluent-en_GB-js') testImplementation prefixedProject('specs-js') } diff --git a/logic/extensions/kotlin_1_3/atrium-logic-kotlin_1_3-jvm/build.gradle b/logic/extensions/kotlin_1_3/atrium-logic-kotlin_1_3-jvm/build.gradle index 00f659fe7..552523221 100644 --- a/logic/extensions/kotlin_1_3/atrium-logic-kotlin_1_3-jvm/build.gradle +++ b/logic/extensions/kotlin_1_3/atrium-logic-kotlin_1_3-jvm/build.gradle @@ -6,6 +6,5 @@ dependencies { // it is up to the consumer which atrium-translations module is used at runtime compileOnly prefixedProject('translations-en_GB-jvm') - testImplementation prefixedProject('api-fluent-en_GB-jvm') testImplementation prefixedProject('specs-jvm') } diff --git a/misc/deprecated/apis/atrium-api-cc-en_UK/build.gradle b/misc/deprecated/apis/atrium-api-cc-en_UK/build.gradle deleted file mode 100644 index 30aab4328..000000000 --- a/misc/deprecated/apis/atrium-api-cc-en_UK/build.gradle +++ /dev/null @@ -1,10 +0,0 @@ -description = 'Deprecated, use atrium-api-cc-en_GB-jvm instead.' - -ext.jacoco_additional = [prefixedProject('translations-en_GB-jvm')] - -dependencies { - api prefixedProject('domain-api-deprecated') - api prefixedProject('domain-builders-jvm') - - testImplementation prefixedProject('verbs-internal-jvm') -} diff --git a/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/CharSequenceContainsSearchersKt.kt b/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/CharSequenceContainsSearchersKt.kt deleted file mode 100644 index 05200aa6e..000000000 --- a/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/CharSequenceContainsSearchersKt.kt +++ /dev/null @@ -1,104 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0 */) -package ch.tutteli.atrium.api.cc.en_UK - -import ch.tutteli.atrium.assertions.charsequence.contains.builders.CharSequenceContainsCheckerBuilder -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.domain.creating.charsequence.contains.searchbehaviours.IgnoringCaseSearchBehaviour -import ch.tutteli.atrium.domain.creating.charsequence.contains.searchbehaviours.NoOpSearchBehaviour -import ch.tutteli.atrium.reporting.translating.Translatable - -/** - * `Deprecated`, do not use this class, it is only here to retain binary compatibility. - */ -@Deprecated("Do not use this class, it is only here to retain binary compatibility (file was renamed to charSequenceContainsCreators); will be removed with 1.0.0") -object CharSequenceContainsSearchersKt { - - @JvmStatic - @Deprecated( - "Use the extension fun `value` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", - ReplaceWith("checkerBuilder.value(expected)") - ) - fun value( - checkerBuilder: CharSequenceContainsCheckerBuilder, - expected: Any - ): AssertionPlant = values(checkerBuilder, expected) - - @JvmStatic - @Deprecated( - "Use the extension fun `the` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", - ReplaceWith("checkerBuilder.values(expected, *otherExpected)") - ) - fun values( - checkerBuilder: CharSequenceContainsCheckerBuilder, - expected: Any, - vararg otherExpected: Any - ): AssertionPlant = checkerBuilder.values(expected, *otherExpected) - - - @JvmStatic - @Deprecated( - "Use the extension fun `value` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", - ReplaceWith("checkerBuilder.value(expected)") - ) - fun valueIgnoringCase( - checkerBuilder: CharSequenceContainsCheckerBuilder, - expected: Any - ): AssertionPlant = valuesIgnoringCase(checkerBuilder, expected) - - @JvmStatic - @Deprecated( - "Use the extension fun `values` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", - ReplaceWith("checkerBuilder.values(expected, *otherExpected)") - ) - fun valuesIgnoringCase( - checkerBuilder: CharSequenceContainsCheckerBuilder, - expected: Any, - vararg otherExpected: Any - ): AssertionPlant = checkerBuilder.values(expected, *otherExpected) - - - @JvmStatic - @Deprecated( - "Use the extension fun `defaultTranslationOf` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", - ReplaceWith("checkerBuilder.defaultTranslationOf(expected, *otherExpected)") - ) - fun defaultTranslationOf( - checkerBuilder: CharSequenceContainsCheckerBuilder, - expected: Translatable, - vararg otherExpected: Translatable - ): AssertionPlant = checkerBuilder.defaultTranslationOf(expected, *otherExpected) - - @JvmStatic - @Deprecated( - "Use the extension fun `defaultTranslationOf` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", - ReplaceWith("checkerBuilder.defaultTranslationOf(expected, *otherExpected)") - ) - fun defaultTranslationOfIgnoringCase( - checkerBuilder: CharSequenceContainsCheckerBuilder, - expected: Translatable, - vararg otherExpected: Translatable - ): AssertionPlant = checkerBuilder.defaultTranslationOf(expected, *otherExpected) - - - @JvmStatic - @Deprecated( - "Use the extension fun `regex` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", - ReplaceWith("checkerBuilder.regex(pattern, *otherPatterns)") - ) - fun regex( - checkerBuilder: CharSequenceContainsCheckerBuilder, - pattern: String, - vararg otherPatterns: String - ): AssertionPlant = checkerBuilder.regex(pattern, *otherPatterns) - - @JvmStatic - @Deprecated( - "Use the extension fun `regex` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", - ReplaceWith("checkerBuilder.regex(pattern, *otherPatterns)") - ) - fun regexIgnoringCase( - checkerBuilder: CharSequenceContainsCheckerBuilder, - pattern: String, - vararg otherPatterns: String - ): AssertionPlant = checkerBuilder.regex(pattern, *otherPatterns) -} diff --git a/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/anyAssertions.kt b/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/anyAssertions.kt deleted file mode 100644 index 11bf9fed8..000000000 --- a/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/anyAssertions.kt +++ /dev/null @@ -1,103 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") - -package ch.tutteli.atrium.api.cc.en_UK - -import ch.tutteli.atrium.checking.AssertionChecker -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.creating.AssertionPlantNullable -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.domain.builders.AssertImpl -import ch.tutteli.atrium.reporting.Reporter - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] is (equal to) [expected]. - * - * This method might enforce in the future, that [expected] has to be the same type as [Assert.subject][SubjectProvider.subject]. - * Currently the following is possible: `assert(1).toBe(1.0)` - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.en_GB.toBe(expected)")) -fun Assert.toBe(expected: T) - = addAssertion(AssertImpl.any.toBe(this, expected)) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] is not (equal to) [expected]. - * - * This method might enforce in the future, that [expected] has to be the same type as [Assert.subject][SubjectProvider.subject]. - * Currently the following is possible: `assert(1).notToBe(1.0)` - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.en_GB.notToBe(expected)")) -fun Assert.notToBe(expected: T) - = addAssertion(AssertImpl.any.notToBe(this, expected)) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] is the same instance as [expected]. - * - * This method might enforce in the future, that [expected] has to be the same type as [Assert.subject][SubjectProvider.subject]. - * Currently the following is possible: `assert(1).isSame(1.0)` - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use `isSameAs` from package en_GB; will be removed with 1.0.0", ReplaceWith("isSameAs(expected)", "ch.tutteli.atrium.api.cc.en_GB.isSameAs")) -fun Assert.isSame(expected: T) - = addAssertion(AssertImpl.any.isSame(this, expected)) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] is not the same instance as [expected]. - * - * This method might enforce in the future, that [expected] has to be the same type as [Assert.subject][SubjectProvider.subject]. - * Currently the following is possible: `assert(1).isNotSame(1.0)` - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use `isNotSameAs` from package en_GB; will be removed with 1.0.0", ReplaceWith("isNotSameAs(expected)", "ch.tutteli.atrium.api.cc.en_GB.isNotSameAs")) -fun Assert.isNotSame(expected: T) - = addAssertion(AssertImpl.any.isNotSame(this, expected)) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] is `null`. - * - * @return Does not support a fluent API because: what else would you want to assert about `null` anyway? - * - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Will be removed with 1.0.0 because it is redundant in terms of `toBe(null)` without adding enough to be a legit alternative.", ReplaceWith("ch.tutteli.atrium.api.cc.en_GB.toBe(null)")) -fun AssertionPlantNullable.isNull() { - addAssertion(AssertImpl.any.toBeNull(this)) -} - -/** - * Can be used to separate assertions when using the fluent API. - * - * For instance `assert(1).isLessThan(2).and.isGreaterThan(0)` creates - * two assertions (not one assertion with two sub-assertions) - the first asserts that 1 is less than 2 and a second - * asserts that 1 is greater than 0. If the first assertion fails, then usually (depending on the configured - * [AssertionChecker]) the second assertion is not evaluated. - * - * @return This plant to support a fluent API. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.en_GB.and")) -val AssertionPlant.and: AssertionPlant get() = this - -/** - * Can be used to create a group of sub assertions when using the fluent API. - * - * For instance `assert(1).isLessThan(3).and { isEven(); isGreaterThan(1) }` creates - * two assertions where the second one consists of two sub-assertions. In case the first assertion holds, then the - * second one is evaluated as a whole. Meaning, even though 1 is not even, it still evaluates that 1 is greater than 1. - * Hence the reporting might (depending on the configured [Reporter]) contain both failing sub-assertions. - * - * @return This plant to support a fluent API. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.en_GB.and(assertionCreator)")) -infix fun AssertionPlant.and(assertionCreator: Assert.() -> Unit) - = addAssertionsCreatedBy(assertionCreator) diff --git a/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/assertions/charsequence/contains/builders/CharSequenceContainsAtLeastCheckerBuilder.kt b/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/assertions/charsequence/contains/builders/CharSequenceContainsAtLeastCheckerBuilder.kt deleted file mode 100644 index 3597b5ca8..000000000 --- a/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/assertions/charsequence/contains/builders/CharSequenceContainsAtLeastCheckerBuilder.kt +++ /dev/null @@ -1,33 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0 */) -package ch.tutteli.atrium.api.cc.en_UK.assertions.charsequence.contains.builders - -import ch.tutteli.atrium.assertions.charsequence.contains.builders.CharSequenceContainsCheckerBuilder -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains - -/** - * Represents the *deprecated* builder of a `contains at least` check within the fluent API of a sophisticated - * `contains` assertion for [CharSequence]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - * - * @constructor Represents the builder of a `contains at least` check within the fluent API of a sophisticated - * `contains` assertion for [CharSequence]. - * @param times The number which the check will compare against the actual number of times an expected object is - * found in the input of the search. - * @param containsBuilder The previously used [CharSequenceContains.Builder]. - */ -@Deprecated( - "Use the builder from the package creating; will be removed with 1.0.0", - ReplaceWith( - "AtLeastCheckerOption", - "ch.tutteli.atrium.api.cc.en_GB.creating.charsequence.contains.builders.AtLeastCheckerOption" - ) -) -open class CharSequenceContainsAtLeastCheckerBuilder( - times: Int, - containsBuilder: CharSequenceContains.Builder -) : ch.tutteli.atrium.api.cc.en_UK.creating.charsequence.contains.builders.AtLeastCheckerOptionImpl( - times, containsBuilder -), CharSequenceContainsCheckerBuilder - diff --git a/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/assertions/charsequence/contains/builders/CharSequenceContainsAtMostCheckerBuilder.kt b/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/assertions/charsequence/contains/builders/CharSequenceContainsAtMostCheckerBuilder.kt deleted file mode 100644 index c9d5570e6..000000000 --- a/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/assertions/charsequence/contains/builders/CharSequenceContainsAtMostCheckerBuilder.kt +++ /dev/null @@ -1,32 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0 */) -package ch.tutteli.atrium.api.cc.en_UK.assertions.charsequence.contains.builders - -import ch.tutteli.atrium.assertions.charsequence.contains.builders.CharSequenceContainsCheckerBuilder -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains - -/** - * Represents the *deprecated* builder of a `contains at least once but at most` check within the fluent API of a - * sophisticated `contains` assertion for [CharSequence]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - * - * @constructor Represents the builder of a `contains at least once but at most` check within the fluent API of a - * sophisticated `contains` assertion for [CharSequence]. - * @param times The number which the check will compare against the actual number of times an expected object is - * found in the input of the search. - * @param containsBuilder The previously used [CharSequenceContains.Builder]. - */ -@Deprecated( - "Use the builder from the package creating; will be removed with 1.0.0", - ReplaceWith( - "AtMostCheckerOption", - "ch.tutteli.atrium.api.cc.en_GB.creating.charsequence.contains.builders.AtMostCheckerOption" - ) -) -open class CharSequenceContainsAtMostCheckerBuilder( - times: Int, - containsBuilder: CharSequenceContains.Builder -) : ch.tutteli.atrium.api.cc.en_UK.creating.charsequence.contains.builders.AtMostCheckerOptionImpl( - times, containsBuilder -), CharSequenceContainsCheckerBuilder diff --git a/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/assertions/charsequence/contains/builders/CharSequenceContainsButAtMostCheckerBuilder.kt b/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/assertions/charsequence/contains/builders/CharSequenceContainsButAtMostCheckerBuilder.kt deleted file mode 100644 index 10da70633..000000000 --- a/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/assertions/charsequence/contains/builders/CharSequenceContainsButAtMostCheckerBuilder.kt +++ /dev/null @@ -1,33 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0 */) -package ch.tutteli.atrium.api.cc.en_UK.assertions.charsequence.contains.builders - -import ch.tutteli.atrium.assertions.charsequence.contains.builders.CharSequenceContainsCheckerBuilder -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains - -/** - * Represents the *deprecated* builder of the second step of a `contains at least but at most` check within the - * fluent API of a sophisticated `contains` assertion for [CharSequence]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied to the input of the search. - * - * @constructor Represents the builder of the second step of a `contains at least but at most` check within the - * fluent API of a sophisticated `contains` assertion for [CharSequence]. - * @param times The number which the check will compare against the actual number of times an expected object is - * found in the input of the search. - * @param containsBuilder The previously used [CharSequenceContains.Builder]. - */ -@Deprecated( - "Use the builder from the package creating; will be removed with 1.0.0", - ReplaceWith( - "ButAtMostCheckerOption", - "ch.tutteli.atrium.api.cc.en_GB.creating.charsequence.contains.builders.ButAtMostCheckerOption" - ) -) -open class CharSequenceContainsButAtMostCheckerBuilder( - times: Int, - atLeastBuilder: CharSequenceContainsAtLeastCheckerBuilder, - containsBuilder: CharSequenceContains.Builder -) : ch.tutteli.atrium.api.cc.en_UK.creating.charsequence.contains.builders.ButAtMostCheckerOptionImpl( - times, atLeastBuilder, containsBuilder -), CharSequenceContainsCheckerBuilder diff --git a/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/assertions/charsequence/contains/builders/CharSequenceContainsExactlyCheckerBuilder.kt b/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/assertions/charsequence/contains/builders/CharSequenceContainsExactlyCheckerBuilder.kt deleted file mode 100644 index 773a13d40..000000000 --- a/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/assertions/charsequence/contains/builders/CharSequenceContainsExactlyCheckerBuilder.kt +++ /dev/null @@ -1,32 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0 */) -package ch.tutteli.atrium.api.cc.en_UK.assertions.charsequence.contains.builders - -import ch.tutteli.atrium.assertions.charsequence.contains.builders.CharSequenceContainsCheckerBuilder -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains - -/** - * Represents the *deprecated* builder of a `contains exactly` check within the fluent API of a sophisticated - * `contains` assertion for [CharSequence]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - * - * @constructor Represents the builder of a `contains exactly` check within the fluent API of a sophisticated - * `contains` assertion for [CharSequence]. - * @param times The number which the check will compare against the actual number of times an expected object is - * found in the input of the search. - * @param containsBuilder The previously used [CharSequenceContains.Builder]. - */ -@Deprecated( - "Use the builder from the package creating; will be removed with 1.0.0", - ReplaceWith( - "ExactlyCheckerOption", - "ch.tutteli.atrium.api.cc.en_GB.creating.charsequence.contains.builders.ExactlyCheckerOption" - ) -) -open class CharSequenceContainsExactlyCheckerBuilder( - times: Int, - containsBuilder: CharSequenceContains.Builder -) : ch.tutteli.atrium.api.cc.en_UK.creating.charsequence.contains.builders.ExactlyCheckerOptionImpl( - times, containsBuilder -), CharSequenceContainsCheckerBuilder diff --git a/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/assertions/charsequence/contains/builders/CharSequenceContainsNotCheckerBuilder.kt b/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/assertions/charsequence/contains/builders/CharSequenceContainsNotCheckerBuilder.kt deleted file mode 100644 index b1800ed7b..000000000 --- a/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/assertions/charsequence/contains/builders/CharSequenceContainsNotCheckerBuilder.kt +++ /dev/null @@ -1,30 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0 */) -package ch.tutteli.atrium.api.cc.en_UK.assertions.charsequence.contains.builders - -import ch.tutteli.atrium.assertions.charsequence.contains.builders.CharSequenceContainsCheckerBuilder -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains - -/** - * Represents the *deprecated* builder of a `contains not at all` check within the fluent API of a sophisticated - * `contains` assertion for [CharSequence]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - * - * @constructor Represents the builder of a `contains not at all` check within the fluent API of a sophisticated - * `contains` assertion for [CharSequence]. - * @param containsBuilder The previously used [CharSequenceContains.Builder]. - */ -@Deprecated( - "Use the builder from the package creating; will be removed with 1.0.0", - ReplaceWith( - "NotCheckerOption", - "ch.tutteli.atrium.api.cc.en_GB.creating.charsequence.contains.builders.NotCheckerOption" - ) -) -open class CharSequenceContainsNotCheckerBuilder( - containsBuilder: CharSequenceContains.Builder -) : ch.tutteli.atrium.api.cc.en_UK.creating.charsequence.contains.builders.NotCheckerOptionImpl( - containsBuilder -), CharSequenceContainsCheckerBuilder - diff --git a/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/assertions/charsequence/contains/builders/CharSequenceContainsNotOrAtMostCheckerBuilder.kt b/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/assertions/charsequence/contains/builders/CharSequenceContainsNotOrAtMostCheckerBuilder.kt deleted file mode 100644 index b0d30e3df..000000000 --- a/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/assertions/charsequence/contains/builders/CharSequenceContainsNotOrAtMostCheckerBuilder.kt +++ /dev/null @@ -1,32 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0 */) -package ch.tutteli.atrium.api.cc.en_UK.assertions.charsequence.contains.builders - -import ch.tutteli.atrium.assertions.charsequence.contains.builders.CharSequenceContainsCheckerBuilder -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains - -/** - * Represents the *deprecated* builder of a `contains not or at most` check within the fluent API of a - * sophisticated `contains` assertion for [CharSequence]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - * - * @constructor Represents the builder of a `contains not or at most` check within the fluent API of a - * sophisticated `contains` assertion for [CharSequence]. - * @param times The number which the check will compare against the actual number of times an expected object is - * found in the input of the search. - * @param containsBuilder The previously used [CharSequenceContains.Builder]. - */ -@Deprecated( - "Use the builder from the package creating; will be removed with 1.0.0", - ReplaceWith( - "NotOrAtMostCheckerOption", - "ch.tutteli.atrium.api.cc.en_GB.creating.charsequence.contains.builders.NotOrAtMostCheckerOption" - ) -) -open class CharSequenceContainsNotOrAtMostCheckerBuilder( - times: Int, - containsBuilder: CharSequenceContains.Builder -) : ch.tutteli.atrium.api.cc.en_UK.creating.charsequence.contains.builders.NotOrAtMostCheckerOptionImpl( - times, containsBuilder -), CharSequenceContainsCheckerBuilder diff --git a/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/assertions/iterable/contains/builders/IterableContainsAtLeastCheckerBuilder.kt b/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/assertions/iterable/contains/builders/IterableContainsAtLeastCheckerBuilder.kt deleted file mode 100644 index 7cb3b2732..000000000 --- a/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/assertions/iterable/contains/builders/IterableContainsAtLeastCheckerBuilder.kt +++ /dev/null @@ -1,32 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0 */) -package ch.tutteli.atrium.api.cc.en_UK.assertions.iterable.contains.builders - -import ch.tutteli.atrium.assertions.iterable.contains.builders.IterableContainsCheckerBuilder -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InAnyOrderSearchBehaviour - -/** - * Represents the *deprecated* builder of a `contains at least` check within the fluent API of a sophisticated - * `contains` assertion for [Iterable]. - * - * @param T The input type of the search. - * - * @constructor Represents the builder of a `contains at least` check within the fluent API of a sophisticated - * `contains` assertion for [Iterable]. - * @param times The number which the check will compare against the actual number of times an expected entry is - * found in the [Iterable]. - * @param containsBuilder The previously used [IterableContains.Builder]. - */ -@Deprecated( - "Use the builder from the package creating; will be removed with 1.0.0", - ReplaceWith( - "AtLeastCheckerOption", - "ch.tutteli.atrium.api.cc.en_GB.creating.iterable.contains.builders.AtLeastCheckerOption" - ) -) -open class IterableContainsAtLeastCheckerBuilder>( - times: Int, - containsBuilder: IterableContains.Builder -) : ch.tutteli.atrium.api.cc.en_UK.creating.iterable.contains.builders.AtLeastCheckerOptionImpl( - times, containsBuilder -), IterableContainsCheckerBuilder diff --git a/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/assertions/iterable/contains/builders/IterableContainsAtMostCheckerBuilder.kt b/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/assertions/iterable/contains/builders/IterableContainsAtMostCheckerBuilder.kt deleted file mode 100644 index 03ce6803c..000000000 --- a/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/assertions/iterable/contains/builders/IterableContainsAtMostCheckerBuilder.kt +++ /dev/null @@ -1,32 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0 */) -package ch.tutteli.atrium.api.cc.en_UK.assertions.iterable.contains.builders - -import ch.tutteli.atrium.assertions.iterable.contains.builders.IterableContainsCheckerBuilder -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InAnyOrderSearchBehaviour - -/** - * Represents the *deprecated* builder of a `contains at least once but at most` check within the fluent API of a - * sophisticated `contains` assertion for [Iterable]. - * - * @param T The input type of the search. - * - * @constructor Represents the builder of a `contains at least once but at most` check within the fluent API of a - * sophisticated `contains` assertion for [Iterable]. - * @param times The number which the check will compare against the actual number of times an expected entry is - * found in the [Iterable]. - * @param containsBuilder The previously used [IterableContains.Builder]. - */ -@Deprecated( - "Use the builder from the package creating; will be removed with 1.0.0", - ReplaceWith( - "AtMostCheckerOption", - "ch.tutteli.atrium.api.cc.en_GB.creating.iterable.contains.builders.AtMostCheckerOption" - ) -) -open class IterableContainsAtMostCheckerBuilder>( - times: Int, - containsBuilder: IterableContains.Builder -) : ch.tutteli.atrium.api.cc.en_UK.creating.iterable.contains.builders.AtMostCheckerOptionImpl( - times, containsBuilder -), IterableContainsCheckerBuilder diff --git a/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/assertions/iterable/contains/builders/IterableContainsButAtMostCheckerBuilder.kt b/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/assertions/iterable/contains/builders/IterableContainsButAtMostCheckerBuilder.kt deleted file mode 100644 index 9b6105075..000000000 --- a/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/assertions/iterable/contains/builders/IterableContainsButAtMostCheckerBuilder.kt +++ /dev/null @@ -1,33 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0 */) -package ch.tutteli.atrium.api.cc.en_UK.assertions.iterable.contains.builders - -import ch.tutteli.atrium.assertions.iterable.contains.builders.IterableContainsCheckerBuilder -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InAnyOrderSearchBehaviour - -/** - * Represents the *deprecated* builder of the second step of a `contains at least but at most` check within the - * fluent API of a sophisticated `contains` assertion for [Iterable]. - * - * @param T The input type of the search. - * - * @constructor Represents the builder of the second step of a `contains at least but at most` check within the - * fluent API of a sophisticated `contains` assertion for [Iterable]. - * @param times The number which the check will compare against the actual number of times an expected entry is - * found in the [Iterable]. - * @param containsBuilder The previously used [IterableContains.Builder]. - */ -@Deprecated( - "Use the builder from the package creating; will be removed with 1.0.0", - ReplaceWith( - "ButAtMostCheckerOption", - "ch.tutteli.atrium.api.cc.en_GB.creating.iterable.contains.builders.ButAtMostCheckerOption" - ) -) -open class IterableContainsButAtMostCheckerBuilder>( - times: Int, - atLeastBuilder: IterableContainsAtLeastCheckerBuilder, - containsBuilder: IterableContains.Builder -) : ch.tutteli.atrium.api.cc.en_UK.creating.iterable.contains.builders.ButAtMostCheckerOptionImpl( - times, atLeastBuilder, containsBuilder -), IterableContainsCheckerBuilder diff --git a/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/assertions/iterable/contains/builders/IterableContainsExactlyCheckerBuilder.kt b/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/assertions/iterable/contains/builders/IterableContainsExactlyCheckerBuilder.kt deleted file mode 100644 index d2dc952a8..000000000 --- a/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/assertions/iterable/contains/builders/IterableContainsExactlyCheckerBuilder.kt +++ /dev/null @@ -1,32 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0 */) -package ch.tutteli.atrium.api.cc.en_UK.assertions.iterable.contains.builders - -import ch.tutteli.atrium.assertions.iterable.contains.builders.IterableContainsCheckerBuilder -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InAnyOrderSearchBehaviour - -/** - * Represents the *deprecated* builder of a `contains exactly` check within the fluent API of a sophisticated - * `contains` assertion for [Iterable]. - * - * @param T The input type of the search. - * - * @constructor Represents the builder of a `contains exactly` check within the fluent API of a sophisticated - * `contains` assertion for [Iterable]. - * @param times The number which the check will compare against the actual number of times an expected entry is - * found in the [Iterable]. - * @param containsBuilder The previously used [IterableContains.Builder]. - */ -@Deprecated( - "Use the builder from the package creating; will be removed with 1.0.0", - ReplaceWith( - "ExactlyCheckerOption", - "ch.tutteli.atrium.api.cc.en_GB.creating.iterable.contains.builders.ExactlyCheckerOption" - ) -) -open class IterableContainsExactlyCheckerBuilder>( - times: Int, - containsBuilder: IterableContains.Builder -) : ch.tutteli.atrium.api.cc.en_UK.creating.iterable.contains.builders.ExactlyCheckerOptionImpl( - times, containsBuilder -), IterableContainsCheckerBuilder diff --git a/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/assertions/iterable/contains/builders/IterableContainsNotCheckerBuilder.kt b/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/assertions/iterable/contains/builders/IterableContainsNotCheckerBuilder.kt deleted file mode 100644 index 312c689a7..000000000 --- a/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/assertions/iterable/contains/builders/IterableContainsNotCheckerBuilder.kt +++ /dev/null @@ -1,31 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0 */) -package ch.tutteli.atrium.api.cc.en_UK.assertions.iterable.contains.builders - -import ch.tutteli.atrium.assertions.iterable.contains.builders.IterableContainsCheckerBuilder -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InAnyOrderSearchBehaviour - -/** - * Represents the *deprecated* builder of a `contains not at all` check within the fluent API of a sophisticated - * `contains` assertion for [Iterable]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - * - * @constructor Represents the builder of a `contains not at all` check within the fluent API of a sophisticated - * `contains not` assertion for [Iterable]. - * @param containsBuilder The previously used [IterableContains.Builder]. - */ -@Deprecated( - "Use the builder from the package creating; will be removed with 1.0.0", - ReplaceWith( - "NotCheckerOption", - "ch.tutteli.atrium.api.cc.en_GB.creating.iterable.contains.builders.NotCheckerOption" - ) -) -open class IterableContainsNotCheckerBuilder>( - containsBuilder: IterableContains.Builder -) : ch.tutteli.atrium.api.cc.en_UK.creating.iterable.contains.builders.NotCheckerOptionImpl( - containsBuilder -), IterableContainsCheckerBuilder - diff --git a/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/assertions/iterable/contains/builders/IterableContainsNotOrAtMostCheckerBuilder.kt b/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/assertions/iterable/contains/builders/IterableContainsNotOrAtMostCheckerBuilder.kt deleted file mode 100644 index 151d75c73..000000000 --- a/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/assertions/iterable/contains/builders/IterableContainsNotOrAtMostCheckerBuilder.kt +++ /dev/null @@ -1,32 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0 */) -package ch.tutteli.atrium.api.cc.en_UK.assertions.iterable.contains.builders - -import ch.tutteli.atrium.assertions.iterable.contains.builders.IterableContainsCheckerBuilder -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InAnyOrderSearchBehaviour - -/** - * Represents the *deprecated* builder of a `contains not or at most` check within the fluent API of a - * sophisticated `contains` assertion for [Iterable]. - * - * @param T The input type of the search. - * - * @constructor Represents the builder of a `contains at least once but at most` check within the fluent API of a - * sophisticated `contains` assertion for [Iterable]. - * @param times The number which the check will compare against the actual number of times an expected entry is - * found in the [Iterable]. - * @param containsBuilder The previously used [IterableContains.Builder]. - */ -@Deprecated( - "Use the builder from the package creating; will be removed with 1.0.0", - ReplaceWith( - "NotOrAtMostCheckerOption", - "ch.tutteli.atrium.api.cc.en_GB.creating.iterable.contains.builders.NotOrAtMostCheckerOption" - ) -) -open class IterableContainsNotOrAtMostCheckerBuilder>( - times: Int, - containsBuilder: IterableContains.Builder -) : ch.tutteli.atrium.api.cc.en_UK.creating.iterable.contains.builders.NotOrAtMostCheckerOptionImpl( - times, containsBuilder -), IterableContainsCheckerBuilder diff --git a/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/bigDecimalAssertions.kt b/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/bigDecimalAssertions.kt deleted file mode 100644 index 9e78c3450..000000000 --- a/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/bigDecimalAssertions.kt +++ /dev/null @@ -1,100 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") -package ch.tutteli.atrium.api.cc.en_UK - -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.domain.builders.AssertImpl -import ch.tutteli.atrium.domain.builders.bigDecimal -import ch.tutteli.atrium.domain.builders.creating.PleaseUseReplacementException -import java.math.BigDecimal - -@Deprecated("Use `isNumericallyEqualTo` if you expect that the following assertion holds:\n" + - "`assert(BigDecimal(\"10\").toBe(BigDecimal(\"10.0\"))`\n" + - "However, if you expect it to be wrong (because `BigDecimal.scale` differ), then use `isEqualIncludingScale`.", - ReplaceWith("isNumericallyEqualTo(expected) or isEqualIncludingScale(expected)")) -@Suppress("UNUSED_PARAMETER", "unused") -fun Assert.toBe(expected: T): Nothing - = throw PleaseUseReplacementException("BigDecimal.equals() compares also BigDecimal.scale, which you might not be aware of.\n" + - "If you know it and want that `scale` is included in the comparison, then use `isEqualIncludingScale`.") - -@Deprecated("Use `isNotNumericallyEqualTo` if you expect that the following assertion is wrong:\n" + - "`assert(BigDecimal(\"10\") notToBe BigDecimal(\"10.0\")`\n" + - "However, if you expect it to hold (because `BigDecimal.scale` differ), then use `isNotEqualIncludingScale`.", - ReplaceWith("isNotNumericallyEqualTo(expected) or isNotEqualIncludingScale(expected)")) -@Suppress("UNUSED_PARAMETER", "unused") -fun Assert.notToBe(expected: T): Nothing - = throw PleaseUseReplacementException("BigDecimal.equals() compares also BigDecimal.scale, which you might not be aware of.\n" + - "If you know it and want that `scale` is included in the comparison, then use `isNotEqualIncludingScale`.") - - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] is numerically equal to [expected]. - * - * By numerically is meant that it will not compare [BigDecimal.scale] (or in other words, - * it uses `compareTo(expected) == 0`) - * - * Most of the time you want to use this function instead of [isEqualIncludingScale] because - * [isEqualIncludingScale] compares [BigDecimal.scale]. - * Following the two functions compared: - * - `assert(BigDecimal("10")).isEqualIncludingScale(BigDecimal("10.0"))` does not hold. - * - `assert(BigDecimal("10")).isNumericallyEqualTo(BigDecimal("10.0"))` holds. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.en_GB.isNumericallyEqualTo(expected)")) -fun Assert.isNumericallyEqualTo(expected: T) - = addAssertion(AssertImpl.bigDecimal.isNumericallyEqualTo(this, expected)) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] is not numerically equal to [expected]. - * - * By numerically is meant that it will not compare [BigDecimal.scale] (or in other words, - * it uses `compareTo(expected) != 0`) - * - * Most of the time you want to use this function instead of [isNotEqualIncludingScale] because - * [isNotEqualIncludingScale] compares [BigDecimal.scale]. - * Following the two functions compared: - * - `assert(BigDecimal("10")).isNotEqualIncludingScale(BigDecimal("10.0"))` holds. - * - `assert(BigDecimal("10")).isNotNumericallyEqualTo(BigDecimal("10.0"))` does not hold. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.en_GB.isNotNumericallyEqualTo(expected)")) -fun Assert.isNotNumericallyEqualTo(expected: T) - = addAssertion(AssertImpl.bigDecimal.isNotNumericallyEqualTo(this, expected)) - - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] is equal to [expected] including [BigDecimal.scale]. - * - * Most of the time you want to use [isNumericallyEqualTo] which does not compare [BigDecimal.scale] - * in contrast to this function. - * Following the two functions compared: - * - `assert(BigDecimal("10")).isEqualIncludingScale(BigDecimal("10.0"))` does not hold. - * - `assert(BigDecimal("10")).isNumericallyEqualTo(BigDecimal("10.0"))` holds. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.en_GB.v(expected)")) -fun Assert.isEqualIncludingScale(expected: T) - = addAssertion(AssertImpl.bigDecimal.isEqualIncludingScale(this, expected, this::isNumericallyEqualTo.name)) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] is not equal to [expected] including [BigDecimal.scale]. - * - * Most of the time you want to use [isNotNumericallyEqualTo] which does not compare [BigDecimal.scale] - * in contrast to this function. - * Following the two functions compared: - * - `assert(BigDecimal("10")).isNotEqualIncludingScale(BigDecimal("10.0"))` holds. - * - `assert(BigDecimal("10")).isNotNumericallyEqualTo(BigDecimal("10.0"))` does not hold. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.en_GB.isNotEqualIncludingScale(expected)")) -fun Assert.isNotEqualIncludingScale(expected: T) - = addAssertion(AssertImpl.bigDecimal.isNotEqualIncludingScale(this, expected)) diff --git a/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/booleanAssertions.kt b/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/booleanAssertions.kt deleted file mode 100644 index 63939bd30..000000000 --- a/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/booleanAssertions.kt +++ /dev/null @@ -1,28 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") -package ch.tutteli.atrium.api.cc.en_UK - -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.SubjectProvider - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] is `true`. - * - * Delegates to [toBe] with argument `true`. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Will be removed with 1.0.0 because it is redundant with `toBe(true)` without adding enough to be a legit alternative.", ReplaceWith("ch.tutteli.atrium.api.cc.en_GB.toBe(true)")) -fun Assert.isTrue() = toBe(true) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] is `false`. - * - * Delegates to [toBe] with argument `false`. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Will be removed with 1.0.0 because it is redundant with `toBe(false)` without adding enough to be a legit alternative.", ReplaceWith("ch.tutteli.atrium.api.cc.en_GB.toBe(false)")) -fun Assert.isFalse() = toBe(false) diff --git a/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/charSequenceAssertions.kt b/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/charSequenceAssertions.kt deleted file mode 100644 index 38c110187..000000000 --- a/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/charSequenceAssertions.kt +++ /dev/null @@ -1,220 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") -package ch.tutteli.atrium.api.cc.en_UK - -import ch.tutteli.atrium.api.cc.en_UK.creating.charsequence.contains.builders.NotCheckerOption -import ch.tutteli.atrium.api.cc.en_UK.creating.charsequence.contains.builders.NotCheckerOptionImpl -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.domain.builders.AssertImpl -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains -import ch.tutteli.atrium.domain.creating.charsequence.contains.searchbehaviours.NoOpSearchBehaviour -import ch.tutteli.atrium.domain.creating.charsequence.contains.searchbehaviours.NotSearchBehaviour -import ch.tutteli.atrium.reporting.translating.Translatable -import ch.tutteli.atrium.api.cc.en_UK.assertions.charsequence.contains.builders.CharSequenceContainsNotCheckerBuilder as DeprecatedNotCheckerBuilder -import ch.tutteli.atrium.assertions.charsequence.contains.builders.CharSequenceContainsBuilder as DeprecatedBuilder - -/** - * Creates a [CharSequenceContains.Builder] based on this [AssertionPlant] which allows to define - * more sophisticated `contains` assertions. - * - * @return The newly created builder. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.en_GB.contains")) -val Assert.contains: CharSequenceContains.Builder - get() = AssertImpl.charSequence.containsBuilder(this) - -@Deprecated("Use the extension fun `contains` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", ReplaceWith("plant.contains")) -fun getContains(plant: Assert): DeprecatedBuilder - = DeprecatedBuilder(plant, plant.contains.searchBehaviour) - - -/** - * Creates a [CharSequenceContains.Builder] based on this [AssertionPlant] which allows to define - * more sophisticated `contains not` assertions. - * - * @return The newly created builder. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.en_GB.containsNot")) -val Assert.containsNot: NotCheckerOption - get() = NotCheckerOptionImpl(AssertImpl.charSequence.containsNotBuilder(this)) - -@Deprecated("Use the extension fun `containsNot` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", ReplaceWith("plant.containsNot")) -fun getContainsNot(plant: Assert): DeprecatedNotCheckerBuilder - = DeprecatedNotCheckerBuilder(AssertImpl.charSequence.containsNotBuilder(plant)) - - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] contains [expected]'s [toString] representation - * and the [toString] representation of the [otherExpected] (if given), using a non disjoint search. - * - * It is a shortcut for `contains.atLeast(1).values(expected, *otherExpected)`. - * - * Notice that a runtime check applies which assures that only [CharSequence], [Number] and [Char] are passed (this - * function expects `Any` for your convenience, so that you can mix [String] and [Int] for instance). - * - * By non disjoint is meant that `'aa'` in `'aaaa'` is found three times and not only two times. - * Also notice, that it does not search for unique matches. Meaning, if the input of the search is `'a'` and [expected] - * is defined as `'a'` and one [otherExpected] is defined as `'a'` as well, then both match, even though they match the - * same sequence in the input of the search. Use the property `contains` to create a more sophisticated `contains` - * assertion where you can use options such as [atLeast], [atMost] and [exactly] to control the number of occurrences - * you expect. - * - * Meaning you might want to use: - * `contains.exactly(2).value('a')` - * instead of: - * `contains('a', 'a')` - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - * @throws IllegalArgumentException in case [expected] or one of the [otherExpected] is not a - * [CharSequence], [Number] or [Char]. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.en_GB.contains(expected, *otherExpected)")) -fun Assert.contains(expected: Any, vararg otherExpected: Any): AssertionPlant - = contains.atLeast(1).values(expected, *otherExpected) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] does not contain [expected]'s [toString] representation - * and neither one of the [otherExpected]'s [toString] representation (if given). - * - * It is a shortcut for `containsNot.values(expected, *otherExpected)`. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.en_GB.containsNot(expected, *otherExpected)")) -fun Assert.containsNot(expected: Any, vararg otherExpected: Any) - = containsNot.values(expected, *otherExpected) - - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] contains [expected]'s [getDefault][Translatable.getDefault] - * representation and the [getDefault][Translatable.getDefault] representations of the [otherExpected] (if given), - * using a non disjoint search. - * - * It is a shortcut for `contains.atLeast(1).defaultTranslationOf(expected, *otherExpected)`. - * - * By non disjoint is meant that `'aa'` in `'aaaa'` is found three times and not only two times. - * Also notice, that it does not search for unique matches. Meaning, if the input of the search is `'a'` and the - * default translation of [expected] is defined as `'a'` and one default translation of the - * [otherExpected] is defined as `'a'` as well, then both match, even though they match the - * same sequence in the input of the search. Use an option such as [atLeast], [atMost] and [exactly] to control - * the number of occurrences you expect. - * - * Meaning you might want to use: - * `contains.exactly(2).defaultTranslationOf(IS)` - * instead of: - * `containsDefaultTranslationOf(IS, IS)` - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.en_GB.containsDefaultTranslationOf(expected, *otherExpected)")) -fun Assert.containsDefaultTranslationOf(expected: Translatable, vararg otherExpected: Translatable): AssertionPlant - = contains.atLeast(1).defaultTranslationOf(expected, *otherExpected) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] does not contain [expected]'s - * [getDefault][Translatable.getDefault] representation and neither one of the [otherExpected]'s - * [getDefault][Translatable.getDefault] representation (if given). - * - * It is a shortcut for `containsNot.defaultTranslationOf(expected, *otherExpected)`. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.en_GB.containsNotDefaultTranslationOf(expected, *otherExpected)")) -fun Assert.containsNotDefaultTranslationOf(expected: Translatable, vararg otherExpected: Translatable) - = containsNot.defaultTranslationOf(expected, * otherExpected) - - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] contains a sequence which matches the given regular expression - * [pattern] as well as the [otherPatterns] (if given), using a non disjoint search. - * - * It is a shortcut for `contains.atLeast(1).regex(pattern, *otherPatterns)`. - * - * By non disjoint is meant that `'aa'` in `'aaaa'` is found three times and not only two times. - * Also notice, that it does not search for unique matches. Meaning, if the input of the search is `'ab'` and [pattern] - * is defined as `'a(b)?'` and one of the [otherPatterns] is defined as `'a(b)?'` as well, then both match, even though - * they match the same sequence in the input of the search. Use an option such as [atLeast], [atMost] and [exactly] to - * control the number of occurrences you expect. - * - * Meaning you might want to use: - * `contains.exactly(2).regex('a(b)?')` - * instead of: - * `contains.atLeast(1).regex('a(b)?', 'a(b)?')` - * - * @param pattern The pattern which is expected to have a match against the input of the search. - * @param otherPatterns Additional patterns which are expected to have a match against the input of the search. - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.en_GB.containsRegex(expected, *otherExpected)")) -fun Assert.containsRegex(pattern: String, vararg otherPatterns: String): AssertionPlant - = contains.atLeast(1).regex(pattern, *otherPatterns) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] starts with [expected]. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.en_GB.startsWith(expected)")) -fun Assert.startsWith(expected: CharSequence) - = addAssertion(AssertImpl.charSequence.startsWith(this, expected)) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] does not start with [expected]. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.en_GB.startsNotWith(expected)")) -fun Assert.startsNotWith(expected: CharSequence) - = addAssertion(AssertImpl.charSequence.startsNotWith(this, expected)) - - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] ends with [expected]. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.en_GB.endsWith(expected)")) -fun Assert.endsWith(expected: CharSequence) - = addAssertion(AssertImpl.charSequence.endsWith(this, expected)) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] does not end with [expected]. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.en_GB.endsNotWith(expected)")) -fun Assert.endsNotWith(expected: CharSequence) - = addAssertion(AssertImpl.charSequence.endsNotWith(this, expected)) - - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] [CharSequence].[kotlin.text.isEmpty]. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.en_GB.isEmpty()")) -fun Assert.isEmpty() - = addAssertion(AssertImpl.charSequence.isEmpty(this)) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] [CharSequence].[kotlin.text.isNotEmpty]. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.en_GB.isNotEmpty()")) -fun Assert.isNotEmpty() - = addAssertion(AssertImpl.charSequence.isNotEmpty(this)) diff --git a/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/charSequenceContainsCheckers.kt b/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/charSequenceContainsCheckers.kt deleted file mode 100644 index a97672da2..000000000 --- a/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/charSequenceContainsCheckers.kt +++ /dev/null @@ -1,125 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") -package ch.tutteli.atrium.api.cc.en_UK - -import ch.tutteli.atrium.api.cc.en_UK.creating.charsequence.contains.builders.* -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains.SearchBehaviour -import ch.tutteli.atrium.api.cc.en_UK.assertions.charsequence.contains.builders.CharSequenceContainsAtLeastCheckerBuilder as DeprecatedAtLeastCheckerBuilder -import ch.tutteli.atrium.api.cc.en_UK.assertions.charsequence.contains.builders.CharSequenceContainsAtMostCheckerBuilder as DeprecatedAtMostCheckerBuilder -import ch.tutteli.atrium.api.cc.en_UK.assertions.charsequence.contains.builders.CharSequenceContainsButAtMostCheckerBuilder as DeprecatedButAtMostCheckerBuilder -import ch.tutteli.atrium.api.cc.en_UK.assertions.charsequence.contains.builders.CharSequenceContainsExactlyCheckerBuilder as DeprecatedExactlyCheckerBuilder -import ch.tutteli.atrium.api.cc.en_UK.assertions.charsequence.contains.builders.CharSequenceContainsNotCheckerBuilder as DeprecatedNotCheckerBuilder -import ch.tutteli.atrium.api.cc.en_UK.assertions.charsequence.contains.builders.CharSequenceContainsNotOrAtMostCheckerBuilder as DeprecatedNotOrAtMostCheckerBuilder -import ch.tutteli.atrium.assertions.charsequence.contains.CharSequenceContains.SearchBehaviour as DeprecatedSearchBehaviour -import ch.tutteli.atrium.assertions.charsequence.contains.builders.CharSequenceContainsBuilder as DeprecatedBuilder -import ch.tutteli.atrium.assertions.charsequence.contains.searchbehaviours.CharSequenceContainsNoOpSearchBehaviour as DeprecatedNoOpSearchBehaviour -import ch.tutteli.atrium.assertions.charsequence.contains.searchbehaviours.CharSequenceContainsNotSearchBehaviour as DeprecatedNotSearchBehaviour - -/** - * Restricts a `contains` assertion by specifying that the number of occurrences of the object which we are looking - * for, occurs `at least` number of [times] within the search input. - * - * @param times The number which the check will compare against the actual number of times an expected object is - * found in the input of the search. - * - * @return The newly created builder. - * @throws IllegalArgumentException In case [times] is smaller than zero. - * @throws IllegalArgumentException In case [times] equals to zero; use [containsNot] instead. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.en_GB.atLeast(times)")) -fun CharSequenceContains.Builder.atLeast(times: Int): AtLeastCheckerOption - = AtLeastCheckerOptionImpl(times, this) - -@Deprecated("Use the extension fun `atLeast`. This fun is only here to retain binary compatibility; will be removed with 1.0.0", ReplaceWith("builder.atLeast(times)")) -fun atLeast(builder: DeprecatedBuilder, times: Int): DeprecatedAtLeastCheckerBuilder - = DeprecatedAtLeastCheckerBuilder(times, builder) - - -/** - * Restricts a `contains at least` assertion by specifying that the number of occurrences of the object which we - * are looking for, occurs `at most` number of [times] within the search input. - * - * The resulting restriction will be a `contains at least but at most` assertion. - * - * @param times The number which the check will compare against the actual number of times an expected object is - * found in the input of the search. - * - * @return The newly created builder. - * @throws IllegalArgumentException In case [times] is smaller than zero. - * @throws IllegalArgumentException In case [times] equals to zero; use [containsNot] instead. - * @throws IllegalArgumentException In case [times] of this `at most` restriction equals to the number of the - * `at least` restriction; use the [exactly] restriction instead. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.en_GB.butAtMost(times)")) -fun AtLeastCheckerOption.butAtMost(times: Int): ButAtMostCheckerOption - = ButAtMostCheckerOptionImpl(times, this, containsBuilder) - -@Deprecated("Use the extension fun `butAtMost`. This fun is only here to retain binary compatibility; will be removed with 1.0.0", ReplaceWith("checkerBuilder.butAtMost(times)")) -fun butAtMost(checkerBuilder: DeprecatedAtLeastCheckerBuilder, times: Int): DeprecatedButAtMostCheckerBuilder - = DeprecatedButAtMostCheckerBuilder(times, checkerBuilder, checkerBuilder.containsBuilder) - - -/** - * Restricts a `contains` assertion by specifying that the number of occurrences of the object which we - * are looking for, occurs `exactly` number of [times] within the search input. - * - * @param times The number which the check will compare against the actual number of times an expected object is - * found in the input of the search. - * - * @return The newly created builder. - * @throws IllegalArgumentException In case [times] is smaller than zero. - * @throws IllegalArgumentException In case [times] equals to zero; use [containsNot] instead. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.en_GB.exactly(times)")) -fun CharSequenceContains.Builder.exactly(times: Int): ExactlyCheckerOption - = ExactlyCheckerOptionImpl(times, this) - -@Deprecated("Use the extension fun `exactly`. This fun is only here to retain binary compatibility; will be removed with 1.0.0", ReplaceWith("builder.exactly(times)")) -fun exactly(builder: DeprecatedBuilder, times: Int): DeprecatedExactlyCheckerBuilder - = DeprecatedExactlyCheckerBuilder(times, builder) - - -/** - * Restricts a `contains` assertion by specifying that the number of occurrences of the object which we - * are looking for, occurs `at least` once but `at most` number of [times] within the search input. - * - * If you want to use a higher lower bound than one, then use `atLeast(2).butAtMost(3)` instead of `atMost(3)`. - * And in case you want to state that it is either not contained at all or at most a certain number of times, - * then use `notOrAtMost(2)` instead. - * - * @param times The number which the check will compare against the actual number of times an expected object is - * found in the input of the search. - * - * @return The newly created builder. - * @throws IllegalArgumentException In case [times] is smaller than zero. - * @throws IllegalArgumentException In case [times] equals to zero; use [containsNot] instead. - * @throws IllegalArgumentException In case [times] equals to one; use [exactly] instead. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.en_GB.atMost(times)")) -fun CharSequenceContains.Builder.atMost(times: Int): AtMostCheckerOption - = AtMostCheckerOptionImpl(times, this) - -@Deprecated("Use the extension fun `atMost`. This fun is only here to retain binary compatibility; will be removed with 1.0.0", ReplaceWith("builder.atMost(times)")) -fun atMost(builder: DeprecatedBuilder, times: Int): DeprecatedAtMostCheckerBuilder - = DeprecatedAtMostCheckerBuilder(times, builder) - - -/** - * Restricts a `contains` assertion by specifying that the number of occurrences of the object which we - * are looking for, occurs `not at all or at most` number of [times] within the search input. - * - * @param times The number which the check will compare against the actual number of times an expected object is - * found in the input of the search. - * - * @return The newly created builder. - * @throws IllegalArgumentException In case [times] is smaller than zero. - * @throws IllegalArgumentException In case [times] equals to zero; use [containsNot] instead. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.en_GB.notOrAtMost(times)")) -fun CharSequenceContains.Builder.notOrAtMost(times: Int): NotOrAtMostCheckerOption - = NotOrAtMostCheckerOptionImpl(times, this) - -@Deprecated("Use the extension fun `notOrAtMost`. This fun is only here to retain binary compatibility; will be removed with 1.0.0", ReplaceWith("builder.notOrAtMost(times)")) -fun notOrAtMost(builder: DeprecatedBuilder, times: Int): DeprecatedNotOrAtMostCheckerBuilder - = DeprecatedNotOrAtMostCheckerBuilder(times, builder) diff --git a/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/charSequenceContainsCreators.kt b/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/charSequenceContainsCreators.kt deleted file mode 100644 index 90ea1578b..000000000 --- a/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/charSequenceContainsCreators.kt +++ /dev/null @@ -1,229 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") -package ch.tutteli.atrium.api.cc.en_UK - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.domain.builders.AssertImpl -import ch.tutteli.atrium.domain.builders.creating.basic.contains.addAssertionForAssert -import ch.tutteli.kbox.glue -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains -import ch.tutteli.atrium.domain.creating.charsequence.contains.searchbehaviours.IgnoringCaseSearchBehaviour -import ch.tutteli.atrium.domain.creating.charsequence.contains.searchbehaviours.NoOpSearchBehaviour -import ch.tutteli.atrium.reporting.translating.Translatable - -/** - * Finishes the specification of the sophisticated `contains` assertion where the [expected] object shall be searched, - * using a non disjoint search. - * - * Delegates to `values(expected)`. - * - * Notice that a runtime check applies which assures that only [CharSequence], [Number] and [Char] are passed (this - * function expects `Any` for your convenience, so that you can mix [String] and [Int] for instance). - * - * By non disjoint is meant that 'aa' in 'aaaa' is found three times and not only two times. - * - * @param expected The object which is expected to be contained within the input of the search. - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - * @throws IllegalArgumentException in case [expected] is not a [CharSequence], [Number] or [Char]. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.en_GB.value(expected)")) -fun CharSequenceContains.CheckerOption.value(expected: Any): AssertionPlant - = values(expected) - -/** - * Finishes the specification of the sophisticated `contains` assertion where the [expected] object as well as - * the [otherExpected] objects shall be searched, using a non disjoint search. - * - * Notice that a runtime check applies which assures that only [CharSequence], [Number] and [Char] are passed (this - * function expects `Any` for your convenience, so that you can mix [String] and [Int] for instance). - * - * By non disjoint is meant that `'aa'` in `'aaaa'` is found three times and not only two times. - * Also notice, that it does not search for unique matches. Meaning, if the input of the search is `'a'` and [expected] - * is defined as `'a'` and one [otherExpected] is defined as `'a'` as well, then both match, even though they match the - * same sequence in the input of the search. Use an option such as [atLeast], [atMost] and [exactly] to control - * the number of occurrences you expect. - * - * Meaning you might want to use: - * `contains.exactly(2).value('a')` - * instead of: - * `contains.atLeast(1).values('a', 'a')` - * - * @param expected The object which is expected to be contained within the input of the search. - * @param otherExpected Additional objects which are expected to be contained within the input of the search. - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - * @throws IllegalArgumentException in case [expected] or one of the [otherExpected] is not a - * [CharSequence], [Number] or [Char]. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.en_GB.values(expected, *otherExpected)")) -fun CharSequenceContains.CheckerOption.values(expected: Any, vararg otherExpected: Any): AssertionPlant - = addAssertion(AssertImpl.charSequence.contains.values(this, expected glue otherExpected)) - - -/** - * Finishes the specification of the sophisticated `contains` assertion where the [expected] object shall be searched - * (ignoring case), using a non disjoint search. - * - * Delegates to `values(expected)`. - * - * Notice that a runtime check applies which assures that only [CharSequence], [Number] and [Char] are passed (this - * function expects `Any` for your convenience, so that you can mix [String] and [Int] for instance). - * - * By non disjoint is meant that 'aa' in 'aaaa' is found three times and not only two times. - * - * @param expected The object which is expected to be contained within the input of the search. - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - * @throws IllegalArgumentException in case [expected] is not a [CharSequence], [Number] or [Char]. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.en_GB.value(expected)")) -@JvmName("valueIgnoringCase") -fun CharSequenceContains.CheckerOption.value(expected: Any): AssertionPlant - = values(expected) - -/** - * Finishes the specification of the sophisticated `contains` assertion where the [expected] object as well as - * the [otherExpected] objects shall be searched (ignoring case), using a non disjoint search. - * - * Notice that a runtime check applies which assures that only [CharSequence], [Number] and [Char] are passed (this - * function expects `Any` for your convenience, so that you can mix [String] and [Int] for instance). - * - * By non disjoint is meant that `'aa'` in `'aaaa'` is found three times and not only two times. - * Also notice, that it does not search for unique matches. Meaning, if the input of the search is `'a'` and [expected] - * is defined as `'a'` and one [otherExpected] is defined as `'a'` as well, then both match, even though they match the - * same sequence in the input of the search. Use an option such as [atLeast], [atMost] and [exactly] to control - * the number of occurrences you expect. - * - * Meaning you might want to use: - * `contains.ignoringCase.exactly(2).value('a')` - * instead of: - * `contains.ignoringCase.atLeast(1).values('a', 'a')` - * - * @param expected The object which is expected to be contained within the input of the search. - * @param otherExpected Additional objects which are expected to be contained within the input of the search. - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - * @throws IllegalArgumentException in case [expected] or one of the [otherExpected] is not a - * [CharSequence], [Number] or [Char]. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.en_GB.values(expected, *otherExpected)")) -@JvmName("valuesIgnoringCase") -fun CharSequenceContains.CheckerOption.values(expected: Any, vararg otherExpected: Any): AssertionPlant - = addAssertion(AssertImpl.charSequence.contains.valuesIgnoringCase(this, expected glue otherExpected)) - - -/** - * Finishes the specification of the sophisticated `contains` assertion where the [expected]'s - * [getDefault][Translatable.getDefault] representation as well as the [getDefault][Translatable.getDefault] - * representations of the [otherExpected] (if given) shall be searched, using a non disjoint search. - * - * By non disjoint is meant that `'aa'` in `'aaaa'` is found three times and not only two times. - * Also notice, that it does not search for unique matches. Meaning, if the input of the search is `'a'` and the - * default translation of [expected] is defined as `'a'` and one default translation of the - * [otherExpected] is defined as `'a'` as well, then both match, even though they match the - * same sequence in the input of the search. Use an option such as [atLeast], [atMost] and [exactly] to control - * the number of occurrences you expect. - * - * Meaning you might want to use: - * `contains.exactly(2).defaultTranslationOf(IS)` - * instead of: - * `contains.atLeast(1).defaultTranslationOf(IS, IS)` - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.en_GB.defaultTranslationOf(expected, *otherExpected)")) -fun CharSequenceContains.CheckerOption.defaultTranslationOf(expected: Translatable, vararg otherExpected: Translatable): AssertionPlant - = addAssertion(AssertImpl.charSequence.contains.defaultTranslationOf(this, expected glue otherExpected)) - -/** - * Finishes the specification of the sophisticated `contains` assertion where the [expected]'s - * [getDefault][Translatable.getDefault] representation as well as the [getDefault][Translatable.getDefault] - * representations of the [otherExpected] (if given) shall be searched (ignoring case), using a non disjoint search. - * - * By non disjoint is meant that `'aa'` in `'aaaa'` is found three times and not only two times. - * Also notice, that it does not search for unique matches. Meaning, if the input of the search is `'a'` and the - * default translation of [expected] is defined as `'a'` and one default translation of the - * [otherExpected] is defined as `'a'` as well, then both match, even though they match the - * same sequence in the input of the search. Use an option such as [atLeast], [atMost] and [exactly] to control - * the number of occurrences you expect. - * - * Meaning you might want to use: - * `contains.exactly(2).defaultTranslationOf(IS)` - * instead of: - * `contains.atLeast(1).defaultTranslationOf(IS, IS)` - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.en_GB.defaultTranslationOf(expected, *otherExpected)")) -@JvmName("defaultTranslationOfIgnoringCase") -fun CharSequenceContains.CheckerOption.defaultTranslationOf(expected: Translatable, vararg otherExpected: Translatable): AssertionPlant - = addAssertion(AssertImpl.charSequence.contains.defaultTranslationOfIgnoringCase(this, expected glue otherExpected)) - - -/** - * Finishes the specification of the sophisticated `contains` assertion where the given regular expression [pattern] - * as well as the [otherPatterns] are expected to have a match, using a non disjoint search. - * - * By non disjoint is meant that `'aa'` in `'aaaa'` is found three times and not only two times. - * Also notice, that it does not search for unique matches. Meaning, if the input of the search is `'ab'` and [pattern] - * is defined as `'a(b)?'` and one of the [otherPatterns] is defined as `'a(b)?'` as well, then both match, even though - * they match the same sequence in the input of the search. Use an option such as [atLeast], [atMost] and [exactly] to - * control the number of occurrences you expect. - * - * Meaning you might want to use: - * `contains.exactly(2).regex('a(b)?')` - * instead of: - * `contains.atLeast(1).regex('a(b)?', 'a(b)?')` - * - * @param pattern The pattern which is expected to have a match against the input of the search. - * @param otherPatterns Additional patterns which are expected to have a match against the input of the search. - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.en_GB.regex(pattern, *otherPatterns)")) -fun CharSequenceContains.CheckerOption.regex(pattern: String, vararg otherPatterns: String): AssertionPlant - = addAssertion(AssertImpl.charSequence.contains.regex(this, pattern glue otherPatterns)) - -/** - * Finishes the specification of the sophisticated `contains` assertion where the given regular expression [pattern] - * as well as the [otherPatterns] are expected to have a match (ignoring case), using a non disjoint search. - * - * By non disjoint is meant that `'aa'` in `'aaaa'` is found three times and not only two times. - * Also notice, that it does not search for unique matches. Meaning, if the input of the search is `'ab'` and [pattern] - * is defined as `'a(b)?'` and one of the [otherPatterns] is defined as `'a(b)?'` as well, then both match, even though - * they match the same sequence in the input of the search. Use an option such as [atLeast], [atMost] and [exactly] to - * control the number of occurrences you expect. - * - * Meaning you might want to use: - * `contains.ignoringCase.exactly(2).regex('a(b)?')` - * instead of: - * `contains.ignoringCase.atLeast(1).regex('a(b)?', 'a(b)?')` - * - * @param pattern The pattern which is expected to have a match against the input of the search. - * @param otherPatterns Additional patterns which are expected to have a match against the input of the search. - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.en_GB.regex(pattern, *otherPatterns)")) -@JvmName("regexIgnoringCase") -fun CharSequenceContains.CheckerOption.regex(pattern: String, vararg otherPatterns: String): AssertionPlant - = addAssertion(AssertImpl.charSequence.contains.regexIgnoringCase(this, pattern glue otherPatterns)) - -/** - * Helper method to simplify adding assertions to the plant which itself is stored in - * [CharSequenceContains.CheckerOption.containsBuilder]. - * - * @return The plant to support a fluent API. - */ -private fun CharSequenceContains.CheckerOption.addAssertion(assertion: Assertion): AssertionPlant - = addAssertionForAssert(assertion) diff --git a/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/charSequenceContainsDecorators.kt b/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/charSequenceContainsDecorators.kt deleted file mode 100644 index ee6d4ae8b..000000000 --- a/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/charSequenceContainsDecorators.kt +++ /dev/null @@ -1,47 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") -package ch.tutteli.atrium.api.cc.en_UK - -import ch.tutteli.atrium.api.cc.en_UK.creating.charsequence.contains.builders.NotCheckerOption -import ch.tutteli.atrium.api.cc.en_UK.creating.charsequence.contains.builders.NotCheckerOptionImpl -import ch.tutteli.atrium.domain.builders.AssertImpl -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains -import ch.tutteli.atrium.domain.creating.charsequence.contains.searchbehaviours.IgnoringCaseSearchBehaviour -import ch.tutteli.atrium.domain.creating.charsequence.contains.searchbehaviours.NoOpSearchBehaviour -import ch.tutteli.atrium.domain.creating.charsequence.contains.searchbehaviours.NotSearchBehaviour -import ch.tutteli.atrium.api.cc.en_UK.assertions.charsequence.contains.builders.CharSequenceContainsNotCheckerBuilder as DeprecatedNotCheckerBuilder -import ch.tutteli.atrium.assertions.charsequence.contains.builders.CharSequenceContainsBuilder as DeprecatedBuilder -import ch.tutteli.atrium.assertions.charsequence.contains.searchbehaviours.CharSequenceContainsIgnoringCaseSearchBehaviour as DeprecatedIgnoringCaseSearchBehaviour -import ch.tutteli.atrium.assertions.charsequence.contains.searchbehaviours.CharSequenceContainsNoOpSearchBehaviour as DeprecatedNoOpSearchBehaviour -import ch.tutteli.atrium.assertions.charsequence.contains.searchbehaviours.CharSequenceContainsNotSearchBehaviour as DeprecatedNotSearchBehaviour - -/** - * Defines that the decoration behaviour `ignore case` shall be applied to this sophisticated `contains` assertion. - * - * @return The newly created builder. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith(" ch.tutteli.atrium.api.cc.en_GB.ignoringCase")) -val CharSequenceContains.Builder.ignoringCase - get() : CharSequenceContains.Builder - = AssertImpl.charSequence.contains.searchBehaviours.ignoringCase(this) - -@Deprecated("Use the extension fun `ignoringCase` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", ReplaceWith("builder.ignoringCase")) -fun getIgnoringCase(builder: DeprecatedBuilder) - : DeprecatedBuilder - = DeprecatedBuilder(builder.subjectProvider, builder.ignoringCase.searchBehaviour) - - -/** - * Defines that the decoration behaviour `ignore case` shall be applied to this sophisticated `contains not` assertion. - * - * @return The newly created builder. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.en_GB.ignoringCase")) -val NotCheckerOption.ignoringCase - get() : NotCheckerOption - = NotCheckerOptionImpl(containsBuilder.ignoringCase) - -@Deprecated("Use the extension fun `ignoringCase` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", ReplaceWith("builder.ignoringCase")) -fun getIgnoringCase(builder: DeprecatedNotCheckerBuilder) - : DeprecatedNotCheckerBuilder - = DeprecatedNotCheckerBuilder(builder.containsBuilder.ignoringCase) diff --git a/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/collectionAssertions.kt b/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/collectionAssertions.kt deleted file mode 100644 index 6d4549fbb..000000000 --- a/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/collectionAssertions.kt +++ /dev/null @@ -1,39 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") - -package ch.tutteli.atrium.api.cc.en_UK - -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.domain.builders.AssertImpl - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject]'s [Collection.size] is [size]. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Suppress("DEPRECATION") -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.en_GB.hasSize(size)")) -fun > Assert.hasSize(size: Int) - = addAssertion(AssertImpl.collection.hasSize(this, size)) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] is an empty [Collection]. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.en_GB.isEmpty()")) -fun > Assert.isEmpty() - = addAssertion(AssertImpl.collection.isEmpty(this)) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] is not an empty [Collection]. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.en_GB.isNotEmpty()")) -fun > Assert.isNotEmpty() - = addAssertion(AssertImpl.collection.isNotEmpty(this)) diff --git a/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/comparableAssertions.kt b/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/comparableAssertions.kt deleted file mode 100644 index b47bbb6f5..000000000 --- a/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/comparableAssertions.kt +++ /dev/null @@ -1,49 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") - -package ch.tutteli.atrium.api.cc.en_UK - -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.domain.builders.AssertImpl - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] is less than [expected]. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.en_GB.isLessThan(expected)")) -fun > Assert.isLessThan(expected: T) - = addAssertion(AssertImpl.comparable.isLessThan(this, expected)) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] is less than or equals [expected]. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.en_GB.isLessOrEquals(expected)")) -fun > Assert.isLessOrEquals(expected: T) - = addAssertion(AssertImpl.comparable.isLessOrEquals(this, expected)) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] is greater than [expected]. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.en_GB.isGreaterThan(expected)")) -fun > Assert.isGreaterThan(expected: T) - = addAssertion(AssertImpl.comparable.isGreaterThan(this, expected)) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] is greater than or equals [expected]. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.en_GB.isGreaterOrEquals(expected)")) -fun > Assert.isGreaterOrEquals(expected: T) - = addAssertion(AssertImpl.comparable.isGreaterOrEquals(this, expected)) - diff --git a/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/creating/charsequence/contains/builders/AtLeastCheckerOption.kt b/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/creating/charsequence/contains/builders/AtLeastCheckerOption.kt deleted file mode 100644 index eb7f9c3cf..000000000 --- a/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/creating/charsequence/contains/builders/AtLeastCheckerOption.kt +++ /dev/null @@ -1,44 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0 */) -package ch.tutteli.atrium.api.cc.en_UK.creating.charsequence.contains.builders - -import ch.tutteli.atrium.api.cc.en_UK.atLeast -import ch.tutteli.atrium.domain.builders.creating.charsequence.contains.builders.AtLeastCheckerOptionBase -import ch.tutteli.atrium.domain.builders.creating.charsequence.contains.builders.WithTimesCheckerOption -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains.SearchBehaviour - -/** - * Represents the extension point for another option after a `contains at least`-check within a sophisticated - * `contains` assertion building process for [CharSequence]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.en_GB.creating.charsequence.contains.builders.AtLeastCheckerOption")) -interface AtLeastCheckerOption - : WithTimesCheckerOption - -/** - * Represents the builder of a `contains at least`-check within the fluent API of a sophisticated - * `contains` assertion for [CharSequence]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - * - * @constructor Represents the builder of a `contains at least` check within the fluent API of a sophisticated - * `contains` assertion for [CharSequence]. - * @param times The number which the check will compare against the actual number of times an expected object is - * found in the input of the search. - * @param containsBuilder The previously used [CharSequenceContains.Builder]. - */ -@Deprecated("Do not rely on this type; will be made internal with 1.0.0", ReplaceWith("AtLeastCheckerOption")) -open class AtLeastCheckerOptionImpl( - times: Int, - containsBuilder: CharSequenceContains.Builder -) : AtLeastCheckerOptionBase( - times, - containsBuilder, - nameContainsNotValuesFun(), - { "${containsBuilder::atLeast.name}($it)" } -), AtLeastCheckerOption - diff --git a/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/creating/charsequence/contains/builders/AtMostCheckerOption.kt b/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/creating/charsequence/contains/builders/AtMostCheckerOption.kt deleted file mode 100644 index dd1b688aa..000000000 --- a/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/creating/charsequence/contains/builders/AtMostCheckerOption.kt +++ /dev/null @@ -1,46 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0 */) -package ch.tutteli.atrium.api.cc.en_UK.creating.charsequence.contains.builders - -import ch.tutteli.atrium.api.cc.en_UK.atLeast -import ch.tutteli.atrium.api.cc.en_UK.atMost -import ch.tutteli.atrium.api.cc.en_UK.exactly -import ch.tutteli.atrium.domain.builders.creating.charsequence.contains.builders.AtMostCheckerOptionBase -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains.SearchBehaviour - -/** - * Represents the extension point for another option after a `contains at least once but at most`-check within - * a sophisticated `contains` assertion building process for [CharSequence]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.en_GB.creating.charsequence.contains.builders.AtMostCheckerOption")) -interface AtMostCheckerOption - : CharSequenceContains.CheckerOption - -/** - * Represents the builder of a `contains at least once but at most` check within the fluent API of a - * sophisticated `contains` assertion for [CharSequence]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - * - * @constructor Represents the builder of a `contains at least once but at most` check within the fluent API of a - * sophisticated `contains` assertion for [CharSequence]. - * @param times The number which the check will compare against the actual number of times an expected object is - * found in the input of the search. - * @param containsBuilder The previously used [CharSequenceContains.Builder]. - */ -@Deprecated("Do not rely on this type; will be made internal with 1.0.0", ReplaceWith("AtMostCheckerOption")) -open class AtMostCheckerOptionImpl( - times: Int, - containsBuilder: CharSequenceContains.Builder -) : AtMostCheckerOptionBase( - times, - containsBuilder, - nameContainsNotValuesFun(), - { "${containsBuilder::atMost.name}($it)" }, - { "${containsBuilder::atLeast.name}($it)" }, - { "${containsBuilder::exactly.name}($it)" } -), AtMostCheckerOption diff --git a/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/creating/charsequence/contains/builders/ButAtMostCheckerOption.kt b/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/creating/charsequence/contains/builders/ButAtMostCheckerOption.kt deleted file mode 100644 index 2c414f384..000000000 --- a/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/creating/charsequence/contains/builders/ButAtMostCheckerOption.kt +++ /dev/null @@ -1,51 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0 */) -package ch.tutteli.atrium.api.cc.en_UK.creating.charsequence.contains.builders - -import ch.tutteli.atrium.api.cc.en_UK.atLeast -import ch.tutteli.atrium.api.cc.en_UK.atMost -import ch.tutteli.atrium.api.cc.en_UK.butAtMost -import ch.tutteli.atrium.api.cc.en_UK.exactly -import ch.tutteli.atrium.domain.builders.creating.charsequence.contains.builders.ButAtMostCheckerOptionBase -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains.SearchBehaviour - -/** - * Represents the extension point for another option after a `contains at least but at most`-check within - * a sophisticated `contains` assertion building process for [CharSequence]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.en_GB.creating.charsequence.contains.builders.ButAtMostCheckerOption")) -interface ButAtMostCheckerOption - : CharSequenceContains.CheckerOption - -/** - * Represents the builder of the second step of a `contains at least but at most` check within the - * fluent API of a sophisticated `contains` assertion for [CharSequence]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied to the input of the search. - * - * @constructor Represents the builder of the second step of a `contains at least but at most` check within the - * fluent API of a sophisticated `contains` assertion for [CharSequence]. - * @param times The number which the check will compare against the actual number of times an expected object is - * found in the input of the search. - * @param containsBuilder The previously used [CharSequenceContains.Builder]. - */ -@Deprecated("Do not rely on this type; will be made internal with 1.0.0", ReplaceWith("ButAtMostCheckerOption")) -open class ButAtMostCheckerOptionImpl( - times: Int, - atLeastBuilder: AtLeastCheckerOption, - containsBuilder: CharSequenceContains.Builder -) : ButAtMostCheckerOptionBase( - times, - atLeastBuilder, - containsBuilder, - nameContainsNotValuesFun(), - { l, u -> "${containsBuilder::atLeast.name}($l).${atLeastBuilder::butAtMost.name}($u)" }, - { "${containsBuilder::atMost.name}($it)" }, - { "${containsBuilder::atLeast.name}($it)" }, - { "${atLeastBuilder::butAtMost.name}($it)" }, - { "${containsBuilder::exactly.name}($it)" } -), ButAtMostCheckerOption diff --git a/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/creating/charsequence/contains/builders/ExactlyCheckerOption.kt b/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/creating/charsequence/contains/builders/ExactlyCheckerOption.kt deleted file mode 100644 index 0657f0343..000000000 --- a/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/creating/charsequence/contains/builders/ExactlyCheckerOption.kt +++ /dev/null @@ -1,42 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0 */) -package ch.tutteli.atrium.api.cc.en_UK.creating.charsequence.contains.builders - -import ch.tutteli.atrium.api.cc.en_UK.exactly -import ch.tutteli.atrium.domain.builders.creating.charsequence.contains.builders.ExactlyCheckerOptionBase -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains.SearchBehaviour - -/** - * Represents the extension point for another option after a `contains exactly`-check within - * a sophisticated `contains` assertion building process for [CharSequence]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.en_GB.creating.charsequence.contains.builders.ExactlyCheckerOption")) -interface ExactlyCheckerOption - : CharSequenceContains.CheckerOption - -/** - * Represents the builder of a `contains exactly` check within the fluent API of a sophisticated - * `contains` assertion for [CharSequence]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - * - * @constructor Represents the builder of a `contains exactly` check within the fluent API of a sophisticated - * `contains` assertion for [CharSequence]. - * @param times The number which the check will compare against the actual number of times an expected object is - * found in the input of the search. - * @param containsBuilder The previously used [CharSequenceContains.Builder]. - */ -@Deprecated("Do not rely on this type; will be made internal with 1.0.0", ReplaceWith("ExactlyCheckerOption")) -open class ExactlyCheckerOptionImpl( - times: Int, - containsBuilder: CharSequenceContains.Builder -) : ExactlyCheckerOptionBase( - times, - containsBuilder, - nameContainsNotValuesFun(), - { "${containsBuilder::exactly.name}($it)" } -), ExactlyCheckerOption diff --git a/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/creating/charsequence/contains/builders/NotCheckerOption.kt b/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/creating/charsequence/contains/builders/NotCheckerOption.kt deleted file mode 100644 index 32af8b30a..000000000 --- a/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/creating/charsequence/contains/builders/NotCheckerOption.kt +++ /dev/null @@ -1,34 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0 */) -package ch.tutteli.atrium.api.cc.en_UK.creating.charsequence.contains.builders - -import ch.tutteli.atrium.domain.builders.creating.charsequence.contains.builders.NotCheckerOptionBase -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains.SearchBehaviour - -/** - * Represents the extension point for another option after a `contains not at all`-check within - * a sophisticated `contains` assertion building process for [CharSequence]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.en_GB.creating.charsequence.contains.builders.NotCheckerOption")) -interface NotCheckerOption - : CharSequenceContains.CheckerOption - -/** - * Represents the builder of a `contains not at all` check within the fluent API of a sophisticated - * `contains` assertion for [CharSequence]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - * - * @constructor Represents the builder of a `contains not at all` check within the fluent API of a sophisticated - * `contains` assertion for [CharSequence]. - * @param containsBuilder The previously used [CharSequenceContains.Builder]. - */ -@Deprecated("Do not rely on this type; will be made internal with 1.0.0", ReplaceWith("NotCheckerOption")) -open class NotCheckerOptionImpl( - containsBuilder: CharSequenceContains.Builder -) : NotCheckerOptionBase(containsBuilder), NotCheckerOption - diff --git a/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/creating/charsequence/contains/builders/NotOrAtMostCheckerOption.kt b/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/creating/charsequence/contains/builders/NotOrAtMostCheckerOption.kt deleted file mode 100644 index 93a8314df..000000000 --- a/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/creating/charsequence/contains/builders/NotOrAtMostCheckerOption.kt +++ /dev/null @@ -1,42 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0 */) -package ch.tutteli.atrium.api.cc.en_UK.creating.charsequence.contains.builders - -import ch.tutteli.atrium.api.cc.en_UK.notOrAtMost -import ch.tutteli.atrium.domain.builders.creating.charsequence.contains.builders.NotOrAtMostCheckerOptionBase -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains.SearchBehaviour - -/** - * Represents the extension point for another option after a `contains not or at most`-check within - * a sophisticated `contains` assertion building process for [CharSequence]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.en_GB.creating.charsequence.contains.builders.NotOrAtMostCheckerOption")) -interface NotOrAtMostCheckerOption - : CharSequenceContains.CheckerOption - -/** - * Represents the builder of a `contains not or at most` check within the fluent API of a - * sophisticated `contains` assertion for [CharSequence]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - * - * @constructor Represents the builder of a `contains not or at most` check within the fluent API of a - * sophisticated `contains` assertion for [CharSequence]. - * @param times The number which the check will compare against the actual number of times an expected object is - * found in the input of the search. - * @param containsBuilder The previously used [CharSequenceContains.Builder]. - */ -@Deprecated("Do not rely on this type; will be made internal with 1.0.0", ReplaceWith("NotOrAtMostCheckerOption")) -open class NotOrAtMostCheckerOptionImpl( - times: Int, - containsBuilder: CharSequenceContains.Builder -) : NotOrAtMostCheckerOptionBase( - times, - containsBuilder, - nameContainsNotValuesFun(), - { "${containsBuilder::notOrAtMost.name}($it)" } -), NotOrAtMostCheckerOption diff --git a/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/creating/charsequence/contains/builders/nameContainsNotFun.kt b/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/creating/charsequence/contains/builders/nameContainsNotFun.kt deleted file mode 100644 index e62af93d6..000000000 --- a/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/creating/charsequence/contains/builders/nameContainsNotFun.kt +++ /dev/null @@ -1,12 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0 */) -package ch.tutteli.atrium.api.cc.en_UK.creating.charsequence.contains.builders - -import ch.tutteli.atrium.api.cc.en_UK.containsNot -import ch.tutteli.atrium.creating.AssertionPlant -import kotlin.reflect.KFunction3 - -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.en_GB.creating.charsequence.contains.builders.NameContainsNotFunKt.nameContainsNotValuesFun")) -internal fun nameContainsNotValuesFun(): String { - val f: KFunction3, Any, Array, AssertionPlant> = AssertionPlant::containsNot - return f.name -} diff --git a/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/creating/iterable/contains/builders/AtLeastCheckerOption.kt b/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/creating/iterable/contains/builders/AtLeastCheckerOption.kt deleted file mode 100644 index 707e4599e..000000000 --- a/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/creating/iterable/contains/builders/AtLeastCheckerOption.kt +++ /dev/null @@ -1,42 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0 */) -package ch.tutteli.atrium.api.cc.en_UK.creating.iterable.contains.builders - -import ch.tutteli.atrium.api.cc.en_UK.atLeast -import ch.tutteli.atrium.domain.builders.creating.iterable.contains.builders.AtLeastCheckerOptionBase -import ch.tutteli.atrium.domain.builders.creating.iterable.contains.builders.WithTimesCheckerOption -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InAnyOrderSearchBehaviour - -/** - * Represents the extension point for another option after a `contains at least`-check within a sophisticated - * `contains` assertion building process for [Iterable]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.en_GB.creating.iterable.contains.builders.AtLeastCheckerOption")) -interface AtLeastCheckerOption, out S : IterableContains.SearchBehaviour> - : WithTimesCheckerOption - -/** - * Represents the builder of a `contains at least` check within the fluent API of a sophisticated - * `contains` assertion for [Iterable]. - * - * @param T The input type of the search. - * - * @constructor Represents the builder of a `contains at least` check within the fluent API of a sophisticated - * `contains` assertion for [Iterable]. - * @param times The number which the check will compare against the actual number of times an expected entry is - * found in the [Iterable]. - * @param containsBuilder The previously used [IterableContains.Builder]. - */ -@Deprecated("Do not rely on this type; will be made internal with 1.0.0", ReplaceWith("AtLeastCheckerOption")) -open class AtLeastCheckerOptionImpl, out S : InAnyOrderSearchBehaviour>( - times: Int, - containsBuilder: IterableContains.Builder -) : AtLeastCheckerOptionBase( - times, - containsBuilder, - nameContainsNotValuesFun(), - { "${containsBuilder::atLeast.name}($it)" } -), AtLeastCheckerOption diff --git a/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/creating/iterable/contains/builders/AtMostCheckerOption.kt b/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/creating/iterable/contains/builders/AtMostCheckerOption.kt deleted file mode 100644 index e1dbe446a..000000000 --- a/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/creating/iterable/contains/builders/AtMostCheckerOption.kt +++ /dev/null @@ -1,46 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0 */) -package ch.tutteli.atrium.api.cc.en_UK.creating.iterable.contains.builders - -import ch.tutteli.atrium.api.cc.en_UK.atLeast -import ch.tutteli.atrium.api.cc.en_UK.atMost -import ch.tutteli.atrium.api.cc.en_UK.exactly -import ch.tutteli.atrium.domain.builders.creating.iterable.contains.builders.AtMostCheckerOptionBase -import ch.tutteli.atrium.domain.builders.creating.iterable.contains.builders.WithTimesCheckerOption -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InAnyOrderSearchBehaviour - -/** - * Represents the extension point for another option after a `contains at least once but at most`-check within - * a sophisticated `contains` assertion building process for [Iterable]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.en_GB.creating.iterable.contains.builders.AtMostCheckerOption")) -interface AtMostCheckerOption, out S : IterableContains.SearchBehaviour> - : WithTimesCheckerOption - -/** - * Represents the builder of a `contains at least once but at most` check within the fluent API of a - * sophisticated `contains` assertion for [Iterable]. - * - * @param T The input type of the search. - * - * @constructor Represents the builder of a `contains at least once but at most` check within the fluent API of a - * sophisticated `contains` assertion for [Iterable]. - * @param times The number which the check will compare against the actual number of times an expected entry is - * found in the [Iterable]. - * @param containsBuilder The previously used [IterableContains.Builder]. - */ -@Deprecated("Do not rely on this type; will be made internal with 1.0.0", ReplaceWith("AtMostCheckerOption")) -open class AtMostCheckerOptionImpl, out S : InAnyOrderSearchBehaviour>( - times: Int, - containsBuilder: IterableContains.Builder -) : AtMostCheckerOptionBase( - times, - containsBuilder, - nameContainsNotValuesFun(), - { "${containsBuilder::atMost.name}($it)" }, - { "${containsBuilder::atLeast.name}($it)" }, - { "${containsBuilder::exactly.name}($it)" } -), AtMostCheckerOption diff --git a/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/creating/iterable/contains/builders/ButAtMostCheckerOption.kt b/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/creating/iterable/contains/builders/ButAtMostCheckerOption.kt deleted file mode 100644 index 4ff80cc3d..000000000 --- a/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/creating/iterable/contains/builders/ButAtMostCheckerOption.kt +++ /dev/null @@ -1,51 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0 */) -package ch.tutteli.atrium.api.cc.en_UK.creating.iterable.contains.builders - -import ch.tutteli.atrium.api.cc.en_UK.atLeast -import ch.tutteli.atrium.api.cc.en_UK.atMost -import ch.tutteli.atrium.api.cc.en_UK.butAtMost -import ch.tutteli.atrium.api.cc.en_UK.exactly -import ch.tutteli.atrium.domain.builders.creating.iterable.contains.builders.ButAtMostCheckerOptionBase -import ch.tutteli.atrium.domain.builders.creating.iterable.contains.builders.WithTimesCheckerOption -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InAnyOrderSearchBehaviour - -/** - * Represents the extension point for another option after a `contains at least but at most`-check within a - * sophisticated `contains` assertion building process for [Iterable]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.en_GB.creating.iterable.contains.builders.ButAtMostCheckerOption")) -interface ButAtMostCheckerOption, out S : IterableContains.SearchBehaviour> - : WithTimesCheckerOption - -/** - * Represents the builder of the second step of a `contains at least but at most` check within the - * fluent API of a sophisticated `contains` assertion for [Iterable]. - * - * @param T The input type of the search. - * - * @constructor Represents the builder of the second step of a `contains at least but at most` check within the - * fluent API of a sophisticated `contains` assertion for [Iterable]. - * @param times The number which the check will compare against the actual number of times an expected entry is - * found in the [Iterable]. - * @param containsBuilder The previously used [IterableContains.Builder]. - */ -@Deprecated("Do not rely on this type; will be made internal with 1.0.0", ReplaceWith("ButAtMostCheckerOption")) -open class ButAtMostCheckerOptionImpl, out S : InAnyOrderSearchBehaviour>( - times: Int, - atLeastBuilder: AtLeastCheckerOption, - containsBuilder: IterableContains.Builder -) : ButAtMostCheckerOptionBase( - times, - atLeastBuilder, - containsBuilder, - nameContainsNotValuesFun(), - { l, u -> "${containsBuilder::atLeast.name}($l).${atLeastBuilder::butAtMost.name}($u)" }, - { "${containsBuilder::atMost.name}($it)" }, - { "${containsBuilder::atLeast.name}($it)" }, - { "${atLeastBuilder::butAtMost.name}($it)" }, - { "${containsBuilder::exactly.name}($it)" } -), ButAtMostCheckerOption diff --git a/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/creating/iterable/contains/builders/ExactlyCheckerOption.kt b/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/creating/iterable/contains/builders/ExactlyCheckerOption.kt deleted file mode 100644 index 47f1facac..000000000 --- a/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/creating/iterable/contains/builders/ExactlyCheckerOption.kt +++ /dev/null @@ -1,42 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0 */) -package ch.tutteli.atrium.api.cc.en_UK.creating.iterable.contains.builders - -import ch.tutteli.atrium.api.cc.en_UK.exactly -import ch.tutteli.atrium.domain.builders.creating.iterable.contains.builders.ExactlyCheckerOptionBase -import ch.tutteli.atrium.domain.builders.creating.iterable.contains.builders.WithTimesCheckerOption -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InAnyOrderSearchBehaviour - -/** - * Represents the extension point for another option after a `contains exactly`-check within - * a sophisticated `contains` assertion building process for [Iterable]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.en_GB.creating.iterable.contains.builders.ExactlyCheckerOption")) -interface ExactlyCheckerOption, out S : IterableContains.SearchBehaviour> - : WithTimesCheckerOption - -/** - * Represents the builder of a `contains exactly` check within the fluent API of a sophisticated - * `contains` assertion for [Iterable]. - * - * @param T The input type of the search. - * - * @constructor Represents the builder of a `contains exactly` check within the fluent API of a sophisticated - * `contains` assertion for [Iterable]. - * @param times The number which the check will compare against the actual number of times an expected entry is - * found in the [Iterable]. - * @param containsBuilder The previously used [IterableContains.Builder]. - */ -@Deprecated("Do not rely on this type; will be made internal with 1.0.0", ReplaceWith("ExactlyCheckerOption")) -open class ExactlyCheckerOptionImpl, out S : InAnyOrderSearchBehaviour>( - times: Int, - containsBuilder: IterableContains.Builder -) : ExactlyCheckerOptionBase( - times, - containsBuilder, - nameContainsNotValuesFun(), - { "${containsBuilder::exactly.name}($it)" } -), ExactlyCheckerOption diff --git a/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/creating/iterable/contains/builders/NotCheckerOption.kt b/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/creating/iterable/contains/builders/NotCheckerOption.kt deleted file mode 100644 index 00aede39a..000000000 --- a/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/creating/iterable/contains/builders/NotCheckerOption.kt +++ /dev/null @@ -1,34 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0 */) -package ch.tutteli.atrium.api.cc.en_UK.creating.iterable.contains.builders - -import ch.tutteli.atrium.domain.builders.creating.iterable.contains.builders.NotCheckerOptionBase -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InAnyOrderSearchBehaviour - -/** - * Represents the extension point for another option after a `contains not at all`-check within - * a sophisticated `contains` assertion building process for [Iterable]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.en_GB.creating.iterable.contains.builders.NotCheckerOption")) -interface NotCheckerOption, out S : IterableContains.SearchBehaviour> - : IterableContains.CheckerOption - -/** - * Represents the builder of a `contains not at all` check within the fluent API of a sophisticated - * `contains` assertion for [Iterable]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - * - * @constructor Represents the builder of a `contains not at all` check within the fluent API of a sophisticated - * `contains not` assertion for [Iterable]. - * @param containsBuilder The previously used [IterableContains.Builder]. - */ -@Deprecated("Do not rely on this type; will be made internal with 1.0.0", ReplaceWith("NotCheckerOption")) -open class NotCheckerOptionImpl, out S : InAnyOrderSearchBehaviour>( - containsBuilder: IterableContains.Builder -) : NotCheckerOptionBase(containsBuilder), NotCheckerOption - diff --git a/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/creating/iterable/contains/builders/NotOrAtMostCheckerOption.kt b/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/creating/iterable/contains/builders/NotOrAtMostCheckerOption.kt deleted file mode 100644 index e0e44346d..000000000 --- a/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/creating/iterable/contains/builders/NotOrAtMostCheckerOption.kt +++ /dev/null @@ -1,42 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0 */) -package ch.tutteli.atrium.api.cc.en_UK.creating.iterable.contains.builders - -import ch.tutteli.atrium.api.cc.en_UK.notOrAtMost -import ch.tutteli.atrium.domain.builders.creating.iterable.contains.builders.NotOrAtMostCheckerOptionBase -import ch.tutteli.atrium.domain.builders.creating.iterable.contains.builders.WithTimesCheckerOption -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InAnyOrderSearchBehaviour - -/** - * Represents the extension point for another option after a `contains not or at most`-check within - * a sophisticated `contains` assertion building process for [Iterable]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.en_GB.creating.iterable.contains.builders.NotOrAtMostCheckerOption")) -interface NotOrAtMostCheckerOption, out S : IterableContains.SearchBehaviour> - : WithTimesCheckerOption - -/** - * Represents the builder of a `contains not or at most` check within the fluent API of a - * sophisticated `contains` assertion for [Iterable]. - * - * @param T The input type of the search. - * - * @constructor Represents the builder of a `contains at least once but at most` check within the fluent API of a - * sophisticated `contains` assertion for [Iterable]. - * @param times The number which the check will compare against the actual number of times an expected entry is - * found in the [Iterable]. - * @param containsBuilder The previously used [IterableContains.Builder]. - */ -@Deprecated("Do not rely on this type; will be made internal with 1.0.0", ReplaceWith("NotOrAtMostCheckerOption")) -open class NotOrAtMostCheckerOptionImpl, out S : InAnyOrderSearchBehaviour>( - times: Int, - containsBuilder: IterableContains.Builder -) : NotOrAtMostCheckerOptionBase( - times, - containsBuilder, - nameContainsNotValuesFun(), - { "${containsBuilder::notOrAtMost.name}($it)" } -), NotOrAtMostCheckerOption diff --git a/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/creating/iterable/contains/builders/nameContainsNotFun.kt b/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/creating/iterable/contains/builders/nameContainsNotFun.kt deleted file mode 100644 index b4630ed32..000000000 --- a/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/creating/iterable/contains/builders/nameContainsNotFun.kt +++ /dev/null @@ -1,12 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0 */) -package ch.tutteli.atrium.api.cc.en_UK.creating.iterable.contains.builders - -import ch.tutteli.atrium.api.cc.en_UK.containsNot -import ch.tutteli.atrium.creating.AssertionPlant -import kotlin.reflect.KFunction3 - -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.en_GB.creating.iterable.contains.builders.nameContainsNotValuesFun")) -internal fun nameContainsNotValuesFun(): String { - val f: KFunction3>, Double, Array, AssertionPlant>> = AssertionPlant>::containsNot - return f.name -} diff --git a/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/featureAssertions.kt b/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/featureAssertions.kt deleted file mode 100644 index 6547dec29..000000000 --- a/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/featureAssertions.kt +++ /dev/null @@ -1,272 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") - -package ch.tutteli.atrium.api.cc.en_UK - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.assertions.AssertionGroup -import ch.tutteli.atrium.assertions.FeatureAssertionGroupType -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.creating.AssertionPlantNullable -import ch.tutteli.atrium.domain.builders.AssertImpl -import kotlin.reflect.* - -/** - * Creates an [AssertionPlant] for the given [property] which eventually adds [AssertionGroup]s with a - * [FeatureAssertionGroupType], containing the assertions created for the given [property], to the current plant. - * - * @return An [AssertionPlant] for the given [property]. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.en_GB.property(property)")) -fun Assert.property(property: KProperty0): AssertionPlant - = AssertImpl.feature.property(this, property) - -/** - * Creates an [AssertionPlant] for the given [property] which eventually adds [AssertionGroup]s with a - * [FeatureAssertionGroupType], containing the assertions created for the given [property], to the current plant -- - * starting with a group consisting of the [Assertion]s created by the [assertionCreator] lambda. - * - * @return An [AssertionPlant] for the given [property]. - * - * @throws AssertionError Might throw an [AssertionError] if an additionally created [Assertion] - * (by calling [assertionCreator]) does not hold. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.en_GB.property(property, assertionCreator)")) -fun Assert.property(property: KProperty0, assertionCreator: AssertionPlant.() -> Unit): AssertionPlant - = AssertImpl.feature.property(this, property, assertionCreator) - - -/** - * Creates an [AssertionPlantNullable] for the given [property] which eventually adds [AssertionGroup]s with a - * [FeatureAssertionGroupType], containing the assertions created for the given [property], to the current plant. - * - * @return An [AssertionPlantNullable] for the given [property]. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.en_GB.property(property)")) -fun Assert.property(property: KProperty0): AssertionPlantNullable - = AssertImpl.feature.property(this, property) - -/** - * Creates an [AssertionPlant], for the value returned by calling [method], which eventually adds [AssertionGroup]s - * with a [FeatureAssertionGroupType], containing the assertions created for the return value, to the current plant. - * - * @return An [AssertionPlant] for the return value of the given [method]. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.en_GB.returnValueOf(method)")) -fun Assert.returnValueOf(method: KFunction0): AssertionPlant - = AssertImpl.feature.returnValueOf0(this, method) - -/** - * Creates an [AssertionPlant], for the value returned by calling [method], which eventually adds - * [AssertionGroup]s with a [FeatureAssertionGroupType], containing the assertions created for the return value, - * to the current plant -- starting with a group consisting of the [Assertion]s created by the - * [assertionCreator] lambda. - * - * @return An [AssertionPlant] for the return value of the given [method]. - * - * @throws AssertionError Might throw an [AssertionError] if an additionally created [Assertion] - * (by calling [assertionCreator]) does not hold. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.en_GB.returnValueOf(method, assertionCreator)")) -fun Assert.returnValueOf(method: KFunction0, assertionCreator: AssertionPlant.() -> Unit): AssertionPlant - = AssertImpl.feature.returnValueOf0(this, method, assertionCreator) - -/** - * Creates an [AssertionPlantNullable], for the value returned by calling [method], which eventually adds - * [AssertionGroup]s with a [FeatureAssertionGroupType], containing the assertions created for the return value, - * to the current plant. - * - * @return An [AssertionPlantNullable] for the given [property]. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.en_GB.returnValueOf(method)")) -fun Assert.returnValueOf(method: KFunction0): AssertionPlantNullable - = AssertImpl.feature.returnValueOf0(this, method) - -/** - * Creates an [AssertionPlant], for the value returned by calling [method] with [arg1], which eventually adds - * [AssertionGroup]s with a [FeatureAssertionGroupType], containing the assertions created for the return value, - * to the current plant. - * - * @return An [AssertionPlant] for the return value of the given [method]. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.en_GB.returnValueOf(method, arg1)")) -fun Assert.returnValueOf(method: KFunction1, arg1: T1): AssertionPlant - = AssertImpl.feature.returnValueOf1(this, method, arg1) - -/** - * Creates an [AssertionPlant], for the value returned by calling [method] with [arg1], which eventually adds - * [AssertionGroup]s with a [FeatureAssertionGroupType], containing the assertions created for the return value, - * to the current plant -- starting with a group consisting of the [Assertion]s created by the - * [assertionCreator] lambda. - * - * @return An [AssertionPlant] for the return value of the given [method]. - * - * @throws AssertionError Might throw an [AssertionError] if an additionally created [Assertion] - * (by calling [assertionCreator]) does not hold. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.en_GB.returnValueOf(method, arg1, assertionCreator)")) -fun Assert.returnValueOf(method: KFunction1, arg1: T1, assertionCreator: AssertionPlant.() -> Unit): AssertionPlant - = AssertImpl.feature.returnValueOf1(this, method, arg1, assertionCreator) - -/** - * Creates an [AssertionPlantNullable], for the value returned by calling [method] with [arg1], which eventually adds - * [AssertionGroup]s with a [FeatureAssertionGroupType], containing the assertions created for the return value, - * to the current plant. - * - * @return An [AssertionPlantNullable] for the given [property]. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.en_GB.returnValueOf(method, arg1)")) -fun Assert.returnValueOf(method: KFunction1, arg1: T1): AssertionPlantNullable - = AssertImpl.feature.returnValueOf1(this, method, arg1) - -/** - * Creates an [AssertionPlant], for the value returned by calling [method] with [arg1] and [arg2], which eventually - * adds [AssertionGroup]s with a [FeatureAssertionGroupType], containing the assertions created for the return value, - * to the current plant. - * - * @return An [AssertionPlant] for the return value of the given [method]. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.en_GB.returnValueOf(method, arg1, arg2)")) -fun Assert.returnValueOf(method: KFunction2, arg1: T1, arg2: T2): AssertionPlant - = AssertImpl.feature.returnValueOf2(this, method, arg1, arg2) - -/** - * Creates an [AssertionPlant], for the value returned by calling [method] with [arg1] and [arg2], which eventually - * adds [AssertionGroup]s with a [FeatureAssertionGroupType], containing the assertions created for the return value, - * to the current plant -- starting with a group consisting of the [Assertion]s created by the - * [assertionCreator] lambda. - * - * @return An [AssertionPlant] for the return value of the given [method]. - * - * @throws AssertionError Might throw an [AssertionError] if an additionally created [Assertion] - * (by calling [assertionCreator]) does not hold. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.en_GB.returnValueOf(method, arg1, arg2, assertionCreator)")) -fun Assert.returnValueOf(method: KFunction2, arg1: T1, arg2: T2, assertionCreator: AssertionPlant.() -> Unit): AssertionPlant - = AssertImpl.feature.returnValueOf2(this, method, arg1, arg2, assertionCreator) - -/** - * Creates an [AssertionPlantNullable], for the value returned by calling [method] with [arg1] and [arg2], which - * eventually adds [AssertionGroup]s with a [FeatureAssertionGroupType], containing the assertions created for - * the return value, to the current plant. - * - * @return An [AssertionPlantNullable] for the given [property]. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.en_GB.returnValueOf(method, arg1, arg2)")) -fun Assert.returnValueOf(method: KFunction2, arg1: T1, arg2: T2): AssertionPlantNullable - = AssertImpl.feature.returnValueOf2(this, method, arg1, arg2) - - -/** - * Creates an [AssertionPlant], for the value returned by calling [method] with [arg1], [arg2] and [arg3], - * which eventually adds [AssertionGroup]s with a [FeatureAssertionGroupType], containing the assertions created - * for the return value, to the current plant. - * - * @return An [AssertionPlant] for the return value of the given [method]. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.en_GB.returnValueOf(method, arg1, arg2, arg3)")) -fun Assert.returnValueOf(method: KFunction3, arg1: T1, arg2: T2, arg3: T3): AssertionPlant - = AssertImpl.feature.returnValueOf3(this, method, arg1, arg2, arg3) - -/** - * Creates an [AssertionPlant], for the value returned by calling [method] with [arg1], [arg2] and [arg3], - * which eventually adds [AssertionGroup]s with a [FeatureAssertionGroupType], containing the assertions created - * for the return value, to the current plant -- starting with a group consisting of the [Assertion]s created by the - * [assertionCreator] lambda. - * - * @return An [AssertionPlant] for the return value of the given [method]. - * - * @throws AssertionError Might throw an [AssertionError] if an additionally created [Assertion] - * (by calling [assertionCreator]) does not hold. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.en_GB.returnValueOf(method, arg1, arg2, arg3, assertionCreator)")) -fun Assert.returnValueOf(method: KFunction3, arg1: T1, arg2: T2, arg3: T3, assertionCreator: AssertionPlant.() -> Unit): AssertionPlant - = AssertImpl.feature.returnValueOf3(this, method, arg1, arg2, arg3, assertionCreator) - -/** - * Creates an [AssertionPlantNullable], for the value returned by calling [method] with [arg1], [arg2] and [arg3], - * which eventually adds [AssertionGroup]s with a [FeatureAssertionGroupType], containing the assertions created for - * the return value, to the current plant. - * - * @return An [AssertionPlantNullable] for the given [property]. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.en_GB.returnValueOf(method, arg1, arg2, arg3)")) -fun Assert.returnValueOf(method: KFunction3, arg1: T1, arg2: T2, arg3: T3): AssertionPlantNullable - = AssertImpl.feature.returnValueOf3(this, method, arg1, arg2, arg3) - -/** - * Creates an [AssertionPlant], for the value returned by calling [method] with [arg1], [arg2], [arg3] and [arg4], - * which eventually adds [AssertionGroup]s with a [FeatureAssertionGroupType], containing the assertions created - * for the return value, to the current plant. - * - * @return An [AssertionPlant] for the return value of the given [method]. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.en_GB.returnValueOf(method, arg1, arg2, arg3, arg4)")) -fun Assert.returnValueOf(method: KFunction4, arg1: T1, arg2: T2, arg3: T3, arg4: T4): AssertionPlant - = AssertImpl.feature.returnValueOf4(this, method, arg1, arg2, arg3, arg4) - -/** - * Creates an [AssertionPlant], for the value returned by calling [method] with [arg1], [arg2], [arg3] and [arg4], - * which eventually adds [AssertionGroup]s with a [FeatureAssertionGroupType], containing the assertions created - * for the return value, to the current plant -- starting with a group consisting of the [Assertion]s created by the - * [assertionCreator] lambda. - * - * @return An [AssertionPlant] for the return value of the given [method]. - * - * @throws AssertionError Might throw an [AssertionError] if an additionally created [Assertion] - * (by calling [assertionCreator]) does not hold. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.en_GB.returnValueOf(method, arg1, arg2, arg3, arg4, assertionCreator)")) -fun Assert.returnValueOf(method: KFunction4, arg1: T1, arg2: T2, arg3: T3, arg4: T4, assertionCreator: AssertionPlant.() -> Unit): AssertionPlant - = AssertImpl.feature.returnValueOf4(this, method, arg1, arg2, arg3, arg4, assertionCreator) - -/** - * Creates an [AssertionPlantNullable], for the value returned by calling [method] with [arg1], [arg2], [arg3] - * and [arg4], which eventually adds [AssertionGroup]s with a [FeatureAssertionGroupType], containing the assertions - * created for the return value, to the current plant. - * - * @return An [AssertionPlantNullable] for the given [property]. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.en_GB.returnValueOf(method, arg1, arg2, arg3, arg4)")) -fun Assert.returnValueOf(method: KFunction4, arg1: T1, arg2: T2, arg3: T3, arg4: T4): AssertionPlantNullable - = AssertImpl.feature.returnValueOf4(this, method, arg1, arg2, arg3, arg4) - -/** - * Creates an [AssertionPlant], for the value returned by calling [method] with [arg1], [arg2], [arg3], [arg4] - * and [arg5], which eventually adds [AssertionGroup]s with a [FeatureAssertionGroupType], containing the assertions - * created for the return value, to the current plant. - * - * @return An [AssertionPlant] for the return value of the given [method]. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.en_GB.returnValueOf(method, arg1, arg2, arg3, arg4, arg5)")) -fun Assert.returnValueOf(method: KFunction5, arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5): AssertionPlant - = AssertImpl.feature.returnValueOf5(this, method, arg1, arg2, arg3, arg4, arg5) - -/** - * Creates an [AssertionPlant], for the value returned by calling [method] with [arg1], [arg2], [arg3], [arg4] - * and [arg5], which eventually adds [AssertionGroup]s with a [FeatureAssertionGroupType], containing the assertions - * created for the return value, to the current plant -- starting with a group consisting of the [Assertion]s created - * by the [assertionCreator] lambda. - * - * @return An [AssertionPlant] for the return value of the given [method]. - * - * @throws AssertionError Might throw an [AssertionError] if an additionally created [Assertion] - * (by calling [assertionCreator]) does not hold. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.en_GB.returnValueOf(method, arg1, arg2, arg3, arg4, arg5, assertionCreator)")) -fun Assert.returnValueOf(method: KFunction5, arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, assertionCreator: AssertionPlant.() -> Unit): AssertionPlant - = AssertImpl.feature.returnValueOf5(this, method, arg1, arg2, arg3, arg4, arg5, assertionCreator) - -/** - * Creates an [AssertionPlantNullable], for the value returned by calling [method] with [arg1], [arg2], [arg3], - * [arg4] and [arg5], which eventually adds [AssertionGroup]s with a [FeatureAssertionGroupType], containing the - * assertions created for the return value, to the current plant. - * - * @return An [AssertionPlantNullable] for the given [property]. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.en_GB.returnValueOf(method, arg1, arg2, arg3, arg4, arg5)")) -fun Assert.returnValueOf(method: KFunction5, arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5): AssertionPlantNullable - = AssertImpl.feature.returnValueOf5(this, method, arg1, arg2, arg3, arg4, arg5) - - diff --git a/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/floatingPointAssertions.kt b/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/floatingPointAssertions.kt deleted file mode 100644 index d77df5cff..000000000 --- a/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/floatingPointAssertions.kt +++ /dev/null @@ -1,60 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") - -package ch.tutteli.atrium.api.cc.en_UK - -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.domain.builders.AssertImpl -import java.math.BigDecimal - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] is equal to [expected] with an error [tolerance] - * (range including bounds). - * - * It effectively compares the absolute difference between [Assert.subject][SubjectProvider.subject] and [expected] and compares it with - * the [tolerance]. As long as it is less than or equal the [tolerance] the assertion holds; otherwise it fails. - * A more mathematical way of expressing the assertion is the following inequality: - * - * | [Assert.subject][SubjectProvider.subject] - [expected] | ≤ [tolerance] - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.en_GB.toBeWithErrorTolerance(expected, tolerance)")) -fun Assert.toBeWithErrorTolerance(expected: Float, tolerance: Float) - = addAssertion(AssertImpl.floatingPoint.toBeWithErrorTolerance(this, expected, tolerance)) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] is equal to [expected] with an error [tolerance] - * (range including bounds). - * - * It effectively compares the absolute difference between [Assert.subject][SubjectProvider.subject] and [expected] and compares it with - * the [tolerance]. As long as it is less than or equal the [tolerance] the assertion holds; otherwise it fails. - * A more mathematical way of expressing the assertion is the following inequality: - * - * | [Assert.subject][SubjectProvider.subject] - [expected] | ≤ [tolerance] - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.en_GB.toBeWithErrorTolerance(expected, tolerance)")) -fun Assert.toBeWithErrorTolerance(expected: Double, tolerance: Double) - = addAssertion(AssertImpl.floatingPoint.toBeWithErrorTolerance(this, expected, tolerance)) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] is equal to [expected] with an error [tolerance] - * (range including bounds). - * - * It effectively compares the absolute difference between [Assert.subject][SubjectProvider.subject] and [expected] and compares it with - * the [tolerance]. As long as it is less than or equal the [tolerance] the assertion holds; otherwise it fails. - * A more mathematical way of expressing the assertion is the following inequality: - * - * | [Assert.subject][SubjectProvider.subject] - [expected] | ≤ [tolerance] - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.en_GB.toBeWithErrorTolerance(expected, tolerance)")) -fun Assert.toBeWithErrorTolerance(expected: BigDecimal, tolerance: BigDecimal) - = addAssertion(AssertImpl.floatingPoint.toBeWithErrorTolerance(this, expected, tolerance)) diff --git a/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/iterableAssertions.kt b/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/iterableAssertions.kt deleted file mode 100644 index 16f07c78b..000000000 --- a/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/iterableAssertions.kt +++ /dev/null @@ -1,161 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") -package ch.tutteli.atrium.api.cc.en_UK - -import ch.tutteli.atrium.api.cc.en_UK.creating.iterable.contains.builders.NotCheckerOption -import ch.tutteli.atrium.api.cc.en_UK.creating.iterable.contains.builders.NotCheckerOptionImpl -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.domain.builders.AssertImpl -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InAnyOrderSearchBehaviour -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.NoOpSearchBehaviour -import ch.tutteli.atrium.api.cc.en_UK.assertions.iterable.contains.builders.IterableContainsNotCheckerBuilder as DeprecatedNotCheckerBuilder -import ch.tutteli.atrium.assertions.iterable.contains.builders.IterableContainsBuilder as DeprecatedBuilder - -/** - * Creates an [IterableContains.Builder] based on this [AssertionPlant] which allows to define - * more sophisticated `contains` assertions. - * - * @return The newly created builder. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.en_GB.contains")) -val > Assert.contains: IterableContains.Builder - get() = AssertImpl.iterable.containsBuilder(this) - -@Deprecated("Use the extension fun `contains` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", ReplaceWith("plant.contains")) -fun > getContains(plant: Assert): DeprecatedBuilder - = DeprecatedBuilder(plant, plant.contains.searchBehaviour) - - -/** - * Creates an [IterableContains.Builder] based on this [AssertionPlant] which allows to define - * more sophisticated `contains not` assertions. - * - * @return The newly created builder. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.en_GB.containsNot")) -val > Assert.containsNot: NotCheckerOption - get() = NotCheckerOptionImpl(AssertImpl.iterable.containsNotBuilder(this)) - -@Deprecated("Use the extension fun `containsNot` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", ReplaceWith("plant.containsNot")) -fun > getContainsNot(plant: Assert): DeprecatedNotCheckerBuilder - = DeprecatedNotCheckerBuilder(AssertImpl.iterable.containsNotBuilder(plant)) - - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] contains [expected] - * and the [otherExpected] (if given). - * - * It is a shortcut for `contains.inAnyOrder.atLeast(1).values(expected, *otherExpected)` - * - * Notice, that it does not search for unique matches. Meaning, if the iterable is `setOf('a', 'b')` and [expected] is - * defined as `'a'` and one [otherExpected] is defined as `'a'` as well, then both match, even though they match the - * same entry. Use an option such as [atLeast], [atMost] and [exactly] to control the number of occurrences you expect. - * - * Meaning you might want to use: - * `contains.inAnyOrder.exactly(2).value('a')` - * instead of: - * `contains('a', 'a')` - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use `containsNullableValues` from package en_GB or `contains` from package en_GB in case you do not deal with nullable elements; will be removed with 1.0.0", ReplaceWith("containsNullableValues(expected, *otherExpected)", "ch.tutteli.atrium.api.cc.en_GB.containsNullableValues")) -fun > Assert.contains(expected: E, vararg otherExpected: E): AssertionPlant - = contains.inAnyOrder.atLeast(1).values(expected, *otherExpected) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] contains an entry holding the assertions created by the - * [assertionCreator] and an additional entry for each [otherAssertionCreators] (if given) where it does not matter - * in which order the entries appear. - * - * It is a shortcut for `contains.inAnyOrder.atLeast(1).entries(assertionCreator, *otherAssertionCreators)` - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.en_GB.contains(assertionCreator, *otherAssertionCreators)")) -fun > Assert.contains(assertionCreator: Assert.() -> Unit, vararg otherAssertionCreators: Assert.() -> Unit): AssertionPlant - = contains.inAnyOrder.atLeast(1).entries(assertionCreator, *otherAssertionCreators) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] contains an entry holding the assertions created by the - * [assertionCreator] and an additional entry for each [otherAssertionCreators] (if given) where it does not matter - * in which order the entries appear. - * - * It is a shortcut for `contains.inAnyOrder.atLeast(1).entries(assertionCreator, *otherAssertionCreators)` - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@JvmName("containsDeprecated") -@Deprecated("Use `containsNullableEntries` from package en_GB or `contains` from package en_GB in case you do not deal with nullable elements; will be removed with 1.0.0", ReplaceWith("containsNullableEntries(assertionCreator, *otherAssertionCreators)", "ch.tutteli.atrium.api.cc.en_GB.containsNullableEntries")) -fun > Assert.contains(assertionCreator: (Assert.() -> Unit)?, vararg otherAssertionCreators: (Assert.() -> Unit)?): AssertionPlant - = contains.inAnyOrder.atLeast(1).entries(assertionCreator, *otherAssertionCreators) - -@Deprecated("Use the extension fun `contains` instead; will be removed 1.0.0", ReplaceWith("plant.contains(assertionCreator, *otherAssertionCreators)")) -fun > containsNullable(plant: Assert, assertionCreator: (Assert.() -> Unit)?, vararg otherAssertionCreators: (Assert.() -> Unit)?): AssertionPlant - = plant.contains(assertionCreator, *otherAssertionCreators) - - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] contains only [expected] and the [otherExpected] (if given) in - * the defined order. - * - * It is a shortcut for `contains.inOrder.only.values(expected, *otherExpected)` - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use `containsStrictlyNullableValues` from package en_GB or `containsStrictly` from package en_GB in case you do not deal with nullable elements; will be removed with 1.0.0", ReplaceWith("containsStrictlyNullableValues(expected, *otherExpected)", "ch.tutteli.atrium.api.cc.en_GB.containsStrictlyNullableValues")) -fun > Assert.containsStrictly(expected: E, vararg otherExpected: E): AssertionPlant - = contains.inOrder.only.values(expected, *otherExpected) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] contains only an entry holding the assertions created by the - * [assertionCreator] and an additional entry for each [otherAssertionCreators] (if given) in the defined order - * holding the assertions created by them. - * - * It is a shortcut for `contains.inOrder.only.entries(expected, *otherExpected)` - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.en_GB.containsStrictly(assertionCreator, *otherAssertionCreators)")) -fun > Assert.containsStrictly(assertionCreator: Assert.() -> Unit, vararg otherAssertionCreators: Assert.() -> Unit): AssertionPlant - = contains.inOrder.only.entries(assertionCreator, *otherAssertionCreators) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] contains only an entry holding the assertions created by the - * [assertionCreator] and an additional entry for each [otherAssertionCreators] (if given) in the defined order - * holding the assertions created by them. - * - * It is a shortcut for `contains.inOrder.only.entries(expected, *otherExpected)` - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use `containsStrictlyNullableEntries` from package en_GB or `containsStrictly` from package en_GB in case you do not deal with nullable elements; will be removed with 1.0.0", ReplaceWith("containsStrictlyNullableEntries(assertionCreator, *otherAssertionCreators)", "ch.tutteli.atrium.api.cc.en_GB.containsStrictlyNullableEntries")) -@JvmName("containsStrictly?") -fun > Assert.containsStrictly(assertionCreator: (Assert.() -> Unit)?, vararg otherAssertionCreators: (Assert.() -> Unit)?): AssertionPlant - = contains.inOrder.only.entries(assertionCreator, *otherAssertionCreators) - -@Deprecated("Use the extension fun `containsStrictly` instead; will be removed 1.0.0", ReplaceWith("plant.containsStrictly(assertionCreator, *otherAssertionCreators)")) -fun > containsStrictlyNulllable(plant: Assert, assertionCreator: (Assert.() -> Unit)?, vararg otherAssertionCreators: (Assert.() -> Unit)?): AssertionPlant - = plant.containsStrictly(assertionCreator, *otherAssertionCreators) - - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] does not contain [expected] - * and neither one of the [otherExpected] (if given). - * - * It is a shortcut for `containsNot.values(expected, *otherExpected)` - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use `containsNot.nullableValues` from package en_GB or `containsNot` from package en_GB in case you do not deal with nullable elements; will be removed with 1.0.0", ReplaceWith("containsNot.nullableValues(expected, *otherExpected)", "ch.tutteli.atrium.api.cc.en_GB.containsNot", "ch.tutteli.atrium.api.cc.en_GB.nullableValues" )) -fun > Assert.containsNot(expected: E, vararg otherExpected: E) - = containsNot.values(expected, *otherExpected) diff --git a/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/iterableContainsCheckers.kt b/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/iterableContainsCheckers.kt deleted file mode 100644 index bb2f7c691..000000000 --- a/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/iterableContainsCheckers.kt +++ /dev/null @@ -1,122 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") -package ch.tutteli.atrium.api.cc.en_UK - -import ch.tutteli.atrium.api.cc.en_UK.creating.iterable.contains.builders.* -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InAnyOrderSearchBehaviour - -import ch.tutteli.atrium.api.cc.en_UK.assertions.iterable.contains.builders.IterableContainsAtLeastCheckerBuilder as DeprecatedAtLeastCheckerBuilder -import ch.tutteli.atrium.api.cc.en_UK.assertions.iterable.contains.builders.IterableContainsAtMostCheckerBuilder as DeprecatedAtMostCheckerBuilder -import ch.tutteli.atrium.api.cc.en_UK.assertions.iterable.contains.builders.IterableContainsButAtMostCheckerBuilder as DeprecatedButAtMostCheckerBuilder -import ch.tutteli.atrium.api.cc.en_UK.assertions.iterable.contains.builders.IterableContainsExactlyCheckerBuilder as DeprecatedExactlyCheckerBuilder -import ch.tutteli.atrium.api.cc.en_UK.assertions.iterable.contains.builders.IterableContainsNotOrAtMostCheckerBuilder as DeprecatedNotOrAtMostCheckerBuilder -import ch.tutteli.atrium.assertions.iterable.contains.builders.IterableContainsBuilder as DeprecatedBuilder - -/** - * Restricts a `contains` assertion by specifying that the number of occurrences of the entry which we are looking - * for, occurs `at least` number of [times] within the [Iterable]. - * - * @param times The number which the check will compare against the actual number of times an expected entry is - * found in the [Iterable]. - * - * @return The newly created builder. - * @throws IllegalArgumentException In case [times] is smaller than zero. - * @throws IllegalArgumentException In case [times] equals to zero; use [containsNot] instead. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.en_GB.atLeast(times)")) -fun , S: InAnyOrderSearchBehaviour> IterableContains.Builder.atLeast(times: Int): AtLeastCheckerOption - = AtLeastCheckerOptionImpl(times, this) - -@Deprecated("Use the extension fun `atLeast` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", ReplaceWith("builder.atLeast(times)")) -fun > atLeast(builder: DeprecatedBuilder, times: Int): DeprecatedAtLeastCheckerBuilder - = DeprecatedAtLeastCheckerBuilder(times, builder) - - -/** - * Restricts a `contains at least` assertion by specifying that the number of occurrences of the entry which we - * are looking for, occurs `at most` number of [times] within the [Iterable]. - * - * The resulting restriction will be a `contains at least but at most` assertion. - * - * @param times The number which the check will compare against the actual number of times an expected entry is - * found in the [Iterable]. - * - * @return The newly created builder. - * @throws IllegalArgumentException In case [times] is smaller than zero. - * @throws IllegalArgumentException In case [times] equals to zero; use [containsNot] instead. - * @throws IllegalArgumentException In case [times] of this `at most` restriction equals to the number of the - * `at least` restriction; use the [exactly] restriction instead. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.en_GB.butAtMost(times)")) -fun , S: InAnyOrderSearchBehaviour> AtLeastCheckerOption.butAtMost(times: Int): ButAtMostCheckerOption - = ButAtMostCheckerOptionImpl(times, this, containsBuilder) - -@Deprecated("Use the extension fun `butAtMost` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", ReplaceWith("checkerBuilder.butAtMost(times)")) -fun > butAtMost(checkerBuilder: DeprecatedAtLeastCheckerBuilder, times: Int): DeprecatedButAtMostCheckerBuilder - = DeprecatedButAtMostCheckerBuilder(times, checkerBuilder, checkerBuilder.containsBuilder) - - -/** - * Restricts a `contains` assertion by specifying that the number of occurrences of the entry which we - * are looking for, occurs `exactly` number of [times] within the [Iterable]. - * - * @param times The number which the check will compare against the actual number of times an expected entry is - * found in the [Iterable]. - * - * @return The newly created builder. - * @throws IllegalArgumentException In case [times] is smaller than zero. - * @throws IllegalArgumentException In case [times] equals to zero; use [containsNot] instead. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.en_GB.exactly(times)")) -fun , S: InAnyOrderSearchBehaviour> IterableContains.Builder.exactly(times: Int): ExactlyCheckerOption - = ExactlyCheckerOptionImpl(times, this) - -@Deprecated("Use the extension fun `exactly` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", ReplaceWith("builder.exactly(times)")) -fun > exactly(builder: DeprecatedBuilder, times: Int): DeprecatedExactlyCheckerBuilder - = DeprecatedExactlyCheckerBuilder(times, builder) - - -/** - * Restricts a `contains` assertion by specifying that the number of occurrences of the entry which we - * are looking for, occurs `at least` once but `at most` number of [times] within the [Iterable]. - * - * If you want to use a higher lower bound than one, then use `atLeast(2).butAtMost(3)` instead of `atMost(3)`. - * And in case you want to state that it is either not contained at all or at most a certain number of times, - * then use `notOrAtMost(2)` instead. - * - * @param times The number which the check will compare against the actual number of times an expected entry is - * found in the [Iterable]. - * - * @return The newly created builder. - * @throws IllegalArgumentException In case [times] is smaller than zero. - * @throws IllegalArgumentException In case [times] equals to zero; use [containsNot] instead. - * @throws IllegalArgumentException In case [times] equals to one; use [exactly] instead. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.en_GB.atMost(times)")) -fun , S: InAnyOrderSearchBehaviour> IterableContains.Builder.atMost(times: Int): AtMostCheckerOption - = AtMostCheckerOptionImpl(times, this) - -@Deprecated("Use the extension fun `atMost` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", ReplaceWith("builder.atMost(times)")) -fun > atMost(builder: DeprecatedBuilder, times: Int): DeprecatedAtMostCheckerBuilder - = DeprecatedAtMostCheckerBuilder(times, builder) - - -/** - * Restricts a `contains` assertion by specifying that the number of occurrences of the entry which we - * are looking for, occurs `not at all or at most` number of [times] within the [Iterable]. - * - * @param times The number which the check will compare against the actual number of times an expected entry is - * found in the [Iterable]. - * - * @return The newly created builder. - * @throws IllegalArgumentException In case [times] is smaller than zero. - * @throws IllegalArgumentException In case [times] equals to zero; use [containsNot] instead. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.en_GB.notOrAtMost(times)")) -fun , S: InAnyOrderSearchBehaviour> IterableContains.Builder.notOrAtMost(times: Int): NotOrAtMostCheckerOption - = NotOrAtMostCheckerOptionImpl(times, this) - -@Deprecated("Use the extension fun `notOrAtMost` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", ReplaceWith("builder.notOrAtMost(times)")) -fun > notOrAtMost(builder: DeprecatedBuilder, times: Int): DeprecatedNotOrAtMostCheckerBuilder - = DeprecatedNotOrAtMostCheckerBuilder(times, builder) diff --git a/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/iterableContainsDecorators.kt b/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/iterableContainsDecorators.kt deleted file mode 100644 index bb80113a5..000000000 --- a/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/iterableContainsDecorators.kt +++ /dev/null @@ -1,69 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") -package ch.tutteli.atrium.api.cc.en_UK - -import ch.tutteli.atrium.assertions.iterable.contains.builders.IterableContainsBuilder -import ch.tutteli.atrium.domain.builders.AssertImpl -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.* - -/** - * Defines that the search behaviour "find entries `in any order` in the [Iterable]" shall be applied to this - * sophisticated `contains` in [Iterable] assertion. - * - * @return The newly created builder. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith(" ch.tutteli.atrium.api.cc.en_GB.inAnyOrder")) -val > IterableContains.Builder.inAnyOrder - get() = AssertImpl.iterable.contains.searchBehaviours.inAnyOrder(this) - -@Deprecated("Use the extension fun `inAnyOrder` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", ReplaceWith("builder.inAnyOrder")) -fun > getInAnyOrder(builder: IterableContainsBuilder): IterableContainsBuilder - = IterableContainsBuilder(builder.subjectProvider, builder.inAnyOrder.searchBehaviour) - - -/** - * Defines that the constraint "`only` the specified entries exist in the [Iterable]" shall be applied to this - * sophisticated `contains` [Iterable] assertion. - * - * @return The newly created builder. - */ -val > IterableContains.Builder.only - @Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith(" ch.tutteli.atrium.api.cc.en_GB.only")) - @JvmName("butOnly") - get() = AssertImpl.iterable.contains.searchBehaviours.inAnyOrderOnly(this) - -@Deprecated("Use the extension fun `only` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", ReplaceWith("builder.only")) -fun > inAnyOrderOnly(builder: IterableContainsBuilder): IterableContainsBuilder - = IterableContainsBuilder(builder.subjectProvider, builder.only.searchBehaviour) - - -/** - * Defines that the search behaviour "find entries `in order` in the [Iterable]" shall be applied to this - * sophisticated `contains` in [Iterable] assertion. - * - * @return The newly created builder. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith(" ch.tutteli.atrium.api.cc.en_GB.inOrder")) -val > IterableContains.Builder.inOrder - get() = AssertImpl.iterable.contains.searchBehaviours.inOrder(this) - -@Deprecated("Use the extension fun `inOrder` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", ReplaceWith("builder.inOrder")) -fun > getInOrder(builder: IterableContainsBuilder): IterableContainsBuilder - = IterableContainsBuilder(builder.subjectProvider, builder.inOrder.searchBehaviour) - - -/** - * Defines that the constraint "`only` the specified entries exist in the [Iterable]" shall be applied to this - * sophisticated `contains in order` [Iterable] assertion. - * - * @return The newly created builder. - */ -val > IterableContains.Builder.only - @Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith(" ch.tutteli.atrium.api.cc.en_GB.only")) - @JvmName("andOnly") - get() = AssertImpl.iterable.contains.searchBehaviours.inOrderOnly(this) - -@Deprecated("Use the extension fun `only` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", ReplaceWith("builder.only")) -fun > inOrderOnly(builder: IterableContainsBuilder): IterableContainsBuilder - = IterableContainsBuilder(builder.subjectProvider, builder.only.searchBehaviour) diff --git a/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/iterableContainsInAnyOrderCreators.kt b/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/iterableContainsInAnyOrderCreators.kt deleted file mode 100644 index 7d731dce6..000000000 --- a/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/iterableContainsInAnyOrderCreators.kt +++ /dev/null @@ -1,242 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") -package ch.tutteli.atrium.api.cc.en_UK - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.assertions.iterable.contains.builders.IterableContainsCheckerBuilder -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.domain.builders.AssertImpl -import ch.tutteli.atrium.domain.builders.creating.basic.contains.addAssertionForAssert -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains -import ch.tutteli.kbox.glue -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InAnyOrderSearchBehaviour - -/** - * Finishes the specification of the sophisticated `contains` assertion where the [expected] value shall be searched - * within the [Iterable]. - * - * Delegates to `values(expected)`. - * - * @param expected The value which is expected to be contained within the [Iterable]. - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.en_GB.value(expected)")) -fun > IterableContains.CheckerOption.value(expected: E): AssertionPlant - = values(expected) - -@JvmName("deprecatedValue") -@Deprecated("Use `nullableValue` instead; will be removed with 1.0.0", ReplaceWith("nullableValue(expected)")) -fun > IterableContains.CheckerOption.value(expected: E): AssertionPlant - = nullableValue(expected) - -@Deprecated("Use the extension fun `value` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", ReplaceWith("checkerBuilder.value(expected)")) -fun > value(checkerBuilder: IterableContainsCheckerBuilder, expected: E): AssertionPlant - = values(checkerBuilder, expected) - -/** - * Finishes the specification of the sophisticated `contains` assertion where the [expected] value as well as the - * [otherExpected] values shall be searched within the [Iterable]. - * - * Notice, that it does not search for unique matches. Meaning, if the iterable is `setOf('a', 'b')` and [expected] is - * defined as `'a'` and one [otherExpected] is defined as `'a'` as well, then both match, even though they match the - * same entry. Use an option such as [atLeast], [atMost] and [exactly] to control the number of occurrences you expect. - * - * Meaning you might want to use: - * `contains.inAnyOrder.exactly(2).values('a')` - * instead of: - * `contains.inAnyOrder.atLeast(1).values('a', 'a')` - * - * @param expected The object which is expected to be contained within the [Iterable]. - * @param otherExpected Additional objects which are expected to be contained within [Iterable]. - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.en_GB.values(expected, *otherExpected)")) -fun > IterableContains.CheckerOption.values(expected: E, vararg otherExpected: E): AssertionPlant - = addAssertion(AssertImpl.iterable.contains.valuesInAnyOrder(this, expected glue otherExpected)) - -@Deprecated("Use `nullableValues` instead; will be removed with 1.0.0", ReplaceWith("nullableValues(expected, *otherExpected)")) -@JvmName("deprecatedValues") -fun > IterableContains.CheckerOption.values(expected: E, vararg otherExpected: E): AssertionPlant - = nullableValues(expected, *otherExpected) - -@Deprecated("Use the extension fun `values` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", ReplaceWith("checkerBuilder.values(expected, *otherExpected)")) -fun > values(checkerBuilder: IterableContainsCheckerBuilder, expected: E, vararg otherExpected: E): AssertionPlant - = checkerBuilder.values(expected, *otherExpected) - - -@Deprecated("Will be removed with 1.0.0 because it is redundant in terms of `value(expected)` without adding enough to be a legit alternative.", ReplaceWith("value(expected)")) -fun > IterableContains.CheckerOption.`object`(expected: E): AssertionPlant - = values(expected) - -@Deprecated("Use the extension fun `value` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", ReplaceWith("checkerBuilder.value(expected)")) -fun > `object`(checkerBuilder: IterableContainsCheckerBuilder, expected: E): AssertionPlant - = values(checkerBuilder, expected) - -@Deprecated("Will be removed with 1.0.0 because it is redundant in terms of `values(expected, otherExpected)` without adding enough to be a legit alternative.", ReplaceWith("values(expected, *otherExpected)")) -fun > IterableContains.CheckerOption.objects(expected: E, vararg otherExpected: E): AssertionPlant - = values(expected, *otherExpected) - -@Deprecated("Use the extension fun `values` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", ReplaceWith("checkerBuilder.values(expected, *otherExpected)")) -fun > objects(checkerBuilder: IterableContainsCheckerBuilder, expected: E, vararg otherExpected: E): AssertionPlant - = checkerBuilder.values(expected, *otherExpected) - - -/** - * Finishes the specification of the sophisticated `contains` assertion where an entry shall be searched which holds - * all assertions [assertionCreator] might create. - * - * Delegates to `entries(expected)`. - * - * @param assertionCreator The identification lambda which creates the assertions which the entry we are looking for - * has to hold; or in other words, the function which defines whether an entry is the one we are looking for - * or not. - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.en_GB.entry(assertionCreator)")) -fun > IterableContains.CheckerOption.entry(assertionCreator: Assert.() -> Unit): AssertionPlant - = entries(assertionCreator) - -@Deprecated("Use the extension fun `entry` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", ReplaceWith("checkerBuilder.entry(assertionCreator)")) -fun > entry(checkerBuilder: IterableContainsCheckerBuilder, assertionCreator: Assert.() -> Unit): AssertionPlant - = entries(checkerBuilder, assertionCreator) - - -/** - * Finishes the specification of the sophisticated `contains` assertion where an entry shall be searched which holds - * all assertions [assertionCreator] might create and search for entries which hold (one by one) the assertions - * created by the [otherAssertionCreators]. - * - * @param assertionCreator The identification lambda which creates the assertions which the entry we are looking for - * has to hold; or in other words, the function which defines whether an entry is the one we are looking for - * or not. - * @param otherAssertionCreators Additional identification lambdas which each kind of identify (separately) an entry - * which we are looking for. - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.en_GB.entries(assertionCreator, *otherAssertionCreators)")) -fun > IterableContains.CheckerOption.entries( - assertionCreator: Assert.() -> Unit, - vararg otherAssertionCreators: Assert.() -> Unit -): AssertionPlant - = addAssertion(AssertImpl.iterable.contains.entriesInAnyOrderWithAssert(this, assertionCreator glue otherAssertionCreators)) - -@Deprecated("Use the extension fun `entries` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", ReplaceWith("checkerBuilder.entries(assertionCreator, *otherAssertionCreators)")) -fun > entries( - checkerBuilder: IterableContainsCheckerBuilder, - assertionCreator: Assert.() -> Unit, - vararg otherAssertionCreators: Assert.() -> Unit -): AssertionPlant - = checkerBuilder.entries(assertionCreator, *otherAssertionCreators) - - -/** - * Finishes the specification of the sophisticated `contains` assertion where the [expected] value shall be searched - * within the [Iterable]. - * - * Delegates to `nullableValues(expected)`. - * - * @param expected The value which is expected to be contained within the [Iterable]. - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.en_GB.nullableValue(expected)")) -fun > IterableContains.CheckerOption.nullableValue(expected: E): AssertionPlant - = nullableValues(expected) - -/** - * Finishes the specification of the sophisticated `contains` assertion where the [expected] value as well as the - * [otherExpected] values shall be searched within the [Iterable]. - * - * Notice, that it does not search for unique matches. Meaning, if the iterable is `setOf('a', 'b')` and [expected] is - * defined as `'a'` and one [otherExpected] is defined as `'a'` as well, then both match, even though they match the - * same entry. Use an option such as [atLeast], [atMost] and [exactly] to control the number of occurrences you expect. - * - * Meaning you might want to use: - * `contains.inAnyOrder.exactly(2).values('a')` - * instead of: - * `contains.inAnyOrder.atLeast(1).values('a', 'a')` - * - * @param expected The object which is expected to be contained within the [Iterable]. - * @param otherExpected Additional objects which are expected to be contained within [Iterable]. - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.en_GB.nullableValues(expected, *otherExpected)")) -fun > IterableContains.CheckerOption.nullableValues(expected: E, vararg otherExpected: E): AssertionPlant - = addAssertion(AssertImpl.iterable.contains.valuesInAnyOrder(this, expected glue otherExpected)) - - -/** - * Finishes the specification of the sophisticated `contains` assertion where an entry shall be searched which either - * holds all assertions [assertionCreator] might create or is `null` in case [assertionCreator] is null as well. - * - * Delegates to `entries(expected)`. - * - * @param assertionCreator The identification lambda which creates the assertions which the entry we are looking for - * has to hold; or in other words, the function which defines whether an entry is the one we are looking for - * or not. - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.en_GB.entry(assertionCreator)")) -@JvmName("entry?") -fun > IterableContains.CheckerOption.entry(assertionCreator: (Assert.() -> Unit)?): AssertionPlant - = entries(assertionCreator) - -@Deprecated("Use the extension fun `entry` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", ReplaceWith("checkerBuilder.entry(assertionCreator)")) -fun > nullableEntry(checkerBuilder: IterableContainsCheckerBuilder, assertionCreator: (Assert.() -> Unit)?): AssertionPlant - = nullableEntries(checkerBuilder, assertionCreator) - - -/** - * Finishes the specification of the sophisticated `contains` assertion where an entry shall be searched which either - * holds all assertions [assertionCreator] might create or is `null` in case [assertionCreator] is null as well -- - * likewise an entry (can be the same) is searched for each of the [otherAssertionCreators]. - * - * @param assertionCreator The identification lambda which creates the assertions which the entry we are looking for - * has to hold; or in other words, the function which defines whether an entry is the one we are looking for - * or not. - * @param otherAssertionCreators Additional identification lambdas which each kind of identify (separately) an entry - * which we are looking for. - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.en_GB.entries(assertionCreator, *otherAssertionCreators)")) -@JvmName("entries?") -fun > IterableContains.CheckerOption.entries( - assertionCreator: (Assert.() -> Unit)?, - vararg otherAssertionCreators: (Assert.() -> Unit)? -): AssertionPlant - = addAssertion(AssertImpl.iterable.contains.entriesInAnyOrderWithAssert(this, assertionCreator glue otherAssertionCreators)) - -@Deprecated("Use the extension fun `entries` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", ReplaceWith("checkerBuilder.entries(assertionCreator, *otherAssertionCreators)")) -fun > nullableEntries( - checkerBuilder: IterableContainsCheckerBuilder, - assertionCreator: (Assert.() -> Unit)?, - vararg otherAssertionCreators: (Assert.() -> Unit)? -): AssertionPlant - = checkerBuilder.entries(assertionCreator, *otherAssertionCreators) - -/** - * Helper method to simplify adding assertions to the plant which itself is stored in - * [CharSequenceContains.CheckerOption.containsBuilder]. - * - * @return The plant to support a fluent API. - */ -private fun , S : IterableContains.SearchBehaviour> IterableContains.CheckerOption.addAssertion( - assertion: Assertion -): AssertionPlant = addAssertionForAssert(assertion) diff --git a/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/iterableContainsInAnyOrderOnlyCreators.kt b/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/iterableContainsInAnyOrderOnlyCreators.kt deleted file mode 100644 index 745bdfa17..000000000 --- a/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/iterableContainsInAnyOrderOnlyCreators.kt +++ /dev/null @@ -1,237 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") -package ch.tutteli.atrium.api.cc.en_UK - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.assertions.iterable.contains.builders.IterableContainsBuilder -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.domain.builders.AssertImpl -import ch.tutteli.atrium.domain.builders.creating.basic.contains.addAssertionForAssert -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains -import ch.tutteli.kbox.glue -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InAnyOrderOnlySearchBehaviour - -/** - * Finishes the specification of the sophisticated `contains` assertion where the [Iterable] needs to contain only the - * [expected] value. - * - * Delegates to `values(expected)`. - * - * @param expected The value which is expected to be contained within the [Iterable]. - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.en_GB.value(expected)")) -fun > IterableContains.Builder.value(expected: E): AssertionPlant - = values(expected) - -@JvmName("deprecatedValue") -@Deprecated("Use `nullableValue` instead; will be removed with 1.0.0", ReplaceWith("nullableValue(expected)")) -fun > IterableContains.Builder.value(expected: E): AssertionPlant - = nullableValue(expected) - -@Deprecated("Use the extension fun `value` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", ReplaceWith("checkerBuilder.value(expected)")) -fun > value(checkerBuilder: IterableContainsBuilder, expected: E): AssertionPlant - = values(checkerBuilder, expected) - - -/** - * Finishes the specification of the sophisticated `contains` assertion where the [expected] value as well as the - * [otherExpected] values need to be contained in [Iterable] where it does not matter in which order. - * - * @param expected The value which is expected to be contained within the [Iterable]. - * @param otherExpected Additional values which are expected to be contained within [Iterable]. - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.en_GB.values(expected, *otherExpected)")) -fun > IterableContains.Builder.values(expected: E, vararg otherExpected: E): AssertionPlant - = addAssertion(AssertImpl.iterable.contains.valuesInAnyOrderOnly(this, expected glue otherExpected)) - -@Deprecated("Use `nullableValues` instead; will be removed with 1.0.0", ReplaceWith("nullableValues(expected, *otherExpected)")) -@JvmName("deprecatedValues") -fun > IterableContains.Builder.values(expected: E, vararg otherExpected: E): AssertionPlant - = nullableValues(expected, *otherExpected) - -@Deprecated("Use the extension fun `values` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", ReplaceWith("checkerBuilder.values(expected, *otherExpected)")) -fun > values(checkerBuilder: IterableContainsBuilder, expected: E, vararg otherExpected: E): AssertionPlant - = checkerBuilder.values(expected, *otherExpected) - - -@Deprecated("Will be removed with 1.0.0 because it is redundant in terms of `value(expected)` without adding enough to be a legit alternative.", ReplaceWith("value(expected)")) -fun > IterableContains.Builder.`object`(expected: E): AssertionPlant - = values(expected) - -@Deprecated("Use the extension fun `object` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", ReplaceWith("checkerBuilder.value(expected)")) -fun > `object`(checkerBuilder: IterableContainsBuilder, expected: E): AssertionPlant - = values(checkerBuilder, expected) - -@Deprecated("Will be removed with 1.0.0 because it is redundant in terms of `values(expected, otherExpected)` without adding enough to be a legit alternative.", ReplaceWith("values(expected, *otherExpected)")) -fun > IterableContains.Builder.objects(expected: E, vararg otherExpected: E): AssertionPlant - = values(expected, *otherExpected) - -@Deprecated("Use the extension fun `values` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", ReplaceWith("checkerBuilder.values(expected, *otherExpected)")) -fun > objects(checkerBuilder: IterableContainsBuilder, expected: E, vararg otherExpected: E): AssertionPlant - = checkerBuilder.values(expected, *otherExpected) - - -/** - * Finishes the specification of the sophisticated `contains` assertion where the [Iterable] needs to contain only one - * entry which holds all assertions created by the given [assertionCreator]. - * - * Delegates to `entries(assertionCreator)`. - * - * @param assertionCreator The identification lambda. - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.en_GB.entry(assertionCreator)")) -fun > IterableContains.Builder.entry(assertionCreator: Assert.() -> Unit): AssertionPlant - = entries(assertionCreator) - -@Deprecated("Use the extension fun `entry` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", ReplaceWith("checkerBuilder.entry(assertionCreator)")) -fun > entry(checkerBuilder: IterableContainsBuilder, assertionCreator: Assert.() -> Unit): AssertionPlant - = entries(checkerBuilder, assertionCreator) - - -/** - * Finishes the specification of the sophisticated `contains` assertion where the entry needs to be contained in the - * [Iterable] which holds all assertions [assertionCreator] might create -- equally an entry for each further - * [otherAssertionCreators] needs to be contained in the [Iterable] where it does not matter in which order the - * entries appear. - * - * Notice, that a first-wins strategy applies which means your [assertionCreator] functions -- which kind of serve as - * identification functions -- should be ordered in such a way that the most specific identification function appears - * first, not that a less specific function wins. For instance, given a `setOf(1, 2)` you should not search for - * `entries({ isGreaterThan(0) }, { toBe(1) })` but for `entries({ toBe(1) }, { isGreaterThan(0) })` otherwise - * `isGreaterThan(0)` matches `1` before `toBe(1)` would match it. As a consequence `toBe(1)` could only match the - * entry which is left -- in this case `2` -- and of course this would fail. - * - * @param assertionCreator The identification lambda which creates the assertions which the entry we are looking for - * has to hold; or in other words, the function which defines whether an entry is the one we are looking for - * or not. - * @param otherAssertionCreators Additional identification lambdas which each kind of identify (separately) an entry - * which we are looking for. - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.en_GB.entries(assertionCreator, *otherAssertionCreators)")) -fun > IterableContains.Builder.entries( - assertionCreator: Assert.() -> Unit, - vararg otherAssertionCreators: Assert.() -> Unit -): AssertionPlant - = addAssertion(AssertImpl.iterable.contains.entriesInAnyOrderOnlyWithAssert(this, assertionCreator glue otherAssertionCreators)) - -@Deprecated("Use the extension fun `entries` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", ReplaceWith("checkerBuilder.entries(assertionCreator, *otherAssertionCreators)")) -fun > entries( - checkerBuilder: IterableContainsBuilder, - assertionCreator: Assert.() -> Unit, - vararg otherAssertionCreators: Assert.() -> Unit -): AssertionPlant - = checkerBuilder.entries(assertionCreator, *otherAssertionCreators) - - -/** - * Finishes the specification of the sophisticated `contains` assertion where the [Iterable] needs to contain only the - * [expected] value. - * - * Delegates to `nullableValues(expected)`. - * - * @param expected The value which is expected to be contained within the [Iterable]. - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.en_GB.nullableValue(expected)")) -fun > IterableContains.Builder.nullableValue(expected: E): AssertionPlant - = nullableValues(expected) - -/** - * Finishes the specification of the sophisticated `contains` assertion where the [expected] value as well as the - * [otherExpected] values need to be contained in [Iterable] where it does not matter in which order. - * - * @param expected The value which is expected to be contained within the [Iterable]. - * @param otherExpected Additional values which are expected to be contained within [Iterable]. - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.en_GB.nullableValues(expected, *otherExpected)")) -fun > IterableContains.Builder.nullableValues(expected: E, vararg otherExpected: E): AssertionPlant - = addAssertion(AssertImpl.iterable.contains.valuesInAnyOrderOnly(this, expected glue otherExpected)) - - -/** - * Finishes the specification of the sophisticated `contains` assertion where the [Iterable] needs to contain only one - * entry which holds all assertions created by the given [assertionCreator]. - * - * Delegates to `entries(assertionCreator)`. - * - * @param assertionCreator The identification lambda. - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.en_GB.entry(assertionCreator)")) -@JvmName("entry?") -fun > IterableContains.Builder.entry(assertionCreator: (Assert.() -> Unit)?): AssertionPlant - = entries(assertionCreator) - -@Deprecated("Use the extension fun `entry` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", ReplaceWith("checkerBuilder.entry(assertionCreator)")) -fun > nullableEntry(checkerBuilder: IterableContainsBuilder, assertionCreator: (Assert.() -> Unit)?): AssertionPlant - = nullableEntries(checkerBuilder, assertionCreator) - - -/** - * Finishes the specification of the sophisticated `contains` assertion where the entry needs to be contained in the - * [Iterable] which holds all assertions [assertionCreator] might create -- equally an entry for each further - * [otherAssertionCreators] needs to be contained in the [Iterable] where it does not matter in which order the - * entries appear. - * - * Notice, that a first-wins strategy applies which means your [assertionCreator] functions -- which kind of serve as - * identification functions -- should be ordered in such a way that the most specific identification function appears - * first, not that a less specific function wins. For instance, given a `setOf(1, 2)` you should not search for - * `entries({ isGreaterThan(0) }, { toBe(1) })` but for `entries({ toBe(1) }, { isGreaterThan(0) })` otherwise - * `isGreaterThan(0)` matches `1` before `toBe(1)` would match it. As a consequence `toBe(1)` could only match the - * entry which is left -- in this case `2` -- and of course this would fail. - * - * @param assertionCreator The identification lambda which creates the assertions which the entry we are looking for - * has to hold; or in other words, the function which defines whether an entry is the one we are looking for - * or not. - * @param otherAssertionCreators Additional identification lambdas which each kind of identify (separately) an entry - * which we are looking for. - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.en_GB.entries(assertionCreator, *otherAssertionCreators)")) -@JvmName("entries?") -fun > IterableContains.Builder.entries( - assertionCreator: (Assert.() -> Unit)?, - vararg otherAssertionCreators: (Assert.() -> Unit)? -): AssertionPlant - = addAssertion(AssertImpl.iterable.contains.entriesInAnyOrderOnlyWithAssert(this, assertionCreator glue otherAssertionCreators)) - -@Deprecated("Use the extension fun `entries` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", ReplaceWith("checkerBuilder.entries(assertionCreator, *otherAssertionCreators)")) -fun > nullableEntries( - checkerBuilder: IterableContainsBuilder, - assertionCreator: (Assert.() -> Unit)?, - vararg otherAssertionCreators: (Assert.() -> Unit)? -): AssertionPlant - = checkerBuilder.entries(assertionCreator, *otherAssertionCreators) - -/** - * Helper method to simplify adding assertions to the plant which itself is stored in - * [CharSequenceContains.CheckerOption.containsBuilder]. - * - * @return The plant to support a fluent API. - */ -internal fun , S : IterableContains.SearchBehaviour> IterableContains.Builder.addAssertion( - assertion: Assertion -): AssertionPlant = addAssertionForAssert(assertion) diff --git a/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/iterableContainsInOrderOnlyCreators.kt b/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/iterableContainsInOrderOnlyCreators.kt deleted file mode 100644 index b28d78ede..000000000 --- a/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/iterableContainsInOrderOnlyCreators.kt +++ /dev/null @@ -1,215 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") -package ch.tutteli.atrium.api.cc.en_UK - -import ch.tutteli.atrium.assertions.iterable.contains.builders.IterableContainsBuilder -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.domain.builders.AssertImpl -import ch.tutteli.kbox.glue -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InOrderOnlySearchBehaviour - -/** - * Finishes the specification of the sophisticated `contains` assertion where the [Iterable] needs to contain only the - * [expected] value. - * - * Delegates to `values(expected)`. - * - * @param expected The value which is expected to be contained within the [Iterable]. - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.en_GB.value(expected)")) -fun > IterableContains.Builder.value(expected: E): AssertionPlant - = values(expected) - -@JvmName("deprecatedValue") -@Deprecated("Use `nullableValue` instead; will be removed with 1.0.0", ReplaceWith("nullableValue(expected)")) -fun > IterableContains.Builder.value(expected: E): AssertionPlant - = nullableValue(expected) - -@Deprecated("Use the extension fun `value` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", ReplaceWith("checkerBuilder.value(expected)")) -fun > value(checkerBuilder: IterableContainsBuilder, expected: E): AssertionPlant - = values(checkerBuilder, expected) - - -/** - * Finishes the specification of the sophisticated `contains` assertion where the [expected] value as well as the - * [otherExpected] values need to be contained in [Iterable] in the specified order. - * - * @param expected The value which is expected to be contained within the [Iterable]. - * @param otherExpected Additional values which are expected to be contained within [Iterable]. - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.en_GB.values(expected, *otherExpected)")) -fun > IterableContains.Builder.values(expected: E, vararg otherExpected: E): AssertionPlant - = addAssertion(AssertImpl.iterable.contains.valuesInOrderOnly(this, expected glue otherExpected)) - -@Deprecated("Use `nullableValues` instead; will be removed with 1.0.0", ReplaceWith("nullableValues(expected, *otherExpected)")) -@JvmName("deprecatedValues") -fun > IterableContains.Builder.values(expected: E, vararg otherExpected: E): AssertionPlant - = nullableValues(expected, *otherExpected) - -@Deprecated("Use the extension fun `values` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", ReplaceWith("checkerBuilder.values(expected, *otherExpected)")) -fun > values(checkerBuilder: IterableContainsBuilder, expected: E, vararg otherExpected: E): AssertionPlant - = checkerBuilder.values(expected, *otherExpected) - - -@Deprecated("Will be removed with 1.0.0 because it is redundant in terms of `value(expected)` without adding enough to be a legit alternative.", ReplaceWith("value(expected)")) -fun > IterableContains.Builder.`object`(expected: E): AssertionPlant - = values(expected) - -@Deprecated("Use the extension fun `value` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", ReplaceWith("checkerBuilder.value(expected)")) -fun > `object`(checkerBuilder: IterableContainsBuilder, expected: E): AssertionPlant - = values(checkerBuilder, expected) - -@Deprecated("Will be removed with 1.0.0 because it is redundant in terms of `values(expected, otherExpected)` without adding enough to be a legit alternative.", ReplaceWith("values(expected, *otherExpected)")) -fun > IterableContains.Builder.objects(expected: E, vararg otherExpected: E): AssertionPlant - = values(expected, *otherExpected) - -@Deprecated("Use the extension fun `values` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", ReplaceWith("checkerBuilder.values(expected, *otherExpected)")) -fun > objects(checkerBuilder: IterableContainsBuilder, expected: E, vararg otherExpected: E): AssertionPlant - = checkerBuilder.values(expected, *otherExpected) - - -/** - * Finishes the specification of the sophisticated `contains` assertion where the [Iterable] needs to contain only one - * entry which holds all assertions created by the given [assertionCreator]. - * - * Delegates to `entries(assertionCreator)` - * - * @param assertionCreator The identification lambda. - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.en_GB.entry(assertionCreator)")) -fun > IterableContains.Builder.entry(assertionCreator: Assert.() -> Unit): AssertionPlant - = entries(assertionCreator) - -@Deprecated("Use the extension fun `entry` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", ReplaceWith("checkerBuilder.entry(assertionCreator)")) -fun > entry(checkerBuilder: IterableContainsBuilder, assertionCreator: Assert.() -> Unit): AssertionPlant - = entries(checkerBuilder, assertionCreator) - - -/** - * Finishes the specification of the sophisticated `contains` assertion where the entry needs to be contained in the - * [Iterable] which holds all assertions [assertionCreator] might create -- equally an entry for each further - * [otherAssertionCreators], following the specified order, needs to be contained in the [Iterable] - * - * @param assertionCreator The identification lambda which creates the assertions which the entry we are looking for - * has to hold; or in other words, the function which defines whether an entry is the one we are looking for - * or not. - * @param otherAssertionCreators Additional identification lambdas which each kind of identify (separately) an entry - * which we are looking for. - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.en_GB.entries(assertionCreator, *otherAssertionCreators)")) -fun > IterableContains.Builder.entries( - assertionCreator: Assert.() -> Unit, - vararg otherAssertionCreators: Assert.() -> Unit -): AssertionPlant - = addAssertion(AssertImpl.iterable.contains.entriesInOrderOnlyWithAssert(this, assertionCreator glue otherAssertionCreators)) - -@Deprecated("Use the extension fun `entries` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", ReplaceWith("checkerBuilder.entries(assertionCreator, *otherAssertionCreators)")) -fun > entries( - checkerBuilder: IterableContainsBuilder, - assertionCreator: Assert.() -> Unit, - vararg otherAssertionCreators: Assert.() -> Unit -): AssertionPlant - = checkerBuilder.entries(assertionCreator, *otherAssertionCreators) - - -/** - * Finishes the specification of the sophisticated `contains` assertion where the [Iterable] needs to contain only the - * [expected] value. - * - * Delegates to `nullableValues(expected)`. - * - * @param expected The value which is expected to be contained within the [Iterable]. - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.en_GB.nullableValue(expected)")) -fun > IterableContains.Builder.nullableValue(expected: E): AssertionPlant - = nullableValues(expected) - -/** - * Finishes the specification of the sophisticated `contains` assertion where the [expected] value as well as the - * [otherExpected] values need to be contained in [Iterable] in the specified order. - * - * @param expected The value which is expected to be contained within the [Iterable]. - * @param otherExpected Additional values which are expected to be contained within [Iterable]. - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.en_GB.nullableValues(expected, *otherExpected)")) -fun > IterableContains.Builder.nullableValues(expected: E, vararg otherExpected: E): AssertionPlant - = addAssertion(AssertImpl.iterable.contains.valuesInOrderOnly(this, expected glue otherExpected)) - -/** - * Finishes the specification of the sophisticated `contains` assertion where the [Iterable] needs to contain only one - * entry which holds all assertions created by the given [assertionCreator]. - * - * Delegates to `entries(assertionCreator)`. - * - * @param assertionCreator The identification lambda. - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.en_GB.entry(assertionCreator)")) -@JvmName("entry?") -fun > IterableContains.Builder.entry(assertionCreator: (Assert.() -> Unit)?): AssertionPlant - = entries(assertionCreator) - -@Deprecated("Use the extension fun `entry` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", ReplaceWith("checkerBuilder.entry(assertionCreator)")) -fun > nullableEntry(checkerBuilder: IterableContainsBuilder, assertionCreator: (Assert.() -> Unit)?): AssertionPlant - = nullableEntries(checkerBuilder, assertionCreator) - - -/** - * Finishes the specification of the sophisticated `contains` assertion where the entry needs to be contained in the - * [Iterable] which holds all assertions [assertionCreator] might create -- equally an entry for each further - * [otherAssertionCreators] needs to be contained in the [Iterable] where it does not matter in which order the - * entries appear. - * - * Notice, that a first-wins strategy applies which means your [assertionCreator] functions -- which kind of serve as - * identification functions -- should be ordered in such a way that the most specific identification function appears - * first, not that a less specific function wins. For instance, given a `setOf(1, 2)` you should not search for - * `entries({ isGreaterThan(0) }, { toBe(1) })` but for `entries({ toBe(1) }, { isGreaterThan(0) })` otherwise - * `isGreaterThan(0)` matches `1` before `toBe(1)` would match it. As a consequence `toBe(1)` could only match the - * entry which is left -- in this case `2` -- and of course this would fail. - * - * @param assertionCreator The identification lambda which creates the assertions which the entry we are looking for - * has to hold; or in other words, the function which defines whether an entry is the one we are looking for - * or not. - * @param otherAssertionCreators Additional identification lambdas which each kind of identify (separately) an entry - * which we are looking for. - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.en_GB.entries(assertionCreator, *otherAssertionCreators)")) -@JvmName("entries?") -fun > IterableContains.Builder.entries( - assertionCreator: (Assert.() -> Unit)?, - vararg otherAssertionCreators: (Assert.() -> Unit)? -): AssertionPlant - = addAssertion(AssertImpl.iterable.contains.entriesInOrderOnlyWithAssert(this, assertionCreator glue otherAssertionCreators)) - -@Deprecated("Use the extension fun `entries` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", ReplaceWith("checkerBuilder.entries(assertionCreator, *otherAssertionCreators)")) -fun > nullableEntries( - checkerBuilder: IterableContainsBuilder, - assertionCreator: (Assert.() -> Unit)?, - vararg otherAssertionCreators: (Assert.() -> Unit)? -): AssertionPlant - = checkerBuilder.entries(assertionCreator, *otherAssertionCreators) diff --git a/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/throwableAssertions.kt b/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/throwableAssertions.kt deleted file mode 100644 index c77bcb30e..000000000 --- a/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/throwableAssertions.kt +++ /dev/null @@ -1,57 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") -package ch.tutteli.atrium.api.cc.en_UK - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.AssertionPlantNullable -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.domain.builders.AssertImpl -import ch.tutteli.atrium.domain.creating.throwable.thrown.ThrowableThrown - -/** - * Makes the assertion that the thrown [Throwable] is of type [TExpected]. - * - * @return Notice, that this assertion function cannot provide a fluent API because it depends on whether the assertion - * (a [Throwable] was thrown and is of type [TExpected]) holds or not. - * If you want to define subsequent assertions on the down-casted [Throwable], then use the overload which expects a - * lambda (where you can define subsequent assertions). - * - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.en_GB.toThrow()")) -inline fun ThrowableThrown.Builder.toThrow() { - toThrow {} -} - -/** - * Makes the assertion that the thrown [Throwable] is of type [TExpected] and holds all assertions the - * [assertionCreator] might create in addition. - * - * @return Notice, that this assertion function cannot provide a fluent API because it depends on whether the first - * assertion (a [Throwable] was thrown) holds or not. - * Define subsequent assertions via the [assertionCreator] lambda. - * - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.en_GB.toThrow(assertionCreator)")) -inline fun ThrowableThrown.Builder.toThrow(noinline assertionCreator: Assert.() -> Unit) { - AssertImpl.throwable.thrown.toBe(this, TExpected::class, assertionCreator) -} - -/** - * Creates an [AssertionPlantNullable] for the [message][Throwable.message] of the plant's - * [subject][SubjectProvider.subject] (which is a [Throwable]) and makes the assertion that message [isNotNull] - * and uses [assertionCreator] which might create further [Assertion]s which are lazily evaluated at the end. - * - * @return Notice, that this assertion function cannot provide a fluent API because it depends on whether the first - * assertion [message][Throwable.message] is not null) holds or not. - * Define subsequent assertions via the [assertionCreator] lambda. - * - * @throws AssertionError Might throw an [AssertionError] in case [message][Throwable.message] is `null` - * or if an additionally created [Assertion]s (by calling [assertionCreator]) does not hold. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.en_GB.message(assertionCreator)")) -fun Assert.message(assertionCreator: Assert.() -> Unit) { - property(subject::message).isNotNull(assertionCreator) -} diff --git a/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/typeTransformationAssertions.kt b/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/typeTransformationAssertions.kt deleted file mode 100644 index 864004ab1..000000000 --- a/misc/deprecated/apis/atrium-api-cc-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/en_UK/typeTransformationAssertions.kt +++ /dev/null @@ -1,42 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") - -package ch.tutteli.atrium.api.cc.en_UK - -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.creating.AssertionPlantNullable -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.domain.builders.AssertImpl - -/** - * Makes the assertion that [AssertionPlantNullable.subject][SubjectProvider.subject] is not null and if so, uses [assertionCreator] - * which could create further assertions which are added as a group. - * - * @return Notice, that this assertion function cannot provide a fluent API because it depends on whether the first - * assertion ([Assert.subject][SubjectProvider.subject] is not null) holds or not. - * Define subsequent assertions via the [assertionCreator] lambda. - * - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.en_GB.notToBeNull(assertionCreator)")) -inline fun AssertionPlantNullable.isNotNull(noinline assertionCreator: Assert.() -> Unit) { - @Suppress("DEPRECATION") - addAssertion(AssertImpl.any.isNotNull(this, T::class, assertionCreator)) -} - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] *is a* [TSub] (the same type or a sub-type) and if so, - * uses [assertionCreator] which could create further assertions which are added as a group. - * - * @return Notice, that this assertion function cannot provide a fluent API because it depends on whether the first - * assertion ([Assert.subject][SubjectProvider.subject] *is a* [TSub]) holds or not. - * Define subsequent assertions via the [assertionCreator] lambda. - * - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.en_GB.isA(assertionCreator)")) -inline fun Assert.isA(noinline assertionCreator: AssertionPlant.() -> Unit) { - @Suppress("DEPRECATION") - AssertImpl.any.typeTransformation.isA(this, TSub::class, assertionCreator) -} diff --git a/misc/deprecated/apis/atrium-api-cc-infix-en_UK/build.gradle b/misc/deprecated/apis/atrium-api-cc-infix-en_UK/build.gradle deleted file mode 100644 index 5900f83d4..000000000 --- a/misc/deprecated/apis/atrium-api-cc-infix-en_UK/build.gradle +++ /dev/null @@ -1,10 +0,0 @@ -description = 'Deprecated, use atrium-api-cc-infix-en_GB-jvm instead.' - -ext.jacoco_additional = [prefixedProject('translations-en_GB-jvm')] - -dependencies { - api prefixedProject('domain-api-deprecated') - api prefixedProject('domain-builders-jvm') - - testImplementation prefixedProject('verbs-internal-jvm') -} diff --git a/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/CharSequenceContainsSearchersKt.kt b/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/CharSequenceContainsSearchersKt.kt deleted file mode 100644 index 8e31d3cb7..000000000 --- a/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/CharSequenceContainsSearchersKt.kt +++ /dev/null @@ -1,140 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0*/) -package ch.tutteli.atrium.api.cc.infix.en_UK - -import ch.tutteli.atrium.assertions.charsequence.contains.builders.CharSequenceContainsCheckerBuilder -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.domain.creating.charsequence.contains.searchbehaviours.IgnoringCaseSearchBehaviour -import ch.tutteli.atrium.domain.creating.charsequence.contains.searchbehaviours.NoOpSearchBehaviour -import ch.tutteli.atrium.reporting.translating.Translatable - -/** - * `Deprecated`, do not use this class, it is only here to retain binary compatibility. - */ -@Deprecated("Do not use this class, it is only here to retain binary compatibility (file was renamed to charSequenceContainsCreators); will be removed with 1.0.0") -object CharSequenceContainsSearchersKt { - - @JvmStatic - @Deprecated( - "Use the extension fun `value` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", - ReplaceWith("checkerBuilder value expected") - ) - fun value( - checkerBuilder: CharSequenceContainsCheckerBuilder, - expected: Any - ): AssertionPlant = the(checkerBuilder, Values(expected)) - - @JvmStatic - @Deprecated( - "Use the extension fun `the` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", - ReplaceWith("checkerBuilder the values") - ) - fun the( - checkerBuilder: CharSequenceContainsCheckerBuilder, - values: Values - ): AssertionPlant = checkerBuilder the values - - - @JvmStatic - @Deprecated( - "Use the extension fun `value` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", - ReplaceWith("checkerBuilder value expected") - ) - fun valueIgnoringCase( - checkerBuilder: CharSequenceContainsCheckerBuilder, - expected: Any - ): AssertionPlant = valuesIgnoringCase(checkerBuilder, Values(expected)) - - @JvmStatic - @Deprecated( - "Use the extension fun `the` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", - ReplaceWith("checkerBuilder the values") - ) - fun valuesIgnoringCase( - checkerBuilder: CharSequenceContainsCheckerBuilder, - values: Values - ): AssertionPlant = checkerBuilder the values - - - @JvmStatic - @Deprecated( - "Use the extension fun `defaultTranslationOf` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", - ReplaceWith("checkerBuilder defaultTranslationOf translatable") - ) - fun defaultTranslationOf( - checkerBuilder: CharSequenceContainsCheckerBuilder, - translatable: Translatable - ): AssertionPlant = the(checkerBuilder, DefaultTranslationsOf(translatable)) - - @JvmStatic - @Deprecated( - "Use the extension fun `the` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", - ReplaceWith("checkerBuilder the translatables") - ) - fun the( - checkerBuilder: CharSequenceContainsCheckerBuilder, - translatables: DefaultTranslationsOf - ): AssertionPlant = checkerBuilder the translatables - - - @JvmStatic - @Deprecated( - "Use the extension fun `defaultTranslationOf` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", - ReplaceWith("checkerBuilder defaultTranslationOf translatable") - ) - fun defaultTranslationOfIgnoringCase( - checkerBuilder: CharSequenceContainsCheckerBuilder, - translatable: Translatable - ): AssertionPlant = valuesIgnoringCase(checkerBuilder, DefaultTranslationsOf(translatable)) - - @JvmStatic - @Deprecated( - "Use the extension fun `the` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", - ReplaceWith("checkerBuilder the translatables") - ) - fun valuesIgnoringCase( - checkerBuilder: CharSequenceContainsCheckerBuilder, - translatables: DefaultTranslationsOf - ): AssertionPlant = checkerBuilder the translatables - - - @JvmStatic - @Deprecated( - "Use the extension fun `regex` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", - ReplaceWith("checkerBuilder regex pattern") - ) - fun regex( - checkerBuilder: CharSequenceContainsCheckerBuilder, - pattern: String - ): AssertionPlant = the(checkerBuilder, RegexPatterns(pattern)) - - @JvmStatic - @Deprecated( - "Use the extension fun `the` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", - ReplaceWith("checkerBuilder the patterns") - ) - fun the( - checkerBuilder: CharSequenceContainsCheckerBuilder, - patterns: RegexPatterns - ): AssertionPlant = checkerBuilder the patterns - - - @JvmStatic - @Deprecated( - "Use the extension fun `regex` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", - ReplaceWith("checkerBuilder regex pattern") - ) - fun regexIgnoringCase( - checkerBuilder: CharSequenceContainsCheckerBuilder, - pattern: String - ): AssertionPlant = regexIgnoringCase(checkerBuilder, RegexPatterns(pattern)) - - @JvmStatic - @Deprecated( - "Use the extension fun `the` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", - ReplaceWith("checkerBuilder the patterns") - ) - fun regexIgnoringCase( - checkerBuilder: CharSequenceContainsCheckerBuilder, - patterns: RegexPatterns - ): AssertionPlant = checkerBuilder the patterns -} diff --git a/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/anyAssertions.kt b/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/anyAssertions.kt deleted file mode 100644 index 5af4dc1f8..000000000 --- a/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/anyAssertions.kt +++ /dev/null @@ -1,90 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") - -package ch.tutteli.atrium.api.cc.infix.en_UK - -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.creating.AssertionPlantNullable -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.domain.builders.AssertImpl -import ch.tutteli.atrium.reporting.Reporter - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] is (equal to) [expected]. - * - * This method might enforce in the future, that [expected] has to be the same type as [Assert.subject][SubjectProvider.subject]. - * Currently the following is possible: `assert(1).toBe(1.0)` - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.infix.en_GB.toBe(expected)")) -infix fun Assert.toBe(expected: T) - = addAssertion(AssertImpl.any.toBe(this, expected)) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] is not (equal to) [expected]. - * - * This method might enforce in the future, that [expected] has to be the same type as [Assert.subject][SubjectProvider.subject]. - * Currently the following is possible: `assert(1).notToBe(1.0)` - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.infix.en_GB.notToBe(expected)")) -infix fun Assert.notToBe(expected: T) - = addAssertion(AssertImpl.any.notToBe(this, expected)) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] is the same instance as [expected]. - * - * This method might enforce in the future, that [expected] has to be the same type as [Assert.subject][SubjectProvider.subject]. - * Currently the following is possible: `assert(1).isSame(1.0)` - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use `isSameAs` from package en_GB; will be removed with 1.0.0", ReplaceWith("isSameAs(expected)", "ch.tutteli.atrium.api.cc.infix.en_GB.isSameAs")) -infix fun Assert.isSame(expected: T) - = addAssertion(AssertImpl.any.isSame(this, expected)) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] is not the same instance as [expected]. - * - * This method might enforce in the future, that [expected] has to be the same type as [Assert.subject][SubjectProvider.subject]. - * Currently the following is possible: `assert(1).isNotSame(1.0)` - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use `isNotSameAs` from package en_GB; will be removed with 1.0.0", ReplaceWith("isNotSameAs(expected)", "ch.tutteli.atrium.api.cc.infix.en_GB.isNotSameAs")) -infix fun Assert.isNotSame(expected: T) - = addAssertion(AssertImpl.any.isNotSame(this, expected)) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] is `null`. - * - * @param null Has to be `null`. - * - * @return Does not support a fluent API because: what else would you want to assert about `null` anyway? - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.infix.en_GB.toBe(null)")) -infix fun AssertionPlantNullable.toBe(@Suppress("UNUSED_PARAMETER") `null`: Nothing?) { - addAssertion(AssertImpl.any.toBeNull(this)) -} - -/** - * Can be used to create a group of sub assertions when using the fluent API. - * - * For instance `assert(1).isLessThan(3).and { isEven(); isGreaterThan(1) }` creates - * two assertions where the second one consists of two sub-assertions. In case the first assertion holds, then the - * second one is evaluated as a whole. Meaning, even though 1 is not even, it still evaluates that 1 is greater than 1. - * Hence the reporting might (depending on the configured [Reporter]) contain both failing sub-assertions. - * - * @return This plant to support a fluent API. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.infix.en_GB.and(assertionCreator)")) -infix fun AssertionPlant.and(assertionCreator: Assert.() -> Unit) - = addAssertionsCreatedBy(assertionCreator) diff --git a/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/assertions/charsequence/contains/builders/CharSequenceContainsAtLeastCheckerBuilder.kt b/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/assertions/charsequence/contains/builders/CharSequenceContainsAtLeastCheckerBuilder.kt deleted file mode 100644 index c5b1dc861..000000000 --- a/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/assertions/charsequence/contains/builders/CharSequenceContainsAtLeastCheckerBuilder.kt +++ /dev/null @@ -1,33 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0*/) -package ch.tutteli.atrium.api.cc.infix.en_UK.assertions.charsequence.contains.builders - -import ch.tutteli.atrium.assertions.charsequence.contains.builders.CharSequenceContainsCheckerBuilder -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains - -/** - * Represents the *deprecated* builder of a `contains at least` check within the fluent API of a sophisticated - * `contains` assertion for [CharSequence]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - * - * @constructor Represents the builder of a `contains at least` check within the fluent API of a sophisticated - * `contains` assertion for [CharSequence]. - * @param times The number which the check will compare against the actual number of times an expected object is - * found in the input of the search. - * @param containsBuilder The previously used [CharSequenceContains.Builder]. - */ -@Deprecated( - "Use the builder from the package creating; will be removed with 1.0.0", - ReplaceWith( - "AtLeastCheckerOption", - "ch.tutteli.atrium.api.cc.infix.en_GB.creating.charsequence.contains.builders.AtLeastCheckerOption" - ) -) -open class CharSequenceContainsAtLeastCheckerBuilder( - times: Int, - containsBuilder: CharSequenceContains.Builder -) : ch.tutteli.atrium.api.cc.infix.en_UK.creating.charsequence.contains.builders.AtLeastCheckerOptionImpl( - times, containsBuilder -), CharSequenceContainsCheckerBuilder - diff --git a/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/assertions/charsequence/contains/builders/CharSequenceContainsAtMostCheckerBuilder.kt b/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/assertions/charsequence/contains/builders/CharSequenceContainsAtMostCheckerBuilder.kt deleted file mode 100644 index a00423131..000000000 --- a/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/assertions/charsequence/contains/builders/CharSequenceContainsAtMostCheckerBuilder.kt +++ /dev/null @@ -1,32 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0*/) -package ch.tutteli.atrium.api.cc.infix.en_UK.assertions.charsequence.contains.builders - -import ch.tutteli.atrium.assertions.charsequence.contains.builders.CharSequenceContainsCheckerBuilder -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains - -/** - * Represents the *deprecated* builder of a `contains at least once but at most` check within the fluent API of a - * sophisticated `contains` assertion for [CharSequence]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - * - * @constructor Represents the builder of a `contains at least once but at most` check within the fluent API of a - * sophisticated `contains` assertion for [CharSequence]. - * @param times The number which the check will compare against the actual number of times an expected object is - * found in the input of the search. - * @param containsBuilder The previously used [CharSequenceContains.Builder]. - */ -@Deprecated( - "Use the builder from the package creating; will be removed with 1.0.0", - ReplaceWith( - "AtMostCheckerOption", - "ch.tutteli.atrium.api.cc.infix.en_GB.creating.charsequence.contains.builders.AtMostCheckerOption" - ) -) -open class CharSequenceContainsAtMostCheckerBuilder( - times: Int, - containsBuilder: CharSequenceContains.Builder -) : ch.tutteli.atrium.api.cc.infix.en_UK.creating.charsequence.contains.builders.AtMostCheckerOptionImpl( - times, containsBuilder -), CharSequenceContainsCheckerBuilder diff --git a/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/assertions/charsequence/contains/builders/CharSequenceContainsButAtMostCheckerBuilder.kt b/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/assertions/charsequence/contains/builders/CharSequenceContainsButAtMostCheckerBuilder.kt deleted file mode 100644 index e209a3675..000000000 --- a/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/assertions/charsequence/contains/builders/CharSequenceContainsButAtMostCheckerBuilder.kt +++ /dev/null @@ -1,33 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0*/) -package ch.tutteli.atrium.api.cc.infix.en_UK.assertions.charsequence.contains.builders - -import ch.tutteli.atrium.assertions.charsequence.contains.builders.CharSequenceContainsCheckerBuilder -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains - -/** - * Represents the *deprecated* builder of the second step of a `contains at least but at most` check within the - * fluent API of a sophisticated `contains` assertion for [CharSequence]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied to the input of the search. - * - * @constructor Represents the builder of the second step of a `contains at least but at most` check within the - * fluent API of a sophisticated `contains` assertion for [CharSequence]. - * @param times The number which the check will compare against the actual number of times an expected object is - * found in the input of the search. - * @param containsBuilder The previously used [CharSequenceContains.Builder]. - */ -@Deprecated( - "Use the builder from the package creating; will be removed with 1.0.0", - ReplaceWith( - "ButAtMostCheckerOption", - "ch.tutteli.atrium.api.cc.infix.en_GB.creating.charsequence.contains.builders.ButAtMostCheckerOption" - ) -) -open class CharSequenceContainsButAtMostCheckerBuilder( - times: Int, - atLeastBuilder: CharSequenceContainsAtLeastCheckerBuilder, - containsBuilder: CharSequenceContains.Builder -) : ch.tutteli.atrium.api.cc.infix.en_UK.creating.charsequence.contains.builders.ButAtMostCheckerOptionImpl( - times, atLeastBuilder, containsBuilder -), CharSequenceContainsCheckerBuilder diff --git a/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/assertions/charsequence/contains/builders/CharSequenceContainsExactlyCheckerBuilder.kt b/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/assertions/charsequence/contains/builders/CharSequenceContainsExactlyCheckerBuilder.kt deleted file mode 100644 index 3156d0b82..000000000 --- a/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/assertions/charsequence/contains/builders/CharSequenceContainsExactlyCheckerBuilder.kt +++ /dev/null @@ -1,32 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0*/) -package ch.tutteli.atrium.api.cc.infix.en_UK.assertions.charsequence.contains.builders - -import ch.tutteli.atrium.assertions.charsequence.contains.builders.CharSequenceContainsCheckerBuilder -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains - -/** - * Represents the *deprecated* builder of a `contains exactly` check within the fluent API of a sophisticated - * `contains` assertion for [CharSequence]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - * - * @constructor Represents the builder of a `contains exactly` check within the fluent API of a sophisticated - * `contains` assertion for [CharSequence]. - * @param times The number which the check will compare against the actual number of times an expected object is - * found in the input of the search. - * @param containsBuilder The previously used [CharSequenceContains.Builder]. - */ -@Deprecated( - "Use the builder from the package creating; will be removed with 1.0.0", - ReplaceWith( - "ExactlyCheckerOption", - "ch.tutteli.atrium.api.cc.infix.en_GB.creating.charsequence.contains.builders.ExactlyCheckerOption" - ) -) -open class CharSequenceContainsExactlyCheckerBuilder( - times: Int, - containsBuilder: CharSequenceContains.Builder -) : ch.tutteli.atrium.api.cc.infix.en_UK.creating.charsequence.contains.builders.ExactlyCheckerOptionImpl( - times, containsBuilder -), CharSequenceContainsCheckerBuilder diff --git a/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/assertions/charsequence/contains/builders/CharSequenceContainsNotCheckerBuilder.kt b/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/assertions/charsequence/contains/builders/CharSequenceContainsNotCheckerBuilder.kt deleted file mode 100644 index df2da022e..000000000 --- a/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/assertions/charsequence/contains/builders/CharSequenceContainsNotCheckerBuilder.kt +++ /dev/null @@ -1,29 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0*/) -package ch.tutteli.atrium.api.cc.infix.en_UK.assertions.charsequence.contains.builders - -import ch.tutteli.atrium.assertions.charsequence.contains.builders.CharSequenceContainsCheckerBuilder -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains - -/** - * Represents the *deprecated* builder of a `contains not at all` check within the fluent API of a sophisticated - * `contains` assertion for [CharSequence]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - * - * @constructor Represents the builder of a `contains not at all` check within the fluent API of a sophisticated - * `contains` assertion for [CharSequence]. - * @param containsBuilder The previously used [CharSequenceContains.Builder]. - */ -@Deprecated( - "Use the builder from the package creating; will be removed with 1.0.0", - ReplaceWith( - "NotCheckerOption", - "ch.tutteli.atrium.api.cc.infix.en_GB.creating.charsequence.contains.builders.NotCheckerOption" - ) -) -open class CharSequenceContainsNotCheckerBuilder( - containsBuilder: CharSequenceContains.Builder -) : ch.tutteli.atrium.api.cc.infix.en_UK.creating.charsequence.contains.builders.NotCheckerOptionImpl( - containsBuilder -), CharSequenceContainsCheckerBuilder diff --git a/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/assertions/charsequence/contains/builders/CharSequenceContainsNotOrAtMostCheckerBuilder.kt b/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/assertions/charsequence/contains/builders/CharSequenceContainsNotOrAtMostCheckerBuilder.kt deleted file mode 100644 index 2af9ed760..000000000 --- a/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/assertions/charsequence/contains/builders/CharSequenceContainsNotOrAtMostCheckerBuilder.kt +++ /dev/null @@ -1,32 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0*/) -package ch.tutteli.atrium.api.cc.infix.en_UK.assertions.charsequence.contains.builders - -import ch.tutteli.atrium.assertions.charsequence.contains.builders.CharSequenceContainsCheckerBuilder -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains - -/** - * Represents the *deprecated* builder of a `contains not or at most` check within the fluent API of a - * sophisticated `contains` assertion for [CharSequence]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - * - * @constructor Represents the builder of a `contains not or at most` check within the fluent API of a - * sophisticated `contains` assertion for [CharSequence]. - * @param times The number which the check will compare against the actual number of times an expected object is - * found in the input of the search. - * @param containsBuilder The previously used [CharSequenceContains.Builder]. - */ -@Deprecated( - "Use the builder from the package creating; will be removed with 1.0.0", - ReplaceWith( - "NotOrAtMostCheckerOption", - "ch.tutteli.atrium.api.cc.infix.en_GB.creating.charsequence.contains.builders.NotOrAtMostCheckerOption" - ) -) -open class CharSequenceContainsNotOrAtMostCheckerBuilder( - times: Int, - containsBuilder: CharSequenceContains.Builder -) : ch.tutteli.atrium.api.cc.infix.en_UK.creating.charsequence.contains.builders.NotOrAtMostCheckerOptionImpl( - times, containsBuilder -), CharSequenceContainsCheckerBuilder diff --git a/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/assertions/charsequence/contains/builders/nameContainsNotFun.kt b/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/assertions/charsequence/contains/builders/nameContainsNotFun.kt deleted file mode 100644 index 13b13690f..000000000 --- a/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/assertions/charsequence/contains/builders/nameContainsNotFun.kt +++ /dev/null @@ -1,13 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0*/) -package ch.tutteli.atrium.api.cc.infix.en_UK.assertions.charsequence.contains.builders - -import ch.tutteli.atrium.api.cc.infix.en_UK.Values -import ch.tutteli.atrium.api.cc.infix.en_UK.containsNot -import ch.tutteli.atrium.creating.AssertionPlant -import kotlin.reflect.KFunction2 - -@Deprecated("Use function from package creating; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.infix.en_GB.creating.charsequence.contains.builders.nameContainsNotValuesFun")) -fun nameContainsNotValuesFun(): String { - val f: KFunction2, Values<*>, AssertionPlant> = AssertionPlant::containsNot - return "${f.name} ${Values::class.simpleName}" -} diff --git a/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/assertions/iterable/contains/builders/IterableContainsAtLeastCheckerBuilder.kt b/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/assertions/iterable/contains/builders/IterableContainsAtLeastCheckerBuilder.kt deleted file mode 100644 index 3241e95b3..000000000 --- a/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/assertions/iterable/contains/builders/IterableContainsAtLeastCheckerBuilder.kt +++ /dev/null @@ -1,32 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0*/) -package ch.tutteli.atrium.api.cc.infix.en_UK.assertions.iterable.contains.builders - -import ch.tutteli.atrium.assertions.iterable.contains.builders.IterableContainsCheckerBuilder -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InAnyOrderSearchBehaviour - -/** - * Represents the *deprecated* builder of a `contains at least` check within the fluent API of a sophisticated - * `contains` assertion for [Iterable]. - * - * @param T The input type of the search. - * - * @constructor Represents the builder of a `contains at least` check within the fluent API of a sophisticated - * `contains` assertion for [Iterable]. - * @param times The number which the check will compare against the actual number of times an expected entry is - * found in the [Iterable]. - * @param containsBuilder The previously used [IterableContains.Builder]. - */ -@Deprecated( - "Use the builder from the package creating; will be removed with 1.0.0", - ReplaceWith( - "AtLeastCheckerOption", - "ch.tutteli.atrium.api.cc.infix.en_GB.creating.iterable.contains.builders.AtLeastCheckerOption" - ) -) -open class IterableContainsAtLeastCheckerBuilder>( - times: Int, - containsBuilder: IterableContains.Builder -) : ch.tutteli.atrium.api.cc.infix.en_UK.creating.iterable.contains.builders.AtLeastCheckerOptionImpl( - times, containsBuilder -), IterableContainsCheckerBuilder diff --git a/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/assertions/iterable/contains/builders/IterableContainsAtMostCheckerBuilder.kt b/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/assertions/iterable/contains/builders/IterableContainsAtMostCheckerBuilder.kt deleted file mode 100644 index 8696459df..000000000 --- a/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/assertions/iterable/contains/builders/IterableContainsAtMostCheckerBuilder.kt +++ /dev/null @@ -1,33 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0*/) -package ch.tutteli.atrium.api.cc.infix.en_UK.assertions.iterable.contains.builders - - -import ch.tutteli.atrium.assertions.iterable.contains.builders.IterableContainsCheckerBuilder -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InAnyOrderSearchBehaviour - -/** - * Represents the *deprecated* builder of a `contains at least once but at most` check within the fluent API of a - * sophisticated `contains` assertion for [Iterable]. - * - * @param T The input type of the search. - * - * @constructor Represents the builder of a `contains at least once but at most` check within the fluent API of a - * sophisticated `contains` assertion for [Iterable]. - * @param times The number which the check will compare against the actual number of times an expected entry is - * found in the [Iterable]. - * @param containsBuilder The previously used [IterableContains.Builder]. - */ -@Deprecated( - "Use the builder from the package creating; will be removed with 1.0.0", - ReplaceWith( - "AtMostCheckerOption", - "ch.tutteli.atrium.api.cc.infix.en_GB.creating.iterable.contains.builders.AtMostCheckerOption" - ) -) -open class IterableContainsAtMostCheckerBuilder>( - times: Int, - containsBuilder: IterableContains.Builder -) : ch.tutteli.atrium.api.cc.infix.en_UK.creating.iterable.contains.builders.AtMostCheckerOptionImpl( - times, containsBuilder -), IterableContainsCheckerBuilder diff --git a/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/assertions/iterable/contains/builders/IterableContainsButAtMostCheckerBuilder.kt b/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/assertions/iterable/contains/builders/IterableContainsButAtMostCheckerBuilder.kt deleted file mode 100644 index c5250174b..000000000 --- a/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/assertions/iterable/contains/builders/IterableContainsButAtMostCheckerBuilder.kt +++ /dev/null @@ -1,33 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0*/) -package ch.tutteli.atrium.api.cc.infix.en_UK.assertions.iterable.contains.builders - -import ch.tutteli.atrium.assertions.iterable.contains.builders.IterableContainsCheckerBuilder -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InAnyOrderSearchBehaviour - -/** - * Represents the *deprecated* builder of the second step of a `contains at least but at most` check within the - * fluent API of a sophisticated `contains` assertion for [Iterable]. - * - * @param T The input type of the search. - * - * @constructor Represents the builder of the second step of a `contains at least but at most` check within the - * fluent API of a sophisticated `contains` assertion for [Iterable]. - * @param times The number which the check will compare against the actual number of times an expected entry is - * found in the [Iterable]. - * @param containsBuilder The previously used [IterableContains.Builder]. - */ -@Deprecated( - "Use the builder from the package creating; will be removed with 1.0.0", - ReplaceWith( - "ButAtMostCheckerOption", - "ch.tutteli.atrium.api.cc.infix.en_GB.creating.iterable.contains.builders.ButAtMostCheckerOption" - ) -) -open class IterableContainsButAtMostCheckerBuilder>( - times: Int, - atLeastBuilder: IterableContainsAtLeastCheckerBuilder, - containsBuilder: IterableContains.Builder -) : ch.tutteli.atrium.api.cc.infix.en_UK.creating.iterable.contains.builders.ButAtMostCheckerOptionImpl( - times, atLeastBuilder, containsBuilder -), IterableContainsCheckerBuilder diff --git a/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/assertions/iterable/contains/builders/IterableContainsExactlyCheckerBuilder.kt b/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/assertions/iterable/contains/builders/IterableContainsExactlyCheckerBuilder.kt deleted file mode 100644 index a5f848942..000000000 --- a/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/assertions/iterable/contains/builders/IterableContainsExactlyCheckerBuilder.kt +++ /dev/null @@ -1,32 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0*/) -package ch.tutteli.atrium.api.cc.infix.en_UK.assertions.iterable.contains.builders - -import ch.tutteli.atrium.assertions.iterable.contains.builders.IterableContainsCheckerBuilder -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InAnyOrderSearchBehaviour - -/** - * Represents the *deprecated* builder of a `contains exactly` check within the fluent API of a sophisticated - * `contains` assertion for [Iterable]. - * - * @param T The input type of the search. - * - * @constructor Represents the builder of a `contains exactly` check within the fluent API of a sophisticated - * `contains` assertion for [Iterable]. - * @param times The number which the check will compare against the actual number of times an expected entry is - * found in the [Iterable]. - * @param containsBuilder The previously used [IterableContains.Builder]. - */ -@Deprecated( - "Use the builder from the package creating; will be removed with 1.0.0", - ReplaceWith( - "ExactlyCheckerOption", - "ch.tutteli.atrium.api.cc.infix.en_GB.creating.iterable.contains.builders.ExactlyCheckerOption" - ) -) -open class IterableContainsExactlyCheckerBuilder>( - times: Int, - containsBuilder: IterableContains.Builder -) : ch.tutteli.atrium.api.cc.infix.en_UK.creating.iterable.contains.builders.ExactlyCheckerOptionImpl( - times, containsBuilder -), IterableContainsCheckerBuilder diff --git a/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/assertions/iterable/contains/builders/IterableContainsNotCheckerBuilder.kt b/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/assertions/iterable/contains/builders/IterableContainsNotCheckerBuilder.kt deleted file mode 100644 index cef899c09..000000000 --- a/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/assertions/iterable/contains/builders/IterableContainsNotCheckerBuilder.kt +++ /dev/null @@ -1,31 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0*/) -package ch.tutteli.atrium.api.cc.infix.en_UK.assertions.iterable.contains.builders - -import ch.tutteli.atrium.assertions.iterable.contains.builders.IterableContainsCheckerBuilder -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InAnyOrderSearchBehaviour - -/** - * Represents the *deprecated* builder of a `contains not at all` check within the fluent API of a sophisticated - * `contains` assertion for [Iterable]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - * - * @constructor Represents the builder of a `contains not at all` check within the fluent API of a sophisticated - * `contains not` assertion for [Iterable]. - * @param containsBuilder The previously used [IterableContains.Builder]. - */ -@Deprecated( - "Use the builder from the package creating; will be removed with 1.0.0", - ReplaceWith( - "NotCheckerOption", - "ch.tutteli.atrium.api.cc.infix.en_GB.creating.iterable.contains.builders.NotCheckerOption" - ) -) -open class IterableContainsNotCheckerBuilder>( - containsBuilder: IterableContains.Builder -) : ch.tutteli.atrium.api.cc.infix.en_UK.creating.iterable.contains.builders.NotCheckerOptionImpl( - containsBuilder -), IterableContainsCheckerBuilder - diff --git a/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/assertions/iterable/contains/builders/IterableContainsNotOrAtMostCheckerBuilder.kt b/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/assertions/iterable/contains/builders/IterableContainsNotOrAtMostCheckerBuilder.kt deleted file mode 100644 index 8796e3010..000000000 --- a/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/assertions/iterable/contains/builders/IterableContainsNotOrAtMostCheckerBuilder.kt +++ /dev/null @@ -1,32 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0*/) -package ch.tutteli.atrium.api.cc.infix.en_UK.assertions.iterable.contains.builders - -import ch.tutteli.atrium.assertions.iterable.contains.builders.IterableContainsCheckerBuilder -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InAnyOrderSearchBehaviour - -/** - * Represents the *deprecated* builder of a `contains not or at most` check within the fluent API of a - * sophisticated `contains` assertion for [Iterable]. - * - * @param T The input type of the search. - * - * @constructor Represents the builder of a `contains at least once but at most` check within the fluent API of a - * sophisticated `contains` assertion for [Iterable]. - * @param times The number which the check will compare against the actual number of times an expected entry is - * found in the [Iterable]. - * @param containsBuilder The previously used [IterableContains.Builder]. - */ -@Deprecated( - "Use the builder from the package creating; will be removed with 1.0.0", - ReplaceWith( - "NotOrAtMostCheckerOption", - "ch.tutteli.atrium.api.cc.infix.en_GB.creating.iterable.contains.builders.NotOrAtMostCheckerOption" - ) -) -open class IterableContainsNotOrAtMostCheckerBuilder>( - times: Int, - containsBuilder: IterableContains.Builder -) : ch.tutteli.atrium.api.cc.infix.en_UK.creating.iterable.contains.builders.NotOrAtMostCheckerOptionImpl( - times, containsBuilder -), IterableContainsCheckerBuilder diff --git a/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/bigDecimalAssertions.kt b/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/bigDecimalAssertions.kt deleted file mode 100644 index c5ca0d275..000000000 --- a/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/bigDecimalAssertions.kt +++ /dev/null @@ -1,98 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") -package ch.tutteli.atrium.api.cc.infix.en_UK - -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.domain.builders.AssertImpl -import ch.tutteli.atrium.domain.builders.bigDecimal -import ch.tutteli.atrium.domain.builders.creating.PleaseUseReplacementException -import java.math.BigDecimal - -@Deprecated("Use `isNumericallyEqualTo` if you expect that the following assertion holds:\n" + - "`assert(BigDecimal(\"10\").toBe(BigDecimal(\"10.0\"))`\n" + - "However, if you expect it to be wrong (because `BigDecimal.scale` differ), then use `isEqualIncludingScale`.", - ReplaceWith("this isNumericallyEqualTo expected or isEqualIncludingScale expected")) -@Suppress("UNUSED_PARAMETER", "unused") -infix fun Assert.toBe(expected: T): Nothing - = throw PleaseUseReplacementException("BigDecimal.equals() compares also BigDecimal.scale, which you might not be aware of.\n" + - "If you know it and want that `scale` is included in the comparison, then use `isEqualIncludingScale`.") - -@Deprecated("Use `isNotNumericallyEqualTo` if you expect that the following assertion is wrong:\n" + - "`assert(BigDecimal(\"10\") notToBe BigDecimal(\"10.0\")`\n" + - "However, if you expect it to hold (because `BigDecimal.scale` differ), then use `isNotEqualIncludingScale`.", - ReplaceWith("this isNotNumericallyEqualTo expected or isNotEqualIncludingScale expected")) -@Suppress("UNUSED_PARAMETER", "unused") -infix fun Assert.notToBe(expected: T): Nothing - = throw PleaseUseReplacementException("BigDecimal.equals() compares also BigDecimal.scale, which you might not be aware of.\n" + - "If you know it and want that `scale` is included in the comparison, then use `isNotEqualIncludingScale`.") - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] is numerically equal to [expected]. - * - * By numerically is meant that it will not compare [BigDecimal.scale] (or in other words, - * it uses `compareTo(expected) == 0`) - * - * Most of the time you want to use this function instead of [isEqualIncludingScale] because - * [isEqualIncludingScale] compares [BigDecimal.scale]. - * Following the two functions compared: - * - `assert(BigDecimal("10")) isEqualIncludingScale BigDecimal("10.0")` does not hold - * - `assert(BigDecimal("10")) isNumericallyEqualTo BigDecimal("10.0")` holds. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.infix.en_GB.isNumericallyEqualTo(expected)")) -infix fun Assert.isNumericallyEqualTo(expected: T) - = addAssertion(AssertImpl.bigDecimal.isNumericallyEqualTo(this, expected)) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] is not numerically equal to [expected]. - * - * By numerically is meant that it will not compare [BigDecimal.scale] (or in other words, - * it uses `compareTo(expected) != 0`) - * Most of the time you want to use this function instead of [isNotEqualIncludingScale] because - * [isNotEqualIncludingScale] compares [BigDecimal.scale]. - * Following the two functions compared: - * - `assert(BigDecimal("10")) notToBe BigDecimal("10.0")` holds. - * - `assert(BigDecimal("10")) isNotNumericallyEqualTo BigDecimal("10.0")` does not hold. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.infix.en_GB.isNotNumericallyEqualTo(expected)")) -infix fun Assert.isNotNumericallyEqualTo(expected: T) - = addAssertion(AssertImpl.bigDecimal.isNotNumericallyEqualTo(this, expected)) - - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] is (equal to) [expected] including [BigDecimal.scale]. - * - * Most of the time you want to use [isNumericallyEqualTo] which does not compare [BigDecimal.scale] - * in contrast to this function. - * Following the two functions compared: - * - `assert(BigDecimal("10")) isEqualIncludingScale BigDecimal("10.0")` does not hold. - * - `assert(BigDecimal("10")) isNumericallyEqualTo BigDecimal("10.0")` holds. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.infix.en_GB.v(expected)")) -infix fun Assert.isEqualIncludingScale(expected: T) - = addAssertion(AssertImpl.bigDecimal.isEqualIncludingScale(this, expected, this::isNumericallyEqualTo.name)) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] is not equal to [expected] including [BigDecimal.scale]. - * - * Most of the time you want to use [isNotNumericallyEqualTo] which does not compare [BigDecimal.scale] - * in contrast to this function. - * Following the two functions compared: - * - `assert(BigDecimal("10")) isNotEqualIncludingScale BigDecimal("10.0")` holds. - * - `assert(BigDecimal("10")) isNotNumericallyEqualTo BigDecimal("10.0")` does not hold. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.infix.en_GB.isNotEqualIncludingScale(expected)")) -infix fun Assert.isNotEqualIncludingScale(expected: T) - = addAssertion(AssertImpl.bigDecimal.isNotEqualIncludingScale(this, expected)) diff --git a/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/charSequenceAssertions.kt b/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/charSequenceAssertions.kt deleted file mode 100644 index 3001a6ded..000000000 --- a/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/charSequenceAssertions.kt +++ /dev/null @@ -1,281 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") -package ch.tutteli.atrium.api.cc.infix.en_UK - -import ch.tutteli.atrium.api.cc.infix.en_UK.creating.charsequence.contains.builders.NotCheckerOption -import ch.tutteli.atrium.api.cc.infix.en_UK.creating.charsequence.contains.builders.NotCheckerOptionImpl -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.domain.builders.AssertImpl -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains -import ch.tutteli.atrium.domain.creating.charsequence.contains.searchbehaviours.NoOpSearchBehaviour -import ch.tutteli.atrium.domain.creating.charsequence.contains.searchbehaviours.NotSearchBehaviour -import ch.tutteli.atrium.reporting.translating.Translatable -import ch.tutteli.atrium.api.cc.infix.en_UK.assertions.charsequence.contains.builders.CharSequenceContainsNotCheckerBuilder as DeprecatedNotCheckerBuilder -import ch.tutteli.atrium.assertions.charsequence.contains.builders.CharSequenceContainsBuilder as DeprecatedBuilder - -/** - * Creates a [CharSequenceContains.Builder] based on this [AssertionPlant] which allows to define - * a sophisticated `contains` assertions. - * - * @param contain Has to be `contain`. - * - * @return The newly created builder. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.infix.en_GB.to(contain)")) -infix fun Assert.to(@Suppress("UNUSED_PARAMETER") contain: contain): CharSequenceContains.Builder - = AssertImpl.charSequence.containsBuilder(this) - -@Deprecated("Use the extension function `to`; will be removed with 1.0.0", ReplaceWith("plant to contain")) -fun to(plant: Assert, @Suppress("UNUSED_PARAMETER") contain: contain): DeprecatedBuilder - = DeprecatedBuilder(plant, (plant to contain).searchBehaviour) - - -/** - * Creates a [CharSequenceContains.Builder] based on this [AssertionPlant] which allows to define - * more sophisticated `contains not` assertions. - * - * @return The newly created builder. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.infix.en_GB.notTo(contain)")) -infix fun Assert.notTo(@Suppress("UNUSED_PARAMETER") contain: contain): NotCheckerOption - = NotCheckerOptionImpl(AssertImpl.charSequence.containsNotBuilder(this)) - -@Deprecated("Use the extension function `notTo`; will be removed with 1.0.0", ReplaceWith("plant notTo contain")) -fun notTo(plant: Assert, @Suppress("UNUSED_PARAMETER") contain: contain): DeprecatedNotCheckerBuilder - = DeprecatedNotCheckerBuilder(AssertImpl.charSequence.containsNotBuilder(plant)) - - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] contains the [toString] representation of the given [expected] - * using a non disjoint search. - * - * It is a shortcut for `to contain atLeast 1 value expected` - * - * Notice that a runtime check applies which assures that only [CharSequence], [Number] and [Char] are passed (this - * function expects `Any` for your convenience, so that you can mix [String] and [Int] for instance). - * - * By non disjoint is meant that `'aa'` in `'aaaa'` is found three times and not only two times. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - * @throws IllegalArgumentException in case [expected] is not a [CharSequence], [Number] or [Char]. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.infix.en_GB.contains(expected)")) -infix fun Assert.contains(expected: Any): AssertionPlant - = this contains Values(expected) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] contains the given [values] [toString] representation - * using a non disjoint search. - * - * It is a shortcut for `to contain atLeast 1 the Values(...)` - * - * Notice that a runtime check applies which assures that only [CharSequence], [Number] and [Char] are passed (this - * function expects `Any` for your convenience, so that you can mix [String] and [Int] for instance). - * - * By non disjoint is meant that `'aa'` in `'aaaa'` is found three times and not only two times. - * Also notice, that it does not search for unique matches. Meaning, if the input of the search is `'a'` and [Values.expected] - * is defined as `'a'` and one [Values.otherExpected] is defined as `'a'` as well, then both match, even though they match the - * same sequence in the input of the search. Use the property `contains` to create a more sophisticated `contains` - * assertion where you can use options such as [atLeast], [atMost] and [exactly] to control the number of occurrences - * you expect. - * - * Meaning you might want to use: - * `to contain exactly 2 the value 'a'` - * instead of: - * `contains Values('a', 'a')` - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - * @throws IllegalArgumentException in case one of the [values] is not a [CharSequence], [Number] or [Char]. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.infix.en_GB.contains(values)")) -infix fun Assert.contains(values: Values): AssertionPlant - = this to contain atLeast 1 the values - - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] contains the [getDefault][Translatable.getDefault] - * representation of the given [translatable]. - * - * It is a shortcut for `to contain atLeast 1 defaultTranslationOf translatable)` - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.infix.en_GB.containsDefaultTranslationOf(translatable)")) -infix fun Assert.containsDefaultTranslationOf(translatable: Translatable): AssertionPlant - = this contains DefaultTranslationsOf(translatable) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] contains [DefaultTranslationsOf.expected]'s - * [getDefault][Translatable.getDefault] representation and the [getDefault][Translatable.getDefault] representations - * of the [DefaultTranslationsOf.otherExpected] (if given), using a non disjoint search. - * - * It is a shortcut for `to contain atLeast 1 the DefaultTranslationsOf(...)` - * - * By non disjoint is meant that `'aa'` in `'aaaa'` is found three times and not only two times. - * Also notice, that it does not search for unique matches. Meaning, if the input of the search is `'a'` and the - * default translation of [DefaultTranslationsOf.expected] is defined as `'a'` and one default translation of the - * [DefaultTranslationsOf.otherExpected] is defined as `'a'` as well, then both match, even though they match the - * same sequence in the input of the search. Use an option such as [atLeast], [atMost] and [exactly] to control - * the number of occurrences you expect. - * - * Meaning you might want to use: - * `to contain exactly 2 defaultTranslationOf IS` - * instead of: - * `to contain atLeast 1 the DefaultTranslationOf(IS, IS)` - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.infix.en_GB.contains(defaultTranslationOf)")) -infix fun Assert.contains(defaultTranslationOf: DefaultTranslationsOf): AssertionPlant - = this to contain atLeast 1 the defaultTranslationOf - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] contains a sequence which matches the given [pattern]. - * - * It is a shortcut for `to contain atLeast 1 regex pattern`. - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.infix.en_GB.containsRegex(pattern)")) -infix fun Assert.containsRegex(pattern: String): AssertionPlant - = this contains RegexPatterns(pattern) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] contains a sequence which matches the given [patterns] - * using a non disjoint search. - * - * It is a shortcut for `to contain atLeast 1 the RegexPatterns(...)`. - * - * By non disjoint is meant that `'aa'` in `'aaaa'` is found three times and not only two times. - * Also notice, that it does not search for unique matches. Meaning, if the input of the search is `'ab'` and - * [RegexPatterns.pattern] is defined as `'a(b)?'` and one of the [RegexPatterns.otherPatterns] is defined - * as `'a(b)?'` as well, then both match, even though they match the same sequence in the input of the search. - * Use an option such as [atLeast], [atMost] and [exactly] to control the number of occurrences you expect. - * - * Meaning you might want to use: - * `to contain exactly 2 the regex 'a(b)?'` - * instead of: - * `to contain atLeast 1 the RegexPatterns('a(b)?', 'a(b)?')` - * - * @param patterns The patterns which are expected to have a match against the input of the search. - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.infix.en_GB.contains(patterns)")) -infix fun Assert.contains(patterns: RegexPatterns): AssertionPlant - = this to contain atLeast 1 the patterns - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] does not [expected]'s [toString] representation. - * - * Delegates to [containsNot] [Values]. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.infix.en_GB.containsNot(expected)")) -infix fun Assert.containsNot(expected: Any) - = this containsNot Values(expected) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] does not contain the [toString] representation - * of the given [values]. - * - * It is a shortcut for `notTo contain the Values(expected, *otherExpected)`. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.infix.en_GB.containsNot(values)")) -infix fun Assert.containsNot(values: Values) - = this notTo contain the values - - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] does not contain [DefaultTranslationsOf.expected]'s - * [getDefault][Translatable.getDefault] representation and neither one of the [DefaultTranslationsOf.otherExpected]'s - * [getDefault][Translatable.getDefault] representation (if given). - * - * It is a shortcut for `notTo contain the DefaultTranslationsOf(expected, *otherExpected)`. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.infix.en_GB.containsNot(defaultTranslationsOf)")) -infix fun Assert.containsNot(defaultTranslationsOf: DefaultTranslationsOf) - = this notTo contain the defaultTranslationsOf - - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] starts with [expected]. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.infix.en_GB.startsWith(expected)")) -infix fun Assert.startsWith(expected: CharSequence) - = addAssertion(AssertImpl.charSequence.startsWith(this, expected)) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] does not start with [expected]. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.infix.en_GB.startsNotWith(expected)")) -infix fun Assert.startsNotWith(expected: CharSequence) - = addAssertion(AssertImpl.charSequence.startsNotWith(this, expected)) - - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] ends with [expected]. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.infix.en_GB.endsWith(expected)")) -infix fun Assert.endsWith(expected: CharSequence) - = addAssertion(AssertImpl.charSequence.endsWith(this, expected)) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] does not end with [expected]. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.infix.en_GB.endsNotWith(expected)")) -infix fun Assert.endsNotWith(expected: CharSequence) - = addAssertion(AssertImpl.charSequence.endsNotWith(this, expected)) - - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] [CharSequence].[kotlin.text.isEmpty]. - * - * @param Empty Has to be `Empty`. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.infix.en_GB.toBe(Empty)")) -infix fun Assert.toBe(@Suppress("UNUSED_PARAMETER") Empty: Empty) - = addAssertion(AssertImpl.charSequence.isEmpty(this)) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] [CharSequence].[kotlin.text.isNotEmpty]. - * - * @param onlyEmptyAllowed Has to be `Empty`. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.infix.en_GB.notToBe(Empty)")) -infix fun Assert.notToBe(@Suppress("UNUSED_PARAMETER") onlyEmptyAllowed: Empty) - = addAssertion(AssertImpl.charSequence.isNotEmpty(this)) diff --git a/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/charSequenceContainsCheckers.kt b/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/charSequenceContainsCheckers.kt deleted file mode 100644 index e70ac41ff..000000000 --- a/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/charSequenceContainsCheckers.kt +++ /dev/null @@ -1,123 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") -package ch.tutteli.atrium.api.cc.infix.en_UK - -import ch.tutteli.atrium.api.cc.infix.en_UK.creating.charsequence.contains.builders.* -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains.SearchBehaviour - -import ch.tutteli.atrium.api.cc.infix.en_UK.assertions.charsequence.contains.builders.CharSequenceContainsAtLeastCheckerBuilder as DeprecatedAtLeastCheckerBuilder -import ch.tutteli.atrium.api.cc.infix.en_UK.assertions.charsequence.contains.builders.CharSequenceContainsAtMostCheckerBuilder as DeprecatedAtMostCheckerBuilder -import ch.tutteli.atrium.api.cc.infix.en_UK.assertions.charsequence.contains.builders.CharSequenceContainsButAtMostCheckerBuilder as DeprecatedButAtMostCheckerBuilder -import ch.tutteli.atrium.api.cc.infix.en_UK.assertions.charsequence.contains.builders.CharSequenceContainsExactlyCheckerBuilder as DeprecatedExactlyCheckerBuilder -import ch.tutteli.atrium.api.cc.infix.en_UK.assertions.charsequence.contains.builders.CharSequenceContainsNotOrAtMostCheckerBuilder as DeprecatedNotOrAtMostCheckerBuilder -import ch.tutteli.atrium.assertions.charsequence.contains.builders.CharSequenceContainsBuilder as DeprecatedBuilder - - -/** - * Restricts a `contains` assertion by specifying that the number of occurrences of the object which we are looking - * for, occurs `at least` number of [times] within the search input. - * - * @param times The number which the check will compare against the actual number of times an expected object is - * found in the input of the search. - * - * @return The newly created builder. - * @throws IllegalArgumentException In case [times] is smaller than zero. - * @throws IllegalArgumentException In case [times] equals to zero; use [containsNot] instead. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.infix.en_GB.atLeast(times)")) -infix fun CharSequenceContains.Builder.atLeast(times: Int): AtLeastCheckerOption - = AtLeastCheckerOptionImpl(times, this) - -@Deprecated("Use the extension fun `atLeast` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", ReplaceWith("builder atLeast times")) -fun atLeast(builder: DeprecatedBuilder, times: Int): DeprecatedAtLeastCheckerBuilder - = DeprecatedAtLeastCheckerBuilder(times, builder) - - -/** - * Restricts a `contains at least` assertion by specifying that the number of occurrences of the object which we - * are looking for, occurs `at most` number of [times] within the search input. - * - * The resulting restriction will be a `contains at least but at most` assertion. - * - * @param times The number which the check will compare against the actual number of times an expected object is - * found in the input of the search. - * - * @return The newly created builder. - * @throws IllegalArgumentException In case [times] is smaller than zero. - * @throws IllegalArgumentException In case [times] equals to zero; use [containsNot] instead. - * @throws IllegalArgumentException In case [times] of this `at most` restriction equals to the number of the - * `at least` restriction; use the [exactly] restriction instead. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.infix.en_GB.butAtMost(times)")) -infix fun AtLeastCheckerOption.butAtMost(times: Int): ButAtMostCheckerOption - = ButAtMostCheckerOptionImpl(times, this, containsBuilder) - -@Deprecated("Use the extension fun `butAtMost` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", ReplaceWith("checkerBuilder butAtMost times")) -fun butAtMost(checkerBuilder: DeprecatedAtLeastCheckerBuilder, times: Int): DeprecatedButAtMostCheckerBuilder - = DeprecatedButAtMostCheckerBuilder(times, checkerBuilder, checkerBuilder.containsBuilder) - - -/** - * Restricts a `contains` assertion by specifying that the number of occurrences of the object which we - * are looking for, occurs `exactly` number of [times] within the search input. - * - * @param times The number which the check will compare against the actual number of times an expected object is - * found in the input of the search. - * - * @return The newly created builder. - * @throws IllegalArgumentException In case [times] is smaller than zero. - * @throws IllegalArgumentException In case [times] equals to zero; use [containsNot] instead. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.infix.en_GB.exactly(times)")) -infix fun CharSequenceContains.Builder.exactly(times: Int): ExactlyCheckerOption - = ExactlyCheckerOptionImpl(times, this) - -@Deprecated("Use the extension fun `exactly` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", ReplaceWith("builder exactly times")) -fun exactly(builder: DeprecatedBuilder, times: Int): DeprecatedExactlyCheckerBuilder - = DeprecatedExactlyCheckerBuilder(times, builder) - - -/** - * Restricts a `contains` assertion by specifying that the number of occurrences of the object which we - * are looking for, occurs `at least` once but `at most` number of [times] within the search input. - * - * If you want to use a higher lower bound than one, then use `atLeast(2).butAtMost(3)` instead of `atMost(3)`. - * And in case you want to state that it is either not contained at all or at most a certain number of times, - * then use `notOrAtMost(2)` instead. - * - * @param times The number which the check will compare against the actual number of times an expected object is - * found in the input of the search. - * - * @return The newly created builder. - * @throws IllegalArgumentException In case [times] is smaller than zero. - * @throws IllegalArgumentException In case [times] equals to zero; use [containsNot] instead. - * @throws IllegalArgumentException In case [times] equals to one; use [exactly] instead. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.infix.en_GB.atMost(times)")) -infix fun CharSequenceContains.Builder.atMost(times: Int): AtMostCheckerOption - = AtMostCheckerOptionImpl(times, this) - -@Deprecated("Use the extension fun `atMost` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", ReplaceWith("builder atMost times")) -fun atMost(builder: DeprecatedBuilder, times: Int): DeprecatedAtMostCheckerBuilder - = DeprecatedAtMostCheckerBuilder(times, builder) - - -/** - * Restricts a `contains` assertion by specifying that the number of occurrences of the object which we - * are looking for, occurs `not at all or at most` number of [times] within the search input. - * - * @param times The number which the check will compare against the actual number of times an expected object is - * found in the input of the search. - * - * @return The newly created builder. - * @throws IllegalArgumentException In case [times] is smaller than zero. - * @throws IllegalArgumentException In case [times] equals to zero; use [containsNot] instead. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.infix.en_GB.notOrAtMost(times)")) -infix fun CharSequenceContains.Builder.notOrAtMost(times: Int): NotOrAtMostCheckerOption - = NotOrAtMostCheckerOptionImpl(times, this) - -@Deprecated("Use the extension fun `notOrAtMost` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", ReplaceWith("builder notOrAtMost times")) -fun notOrAtMost(builder: DeprecatedBuilder, times: Int): DeprecatedNotOrAtMostCheckerBuilder - = DeprecatedNotOrAtMostCheckerBuilder(times, builder) diff --git a/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/charSequenceContainsCreators.kt b/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/charSequenceContainsCreators.kt deleted file mode 100644 index ca423284f..000000000 --- a/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/charSequenceContainsCreators.kt +++ /dev/null @@ -1,285 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") -package ch.tutteli.atrium.api.cc.infix.en_UK - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.domain.builders.AssertImpl -import ch.tutteli.atrium.domain.builders.creating.basic.contains.addAssertionForAssert -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains -import ch.tutteli.atrium.domain.creating.charsequence.contains.searchbehaviours.IgnoringCaseSearchBehaviour -import ch.tutteli.atrium.domain.creating.charsequence.contains.searchbehaviours.NoOpSearchBehaviour -import ch.tutteli.atrium.reporting.translating.Translatable - -/** - * Finishes the specification of the sophisticated `contains` assertion where the [expected] object shall be searched, - * using a non disjoint search. - * - * Delegates to `the Values(expected)`. - * - * Notice that a runtime check applies which assures that only [CharSequence], [Number] and [Char] are passed (this - * function expects `Any` for your convenience, so that you can mix [String] and [Int] for instance). - * - * By non disjoint is meant that 'aa' in 'aaaa' is found three times and not only two times. - * - * @param expected The object which is expected to be contained within the input of the search. - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - * @throws IllegalArgumentException in case [expected] is not a [CharSequence], [Number] or [Char]. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.infix.en_GB.value(expected)")) -infix fun CharSequenceContains.CheckerOption.value(expected: Any): AssertionPlant - = this the Values(expected) - -/** - * Finishes the specification of the sophisticated `contains` assertion where the given [values] - * shall be searched, using a non disjoint search. - * - * Notice that a runtime check applies which assures that only [CharSequence], [Number] and [Char] are passed (this - * function expects `Any` for your convenience, so that you can mix [String] and [Int] for instance). - * - * By non disjoint is meant that `'aa'` in `'aaaa'` is found three times and not only two times. - * Also notice, that it does not search for unique matches. Meaning, if the input of the search is `'a'` and [Values.expected] - * is defined as `'a'` and one [Values.otherExpected] is defined as `'a'` as well, then both match, even though they match the - * same sequence in the input of the search. Use an option such as [atLeast], [atMost] and [exactly] to control - * the number of occurrences you expect. - * - * Meaning you might want to use: - * `to contain exactly 2 the value 'a'` - * instead of: - * `to contain atLeast 1 the Values('a', 'a')` - * - * @param values The objects which are expected to be contained within the input of the search. - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - * @throws IllegalArgumentException in case one of the [values] is not a [CharSequence], [Number] or [Char]. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.infix.en_GB.the(values)")) -infix fun CharSequenceContains.CheckerOption.the(values: Values): AssertionPlant - = addAssertion(AssertImpl.charSequence.contains.values(this, values.toList())) - - -/** - * Finishes the specification of the sophisticated `contains` assertion where the [expected] object shall be searched - * (ignoring case), using a non disjoint search. - * - * Delegates to `the Values(expected)`. - * - * Notice that a runtime check applies which assures that only [CharSequence], [Number] and [Char] are passed (this - * function expects `Any` for your convenience, so that you can mix [String] and [Int] for instance). - * - * By non disjoint is meant that 'aa' in 'aaaa' is found three times and not only two times. - * - * @param expected The object which is expected to be contained within the input of the search. - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - * @throws IllegalArgumentException in case [expected] is not a [CharSequence], [Number] or [Char]. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.infix.en_GB.value(expected)")) -@JvmName("valueIgnoringCase") -infix fun CharSequenceContains.CheckerOption.value(expected: Any): AssertionPlant - = this the Values(expected) - -/** - * Finishes the specification of the sophisticated `contains` assertion where the [values] - * shall be searched (ignoring case), using a non disjoint search. - * - * Notice that a runtime check applies which assures that only [CharSequence], [Number] and [Char] are passed (this - * function expects `Any` for your convenience, so that you can mix [String] and [Int] for instance). - * - * By non disjoint is meant that `'aa'` in `'aaaa'` is found three times and not only two times. - * Also notice, that it does not search for unique matches. Meaning, if the input of the search is `'a'` and [Values.expected] - * is defined as `'a'` and one [Values.otherExpected] is defined as `'a'` as well, then both match, even though they match the - * same sequence in the input of the search. Use an option such as [atLeast], [atMost] and [exactly] to control - * the number of occurrences you expect. - * - * Meaning you might want to use: - * `to contain ignoring case exactly 2 the value 'a'` - * instead of: - * `to contain ignoring case atLeast 1 the Values('a', 'a')` - * - * @param values The objects which are expected to be contained within the input of the search. - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - * @throws IllegalArgumentException in case one of the [values] is not a [CharSequence], [Number] or [Char]. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.infix.en_GB.the(values)")) -@JvmName("valuesIgnoringCase") -infix fun CharSequenceContains.CheckerOption.the(values: Values): AssertionPlant - = addAssertion(AssertImpl.charSequence.contains.valuesIgnoringCase(this, values.toList())) - - -/** - * Finishes the specification of the sophisticated `contains` assertion where the [getDefault][Translatable.getDefault] - * representation of the given [translatable] shall be searched, using a non disjoint search. - * - * Delegates to `the DefaultTranslationsOf(translatable)`. - * - * By non disjoint is meant that 'aa' in 'aaaa' is found three times and not only two times. - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.infix.en_GB.defaultTranslationOf(translatable)")) -infix fun CharSequenceContains.CheckerOption.defaultTranslationOf(translatable: Translatable): AssertionPlant - = this the DefaultTranslationsOf(translatable) - -/** - * Finishes the specification of the sophisticated `contains` assertion where the [getDefault][Translatable.getDefault] - * representation of the given [translatables] shall be searched, using a non disjoint search. - * - * By non disjoint is meant that `'aa'` in `'aaaa'` is found three times and not only two times. - * Also notice, that it does not search for unique matches. Meaning, if the input of the search is `'a'` and the - * default translation of [DefaultTranslationsOf.expected] is defined as `'a'` and one default translation of the - * [DefaultTranslationsOf.otherExpected] is defined as `'a'` as well, then both match, even though they match the - * same sequence in the input of the search. Use an option such as [atLeast], [atMost] and [exactly] to control - * the number of occurrences you expect. - * - * Meaning you might want to use: - * `to contain exactly 2 the defaultTranslationOf IS` - * instead of: - * `to contain atLeast 1 the DefaultTranslationsOf(IS, IS)` - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.infix.en_GB.the(translatables)")) -infix fun CharSequenceContains.CheckerOption.the(translatables: DefaultTranslationsOf): AssertionPlant - = addAssertion(AssertImpl.charSequence.contains.defaultTranslationOf(this, translatables.toList())) - - -/** - * Finishes the specification of the sophisticated `contains` assertion where the [getDefault][Translatable.getDefault] - * representation of the given [translatable] shall be searched (ignoring case), using a non disjoint search. - * - * Delegates to `the DefaultTranslationsOf(translatable)`. - * - * By non disjoint is meant that 'aa' in 'aaaa' is found three times and not only two times. - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@JvmName("defaultTranslationOfIgnoringCase") -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.infix.en_GB.defaultTranslationOf(translatable)")) -infix fun CharSequenceContains.CheckerOption.defaultTranslationOf(translatable: Translatable): AssertionPlant - = this the DefaultTranslationsOf(translatable) - -/** - * Finishes the specification of the sophisticated `contains` assertion where the [getDefault][Translatable.getDefault] - * representation of the given [translatables] shall be searched (ignoring case), using a non disjoint search. - * - * By non disjoint is meant that `'aa'` in `'aaaa'` is found three times and not only two times. - * Also notice, that it does not search for unique matches. Meaning, if the input of the search is `'a'` and [Values.expected] - * is defined as `'a'` and one [Values.otherExpected] is defined as `'a'` as well, then both match, even though they match the - * same sequence in the input of the search. Use an option such as [atLeast], [atMost] and [exactly] to control - * the number of occurrences you expect. - * - * Meaning you might want to use: - * `to contain ignoring case exactly 2 the defaultTranslatableOf IS` - * instead of: - * `to contain ignoring case atLeast 1 the DefaultTranslationsOf(IS, IS)` - * - * @param translatables The objects which are expected to be contained within the input of the search. - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.infix.en_GB.the(translatables)")) -@JvmName("defaultTranslationsOfIgnoringCase") -infix fun CharSequenceContains.CheckerOption.the(translatables: DefaultTranslationsOf): AssertionPlant - = addAssertion(AssertImpl.charSequence.contains.defaultTranslationOfIgnoringCase(this, translatables.toList())) - - -/** - * Finishes the specification of the sophisticated `contains` assertion where the given regular expression [pattern] - * is expected to have a match, using a non disjoint search. - * - * Delegates to `the RegexPatterns(pattern)`. - * - * @param pattern The pattern which is expected to have a match against the input of the search. - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.infix.en_GB.regex(pattern)")) -infix fun CharSequenceContains.CheckerOption.regex(pattern: String): AssertionPlant - = this the RegexPatterns(pattern) - -/** - * Finishes the specification of the sophisticated `contains` assertion where the given regular expression [patterns] - * are expected to have a match, using a non disjoint search. - * - * By non disjoint is meant that `'aa'` in `'aaaa'` is found three times and not only two times. - * Also notice, that it does not search for unique matches. Meaning, if the input of the search is `'ab'` and - * [RegexPatterns.pattern] is defined as `'a(b)?'` and one of the [RegexPatterns.otherPatterns] is defined - * as `'a(b)?'` as well, then both match, even though they match the same sequence in the input of the search. - * Use an option such as [atLeast], [atMost] and [exactly] to control the number of occurrences you expect. - * - * Meaning you might want to use: - * `to contain exactly 2 the regex 'a(b)?'` - * instead of: - * `to contain atLeast 1 the RegexPatterns('a(b)?', 'a(b)?')` - * - * @param patterns The patterns which are expected to have a match against the input of the search. - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.infix.en_GB.the(patterns)")) -infix fun CharSequenceContains.CheckerOption.the(patterns: RegexPatterns): AssertionPlant - = addAssertion(AssertImpl.charSequence.contains.regex(this, patterns.toList())) - - -/** - * Finishes the specification of the sophisticated `contains` assertion where the given regular expression [pattern] - * is expected to have a match (ignoring case), using a non disjoint search. - * - * Delegates to `the RegexPatterns(pattern)`. - * - * @param pattern The patterns which is expected to have a match against the input of the search. - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.infix.en_GB.regex(pattern)")) -@JvmName("regexIgnoringCase") -infix fun CharSequenceContains.CheckerOption.regex(pattern: String): AssertionPlant - = this the RegexPatterns(pattern) - -/** - * Finishes the specification of the sophisticated `contains` assertion where the given regular expression [patterns] - * are expected to have a match (ignoring case), using a non disjoint search. - * - * By non disjoint is meant that `'aa'` in `'aaaa'` is found three times and not only two times. - * Also notice, that it does not search for unique matches. Meaning, if the input of the search is `'ab'` and - * [RegexPatterns.pattern] is defined as `'a(b)?'` and one of the [RegexPatterns.otherPatterns] is defined - * as `'a(b)?'` as well, then both match, even though they match the same sequence in the input of the search. - * Use an option such as [atLeast], [atMost] and [exactly] to control the number of occurrences you expect. - * - * Meaning you might want to use: - * `to contain ignoring case exactly 2 the regex 'a(b)?'` - * instead of: - * `to contain ignoring case atLeast 1 the RegexPatterns('a(b)?', 'a(b)?')` - * - * @param patterns The patterns which are expected to have a match against the input of the search. - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.infix.en_GB.the(patterns)")) -@JvmName("regexIgnoringCase") -infix fun CharSequenceContains.CheckerOption.the(patterns: RegexPatterns): AssertionPlant - = addAssertion(AssertImpl.charSequence.contains.regexIgnoringCase(this, patterns.toList())) - -/** - * Helper method to simplify adding assertions to the plant which itself is stored in - * [CharSequenceContains.CheckerOption.containsBuilder]. - * - * @return The plant to support a fluent API. - */ -private fun CharSequenceContains.CheckerOption.addAssertion(assertion: Assertion): AssertionPlant - = addAssertionForAssert(assertion) diff --git a/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/charSequenceContainsDecorators.kt b/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/charSequenceContainsDecorators.kt deleted file mode 100644 index dc48d8421..000000000 --- a/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/charSequenceContainsDecorators.kt +++ /dev/null @@ -1,44 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") -package ch.tutteli.atrium.api.cc.infix.en_UK - -import ch.tutteli.atrium.api.cc.infix.en_UK.creating.charsequence.contains.builders.NotCheckerOption -import ch.tutteli.atrium.api.cc.infix.en_UK.creating.charsequence.contains.builders.NotCheckerOptionImpl -import ch.tutteli.atrium.assertions.charsequence.contains.builders.CharSequenceContainsBuilder -import ch.tutteli.atrium.domain.builders.AssertImpl -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains -import ch.tutteli.atrium.domain.creating.charsequence.contains.searchbehaviours.IgnoringCaseSearchBehaviour -import ch.tutteli.atrium.domain.creating.charsequence.contains.searchbehaviours.NoOpSearchBehaviour -import ch.tutteli.atrium.domain.creating.charsequence.contains.searchbehaviours.NotSearchBehaviour -import ch.tutteli.atrium.api.cc.infix.en_UK.assertions.charsequence.contains.builders.CharSequenceContainsNotCheckerBuilder as DeprecatedNotCheckerBuilder - -/** - * Defines that the decoration behaviour `ignore case` shall be applied to this sophisticated `contains` assertion. - * - * @param case Has to be `case`. - * - * @return The newly created builder. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith(" ch.tutteli.atrium.api.cc.infix.en_GB.ignoring(case)")) -infix fun CharSequenceContains.Builder.ignoring(@Suppress("UNUSED_PARAMETER") case: case): CharSequenceContains.Builder - = AssertImpl.charSequence.contains.searchBehaviours.ignoringCase(this) - -@Deprecated("Use the extension fun `ignoring` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", ReplaceWith("builder ignoring case")) -fun ignoring(builder: CharSequenceContainsBuilder, @Suppress("UNUSED_PARAMETER") case: case): CharSequenceContainsBuilder - = CharSequenceContainsBuilder(builder.subjectProvider, (builder ignoring case).searchBehaviour) - - -/** - * Defines that the decoration behaviour `ignore case` shall be applied to this sophisticated `contains not` assertion. - * - * @param case Has to be `case`. - * - * @return The newly created builder. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith(" ch.tutteli.atrium.api.cc.infix.en_GB.ignoring(case)")) -infix fun NotCheckerOption.ignoring(@Suppress("UNUSED_PARAMETER") case: case): NotCheckerOption - = NotCheckerOptionImpl(containsBuilder ignoring case) - -@Deprecated("Use the extension fun `ignoring` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", ReplaceWith("builder ignoring case")) -fun DeprecatedNotCheckerBuilder.ignoring(@Suppress("UNUSED_PARAMETER") case: case): DeprecatedNotCheckerBuilder - = DeprecatedNotCheckerBuilder(containsBuilder ignoring case) diff --git a/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/collectionAssertions.kt b/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/collectionAssertions.kt deleted file mode 100644 index e3e07aa8c..000000000 --- a/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/collectionAssertions.kt +++ /dev/null @@ -1,38 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") -package ch.tutteli.atrium.api.cc.infix.en_UK - -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.domain.builders.AssertImpl - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject]'s [Collection.size] is [size]. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Suppress("DEPRECATION") -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.infix.en_GB.hasSize(size)")) -infix fun > Assert.hasSize(size: Int) - = addAssertion(AssertImpl.collection.hasSize(this, size)) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] is an empty [Collection]. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.infix.en_GB.toBe(Empty)")) -infix fun > Assert.toBe(@Suppress("UNUSED_PARAMETER") Empty: Empty) - = addAssertion(AssertImpl.collection.isEmpty(this)) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] is not an empty [Collection]. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.infix.en_GB.notToBe(Empty)")) -infix fun > Assert.notToBe(@Suppress("UNUSED_PARAMETER") Empty: Empty) - = addAssertion(AssertImpl.collection.isNotEmpty(this)) diff --git a/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/comparableAssertions.kt b/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/comparableAssertions.kt deleted file mode 100644 index c0ef0feab..000000000 --- a/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/comparableAssertions.kt +++ /dev/null @@ -1,48 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") - -package ch.tutteli.atrium.api.cc.infix.en_UK - -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.domain.builders.AssertImpl -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] is less than [expected]. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.infix.en_GB.isLessThan(expected)")) -infix fun > Assert.isLessThan(expected: T) - = addAssertion(AssertImpl.comparable.isLessThan(this, expected)) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] is less than or equals [expected]. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.infix.en_GB.isLessOrEquals(expected)")) -infix fun > Assert.isLessOrEquals(expected: T) - = addAssertion(AssertImpl.comparable.isLessOrEquals(this, expected)) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] is greater than [expected]. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.infix.en_GB.isGreaterThan(expected)")) -infix fun > Assert.isGreaterThan(expected: T) - = addAssertion(AssertImpl.comparable.isGreaterThan(this, expected)) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] is greater than or equals [expected]. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.infix.en_GB.isGreaterOrEquals(expected)")) -infix fun > Assert.isGreaterOrEquals(expected: T) - = addAssertion(AssertImpl.comparable.isGreaterOrEquals(this, expected)) - diff --git a/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/creating/charsequence/contains/builders/AtLeastCheckerOption.kt b/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/creating/charsequence/contains/builders/AtLeastCheckerOption.kt deleted file mode 100644 index 5db4b5f6e..000000000 --- a/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/creating/charsequence/contains/builders/AtLeastCheckerOption.kt +++ /dev/null @@ -1,44 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0*/) -package ch.tutteli.atrium.api.cc.infix.en_UK.creating.charsequence.contains.builders - -import ch.tutteli.atrium.api.cc.infix.en_UK.atLeast -import ch.tutteli.atrium.domain.builders.creating.charsequence.contains.builders.AtLeastCheckerOptionBase -import ch.tutteli.atrium.domain.builders.creating.charsequence.contains.builders.WithTimesCheckerOption -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains.SearchBehaviour - -/** - * Represents the extension point for another option after a `contains at least`-check within a sophisticated - * `contains` assertion building process for [CharSequence]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.infix.en_GB.creating.charsequence.contains.builders.AtLeastCheckerOption")) -interface AtLeastCheckerOption - : WithTimesCheckerOption - -/** - * Represents the builder of a `contains at least`-check within the fluent API of a sophisticated - * `contains` assertion for [CharSequence]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - * - * @constructor Represents the builder of a `contains at least` check within the fluent API of a sophisticated - * `contains` assertion for [CharSequence]. - * @param times The number which the check will compare against the actual number of times an expected object is - * found in the input of the search. - * @param containsBuilder The previously used [CharSequenceContains.Builder]. - */ -@Deprecated("Do not rely on this type; will be made internal with 1.0.0", ReplaceWith("AtLeastCheckerOption")) -open class AtLeastCheckerOptionImpl( - times: Int, - containsBuilder: CharSequenceContains.Builder -) : AtLeastCheckerOptionBase( - times, - containsBuilder, - nameContainsNotValuesFun(), - { "`${containsBuilder::atLeast.name} $it`" } -), AtLeastCheckerOption - diff --git a/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/creating/charsequence/contains/builders/AtMostCheckerOption.kt b/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/creating/charsequence/contains/builders/AtMostCheckerOption.kt deleted file mode 100644 index 47c583bfb..000000000 --- a/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/creating/charsequence/contains/builders/AtMostCheckerOption.kt +++ /dev/null @@ -1,46 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0*/) -package ch.tutteli.atrium.api.cc.infix.en_UK.creating.charsequence.contains.builders - -import ch.tutteli.atrium.api.cc.infix.en_UK.atLeast -import ch.tutteli.atrium.api.cc.infix.en_UK.atMost -import ch.tutteli.atrium.api.cc.infix.en_UK.exactly -import ch.tutteli.atrium.domain.builders.creating.charsequence.contains.builders.AtMostCheckerOptionBase -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains.SearchBehaviour - -/** - * Represents the extension point for another option after a `contains at least once but at most`-check within - * a sophisticated `contains` assertion building process for [CharSequence]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.infix.en_GB.creating.charsequence.contains.builders.AtMostCheckerOption")) -interface AtMostCheckerOption - : CharSequenceContains.CheckerOption - -/** - * Represents the builder of a `contains at least once but at most` check within the fluent API of a - * sophisticated `contains` assertion for [CharSequence]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - * - * @constructor Represents the builder of a `contains at least once but at most` check within the fluent API of a - * sophisticated `contains` assertion for [CharSequence]. - * @param times The number which the check will compare against the actual number of times an expected object is - * found in the input of the search. - * @param containsBuilder The previously used [CharSequenceContains.Builder]. - */ -@Deprecated("Do not rely on this type; will be made internal with 1.0.0", ReplaceWith("AtMostCheckerOption")) -open class AtMostCheckerOptionImpl( - times: Int, - containsBuilder: CharSequenceContains.Builder -) : AtMostCheckerOptionBase( - times, - containsBuilder, - nameContainsNotValuesFun(), - { "`${containsBuilder::atMost.name} $it`" }, - { "`${containsBuilder::atLeast.name} $it`" }, - { "`${containsBuilder::exactly.name} $it`" } -), AtMostCheckerOption diff --git a/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/creating/charsequence/contains/builders/ButAtMostCheckerOption.kt b/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/creating/charsequence/contains/builders/ButAtMostCheckerOption.kt deleted file mode 100644 index e7e527c1a..000000000 --- a/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/creating/charsequence/contains/builders/ButAtMostCheckerOption.kt +++ /dev/null @@ -1,51 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0*/) -package ch.tutteli.atrium.api.cc.infix.en_UK.creating.charsequence.contains.builders - -import ch.tutteli.atrium.api.cc.infix.en_UK.atLeast -import ch.tutteli.atrium.api.cc.infix.en_UK.atMost -import ch.tutteli.atrium.api.cc.infix.en_UK.butAtMost -import ch.tutteli.atrium.api.cc.infix.en_UK.exactly -import ch.tutteli.atrium.domain.builders.creating.charsequence.contains.builders.ButAtMostCheckerOptionBase -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains.SearchBehaviour - -/** - * Represents the extension point for another option after a `contains at least but at most`-check within - * a sophisticated `contains` assertion building process for [CharSequence]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.infix.en_GB.creating.charsequence.contains.builders.ButAtMostCheckerOption")) -interface ButAtMostCheckerOption - : CharSequenceContains.CheckerOption - -/** - * Represents the builder of the second step of a `contains at least but at most` check within the - * fluent API of a sophisticated `contains` assertion for [CharSequence]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied to the input of the search. - * - * @constructor Represents the builder of the second step of a `contains at least but at most` check within the - * fluent API of a sophisticated `contains` assertion for [CharSequence]. - * @param times The number which the check will compare against the actual number of times an expected object is - * found in the input of the search. - * @param containsBuilder The previously used [CharSequenceContains.Builder]. - */ -@Deprecated("Do not rely on this type; will be made internal with 1.0.0", ReplaceWith("ButAtMostCheckerOption")) -open class ButAtMostCheckerOptionImpl( - times: Int, - atLeastBuilder: AtLeastCheckerOption, - containsBuilder: CharSequenceContains.Builder -) : ButAtMostCheckerOptionBase( - times, - atLeastBuilder, - containsBuilder, - nameContainsNotValuesFun(), - { l, u -> "`${containsBuilder::atLeast.name} $l ${atLeastBuilder::butAtMost.name} $u`" }, - { "`${containsBuilder::atMost.name} $it`" }, - { "`${containsBuilder::atLeast.name} $it`" }, - { "`${atLeastBuilder::butAtMost.name} $it`" }, - { "`${containsBuilder::exactly.name} $it`" } -), ButAtMostCheckerOption diff --git a/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/creating/charsequence/contains/builders/ExactlyCheckerOption.kt b/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/creating/charsequence/contains/builders/ExactlyCheckerOption.kt deleted file mode 100644 index 25c35d299..000000000 --- a/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/creating/charsequence/contains/builders/ExactlyCheckerOption.kt +++ /dev/null @@ -1,42 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0*/) -package ch.tutteli.atrium.api.cc.infix.en_UK.creating.charsequence.contains.builders - -import ch.tutteli.atrium.api.cc.infix.en_UK.exactly -import ch.tutteli.atrium.domain.builders.creating.charsequence.contains.builders.ExactlyCheckerOptionBase -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains.SearchBehaviour - -/** - * Represents the extension point for another option after a `contains exactly`-check within - * a sophisticated `contains` assertion building process for [CharSequence]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.infix.en_GB.creating.charsequence.contains.builders.ExactlyCheckerOption")) -interface ExactlyCheckerOption - : CharSequenceContains.CheckerOption - -/** - * Represents the builder of a `contains exactly` check within the fluent API of a sophisticated - * `contains` assertion for [CharSequence]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - * - * @constructor Represents the builder of a `contains exactly` check within the fluent API of a sophisticated - * `contains` assertion for [CharSequence]. - * @param times The number which the check will compare against the actual number of times an expected object is - * found in the input of the search. - * @param containsBuilder The previously used [CharSequenceContains.Builder]. - */ -@Deprecated("Do not rely on this type; will be made internal with 1.0.0", ReplaceWith("ExactlyCheckerOption")) -open class ExactlyCheckerOptionImpl( - times: Int, - containsBuilder: CharSequenceContains.Builder -) : ExactlyCheckerOptionBase( - times, - containsBuilder, - nameContainsNotValuesFun(), - { "`${containsBuilder::exactly.name} $it`" } -), ExactlyCheckerOption diff --git a/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/creating/charsequence/contains/builders/NotCheckerOption.kt b/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/creating/charsequence/contains/builders/NotCheckerOption.kt deleted file mode 100644 index 02bb1139b..000000000 --- a/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/creating/charsequence/contains/builders/NotCheckerOption.kt +++ /dev/null @@ -1,34 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0*/) -package ch.tutteli.atrium.api.cc.infix.en_UK.creating.charsequence.contains.builders - -import ch.tutteli.atrium.domain.builders.creating.charsequence.contains.builders.NotCheckerOptionBase -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains.SearchBehaviour - -/** - * Represents the extension point for another option after a `contains not at all`-check within - * a sophisticated `contains` assertion building process for [CharSequence]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.infix.en_GB.creating.charsequence.contains.builders.NotCheckerOption")) -interface NotCheckerOption - : CharSequenceContains.CheckerOption - -/** - * Represents the builder of a `contains not at all` check within the fluent API of a sophisticated - * `contains` assertion for [CharSequence]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - * - * @constructor Represents the builder of a `contains not at all` check within the fluent API of a sophisticated - * `contains` assertion for [CharSequence]. - * @param containsBuilder The previously used [CharSequenceContains.Builder]. - */ -@Deprecated("Do not rely on this type; will be made internal with 1.0.0", ReplaceWith("NotCheckerOption")) -open class NotCheckerOptionImpl( - containsBuilder: CharSequenceContains.Builder -) : NotCheckerOptionBase(containsBuilder), NotCheckerOption - diff --git a/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/creating/charsequence/contains/builders/NotOrAtMostCheckerOption.kt b/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/creating/charsequence/contains/builders/NotOrAtMostCheckerOption.kt deleted file mode 100644 index 0c24dfaf5..000000000 --- a/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/creating/charsequence/contains/builders/NotOrAtMostCheckerOption.kt +++ /dev/null @@ -1,42 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0*/) -package ch.tutteli.atrium.api.cc.infix.en_UK.creating.charsequence.contains.builders - -import ch.tutteli.atrium.api.cc.infix.en_UK.notOrAtMost -import ch.tutteli.atrium.domain.builders.creating.charsequence.contains.builders.NotOrAtMostCheckerOptionBase -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains.SearchBehaviour - -/** - * Represents the extension point for another option after a `contains not or at most`-check within - * a sophisticated `contains` assertion building process for [CharSequence]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.infix.en_GB.creating.charsequence.contains.builders.NotOrAtMostCheckerOption")) -interface NotOrAtMostCheckerOption - : CharSequenceContains.CheckerOption - -/** - * Represents the builder of a `contains not or at most` check within the fluent API of a - * sophisticated `contains` assertion for [CharSequence]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - * - * @constructor Represents the builder of a `contains not or at most` check within the fluent API of a - * sophisticated `contains` assertion for [CharSequence]. - * @param times The number which the check will compare against the actual number of times an expected object is - * found in the input of the search. - * @param containsBuilder The previously used [CharSequenceContains.Builder]. - */ -@Deprecated("Do not rely on this type; will be made internal with 1.0.0", ReplaceWith("NotOrAtMostCheckerOption")) -open class NotOrAtMostCheckerOptionImpl( - times: Int, - containsBuilder: CharSequenceContains.Builder -) : NotOrAtMostCheckerOptionBase( - times, - containsBuilder, - nameContainsNotValuesFun(), - { "`${containsBuilder::notOrAtMost.name} $it`" } -), NotOrAtMostCheckerOption diff --git a/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/creating/charsequence/contains/builders/nameContainsNotFun.kt b/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/creating/charsequence/contains/builders/nameContainsNotFun.kt deleted file mode 100644 index 880af5e82..000000000 --- a/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/creating/charsequence/contains/builders/nameContainsNotFun.kt +++ /dev/null @@ -1,14 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") -package ch.tutteli.atrium.api.cc.infix.en_UK.creating.charsequence.contains.builders - -import ch.tutteli.atrium.api.cc.infix.en_UK.Values -import ch.tutteli.atrium.api.cc.infix.en_UK.containsNot -import ch.tutteli.atrium.creating.Assert -import kotlin.reflect.KFunction2 - -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.infix.en_GB.creating.charsequence.contains.builders.nameContainsNotValuesFun")) -internal fun nameContainsNotValuesFun(): String { - val f: KFunction2, Values, Assert> = Assert::containsNot - return "${f.name} ${Values::class.simpleName}" -} diff --git a/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/creating/iterable/contains/builders/AtLeastCheckerOption.kt b/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/creating/iterable/contains/builders/AtLeastCheckerOption.kt deleted file mode 100644 index c883f904f..000000000 --- a/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/creating/iterable/contains/builders/AtLeastCheckerOption.kt +++ /dev/null @@ -1,42 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0*/) -package ch.tutteli.atrium.api.cc.infix.en_UK.creating.iterable.contains.builders - -import ch.tutteli.atrium.api.cc.infix.en_UK.atLeast -import ch.tutteli.atrium.domain.builders.creating.iterable.contains.builders.AtLeastCheckerOptionBase -import ch.tutteli.atrium.domain.builders.creating.iterable.contains.builders.WithTimesCheckerOption -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InAnyOrderSearchBehaviour - -/** - * Represents the extension point for another option after a `contains at least`-check within a sophisticated - * `contains` assertion building process for [Iterable]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.infix.en_GB.creating.iterable.contains.builders.AtLeastCheckerOption")) -interface AtLeastCheckerOption, out S : IterableContains.SearchBehaviour> - : WithTimesCheckerOption - -/** - * Represents the builder of a `contains at least` check within the fluent API of a sophisticated - * `contains` assertion for [Iterable]. - * - * @param T The input type of the search. - * - * @constructor Represents the builder of a `contains at least` check within the fluent API of a sophisticated - * `contains` assertion for [Iterable]. - * @param times The number which the check will compare against the actual number of times an expected entry is - * found in the [Iterable]. - * @param containsBuilder The previously used [IterableContains.Builder]. - */ -@Deprecated("Do not rely on this type; will be made internal with 1.0.0", ReplaceWith("AtLeastCheckerOption")) -open class AtLeastCheckerOptionImpl, out S : InAnyOrderSearchBehaviour>( - times: Int, - containsBuilder: IterableContains.Builder -) : AtLeastCheckerOptionBase( - times, - containsBuilder, - nameContainsNotValuesFun(), - { "`${containsBuilder::atLeast.name} $it`" } -), AtLeastCheckerOption diff --git a/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/creating/iterable/contains/builders/AtMostCheckerOption.kt b/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/creating/iterable/contains/builders/AtMostCheckerOption.kt deleted file mode 100644 index 9ca1d9087..000000000 --- a/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/creating/iterable/contains/builders/AtMostCheckerOption.kt +++ /dev/null @@ -1,46 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0*/) -package ch.tutteli.atrium.api.cc.infix.en_UK.creating.iterable.contains.builders - -import ch.tutteli.atrium.api.cc.infix.en_UK.atLeast -import ch.tutteli.atrium.api.cc.infix.en_UK.atMost -import ch.tutteli.atrium.api.cc.infix.en_UK.exactly -import ch.tutteli.atrium.domain.builders.creating.iterable.contains.builders.AtMostCheckerOptionBase -import ch.tutteli.atrium.domain.builders.creating.iterable.contains.builders.WithTimesCheckerOption -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InAnyOrderSearchBehaviour - -/** - * Represents the extension point for another option after a `contains at least once but at most`-check within - * a sophisticated `contains` assertion building process for [Iterable]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.infix.en_GB.creating.iterable.contains.builders.AtMostCheckerOption")) -interface AtMostCheckerOption, out S : IterableContains.SearchBehaviour> - : WithTimesCheckerOption - -/** - * Represents the builder of a `contains at least once but at most` check within the fluent API of a - * sophisticated `contains` assertion for [Iterable]. - * - * @param T The input type of the search. - * - * @constructor Represents the builder of a `contains at least once but at most` check within the fluent API of a - * sophisticated `contains` assertion for [Iterable]. - * @param times The number which the check will compare against the actual number of times an expected entry is - * found in the [Iterable]. - * @param containsBuilder The previously used [IterableContains.Builder]. - */ -@Deprecated("Do not rely on this type; will be made internal with 1.0.0", ReplaceWith("AtMostCheckerOption")) -open class AtMostCheckerOptionImpl, out S : InAnyOrderSearchBehaviour>( - times: Int, - containsBuilder: IterableContains.Builder -) : AtMostCheckerOptionBase( - times, - containsBuilder, - nameContainsNotValuesFun(), - { "`${containsBuilder::atMost.name} $it`" }, - { "`${containsBuilder::atLeast.name} $it`" }, - { "`${containsBuilder::exactly.name} $it`" } -), AtMostCheckerOption diff --git a/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/creating/iterable/contains/builders/ButAtMostCheckerOption.kt b/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/creating/iterable/contains/builders/ButAtMostCheckerOption.kt deleted file mode 100644 index 2abe4aac9..000000000 --- a/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/creating/iterable/contains/builders/ButAtMostCheckerOption.kt +++ /dev/null @@ -1,51 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0*/) -package ch.tutteli.atrium.api.cc.infix.en_UK.creating.iterable.contains.builders - -import ch.tutteli.atrium.api.cc.infix.en_UK.atLeast -import ch.tutteli.atrium.api.cc.infix.en_UK.atMost -import ch.tutteli.atrium.api.cc.infix.en_UK.butAtMost -import ch.tutteli.atrium.api.cc.infix.en_UK.exactly -import ch.tutteli.atrium.domain.builders.creating.iterable.contains.builders.ButAtMostCheckerOptionBase -import ch.tutteli.atrium.domain.builders.creating.iterable.contains.builders.WithTimesCheckerOption -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InAnyOrderSearchBehaviour - -/** - * Represents the extension point for another option after a `contains at least but at most`-check within a - * sophisticated `contains` assertion building process for [Iterable]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.infix.en_GB.creating.iterable.contains.builders.ButAtMostCheckerOption")) -interface ButAtMostCheckerOption, out S : IterableContains.SearchBehaviour> - : WithTimesCheckerOption - -/** - * Represents the builder of the second step of a `contains at least but at most` check within the - * fluent API of a sophisticated `contains` assertion for [Iterable]. - * - * @param T The input type of the search. - * - * @constructor Represents the builder of the second step of a `contains at least but at most` check within the - * fluent API of a sophisticated `contains` assertion for [Iterable]. - * @param times The number which the check will compare against the actual number of times an expected entry is - * found in the [Iterable]. - * @param containsBuilder The previously used [IterableContains.Builder]. - */ -@Deprecated("Do not rely on this type; will be made internal with 1.0.0", ReplaceWith("ButAtMostCheckerOption")) -open class ButAtMostCheckerOptionImpl, out S : InAnyOrderSearchBehaviour>( - times: Int, - atLeastBuilder: AtLeastCheckerOption, - containsBuilder: IterableContains.Builder -) : ButAtMostCheckerOptionBase( - times, - atLeastBuilder, - containsBuilder, - nameContainsNotValuesFun(), - { l, u -> "`${containsBuilder::atLeast.name} $l ${atLeastBuilder::butAtMost.name} $u`" }, - { "`${containsBuilder::atMost.name} $it`" }, - { "`${containsBuilder::atLeast.name} $it`" }, - { "`${atLeastBuilder::butAtMost.name} $it`" }, - { "`${containsBuilder::exactly.name} $it`" } -), ButAtMostCheckerOption diff --git a/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/creating/iterable/contains/builders/ExactlyCheckerOption.kt b/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/creating/iterable/contains/builders/ExactlyCheckerOption.kt deleted file mode 100644 index 58720040c..000000000 --- a/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/creating/iterable/contains/builders/ExactlyCheckerOption.kt +++ /dev/null @@ -1,42 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0*/) -package ch.tutteli.atrium.api.cc.infix.en_UK.creating.iterable.contains.builders - -import ch.tutteli.atrium.api.cc.infix.en_UK.exactly -import ch.tutteli.atrium.domain.builders.creating.iterable.contains.builders.ExactlyCheckerOptionBase -import ch.tutteli.atrium.domain.builders.creating.iterable.contains.builders.WithTimesCheckerOption -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InAnyOrderSearchBehaviour - -/** - * Represents the extension point for another option after a `contains exactly`-check within - * a sophisticated `contains` assertion building process for [Iterable]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.infix.en_GB.creating.iterable.contains.builders.ExactlyCheckerOption")) -interface ExactlyCheckerOption, out S : IterableContains.SearchBehaviour> - : WithTimesCheckerOption - -/** - * Represents the builder of a `contains exactly` check within the fluent API of a sophisticated - * `contains` assertion for [Iterable]. - * - * @param T The input type of the search. - * - * @constructor Represents the builder of a `contains exactly` check within the fluent API of a sophisticated - * `contains` assertion for [Iterable]. - * @param times The number which the check will compare against the actual number of times an expected entry is - * found in the [Iterable]. - * @param containsBuilder The previously used [IterableContains.Builder]. - */ -@Deprecated("Do not rely on this type; will be made internal with 1.0.0", ReplaceWith("ExactlyCheckerOption")) -open class ExactlyCheckerOptionImpl, out S : InAnyOrderSearchBehaviour>( - times: Int, - containsBuilder: IterableContains.Builder -) : ExactlyCheckerOptionBase( - times, - containsBuilder, - nameContainsNotValuesFun(), - { "`${containsBuilder::exactly.name} $it`" } -), ExactlyCheckerOption diff --git a/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/creating/iterable/contains/builders/NotCheckerOption.kt b/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/creating/iterable/contains/builders/NotCheckerOption.kt deleted file mode 100644 index e8743f1df..000000000 --- a/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/creating/iterable/contains/builders/NotCheckerOption.kt +++ /dev/null @@ -1,34 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0*/) -package ch.tutteli.atrium.api.cc.infix.en_UK.creating.iterable.contains.builders - -import ch.tutteli.atrium.domain.builders.creating.iterable.contains.builders.NotCheckerOptionBase -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InAnyOrderSearchBehaviour - -/** - * Represents the extension point for another option after a `contains not at all`-check within - * a sophisticated `contains` assertion building process for [Iterable]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.infix.en_GB.creating.iterable.contains.builders.NotCheckerOption")) -interface NotCheckerOption, out S : IterableContains.SearchBehaviour> - : IterableContains.CheckerOption - -/** - * Represents the builder of a `contains not at all` check within the fluent API of a sophisticated - * `contains` assertion for [Iterable]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - * - * @constructor Represents the builder of a `contains not at all` check within the fluent API of a sophisticated - * `contains not` assertion for [Iterable]. - * @param containsBuilder The previously used [IterableContains.Builder]. - */ -@Deprecated("Do not rely on this type; will be made internal with 1.0.0", ReplaceWith("NotCheckerOption")) -open class NotCheckerOptionImpl, out S : InAnyOrderSearchBehaviour>( - containsBuilder: IterableContains.Builder -) : NotCheckerOptionBase(containsBuilder), NotCheckerOption - diff --git a/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/creating/iterable/contains/builders/NotOrAtMostCheckerOption.kt b/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/creating/iterable/contains/builders/NotOrAtMostCheckerOption.kt deleted file mode 100644 index 4dcc5ee6c..000000000 --- a/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/creating/iterable/contains/builders/NotOrAtMostCheckerOption.kt +++ /dev/null @@ -1,42 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0*/) -package ch.tutteli.atrium.api.cc.infix.en_UK.creating.iterable.contains.builders - -import ch.tutteli.atrium.api.cc.infix.en_UK.notOrAtMost -import ch.tutteli.atrium.domain.builders.creating.iterable.contains.builders.NotOrAtMostCheckerOptionBase -import ch.tutteli.atrium.domain.builders.creating.iterable.contains.builders.WithTimesCheckerOption -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InAnyOrderSearchBehaviour - -/** - * Represents the extension point for another option after a `contains not or at most`-check within - * a sophisticated `contains` assertion building process for [Iterable]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.infix.en_GB.creating.iterable.contains.builders.NotOrAtMostCheckerOption")) -interface NotOrAtMostCheckerOption, out S : IterableContains.SearchBehaviour> - : WithTimesCheckerOption - -/** - * Represents the builder of a `contains not or at most` check within the fluent API of a - * sophisticated `contains` assertion for [Iterable]. - * - * @param T The input type of the search. - * - * @constructor Represents the builder of a `contains at least once but at most` check within the fluent API of a - * sophisticated `contains` assertion for [Iterable]. - * @param times The number which the check will compare against the actual number of times an expected entry is - * found in the [Iterable]. - * @param containsBuilder The previously used [IterableContains.Builder]. - */ -@Deprecated("Do not rely on this type; will be made internal with 1.0.0", ReplaceWith("NotOrAtMostCheckerOption")) -open class NotOrAtMostCheckerOptionImpl, out S : InAnyOrderSearchBehaviour>( - times: Int, - containsBuilder: IterableContains.Builder -) : NotOrAtMostCheckerOptionBase( - times, - containsBuilder, - nameContainsNotValuesFun(), - { "`${containsBuilder::notOrAtMost.name} $it`" } -), NotOrAtMostCheckerOption diff --git a/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/creating/iterable/contains/builders/nameContainsNotFun.kt b/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/creating/iterable/contains/builders/nameContainsNotFun.kt deleted file mode 100644 index 17eda0821..000000000 --- a/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/creating/iterable/contains/builders/nameContainsNotFun.kt +++ /dev/null @@ -1,14 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") -package ch.tutteli.atrium.api.cc.infix.en_UK.creating.iterable.contains.builders - -import ch.tutteli.atrium.api.cc.infix.en_UK.Values -import ch.tutteli.atrium.api.cc.infix.en_UK.containsNot -import ch.tutteli.atrium.creating.Assert -import kotlin.reflect.KFunction2 - -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.infix.en_GB.creating.iterable.contains.builders.nameContainsNotValuesFun")) -internal fun nameContainsNotValuesFun(): String { - val f: KFunction2, Values, Assert> = Assert::containsNot - return "${f.name} ${Values::class.simpleName}" -} diff --git a/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/featureAssertions.kt b/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/featureAssertions.kt deleted file mode 100644 index 082810603..000000000 --- a/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/featureAssertions.kt +++ /dev/null @@ -1,272 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") - -package ch.tutteli.atrium.api.cc.infix.en_UK - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.assertions.AssertionGroup -import ch.tutteli.atrium.assertions.FeatureAssertionGroupType -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.creating.AssertionPlantNullable -import ch.tutteli.atrium.domain.builders.AssertImpl -import kotlin.reflect.* - -/** - * Creates an [AssertionPlant] for the given [property] which eventually adds [AssertionGroup]s with a - * [FeatureAssertionGroupType], containing the assertions created for the given [property], to the current plant. - * - * @return An [AssertionPlant] for the given [property]. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.infix.en_GB.property(property)")) -fun Assert.property(property: KProperty0): AssertionPlant - = AssertImpl.feature.property(this, property) - -/** - * Creates an [AssertionPlant] for the given [property] which eventually adds [AssertionGroup]s with a - * [FeatureAssertionGroupType], containing the assertions created for the given [property], to the current plant -- - * starting with a group consisting of the [Assertion]s created by the [assertionCreator] lambda. - * - * @return An [AssertionPlant] for the given [property]. - * - * @throws AssertionError Might throw an [AssertionError] if an additionally created [Assertion] - * (by calling [assertionCreator]) does not hold. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.infix.en_GB.property(property, assertionCreator)")) -fun Assert.property(property: KProperty0, assertionCreator: AssertionPlant.() -> Unit): AssertionPlant - = AssertImpl.feature.property(this, property, assertionCreator) - - -/** - * Creates an [AssertionPlantNullable] for the given [property] which eventually adds [AssertionGroup]s with a - * [FeatureAssertionGroupType], containing the assertions created for the given [property], to the current plant. - * - * @return An [AssertionPlantNullable] for the given [property]. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.infix.en_GB.property(property)")) -fun Assert.property(property: KProperty0): AssertionPlantNullable - = AssertImpl.feature.property(this, property) - -/** - * Creates an [AssertionPlant], for the value returned by calling [method], which eventually adds [AssertionGroup]s - * with a [FeatureAssertionGroupType], containing the assertions created for the return value, to the current plant. - * - * @return An [AssertionPlant] for the return value of the given [method]. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.infix.en_GB.returnValueOf(method)")) -fun Assert.returnValueOf(method: KFunction0): AssertionPlant - = AssertImpl.feature.returnValueOf0(this, method) - -/** - * Creates an [AssertionPlant], for the value returned by calling [method], which eventually adds - * [AssertionGroup]s with a [FeatureAssertionGroupType], containing the assertions created for the return value, - * to the current plant -- starting with a group consisting of the [Assertion]s created by the - * [assertionCreator] lambda. - * - * @return An [AssertionPlant] for the return value of the given [method]. - * - * @throws AssertionError Might throw an [AssertionError] if an additionally created [Assertion] - * (by calling [assertionCreator]) does not hold. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.infix.en_GB.returnValueOf(method, assertionCreator)")) -fun Assert.returnValueOf(method: KFunction0, assertionCreator: AssertionPlant.() -> Unit): AssertionPlant - = AssertImpl.feature.returnValueOf0(this, method, assertionCreator) - -/** - * Creates an [AssertionPlantNullable], for the value returned by calling [method], which eventually adds - * [AssertionGroup]s with a [FeatureAssertionGroupType], containing the assertions created for the return value, - * to the current plant. - * - * @return An [AssertionPlantNullable] for the given [property]. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.infix.en_GB.returnValueOf(method)")) -fun Assert.returnValueOf(method: KFunction0): AssertionPlantNullable - = AssertImpl.feature.returnValueOf0(this, method) - -/** - * Creates an [AssertionPlant], for the value returned by calling [method] with [arg1], which eventually adds - * [AssertionGroup]s with a [FeatureAssertionGroupType], containing the assertions created for the return value, - * to the current plant. - * - * @return An [AssertionPlant] for the return value of the given [method]. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.infix.en_GB.returnValueOf(method, arg1)")) -fun Assert.returnValueOf(method: KFunction1, arg1: T1): AssertionPlant - = AssertImpl.feature.returnValueOf1(this, method, arg1) - -/** - * Creates an [AssertionPlant], for the value returned by calling [method] with [arg1], which eventually adds - * [AssertionGroup]s with a [FeatureAssertionGroupType], containing the assertions created for the return value, - * to the current plant -- starting with a group consisting of the [Assertion]s created by the - * [assertionCreator] lambda. - * - * @return An [AssertionPlant] for the return value of the given [method]. - * - * @throws AssertionError Might throw an [AssertionError] if an additionally created [Assertion] - * (by calling [assertionCreator]) does not hold. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.infix.en_GB.returnValueOf(method, arg1, assertionCreator)")) -fun Assert.returnValueOf(method: KFunction1, arg1: T1, assertionCreator: AssertionPlant.() -> Unit): AssertionPlant - = AssertImpl.feature.returnValueOf1(this, method, arg1, assertionCreator) - -/** - * Creates an [AssertionPlantNullable], for the value returned by calling [method] with [arg1], which eventually adds - * [AssertionGroup]s with a [FeatureAssertionGroupType], containing the assertions created for the return value, - * to the current plant. - * - * @return An [AssertionPlantNullable] for the given [property]. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.infix.en_GB.returnValueOf(method, arg1)")) -fun Assert.returnValueOf(method: KFunction1, arg1: T1): AssertionPlantNullable - = AssertImpl.feature.returnValueOf1(this, method, arg1) - -/** - * Creates an [AssertionPlant], for the value returned by calling [method] with [arg1] and [arg2], which eventually - * adds [AssertionGroup]s with a [FeatureAssertionGroupType], containing the assertions created for the return value, - * to the current plant. - * - * @return An [AssertionPlant] for the return value of the given [method]. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.infix.en_GB.returnValueOf(method, arg1, arg2)")) -fun Assert.returnValueOf(method: KFunction2, arg1: T1, arg2: T2): AssertionPlant - = AssertImpl.feature.returnValueOf2(this, method, arg1, arg2) - -/** - * Creates an [AssertionPlant], for the value returned by calling [method] with [arg1] and [arg2], which eventually - * adds [AssertionGroup]s with a [FeatureAssertionGroupType], containing the assertions created for the return value, - * to the current plant -- starting with a group consisting of the [Assertion]s created by the - * [assertionCreator] lambda. - * - * @return An [AssertionPlant] for the return value of the given [method]. - * - * @throws AssertionError Might throw an [AssertionError] if an additionally created [Assertion] - * (by calling [assertionCreator]) does not hold. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.infix.en_GB.returnValueOf(method, arg1, arg2, assertionCreator)")) -fun Assert.returnValueOf(method: KFunction2, arg1: T1, arg2: T2, assertionCreator: AssertionPlant.() -> Unit): AssertionPlant - = AssertImpl.feature.returnValueOf2(this, method, arg1, arg2, assertionCreator) - -/** - * Creates an [AssertionPlantNullable], for the value returned by calling [method] with [arg1] and [arg2], which - * eventually adds [AssertionGroup]s with a [FeatureAssertionGroupType], containing the assertions created for - * the return value, to the current plant. - * - * @return An [AssertionPlantNullable] for the given [property]. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.infix.en_GB.returnValueOf(method, arg1, arg2)")) -fun Assert.returnValueOf(method: KFunction2, arg1: T1, arg2: T2): AssertionPlantNullable - = AssertImpl.feature.returnValueOf2(this, method, arg1, arg2) - - -/** - * Creates an [AssertionPlant], for the value returned by calling [method] with [arg1], [arg2] and [arg3], - * which eventually adds [AssertionGroup]s with a [FeatureAssertionGroupType], containing the assertions created - * for the return value, to the current plant. - * - * @return An [AssertionPlant] for the return value of the given [method]. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.infix.en_GB.returnValueOf(method, arg1, arg2, arg3)")) -fun Assert.returnValueOf(method: KFunction3, arg1: T1, arg2: T2, arg3: T3): AssertionPlant - = AssertImpl.feature.returnValueOf3(this, method, arg1, arg2, arg3) - -/** - * Creates an [AssertionPlant], for the value returned by calling [method] with [arg1], [arg2] and [arg3], - * which eventually adds [AssertionGroup]s with a [FeatureAssertionGroupType], containing the assertions created - * for the return value, to the current plant -- starting with a group consisting of the [Assertion]s created by the - * [assertionCreator] lambda. - * - * @return An [AssertionPlant] for the return value of the given [method]. - * - * @throws AssertionError Might throw an [AssertionError] if an additionally created [Assertion] - * (by calling [assertionCreator]) does not hold. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.infix.en_GB.returnValueOf(method, arg1, arg2, arg3, assertionCreator)")) -fun Assert.returnValueOf(method: KFunction3, arg1: T1, arg2: T2, arg3: T3, assertionCreator: AssertionPlant.() -> Unit): AssertionPlant - = AssertImpl.feature.returnValueOf3(this, method, arg1, arg2, arg3, assertionCreator) - -/** - * Creates an [AssertionPlantNullable], for the value returned by calling [method] with [arg1], [arg2] and [arg3], - * which eventually adds [AssertionGroup]s with a [FeatureAssertionGroupType], containing the assertions created for - * the return value, to the current plant. - * - * @return An [AssertionPlantNullable] for the given [property]. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.infix.en_GB.returnValueOf(method, arg1, arg2, arg3)")) -fun Assert.returnValueOf(method: KFunction3, arg1: T1, arg2: T2, arg3: T3): AssertionPlantNullable - = AssertImpl.feature.returnValueOf3(this, method, arg1, arg2, arg3) - -/** - * Creates an [AssertionPlant], for the value returned by calling [method] with [arg1], [arg2], [arg3] and [arg4], - * which eventually adds [AssertionGroup]s with a [FeatureAssertionGroupType], containing the assertions created - * for the return value, to the current plant. - * - * @return An [AssertionPlant] for the return value of the given [method]. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.infix.en_GB.returnValueOf(method, arg1, arg2, arg3, arg4)")) -fun Assert.returnValueOf(method: KFunction4, arg1: T1, arg2: T2, arg3: T3, arg4: T4): AssertionPlant - = AssertImpl.feature.returnValueOf4(this, method, arg1, arg2, arg3, arg4) - -/** - * Creates an [AssertionPlant], for the value returned by calling [method] with [arg1], [arg2], [arg3] and [arg4], - * which eventually adds [AssertionGroup]s with a [FeatureAssertionGroupType], containing the assertions created - * for the return value, to the current plant -- starting with a group consisting of the [Assertion]s created by the - * [assertionCreator] lambda. - * - * @return An [AssertionPlant] for the return value of the given [method]. - * - * @throws AssertionError Might throw an [AssertionError] if an additionally created [Assertion] - * (by calling [assertionCreator]) does not hold. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.infix.en_GB.returnValueOf(method, arg1, arg2, arg3, arg4, assertionCreator)")) -fun Assert.returnValueOf(method: KFunction4, arg1: T1, arg2: T2, arg3: T3, arg4: T4, assertionCreator: AssertionPlant.() -> Unit): AssertionPlant - = AssertImpl.feature.returnValueOf4(this, method, arg1, arg2, arg3, arg4, assertionCreator) - -/** - * Creates an [AssertionPlantNullable], for the value returned by calling [method] with [arg1], [arg2], [arg3] - * and [arg4], which eventually adds [AssertionGroup]s with a [FeatureAssertionGroupType], containing the assertions - * created for the return value, to the current plant. - * - * @return An [AssertionPlantNullable] for the given [property]. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.infix.en_GB.returnValueOf(method, arg1, arg2, arg3, arg4)")) -fun Assert.returnValueOf(method: KFunction4, arg1: T1, arg2: T2, arg3: T3, arg4: T4): AssertionPlantNullable - = AssertImpl.feature.returnValueOf4(this, method, arg1, arg2, arg3, arg4) - -/** - * Creates an [AssertionPlant], for the value returned by calling [method] with [arg1], [arg2], [arg3], [arg4] - * and [arg5], which eventually adds [AssertionGroup]s with a [FeatureAssertionGroupType], containing the assertions - * created for the return value, to the current plant. - * - * @return An [AssertionPlant] for the return value of the given [method]. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.infix.en_GB.returnValueOf(method, arg1, arg2, arg3, arg4, arg5)")) -fun Assert.returnValueOf(method: KFunction5, arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5): AssertionPlant - = AssertImpl.feature.returnValueOf5(this, method, arg1, arg2, arg3, arg4, arg5) - -/** - * Creates an [AssertionPlant], for the value returned by calling [method] with [arg1], [arg2], [arg3], [arg4] - * and [arg5], which eventually adds [AssertionGroup]s with a [FeatureAssertionGroupType], containing the assertions - * created for the return value, to the current plant -- starting with a group consisting of the [Assertion]s created - * by the [assertionCreator] lambda. - * - * @return An [AssertionPlant] for the return value of the given [method]. - * - * @throws AssertionError Might throw an [AssertionError] if an additionally created [Assertion] - * (by calling [assertionCreator]) does not hold. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.infix.en_GB.returnValueOf(method, arg1, arg2, arg3, arg4, arg5, assertionCreator)")) -fun Assert.returnValueOf(method: KFunction5, arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, assertionCreator: AssertionPlant.() -> Unit): AssertionPlant - = AssertImpl.feature.returnValueOf5(this, method, arg1, arg2, arg3, arg4, arg5, assertionCreator) - -/** - * Creates an [AssertionPlantNullable], for the value returned by calling [method] with [arg1], [arg2], [arg3], - * [arg4] and [arg5], which eventually adds [AssertionGroup]s with a [FeatureAssertionGroupType], containing the - * assertions created for the return value, to the current plant. - * - * @return An [AssertionPlantNullable] for the given [property]. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.infix.en_GB.returnValueOf(method, arg1, arg2, arg3, arg4, arg5)")) -fun Assert.returnValueOf(method: KFunction5, arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5): AssertionPlantNullable - = AssertImpl.feature.returnValueOf5(this, method, arg1, arg2, arg3, arg4, arg5) - - diff --git a/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/helperKeywords.kt b/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/helperKeywords.kt deleted file mode 100644 index 46309c1ee..000000000 --- a/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/helperKeywords.kt +++ /dev/null @@ -1,34 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") - -package ch.tutteli.atrium.api.cc.infix.en_UK - -/** - * `Deprecated`, use `Empty` from module en_GB, package keywords; will be removed with 1.0.0. - */ -@Deprecated("Use `Empty` from module en_GB, package keywords; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.infix.en_GB.keywords.Empty")) -object Empty - -/** - * `Deprecated`, use `contain` from module en_GB, package keywords; will be removed with 1.0.0. - */ -@Deprecated("Use `contain` from module en_GB, package keywords; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.infix.en_GB.keywords.contain")) -object contain - -/** - * `Deprecated`, use `case` from module en_GB, package keywords; will be removed with 1.0.0. - */ -@Deprecated("Use `case` from module en_GB, package keywords; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.infix.en_GB.keywords.case")) -object case - -/** - * `Deprecated`, use `only` from module en_GB, package keywords; will be removed with 1.0.0. - */ -@Deprecated("Use `only` from module en_GB, package keywords; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.infix.en_GB.keywords.only")) -object only - -/** - * `Deprecated`, use `order` from module en_GB, package keywords; will be removed with 1.0.0. - */ -@Deprecated("Use `order` from module en_GB, package keywords; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.infix.en_GB.keywords.order")) -object order diff --git a/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/iterableAssertions.kt b/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/iterableAssertions.kt deleted file mode 100644 index cf678bd4e..000000000 --- a/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/iterableAssertions.kt +++ /dev/null @@ -1,303 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") -package ch.tutteli.atrium.api.cc.infix.en_UK - -import ch.tutteli.atrium.api.cc.infix.en_UK.creating.iterable.contains.builders.NotCheckerOption -import ch.tutteli.atrium.api.cc.infix.en_UK.creating.iterable.contains.builders.NotCheckerOptionImpl -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.domain.builders.AssertImpl -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InAnyOrderSearchBehaviour -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.NoOpSearchBehaviour -import ch.tutteli.atrium.api.cc.infix.en_UK.assertions.iterable.contains.builders.IterableContainsNotCheckerBuilder as DeprecatedNotCheckerBuilder -import ch.tutteli.atrium.assertions.iterable.contains.builders.IterableContainsBuilder as DeprecatedBuilder - -/** - * Creates an [IterableContains.Builder] based on this [AssertionPlant] which allows to define - * more sophisticated `contains` assertions. - * - * @return The newly created builder. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.infix.en_GB.to(contain)")) -infix fun > Assert.to(@Suppress("UNUSED_PARAMETER") contain: contain): IterableContains.Builder - = AssertImpl.iterable.containsBuilder(this) - -@Deprecated("Use the extension function `to`; will be removed with 1.0.0", ReplaceWith("plant to contain")) -fun > to(plant: Assert, @Suppress("UNUSED_PARAMETER") contain: contain): DeprecatedBuilder - = DeprecatedBuilder(plant, (plant to contain).searchBehaviour) - - -/** - * Creates an [IterableContains.Builder] based on this [AssertionPlant] which allows to define - * more sophisticated `contains not` assertions. - * - * @return The newly created builder. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.infix.en_GB.notTo(contain)")) -infix fun > Assert.notTo(@Suppress("UNUSED_PARAMETER") contain: contain): NotCheckerOption - = NotCheckerOptionImpl(AssertImpl.iterable.containsNotBuilder(this)) - -@Deprecated("Use the extension function `notTo`; will be removed with 1.0.0", ReplaceWith("plant notTo contain")) -fun > notTo(plant: Assert, @Suppress("UNUSED_PARAMETER") contain: contain): DeprecatedNotCheckerBuilder - = DeprecatedNotCheckerBuilder(AssertImpl.iterable.containsNotBuilder(plant)) - - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] contains the [expected] value. - * - * It is a shortcut for `to contain inAny order atLeast 1 value expected` - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use `contains NullableValue` from package en_GB or `contains` from package en_GB in case you do not deal with nullable elements; will be removed with 1.0.0", ReplaceWith("this contains NullableValue(expected)", "ch.tutteli.atrium.api.cc.infix.en_GB.contains", "ch.tutteli.atrium.api.cc.infix.en_GB.NullableValue")) -infix fun > Assert.contains(expected: E) - = this to contain inAny order atLeast 1 value expected - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] contains the expected [values]. - * - * It is a shortcut for `to contain inAny order atLeast 1 the Values(...)` - * - * Notice, that it does not search for unique matches. Meaning, if the iterable is `setOf('a', 'b')` and - * [Values.expected] is defined as `'a'` and one [Values.otherExpected] is defined as `'a'` as well, then both match, - * even though they match the same entry. Use an option such as [atLeast], [atMost] and [exactly] to control the - * number of occurrences you expect. - * - * Meaning you might want to use: - * `to contain inAny order exactly 2 value('a')` - * instead of: - * `contains Values('a', 'a')` - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use `contains NullableValues` from package en_GB or `contains Values` from package en_GB in case you do not deal with nullable elements; will be removed with 1.0.0", ReplaceWith("this contains NullableValues(values.expected, *values.otherExpected)", "ch.tutteli.atrium.api.cc.infix.en_GB.contains", "ch.tutteli.atrium.api.cc.infix.en_GB.NullableValues")) -infix fun > Assert.contains(values: Values): AssertionPlant - = this to contain inAny order atLeast 1 the values - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] contains the expected [objects]. - * - * It is a shortcut for `to contain inAny order atLeast 1 the Objects(...)` - * - * Notice, that it does not search for unique matches. Meaning, if the iterable is `setOf('a', 'b')` and [Objects.expected] is - * defined as `'a'` and one [Objects.otherExpected] is defined as `'a'` as well, then both match, even though they match the - * same entry. Use an option such as [atLeast], [atMost] and [exactly] to control the number of occurrences you expect. - * - * Meaning you might want to use: - * `to contain inAny order exactly 2 value('a')` - * instead of: - * `contains Objects('a', 'a')` - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Will be removed with 1.0.0 because it is redundant in terms of `contains Values(expected, otherExpected)` without adding enough to be a legit alternative.", ReplaceWith("this contains Values(objects)")) -infix fun > Assert.contains(objects: Objects): AssertionPlant - = this to contain inAny order atLeast 1 the objects - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] contains an entry holding the assertions created by the - * [assertionCreator] where it does not matter in which order the entries appear. - * - * It is a shortcut for `to contain inAny order atLeast 1 entry { ... }` - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.infix.en_GB.contains(assertionCreator)")) -infix fun > Assert.contains(assertionCreator: Assert.() -> Unit): AssertionPlant - = this to contain inAny order atLeast 1 entry assertionCreator - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] contains an entry holding the assertions created by the - * [Entries.assertionCreator] and an additional entry for each [Entries.otherAssertionCreators] (if given) where it - * does not matter in which order the entries appear. - * - * It is a shortcut for `to contain inAny order atLeast 1 the Entries(...)` - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.infix.en_GB.contains(entries)")) -infix fun > Assert.contains(entries: Entries.() -> Unit>): AssertionPlant - = this to contain inAny order atLeast 1 the entries - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] contains an entry holding the assertions created by the - * [assertionCreator] where it does not matter in which order the entries appear. - * - * It is a shortcut for `to contain inAny order atLeast 1 entry { ... }` - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use `contains NullableEntry` from package en_GB; will be removed with 1.0.0", ReplaceWith("this contains NullableEntry(expected)", "ch.tutteli.atrium.api.cc.infix.en_GB.contains", "ch.tutteli.atrium.api.cc.infix.en_GB.NullableEntry")) -@JvmName("containsDeprecated") -infix fun > Assert.contains(assertionCreator: (Assert.() -> Unit)?): AssertionPlant - = this to contain inAny order atLeast 1 entry assertionCreator - -@Deprecated("Use the extension fun `contains` instead; will be removed 1.0.0", ReplaceWith("plant contains assertionCreator")) -fun > containsNullable(plant: Assert, assertionCreator: (Assert.() -> Unit)?): AssertionPlant - = plant contains assertionCreator - - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] contains an entry holding the assertions created by the - * [Entries.assertionCreator] and an additional entry for each [Entries.otherAssertionCreators] (if given) where it - * does not matter in which order the entries appear. - * - * It is a shortcut for `to contain inAny order atLeast 1 the Entries(...)` - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use `contains NullableEntries` from package en_GB; will be removed with 1.0.0", ReplaceWith("this contains NullableEntries(entries.assertionCreator, *entries.otherAssertionCreators)", "ch.tutteli.atrium.api.cc.infix.en_GB.contains", "ch.tutteli.atrium.api.cc.infix.en_GB.NullableEntries")) -@JvmName("containsDeprecated") -infix fun > Assert.contains(entries: Entries.() -> Unit)?>): AssertionPlant - = this to contain inAny order atLeast 1 the entries - -@Deprecated("Use the extension fun `contains` instead; will be removed 1.0.0", ReplaceWith("plant contains entries")) -fun > containsNullable(plant: Assert, entries: Entries.() -> Unit)?>): AssertionPlant - = plant contains entries - - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] contains only the [expected] value. - * - * It is a shortcut for `to contain inGiven order but only value expected` - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use `containsStrictly NullableValue` from package en_GB or `containsStrictly` from package en_GB in case you do not deal with nullable elements; will be removed with 1.0.0", ReplaceWith("this contains NullableValue(expected)", "ch.tutteli.atrium.api.cc.infix.en_GB.containsStrictly", "ch.tutteli.atrium.api.cc.infix.en_GB.NullableValue")) -infix fun > Assert.containsStrictly(expected: E): AssertionPlant - = this to contain inGiven order but only value expected - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] contains only the expected [values] in the defined order. - * - * It is a shortcut for `to contain inGiven order but only the Values(...)` - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use `containsStrictly NullableValues` from package en_GB or `containsStrictly` from package en_GB in case you do not deal with nullable elements; will be removed with 1.0.0", ReplaceWith("this contains NullableValues(value.expected, *value.otherExpected)", "ch.tutteli.atrium.api.cc.infix.en_GB.containsStrictly", "ch.tutteli.atrium.api.cc.infix.en_GB.NullableValues")) -infix fun > Assert.containsStrictly(values: Values): AssertionPlant - = this to contain inGiven order but only the values - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] contains only the expected [objects] in the defined order. - * - * It is a shortcut for `to contain inGiven order but only the Objects(...)` - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Will be removed with 1.0.0 because it is redundant in terms of `containsStrictly Values(expected, otherExpected)` without adding enough to be a legit alternative.", ReplaceWith("this containsStrictly Values(objects)")) -infix fun > Assert.containsStrictly(objects: Objects): AssertionPlant - = this to contain inGiven order but only the objects - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] contains only one entry which is holding the assertions created - * by the [assertionCreator]. - * - * It is a shortcut for `to contain inAny order atLeast 1 entry { ... }` - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.infix.en_GB.containsStrictly(assertionCreator)")) -infix fun > Assert.containsStrictly(assertionCreator: Assert.() -> Unit): AssertionPlant - = this to contain inGiven order but only entry assertionCreator - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] contains only an entry holding the assertions created by the - * [Entries.assertionCreator] and an additional entry for each [Entries.otherAssertionCreators] (if given) in the defined order - * holding the assertions created by them. - * - * It is a shortcut for `to contain inGiven order but only the Entries(...)` - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.infix.en_GB.containsStrictly(entries)")) -infix fun > Assert.containsStrictly(entries: Entries.() -> Unit>): AssertionPlant - = this to contain inGiven order but only the entries - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] contains only one entry which is holding the assertions created - * by the [assertionCreator]. - * - * It is a shortcut for `to contain inAny order atLeast 1 entry { ... }` - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use `contains NullableEntry` from package en_GB; will be removed with 1.0.0", ReplaceWith("this contains NullableEntry(expected)", "ch.tutteli.atrium.api.cc.infix.en_GB.contains", "ch.tutteli.atrium.api.cc.infix.en_GB.NullableEntry")) -@JvmName("containsStrictly?") -infix fun > Assert.containsStrictly(assertionCreator: (Assert.() -> Unit)?): AssertionPlant - = this to contain inGiven order but only entry assertionCreator - -@Deprecated("Use the extension fun `containsStrictly` instead; will be removed 1.0.0", ReplaceWith("plant containsStrictly assertionCreator")) -fun > containsStrictlyNullable(plant: Assert, assertionCreator: (Assert.() -> Unit)?): AssertionPlant - = plant containsStrictly assertionCreator - - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] contains only an entry holding the assertions created by the - * [Entries.assertionCreator] and an additional entry for each [Entries.otherAssertionCreators] (if given) in the defined order - * holding the assertions created by them. - * - * It is a shortcut for `to contain inGiven order but only the Entries(...)` - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use `containsStrictly NullableEntries` from package en_GB; will be removed with 1.0.0", ReplaceWith("this containsStrictly NullableEntries(entries.assertionCreator, *entries.otherAssertionCreators)", "ch.tutteli.atrium.api.cc.infix.en_GB.containsStrictly", "ch.tutteli.atrium.api.cc.infix.en_GB.NullableEntries")) -@JvmName("containsStrictly?") -infix fun > Assert.containsStrictly(entries: Entries.() -> Unit)?>): AssertionPlant - = this to contain inGiven order but only the entries - -@Deprecated("Use the extension fun `containsStrictly` instead; will be removed 1.0.0", ReplaceWith("plant containsStrictly entries")) -fun > containsStrictlyNullable(plant: Assert, entries: Entries.() -> Unit)?>): AssertionPlant - = plant containsStrictly entries - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] does not contain the [expected] value. - * - * Delegates to `containsNot Values(expected)`. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.infix.en_GB.containsNot(expected)")) -infix fun > Assert.containsNot(expected: E): AssertionPlant - = this containsNot Values(expected) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] does not contain the expected [values]. - * - * It is a shortcut for `notTo contain the Values(...)` - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use `notTo contain the NullableValues` from package en_GB or `containsNot` from package en_GB in case you do not deal with nullable elements; will be removed with 1.0.0", ReplaceWith("notTo contain the NullableValues(values.expected, *values.otherExpected)", "ch.tutteli.atrium.api.cc.infix.en_GB.notTo", "ch.tutteli.atrium.api.cc.infix.en_GB.keywords.contain", "ch.tutteli.atrium.api.cc.infix.en_GB.the", "ch.tutteli.atrium.api.cc.infix.en_GB.NullableValues")) -infix fun > Assert.containsNot(values: Values): AssertionPlant - = this notTo contain the values - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] does not contain the expected [objects]. - * - * It is a shortcut for `notTo contain the Objects(...)` - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Will be removed with 1.0.0 because it is redundant in terms of `containsNot Values(expected, otherExpected)` without adding enough to be a legit alternative.", ReplaceWith("this containsNot Values(objects)")) -infix fun > Assert.containsNot(objects: Objects) - = this containsNot Values(objects) diff --git a/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/iterableContainsCheckers.kt b/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/iterableContainsCheckers.kt deleted file mode 100644 index 4e93ba8bf..000000000 --- a/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/iterableContainsCheckers.kt +++ /dev/null @@ -1,122 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") -package ch.tutteli.atrium.api.cc.infix.en_UK - -import ch.tutteli.atrium.api.cc.infix.en_UK.creating.iterable.contains.builders.* -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InAnyOrderSearchBehaviour - -import ch.tutteli.atrium.api.cc.infix.en_UK.assertions.iterable.contains.builders.IterableContainsAtLeastCheckerBuilder as DeprecatedAtLeastCheckerBuilder -import ch.tutteli.atrium.api.cc.infix.en_UK.assertions.iterable.contains.builders.IterableContainsAtMostCheckerBuilder as DeprecatedAtMostCheckerBuilder -import ch.tutteli.atrium.api.cc.infix.en_UK.assertions.iterable.contains.builders.IterableContainsButAtMostCheckerBuilder as DeprecatedButAtMostCheckerBuilder -import ch.tutteli.atrium.api.cc.infix.en_UK.assertions.iterable.contains.builders.IterableContainsExactlyCheckerBuilder as DeprecatedExactlyCheckerBuilder -import ch.tutteli.atrium.api.cc.infix.en_UK.assertions.iterable.contains.builders.IterableContainsNotOrAtMostCheckerBuilder as DeprecatedNotOrAtMostCheckerBuilder -import ch.tutteli.atrium.assertions.iterable.contains.builders.IterableContainsBuilder as DeprecatedBuilder - -/** - * Restricts a `contains` assertion by specifying that the number of occurrences of the entry which we are looking - * for, occurs `at least` number of [times] within the [Iterable]. - * - * @param times The number which the check will compare against the actual number of times an expected entry is - * found in the [Iterable]. - * - * @return The newly created builder. - * @throws IllegalArgumentException In case [times] is smaller than zero. - * @throws IllegalArgumentException In case [times] equals to zero; use [containsNot] instead. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.infix.en_GB.atLeast(times)")) -infix fun , S: InAnyOrderSearchBehaviour> IterableContains.Builder.atLeast(times: Int): AtLeastCheckerOption - = AtLeastCheckerOptionImpl(times, this) - -@Deprecated("Use the extension fun `atLeast` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", ReplaceWith("builder atLeast times")) -fun > atLeast(builder: DeprecatedBuilder, times: Int): DeprecatedAtLeastCheckerBuilder - = DeprecatedAtLeastCheckerBuilder(times, builder) - - -/** - * Restricts a `contains at least` assertion by specifying that the number of occurrences of the entry which we - * are looking for, occurs `at most` number of [times] within the [Iterable]. - * - * The resulting restriction will be a `contains at least but at most` assertion. - * - * @param times The number which the check will compare against the actual number of times an expected entry is - * found in the [Iterable]. - * - * @return The newly created builder. - * @throws IllegalArgumentException In case [times] is smaller than zero. - * @throws IllegalArgumentException In case [times] equals to zero; use [containsNot] instead. - * @throws IllegalArgumentException In case [times] of this `at most` restriction equals to the number of the - * `at least` restriction; use the [exactly] restriction instead. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.infix.en_GB.butAtMost(times)")) -infix fun , S: InAnyOrderSearchBehaviour> AtLeastCheckerOption.butAtMost(times: Int): ButAtMostCheckerOption - = ButAtMostCheckerOptionImpl(times, this, containsBuilder) - -@Deprecated("Use the extension fun `butAtMost` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", ReplaceWith("checkerBuilder butAtMost times")) -fun > butAtMost(checkerBuilder: DeprecatedAtLeastCheckerBuilder, times: Int): DeprecatedButAtMostCheckerBuilder - = DeprecatedButAtMostCheckerBuilder(times, checkerBuilder, checkerBuilder.containsBuilder) - - -/** - * Restricts a `contains` assertion by specifying that the number of occurrences of the entry which we - * are looking for, occurs `exactly` number of [times] within the [Iterable]. - * - * @param times The number which the check will compare against the actual number of times an expected entry is - * found in the [Iterable]. - * - * @return The newly created builder. - * @throws IllegalArgumentException In case [times] is smaller than zero. - * @throws IllegalArgumentException In case [times] equals to zero; use [containsNot] instead. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.infix.en_GB.exactly(times)")) -infix fun , S: InAnyOrderSearchBehaviour> IterableContains.Builder.exactly(times: Int): ExactlyCheckerOption - = ExactlyCheckerOptionImpl(times, this) - -@Deprecated("Use the extension fun `exactly` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", ReplaceWith("builder exactly times")) -fun > exactly(builder: DeprecatedBuilder, times: Int): DeprecatedExactlyCheckerBuilder - = DeprecatedExactlyCheckerBuilder(times, builder) - - -/** - * Restricts a `contains` assertion by specifying that the number of occurrences of the entry which we - * are looking for, occurs `at least` once but `at most` number of [times] within the [Iterable]. - * - * If you want to use a higher lower bound than one, then use `atLeast(2).butAtMost(3)` instead of `atMost(3)`. - * And in case you want to state that it is either not contained at all or at most a certain number of times, - * then use `notOrAtMost(2)` instead. - * - * @param times The number which the check will compare against the actual number of times an expected entry is - * found in the [Iterable]. - * - * @return The newly created builder. - * @throws IllegalArgumentException In case [times] is smaller than zero. - * @throws IllegalArgumentException In case [times] equals to zero; use [containsNot] instead. - * @throws IllegalArgumentException In case [times] equals to one; use [exactly] instead. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.infix.en_GB.atMost(times)")) -infix fun , S: InAnyOrderSearchBehaviour> IterableContains.Builder.atMost(times: Int): AtMostCheckerOption - = AtMostCheckerOptionImpl(times, this) - -@Deprecated("Use the extension fun `atMost` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", ReplaceWith("builder atMost times")) -fun > atMost(builder: DeprecatedBuilder, times: Int): DeprecatedAtMostCheckerBuilder - = DeprecatedAtMostCheckerBuilder(times, builder) - - -/** - * Restricts a `contains` assertion by specifying that the number of occurrences of the entry which we - * are looking for, occurs `not at all or at most` number of [times] within the [Iterable]. - * - * @param times The number which the check will compare against the actual number of times an expected entry is - * found in the [Iterable]. - * - * @return The newly created builder. - * @throws IllegalArgumentException In case [times] is smaller than zero. - * @throws IllegalArgumentException In case [times] equals to zero; use [containsNot] instead. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.infix.en_GB.notOrAtMost(times)")) -infix fun , S: InAnyOrderSearchBehaviour> IterableContains.Builder.notOrAtMost(times: Int): NotOrAtMostCheckerOption - = NotOrAtMostCheckerOptionImpl(times, this) - -@Deprecated("Use the extension fun `notOrAtMost` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", ReplaceWith("builder notOrAtMost times")) -fun > notOrAtMost(builder: DeprecatedBuilder, times: Int): DeprecatedNotOrAtMostCheckerBuilder - = DeprecatedNotOrAtMostCheckerBuilder(times, builder) diff --git a/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/iterableContainsDecorators.kt b/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/iterableContainsDecorators.kt deleted file mode 100644 index b8e9e4a5d..000000000 --- a/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/iterableContainsDecorators.kt +++ /dev/null @@ -1,72 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") -package ch.tutteli.atrium.api.cc.infix.en_UK - -import ch.tutteli.atrium.assertions.iterable.contains.builders.IterableContainsBuilder -import ch.tutteli.atrium.domain.builders.AssertImpl -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.* - -/** - * Defines that the search behaviour "find entries `in any order` in the [Iterable]" shall be applied to this - * sophisticated `contains` in [Iterable] assertion. - * - * @param order Has to be `order`. - * - * @return The newly created builder. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith(" ch.tutteli.atrium.api.cc.infix.en_GB.inAny(order)")) -infix fun > IterableContains.Builder.inAny(@Suppress("UNUSED_PARAMETER") order: order) - = AssertImpl.iterable.contains.searchBehaviours.inAnyOrder(this) - -@Deprecated("Use the extension fun `inAny` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", ReplaceWith("builder inAny order")) -fun > inAny(builder: IterableContainsBuilder, @Suppress("UNUSED_PARAMETER") order: order): IterableContainsBuilder - = IterableContainsBuilder(builder.subjectProvider, (builder inAny order).searchBehaviour) - - -/** - * Defines that the constraint "`only` the specified entries exist in the [Iterable]" shall be applied to this - * sophisticated `contains` [Iterable] assertion. - * - * @return The newly created builder. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith(" ch.tutteli.atrium.api.cc.infix.en_GB.but(only)")) -infix fun > IterableContains.Builder.but(@Suppress("UNUSED_PARAMETER") only: only) - = AssertImpl.iterable.contains.searchBehaviours.inAnyOrderOnly(this) - -@Deprecated("Use the extension fun `but` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", ReplaceWith("builder but only")) -fun > inAnyOrderOnly(builder: IterableContainsBuilder, @Suppress("UNUSED_PARAMETER") only: only): IterableContainsBuilder - = IterableContainsBuilder(builder.subjectProvider, (builder but only).searchBehaviour) - - -/** - * Defines that the search behaviour "find entries `in order` in the [Iterable]" shall be applied to this - * sophisticated `contains` in [Iterable] assertion. - * - * @param order Has to be `order`. - * - * @return The newly created builder. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith(" ch.tutteli.atrium.api.cc.infix.en_GB.inGiven(order)")) -infix fun > IterableContains.Builder.inGiven(@Suppress("UNUSED_PARAMETER") order: order) - = AssertImpl.iterable.contains.searchBehaviours.inOrder(this) - -@Deprecated("Use the extension fun `inGiven` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", ReplaceWith("builder inGiven order")) -fun > inGiven(builder: IterableContainsBuilder, @Suppress("UNUSED_PARAMETER") order: order): IterableContainsBuilder - = IterableContainsBuilder(builder.subjectProvider, (builder inGiven order).searchBehaviour) - - -/** - * Defines that the constraint "`only` the specified entries exist in the [Iterable]" shall be applied to this - * sophisticated `contains in order` [Iterable] assertion. - * - * @return The newly created builder. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith(" ch.tutteli.atrium.api.cc.infix.en_GB.and(only)")) -@JvmName("yet") -infix fun > IterableContains.Builder.but(@Suppress("UNUSED_PARAMETER") only: only) - = AssertImpl.iterable.contains.searchBehaviours.inOrderOnly(this) - -@Deprecated("Use the extension fun `but` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", ReplaceWith("builder but only")) -fun > inOrderOnly(builder: IterableContainsBuilder, @Suppress("UNUSED_PARAMETER") only: only): IterableContainsBuilder - = IterableContainsBuilder(builder.subjectProvider, (builder but only).searchBehaviour) diff --git a/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/iterableContainsInAnyOrderCreators.kt b/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/iterableContainsInAnyOrderCreators.kt deleted file mode 100644 index 4a72f4c47..000000000 --- a/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/iterableContainsInAnyOrderCreators.kt +++ /dev/null @@ -1,171 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") -package ch.tutteli.atrium.api.cc.infix.en_UK - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.assertions.iterable.contains.builders.IterableContainsCheckerBuilder -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.domain.builders.AssertImpl -import ch.tutteli.atrium.domain.builders.creating.basic.contains.addAssertionForAssert -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InAnyOrderSearchBehaviour - -/** - * Finishes the specification of the sophisticated `contains` assertion where the [expected] value shall be searched - * within the [Iterable]. - * - * Delegates to `the Values(expected)`. - * - * @param expected The value which is expected to be contained within the [Iterable]. - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.infix.en_GB.value(expected)")) -infix fun > IterableContains.CheckerOption.value(expected: E): AssertionPlant - = this the Values(expected) - -@Deprecated("Use the extension fun `value` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", ReplaceWith("checkerBuilder value expected")) -fun > value(checkerBuilder: IterableContainsCheckerBuilder, expected: E): AssertionPlant - = the(checkerBuilder, Values(expected)) - - -/** - * Finishes the specification of the sophisticated `contains` assertion where the expected [values] - * shall be searched within the [Iterable]. - * - * Notice, that it does not search for unique matches. Meaning, if the iterable is `setOf('a', 'b')` and - * [Values.expected] is defined as `'a'` and one [Values.otherExpected] is defined as `'a'` as well, then both match, - * even though they match the same entry. Use an option such as [atLeast], [atMost] and [exactly] to control the - * number of occurrences you expect. - * - * Meaning you might want to use: - * `to contain inAny order exactly 2 value 'a'` - * instead of: - * `to contain inAny order exactly 1 the Values('a', 'a')` - * - * @param values The values which are expected to be contained within the [Iterable]. - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.infix.en_GB.the(values)")) -infix fun > IterableContains.CheckerOption.the(values: Values): AssertionPlant - = addAssertion(AssertImpl.iterable.contains.valuesInAnyOrder(this, values.toList())) - -@Deprecated("Use the extension fun `the` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", ReplaceWith("checkerBuilder the values")) -fun > the(checkerBuilder: IterableContainsCheckerBuilder, values: Values): AssertionPlant - = checkerBuilder the values - - -@Deprecated("Will be removed with 1.0.0 because it is redundant in terms of `value expected` without adding enough to be a legit alternative.", ReplaceWith("this value expected")) -infix fun > IterableContains.CheckerOption.`object`(expected: E): AssertionPlant - = this the Values(expected) - -@Deprecated("Use the extension fun `value` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", ReplaceWith("checkerBuilder value expected")) -fun > `object`(checkerBuilder: IterableContainsCheckerBuilder, expected: E): AssertionPlant - = the(checkerBuilder, Values(expected)) - -@Deprecated("Will be removed with 1.0.0 because it is redundant in terms of `the Values(expected, otherExpected)` without adding enough to be a legit alternative.", ReplaceWith("this the Values(objects)")) -infix fun > IterableContains.CheckerOption.the(objects: Objects): AssertionPlant - = this the Values(objects) - -@Deprecated("Use the extension fun `the` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", ReplaceWith("checkerBuilder the objects")) -fun > the(checkerBuilder: IterableContainsCheckerBuilder, objects: Objects): AssertionPlant - = checkerBuilder the Values(objects) - - -/** - * Finishes the specification of the sophisticated `contains` assertion where an entry shall be searched which holds - * all assertions [assertionCreator] might create. - * - * Delegates to `the Entries(assertionCreator)`. - * - * @param assertionCreator The identification lambda which creates the assertions which the entry we are looking for - * has to hold; or in other words, the function which defines whether an entry is the one we are looking for - * or not. - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.infix.en_GB.entry(assertionCreator)")) -infix fun > IterableContains.CheckerOption.entry(assertionCreator: Assert.() -> Unit): AssertionPlant - = this the Entries(assertionCreator) - -@Deprecated("Use the extension fun `entry` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", ReplaceWith("checkerBuilder entry assertionCreator")) -fun > entry(checkerBuilder: IterableContainsCheckerBuilder, assertionCreator: Assert.() -> Unit): AssertionPlant - = the(checkerBuilder, Entries(assertionCreator)) - - -/** - * Finishes the specification of the sophisticated `contains` assertion where an entry shall be searched which holds - * all assertions [Entries.assertionCreator] might create and search for entries which hold (one by one) the assertions - * created by the [Entries.otherAssertionCreators]. - * - * @param entries The parameter object which contains the identification lambdas. - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.infix.en_GB.the(entries)")) -infix fun > IterableContains.CheckerOption.the(entries: Entries.() -> Unit>): AssertionPlant - = addAssertion(AssertImpl.iterable.contains.entriesInAnyOrderWithAssert(this, entries.toList())) - -@Deprecated("Use the extension fun `the` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", ReplaceWith("checkerBuilder the entries")) -fun > the(checkerBuilder: IterableContainsCheckerBuilder, entries: Entries.() -> Unit>): AssertionPlant - = checkerBuilder the entries - - -/** - * Finishes the specification of the sophisticated `contains` assertion where an entry shall be searched which either - * holds all assertions [assertionCreator] might create or is `null` in case [assertionCreator] is null as well. - * - * Delegates to `entries(expected)`. - * - * @param assertionCreator The identification lambda which creates the assertions which the entry we are looking for - * has to hold; or in other words, the function which defines whether an entry is the one we are looking for - * or not. - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.infix.en_GB.entry(assertionCreator)")) -@JvmName("entry?") -infix fun > IterableContains.CheckerOption.entry(assertionCreator: (Assert.() -> Unit)?): AssertionPlant - = this the Entries(assertionCreator) - -@Deprecated("Use the extension fun `entry` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", ReplaceWith("checkerBuilder entry assertionCreator")) -fun > nullableEntry(checkerBuilder: IterableContainsCheckerBuilder, assertionCreator: (Assert.() -> Unit)?): AssertionPlant - = nullableEntries(checkerBuilder, Entries(assertionCreator)) - - -/** - * Finishes the specification of the sophisticated `contains` assertion where an entry shall be searched which either - * holds all assertions [Entries.assertionCreator] might create or is `null` in case [Entries.assertionCreator] is null as well -- - * likewise an entry (can be the same) is searched for each of the [Entries.otherAssertionCreators]. - * - * @param entries The parameter object which contains the identification lambdas. - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.infix.en_GB.the(entries)")) -@JvmName("entries?") -infix fun > IterableContains.CheckerOption.the(entries: Entries.() -> Unit)?>): AssertionPlant - = addAssertion(AssertImpl.iterable.contains.entriesInAnyOrderWithAssert(this, entries.toList())) - -@Deprecated("Use the extension fun `the` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", ReplaceWith("checkerBuilder the entries")) -fun > nullableEntries(checkerBuilder: IterableContainsCheckerBuilder, entries: Entries.() -> Unit)?>): AssertionPlant - = checkerBuilder the entries - -/** - * Helper method to simplify adding assertions to the plant which itself is stored in - * [CharSequenceContains.CheckerOption.containsBuilder]. - * - * @return The plant to support a fluent API. - */ -private fun , S : IterableContains.SearchBehaviour> IterableContains.CheckerOption.addAssertion( - assertion: Assertion -): AssertionPlant = addAssertionForAssert(assertion) diff --git a/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/iterableContainsInAnyOrderOnlyCreators.kt b/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/iterableContainsInAnyOrderOnlyCreators.kt deleted file mode 100644 index d59b9215e..000000000 --- a/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/iterableContainsInAnyOrderOnlyCreators.kt +++ /dev/null @@ -1,175 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") -package ch.tutteli.atrium.api.cc.infix.en_UK - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.assertions.iterable.contains.builders.IterableContainsBuilder -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.domain.builders.AssertImpl -import ch.tutteli.atrium.domain.builders.creating.basic.contains.addAssertionForAssert -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InAnyOrderOnlySearchBehaviour - -/** - * Finishes the specification of the sophisticated `contains` assertion where the [Iterable] needs to contain only the - * [expected] value. - * - * Delegates to `the Values(expected)`. - * - * @param expected The value which is expected to be contained within the [Iterable]. - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.infix.en_GB.value(expected)")) -infix fun > IterableContains.Builder.value(expected: E): AssertionPlant - = this the Values(expected) - -@Deprecated("Use the extension fun `value` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", ReplaceWith("builder value expected")) -fun > value(builder: IterableContainsBuilder, expected: E): AssertionPlant - = the(builder, Values(expected)) - - -/** - * Finishes the specification of the sophisticated `contains` assertion where the expected [values] - * need to be contained in [Iterable] where it does not matter in which order. - * - * Delegates to `the Values(values)`. - * - * @param values The values which are expected to be contained within the [Iterable]. - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.infix.en_GB.the(values)")) -infix fun > IterableContains.Builder.the(values: Values): AssertionPlant - = addAssertion(AssertImpl.iterable.contains.valuesInAnyOrderOnly(this, values.toList())) - -@Deprecated("Use the extension fun `the` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", ReplaceWith("builder the values")) -fun > the(builder: IterableContainsBuilder, values: Values): AssertionPlant - = builder the values - - -@Deprecated("Will be removed with 1.0.0 because it is redundant in terms of `value expected` without adding enough to be a legit alternative.", ReplaceWith("this value expected")) -infix fun > IterableContains.Builder.`object`(expected: E): AssertionPlant - = this the Values(expected) - -@Deprecated("Use the extension fun value instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", ReplaceWith("builder value expected")) -fun > `object`(builder: IterableContainsBuilder, expected: E): AssertionPlant - = the(builder, Values(expected)) - -@Deprecated("Will be removed with 1.0.0 because it is redundant in terms of `the Values(expected, otherExpected)` without adding enough to be a legit alternative.", ReplaceWith("this the Values(objects)")) -infix fun > IterableContains.Builder.the(objects: Objects): AssertionPlant - = this the Values(objects) - -@Deprecated("Use the extension fun `the` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", ReplaceWith("builder the objects")) -fun > the(builder: IterableContainsBuilder, objects: Objects): AssertionPlant - = builder the Values(objects) - - -/** - * Finishes the specification of the sophisticated `contains` assertion where the [Iterable] needs to contain only one - * entry which holds all assertions created by the given [assertionCreator]. - * - * Delegates to `the Entries(assertionCreator)` - * - * @param assertionCreator The identification lambda. - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.infix.en_GB.entry(assertionCreator)")) -infix fun > IterableContains.Builder.entry(assertionCreator: Assert.() -> Unit): AssertionPlant - = this the Entries(assertionCreator) - -@Deprecated("Use the extension fun `entry` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", ReplaceWith("builder entry assertionCreator")) -fun > entry(builder: IterableContainsBuilder, assertionCreator: Assert.() -> Unit): AssertionPlant - = the(builder, Entries(assertionCreator)) - - -/** - * Finishes the specification of the sophisticated `contains` assertion where the entry needs to be contained in the - * [Iterable] which holds all assertions [Entries.assertionCreator] might create -- equally an entry for each further - * [Entries.otherAssertionCreators] needs to be contained in the [Iterable] where it does not matter in which order the - * entries appear. - * - * Notice, that a first-wins strategy applies which means your [Entries.assertionCreator] functions -- which kind of - * serve as identification functions -- should be ordered in such a way that the most specific identification function - * appears first, not that a less specific function wins. For instance, given a `setOf(1, 2)` you should not search for - * `entries({ isGreaterThan(0) }, { toBe(1) })` but for `entries({ toBe(1) }, { isGreaterThan(0) })` otherwise - * `isGreaterThan(0)` matches `1` before `toBe(1)` would match it. As a consequence `toBe(1)` could only match the - * entry which is left -- in this case `2` -- and of course this would fail. - * - * @param entries The parameter object containing the identification lambdas. - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.infix.en_GB.the(entries)")) -infix fun > IterableContains.Builder.the(entries: Entries.() -> Unit>): AssertionPlant - = addAssertion(AssertImpl.iterable.contains.entriesInAnyOrderOnlyWithAssert(this, entries.toList())) - -@Deprecated("Use the extension fun `the` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", ReplaceWith("builder the entries")) -fun > the(builder: IterableContainsBuilder, entries: Entries.() -> Unit>): AssertionPlant - = builder the entries - - -/** - * Finishes the specification of the sophisticated `contains` assertion where the [Iterable] needs to contain only one - * entry which holds all assertions created by the given [assertionCreator]. - * - * Delegates to `the Entries(assertionCreator)`. - * - * @param assertionCreator The identification lambda. - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.infix.en_GB.entry(assertionCreator)")) -@JvmName("entry?") -infix fun > IterableContains.Builder.entry(assertionCreator: (Assert.() -> Unit)?): AssertionPlant - = this the Entries(assertionCreator) - -@Deprecated("Use the extension fun `entry` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", ReplaceWith("builder entry assertionCreator")) -fun > nullableEntry(builder: IterableContainsBuilder, assertionCreator: (Assert.() -> Unit)?): AssertionPlant - = nullableEntries(builder, Entries(assertionCreator)) - - -/** - * Finishes the specification of the sophisticated `contains` assertion where the entry needs to be contained in the - * [Iterable] which holds all assertions [Entries.assertionCreator] might create -- equally an entry for each further - * [Entries.otherAssertionCreators] needs to be contained in the [Iterable] where it does not matter in which order the - * entries appear. - * - * Notice, that a first-wins strategy applies which means your [Entries.assertionCreator] functions -- which kind of serve as - * identification functions -- should be ordered in such a way that the most specific identification function appears - * first, not that a less specific function wins. For instance, given a `setOf(1, 2)` you should not search for - * `entries({ isGreaterThan(0) }, { toBe(1) })` but for `entries({ toBe(1) }, { isGreaterThan(0) })` otherwise - * `isGreaterThan(0)` matches `1` before `toBe(1)` would match it. As a consequence `toBe(1)` could only match the - * entry which is left -- in this case `2` -- and of course this would fail. - * - * @param entries The parameter object containing the identification lambdas. - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.infix.en_GB.the(entries)")) -@JvmName("entries?") -infix fun > IterableContains.Builder.the(entries: Entries.() -> Unit)?>): AssertionPlant - = addAssertion(AssertImpl.iterable.contains.entriesInAnyOrderOnlyWithAssert(this, entries.toList())) - -@Deprecated("Use the extension fun `the` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", ReplaceWith("builder the entries")) -fun > nullableEntries(builder: IterableContainsBuilder, entries: Entries.() -> Unit)?>): AssertionPlant - = builder the entries - -/** - * Helper method to simplify adding assertions to the plant which itself is stored in - * [CharSequenceContains.CheckerOption.containsBuilder]. - * - * @return The plant to support a fluent API. - */ -internal fun , S : IterableContains.SearchBehaviour> IterableContains.Builder.addAssertion( - assertion: Assertion -): AssertionPlant = addAssertionForAssert(assertion) diff --git a/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/iterableContainsInOrderOnlyCreators.kt b/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/iterableContainsInOrderOnlyCreators.kt deleted file mode 100644 index 8c391da62..000000000 --- a/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/iterableContainsInOrderOnlyCreators.kt +++ /dev/null @@ -1,149 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") -package ch.tutteli.atrium.api.cc.infix.en_UK - -import ch.tutteli.atrium.assertions.iterable.contains.builders.IterableContainsBuilder -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.domain.builders.AssertImpl -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InOrderOnlySearchBehaviour - -/** - * Finishes the specification of the sophisticated `contains` assertion where the [Iterable] needs to contain only the - * [expected] value. - * - * Delegates to `the Values(expected)`. - * - * @param expected The value which is expected to be contained within the [Iterable]. - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.infix.en_GB.value(expected)")) -infix fun > IterableContains.Builder.value(expected: E): AssertionPlant - = this the Values(expected) - -/** - * Finishes the specification of the sophisticated `contains` assertion where the expected [values] - * need to be contained in [Iterable] in the specified order. - * - * Delegates to `the Values(values)`. - * - * @param values The values which are expected to be contained within the [Iterable]. - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.infix.en_GB.the(values)")) -infix fun > IterableContains.Builder.the(values: Values): AssertionPlant - = addAssertion(AssertImpl.iterable.contains.valuesInOrderOnly(this, values.toList())) - -@Deprecated("Use the extension fun `the` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", ReplaceWith("builder the values")) -fun > the(builder: IterableContainsBuilder, values: Values): AssertionPlant - = builder the values - - -@Deprecated("Will be removed with 1.0.0 because it is redundant in terms of `value expected` without adding enough to be a legit alternative.", ReplaceWith("this value expected")) -infix fun > IterableContains.Builder.`object`(expected: E): AssertionPlant - = this the Values(expected) - -@Deprecated("Use the extension fun value instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", ReplaceWith("builder value expected")) -fun > `object`(builder: IterableContainsBuilder, expected: E): AssertionPlant - = the(builder, Values(expected)) - -@Deprecated("Will be removed with 1.0.0 because it is redundant in terms of `the Values(expected, otherExpected)` without adding enough to be a legit alternative.", ReplaceWith("this the Values(objects)")) -infix fun > IterableContains.Builder.the(objects: Objects): AssertionPlant - = this the Values(objects) - -@Deprecated("Use the extension fun `the` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", ReplaceWith("builder the objects")) -fun > the(builder: IterableContainsBuilder, objects: Objects): AssertionPlant - = builder the Values(objects) - - -/** - * Finishes the specification of the sophisticated `contains` assertion where the [Iterable] needs to contain only one - * entry which holds all assertions created by the given [assertionCreator]. - * - * Delegates to `the Entries(assertionCreator)` - * - * @param assertionCreator The identification lambda. - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.infix.en_GB.entry(assertionCreator)")) -infix fun > IterableContains.Builder.entry(assertionCreator: Assert.() -> Unit): AssertionPlant - = this the Entries(assertionCreator) - -@Deprecated("Use the extension fun `entry` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", ReplaceWith("builder entry assertionCreator")) -fun > entry(builder: IterableContainsBuilder, assertionCreator: Assert.() -> Unit): AssertionPlant - = the(builder, Entries(assertionCreator)) - - -/** - * Finishes the specification of the sophisticated `contains` assertion where the entry needs to be contained in the - * [Iterable] which holds all assertions [Entries.assertionCreator] might create -- equally an entry for each further - * [Entries.otherAssertionCreators], following the specified order, needs to be contained in the [Iterable] - * - * @param entries The parameter object containing the identification lambdas. - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.infix.en_GB.the(entries)")) -infix fun > IterableContains.Builder.the(entries: Entries.() -> Unit>): AssertionPlant - = addAssertion(AssertImpl.iterable.contains.entriesInOrderOnlyWithAssert(this, entries.toList())) - -@Deprecated("Use the extension fun `the` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", ReplaceWith("builder the entries")) -fun > the(builder: IterableContainsBuilder, entries: Entries.() -> Unit>): AssertionPlant - = builder the entries - - -/** - * Finishes the specification of the sophisticated `contains` assertion where the [Iterable] needs to contain only one - * entry which holds all assertions created by the given [assertionCreator]. - * - * Delegates to `the Entries(assertionCreator)`. - * - * @param assertionCreator The identification lambda. - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.infix.en_GB.entry(assertionCreator)")) -@JvmName("entry?") -infix fun > IterableContains.Builder.entry(assertionCreator: (Assert.() -> Unit)?): AssertionPlant - = this the Entries(assertionCreator) - -@Deprecated("Use the extension fun `entry` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", ReplaceWith("builder entry assertionCreator")) -fun > nullableEntry(builder: IterableContainsBuilder, assertionCreator: (Assert.() -> Unit)?): AssertionPlant - = nullableEntries(builder, Entries(assertionCreator)) - - -/** - * Finishes the specification of the sophisticated `contains` assertion where the entry needs to be contained in the - * [Iterable] which holds all assertions [Entries.assertionCreator] might create -- equally an entry for each further - * [Entries.otherAssertionCreators] needs to be contained in the [Iterable] where it does not matter in which order the - * entries appear. - * - * Notice, that a first-wins strategy applies which means your [Entries.assertionCreator] functions -- which kind of serve as - * identification functions -- should be ordered in such a way that the most specific identification function appears - * first, not that a less specific function wins. For instance, given a `setOf(1, 2)` you should not search for - * `entries({ isGreaterThan(0) }, { toBe(1) })` but for `entries({ toBe(1) }, { isGreaterThan(0) })` otherwise - * `isGreaterThan(0)` matches `1` before `toBe(1)` would match it. As a consequence `toBe(1)` could only match the - * entry which is left -- in this case `2` -- and of course this would fail. - * - * @param entries The parameter object containing the identification lambdas. - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.infix.en_GB.the(entries)")) -@JvmName("entries?") -infix fun > IterableContains.Builder.the(entries: Entries.() -> Unit)?>): AssertionPlant - = addAssertion(AssertImpl.iterable.contains.entriesInOrderOnlyWithAssert(this, entries.toList())) - -@Deprecated("Use the extension fun `the` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", ReplaceWith("builder the entries")) -fun > nullableEntries(builder: IterableContainsBuilder, entries: Entries.() -> Unit)?>): AssertionPlant - = builder the entries diff --git a/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/methodObjects.kt b/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/methodObjects.kt deleted file mode 100644 index 2149dbc6e..000000000 --- a/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/methodObjects.kt +++ /dev/null @@ -1,52 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") -package ch.tutteli.atrium.api.cc.infix.en_UK - -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.reporting.translating.Translatable -import ch.tutteli.kbox.glue - -/** - * Parameter object to express `Translatable, vararg Translatable` in the infix-api. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.infix.en_GB.DefaultTranslationsOf(expected, *otherExpected)")) -class DefaultTranslationsOf(val expected: Translatable, vararg val otherExpected: Translatable) { - fun toList(): List = expected glue otherExpected -} - -/** - * Parameter object to express `((Assert) -> Unit)?, vararg ((Assert) -> Unit)?` in the infix-api. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.infix.en_GB.Entries(assertionCreator, *otherAssertionCreators)")) -class Entries) -> Unit)?>(val assertionCreator: A, vararg val otherAssertionCreators: A) { - fun toList(): List = assertionCreator glue otherAssertionCreators -} - -/** - * Parameter object to express `T, vararg T` in the infix-api. - */ -@Deprecated("Use Values instead; will be removed with 1.0.0 - there is no ReplaceWith defined due to bug KT-10094, please use search & replace instead, watch out for `Values(Values(` afterwards") -class Objects(val expected: T, vararg val otherExpected: T) { - @Deprecated("Use Values instead; will be removed with 1.0.0 - there is no ReplaceWith defined due to bug KT-10094, please use search & replace, watch out for `Values(Values(` afterwards") - constructor(values: Values) : this(values.expected, *values.otherExpected) -} - -/** - * Parameter object to express `String, vararg String` in the infix-api. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.infix.en_GB.RegexPatterns(pattern, *otherPatterns)")) -class RegexPatterns(val pattern: String, vararg val otherPatterns: String) { - fun toList(): List = pattern glue otherPatterns -} - -/** - * Parameter object to express `T, vararg T` in the infix-api. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.infix.en_GB.Values(expected, *otherExpected)")) -class Values(val expected: T, vararg val otherExpected: T) { - - @Deprecated("Use Values directly instead of wrapping it into Objects in addition; will be removed with 1.0.0") - constructor(objects: Objects) : this(objects.expected, *objects.otherExpected) - - fun toList(): List = expected glue otherExpected -} diff --git a/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/throwableAssertions.kt b/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/throwableAssertions.kt deleted file mode 100644 index 2bd97f7d6..000000000 --- a/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/throwableAssertions.kt +++ /dev/null @@ -1,57 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") -package ch.tutteli.atrium.api.cc.infix.en_UK - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.AssertionPlantNullable -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.domain.builders.AssertImpl -import ch.tutteli.atrium.domain.creating.throwable.thrown.ThrowableThrown - -/** - * Makes the assertion that the thrown [Throwable] is of type [TExpected]. - * - * @return Notice, that this assertion function cannot provide a fluent API because it depends on whether the assertion - * (a [Throwable] was thrown and is of type [TExpected]) holds or not. - * If you want to define subsequent assertions on the down-casted [Throwable], then use the overload which expects a - * lambda (where you can define subsequent assertions). - * - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.infix.en_GB.toThrow()")) -inline fun ThrowableThrown.Builder.toThrow() { - toThrow {} -} - -/** - * Makes the assertion that the thrown [Throwable] is of type [TExpected] and holds all assertions the - * [assertionCreator] might create in addition. - * - * @return Notice, that this assertion function cannot provide a fluent API because it depends on whether the first - * assertion (a [Throwable] was thrown) holds or not. - * Define subsequent assertions via the [assertionCreator] lambda. - * - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.infix.en_GB.toThrow(assertionCreator)")) -inline infix fun ThrowableThrown.Builder.toThrow(noinline assertionCreator: Assert.() -> Unit) { - AssertImpl.throwable.thrown.toBe(this, TExpected::class, assertionCreator) -} - -/** - * Creates an [AssertionPlantNullable] for the [message][Throwable.message] of the plant's - * [subject][SubjectProvider.subject] (which is a [Throwable]) and makes the assertion that the message ought - * [notToBeNull] and uses [assertionCreator] which might create further [Assertion]s which are lazily evaluated at the end. - * - * @return Notice, that this assertion function cannot provide a fluent API because it depends on whether the first - * assertion [message][Throwable.message] is not null) holds or not. - * Define subsequent assertions via the [assertionCreator] lambda. - * - * @throws AssertionError Might throw an [AssertionError] in case [message][Throwable.message] is `null` - * or if an additionally created [Assertion]s (by calling [assertionCreator]) does not hold. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.infix.en_GB.message(assertionCreator)")) -infix fun Assert.message(assertionCreator: Assert.() -> Unit) { - property(subject::message).notToBeNull(assertionCreator) -} diff --git a/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/typeTransformationAssertions.kt b/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/typeTransformationAssertions.kt deleted file mode 100644 index b639d34be..000000000 --- a/misc/deprecated/apis/atrium-api-cc-infix-en_UK/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_UK/typeTransformationAssertions.kt +++ /dev/null @@ -1,42 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") - -package ch.tutteli.atrium.api.cc.infix.en_UK - -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.creating.AssertionPlantNullable -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.domain.builders.AssertImpl - -/** - * Makes the assertion that [AssertionPlantNullable.subject][SubjectProvider.subject] is not null and if so, uses [assertionCreator] - * which could create further assertions which are added as a group. - * - * @return Notice, that this assertion function cannot provide a fluent API because it depends on whether the first - * assertion ([Assert.subject][SubjectProvider.subject] is not null) holds or not. - * Define subsequent assertions via the [assertionCreator] lambda. - * - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.infix.en_GB.notToBeNull(assertionCreator)")) -inline infix fun AssertionPlantNullable.notToBeNull(noinline assertionCreator: Assert.() -> Unit) { - @Suppress("DEPRECATION") - addAssertion(AssertImpl.any.isNotNull(this, T::class, assertionCreator)) -} - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] *is a* [TSub] (the same type or a sub-type) and if so, - * uses [assertionCreator] which could create further assertions which are added as a group. - * - * @return Notice, that this assertion function cannot provide a fluent API because it depends on whether the first - * assertion ([Assert.subject][SubjectProvider.subject] *is a* [TSub]) holds or not. - * Define subsequent assertions via the [assertionCreator] lambda. - * - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Use pendant from package en_GB; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.cc.infix.en_GB.isA(assertionCreator)")) -inline infix fun Assert.isA(noinline assertionCreator: AssertionPlant.() -> Unit) { - @Suppress("DEPRECATION") - AssertImpl.any.typeTransformation.isA(this, TSub::class, assertionCreator) -} diff --git a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/build.gradle b/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/build.gradle deleted file mode 100644 index a8e0d7a9c..000000000 --- a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/build.gradle +++ /dev/null @@ -1,5 +0,0 @@ -description = 'An assertion function API in de_CH with a focus on code completion as common module.' - -dependencies { - api prefixedProject('domain-builders-common') -} diff --git a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/anyAssertions.kt b/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/anyAssertions.kt deleted file mode 100644 index 4d511d1d7..000000000 --- a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/anyAssertions.kt +++ /dev/null @@ -1,127 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") - -@file:JvmMultifileClass -@file:JvmName("AnyAssertionsKt") -package ch.tutteli.atrium.api.cc.de_CH - -import ch.tutteli.atrium.checking.AssertionChecker -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.creating.AssertionPlantNullable -import ch.tutteli.atrium.domain.builders.AssertImpl -import ch.tutteli.atrium.reporting.Reporter -import kotlin.jvm.JvmMultifileClass -import kotlin.jvm.JvmName - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] is (equal to) [expected]. - * - * This method might enforce in the future, that [expected] has to be the same type as [Assert.subject][SubjectProvider.subject]. - * Currently the following is possible: `esGilt(1).ist(1.0)` - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -fun Assert.ist(expected: T) - = addAssertion(AssertImpl.any.toBe(this, expected)) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] is not (equal to) [expected]. - * - * This method might enforce in the future, that [expected] has to be the same type as [Assert.subject][SubjectProvider.subject]. - * Currently the following is possible: `esGilt(1).istNicht(1.0)` - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -fun Assert.istNicht(expected: T) - = addAssertion(AssertImpl.any.notToBe(this, expected)) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] is the same instance as [expected]. - * - * This method might enforce in the future, that [expected] has to be the same type as [Assert.subject][SubjectProvider.subject]. - * Currently the following is possible: `esGilt(1).istSelbeInstanzWie(1.0)` - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -fun Assert.istSelbeInstanzWie(expected: T) - = addAssertion(AssertImpl.any.isSame(this, expected)) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] is not the same instance as [expected]. - * - * This method might enforce in the future, that [expected] has to be the same type as [Assert.subject][SubjectProvider.subject]. - * Currently the following is possible: `esGilt(1).istNichtSelbeInstanzWie(1.0)` - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -fun Assert.istNichtSelbeInstanzWie(expected: T) - = addAssertion(AssertImpl.any.isNotSame(this, expected)) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] is [expected]. - * - * @return Does not support a fluent API because: what else would you want to assert about `null` anyway? - * - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -@Suppress("DEPRECATION") -inline fun AssertionPlantNullable.ist(expected: T?) { - addAssertion(AssertImpl.any.isNullable(this, T::class, expected)) -} - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] is either `null` if [assertionCreatorOrNull] - * is null or is not `null` and holds all assertions [assertionCreatorOrNull] might create. - * - * It is a shortcut for - * ```kotlin - * if(nullOrExpected == null) ist(null) - * else istNichtNull(assertionCreatorOrNull) - * ``` - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -@Suppress("DEPRECATION") -inline fun AssertionPlantNullable.istNullWennNullGegebenSonst(noinline assertionCreatorOrNull: (Assert.() -> Unit)?) { - addAssertion(AssertImpl.any.isNullIfNullGivenElse(this, T::class, assertionCreatorOrNull)) -} - -/** - * Can be used to separate assertions when using the fluent API. - * - * For instance `esGilt(1).istKleinerAls(2).und.istGroesserAls(0)` creates - * two assertions (not one assertion with two sub-assertions) - the first asserts that 1 is less than 2 and a second - * asserts that 1 is greater than 0. If the first assertion fails, then usually (depending on the configured - * [AssertionChecker]) the second assertion is not evaluated. - * - * @return This plant to support a fluent API. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -val Assert.und: Assert get() = this - -/** - * Can be used to create a group of sub assertions when using the fluent API. - * - * For instance `esGilt(1).istKleinerAls(3).und { istGerade(); istKleinerAls(1) }` creates - * two assertions where the second one consists of two sub-assertions. In case the first assertion holds, then the - * second one is evaluated as a whole. Meaning, even though 1 is not even, it still evaluates that 1 is greater than 1. - * Hence the reporting might (depending on the configured [Reporter]) contain both failing sub-assertions. - * - * @return This plant to support a fluent API. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -infix fun AssertionPlant.und(assertionCreator: Assert.() -> Unit) - = addAssertionsCreatedBy(assertionCreator) diff --git a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/arrayAssertions.kt b/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/arrayAssertions.kt deleted file mode 100644 index 2f7e6d40e..000000000 --- a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/arrayAssertions.kt +++ /dev/null @@ -1,265 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") - -package ch.tutteli.atrium.api.cc.de_CH - -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.domain.builders.ExpectImpl -import kotlin.jvm.JvmName - -/** - * Turns `Assert>` into `Assert>`. - * - * The transformation as such is not reflected in reporting. - * Use `returnValueOf(Array::asIterable)` if you want to show the transformation in reporting. - * - * @return The newly created [AssertionPlant] for the transformed subject. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -@Suppress("DEPRECATION") -fun Assert>.asIterable(): Assert> - = ExpectImpl.changeSubject(this).unreported { it.asIterable() } - -/** - * Turns `Assert>` into `Assert>` and makes the assertion that the assertions the given - * [assertionCreator] might create hold. - * - * The transformation as such is not reflected in reporting. - * Use `returnValueOf(Array::asIterable)` if you want to show the transformation in reporting. - * - * @return The newly created [AssertionPlant] for the transformed subject. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -fun Assert>.asIterable(assertionCreator: Assert>.() -> Unit): Assert> - = asIterable().addAssertionsCreatedBy(assertionCreator) - - -/** - * Turns `Assert` into `Assert>`. - * - * The transformation as such is not reflected in reporting. - * Use `returnValueOf(ByteArray::asIterable)` if you want to show the transformation in reporting. - * - * @return The newly created [Assert] for the transformed subject. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -@Suppress("DEPRECATION") -@JvmName("byteArrAsIterable") -fun Assert.asIterable(): Assert> - = ExpectImpl.changeSubject(this).unreported { it.asIterable() } - -/** - * Turns `Assert` into `Assert>` and makes the assertion that the assertions the given - * [assertionCreator] might create hold. - * - * The transformation as such is not reflected in reporting. - * Use `returnValueOf(ByteArray::asIterable)` if you want to show the transformation in reporting. - * - * @return The newly created [Assert] for the transformed subject. - */ -@JvmName("byteArrAsIterable") -fun Assert.asIterable(assertionCreator: Assert>.() -> Unit): Assert> - = asIterable().addAssertionsCreatedBy(assertionCreator) - - -/** - * Turns `Assert` into `Assert>`. - * - * The transformation as such is not reflected in reporting. - * Use `returnValueOf(CharArray::asIterable)` if you want to show the transformation in reporting. - * - * @return The newly created [AssertionPlant] for the transformed subject. - */ -@Suppress("DEPRECATION") -@JvmName("charArrAsIterable") -fun Assert.asIterable(): Assert> - = ExpectImpl.changeSubject(this).unreported { it.asIterable() } - -/** - * Turns `Assert` into `Assert>` and makes the assertion that the assertions the given - * [assertionCreator] might create hold. - * - * The transformation as such is not reflected in reporting. - * Use `returnValueOf(CharArray::asIterable)` if you want to show the transformation in reporting. - * - * @return The newly created [AssertionPlant] for the transformed subject. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -@JvmName("charArrAsIterable") -fun Assert.asIterable(assertionCreator: Assert>.() -> Unit): Assert> - = asIterable().addAssertionsCreatedBy(assertionCreator) - - -/** - * Turns `Assert` into `Assert>`. - * - * The transformation as such is not reflected in reporting. - * Use `returnValueOf(ShortArray::asIterable)` if you want to show the transformation in reporting. - * - * @return The newly created [AssertionPlant] for the transformed subject. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -@Suppress("DEPRECATION") -@JvmName("shortArrAsIterable") -fun Assert.asIterable(): Assert> - = ExpectImpl.changeSubject(this).unreported { it.asIterable() } - -/** - * Turns `Assert` into `Assert>` and makes the assertion that the assertions the given - * [assertionCreator] might create hold. - * - * The transformation as such is not reflected in reporting. - * Use `returnValueOf(ShortArray::asIterable)` if you want to show the transformation in reporting. - * - * @return The newly created [AssertionPlant] for the transformed subject. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -@JvmName("shortArrAsIterable") -fun Assert.asIterable(assertionCreator: Assert>.() -> Unit): Assert> - = asIterable().addAssertionsCreatedBy(assertionCreator) - - -/** - * Turns `Assert` into `Assert>`. - * - * The transformation as such is not reflected in reporting. - * Use `returnValueOf(IntArray::asIterable)` if you want to show the transformation in reporting. - * - * @return The newly created [AssertionPlant] for the transformed subject. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -@Suppress("DEPRECATION") -@JvmName("intArrAsIterable") -fun Assert.asIterable(): Assert> - = ExpectImpl.changeSubject(this).unreported { it.asIterable() } - -/** - * Turns `Assert` into `Assert>` and makes the assertion that the assertions the given - * [assertionCreator] might create hold. - * - * The transformation as such is not reflected in reporting. - * Use `returnValueOf(IntArray::asIterable)` if you want to show the transformation in reporting. - * - * @return The newly created [AssertionPlant] for the transformed subject. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -@JvmName("intArrAsIterable") -fun Assert.asIterable(assertionCreator: Assert>.() -> Unit): Assert> - = asIterable().addAssertionsCreatedBy(assertionCreator) - - -/** - * Turns `Assert` into `Assert>`. - * - * The transformation as such is not reflected in reporting. - * Use `returnValueOf(LongArray::asIterable)` if you want to show the transformation in reporting. - * - * @return The newly created [AssertionPlant] for the transformed subject. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -@Suppress("DEPRECATION") -@JvmName("longArrAsIterable") -fun Assert.asIterable(): Assert> - = ExpectImpl.changeSubject(this).unreported { it.asIterable() } - -/** - * Turns `Assert` into `Assert>` and makes the assertion that the assertions the given - * [assertionCreator] might create hold. - * - * The transformation as such is not reflected in reporting. - * Use `returnValueOf(LongArray::asIterable)` if you want to show the transformation in reporting. - * - * @return The newly created [AssertionPlant] for the transformed subject. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -@JvmName("longArrAsIterable") -fun Assert.asIterable(assertionCreator: Assert>.() -> Unit): Assert> - = asIterable().addAssertionsCreatedBy(assertionCreator) - - -/** - * Turns `Assert` into `Assert>`. - * - * The transformation as such is not reflected in reporting. - * Use `returnValueOf(FloatArray::asIterable)` if you want to show the transformation in reporting. - * - * @return The newly created [AssertionPlant] for the transformed subject. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -@Suppress("DEPRECATION") -@JvmName("floatArrAsIterable") -fun Assert.asIterable(): Assert> - = ExpectImpl.changeSubject(this).unreported { it.asIterable() } - -/** - * Turns `Assert` into `Assert>` and makes the assertion that the assertions the given - * [assertionCreator] might create hold. - * - * The transformation as such is not reflected in reporting. - * Use `returnValueOf(FloatArray::asIterable)` if you want to show the transformation in reporting. - * - * @return The newly created [AssertionPlant] for the transformed subject. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -@JvmName("floatArrAsIterable") -fun Assert.asIterable(assertionCreator: Assert>.() -> Unit): Assert> - = asIterable().addAssertionsCreatedBy(assertionCreator) - - -/** - * Turns `Assert` into `Assert>`. - * - * The transformation as such is not reflected in reporting. - * Use `returnValueOf(DoubleArray::asIterable)` if you want to show the transformation in reporting. - * - * @return The newly created [AssertionPlant] for the transformed subject. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -@Suppress("DEPRECATION") -@JvmName("doubleArrAsIterable") -fun Assert.asIterable(): Assert> - = ExpectImpl.changeSubject(this).unreported { it.asIterable() } - -/** - * Turns `Assert` into `Assert>` and makes the assertion that the assertions the given - * [assertionCreator] might create hold. - * - * The transformation as such is not reflected in reporting. - * Use `returnValueOf(DoubleArray::asIterable)` if you want to show the transformation in reporting. - * - * @return The newly created [AssertionPlant] for the transformed subject. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -@JvmName("doubleArrAsIterable") -fun Assert.asIterable(assertionCreator: Assert>.() -> Unit): Assert> - = asIterable().addAssertionsCreatedBy(assertionCreator) - - -/** - * Turns `Assert` into `Assert>`. - * - * The transformation as such is not reflected in reporting. - * Use `returnValueOf(BooleanArray::asIterable)` if you want to show the transformation in reporting. - * - * @return The newly created [AssertionPlant] for the transformed subject. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -@Suppress("DEPRECATION") -@JvmName("boolArrAsIterable") -fun Assert.asIterable(): Assert> - = ExpectImpl.changeSubject(this).unreported { it.asIterable() } - -/** - * Turns `Assert` into `Assert>` and makes the assertion that the assertions the given - * [assertionCreator] might create hold. - * - * The transformation as such is not reflected in reporting. - * Use `returnValueOf(BooleanArray::asIterable)` if you want to show the transformation in reporting. - * - * @return The newly created [AssertionPlant] for the transformed subject. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -@JvmName("boolArrAsIterable") -fun Assert.asIterable(assertionCreator: Assert>.() -> Unit): Assert> - = asIterable().addAssertionsCreatedBy(assertionCreator) diff --git a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/charSequenceAssertions.kt b/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/charSequenceAssertions.kt deleted file mode 100644 index 2e7fe47fb..000000000 --- a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/charSequenceAssertions.kt +++ /dev/null @@ -1,185 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") - -@file:JvmMultifileClass -@file:JvmName("CharSequenceAssertionsKt") -package ch.tutteli.atrium.api.cc.de_CH - -import ch.tutteli.atrium.api.cc.de_CH.creating.charsequence.contains.builders.NotCheckerOption -import ch.tutteli.atrium.api.cc.de_CH.creating.charsequence.contains.builders.impl.NotCheckerOptionImpl -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.domain.builders.AssertImpl -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains -import ch.tutteli.atrium.domain.creating.charsequence.contains.searchbehaviours.NoOpSearchBehaviour -import ch.tutteli.atrium.domain.creating.charsequence.contains.searchbehaviours.NotSearchBehaviour -import kotlin.jvm.JvmMultifileClass -import kotlin.jvm.JvmName - -/** - * Creates a [CharSequenceContains.Builder] based on this [AssertionPlant] which allows to define - * more sophisticated `contains` assertions. - * - * @return The newly created builder. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -val Assert.enthaelt: CharSequenceContains.Builder - get() = AssertImpl.charSequence.containsBuilder(this) - -/** - * Creates a [CharSequenceContains.Builder] based on this [AssertionPlant] which allows to define - * more sophisticated `contains not` assertions. - * - * @return The newly created builder. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -val Assert.enthaeltNicht: NotCheckerOption - get() = NotCheckerOptionImpl(AssertImpl.charSequence.containsNotBuilder(this)) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] contains [expected]'s [toString] representation - * and the [toString] representation of the [otherExpected] (if given), using a non disjoint search. - * - * It is a shortcut for `enthaelt.zumindest(1).werte(expected, *otherExpected)`. - * - * Notice that a runtime check applies which assures that only [CharSequence], [Number] and [Char] are passed (this - * function expects `Any` for your convenience, so that you can mix [String] and [Int] for instance). - * - * By non disjoint is meant that `'aa'` in `'aaaa'` is found three times and not only two times. - * Also notice, that it does not search for unique matches. Meaning, if the input of the search is `'a'` and [expected] - * is defined as `'a'` and one [otherExpected] is defined as `'a'` as well, then both match, even though they match the - * same sequence in the input of the search. Use the property `enthaelt` to create a more sophisticated `contains` - * assertion where you can use options such as [zumindest], [hoechstens] and [genau] to control the number of - * occurrences you expect. - * - * Meaning you might want to use: - * `enthaelt.genau(2).wert('a')` - * instead of: - * `enthaelt('a', 'a')` - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - * @throws IllegalArgumentException in case [expected] or one of the [otherExpected] is not a - * [CharSequence], [Number] or [Char]. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -fun Assert.enthaelt(expected: Any, vararg otherExpected: Any) - = enthaelt.zumindest(1).werte(expected, *otherExpected) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] does not contain [expected]'s [toString] representation - * and neither one of the [otherExpected]'s [toString] representation (if given). - * - * It is a shortcut for `enthaeltNicht.werte(expected, *otherExpected)`. - * - * Notice that a runtime check applies which assures that only [CharSequence], [Number] and [Char] are passed (this - * function expects `Any` for your convenience, so that you can mix [String] and [Int] for instance). - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -fun Assert.enthaeltNicht(expected: Any, vararg otherExpected: Any) - = enthaeltNicht.werte(expected, *otherExpected) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] contains a sequence which matches the given regular expression - * [pattern] as well as the [otherPatterns] (if given), using a non disjoint search. - * - * It is a shortcut for `enthaelt.zumindest(1).regex(pattern, *otherPatterns)`. - * - * By non disjoint is meant that `'aa'` in `'aaaa'` is found three times and not only two times. - * Also notice, that it does not search for unique matches. Meaning, if the input of the search is `'ab'` and [pattern] - * is defined as `'a(b)?'` and one of the [otherPatterns] is defined as `'a(b)?'` as well, then both match, even though - * they match the same sequence in the input of the search. Use an option such as [zumindest], [hoechstens] and [genau] - * to control the number of occurrences you expect. - * - * Meaning you might want to use: - * `enthaelt.genau(2).regex('a(b)?')` - * instead of: - * `enthaelt.zumindest(1).regex('a(b)?', 'a(b)?')` - * - * @param pattern The pattern which is expected to have a match against the input of the search. - * @param otherPatterns Additional patterns which are expected to have a match against the input of the search. - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -fun Assert.enthaeltRegex( - pattern: String, - vararg otherPatterns: String -) = enthaelt.zumindest(1).regex(pattern, *otherPatterns) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] starts with [expected]. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -fun Assert.beginntMit(expected: CharSequence) - = addAssertion(AssertImpl.charSequence.startsWith(this, expected)) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] does not start with [expected]. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -fun Assert.beginntNichtMit(expected: CharSequence) - = addAssertion(AssertImpl.charSequence.startsNotWith(this, expected)) - - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] ends with [expected]. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -fun Assert.endetMit(expected: CharSequence) - = addAssertion(AssertImpl.charSequence.endsWith(this, expected)) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] does not end with [expected]. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -fun Assert.endetNichtMit(expected: CharSequence) - = addAssertion(AssertImpl.charSequence.endsNotWith(this, expected)) - - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] [CharSequence].[kotlin.text.isEmpty]. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -fun Assert.istLeer() - = addAssertion(AssertImpl.charSequence.isEmpty(this)) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] [CharSequence].[kotlin.text.isNotEmpty]. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -fun Assert.istNichtLeer() - = addAssertion(AssertImpl.charSequence.isNotEmpty(this)) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] [CharSequence].[kotlin.text.isNotBlank]. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -fun Assert.istNichtBlank() - = addAssertion(AssertImpl.charSequence.isNotBlank(this)) diff --git a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/charSequenceContainsCheckers.kt b/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/charSequenceContainsCheckers.kt deleted file mode 100644 index 99279c1af..000000000 --- a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/charSequenceContainsCheckers.kt +++ /dev/null @@ -1,95 +0,0 @@ -@file:Suppress("DEPRECATION" /* will be removed with 1.0.0 */) -@file:JvmMultifileClass -@file:JvmName("CharSequenceContainsCheckersKt") -package ch.tutteli.atrium.api.cc.de_CH - -import ch.tutteli.atrium.api.cc.de_CH.creating.charsequence.contains.builders.* -import ch.tutteli.atrium.api.cc.de_CH.creating.charsequence.contains.builders.impl.* -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains.SearchBehaviour -import kotlin.jvm.JvmMultifileClass -import kotlin.jvm.JvmName - -/** - * Restricts a `contains` assertion by specifying that the number of occurrences of the value which we are looking - * for occurs `at least` number of [times] within the search input. - * - * @param times The number which the check will compare against the number of times an expected value is - * found in the input of the search. - * - * @return The newly created builder. - * @throws IllegalArgumentException In case [times] is smaller than zero. - * @throws IllegalArgumentException In case [times] equals to zero; use [enthaeltNicht] instead. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -fun CharSequenceContains.Builder.zumindest(times: Int): AtLeastCheckerOption - = AtLeastCheckerOptionImpl(times, this) - -/** - * Restricts a `contains at least` assertion by specifying that the number of occurrences of the value which we - * are looking for occurs `at most` number of [times] within the search input. - * - * The resulting restriction will be a `contains at least but at most` assertion. - * - * @param times The number which the check will compare against the number of times an expected value is - * found in the input of the search. - * - * @return The newly created builder. - * @throws IllegalArgumentException In case [times] is smaller than zero. - * @throws IllegalArgumentException In case [times] equals to zero; use [enthaeltNicht] instead. - * @throws IllegalArgumentException In case [times] of this `at most` restriction equals to the number of the - * `at least` restriction; use the [genau] restriction instead. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -fun AtLeastCheckerOption.aberHoechstens(times: Int): ButAtMostCheckerOption - = ButAtMostCheckerOptionImpl(times, this, containsBuilder) - -/** - * Restricts a `contains` assertion by specifying that the number of occurrences of the value which we - * are looking for occurs `exactly` number of [times] within the search input. - * - * @param times The number which the check will compare against the number of times an expected value is - * found in the input of the search. - * - * @return The newly created builder. - * @throws IllegalArgumentException In case [times] is smaller than zero. - * @throws IllegalArgumentException In case [times] equals to zero; use [enthaeltNicht] instead. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -fun CharSequenceContains.Builder.genau(times: Int): ExactlyCheckerOption - = ExactlyCheckerOptionImpl(times, this) - -/** - * Restricts a `contains` assertion by specifying that the number of occurrences of the value which we - * are looking for occurs `at least` once but `at most` number of [times] within the search input. - * - * If you want to use a higher lower bound than one, then use `zumindest(2).aberHoechstens(3)` instead of - * `hoechstens(3)`. And in case you want to state that it is either not contained at all or at most a certain - * number of times, then use `nichtOderHoechstens(2)` instead. - * - * @param times The number which the check will compare against the number of times an expected value is - * found in the input of the search. - * - * @return The newly created builder. - * @throws IllegalArgumentException In case [times] is smaller than zero. - * @throws IllegalArgumentException In case [times] equals to zero; use [enthaeltNicht] instead. - * @throws IllegalArgumentException In case [times] equals to one; use [genau] instead. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -fun CharSequenceContains.Builder.hoechstens(times: Int): AtMostCheckerOption - = AtMostCheckerOptionImpl(times, this) - -/** - * Restricts a `contains` assertion by specifying that the number of occurrences of the value which we - * are looking for occurs `not at all or at most` number of [times] within the search input. - * - * @param times The number which the check will compare against the number of times an expected value is - * found in the input of the search. - * - * @return The newly created builder. - * @throws IllegalArgumentException In case [times] is smaller than zero. - * @throws IllegalArgumentException In case [times] equals to zero; use [enthaeltNicht] instead. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -fun CharSequenceContains.Builder.nichtOderHoechstens(times: Int): NotOrAtMostCheckerOption - = NotOrAtMostCheckerOptionImpl(times, this) diff --git a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/charSequenceContainsCreators.kt b/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/charSequenceContainsCreators.kt deleted file mode 100644 index 0711f7870..000000000 --- a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/charSequenceContainsCreators.kt +++ /dev/null @@ -1,244 +0,0 @@ -@file:Suppress("DEPRECATION" /* will be removed with 1.0.0 */) -@file:JvmMultifileClass -@file:JvmName("CharSequenceContainsCreatorsKt") -package ch.tutteli.atrium.api.cc.de_CH - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.domain.builders.AssertImpl -import ch.tutteli.atrium.domain.builders.creating.basic.contains.addAssertionForAssert -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains -import ch.tutteli.atrium.domain.creating.charsequence.contains.searchbehaviours.IgnoringCaseSearchBehaviour -import ch.tutteli.atrium.domain.creating.charsequence.contains.searchbehaviours.NoOpSearchBehaviour -import ch.tutteli.kbox.glue -import kotlin.jvm.JvmMultifileClass -import kotlin.jvm.JvmName - -/** - * Finishes the specification of the sophisticated `contains` assertion where the [expected] value shall be searched, - * using a non disjoint search. - * - * Delegates to `werte(expected)`. - * - * Notice that a runtime check applies which assures that only [CharSequence], [Number] and [Char] are passed (this - * function expects `Any` for your convenience, so that you can mix [String] and [Int] for instance). - * - * By non disjoint is meant that 'aa' in 'aaaa' is found three times and not only two times. - * - * @param expected The value which is expected to be contained within the input of the search. - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - * @throws IllegalArgumentException in case [expected] is not a [CharSequence], [Number] or [Char]. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -fun CharSequenceContains.CheckerOption.wert(expected: Any): AssertionPlant - = werte(expected) - -/** - * Finishes the specification of the sophisticated `contains` assertion where the [expected] value as well as - * the [otherExpected] values shall be searched, using a non disjoint search. - * - * Notice that a runtime check applies which assures that only [CharSequence], [Number] and [Char] are passed (this - * function expects `Any` for your convenience, so that you can mix [String] and [Int] for instance). - * - * By non disjoint is meant that `'aa'` in `'aaaa'` is found three times and not only two times. - * Also notice, that it does not search for unique matches. Meaning, if the input of the search is `'a'` and [expected] - * is defined as `'a'` and one [otherExpected] is defined as `'a'` as well, then both match, even though they match the - * same sequence in the input of the search. - * - * @param expected The value which is expected to be contained within the input of the search. - * @param otherExpected Additional values which are expected to be contained within the input of the search. - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - * @throws IllegalArgumentException in case [expected] or one of the [otherExpected] is not a - * [CharSequence], [Number] or [Char]. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -fun CharSequenceContains.CheckerOption.werte(expected: Any, vararg otherExpected: Any): AssertionPlant - = addAssertion(AssertImpl.charSequence.contains.values(this, expected glue otherExpected)) - -/** - * Finishes the specification of the sophisticated `contains` assertion where the [expected] value shall be searched - * (ignoring case), using a non disjoint search. - * - * Delegates to `werte(expected)`. - * - * Notice that a runtime check applies which assures that only [CharSequence], [Number] and [Char] are passed (this - * function expects `Any` for your convenience, so that you can mix [String] and [Int] for instance). - * - * By non disjoint is meant that 'aa' in 'aaaa' is found three times and not only two times. - * - * @param expected The value which is expected to be contained within the input of the search. - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - * @throws IllegalArgumentException in case [expected] is not a [CharSequence], [Number] or [Char]. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -@JvmName("wertGrossKleinschreibungIgnorierend") -fun CharSequenceContains.CheckerOption.wert(expected: Any): AssertionPlant - = werte(expected) - -/** - * Finishes the specification of the sophisticated `contains` assertion where the [expected] value as well as - * the [otherExpected] values shall be searched (ignoring case), using a non disjoint search. - * - * Notice that a runtime check applies which assures that only [CharSequence], [Number] and [Char] are passed (this - * function expects `Any` for your convenience, so that you can mix [String] and [Int] for instance). - * - * By non disjoint is meant that `'aa'` in `'aaaa'` is found three times and not only two times. - * Also notice, that it does not search for unique matches. Meaning, if the input of the search is `'a'` and [expected] - * is defined as `'a'` and one [otherExpected] is defined as `'a'` as well, then both match, even though they match the - * same sequence in the input of the search. - * - * @param expected The value which is expected to be contained within the input of the search. - * @param otherExpected Additional values which are expected to be contained within the input of the search. - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - * @throws IllegalArgumentException in case [expected] or one of the [otherExpected] is not a - * [CharSequence], [Number] or [Char]. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -@JvmName("werteGrossKleinschreibungIgnorierend") -fun CharSequenceContains.CheckerOption.werte(expected: Any, vararg otherExpected: Any): AssertionPlant - = addAssertion(AssertImpl.charSequence.contains.valuesIgnoringCase(this, expected glue otherExpected)) - -/** - * Finishes the specification of the sophisticated `contains` assertion where the [expected] value shall be searched - * (ignoring case), using a non disjoint search where it needs to be contained at least once. - * - * Delegates to `zumindest(1).wert(expected)`. - * - * Notice that a runtime check applies which assures that only [CharSequence], [Number] and [Char] are passed (this - * function expects `Any` for your convenience, so that you can mix [String] and [Int] for instance). - * - * By non disjoint is meant that 'aa' in 'aaaa' is found three times and not only two times. - * - * @param expected The value which is expected to be contained within the input of the search. - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - * @throws IllegalArgumentException in case [expected] is not a [CharSequence], [Number] or [Char]. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -fun CharSequenceContains.Builder.wert(expected: Any): AssertionPlant - = zumindest(1).wert(expected) - -/** - * Finishes the specification of the sophisticated `contains` assertion where the [expected] value as well as - * the [otherExpected] values shall be searched (ignoring case), using a non disjoint search - * where each need to be contained at least once. - * - * Delegates to `zumindest(1).werte(expected, otherExpected)` - * - * Notice that a runtime check applies which assures that only [CharSequence], [Number] and [Char] are passed (this - * function expects `Any` for your convenience, so that you can mix [String] and [Int] for instance). - * - * By non disjoint is meant that `'aa'` in `'aaaa'` is found three times and not only two times. - * Also notice, that it does not search for unique matches. Meaning, if the input of the search is `'a'` and [expected] - * is defined as `'a'` and one [otherExpected] is defined as `'a'` as well, then both match, even though they match the - * same sequence in the input of the search. - * - * @param expected The value which is expected to be contained within the input of the search. - * @param otherExpected Additional values which are expected to be contained within the input of the search. - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - * @throws IllegalArgumentException in case [expected] or one of the [otherExpected] is not a - * [CharSequence], [Number] or [Char]. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -fun CharSequenceContains.Builder.werte(expected: Any, vararg otherExpected: Any): AssertionPlant - = zumindest(1).werte(expected, *otherExpected) - -/** - * Finishes the specification of the sophisticated `contains` assertion where the given regular expression [pattern] - * as well as the [otherPatterns] are expected to have a match, using a non disjoint search. - * - * By non disjoint is meant that `'aa'` in `'aaaa'` is found three times and not only two times. - * Also notice, that it does not search for unique matches. Meaning, if the input of the search is `'ab'` and [pattern] - * is defined as `'a(b)?'` and one of the [otherPatterns] is defined as `'a(b)?'` as well, then both match, even though - * they match the same sequence in the input of the search. Use an option such as [zumindest], [hoechstens] and [genau] - * to control the number of occurrences you expect. - * - * Meaning you might want to use: - * `enthaelt.genau(2).regex('a(b)?')` - * instead of: - * `enthaelt.zumindest(1).regex('a(b)?', 'a(b)?')` - * - * @param pattern The pattern which is expected to have a match against the input of the search. - * @param otherPatterns Additional patterns which are expected to have a match against the input of the search. - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -fun CharSequenceContains.CheckerOption.regex(pattern: String, vararg otherPatterns: String): AssertionPlant - = addAssertion(AssertImpl.charSequence.contains.regex(this, pattern glue otherPatterns)) - -/** - * Finishes the specification of the sophisticated `contains` assertion where the given regular expression [pattern] - * as well as the [otherPatterns] are expected to have a match (ignoring case), using a non disjoint search. - * - * By non disjoint is meant that `'aa'` in `'aaaa'` is found three times and not only two times. - * Also notice, that it does not search for unique matches. Meaning, if the input of the search is `'ab'` and [pattern] - * is defined as `'a(b)?'` and one of the [otherPatterns] is defined as `'a(b)?'` as well, then both match, even though - * they match the same sequence in the input of the search. Use an option such as [zumindest], [hoechstens] and [genau] - * to control the number of occurrences you expect. - * - * Meaning you might want to use: - * `enthaelt.ignoriereGrossKleinschreibung.genau(2).regex('a(b)?')` - * instead of: - * `enthaelt.ignoriereGrossKleinschreibung.zumindest(1).regex('a(b)?', 'a(b)?')` - * - * @param pattern The pattern which is expected to have a match against the input of the search. - * @param otherPatterns Additional patterns which are expected to have a match against the input of the search. - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -@JvmName("regexIgnoringCase") -fun CharSequenceContains.CheckerOption.regex(pattern: String, vararg otherPatterns: String): AssertionPlant - = addAssertion(AssertImpl.charSequence.contains.regexIgnoringCase(this, pattern glue otherPatterns)) - -/** - * Finishes the specification of the sophisticated `contains` assertion where the given regular expression [pattern] - * as well as the [otherPatterns] are expected to to have at least one match (ignoring case), - * using a non disjoint search. - * - * Delegates to `zumindest(1).regex(pattern, otherPatterns)` - * - * By non disjoint is meant that `'aa'` in `'aaaa'` is found three times and not only two times. - * Also notice, that it does not search for unique matches. Meaning, if the input of the search is `'ab'` and [pattern] - * is defined as `'a(b)?'` and one of the [otherPatterns] is defined as `'a(b)?'` as well, then both match, even though - * they match the same sequence in the input of the search. Use an option such as [zumindest], [hoechstens] and [genau] - * to control the number of occurrences you expect. - * - * Meaning you might want to use: - * `enthaelt.ignoriereGrossKleinschreibung.genau(2).regex('a(b)?')` - * instead of: - * `enthaelt.ignoriereGrossKleinschreibung.zumindest(1).regex('a(b)?', 'a(b)?')` - * - * @param pattern The pattern which is expected to have a match against the input of the search. - * @param otherPatterns Additional patterns which are expected to have a match against the input of the search. - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -fun CharSequenceContains.Builder.regex(pattern: String, vararg otherPatterns: String): AssertionPlant - = zumindest(1).regex(pattern, *otherPatterns) - -/** - * Helper method to simplify adding assertions to the plant which itself is stored in - * [CharSequenceContains.CheckerOption.containsBuilder]. - * - * @return The plant to support a fluent API. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -private fun CharSequenceContains.CheckerOption.addAssertion(assertion: Assertion): AssertionPlant - = addAssertionForAssert(assertion) diff --git a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/charSequenceContainsDecorators.kt b/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/charSequenceContainsDecorators.kt deleted file mode 100644 index efa8bccc2..000000000 --- a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/charSequenceContainsDecorators.kt +++ /dev/null @@ -1,33 +0,0 @@ -@file:Suppress("DEPRECATION" /* will be removed with 1.0.0 */) -@file:JvmMultifileClass -@file:JvmName("CharSequenceContainsDecoratorsKt") -package ch.tutteli.atrium.api.cc.de_CH - -import ch.tutteli.atrium.api.cc.de_CH.creating.charsequence.contains.builders.NotCheckerOption -import ch.tutteli.atrium.api.cc.de_CH.creating.charsequence.contains.builders.impl.NotCheckerOptionImpl -import ch.tutteli.atrium.domain.builders.AssertImpl -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains -import ch.tutteli.atrium.domain.creating.charsequence.contains.searchbehaviours.IgnoringCaseSearchBehaviour -import ch.tutteli.atrium.domain.creating.charsequence.contains.searchbehaviours.NoOpSearchBehaviour -import ch.tutteli.atrium.domain.creating.charsequence.contains.searchbehaviours.NotSearchBehaviour -import kotlin.jvm.JvmMultifileClass -import kotlin.jvm.JvmName - -/** - * Defines that the search behaviour `ignore case` shall be applied to this sophisticated `contains` assertion. - * - * @return The newly created builder. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -val CharSequenceContains.Builder.ignoriereGrossKleinschreibung - get() : CharSequenceContains.Builder - = AssertImpl.charSequence.contains.searchBehaviours.ignoringCase(this) -/** - * Defines that the search behaviour `ignore case` shall be applied to this sophisticated `contains not` assertion. - * - * @return The newly created builder. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -val NotCheckerOption.ignoriereGrossKleinschreibung - get() : NotCheckerOption - = NotCheckerOptionImpl(containsBuilder.ignoriereGrossKleinschreibung) diff --git a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/collectionAssertions.kt b/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/collectionAssertions.kt deleted file mode 100644 index f476c623f..000000000 --- a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/collectionAssertions.kt +++ /dev/null @@ -1,69 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") - -package ch.tutteli.atrium.api.cc.de_CH - -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.domain.builders.AssertImpl - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject]'s [Collection.size] is [size]. - * - * Shortcut for `size.ist(expectedSize)` depends on the underlying implementation though. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -@Suppress("DEPRECATION") -fun > Assert.hatDieGroesse(size: Int) - = addAssertion(AssertImpl.collection.hasSize(this, size)) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] is an empty [Collection]. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -fun > Assert.istLeer() - = addAssertion(AssertImpl.collection.isEmpty(this)) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] is not an empty [Collection]. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -fun > Assert.istNichtLeer() - = addAssertion(AssertImpl.collection.isNotEmpty(this)) - -/** - * Creates an [AssertionPlant] for the [Assert.subject][SubjectProvider.subject]'s property - * [size][Collection.size] so that further fluent calls are assertions about it. - * - * Wrap it into Kotlin's [apply] if you want to make subsequent assertions on the current subject or use the overload - * which expects an assertionCreator lambda where sub assertions are evaluated together (form an assertion group block). - * - * @return The newly created [AssertionPlant]. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -val Assert>.size get(): Assert = property(Collection<*>::size) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject]'s property [size][Collection.size] - * holds all assertions the given [assertionCreator] might create for it. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if a created [Assertion]s (by calling [assertionCreator]) - * does not hold. - * @throws IllegalArgumentException in case the given [assertionCreator] did not create a single assertion. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -@Suppress("DEPRECATION") -fun > Assert.size (assertionCreator: Assert.() -> Unit): Assert - = addAssertion(AssertImpl.collection.size(this, assertionCreator)) diff --git a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/comparableAssertions.kt b/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/comparableAssertions.kt deleted file mode 100644 index 1bad294eb..000000000 --- a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/comparableAssertions.kt +++ /dev/null @@ -1,49 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") - -package ch.tutteli.atrium.api.cc.de_CH - -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.domain.builders.AssertImpl - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] is less than [expected]. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -fun > Assert.istKleinerAls(expected: T) - = addAssertion(AssertImpl.comparable.isLessThan(this, expected)) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] is less than or equals [expected]. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -fun > Assert.istKleinerOderGleich(expected: T) - = addAssertion(AssertImpl.comparable.isLessOrEquals(this, expected)) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] is greater than [expected]. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -fun > Assert.istGroesserAls(expected: T) - = addAssertion(AssertImpl.comparable.isGreaterThan(this, expected)) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] is greater than or equals [expected]. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -fun > Assert.istGroesserOderGleich(expected: T) - = addAssertion(AssertImpl.comparable.isGreaterOrEquals(this, expected)) - diff --git a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/creating/charsequence/contains/builders/AtLeastCheckerOption.kt b/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/creating/charsequence/contains/builders/AtLeastCheckerOption.kt deleted file mode 100644 index 4ce205a69..000000000 --- a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/creating/charsequence/contains/builders/AtLeastCheckerOption.kt +++ /dev/null @@ -1,18 +0,0 @@ -//TODO remove with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.api.cc.de_CH.creating.charsequence.contains.builders - -import ch.tutteli.atrium.domain.builders.creating.charsequence.contains.builders.WithTimesCheckerOption -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains - -/** - * Represents the extension point for another option after a `contains at least`-check within a sophisticated - * `contains` assertion building process for [CharSequence]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -interface AtLeastCheckerOption - : WithTimesCheckerOption diff --git a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/creating/charsequence/contains/builders/AtMostCheckerOption.kt b/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/creating/charsequence/contains/builders/AtMostCheckerOption.kt deleted file mode 100644 index 009137543..000000000 --- a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/creating/charsequence/contains/builders/AtMostCheckerOption.kt +++ /dev/null @@ -1,17 +0,0 @@ -//TODO remove with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.api.cc.de_CH.creating.charsequence.contains.builders - -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains - -/** - * Represents the extension point for another option after a `contains at least once but at most`-check within - * a sophisticated `contains` assertion building process for [CharSequence]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -interface AtMostCheckerOption - : CharSequenceContains.CheckerOption diff --git a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/creating/charsequence/contains/builders/ButAtMostCheckerOption.kt b/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/creating/charsequence/contains/builders/ButAtMostCheckerOption.kt deleted file mode 100644 index e4a1be51c..000000000 --- a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/creating/charsequence/contains/builders/ButAtMostCheckerOption.kt +++ /dev/null @@ -1,17 +0,0 @@ -//TODO remove with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.api.cc.de_CH.creating.charsequence.contains.builders - -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains - -/** - * Represents the extension point for another option after a `contains at least but at most`-check within - * a sophisticated `contains` assertion building process for [CharSequence]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -interface ButAtMostCheckerOption - : CharSequenceContains.CheckerOption diff --git a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/creating/charsequence/contains/builders/ExactlyCheckerOption.kt b/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/creating/charsequence/contains/builders/ExactlyCheckerOption.kt deleted file mode 100644 index 4724e1e1d..000000000 --- a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/creating/charsequence/contains/builders/ExactlyCheckerOption.kt +++ /dev/null @@ -1,17 +0,0 @@ -//TODO remove with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.api.cc.de_CH.creating.charsequence.contains.builders - -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains - -/** - * Represents the extension point for another option after a `contains exactly`-check within - * a sophisticated `contains` assertion building process for [CharSequence]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -interface ExactlyCheckerOption - : CharSequenceContains.CheckerOption diff --git a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/creating/charsequence/contains/builders/NotCheckerOption.kt b/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/creating/charsequence/contains/builders/NotCheckerOption.kt deleted file mode 100644 index 6ca87c23a..000000000 --- a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/creating/charsequence/contains/builders/NotCheckerOption.kt +++ /dev/null @@ -1,17 +0,0 @@ -//TODO remove with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.api.cc.de_CH.creating.charsequence.contains.builders - -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains - -/** - * Represents the extension point for another option after a `contains not at all`-check within - * a sophisticated `contains` assertion building process for [CharSequence]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -interface NotCheckerOption - : CharSequenceContains.CheckerOption diff --git a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/creating/charsequence/contains/builders/NotOrAtMostCheckerOption.kt b/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/creating/charsequence/contains/builders/NotOrAtMostCheckerOption.kt deleted file mode 100644 index 8edff28b7..000000000 --- a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/creating/charsequence/contains/builders/NotOrAtMostCheckerOption.kt +++ /dev/null @@ -1,17 +0,0 @@ -//TODO remove with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.api.cc.de_CH.creating.charsequence.contains.builders - -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains - -/** - * Represents the extension point for another option after a `contains not or at most`-check within - * a sophisticated `contains` assertion building process for [CharSequence]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -interface NotOrAtMostCheckerOption - : CharSequenceContains.CheckerOption diff --git a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/creating/charsequence/contains/builders/impl/AtLeastCheckerOptionImpl.kt b/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/creating/charsequence/contains/builders/impl/AtLeastCheckerOptionImpl.kt deleted file mode 100644 index 4bb57a951..000000000 --- a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/creating/charsequence/contains/builders/impl/AtLeastCheckerOptionImpl.kt +++ /dev/null @@ -1,31 +0,0 @@ -@file:Suppress("DEPRECATION" /* will be removed with 1.0.0 */) -package ch.tutteli.atrium.api.cc.de_CH.creating.charsequence.contains.builders.impl - -import ch.tutteli.atrium.api.cc.de_CH.creating.charsequence.contains.builders.AtLeastCheckerOption -import ch.tutteli.atrium.api.cc.de_CH.zumindest -import ch.tutteli.atrium.domain.builders.creating.charsequence.contains.builders.AtLeastCheckerOptionBase -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains - -/** - * Represents the builder of a `contains at least`-check within the fluent API of a sophisticated - * `contains` assertion for [CharSequence]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - * - * @constructor Represents the builder of a `contains at least` check within the fluent API of a sophisticated - * `contains` assertion for [CharSequence]. - * @param times The number which the check will compare against the actual number of times an expected object is - * found in the input of the search. - * @param containsBuilder The previously used [CharSequenceContains.Builder]. - */ -@Deprecated("Do not rely on this type; will be made internal with 1.0.0", ReplaceWith("AtLeastCheckerBuilder")) -open class AtLeastCheckerOptionImpl( - times: Int, - containsBuilder: CharSequenceContains.Builder -) : AtLeastCheckerOptionBase( - times, - containsBuilder, - nameContainsNotValuesFun(), - { "${containsBuilder::zumindest.name}($it)" } -), AtLeastCheckerOption diff --git a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/creating/charsequence/contains/builders/impl/AtMostCheckerOptionImpl.kt b/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/creating/charsequence/contains/builders/impl/AtMostCheckerOptionImpl.kt deleted file mode 100644 index 079c54423..000000000 --- a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/creating/charsequence/contains/builders/impl/AtMostCheckerOptionImpl.kt +++ /dev/null @@ -1,35 +0,0 @@ -@file:Suppress("DEPRECATION" /* will be removed with 1.0.0 */) -package ch.tutteli.atrium.api.cc.de_CH.creating.charsequence.contains.builders.impl - -import ch.tutteli.atrium.api.cc.de_CH.creating.charsequence.contains.builders.AtMostCheckerOption -import ch.tutteli.atrium.api.cc.de_CH.genau -import ch.tutteli.atrium.api.cc.de_CH.hoechstens -import ch.tutteli.atrium.api.cc.de_CH.zumindest -import ch.tutteli.atrium.domain.builders.creating.charsequence.contains.builders.AtMostCheckerOptionBase -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains - -/** - * Represents the builder of a `contains at least once but at most` check within the fluent API of a - * sophisticated `contains` assertion for [CharSequence]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - * - * @constructor Represents the builder of a `contains at least once but at most` check within the fluent API of a - * sophisticated `contains` assertion for [CharSequence]. - * @param times The number which the check will compare against the actual number of times an expected object is - * found in the input of the search. - * @param containsBuilder The previously used [CharSequenceContains.Builder]. - */ -@Deprecated("Do not rely on this type; will be made internal with 1.0.0", ReplaceWith("AtMostCheckerBuilder")) -open class AtMostCheckerOptionImpl( - times: Int, - containsBuilder: CharSequenceContains.Builder -) : AtMostCheckerOptionBase( - times, - containsBuilder, - nameContainsNotValuesFun(), - { "${containsBuilder::hoechstens.name}($it)" }, - { "${containsBuilder::zumindest.name}($it)" }, - { "${containsBuilder::genau.name}($it)" } -), AtMostCheckerOption diff --git a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/creating/charsequence/contains/builders/impl/ButAtMostCheckerOptionImpl.kt b/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/creating/charsequence/contains/builders/impl/ButAtMostCheckerOptionImpl.kt deleted file mode 100644 index f6f676b82..000000000 --- a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/creating/charsequence/contains/builders/impl/ButAtMostCheckerOptionImpl.kt +++ /dev/null @@ -1,41 +0,0 @@ -@file:Suppress("DEPRECATION" /* will be removed with 1.0.0 */) -package ch.tutteli.atrium.api.cc.de_CH.creating.charsequence.contains.builders.impl - -import ch.tutteli.atrium.api.cc.de_CH.aberHoechstens -import ch.tutteli.atrium.api.cc.de_CH.creating.charsequence.contains.builders.AtLeastCheckerOption -import ch.tutteli.atrium.api.cc.de_CH.creating.charsequence.contains.builders.ButAtMostCheckerOption -import ch.tutteli.atrium.api.cc.de_CH.genau -import ch.tutteli.atrium.api.cc.de_CH.hoechstens -import ch.tutteli.atrium.api.cc.de_CH.zumindest -import ch.tutteli.atrium.domain.builders.creating.charsequence.contains.builders.ButAtMostCheckerOptionBase -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains - -/** - * Represents the builder of the second step of a `contains at least but at most` check within the - * fluent API of a sophisticated `contains` assertion for [CharSequence]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied to the input of the search. - * - * @constructor Represents the builder of the second step of a `contains at least but at most` check within the - * fluent API of a sophisticated `contains` assertion for [CharSequence]. - * @param times The number which the check will compare against the actual number of times an expected object is - * found in the input of the search. - * @param containsBuilder The previously used [CharSequenceContains.Builder]. - */ -@Deprecated("Do not rely on this type; will be made internal with 1.0.0", ReplaceWith("ButAtMostCheckerBuilder")) -open class ButAtMostCheckerOptionImpl( - times: Int, - atLeastBuilder: AtLeastCheckerOption, - containsBuilder: CharSequenceContains.Builder -) : ButAtMostCheckerOptionBase( - times, - atLeastBuilder, - containsBuilder, - nameContainsNotValuesFun(), - { l, u -> "${containsBuilder::zumindest.name}($l).${atLeastBuilder::aberHoechstens.name}($u)" }, - { "${containsBuilder::hoechstens.name}($it)" }, - { "${containsBuilder::zumindest.name}($it)" }, - { "${atLeastBuilder::aberHoechstens.name}($it)" }, - { "${containsBuilder::genau.name}($it)" } -), ButAtMostCheckerOption diff --git a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/creating/charsequence/contains/builders/impl/ExactlyCheckerOptionImpl.kt b/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/creating/charsequence/contains/builders/impl/ExactlyCheckerOptionImpl.kt deleted file mode 100644 index cfd7b2768..000000000 --- a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/creating/charsequence/contains/builders/impl/ExactlyCheckerOptionImpl.kt +++ /dev/null @@ -1,31 +0,0 @@ -@file:Suppress("DEPRECATION" /* will be removed with 1.0.0 */) -package ch.tutteli.atrium.api.cc.de_CH.creating.charsequence.contains.builders.impl - -import ch.tutteli.atrium.api.cc.de_CH.creating.charsequence.contains.builders.ExactlyCheckerOption -import ch.tutteli.atrium.api.cc.de_CH.genau -import ch.tutteli.atrium.domain.builders.creating.charsequence.contains.builders.ExactlyCheckerOptionBase -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains - -/** - * Represents the builder of a `contains exactly` check within the fluent API of a sophisticated - * `contains` assertion for [CharSequence]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - * - * @constructor Represents the builder of a `contains exactly` check within the fluent API of a sophisticated - * `contains` assertion for [CharSequence]. - * @param times The number which the check will compare against the actual number of times an expected object is - * found in the input of the search. - * @param containsBuilder The previously used [CharSequenceContains.Builder]. - */ -@Deprecated("Do not rely on this type; will be made internal with 1.0.0", ReplaceWith("ExactlyCheckerBuilder")) -open class ExactlyCheckerOptionImpl( - times: Int, - containsBuilder: CharSequenceContains.Builder -) : ExactlyCheckerOptionBase( - times, - containsBuilder, - nameContainsNotValuesFun(), - { "${containsBuilder::genau.name}($it)" } -), ExactlyCheckerOption diff --git a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/creating/charsequence/contains/builders/impl/NotCheckerOptionImpl.kt b/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/creating/charsequence/contains/builders/impl/NotCheckerOptionImpl.kt deleted file mode 100644 index 3ccab464e..000000000 --- a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/creating/charsequence/contains/builders/impl/NotCheckerOptionImpl.kt +++ /dev/null @@ -1,23 +0,0 @@ -@file:Suppress("DEPRECATION" /* will be removed with 1.0.0 */) -package ch.tutteli.atrium.api.cc.de_CH.creating.charsequence.contains.builders.impl - -import ch.tutteli.atrium.api.cc.de_CH.creating.charsequence.contains.builders.NotCheckerOption -import ch.tutteli.atrium.domain.builders.creating.charsequence.contains.builders.NotCheckerOptionBase -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains - -/** - * Represents the builder of a `contains not at all` check within the fluent API of a sophisticated - * `contains` assertion for [CharSequence]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - * - * @constructor Represents the builder of a `contains not at all` check within the fluent API of a sophisticated - * `contains` assertion for [CharSequence]. - * @param containsBuilder The previously used [CharSequenceContains.Builder]. - */ -@Deprecated("Do not rely on this type; will be made internal with 1.0.0", ReplaceWith("NotCheckerBuilder")) -open class NotCheckerOptionImpl( - containsBuilder: CharSequenceContains.Builder -) : NotCheckerOptionBase(containsBuilder), - NotCheckerOption diff --git a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/creating/charsequence/contains/builders/impl/NotOrAtMostCheckerOptionImpl.kt b/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/creating/charsequence/contains/builders/impl/NotOrAtMostCheckerOptionImpl.kt deleted file mode 100644 index 57af1d247..000000000 --- a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/creating/charsequence/contains/builders/impl/NotOrAtMostCheckerOptionImpl.kt +++ /dev/null @@ -1,31 +0,0 @@ -@file:Suppress("DEPRECATION" /* will be removed with 1.0.0 */) -package ch.tutteli.atrium.api.cc.de_CH.creating.charsequence.contains.builders.impl - -import ch.tutteli.atrium.api.cc.de_CH.creating.charsequence.contains.builders.NotOrAtMostCheckerOption -import ch.tutteli.atrium.api.cc.de_CH.nichtOderHoechstens -import ch.tutteli.atrium.domain.builders.creating.charsequence.contains.builders.NotOrAtMostCheckerOptionBase -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains - -/** - * Represents the builder of a `contains not or at most` check within the fluent API of a - * sophisticated `contains` assertion for [CharSequence]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - * - * @constructor Represents the builder of a `contains not or at most` check within the fluent API of a - * sophisticated `contains` assertion for [CharSequence]. - * @param times The number which the check will compare against the actual number of times an expected object is - * found in the input of the search. - * @param containsBuilder The previously used [CharSequenceContains.Builder]. - */ -@Deprecated("Do not rely on this type; will be made internal with 1.0.0", ReplaceWith("NotOrAtMostCheckerBuilder")) -open class NotOrAtMostCheckerOptionImpl( - times: Int, - containsBuilder: CharSequenceContains.Builder -) : NotOrAtMostCheckerOptionBase( - times, - containsBuilder, - nameContainsNotValuesFun(), - { "${containsBuilder::nichtOderHoechstens.name}($it)" } -), NotOrAtMostCheckerOption diff --git a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/creating/charsequence/contains/builders/impl/nameContainsNotFun.kt b/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/creating/charsequence/contains/builders/impl/nameContainsNotFun.kt deleted file mode 100644 index 51cd33484..000000000 --- a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/creating/charsequence/contains/builders/impl/nameContainsNotFun.kt +++ /dev/null @@ -1,11 +0,0 @@ -@file:Suppress("DEPRECATION" /* will be removed with 1.0.0 */) -package ch.tutteli.atrium.api.cc.de_CH.creating.charsequence.contains.builders.impl - -import ch.tutteli.atrium.api.cc.de_CH.enthaeltNicht -import ch.tutteli.atrium.creating.AssertionPlant -import kotlin.reflect.KFunction3 - -internal fun nameContainsNotValuesFun(): String { - val f: KFunction3, Any, Array, AssertionPlant> = AssertionPlant::enthaeltNicht - return f.name -} diff --git a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/creating/iterable/contains/builders/AtLeastCheckerOption.kt b/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/creating/iterable/contains/builders/AtLeastCheckerOption.kt deleted file mode 100644 index 4951dfddd..000000000 --- a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/creating/iterable/contains/builders/AtLeastCheckerOption.kt +++ /dev/null @@ -1,18 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.api.cc.de_CH.creating.iterable.contains.builders - -import ch.tutteli.atrium.domain.builders.creating.iterable.contains.builders.WithTimesCheckerOption -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains - -/** - * Represents the extension point for another option after a `contains at least`-check within a sophisticated - * `contains` assertion building process for [Iterable]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -interface AtLeastCheckerOption, out S : IterableContains.SearchBehaviour> - : WithTimesCheckerOption diff --git a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/creating/iterable/contains/builders/AtMostCheckerOption.kt b/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/creating/iterable/contains/builders/AtMostCheckerOption.kt deleted file mode 100644 index e088f237e..000000000 --- a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/creating/iterable/contains/builders/AtMostCheckerOption.kt +++ /dev/null @@ -1,18 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.api.cc.de_CH.creating.iterable.contains.builders - -import ch.tutteli.atrium.domain.builders.creating.iterable.contains.builders.WithTimesCheckerOption -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains - -/** - * Represents the extension point for another option after a `contains at least once but at most`-check within - * a sophisticated `contains` assertion building process for [Iterable]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -interface AtMostCheckerOption, out S : IterableContains.SearchBehaviour> - : WithTimesCheckerOption diff --git a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/creating/iterable/contains/builders/ButAtMostCheckerOption.kt b/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/creating/iterable/contains/builders/ButAtMostCheckerOption.kt deleted file mode 100644 index 5c16949c6..000000000 --- a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/creating/iterable/contains/builders/ButAtMostCheckerOption.kt +++ /dev/null @@ -1,18 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.api.cc.de_CH.creating.iterable.contains.builders - -import ch.tutteli.atrium.domain.builders.creating.iterable.contains.builders.WithTimesCheckerOption -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains - -/** - * Represents the extension point for another option after a `contains at least but at most`-check within a - * sophisticated `contains` assertion building process for [Iterable]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -interface ButAtMostCheckerOption, out S : IterableContains.SearchBehaviour> - : WithTimesCheckerOption diff --git a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/creating/iterable/contains/builders/ExactlyCheckerOption.kt b/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/creating/iterable/contains/builders/ExactlyCheckerOption.kt deleted file mode 100644 index 231a0dc4b..000000000 --- a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/creating/iterable/contains/builders/ExactlyCheckerOption.kt +++ /dev/null @@ -1,18 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.api.cc.de_CH.creating.iterable.contains.builders - -import ch.tutteli.atrium.domain.builders.creating.iterable.contains.builders.WithTimesCheckerOption -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains - -/** - * Represents the extension point for another option after a `contains exactly`-check within - * a sophisticated `contains` assertion building process for [Iterable]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -interface ExactlyCheckerOption, out S : IterableContains.SearchBehaviour> - : WithTimesCheckerOption diff --git a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/creating/iterable/contains/builders/NotCheckerOption.kt b/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/creating/iterable/contains/builders/NotCheckerOption.kt deleted file mode 100644 index 32212b60b..000000000 --- a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/creating/iterable/contains/builders/NotCheckerOption.kt +++ /dev/null @@ -1,17 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.api.cc.de_CH.creating.iterable.contains.builders - -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains - -/** - * Represents the extension point for another option after a `contains not at all`-check within - * a sophisticated `contains` assertion building process for [Iterable]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -interface NotCheckerOption, out S : IterableContains.SearchBehaviour> - : IterableContains.CheckerOption diff --git a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/creating/iterable/contains/builders/NotOrAtMostCheckerOption.kt b/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/creating/iterable/contains/builders/NotOrAtMostCheckerOption.kt deleted file mode 100644 index 7fb4de68f..000000000 --- a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/creating/iterable/contains/builders/NotOrAtMostCheckerOption.kt +++ /dev/null @@ -1,18 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.api.cc.de_CH.creating.iterable.contains.builders - -import ch.tutteli.atrium.domain.builders.creating.iterable.contains.builders.WithTimesCheckerOption -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains - -/** - * Represents the extension point for another option after a `contains not or at most`-check within - * a sophisticated `contains` assertion building process for [Iterable]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -interface NotOrAtMostCheckerOption, out S : IterableContains.SearchBehaviour> - : WithTimesCheckerOption diff --git a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/creating/iterable/contains/builders/impl/AtLeastCheckerOptionImpl.kt b/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/creating/iterable/contains/builders/impl/AtLeastCheckerOptionImpl.kt deleted file mode 100644 index 67ae4a141..000000000 --- a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/creating/iterable/contains/builders/impl/AtLeastCheckerOptionImpl.kt +++ /dev/null @@ -1,31 +0,0 @@ -@file:Suppress("DEPRECATION" /* will be removed with 1.0.0 */) -package ch.tutteli.atrium.api.cc.de_CH.creating.iterable.contains.builders.impl - -import ch.tutteli.atrium.api.cc.de_CH.creating.iterable.contains.builders.AtLeastCheckerOption -import ch.tutteli.atrium.api.cc.de_CH.zumindest -import ch.tutteli.atrium.domain.builders.creating.iterable.contains.builders.AtLeastCheckerOptionBase -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InAnyOrderSearchBehaviour - -/** - * Represents the builder of a `contains at least` check within the fluent API of a sophisticated - * `contains` assertion for [Iterable]. - * - * @param T The input type of the search. - * - * @constructor Represents the builder of a `contains at least` check within the fluent API of a sophisticated - * `contains` assertion for [Iterable]. - * @param times The number which the check will compare against the actual number of times an expected entry is - * found in the [Iterable]. - * @param containsBuilder The previously used [IterableContains.Builder]. - */ -@Deprecated("Do not rely on this type; will be made internal with 1.0.0", ReplaceWith("AtLeastCheckerBuilder")) -open class AtLeastCheckerOptionImpl, out S : InAnyOrderSearchBehaviour>( - times: Int, - containsBuilder: IterableContains.Builder -) : AtLeastCheckerOptionBase( - times, - containsBuilder, - nameContainsNotValuesFun(), - { "${containsBuilder::zumindest.name}($it)" } -), AtLeastCheckerOption diff --git a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/creating/iterable/contains/builders/impl/AtMostCheckerOptionImpl.kt b/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/creating/iterable/contains/builders/impl/AtMostCheckerOptionImpl.kt deleted file mode 100644 index 61fe03cc3..000000000 --- a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/creating/iterable/contains/builders/impl/AtMostCheckerOptionImpl.kt +++ /dev/null @@ -1,35 +0,0 @@ -@file:Suppress("DEPRECATION" /* will be removed with 1.0.0 */) -package ch.tutteli.atrium.api.cc.de_CH.creating.iterable.contains.builders.impl - -import ch.tutteli.atrium.api.cc.de_CH.creating.iterable.contains.builders.AtMostCheckerOption -import ch.tutteli.atrium.api.cc.de_CH.genau -import ch.tutteli.atrium.api.cc.de_CH.hoechstens -import ch.tutteli.atrium.api.cc.de_CH.zumindest -import ch.tutteli.atrium.domain.builders.creating.iterable.contains.builders.AtMostCheckerOptionBase -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InAnyOrderSearchBehaviour - -/** - * Represents the builder of a `contains at least once but at most` check within the fluent API of a - * sophisticated `contains` assertion for [Iterable]. - * - * @param T The input type of the search. - * - * @constructor Represents the builder of a `contains at least once but at most` check within the fluent API of a - * sophisticated `contains` assertion for [Iterable]. - * @param times The number which the check will compare against the actual number of times an expected entry is - * found in the [Iterable]. - * @param containsBuilder The previously used [IterableContains.Builder]. - */ -@Deprecated("Do not rely on this type; will be made internal with 1.0.0", ReplaceWith("AtMostCheckerBuilder")) -open class AtMostCheckerOptionImpl, out S : InAnyOrderSearchBehaviour>( - times: Int, - containsBuilder: IterableContains.Builder -) : AtMostCheckerOptionBase( - times, - containsBuilder, - nameContainsNotValuesFun(), - { "${containsBuilder::hoechstens.name}($it)" }, - { "${containsBuilder::zumindest.name}($it)" }, - { "${containsBuilder::genau.name}($it)" } -), AtMostCheckerOption diff --git a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/creating/iterable/contains/builders/impl/ButAtMostCheckerOptionImpl.kt b/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/creating/iterable/contains/builders/impl/ButAtMostCheckerOptionImpl.kt deleted file mode 100644 index 2cccd3b6b..000000000 --- a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/creating/iterable/contains/builders/impl/ButAtMostCheckerOptionImpl.kt +++ /dev/null @@ -1,41 +0,0 @@ -@file:Suppress("DEPRECATION" /* will be removed with 1.0.0 */) -package ch.tutteli.atrium.api.cc.de_CH.creating.iterable.contains.builders.impl - -import ch.tutteli.atrium.api.cc.de_CH.aberHoechstens -import ch.tutteli.atrium.api.cc.de_CH.creating.iterable.contains.builders.AtLeastCheckerOption -import ch.tutteli.atrium.api.cc.de_CH.creating.iterable.contains.builders.ButAtMostCheckerOption -import ch.tutteli.atrium.api.cc.de_CH.genau -import ch.tutteli.atrium.api.cc.de_CH.hoechstens -import ch.tutteli.atrium.api.cc.de_CH.zumindest -import ch.tutteli.atrium.domain.builders.creating.iterable.contains.builders.ButAtMostCheckerOptionBase -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InAnyOrderSearchBehaviour - -/** - * Represents the builder of the second step of a `contains at least but at most` check within the - * fluent API of a sophisticated `contains` assertion for [Iterable]. - * - * @param T The input type of the search. - * - * @constructor Represents the builder of the second step of a `contains at least but at most` check within the - * fluent API of a sophisticated `contains` assertion for [Iterable]. - * @param times The number which the check will compare against the actual number of times an expected entry is - * found in the [Iterable]. - * @param containsBuilder The previously used [IterableContains.Builder]. - */ -@Deprecated("Do not rely on this type; will be made internal with 1.0.0", ReplaceWith("ButAtMostCheckerBuilder")) -open class ButAtMostCheckerOptionImpl, out S : InAnyOrderSearchBehaviour>( - times: Int, - atLeastBuilder: AtLeastCheckerOption, - containsBuilder: IterableContains.Builder -) : ButAtMostCheckerOptionBase( - times, - atLeastBuilder, - containsBuilder, - nameContainsNotValuesFun(), - { l, u -> "${containsBuilder::zumindest.name}($l).${atLeastBuilder::aberHoechstens.name}($u)" }, - { "${containsBuilder::hoechstens.name}($it)" }, - { "${containsBuilder::zumindest.name}($it)" }, - { "${atLeastBuilder::aberHoechstens.name}($it)" }, - { "${containsBuilder::genau.name}($it)" } -), ButAtMostCheckerOption diff --git a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/creating/iterable/contains/builders/impl/ExactlyCheckerOptionImpl.kt b/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/creating/iterable/contains/builders/impl/ExactlyCheckerOptionImpl.kt deleted file mode 100644 index 02f80d860..000000000 --- a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/creating/iterable/contains/builders/impl/ExactlyCheckerOptionImpl.kt +++ /dev/null @@ -1,31 +0,0 @@ -@file:Suppress("DEPRECATION" /* will be removed with 1.0.0 */) -package ch.tutteli.atrium.api.cc.de_CH.creating.iterable.contains.builders.impl - -import ch.tutteli.atrium.api.cc.de_CH.creating.iterable.contains.builders.ExactlyCheckerOption -import ch.tutteli.atrium.api.cc.de_CH.genau -import ch.tutteli.atrium.domain.builders.creating.iterable.contains.builders.ExactlyCheckerOptionBase -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InAnyOrderSearchBehaviour - -/** - * Represents the builder of a `contains exactly` check within the fluent API of a sophisticated - * `contains` assertion for [Iterable]. - * - * @param T The input type of the search. - * - * @constructor Represents the builder of a `contains exactly` check within the fluent API of a sophisticated - * `contains` assertion for [Iterable]. - * @param times The number which the check will compare against the actual number of times an expected entry is - * found in the [Iterable]. - * @param containsBuilder The previously used [IterableContains.Builder]. - */ -@Deprecated("Do not rely on this type; will be made internal with 1.0.0", ReplaceWith("ExactlyCheckerBuilder")) -open class ExactlyCheckerOptionImpl, out S : InAnyOrderSearchBehaviour>( - times: Int, - containsBuilder: IterableContains.Builder -) : ExactlyCheckerOptionBase( - times, - containsBuilder, - nameContainsNotValuesFun(), - { "${containsBuilder::genau.name}($it)" } -), ExactlyCheckerOption diff --git a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/creating/iterable/contains/builders/impl/NotCheckerOptionImpl.kt b/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/creating/iterable/contains/builders/impl/NotCheckerOptionImpl.kt deleted file mode 100644 index 989acd8fa..000000000 --- a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/creating/iterable/contains/builders/impl/NotCheckerOptionImpl.kt +++ /dev/null @@ -1,24 +0,0 @@ -@file:Suppress("DEPRECATION" /* will be removed with 1.0.0 */) -package ch.tutteli.atrium.api.cc.de_CH.creating.iterable.contains.builders.impl - -import ch.tutteli.atrium.api.cc.de_CH.creating.iterable.contains.builders.NotCheckerOption -import ch.tutteli.atrium.domain.builders.creating.iterable.contains.builders.NotCheckerOptionBase -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InAnyOrderSearchBehaviour - -/** - * Represents the builder of a `contains not at all` check within the fluent API of a sophisticated - * `contains` assertion for [Iterable]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - * - * @constructor Represents the builder of a `contains not at all` check within the fluent API of a sophisticated - * `contains not` assertion for [Iterable]. - * @param containsBuilder The previously used [IterableContains.Builder]. - */ -@Deprecated("Do not rely on this type; will be made internal with 1.0.0", ReplaceWith("NotCheckerBuilder")) -open class NotCheckerOptionImpl, out S : InAnyOrderSearchBehaviour>( - containsBuilder: IterableContains.Builder -) : NotCheckerOptionBase(containsBuilder), - NotCheckerOption diff --git a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/creating/iterable/contains/builders/impl/NotOrAtMostCheckerOptionImpl.kt b/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/creating/iterable/contains/builders/impl/NotOrAtMostCheckerOptionImpl.kt deleted file mode 100644 index af7da6ee4..000000000 --- a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/creating/iterable/contains/builders/impl/NotOrAtMostCheckerOptionImpl.kt +++ /dev/null @@ -1,31 +0,0 @@ -@file:Suppress("DEPRECATION" /* will be removed with 1.0.0 */) -package ch.tutteli.atrium.api.cc.de_CH.creating.iterable.contains.builders.impl - -import ch.tutteli.atrium.api.cc.de_CH.creating.iterable.contains.builders.NotOrAtMostCheckerOption -import ch.tutteli.atrium.api.cc.de_CH.nichtOderHoechstens -import ch.tutteli.atrium.domain.builders.creating.iterable.contains.builders.NotOrAtMostCheckerOptionBase -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InAnyOrderSearchBehaviour - -/** - * Represents the builder of a `contains not or at most` check within the fluent API of a - * sophisticated `contains` assertion for [Iterable]. - * - * @param T The input type of the search. - * - * @constructor Represents the builder of a `contains at least once but at most` check within the fluent API of a - * sophisticated `contains` assertion for [Iterable]. - * @param times The number which the check will compare against the actual number of times an expected entry is - * found in the [Iterable]. - * @param containsBuilder The previously used [IterableContains.Builder]. - */ -@Deprecated("Do not rely on this type; will be made internal with 1.0.0", ReplaceWith("NotOrAtMostCheckerBuilder")) -open class NotOrAtMostCheckerOptionImpl, out S : InAnyOrderSearchBehaviour>( - times: Int, - containsBuilder: IterableContains.Builder -) : NotOrAtMostCheckerOptionBase( - times, - containsBuilder, - nameContainsNotValuesFun(), - { "${containsBuilder::nichtOderHoechstens.name}($it)" } -), NotOrAtMostCheckerOption diff --git a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/creating/iterable/contains/builders/impl/nameContainsNotFun.kt b/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/creating/iterable/contains/builders/impl/nameContainsNotFun.kt deleted file mode 100644 index efbf7e66c..000000000 --- a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/creating/iterable/contains/builders/impl/nameContainsNotFun.kt +++ /dev/null @@ -1,11 +0,0 @@ -@file:Suppress("DEPRECATION" /* will be removed with 1.0.0 */) -package ch.tutteli.atrium.api.cc.de_CH.creating.iterable.contains.builders.impl - -import ch.tutteli.atrium.api.cc.de_CH.enthaeltNicht -import ch.tutteli.atrium.creating.AssertionPlant -import kotlin.reflect.KFunction3 - -internal fun nameContainsNotValuesFun(): String { - val f: KFunction3>, Double, Array, AssertionPlant>> = AssertionPlant>::enthaeltNicht - return f.name -} diff --git a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/featureAssertions.kt b/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/featureAssertions.kt deleted file mode 100644 index a5afaf77c..000000000 --- a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/featureAssertions.kt +++ /dev/null @@ -1,677 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") - -package ch.tutteli.atrium.api.cc.de_CH - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.assertions.AssertionGroup -import ch.tutteli.atrium.assertions.FeatureAssertionGroupType -import ch.tutteli.atrium.creating.* -import ch.tutteli.atrium.domain.builders.AssertImpl -import ch.tutteli.atrium.domain.builders.creating.PleaseUseReplacementException -import kotlin.jvm.JvmName -import kotlin.reflect.* - -/** - * Creates an [AssertionPlant] for the given [property] which eventually adds [AssertionGroup]s with a - * [FeatureAssertionGroupType], containing the assertions created for the given [property], to the current plant. - * - * @return An [AssertionPlant] for the given [property]. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -fun Assert.property(property: KProperty0): AssertionPlant - = AssertImpl.feature.property(this, property) - -@Suppress("DeprecatedCallableAddReplaceWith", "unused", "UNUSED_PARAMETER") -@Deprecated("Use the overload with KProperty1 instead, this way you do not access `subject` too early. Use `YourClass::property` instead of `subject::property`") -fun CollectingAssertionPlant.property(property: KProperty0): AssertionPlant - = throw PleaseUseReplacementException("Use the overload with KProperty1 instead, this way you do not access `subject` too early. Use `YourClass::property` instead of `subject::property`") - -/** - * Creates an [AssertionPlant] for the given [property] which eventually adds [AssertionGroup]s with a - * [FeatureAssertionGroupType], containing the assertions created for the given [property], to the current plant. - * - * @return An [AssertionPlant] for the given [property]. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -fun Assert.property(property: KProperty1): AssertionPlant - = AssertImpl.feature.property(this, property) - - -/** - * Creates an [AssertionPlant] for the given [property] which eventually adds [AssertionGroup]s with a - * [FeatureAssertionGroupType], containing the assertions created for the given [property], to the current plant -- - * starting with a group consisting of the [Assertion]s created by the [assertionCreator] lambda. - * - * @return An [AssertionPlant] for the given [property]. - * - * @throws AssertionError Might throw an [AssertionError] if an additionally created [Assertion] - * (by calling [assertionCreator]) does not hold. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -fun Assert.property(property: KProperty0, assertionCreator: Assert.() -> Unit): AssertionPlant - = AssertImpl.feature.property(this, property, assertionCreator) - -@Suppress("DeprecatedCallableAddReplaceWith", "unused", "UNUSED_PARAMETER") -@Deprecated("Use the overload with KProperty1 instead, this way you do not access `subject` too early. Use `YourClass::property` instead of `subject::property`") -fun CollectingAssertionPlant.property(property: KProperty0, assertionCreator: Assert.() -> Unit): AssertionPlant - = throw PleaseUseReplacementException("Use the overload with KProperty1 instead, this way you do not access `subject` too early. Use `YourClass::property` instead of `subject::property`") - -/** - * Creates an [AssertionPlant] for the given [property] which eventually adds [AssertionGroup]s with a - * [FeatureAssertionGroupType], containing the assertions created for the given [property], to the current plant -- - * starting with a group consisting of the [Assertion]s created by the [assertionCreator] lambda. - * - * @return An [AssertionPlant] for the given [property]. - * - * @throws AssertionError Might throw an [AssertionError] if an additionally created [Assertion] - * (by calling [assertionCreator]) does not hold. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -fun Assert.property(property: KProperty1, assertionCreator: Assert.() -> Unit): AssertionPlant - = AssertImpl.feature.property(this, property, assertionCreator) - - -/** - * Creates an [AssertionPlantNullable] for the given [property] which eventually adds [AssertionGroup]s with a - * [FeatureAssertionGroupType], containing the assertions created for the given [property], to the current plant. - * - * @return An [AssertionPlantNullable] for the given [property]. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -fun Assert.property(property: KProperty0): AssertionPlantNullable - = AssertImpl.feature.property(this, property) - -@Suppress("DeprecatedCallableAddReplaceWith", "unused", "UNUSED_PARAMETER") -@Deprecated("Use the overload with KProperty1 instead, this way you do not access `subject` too early. Use `YourClass::property` instead of `subject::property`") -fun CollectingAssertionPlant.property(property: KProperty0): AssertionPlantNullable - = throw PleaseUseReplacementException("Use the overload with KProperty1 instead, this way you do not access `subject` too early. Use `YourClass::property` instead of `subject::property`") - -/** - * Creates an [AssertionPlantNullable] for the given [property] which eventually adds [AssertionGroup]s with a - * [FeatureAssertionGroupType], containing the assertions created for the given [property], to the current plant. - * - * @return An [AssertionPlantNullable] for the given [property]. - */ -fun Assert.property(property: KProperty1): AssertionPlantNullable - = AssertImpl.feature.property(this, property) - - -// Arg 0 ---------------------------------------------------------------------------- - -/** - * Creates an [AssertionPlant], for the value returned by calling [method], which eventually adds [AssertionGroup]s - * with a [FeatureAssertionGroupType], containing the assertions created for the return value, to the current plant. - * - * @return An [AssertionPlant] for the return value of the given [method]. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -fun Assert.rueckgabewertVon(method: KFunction0): AssertionPlant - = AssertImpl.feature.returnValueOf0(this, method) - -@Suppress("DeprecatedCallableAddReplaceWith", "unused", "UNUSED_PARAMETER") -@Deprecated("Use the overload with KFunction1 instead, this way you do not access `subject` too early. Use `YourClass::property` instead of `subject::property`") -fun CollectingAssertionPlant.rueckgabewertVon(method: KFunction0): AssertionPlant - = throw PleaseUseReplacementException("Use the overload with KFunction1 instead, this way you do not access `subject` too early. Use `YourClass::property` instead of `subject::property`") - -/** - * Creates an [AssertionPlant], for the value returned by calling [method], which eventually adds [AssertionGroup]s - * with a [FeatureAssertionGroupType], containing the assertions created for the return value, to the current plant. - * - * @return An [AssertionPlant] for the return value of the given [method]. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -@JvmName("sicherRueckgabewertVon") -fun Assert.rueckgabewertVon(method: KFunction1): AssertionPlant - = AssertImpl.feature.returnValueOf0(this, method) - - -/** - * Creates an [AssertionPlant], for the value returned by calling [method], which eventually adds - * [AssertionGroup]s with a [FeatureAssertionGroupType], containing the assertions created for the return value, - * to the current plant -- starting with a group consisting of the [Assertion]s created by the - * [assertionCreator] lambda. - * - * @return An [AssertionPlant] for the return value of the given [method]. - * - * @throws AssertionError Might throw an [AssertionError] if an additionally created [Assertion] - * (by calling [assertionCreator]) does not hold. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -fun Assert.rueckgabewertVon(method: KFunction0, assertionCreator: Assert.() -> Unit): AssertionPlant - = AssertImpl.feature.returnValueOf0(this, method, assertionCreator) - -@Suppress("DeprecatedCallableAddReplaceWith", "unused", "UNUSED_PARAMETER") -@Deprecated("Use the overload with KFunction1 instead, this way you do not access `subject` too early. Use `YourClass::property` instead of `subject::property`") -fun CollectingAssertionPlant.rueckgabewertVon(method: KFunction0, assertionCreator: Assert.() -> Unit): AssertionPlant - = throw PleaseUseReplacementException("Use the overload with KFunction1 instead, this way you do not access `subject` too early. Use `YourClass::property` instead of `subject::property`") - -/** - * Creates an [AssertionPlant], for the value returned by calling [method], which eventually adds - * [AssertionGroup]s with a [FeatureAssertionGroupType], containing the assertions created for the return value, - * to the current plant -- starting with a group consisting of the [Assertion]s created by the - * [assertionCreator] lambda. - * - * @return An [AssertionPlant] for the return value of the given [method]. - * - * @throws AssertionError Might throw an [AssertionError] if an additionally created [Assertion] - * (by calling [assertionCreator]) does not hold. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -@JvmName("sicherRueckgabewertVon") -fun Assert.rueckgabewertVon(method: KFunction1, assertionCreator: Assert.() -> Unit): AssertionPlant - = AssertImpl.feature.returnValueOf0(this, method, assertionCreator) - - -/** - * Creates an [AssertionPlantNullable], for the value returned by calling [method], which eventually adds - * [AssertionGroup]s with a [FeatureAssertionGroupType], containing the assertions created for the return value, - * to the current plant. - * - * @return An [AssertionPlantNullable] for the given [property]. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -fun Assert.rueckgabewertVon(method: KFunction0): AssertionPlantNullable - = AssertImpl.feature.returnValueOf0(this, method) - -@Suppress("DeprecatedCallableAddReplaceWith", "unused", "UNUSED_PARAMETER") -@Deprecated("Use the overload with KFunction1 instead, this way you do not access `subject` too early. Use `YourClass::property` instead of `subject::property`") -fun CollectingAssertionPlant.rueckgabewertVon(method: KFunction0): AssertionPlantNullable - = throw PleaseUseReplacementException("Use the overload with KFunction1 instead, this way you do not access `subject` too early. Use `YourClass::property` instead of `subject::property`") - -/** - * Creates an [AssertionPlantNullable], for the value returned by calling [method], which eventually adds - * [AssertionGroup]s with a [FeatureAssertionGroupType], containing the assertions created for the return value, - * to the current plant. - * - * @return An [AssertionPlantNullable] for the given [property]. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -@JvmName("sicherRueckgabewertVon") -fun Assert.rueckgabewertVon(method: KFunction1): AssertionPlantNullable - = AssertImpl.feature.returnValueOf0(this, method) - - -// Arg 1 ---------------------------------------------------------------------------- - -/** - * Creates an [AssertionPlant], for the value returned by calling [method] with [arg1], which eventually adds - * [AssertionGroup]s with a [FeatureAssertionGroupType], containing the assertions created for the return value, - * to the current plant. - * - * @return An [AssertionPlant] for the return value of the given [method]. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -fun Assert.rueckgabewertVon(method: KFunction1, arg1: T1): AssertionPlant - = AssertImpl.feature.returnValueOf1(this, method, arg1) - -@Suppress("DeprecatedCallableAddReplaceWith", "unused", "UNUSED_PARAMETER") -@Deprecated("Use the overload with KFunction2 instead, this way you do not access `subject` too early. Use `YourClass::property` instead of `subject::property`") -fun CollectingAssertionPlant.rueckgabewertVon(method: KFunction1, arg1: T1): AssertionPlant - = throw PleaseUseReplacementException("Use the overload with KFunction2 instead, this way you do not access `subject` too early. Use `YourClass::property` instead of `subject::property`") - -/** - * Creates an [AssertionPlant], for the value returned by calling [method] with [arg1], which eventually adds - * [AssertionGroup]s with a [FeatureAssertionGroupType], containing the assertions created for the return value, - * to the current plant. - * - * @return An [AssertionPlant] for the return value of the given [method]. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -@JvmName("sicherRueckgabewertVon") -fun Assert.rueckgabewertVon(method: KFunction2, arg1: T1): AssertionPlant - = AssertImpl.feature.returnValueOf1(this, method, arg1) - - -/** - * Creates an [AssertionPlant], for the value returned by calling [method] with [arg1], which eventually adds - * [AssertionGroup]s with a [FeatureAssertionGroupType], containing the assertions created for the return value, - * to the current plant -- starting with a group consisting of the [Assertion]s created by the - * [assertionCreator] lambda. - * - * @return An [AssertionPlant] for the return value of the given [method]. - * - * @throws AssertionError Might throw an [AssertionError] if an additionally created [Assertion] - * (by calling [assertionCreator]) does not hold. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -fun Assert.rueckgabewertVon(method: KFunction1, arg1: T1, assertionCreator: Assert.() -> Unit): AssertionPlant - = AssertImpl.feature.returnValueOf1(this, method, arg1, assertionCreator) - -@Suppress("DeprecatedCallableAddReplaceWith", "unused", "UNUSED_PARAMETER") -@Deprecated("Use the overload with KFunction2 instead, this way you do not access `subject` too early. Use `YourClass::property` instead of `subject::property`") -fun CollectingAssertionPlant.rueckgabewertVon(method: KFunction1, arg1: T1, assertionCreator: Assert.() -> Unit): AssertionPlant - = throw PleaseUseReplacementException("Use the overload with KFunction2 instead, this way you do not access `subject` too early. Use `YourClass::property` instead of `subject::property`") - -/** - * Creates an [AssertionPlant], for the value returned by calling [method] with [arg1], which eventually adds - * [AssertionGroup]s with a [FeatureAssertionGroupType], containing the assertions created for the return value, - * to the current plant -- starting with a group consisting of the [Assertion]s created by the - * [assertionCreator] lambda. - * - * @return An [AssertionPlant] for the return value of the given [method]. - * - * @throws AssertionError Might throw an [AssertionError] if an additionally created [Assertion] - * (by calling [assertionCreator]) does not hold. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -@JvmName("sicherRueckgabewertVon") -fun Assert.rueckgabewertVon(method: KFunction2, arg1: T1, assertionCreator: Assert.() -> Unit): AssertionPlant - = AssertImpl.feature.returnValueOf1(this, method, arg1, assertionCreator) - - -/** - * Creates an [AssertionPlantNullable], for the value returned by calling [method] with [arg1], which eventually adds - * [AssertionGroup]s with a [FeatureAssertionGroupType], containing the assertions created for the return value, - * to the current plant. - * - * @return An [AssertionPlantNullable] for the given [property]. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -fun Assert.rueckgabewertVon(method: KFunction1, arg1: T1): AssertionPlantNullable - = AssertImpl.feature.returnValueOf1(this, method, arg1) - -@Suppress("DeprecatedCallableAddReplaceWith", "unused", "UNUSED_PARAMETER") -@Deprecated("Use the overload with KFunction2 instead, this way you do not access `subject` too early. Use `YourClass::property` instead of `subject::property`") -fun CollectingAssertionPlant.rueckgabewertVon(method: KFunction1, arg1: T1): AssertionPlantNullable - = throw PleaseUseReplacementException("Use the overload with KFunction2 instead, this way you do not access `subject` too early. Use `YourClass::property` instead of `subject::property`") - -/** - * Creates an [AssertionPlantNullable], for the value returned by calling [method] with [arg1], which eventually adds - * [AssertionGroup]s with a [FeatureAssertionGroupType], containing the assertions created for the return value, - * to the current plant. - * - * @return An [AssertionPlantNullable] for the given [property]. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -@JvmName("sicherRueckgabewertVon") -fun Assert.rueckgabewertVon(method: KFunction2, arg1: T1): AssertionPlantNullable - = AssertImpl.feature.returnValueOf1(this, method, arg1) - - -// Arg 2 ---------------------------------------------------------------------------- - -/** - * Creates an [AssertionPlant], for the value returned by calling [method] with [arg1] and [arg2], which eventually - * adds [AssertionGroup]s with a [FeatureAssertionGroupType], containing the assertions created for the return value, - * to the current plant. - * - * @return An [AssertionPlant] for the return value of the given [method]. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -fun Assert.rueckgabewertVon(method: KFunction2, arg1: T1, arg2: T2): AssertionPlant - = AssertImpl.feature.returnValueOf2(this, method, arg1, arg2) - -@Suppress("DeprecatedCallableAddReplaceWith", "unused", "UNUSED_PARAMETER") -@Deprecated("Use the overload with KFunction3 instead, this way you do not access `subject` too early. Use `YourClass::property` instead of `subject::property`") -fun CollectingAssertionPlant.rueckgabewertVon(method: KFunction2, arg1: T1, arg2: T2): AssertionPlant - = throw PleaseUseReplacementException("Use the overload with KFunction3 instead, this way you do not access `subject` too early. Use `YourClass::property` instead of `subject::property`") - -/** - * Creates an [AssertionPlant], for the value returned by calling [method] with [arg1] and [arg2], which eventually - * adds [AssertionGroup]s with a [FeatureAssertionGroupType], containing the assertions created for the return value, - * to the current plant. - * - * @return An [AssertionPlant] for the return value of the given [method]. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -@JvmName("sicherRueckgabewertVon") -fun Assert.rueckgabewertVon(method: KFunction3, arg1: T1, arg2: T2): AssertionPlant - = AssertImpl.feature.returnValueOf2(this, method, arg1, arg2) - - -/** - * Creates an [AssertionPlant], for the value returned by calling [method] with [arg1] and [arg2], which eventually - * adds [AssertionGroup]s with a [FeatureAssertionGroupType], containing the assertions created for the return value, - * to the current plant -- starting with a group consisting of the [Assertion]s created by the - * [assertionCreator] lambda. - * - * @return An [AssertionPlant] for the return value of the given [method]. - * - * @throws AssertionError Might throw an [AssertionError] if an additionally created [Assertion] - * (by calling [assertionCreator]) does not hold. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -fun Assert.rueckgabewertVon(method: KFunction2, arg1: T1, arg2: T2, assertionCreator: Assert.() -> Unit): AssertionPlant - = AssertImpl.feature.returnValueOf2(this, method, arg1, arg2, assertionCreator) - -@Suppress("DeprecatedCallableAddReplaceWith", "unused", "UNUSED_PARAMETER") -@Deprecated("Use the overload with KFunction3 instead, this way you do not access `subject` too early. Use `YourClass::property` instead of `subject::property`") -fun CollectingAssertionPlant.rueckgabewertVon(method: KFunction2, arg1: T1, arg2: T2, assertionCreator: Assert.() -> Unit): AssertionPlant - = throw PleaseUseReplacementException("Use the overload with KFunction3 instead, this way you do not access `subject` too early. Use `YourClass::property` instead of `subject::property`") - -/** - * Creates an [AssertionPlant], for the value returned by calling [method] with [arg1] and [arg2], which eventually - * adds [AssertionGroup]s with a [FeatureAssertionGroupType], containing the assertions created for the return value, - * to the current plant -- starting with a group consisting of the [Assertion]s created by the - * [assertionCreator] lambda. - * - * @return An [AssertionPlant] for the return value of the given [method]. - * - * @throws AssertionError Might throw an [AssertionError] if an additionally created [Assertion] - * (by calling [assertionCreator]) does not hold. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -@JvmName("sicherRueckgabewertVon") -fun Assert.rueckgabewertVon(method: KFunction3, arg1: T1, arg2: T2, assertionCreator: Assert.() -> Unit): AssertionPlant - = AssertImpl.feature.returnValueOf2(this, method, arg1, arg2, assertionCreator) - - -/** - * Creates an [AssertionPlantNullable], for the value returned by calling [method] with [arg1] and [arg2], which - * eventually adds [AssertionGroup]s with a [FeatureAssertionGroupType], containing the assertions created for - * the return value, to the current plant. - * - * @return An [AssertionPlantNullable] for the given [property]. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -fun Assert.rueckgabewertVon(method: KFunction2, arg1: T1, arg2: T2): AssertionPlantNullable - = AssertImpl.feature.returnValueOf2(this, method, arg1, arg2) - -@Suppress("DeprecatedCallableAddReplaceWith", "unused", "UNUSED_PARAMETER") -@Deprecated("Use the overload with KFunction3 instead, this way you do not access `subject` too early. Use `YourClass::property` instead of `subject::property`") -fun CollectingAssertionPlant.rueckgabewertVon(method: KFunction2, arg1: T1, arg2: T2): AssertionPlantNullable - = throw PleaseUseReplacementException("Use the overload with KFunction3 instead, this way you do not access `subject` too early. Use `YourClass::property` instead of `subject::property`") - -/** - * Creates an [AssertionPlantNullable], for the value returned by calling [method] with [arg1] and [arg2], which - * eventually adds [AssertionGroup]s with a [FeatureAssertionGroupType], containing the assertions created for - * the return value, to the current plant. - * - * @return An [AssertionPlantNullable] for the given [property]. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -@JvmName("sicherRueckgabewertVon") -fun Assert.rueckgabewertVon(method: KFunction3, arg1: T1, arg2: T2): AssertionPlantNullable - = AssertImpl.feature.returnValueOf2(this, method, arg1, arg2) - - -// Arg 3 ---------------------------------------------------------------------------- - -/** - * Creates an [AssertionPlant], for the value returned by calling [method] with [arg1], [arg2] and [arg3], - * which eventually adds [AssertionGroup]s with a [FeatureAssertionGroupType], containing the assertions created - * for the return value, to the current plant. - * - * @return An [AssertionPlant] for the return value of the given [method]. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -fun Assert.rueckgabewertVon(method: KFunction3, arg1: T1, arg2: T2, arg3: T3): AssertionPlant - = AssertImpl.feature.returnValueOf3(this, method, arg1, arg2, arg3) - -@Suppress("DeprecatedCallableAddReplaceWith", "unused", "UNUSED_PARAMETER") -@Deprecated("Use the overload with KFunction4 instead, this way you do not access `subject` too early. Use `YourClass::property` instead of `subject::property`") -fun CollectingAssertionPlant.rueckgabewertVon(method: KFunction3, arg1: T1, arg2: T2, arg3: T3): AssertionPlant - = throw PleaseUseReplacementException("Use the overload with KFunction4 instead, this way you do not access `subject` too early. Use `YourClass::property` instead of `subject::property`") - -/** - * Creates an [AssertionPlant], for the value returned by calling [method] with [arg1], [arg2] and [arg3], - * which eventually adds [AssertionGroup]s with a [FeatureAssertionGroupType], containing the assertions created - * for the return value, to the current plant. - * - * @return An [AssertionPlant] for the return value of the given [method]. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -@JvmName("sicherRueckgabewertVon") -fun Assert.rueckgabewertVon(method: KFunction4, arg1: T1, arg2: T2, arg3: T3): AssertionPlant - = AssertImpl.feature.returnValueOf3(this, method, arg1, arg2, arg3) - - -/** - * Creates an [AssertionPlant], for the value returned by calling [method] with [arg1], [arg2] and [arg3], - * which eventually adds [AssertionGroup]s with a [FeatureAssertionGroupType], containing the assertions created - * for the return value, to the current plant -- starting with a group consisting of the [Assertion]s created by the - * [assertionCreator] lambda. - * - * @return An [AssertionPlant] for the return value of the given [method]. - * - * @throws AssertionError Might throw an [AssertionError] if an additionally created [Assertion] - * (by calling [assertionCreator]) does not hold. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -fun Assert.rueckgabewertVon(method: KFunction3, arg1: T1, arg2: T2, arg3: T3, assertionCreator: Assert.() -> Unit): AssertionPlant - = AssertImpl.feature.returnValueOf3(this, method, arg1, arg2, arg3, assertionCreator) - -@Suppress("DeprecatedCallableAddReplaceWith", "unused", "UNUSED_PARAMETER") -@Deprecated("Use the overload with KFunction4 instead, this way you do not access `subject` too early. Use `YourClass::property` instead of `subject::property`") -fun CollectingAssertionPlant.rueckgabewertVon(method: KFunction3, arg1: T1, arg2: T2, arg3: T3, assertionCreator: Assert.() -> Unit): AssertionPlant - = throw PleaseUseReplacementException("Use the overload with KFunction4 instead, this way you do not access `subject` too early. Use `YourClass::property` instead of `subject::property`") - -/** - * Creates an [AssertionPlant], for the value returned by calling [method] with [arg1], [arg2] and [arg3], - * which eventually adds [AssertionGroup]s with a [FeatureAssertionGroupType], containing the assertions created - * for the return value, to the current plant -- starting with a group consisting of the [Assertion]s created by the - * [assertionCreator] lambda. - * - * @return An [AssertionPlant] for the return value of the given [method]. - * - * @throws AssertionError Might throw an [AssertionError] if an additionally created [Assertion] - * (by calling [assertionCreator]) does not hold. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -@JvmName("sicherRueckgabewertVon") -fun Assert.rueckgabewertVon(method: KFunction4, arg1: T1, arg2: T2, arg3: T3, assertionCreator: Assert.() -> Unit): AssertionPlant - = AssertImpl.feature.returnValueOf3(this, method, arg1, arg2, arg3, assertionCreator) - - -/** - * Creates an [AssertionPlantNullable], for the value returned by calling [method] with [arg1], [arg2] and [arg3], - * which eventually adds [AssertionGroup]s with a [FeatureAssertionGroupType], containing the assertions created for - * the return value, to the current plant. - * - * @return An [AssertionPlantNullable] for the given [property]. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -fun Assert.rueckgabewertVon(method: KFunction3, arg1: T1, arg2: T2, arg3: T3): AssertionPlantNullable - = AssertImpl.feature.returnValueOf3(this, method, arg1, arg2, arg3) - -@Suppress("DeprecatedCallableAddReplaceWith", "unused", "UNUSED_PARAMETER") -@Deprecated("Use the overload with KFunction4 instead, this way you do not access `subject` too early. Use `YourClass::property` instead of `subject::property`") -fun CollectingAssertionPlant.rueckgabewertVon(method: KFunction3, arg1: T1, arg2: T2, arg3: T3): AssertionPlantNullable - = throw PleaseUseReplacementException("Use the overload with KFunction4 instead, this way you do not access `subject` too early. Use `YourClass::property` instead of `subject::property`") - -/** - * Creates an [AssertionPlantNullable], for the value returned by calling [method] with [arg1], [arg2] and [arg3], - * which eventually adds [AssertionGroup]s with a [FeatureAssertionGroupType], containing the assertions created for - * the return value, to the current plant. - * - * @return An [AssertionPlantNullable] for the given [property]. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -@JvmName("sicherRueckgabewertVon") -fun Assert.rueckgabewertVon(method: KFunction4, arg1: T1, arg2: T2, arg3: T3): AssertionPlantNullable - = AssertImpl.feature.returnValueOf3(this, method, arg1, arg2, arg3) - - -// Arg 4 ---------------------------------------------------------------------------- - -/** - * Creates an [AssertionPlant], for the value returned by calling [method] with [arg1], [arg2], [arg3] and [arg4], - * which eventually adds [AssertionGroup]s with a [FeatureAssertionGroupType], containing the assertions created - * for the return value, to the current plant. - * - * @return An [AssertionPlant] for the return value of the given [method]. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -fun Assert.rueckgabewertVon(method: KFunction4, arg1: T1, arg2: T2, arg3: T3, arg4: T4): AssertionPlant - = AssertImpl.feature.returnValueOf4(this, method, arg1, arg2, arg3, arg4) - -@Suppress("DeprecatedCallableAddReplaceWith", "unused", "UNUSED_PARAMETER") -@Deprecated("Use the overload with KFunction5 instead, this way you do not access `subject` too early. Use `YourClass::property` instead of `subject::property`") -fun CollectingAssertionPlant.rueckgabewertVon(method: KFunction4, arg1: T1, arg2: T2, arg3: T3, arg4: T4): AssertionPlant - = throw PleaseUseReplacementException("Use the overload with KFunction5 instead, this way you do not access `subject` too early. Use `YourClass::property` instead of `subject::property`") - -/** - * Creates an [AssertionPlant], for the value returned by calling [method] with [arg1], [arg2], [arg3] and [arg4], - * which eventually adds [AssertionGroup]s with a [FeatureAssertionGroupType], containing the assertions created - * for the return value, to the current plant. - * - * @return An [AssertionPlant] for the return value of the given [method]. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -@JvmName("sicherRueckgabewertVon") -fun Assert.rueckgabewertVon(method: KFunction5, arg1: T1, arg2: T2, arg3: T3, arg4: T4): AssertionPlant - = AssertImpl.feature.returnValueOf4(this, method, arg1, arg2, arg3, arg4) - - -/** - * Creates an [AssertionPlant], for the value returned by calling [method] with [arg1], [arg2], [arg3] and [arg4], - * which eventually adds [AssertionGroup]s with a [FeatureAssertionGroupType], containing the assertions created - * for the return value, to the current plant -- starting with a group consisting of the [Assertion]s created by the - * [assertionCreator] lambda. - * - * @return An [AssertionPlant] for the return value of the given [method]. - * - * @throws AssertionError Might throw an [AssertionError] if an additionally created [Assertion] - * (by calling [assertionCreator]) does not hold. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -fun Assert.rueckgabewertVon(method: KFunction4, arg1: T1, arg2: T2, arg3: T3, arg4: T4, assertionCreator: Assert.() -> Unit): AssertionPlant - = AssertImpl.feature.returnValueOf4(this, method, arg1, arg2, arg3, arg4, assertionCreator) - -@Suppress("DeprecatedCallableAddReplaceWith", "unused", "UNUSED_PARAMETER") -@Deprecated("Use the overload with KFunction5 instead, this way you do not access `subject` too early. Use `YourClass::property` instead of `subject::property`") -fun CollectingAssertionPlant.rueckgabewertVon(method: KFunction4, arg1: T1, arg2: T2, arg3: T3, arg4: T4, assertionCreator: Assert.() -> Unit): AssertionPlant - = throw PleaseUseReplacementException("Use the overload with KFunction5 instead, this way you do not access `subject` too early. Use `YourClass::property` instead of `subject::property`") - -/** - * Creates an [AssertionPlant], for the value returned by calling [method] with [arg1], [arg2], [arg3] and [arg4], - * which eventually adds [AssertionGroup]s with a [FeatureAssertionGroupType], containing the assertions created - * for the return value, to the current plant -- starting with a group consisting of the [Assertion]s created by the - * [assertionCreator] lambda. - * - * @return An [AssertionPlant] for the return value of the given [method]. - * - * @throws AssertionError Might throw an [AssertionError] if an additionally created [Assertion] - * (by calling [assertionCreator]) does not hold. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -@JvmName("sicherRueckgabewertVon") -fun Assert.rueckgabewertVon(method: KFunction5, arg1: T1, arg2: T2, arg3: T3, arg4: T4, assertionCreator: Assert.() -> Unit): AssertionPlant - = AssertImpl.feature.returnValueOf4(this, method, arg1, arg2, arg3, arg4, assertionCreator) - - -/** - * Creates an [AssertionPlantNullable], for the value returned by calling [method] with [arg1], [arg2], [arg3] - * and [arg4], which eventually adds [AssertionGroup]s with a [FeatureAssertionGroupType], containing the assertions - * created for the return value, to the current plant. - * - * @return An [AssertionPlantNullable] for the given [property]. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -fun Assert.rueckgabewertVon(method: KFunction4, arg1: T1, arg2: T2, arg3: T3, arg4: T4): AssertionPlantNullable - = AssertImpl.feature.returnValueOf4(this, method, arg1, arg2, arg3, arg4) - -@Suppress("DeprecatedCallableAddReplaceWith", "unused", "UNUSED_PARAMETER") -@Deprecated("Use the overload with KFunction5 instead, this way you do not access `subject` too early. Use `YourClass::property` instead of `subject::property`") -fun CollectingAssertionPlant.rueckgabewertVon(method: KFunction4, arg1: T1, arg2: T2, arg3: T3, arg4: T4): AssertionPlantNullable - = throw PleaseUseReplacementException("Use the overload with KFunction5 instead, this way you do not access `subject` too early. Use `YourClass::property` instead of `subject::property`") - -/** - * Creates an [AssertionPlantNullable], for the value returned by calling [method] with [arg1], [arg2], [arg3] - * and [arg4], which eventually adds [AssertionGroup]s with a [FeatureAssertionGroupType], containing the assertions - * created for the return value, to the current plant. - * - * @return An [AssertionPlantNullable] for the given [property]. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -@JvmName("sicherRueckgabewertVon") -fun Assert.rueckgabewertVon(method: KFunction5, arg1: T1, arg2: T2, arg3: T3, arg4: T4): AssertionPlantNullable - = AssertImpl.feature.returnValueOf4(this, method, arg1, arg2, arg3, arg4) - - -// Arg 5 ---------------------------------------------------------------------------- - -/** - * Creates an [AssertionPlant], for the value returned by calling [method] with [arg1], [arg2], [arg3], [arg4] - * and [arg5], which eventually adds [AssertionGroup]s with a [FeatureAssertionGroupType], containing the assertions - * created for the return value, to the current plant. - * - * @return An [AssertionPlant] for the return value of the given [method]. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -fun Assert.rueckgabewertVon(method: KFunction5, arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5): AssertionPlant - = AssertImpl.feature.returnValueOf5(this, method, arg1, arg2, arg3, arg4, arg5) - -@Suppress("DeprecatedCallableAddReplaceWith", "unused", "UNUSED_PARAMETER") -@Deprecated("Use the overload with KFunction6 instead, this way you do not access `subject` too early. Use `YourClass::property` instead of `subject::property`") -fun CollectingAssertionPlant.rueckgabewertVon(method: KFunction5, arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5): AssertionPlant - = throw PleaseUseReplacementException("Use the overload with KFunction6 instead, this way you do not access `subject` too early. Use `YourClass::property` instead of `subject::property`") - -/** - * Creates an [AssertionPlant], for the value returned by calling [method] with [arg1], [arg2], [arg3], [arg4] - * and [arg5], which eventually adds [AssertionGroup]s with a [FeatureAssertionGroupType], containing the assertions - * created for the return value, to the current plant. - * - * @return An [AssertionPlant] for the return value of the given [method]. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -@JvmName("sicherRueckgabewertVon") -fun Assert.rueckgabewertVon(method: KFunction6, arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5): AssertionPlant - = AssertImpl.feature.returnValueOf5(this, method, arg1, arg2, arg3, arg4, arg5) - - -/** - * Creates an [AssertionPlant], for the value returned by calling [method] with [arg1], [arg2], [arg3], [arg4] - * and [arg5], which eventually adds [AssertionGroup]s with a [FeatureAssertionGroupType], containing the assertions - * created for the return value, to the current plant -- starting with a group consisting of the [Assertion]s created - * by the [assertionCreator] lambda. - * - * @return An [AssertionPlant] for the return value of the given [method]. - * - * @throws AssertionError Might throw an [AssertionError] if an additionally created [Assertion] - * (by calling [assertionCreator]) does not hold. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -fun Assert.rueckgabewertVon(method: KFunction5, arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, assertionCreator: Assert.() -> Unit): AssertionPlant - = AssertImpl.feature.returnValueOf5(this, method, arg1, arg2, arg3, arg4, arg5, assertionCreator) - -@Suppress("DeprecatedCallableAddReplaceWith", "unused", "UNUSED_PARAMETER") -@Deprecated("Use the overload with KFunction6 instead, this way you do not access `subject` too early. Use `YourClass::property` instead of `subject::property`") -fun CollectingAssertionPlant.rueckgabewertVon(method: KFunction5, arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, assertionCreator: Assert.() -> Unit): AssertionPlant - = throw PleaseUseReplacementException("Use the overload with KFunction6 instead, this way you do not access `subject` too early. Use `YourClass::property` instead of `subject::property`") - -/** - * Creates an [AssertionPlant], for the value returned by calling [method] with [arg1], [arg2], [arg3], [arg4] - * and [arg5], which eventually adds [AssertionGroup]s with a [FeatureAssertionGroupType], containing the assertions - * created for the return value, to the current plant -- starting with a group consisting of the [Assertion]s created - * by the [assertionCreator] lambda. - * - * @return An [AssertionPlant] for the return value of the given [method]. - * - * @throws AssertionError Might throw an [AssertionError] if an additionally created [Assertion] - * (by calling [assertionCreator]) does not hold. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -@JvmName("sicherRueckgabewertVon") -fun Assert.rueckgabewertVon(method: KFunction6, arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, assertionCreator: Assert.() -> Unit): AssertionPlant - = AssertImpl.feature.returnValueOf5(this, method, arg1, arg2, arg3, arg4, arg5, assertionCreator) - - -/** - * Creates an [AssertionPlantNullable], for the value returned by calling [method] with [arg1], [arg2], [arg3], - * [arg4] and [arg5], which eventually adds [AssertionGroup]s with a [FeatureAssertionGroupType], containing the - * assertions created for the return value, to the current plant. - * - * @return An [AssertionPlantNullable] for the given [property]. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -fun Assert.rueckgabewertVon(method: KFunction5, arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5): AssertionPlantNullable - = AssertImpl.feature.returnValueOf5(this, method, arg1, arg2, arg3, arg4, arg5) - -@Suppress("DeprecatedCallableAddReplaceWith", "unused", "UNUSED_PARAMETER") -@Deprecated("Use the overload with KFunction6 instead, this way you do not access `subject` too early. Use `YourClass::property` instead of `subject::property`") -fun CollectingAssertionPlant.rueckgabewertVon(method: KFunction5, arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5): AssertionPlantNullable - = throw PleaseUseReplacementException("Use the overload with KFunction6 instead, this way you do not access `subject` too early. Use `YourClass::property` instead of `subject::property`") - -/** - * Creates an [AssertionPlantNullable], for the value returned by calling [method] with [arg1], [arg2], [arg3], - * [arg4] and [arg5], which eventually adds [AssertionGroup]s with a [FeatureAssertionGroupType], containing the - * assertions created for the return value, to the current plant. - * - * @return An [AssertionPlantNullable] for the given [property]. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -@JvmName("sicherRueckgabewertVon") -fun Assert.rueckgabewertVon(method: KFunction6, arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5): AssertionPlantNullable - = AssertImpl.feature.returnValueOf5(this, method, arg1, arg2, arg3, arg4, arg5) diff --git a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/floatingPointAssertions.kt b/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/floatingPointAssertions.kt deleted file mode 100644 index aebe86a05..000000000 --- a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/floatingPointAssertions.kt +++ /dev/null @@ -1,47 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") - -@file:JvmMultifileClass -@file:JvmName("FloatingPointAssertionsKt") - -package ch.tutteli.atrium.api.cc.de_CH - -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.domain.builders.AssertImpl -import kotlin.jvm.JvmMultifileClass -import kotlin.jvm.JvmName - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] is equal to [expected] with an error [tolerance] - * (range including bounds). - * - * It effectively compares the absolute difference between [Assert.subject][SubjectProvider.subject] and [expected] and compares it with - * the [tolerance]. As long as it is less than or equal the [tolerance] the assertion holds; otherwise it fails. - * A more mathematical way of expressing the assertion is the following inequality: - * - * | [Assert.subject][SubjectProvider.subject] - [expected] | ≤ [tolerance] - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -fun Assert.istMitFehlerToleranz(expected: Float, tolerance: Float) - = addAssertion(AssertImpl.floatingPoint.toBeWithErrorTolerance(this, expected, tolerance)) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] is equal to [expected] with an error [tolerance] - * (range including bounds). - * - * It effectively compares the absolute difference between [Assert.subject][SubjectProvider.subject] and [expected] and compares it with - * the [tolerance]. As long as it is less than or equal the [tolerance] the assertion holds; otherwise it fails. - * A more mathematical way of expressing the assertion is the following inequality: - * - * | [Assert.subject][SubjectProvider.subject] - [expected] | ≤ [tolerance] - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -fun Assert.istMitFehlerToleranz(expected: Double, tolerance: Double) - = addAssertion(AssertImpl.floatingPoint.toBeWithErrorTolerance(this, expected, tolerance)) diff --git a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/iterableAssertions.kt b/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/iterableAssertions.kt deleted file mode 100644 index e7979c3e7..000000000 --- a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/iterableAssertions.kt +++ /dev/null @@ -1,186 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") -@file:JvmMultifileClass -@file:JvmName("IterableAssertionsKt") -package ch.tutteli.atrium.api.cc.de_CH - -import ch.tutteli.atrium.api.cc.de_CH.creating.iterable.contains.builders.NotCheckerOption -import ch.tutteli.atrium.api.cc.de_CH.creating.iterable.contains.builders.impl.NotCheckerOptionImpl -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.domain.builders.AssertImpl -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.NoOpSearchBehaviour -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.NotSearchBehaviour -import kotlin.jvm.JvmMultifileClass -import kotlin.jvm.JvmName - -/** - * Creates an [IterableContains.Builder] based on this [AssertionPlant] which allows to define - * more sophisticated `contains` assertions. - * - * @return The newly created builder. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -val > Assert.enthaelt: IterableContains.Builder - get() = AssertImpl.iterable.containsBuilder(this) - -/** - * Creates an [IterableContains.Builder] based on this [AssertionPlant] which allows to define - * more sophisticated `contains not` assertions. - * - * @return The newly created builder. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -val > Assert.enthaeltNicht: NotCheckerOption - get() = NotCheckerOptionImpl(AssertImpl.iterable.containsNotBuilder(this)) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] contains the - * [expected] value and the [otherExpected] values (if given). - * - * It is a shortcut for `enthaelt.inBeliebigerReihenfolge.zumindest(1).werte(expected, *otherExpected)` - * - * Notice, that it does not search for unique matches. Meaning, if the iterable is `setOf('a', 'b')` and - * [expected] is defined as `'a'` and one of the [otherExpected] is defined as `'a'` as well, then both - * match, even though they match the same entry. Use an option such as [zumindest], [hoechstens] and [genau] to control - * the number of occurrences you expect. - * - * Meaning you might want to use: - * `enthaelt.inBeliebigerReihenfolge.genau(2).wert('a')` - * instead of: - * `enthaelt.werte('a', 'a')` - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -fun > Assert.enthaelt(expected: E, vararg otherExpected: E): AssertionPlant - = enthaelt.inBeliebigerReihenfolge.zumindest(1).werte(expected, *otherExpected) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] contains an entry holding the - * assertions created by [assertionCreatorOrNull] or an entry which is `null` in case [assertionCreatorOrNull] - * is defined as `null`. - * - * It is a shortcut for `enthaelt.inBeliebigerReihenfolge.zumindest(1).eintrag(assertionCreatorOrNull)` - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -fun > Assert.enthaelt(assertionCreatorOrNull: (Assert.() -> Unit)?): AssertionPlant - = enthaelt.inBeliebigerReihenfolge.zumindest(1).eintrag(assertionCreatorOrNull) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] contains an entry holding the - * assertions created by [assertionCreatorOrNull] or an entry which is `null` in case [assertionCreatorOrNull] - * is defined as `null` -- likewise an entry (can be the same) is searched for each - * of the [otherAssertionCreatorsOrNulls]. - * - * It is a shortcut for `enthaelt.inBeliebigerReihenfolge.zumindest(1).eintraege(assertionCreatorOrNull, *otherAssertionCreatorsOrNulls)` - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -fun > Assert.enthaelt(assertionCreatorOrNull: (Assert.() -> Unit)?, vararg otherAssertionCreatorsOrNulls: (Assert.() -> Unit)?): AssertionPlant - = enthaelt.inBeliebigerReihenfolge.zumindest(1).eintraege(assertionCreatorOrNull, *otherAssertionCreatorsOrNulls) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] contains only - * the [expected] value and the [otherExpected] values - * (if given) in the defined order. - * - * It is a shortcut for `enthaelt.inGegebenerReihenfolge.nur.werte(expected, *otherExpected)` - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -fun > Assert.enthaeltExakt(expected: E, vararg otherExpected: E): AssertionPlant - = enthaelt.inGegebenerReihenfolge.nur.werte(expected, *otherExpected) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] contains only an entry holding - * the assertions created by [assertionCreatorOrNull] or only one entry which is `null` in case [assertionCreatorOrNull] - * is defined as `null`. - * - * It is a shortcut for `enthaelt.inGegebenerReihenfolge.nur.eintrag(assertionCreatorOrNull)` - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -fun > Assert.enthaeltExakt(assertionCreatorOrNull: (Assert.() -> Unit)?): AssertionPlant - = enthaelt.inGegebenerReihenfolge.nur.eintrag(assertionCreatorOrNull) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] contains only an entry holding - * the assertions created by [assertionCreatorOrNull] or `null` in case [assertionCreatorOrNull] is defined as `null` - * and likewise an additional entry for each [otherAssertionCreatorsOrNulls] (if given) - * whereas the entries have to appear in the defined order. - * - * It is a shortcut for `enthaelt.inGegebenerReihenfolge.nur.eintraege(assertionCreatorOrNull, *otherAssertionCreatorsOrNulls)` - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -fun > Assert.enthaeltExakt(assertionCreatorOrNull: (Assert.() -> Unit)?, vararg otherAssertionCreatorsOrNulls: (Assert.() -> Unit)?): AssertionPlant - = enthaelt.inGegebenerReihenfolge.nur.eintraege(assertionCreatorOrNull, *otherAssertionCreatorsOrNulls) - - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] does not contain the [expected] value - * and neither one of the [otherExpected] values (if given). - * - * It is a shortcut for `enthaeltNicht.werte(expected, *otherExpected)` - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -fun > Assert.enthaeltNicht(expected: E, vararg otherExpected: E) - = enthaeltNicht.werte(expected, *otherExpected) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] contains an entry holding - * the assertions created by [assertionCreatorOrNull] or an entry which is `null` in case [assertionCreatorOrNull] - * is defined as `null`. - * - * It is a shortcut for `enthaelt.inBeliebigerReihenfolge.zumindest(1).eintrag(assertionCreatorOrNull)` - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -fun > Assert.irgendEiner(assertionCreatorOrNull: (Assert.() -> Unit)?): AssertionPlant - = enthaelt.inBeliebigerReihenfolge.zumindest(1).eintrag(assertionCreatorOrNull) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] does not contain a single entry - * which holds all assertions created by [assertionCreatorOrNull] or does not contain a single entry which is `null` - * in case [assertionCreatorOrNull] is defined as `null`. - * - * It is a shortcut for `enthaeltNicht.eintrag(assertionCreatorOrNull)` - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -fun > Assert.keiner(assertionCreatorOrNull: (Assert.() -> Unit)?) - = enthaeltNicht.eintrag(assertionCreatorOrNull) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] has at least one element and - * that every element holds all assertions created by the [assertionCreatorOrNull] or that all elements are `null` - * in case [assertionCreatorOrNull] is defined as `null`. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -fun > Assert.alle(assertionCreatorOrNull: (Assert.() -> Unit)?) - = addAssertion(AssertImpl.iterable.all(this, assertionCreatorOrNull)) diff --git a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/iterableContainsCheckers.kt b/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/iterableContainsCheckers.kt deleted file mode 100644 index 947ddaab6..000000000 --- a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/iterableContainsCheckers.kt +++ /dev/null @@ -1,95 +0,0 @@ -@file:Suppress("DEPRECATION" /* will be removed with 1.0.0 */) -@file:JvmMultifileClass -@file:JvmName("IterableContainsCheckersKt") -package ch.tutteli.atrium.api.cc.de_CH - -import ch.tutteli.atrium.api.cc.de_CH.creating.iterable.contains.builders.* -import ch.tutteli.atrium.api.cc.de_CH.creating.iterable.contains.builders.impl.* -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InAnyOrderSearchBehaviour -import kotlin.jvm.JvmMultifileClass -import kotlin.jvm.JvmName - -/** - * Restricts a `contains` assertion by specifying that the number of occurrences of the entry which we are looking - * for, occurs `at least` number of [times] within the [Iterable]. - * - * @param times The number which the check will compare against the number of times an expected entry is - * found in the [Iterable]. - * - * @return The newly created builder. - * @throws IllegalArgumentException In case [times] is smaller than zero. - * @throws IllegalArgumentException In case [times] equals to zero; use [enthaeltNicht] instead. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -fun , S: InAnyOrderSearchBehaviour> IterableContains.Builder.zumindest(times: Int): AtLeastCheckerOption - = AtLeastCheckerOptionImpl(times, this) - -/** - * Restricts a `contains at least` assertion by specifying that the number of occurrences of the entry which we - * are looking for occurs `at most` number of [times] within the [Iterable]. - * - * The resulting restriction will be a `contains at least but at most` assertion. - * - * @param times The number which the check will compare against the number of times an expected entry is - * found in the [Iterable]. - * - * @return The newly created builder. - * @throws IllegalArgumentException In case [times] is smaller than zero. - * @throws IllegalArgumentException In case [times] equals to zero; use [enthaeltNicht] instead. - * @throws IllegalArgumentException In case [times] of this `at most` restriction equals to the number of the - * `at least` restriction; use the [genau] restriction instead. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -fun , S: InAnyOrderSearchBehaviour> AtLeastCheckerOption.aberHoechstens(times: Int): ButAtMostCheckerOption - = ButAtMostCheckerOptionImpl(times, this, containsBuilder) - -/** - * Restricts a `contains` assertion by specifying that the number of occurrences of the entry which we - * are looking for occurs `genau` number of [times] within the [Iterable]. - * - * @param times The number which the check will compare against the number of times an expected entry is - * found in the [Iterable]. - * - * @return The newly created builder. - * @throws IllegalArgumentException In case [times] is smaller than zero. - * @throws IllegalArgumentException In case [times] equals to zero; use [enthaeltNicht] instead. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -fun , S: InAnyOrderSearchBehaviour> IterableContains.Builder.genau(times: Int): ExactlyCheckerOption - = ExactlyCheckerOptionImpl(times, this) - -/** - * Restricts a `contains` assertion by specifying that the number of occurrences of the entry which we - * are looking for occurs `at least` once but `at most` number of [times] within the [Iterable]. - * - * If you want to use a higher lower bound than one, then use `zumindest(2).aberHoechstens(3)` instead of `hoechstens(3)`. - * And in case you want to state that it is either not contained at all or at most a certain number of times, - * then use `notOrAtMost(2)` instead. - * - * @param times The number which the check will compare against the number of times an expected entry is - * found in the [Iterable]. - * - * @return The newly created builder. - * @throws IllegalArgumentException In case [times] is smaller than zero. - * @throws IllegalArgumentException In case [times] equals to zero; use [enthaeltNicht] instead. - * @throws IllegalArgumentException In case [times] equals to one; use [genau] instead. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -fun , S: InAnyOrderSearchBehaviour> IterableContains.Builder.hoechstens(times: Int): AtMostCheckerOption - = AtMostCheckerOptionImpl(times, this) - -/** - * Restricts a `contains` assertion by specifying that the number of occurrences of the entry which we - * are looking for occurs `not at all or at most` number of [times] within the [Iterable]. - * - * @param times The number which the check will compare against the number of times an expected entry is - * found in the [Iterable]. - * - * @return The newly created builder. - * @throws IllegalArgumentException In case [times] is smaller than zero. - * @throws IllegalArgumentException In case [times] equals to zero; use [enthaeltNicht] instead. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -fun , S: InAnyOrderSearchBehaviour> IterableContains.Builder.nichtOderHoechstens(times: Int): NotOrAtMostCheckerOption - = NotOrAtMostCheckerOptionImpl(times, this) diff --git a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/iterableContainsDecorators.kt b/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/iterableContainsDecorators.kt deleted file mode 100644 index b120fcf49..000000000 --- a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/iterableContainsDecorators.kt +++ /dev/null @@ -1,72 +0,0 @@ -@file:Suppress("DEPRECATION" /* will be removed with 1.0.0 */) -@file:JvmMultifileClass -@file:JvmName("IterableContainsDecoratorsKt") -package ch.tutteli.atrium.api.cc.de_CH - -import ch.tutteli.atrium.domain.builders.AssertImpl -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.* -import kotlin.jvm.JvmMultifileClass -import kotlin.jvm.JvmName - -/** - * Defines that the search behaviour "find entries `in any order` in the [Iterable]" shall be applied to this - * sophisticated `contains` in [Iterable] assertion. - * - * @return The newly created builder. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -val > IterableContains.Builder.inBeliebigerReihenfolge - get() = AssertImpl.iterable.contains.searchBehaviours.inAnyOrder(this) - -/** - * Defines that the constraint "`only` the specified entries exist in the [Iterable]" shall be applied to this - * sophisticated `contains` [Iterable] assertion. - * - * @return The newly created builder. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -val > IterableContains.Builder.nur - @JvmName("aberNur") - get() = AssertImpl.iterable.contains.searchBehaviours.inAnyOrderOnly(this) - -/** - * Defines that the search behaviour "find entries `in order` in the [Iterable]" shall be applied to this - * sophisticated `contains` in [Iterable] assertion. - * - * @return The newly created builder. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -val > IterableContains.Builder.inGegebenerReihenfolge - get() = AssertImpl.iterable.contains.searchBehaviours.inOrder(this) - -/** - * Defines that the constraint "`only` the specified entries exist in the [Iterable]" shall be applied to this - * sophisticated `contains in order` [Iterable] assertion. - * - * @return The newly created builder. - */ -//TODO deprecate as soon as https://youtrack.jetbrains.com/issue/KT-33398 is fixed -//@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -val > IterableContains.Builder.nur - @JvmName("undNur") - get() = AssertImpl.iterable.contains.searchBehaviours.inOrderOnly(this) - -/** - * Defines that the [Iterable] contains `in order only` groups of entries - * whereas the order within the group is specified as next step. - * - * @return The newly created builder. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -val > IterableContains.Builder.gruppiert - get() = AssertImpl.iterable.contains.searchBehaviours.inOrderOnlyGrouped(this) - -/** - * A filler word to emphasis that the next step defines the order within expected groups of values. - * - * @return The newly created builder. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -val > IterableContains.Builder.innerhalb - get() = AssertImpl.iterable.contains.searchBehaviours.inOrderOnlyGroupedWithin(this) diff --git a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/iterableContainsInAnyOrderCreators.kt b/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/iterableContainsInAnyOrderCreators.kt deleted file mode 100644 index c50189e1d..000000000 --- a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/iterableContainsInAnyOrderCreators.kt +++ /dev/null @@ -1,110 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") - -@file:JvmMultifileClass -@file:JvmName("IterableContainsInAnyOrderCreatorsKt") -package ch.tutteli.atrium.api.cc.de_CH - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.domain.builders.AssertImpl -import ch.tutteli.atrium.domain.builders.creating.basic.contains.addAssertionForAssert -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InAnyOrderSearchBehaviour -import ch.tutteli.kbox.glue -import kotlin.jvm.JvmMultifileClass -import kotlin.jvm.JvmName - -/** - * Finishes the specification of the sophisticated `contains` assertion where the [expected] - * value shall be searched within the [Iterable]. - * - * Delegates to `werte(expected)`. - * - * @param expected The value which is expected to be contained within the [Iterable]. - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -fun > IterableContains.CheckerOption.wert(expected: E): AssertionPlant - = werte(expected) - -/** - * Finishes the specification of the sophisticated `contains` assertion where the [expected] - * value as well as the [otherExpected] values (if given) - * shall be searched within the [Iterable]. - * - * Notice, that it does not search for unique matches. Meaning, if the iterable is `setOf('a', 'b')` and - * [expected] is defined as `'a'` and one [otherExpected] is defined as `'a'` as well, then both match, - * even though they match the same entry. Use an option such as [zumindest], [hoechstens] and [genau] to control the - * number of occurrences you expect. - * - * Meaning you might want to use: - * `enthaelt.inBeliebigerReihenfolge.genau(2).werte('a')` - * instead of: - * `enthaelt.inBeliebigerReihenfolge.zumindest(1).werte('a', 'a')` - * - * @param expected The object which is expected to be contained within the [Iterable]. - * @param otherExpected Additional objects which are expected to be contained within [Iterable]. - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -fun > IterableContains.CheckerOption.werte(expected: E, vararg otherExpected: E): AssertionPlant - = addAssertion(AssertImpl.iterable.contains.valuesInAnyOrder(this, expected glue otherExpected)) - -/** - * Finishes the specification of the sophisticated `contains` assertion where an entry shall be searched which either - * holds all assertions [assertionCreatorOrNull] might create or needs to be `null` in case [assertionCreatorOrNull] - * is defined as `null`. - * - * Delegates to `eintraege(assertionCreatorOrNull)`. - * - * @param assertionCreatorOrNull The identification lambda which creates the assertions which the entry we are looking for - * has to hold; or in other words, the function which defines whether an entry is the one we are looking for - * or not. In case it is defined as `null`, then an entry is identified if it is `null` as well. - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -fun > IterableContains.CheckerOption.eintrag(assertionCreatorOrNull: (Assert.() -> Unit)?): AssertionPlant - = eintraege(assertionCreatorOrNull) - -/** - * Finishes the specification of the sophisticated `contains` assertion where an entry shall be searched which either - * holds all assertions [assertionCreatorOrNull] might create or needs to be `null` in case - * [assertionCreatorOrNull] is defined as `null` -- likewise an entry (can be the same) is searched for each - * of the [otherAssertionCreatorsOrNulls]. - * - * @param assertionCreatorOrNull The identification lambda which creates the assertions which the entry we are looking for - * has to hold; or in other words, the function which defines whether an entry is the one we are looking for - * or not. In case it is defined as `null`, then an entry is identified if it is `null` as well. - * @param otherAssertionCreatorsOrNulls Additional identification lambdas which each identify (separately) an entry - * which we are looking for (see [assertionCreatorOrNull] for more information). - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -@Suppress("DEPRECATION") -fun > IterableContains.CheckerOption.eintraege( - assertionCreatorOrNull: (Assert.() -> Unit)?, - vararg otherAssertionCreatorsOrNulls: (Assert.() -> Unit)? -): AssertionPlant - = addAssertion(AssertImpl.iterable.contains.entriesInAnyOrderWithAssert(this, assertionCreatorOrNull glue otherAssertionCreatorsOrNulls)) - -/** - * Helper method to simplify adding assertions to the plant which itself is stored in - * [CharSequenceContains.CheckerOption.containsBuilder]. - * - * @return The plant to support a fluent API. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -private fun , S : IterableContains.SearchBehaviour> IterableContains.CheckerOption.addAssertion( - assertion: Assertion -): AssertionPlant = addAssertionForAssert(assertion) diff --git a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/iterableContainsInAnyOrderOnlyCreators.kt b/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/iterableContainsInAnyOrderOnlyCreators.kt deleted file mode 100644 index e41dbb08a..000000000 --- a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/iterableContainsInAnyOrderOnlyCreators.kt +++ /dev/null @@ -1,108 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") - -@file:JvmMultifileClass -@file:JvmName("IterableContainsInAnyOrderOnlyCreatorsKt") -package ch.tutteli.atrium.api.cc.de_CH - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.domain.builders.AssertImpl -import ch.tutteli.atrium.domain.builders.creating.basic.contains.addAssertionForAssert -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains -import ch.tutteli.kbox.glue -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InAnyOrderOnlySearchBehaviour -import kotlin.jvm.JvmMultifileClass -import kotlin.jvm.JvmName - -/** - * Finishes the specification of the sophisticated `contains` assertion where the [Iterable] needs to contain only the - * [expected] value. - * - * Delegates to `werte(expected)`. - * - * @param expected The value which is expected to be contained within the [Iterable]. - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -fun > IterableContains.Builder.wert(expected: E): AssertionPlant - = werte(expected) - -/** - * Finishes the specification of the sophisticated `contains` assertion where the [expected] - * value as well as the [otherExpected] values (if given) need to be - * contained in [Iterable] where it does not matter in which order but only as - * many entries should be returned by the [Iterable] as values defined. - * - * @param expected The value which is expected to be contained within the [Iterable]. - * @param otherExpected Additional values which are expected to be contained within [Iterable]. - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -fun > IterableContains.Builder.werte(expected: E, vararg otherExpected: E): AssertionPlant - = addAssertion(AssertImpl.iterable.contains.valuesInAnyOrderOnly(this, expected glue otherExpected)) - -/** - * Finishes the specification of the sophisticated `contains` assertion where the [Iterable] needs to contain only one - * entry which holds all assertions created by the given [assertionCreatorOrNull] or is `null` in case - * [assertionCreatorOrNull] is defined as `null`. - * - * Delegates to `eintraege(assertionCreatorOrNull)`. - * - * @param assertionCreatorOrNull The identification lambda. - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -fun > IterableContains.Builder.eintrag(assertionCreatorOrNull: (Assert.() -> Unit)?): AssertionPlant - = eintraege(assertionCreatorOrNull) - -/** - * Finishes the specification of the sophisticated `contains` assertion where an entry needs to be contained in the - * [Iterable] which holds all assertions [assertionCreatorOrNull] might create or needs to be `null` in case - * [assertionCreatorOrNull] is defined as `null` -- likewise an entry for each - * [otherAssertionCreatorsOrNulls] needs to be contained in the [Iterable] where it does not matter in which order the - * entries appear but only as many entries should be returned by the [Iterable] as assertion creators are defined. - * - * Notice, that a first-wins strategy applies which means your assertion creator lambdas -- which kind of serve as - * identification lambdas -- should be ordered in such a way that the most specific identification lambda appears - * first, not that a less specific lambda wins. For instance, given a `setOf(1, 2)` you should not search for - * `eintraege({ isGreaterThan(0) }, { toBe(1) })` but for - * `eintraege({ toBe(1) }, { isGreaterThan(0) })` otherwise - * `isGreaterThan(0)` matches `1` before `toBe(1)` would match it. As a consequence `toBe(1)` could only match the - * entry which is left -- in this case `2` -- and of course this would fail. - * - * @param assertionCreatorOrNull The identification lambda which creates the assertions which the entry we are looking for - * has to hold; or in other words, the function which defines whether an entry is the one we are looking for - * or not. In case it is defined as `null`, then an entry is identified if it is `null` as well. - * @param otherAssertionCreatorsOrNulls Additional identification lambdas which each identify (separately) an entry - * which we are looking for (see [assertionCreatorOrNull] for more information). - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -@Suppress("DEPRECATION") -fun > IterableContains.Builder.eintraege( - assertionCreatorOrNull: (Assert.() -> Unit)?, - vararg otherAssertionCreatorsOrNulls: (Assert.() -> Unit)? -): AssertionPlant - = addAssertion(AssertImpl.iterable.contains.entriesInAnyOrderOnlyWithAssert(this, assertionCreatorOrNull glue otherAssertionCreatorsOrNulls)) - -/** - * Helper method to simplify adding assertions to the plant which itself is stored in - * [CharSequenceContains.CheckerOption.containsBuilder]. - * - * @return The plant to support a fluent API. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -internal fun , S : IterableContains.SearchBehaviour> IterableContains.Builder.addAssertion( - assertion: Assertion -): AssertionPlant = addAssertionForAssert(assertion) diff --git a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/iterableContainsInOrderOnlyCreators.kt b/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/iterableContainsInOrderOnlyCreators.kt deleted file mode 100644 index be70263e2..000000000 --- a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/iterableContainsInOrderOnlyCreators.kt +++ /dev/null @@ -1,85 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") - -@file:JvmMultifileClass -@file:JvmName("IterableContainsInOrderOnlyCreatorsKt") -package ch.tutteli.atrium.api.cc.de_CH - -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.domain.builders.AssertImpl -import ch.tutteli.kbox.glue -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InOrderOnlySearchBehaviour -import kotlin.jvm.JvmMultifileClass -import kotlin.jvm.JvmName - -/** - * Finishes the specification of the sophisticated `contains` assertion where the [Iterable] needs to contain only the - * [expected] value. - * - * Delegate to `werte(expected)`. - * - * @param expected The value which is expected to be contained within the [Iterable]. - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -fun > IterableContains.Builder.wert(expected: E): AssertionPlant - = werte(expected) - - -/** - * Finishes the specification of the sophisticated `contains` assertion where the [Iterable] needs to contain only the - * [expected] value as well as the [otherExpected] values - * (if given) in the specified order. - * - * @param expected The value which is expected to be contained within the [Iterable]. - * @param otherExpected Additional values which are expected to be contained within [Iterable]. - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -fun > IterableContains.Builder.werte(expected: E, vararg otherExpected: E): AssertionPlant - = addAssertion(AssertImpl.iterable.contains.valuesInOrderOnly(this, expected glue otherExpected)) - -/** - * Finishes the specification of the sophisticated `contains` assertion where the [Iterable] needs to contain only a - * single entry which holds all assertions created by the given [assertionCreatorOrNull] or needs to be `null` - * in case [assertionCreatorOrNull] is defined as `null`. - * - * Delegates to `eintraege(assertionCreatorOrNull)`. - * - * @param assertionCreatorOrNull The identification lambda. - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -fun > IterableContains.Builder.eintrag(assertionCreatorOrNull: (Assert.() -> Unit)?): AssertionPlant - = eintraege(assertionCreatorOrNull) - -/** - * Finishes the specification of the sophisticated `contains` assertion where the [Iterable] needs to contain only an - * entry which holds all assertions [assertionCreatorOrNull] might create or is `null` in case [assertionCreatorOrNull] - * is defined as `null` and likewise a further entry for each - * [otherAssertionCreatorsOrNulls] (if given) whereas the entries have to appear in the specified order. - * - * @param assertionCreatorOrNull The identification lambda which creates the assertions which the entry we are looking for - * has to hold; or in other words, the function which defines whether an entry is the one we are looking for - * or not. In case it is defined as `null`, then an entry is identified if it is `null` as well. - * @param otherAssertionCreatorsOrNulls Additional identification lambdas which each identify (separately) an entry - * which we are looking for (see [assertionCreatorOrNull] for more information). - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -@Suppress("DEPRECATION") -fun > IterableContains.Builder.eintraege( - assertionCreatorOrNull: (Assert.() -> Unit)?, - vararg otherAssertionCreatorsOrNulls: (Assert.() -> Unit)? -): AssertionPlant - = addAssertion(AssertImpl.iterable.contains.entriesInOrderOnlyWithAssert(this, assertionCreatorOrNull glue otherAssertionCreatorsOrNulls)) diff --git a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/iterableContainsInOrderOnlyGroupedCreators.kt b/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/iterableContainsInOrderOnlyGroupedCreators.kt deleted file mode 100644 index 98952fd7f..000000000 --- a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/iterableContainsInOrderOnlyGroupedCreators.kt +++ /dev/null @@ -1,72 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") - -@file:JvmMultifileClass -@file:JvmName("IterableContainsInOrderOnlyGroupedCreatorsKt") -package ch.tutteli.atrium.api.cc.de_CH - -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.domain.builders.AssertImpl -import ch.tutteli.atrium.domain.builders.utils.Group -import ch.tutteli.atrium.domain.builders.utils.groupsToList -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InOrderOnlyGroupedWithinSearchBehaviour -import kotlin.jvm.JvmMultifileClass -import kotlin.jvm.JvmName - -/** - * Finishes the specification of the sophisticated `contains` assertion where the expected [firstGroup] as well as - * the [secondGroup] and optionally [otherExpectedGroups] of values need to be contained in [Iterable] as - * only elements and in the specified order whereas the values within the groups can occur in any order. - * - * @param firstGroup A group of values which have to appear at first within the [Iterable]. - * @param secondGroup A group of values which have to appear after the values of the [firstGroup] within the [Iterable]. - * @param otherExpectedGroups Additional groups of values which are expected to appear after the [secondGroup] within - * [Iterable] whereas the groups have to appear in the given order. - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -fun > IterableContains.Builder.inBeliebigerReihenfolge( - firstGroup: Group, - secondGroup: Group, - vararg otherExpectedGroups: Group -): AssertionPlant = addAssertion( - AssertImpl.iterable.contains.valuesInOrderOnlyGrouped( - this, - groupsToList(firstGroup, secondGroup, otherExpectedGroups) - ) -) - -/** - * Finishes the specification of the sophisticated `contains` assertion where the expected [firstGroup] as well as - * the [secondGroup] and optionally [otherExpectedGroups] of identification lambdas, identifying an entry, - * need to be contained in [Iterable] as only elements and in the specified order whereas - * the identification lambdas within the groups can occur in any order. - * - * An identification lambda can also be defined with `null` in which case it matches an entry which is `null` as well. - * Have a look at [eintraege] for more information about identification lambdas. - * - * @param firstGroup A group of identification lambdas which have to appear at first within the [Iterable]. - * @param secondGroup A group of identification lambdas which have to appear after the values of the [firstGroup] within the [Iterable]. - * @param otherExpectedGroups Additional groups of values which are expected to appear after the [secondGroup] within - * [Iterable] whereas the groups have to appear in the given order. - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -@Suppress("DEPRECATION") -@JvmName("inBeliebigerReihenfolgeEintraege") -fun > IterableContains.Builder.inBeliebigerReihenfolge( - firstGroup: Group<(Assert.() -> Unit)?>, - secondGroup: Group<(Assert.() -> Unit)?>, - vararg otherExpectedGroups: Group<(Assert.() -> Unit)?> -): AssertionPlant = addAssertion( - AssertImpl.iterable.contains.entriesInOrderOnlyGroupedWithAssert( - this, - groupsToList(firstGroup, secondGroup, otherExpectedGroups) - ) -) diff --git a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/listAssertions.kt b/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/listAssertions.kt deleted file mode 100644 index 5c802bf61..000000000 --- a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/listAssertions.kt +++ /dev/null @@ -1,48 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") -package ch.tutteli.atrium.api.cc.de_CH - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.creating.AssertionPlantNullable -import ch.tutteli.atrium.domain.builders.AssertImpl - -/** - * Makes the assertion that the given [index] is within the bounds of [Assert.subject][SubjectProvider.subject], - * creates a feature assertion plant for the corresponding element and returns the newly created plant. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the given [index] is out of bound. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -@Suppress("DEPRECATION") -fun > Assert.get(index: Int): Assert - = AssertImpl.list.get(this, index) - -/** - * Makes the assertion that the given [index] is within the bounds of [Assert.subject][SubjectProvider.subject] and that - * the corresponding element holds all assertions the given [assertionCreator] might create for it. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if a created [Assertion]s (by calling [assertionCreator]) - * does not hold. - * @throws IllegalArgumentException in case the given [assertionCreator] did not create a single assertion. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -@Suppress("DEPRECATION") -fun > Assert.get(index: Int, assertionCreator: Assert.() -> Unit) - = addAssertion(AssertImpl.list.get(this, index, assertionCreator)) - -/** - * Makes the assertion that the given [index] is within the bounds of [Assert.subject][SubjectProvider.subject], - * creates a feature assertion plant for the corresponding nullable element and returns the newly created plant. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the given [index] is out of bound. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -@Suppress("DEPRECATION") -fun > Assert.get(index: Int): AssertionPlantNullable - = AssertImpl.list.getNullable(this, index) diff --git a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/mapAssertions.kt b/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/mapAssertions.kt deleted file mode 100644 index bee63efb5..000000000 --- a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/mapAssertions.kt +++ /dev/null @@ -1,221 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") -package ch.tutteli.atrium.api.cc.de_CH - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.creating.AssertionPlantNullable -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.domain.builders.AssertImpl -import ch.tutteli.atrium.domain.builders.ExpectImpl -import ch.tutteli.kbox.glue -import kotlin.js.JsName - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] contains a key as defined by - * [entry]'s [Pair.first] with a corresponding value as defined by [entry]'s [Pair.second] - * -- optionally the same assertions are created for the [otherEntries]. - * - * Notice, that it does not search for unique matches. Meaning, if the map is `mapOf('a' to 1)` and [entry] is - * defined as `'a' to 1` and one of the [otherEntries] is defined as `'a' to 1` as well, then both match, - * even though they match the same entry. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -@Suppress("DEPRECATION") -fun > Assert.enthaelt(entry: Pair, vararg otherEntries: Pair) - = addAssertion(AssertImpl.map.contains(this, entry glue otherEntries)) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] contains a key as defined by [keyValue]'s [KeyValue.key] - * with a corresponding value which either holds all assertions [keyValue]'s - * [KeyValue.valueAssertionCreatorOrNull] might create or needs to be `null` in case - * [KeyValue.valueAssertionCreatorOrNull] is defined as `null` - * -- optionally the same assertions are created for the [otherKeyValues]. - * - * Notice, that it does not search for unique matches. Meaning, if the map is `mapOf('a' to 1)` and [keyValue] is - * defined as `Key('a') { isGreaterThan(0) }` and one of the [otherKeyValues] is defined as `Key('a') { isLessThan(2) }` - * , then both match, even though they match the same entry. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -@Suppress("DEPRECATION") -fun > Assert.enthaelt( - keyValue: KeyValue, - vararg otherKeyValues: KeyValue -) = addAssertion(AssertImpl.map.containsKeyWithValueAssertions(this, (keyValue glue otherKeyValues).map { it.toPair() })) - - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] contains the given [key]. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -fun Assert>.enthaeltKey(key: K) - = addAssertion(AssertImpl.map.containsKey(this, key)) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] does not contain the given [key]. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -fun Assert>.enthaeltNichtKey(key: K) - = addAssertion(AssertImpl.map.containsNotKey(this, key)) - - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] contains the given [key], creates a feature - * assertion plant for corresponding value and returns the newly created plant. - * - * @return The newly created plant for the feature - * @throws AssertionError Might throw an [AssertionError] if the given [key] does not exist. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -@Suppress("DEPRECATION") -@JsName("getExistierend") -fun > Assert.getExistierend(key: K): Assert - = AssertImpl.map.getExisting(this, key) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] contains the given [key] and that the corresponding value - * holds all assertions the given [assertionCreator] might create for it. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if a created [Assertion]s (by calling [assertionCreator]) - * does not hold. - * @throws IllegalArgumentException in case the given [assertionCreator] did not create a single assertion. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -@Suppress("DEPRECATION") -fun > Assert.getExistierend(key: K, assertionCreator: Assert.() -> Unit) - = addAssertion(AssertImpl.map.getExisting(this, key, assertionCreator)) - - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] contains the given [key], creates a feature - * assertion plant for corresponding nullable value and returns the newly created plant. - * - * @return The newly created plant for the feature - * @throws AssertionError Might throw an [AssertionError] if the given [key] does not exist. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -@Suppress("DEPRECATION") -fun > Assert.getExistierend(key: K): AssertionPlantNullable - = AssertImpl.map.getExistingNullable(this, key) - - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject]'s [Map.size] is [size]. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -@Suppress("DEPRECATION") -fun > Assert.hatDieGroesse(size: Int) - = addAssertion(AssertImpl.map.hasSize(this, size)) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] is an empty [Map]. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -fun > Assert.istLeer() - = addAssertion(AssertImpl.map.isEmpty(this)) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] is not an empty [Map]. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -fun > Assert.istNichtLeer() - = addAssertion(AssertImpl.map.isNotEmpty(this)) - -/** - * Creates an [AssertionPlant] for the [Assert.subject][SubjectProvider.subject]'s property [keys][Map.keys] so that further - * fluent calls are assertions about it. - * - * Wrap it into Kotlin's [apply] if you want to make subsequent assertions on the current subject or use the overload - * which expects an assertionCreator lambda where sub assertions are evaluated together (form an assertion group block). - * - * @return The newly created [AssertionPlant]. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -val Assert>.keys get() : Assert> = property(Map::keys) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject]'s property [keys][Map.keys] holds all assertions the given - * [assertionCreator] might create for it. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if a created [Assertion]s (by calling [assertionCreator]) - * does not hold. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -@Suppress("DEPRECATION") -fun > Assert.keys(assertionCreator: Assert>.() -> Unit) - = addAssertion(AssertImpl.map.keys(this, assertionCreator)) - -/** - * Creates an [AssertionPlant] for the [Assert.subject][SubjectProvider.subject]'s property [values][Map.values] so that further - * fluent calls are assertions about it. - * - * Wrap it into Kotlin's [apply] if you want to make subsequent assertions on the current subject or use the overload - * which expects an assertionCreator lambda where sub assertions are evaluated together (form an assertion group block). - * - * @return The newly created [AssertionPlant]. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -val Assert>.values get() : Assert> = property(Map::values) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject]'s property [values][Map.values] holds all assertions the given - * [assertionCreator] might create for it. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if a created [Assertion]s (by calling [assertionCreator]) - * does not hold. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -@Suppress("DEPRECATION") -fun > Assert.values(assertionCreator: Assert>.() -> Unit) - = addAssertion(AssertImpl.map.values(this, assertionCreator)) - -/** - * Turns `Assert>` into `Assert>>`. - * - * The transformation as such is not reflected in reporting. - * Use `property(subject::entries)` if you want to show the transformation in reporting. - * - * @return The newly created [AssertionPlant] for the transformed subject. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -@Suppress("DEPRECATION") -fun Assert>.asEntries(): Assert>> - = ExpectImpl.changeSubject(this).unreported { it.entries } - -/** - * Turns `Assert>` into `Assert>>` and makes the assertion that the assertions the given - * [assertionCreator] might create hold. - * - * The transformation as such is not reflected in reporting. - * Use `property(subject::entries)` if you want to show the transformation in reporting. - * - * @return The newly created [AssertionPlant] for the transformed subject. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -fun Assert>.asEntries(assertionCreator: Assert>>.() -> Unit): Assert>> - = asEntries().addAssertionsCreatedBy(assertionCreator) diff --git a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/mapEntryAssertions.kt b/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/mapEntryAssertions.kt deleted file mode 100644 index 8b99a9ddd..000000000 --- a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/mapEntryAssertions.kt +++ /dev/null @@ -1,105 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") -package ch.tutteli.atrium.api.cc.de_CH - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.creating.AssertionPlantNullable -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.domain.builders.AssertImpl - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject]'s [Map.Entry.key] is (equal to) the given [key] and - * [Map.Entry.value] is [value]. - * - * Kind of a shortcut for `this.key.ist(key).und.value.ist(value)` but should be evaluated in - * an assertion group block -- which has the effect that the assertion about the value is still evaluated even - * if the assertion about the key fails. Moreover, it might be that reporting differs compared to using the long form. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -@Suppress("DEPRECATION") -fun Assert>.istKeyValue(key: K, value: V): Assert> - = addAssertion(AssertImpl.map.entry.isKeyValue(this, key, value)) - -/** - * Creates an [AssertionPlant] for the [Assert.subject][SubjectProvider.subject]'s property [key][Map.Entry.key] so that further - * fluent calls are assertions about it. - * - * Wrap it into Kotlin's [apply] if you want to make subsequent assertions on the current subject or use the overload - * which expects an assertionCreator lambda where sub assertions are evaluated together (form an assertion group block). - * - * @return The newly created [AssertionPlant]. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -val Assert>.key get() : Assert = property(Map.Entry::key) - -/** - * Creates an [AssertionPlant] for the [Assert.subject][SubjectProvider.subject]'s property [key][Map.Entry.key] (which could be `null`) - * so that further fluent calls are assertions about it. - * - * Wrap it into Kotlin's [apply] if you want to make subsequent assertions on the current subject or use the overload - * which expects an assertionCreator lambda where sub assertions are evaluated together (form an assertion group block). - * - * @return The newly created [AssertionPlant]. - */ -//TODO deprecate as soon as https://youtrack.jetbrains.com/issue/KT-33398 is fixed -//@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -val Assert>.key get() : AssertionPlantNullable = property(Map.Entry::key) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject]'s property [key][Map.Entry.key] holds all assertions the given - * [assertionCreator] might create for it. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if a created [Assertion]s (by calling [assertionCreator]) - * does not hold. - * @throws IllegalArgumentException in case the given [assertionCreator] did not create a single assertion. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -@Suppress("DEPRECATION") -fun Assert>.key(assertionCreator: Assert.() -> Unit) - = addAssertion(AssertImpl.map.entry.key(this, assertionCreator)) - -/** - * Creates an [AssertionPlant] for the [Assert.subject][SubjectProvider.subject]'s property [value][Map.Entry.value] so that further - * fluent calls are assertions about it. - * - * Wrap it into Kotlin's [apply] if you want to make subsequent assertions on the current subject or use the overload - * which expects an assertionCreator lambda where sub assertions are evaluated together (form an assertion group block). - * - * @return The newly created [AssertionPlant]. - */ -//TODO deprecate as soon as https://youtrack.jetbrains.com/issue/KT-33398 is fixed -//@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -val Assert>.value get() : Assert = property(Map.Entry<*, V>::value) - -/** - * Creates an [AssertionPlant] for the [Assert.subject][SubjectProvider.subject]'s property [value][Map.Entry.value] - * (which could be `null`) so that further fluent calls are assertions about it. - * - * Wrap it into Kotlin's [apply] if you want to make subsequent assertions on the current subject or use the overload - * which expects an assertionCreator lambda where sub assertions are evaluated together (form an assertion group block). - * - * @return The newly created [AssertionPlant]. - */ -//TODO deprecate as soon as https://youtrack.jetbrains.com/issue/KT-33398 is fixed -//@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -val Assert>.value get() : AssertionPlantNullable = property(Map.Entry<*, V>::value) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject]'s property [value][Map.Entry.value] holds all assertions the given - * [assertionCreator] might create for it. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if a created [Assertion]s (by calling [assertionCreator]) - * does not hold. - * @throws IllegalArgumentException in case the given [assertionCreator] did not create a single assertion. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -@Suppress("DEPRECATION") -fun Assert>.value(assertionCreator: Assert.() -> Unit) - = addAssertion(AssertImpl.map.entry.value(this, assertionCreator)) diff --git a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/pairAssertions.kt b/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/pairAssertions.kt deleted file mode 100644 index a83904b04..000000000 --- a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/pairAssertions.kt +++ /dev/null @@ -1,90 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") -package ch.tutteli.atrium.api.cc.de_CH - -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.creating.AssertionPlantNullable -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.domain.builders.AssertImpl - -/** - * Creates an [AssertionPlant] for the [Assert.subject][SubjectProvider.subject]'s property [first][Pair.first] so that further - * fluent calls are assertions about it. - * - * Wrap it into Kotlin's [apply] if you want to make subsequent assertions on the current subject or use the overload - * which expects an assertionCreator lambda where sub assertions are evaluated together (form an assertion group block). - * - * @return The newly created [AssertionPlant]. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -val Assert>.first get() : Assert = property(Pair::first) - -/** - * Creates an [AssertionPlant] for the [Assert.subject][SubjectProvider.subject]'s property [first][Pair.first] (which could be `null`) - * so that further fluent calls are assertions about it. - * - * Wrap it into Kotlin's [apply] if you want to make subsequent assertions on the current subject or use the overload - * which expects an assertionCreator lambda where sub assertions are evaluated together (form an assertion group block). - * - * @return The newly created [AssertionPlant]. - */ -//TODO deprecate as soon as https://youtrack.jetbrains.com/issue/KT-33398 is fixed -//@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -val Assert>.first get() : AssertionPlantNullable = property(Pair::first) - - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject]'s property [first][Pair.first] holds all assertions the given - * [assertionCreator] might create for it. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if a created [Assertion]s (by calling [assertionCreator]) - * does not hold. - * @throws IllegalArgumentException in case the given [assertionCreator] did not create a single assertion. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -@Suppress("DEPRECATION") -fun Assert>.first(assertionCreator: Assert.() -> Unit) - = addAssertion(AssertImpl.pair.first(this, assertionCreator)) - -/** - * Creates an [AssertionPlant] for the [Assert.subject][SubjectProvider.subject]'s property [second][Pair.second] so that further - * fluent calls are assertions about it. - * - * Wrap it into Kotlin's [apply] if you want to make subsequent assertions on the current subject or use the overload - * which expects an assertionCreator lambda where sub assertions are evaluated together (form an assertion group block). - * - * @return The newly created [AssertionPlant]. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -val Assert>.second get() : Assert = property(Pair<*, V>::second) - -/** - * Creates an [AssertionPlant] for the [Assert.subject][SubjectProvider.subject]'s property [second][Pair.second] - * (which could be `null`) so that further fluent calls are assertions about it. - * - * Wrap it into Kotlin's [apply] if you want to make subsequent assertions on the current subject or use the overload - * which expects an assertionCreator lambda where sub assertions are evaluated together (form an assertion group block). - * - * @return The newly created [AssertionPlant]. - */ -//TODO deprecate as soon as https://youtrack.jetbrains.com/issue/KT-33398 is fixed -//@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -val Assert>.second get() : AssertionPlantNullable = property(Pair<*, V>::second) - - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject]'s property [second][Pair.second] holds all assertions the given - * [assertionCreator] might create for it. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if a created [Assertion]s (by calling [assertionCreator]) - * does not hold. - * @throws IllegalArgumentException in case the given [assertionCreator] did not create a single assertion. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -@Suppress("DEPRECATION") -fun Assert>.second(assertionCreator: Assert.() -> Unit) - = addAssertion(AssertImpl.pair.second(this, assertionCreator)) diff --git a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/parameterObjects.kt b/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/parameterObjects.kt deleted file mode 100644 index fb40e3432..000000000 --- a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/parameterObjects.kt +++ /dev/null @@ -1,87 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") -@file:JvmMultifileClass -@file:JvmName("ParameterObjectsKt") - -package ch.tutteli.atrium.api.cc.de_CH - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.domain.builders.utils.Group -import ch.tutteli.atrium.domain.builders.utils.GroupWithNullableEntries -import ch.tutteli.atrium.domain.builders.utils.GroupWithoutNullableEntries -import ch.tutteli.atrium.domain.builders.utils.VarArgHelper -import ch.tutteli.kbox.glue -import kotlin.jvm.JvmMultifileClass -import kotlin.jvm.JvmName - -/** - * Parameter object to express a [Group] with a single identification lambda. - * - * In case `null` is used for the identification lambda then it is expected that the corresponding entry - * is `null` as well. - * - * @param assertionCreator The identification lambda identifying the entry where an entry is considered - * to be identified if it holds all [Assertion]s the lambda might create or if it is `null` in case - * [assertionCreator] is defined as `null`. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -class Eintrag( - val assertionCreator: ((Assert) -> Unit)? -) : GroupWithoutNullableEntries<((Assert) -> Unit)?>, GroupWithNullableEntries<((Assert) -> Unit)?> { - override fun toList(): List<((Assert) -> Unit)?> = listOf(assertionCreator) -} - -/** - * Parameter object to express a [Group] of identification lambdas. - * - * In case `null` is used for an identification lambda then it is expected that the corresponding entry - * is `null` as well. - * - * @param assertionCreatorOrNull The identification lambda identifying the entry where an entry is considered - * to be identified if it holds all [Assertion]s the lambda might create or if it is `null` in case - * [assertionCreatorOrNull] is defined as `null`. - * @param otherAssertionCreatorsOrNulls A variable amount of additional identification lambdas or `null`s. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -class Eintraege( - val assertionCreatorOrNull: ((Assert) -> Unit)?, - vararg val otherAssertionCreatorsOrNulls: ((Assert) -> Unit)? -) : GroupWithoutNullableEntries<((Assert) -> Unit)?>, GroupWithNullableEntries<((Assert) -> Unit)?>, VarArgHelper<((Assert) -> Unit)?> { - override val expected get() = assertionCreatorOrNull - override val otherExpected get() = otherAssertionCreatorsOrNulls - - override fun toList(): List<((Assert) -> Unit)?> = assertionCreatorOrNull glue otherAssertionCreatorsOrNulls -} - - -/** - * Parameter object to express a key/value [Pair] whose value type is a lambda with an - * [Assert][AssertionPlant] receiver, which means one can either pass a lambda or `null`. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -data class KeyValue(val key: K, val valueAssertionCreatorOrNull: (Assert.() -> Unit)?) { - fun toPair(): Pair.() -> Unit)?> = key to valueAssertionCreatorOrNull - override fun toString(): String - = "KeyValue(key=$key, value=${if (valueAssertionCreatorOrNull == null) "null" else "lambda"})" -} - -/** - * Represents a [GroupWithoutNullableEntries] with a single value. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -data class Wert(val expected: T) : GroupWithNullableEntries, GroupWithoutNullableEntries { - override fun toList() = listOf(expected) -} - -/** - * Represents a [GroupWithoutNullableEntries] of multiple values. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -class Werte( - override val expected: T, - override vararg val otherExpected: T -) : GroupWithoutNullableEntries, GroupWithNullableEntries, VarArgHelper { - override fun toList() = listOf(expected, *otherExpected) -} diff --git a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/sequenceAssertions.kt b/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/sequenceAssertions.kt deleted file mode 100644 index e4dd02d6a..000000000 --- a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/sequenceAssertions.kt +++ /dev/null @@ -1,20 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") -package ch.tutteli.atrium.api.cc.de_CH - -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.domain.builders.ExpectImpl - -/** - * Turns `Assert>` into `Assert>`. - * - * The transformation as such is not reflected in reporting. - * Use `returnValueOf(Sequence::asIterable)` if you want to show the transformation in reporting. - * - * @return The newly created [AssertionPlant] for the transformed subject. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -@Suppress("DEPRECATION") -fun Assert>.asIterable(): Assert> - = ExpectImpl.changeSubject(this).unreported { it.asIterable() } diff --git a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/throwableAssertions.kt b/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/throwableAssertions.kt deleted file mode 100644 index 23b9b18d1..000000000 --- a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/throwableAssertions.kt +++ /dev/null @@ -1,83 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") -@file:JvmMultifileClass -@file:JvmName("ThrowableAssertionsKt") -package ch.tutteli.atrium.api.cc.de_CH - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.creating.AssertionPlantNullable -import ch.tutteli.atrium.domain.builders.AssertImpl -import ch.tutteli.atrium.domain.creating.throwable.thrown.ThrowableThrown -import kotlin.jvm.JvmMultifileClass -import kotlin.jvm.JvmName - -/** - * Makes the assertion that the thrown [Throwable] is of type [TExpected] and holds all assertions the - * [assertionCreator] might create in addition. - * - * @return Notice, that this assertion function cannot provide a fluent API because it depends on whether the first - * assertion (a [Throwable] was thrown) holds or not. - * Define subsequent assertions via the [assertionCreator] lambda. - * - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -inline fun ThrowableThrown.Builder.wirft(noinline assertionCreator: Assert.() -> Unit) { - @Suppress("DEPRECATION") - AssertImpl.throwable.thrown.toBe(this, TExpected::class, assertionCreator) -} - -/** - * Makes the assertion that no [Throwable] is thrown at all. - * - * @return Notice, that this assertion function cannot provide a fluent API because we assume nothing happens, - * so there is nothing we could make assertions on in addition. - * - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -fun ThrowableThrown.Builder.wirftNichts() { - @Suppress("DEPRECATION") - AssertImpl.throwable.thrown.nothingThrown(this) -} - -/** - * Creates an [AssertionPlantNullable] for the [message][Throwable.message] of the plant's - * [subject][SubjectProvider.subject] (which is a [Throwable]) and makes the assertion that message [istNichtNull] - * and uses [assertionCreator] which might create further [Assertion]s which are lazily evaluated at the end. - * - * @return Notice, that this assertion function cannot provide a fluent API because it depends on whether the first - * assertion [message][Throwable.message] is not null) holds or not. - * Define subsequent assertions via the [assertionCreator] lambda. - * - * @throws AssertionError Might throw an [AssertionError] in case [message][Throwable.message] is `null` - * or if an additionally created [Assertion]s (by calling [assertionCreator]) does not hold. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -fun Assert.message(assertionCreator: Assert.() -> Unit) { - property(Throwable::message).istNichtNull(assertionCreator) -} - -/** - * Creates the assertion that the [Throwable]'s [message][Throwable.message] is not null (see [message]) contains - * [expected]'s [toString] representation and the [toString] representation of the [otherExpected] (if given), - * using a non disjoint search. - * - * It is a shortcut for `message { enthaelt.zumindest(1).werte(expected, otherExpected) }` - * - * Notice that a runtime check applies which assures that only [CharSequence], [Number] and [Char] are passed - * (this function expects `Any` for your convenience, so that you can mix [String] and [Int] for instance). - * - * @return Notice, that this assertion function cannot provide a fluent API because it depends on whether the first - * assertion [message][Throwable.message] is not null) holds or not. - * - * @throws AssertionError Might throw an [AssertionError] in case [message][Throwable.message] is `null` - * or does not contain [expected] or [otherExpected]. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -fun Assert.messageEnthaelt(expected: Any, vararg otherExpected: Any) { - message { enthaelt(expected, *otherExpected) } -} diff --git a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/typeTransformationAssertions.kt b/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/typeTransformationAssertions.kt deleted file mode 100644 index f7e872497..000000000 --- a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-common/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/typeTransformationAssertions.kt +++ /dev/null @@ -1,57 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") -@file:JvmMultifileClass -@file:JvmName("TypeTransformationAssertionsKt") -package ch.tutteli.atrium.api.cc.de_CH - -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.creating.AssertionPlantNullable -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.domain.builders.AssertImpl -import kotlin.jvm.JvmMultifileClass -import kotlin.jvm.JvmName - -/** - * Makes the assertion that [AssertionPlantNullable.subject][SubjectProvider.subject] is not null and if so, uses [assertionCreator] - * which could create further assertions which are added as a group. - * - * @return Notice, that this assertion function cannot provide a fluent API because it depends on whether the first - * assertion ([Assert.subject][SubjectProvider.subject] is not null) holds or not. Define subsequent assertions via - * the [assertionCreator] lambda. - * - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -@Suppress("DEPRECATION") -inline fun AssertionPlantNullable.istNichtNull(noinline assertionCreator: Assert.() -> Unit) { - addAssertion(AssertImpl.any.isNotNull(this, T::class, assertionCreator)) -} - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] *is a* [TSub] (the same type or a sub-type) and if so, - * uses [assertionCreator] which could create further assertions which are added as a group. - * - * Notice, that asserting a function type is [flawed](https://youtrack.jetbrains.com/issue/KT-27846). - * The actual types are ignored as function types erase to Function0, - * Function1 etc. on byte code level, which means the assertion holds as long as the [Assert.subject][SubjectProvider.subject] is a - * function and has the same amount of arguments regardless if the types differ. For instance - * `esGilt({x: Int -> "hello"}).istEin Unit>{}` holds, even though `(Int) -> String` is clearly not - * a `(String) -> Unit`. - * - * More generally speaking, the [flaw](https://youtrack.jetbrains.com/issue/KT-27826) applies to all generic types. - * For instance `isA>` would only check if the [Assert.subject][SubjectProvider.subject] is a `List` without checking if - * the element type is actually `String`. Or in other words - * `esGilt(listOf(1, 2)).isA>{}` holds, even though `List` is clearly not a `List`. - * - * @return Notice, that this assertion function cannot provide a fluent API because it depends on whether the first - * assertion ([Assert.subject][SubjectProvider.subject] *is a* [TSub]) holds or not. Define subsequent assertions - * via the [assertionCreator] lambda. - * - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -@Suppress("DEPRECATION") -inline fun Assert.istEin(noinline assertionCreator: AssertionPlant.() -> Unit) { - AssertImpl.any.typeTransformation.isA(this, TSub::class, assertionCreator) -} diff --git a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-js/build.gradle b/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-js/build.gradle deleted file mode 100644 index 0f9ff3856..000000000 --- a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-js/build.gradle +++ /dev/null @@ -1,8 +0,0 @@ -description = 'An assertion function API in de_CH with a focus on code completion for the JS platform.' + - 'It provides a fluent API in de_CH which is designed to ease the usage of code completion or ' + - 'in other words, the developer should be able to: ' + - 'start creating an assertion + code completion + . + code completion + . + and so on.' - -dependencies { - api prefixedProject('domain-builders-js') -} diff --git a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-jvm/build.gradle b/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-jvm/build.gradle deleted file mode 100644 index c02234071..000000000 --- a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-jvm/build.gradle +++ /dev/null @@ -1,30 +0,0 @@ -description = 'An assertion function API in de_CH with a focus on code completion for the JVM platform.' + - 'It provides a fluent API in de_CH which is designed to ease the usage of code completion or ' + - 'in other words, the developer should be able to: ' + - 'start creating an assertion + code completion + . + code completion + . + and so on.' - -ext.jacoco_additional = [ - prefixedProject('translations-de_CH-jvm'), - prefixedProject('domain-robstoll-jvm'), - prefixedProject('domain-robstoll-lib-jvm'), - prefixedProject('core-robstoll-jvm'), - prefixedProject('core-robstoll-lib-jvm'), -] - -dependencies { - api prefixedProject('domain-api-deprecated') - api prefixedProject('domain-builders-jvm') - - testImplementation(prefixedProject('spec')) { - exclude module: "${rootProject.name}-translations-en_GB-jvm" - } - testImplementation prefixedProject('translations-de_CH-jvm') -} - -//TODO should not be necessary https://youtrack.jetbrains.com/issue/KT-28124 -compileTestKotlin.dependsOn( - prefixedProject('core-robstoll-jvm').compileKotlin, - prefixedProject('core-robstoll-jvm').processResources, - prefixedProject('domain-robstoll-jvm').compileKotlin, - prefixedProject('domain-robstoll-jvm').processResources -) diff --git a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/CharSequenceContainsSearchersKt.kt b/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/CharSequenceContainsSearchersKt.kt deleted file mode 100644 index 750a95196..000000000 --- a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/CharSequenceContainsSearchersKt.kt +++ /dev/null @@ -1,104 +0,0 @@ -@file:Suppress("DEPRECATION" /* will be removed with 1.0.0 */) -package ch.tutteli.atrium.api.cc.de_CH - -import ch.tutteli.atrium.assertions.charsequence.contains.builders.CharSequenceContainsCheckerBuilder -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.domain.creating.charsequence.contains.searchbehaviours.IgnoringCaseSearchBehaviour -import ch.tutteli.atrium.domain.creating.charsequence.contains.searchbehaviours.NoOpSearchBehaviour -import ch.tutteli.atrium.reporting.translating.Translatable - -/** - * `Deprecated`, do not use this class, it is only here to retain binary compatibility. - */ -@Deprecated("Do not use this class, it is only here to retain binary compatibility (file was renamed to charSequenceContainsCreators); will be removed with 1.0.0") -object CharSequenceContainsSearchersKt { - - @JvmStatic - @Deprecated( - "Use the extension fun `value` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", - ReplaceWith("checkerBuilder.wert(expected)") - ) - fun wert( - checkerBuilder: CharSequenceContainsCheckerBuilder, - expected: Any - ): AssertionPlant = werte(checkerBuilder, expected) - - @JvmStatic - @Deprecated( - "Use the extension fun `the` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", - ReplaceWith("checkerBuilder.werte(expected, *otherExpected)") - ) - fun werte( - checkerBuilder: CharSequenceContainsCheckerBuilder, - expected: Any, - vararg otherExpected: Any - ): AssertionPlant = checkerBuilder.werte(expected, *otherExpected) - - - @JvmStatic - @Deprecated( - "Use the extension fun `value` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", - ReplaceWith("checkerBuilder.value(expected)") - ) - fun valueIgnoringCase( - checkerBuilder: CharSequenceContainsCheckerBuilder, - expected: Any - ): AssertionPlant = valuesIgnoringCase(checkerBuilder, expected) - - @JvmStatic - @Deprecated( - "Use the extension fun `values` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", - ReplaceWith("checkerBuilder.values(expected, *otherExpected)") - ) - fun valuesIgnoringCase( - checkerBuilder: CharSequenceContainsCheckerBuilder, - expected: Any, - vararg otherExpected: Any - ): AssertionPlant = checkerBuilder.werte(expected, *otherExpected) - - - @JvmStatic - @Deprecated( - "Use the extension fun `defaultTranslationOf` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", - ReplaceWith("checkerBuilder.defaultTranslationOf(expected, *otherExpected)") - ) - fun standardUebersetzungVon( - checkerBuilder: CharSequenceContainsCheckerBuilder, - expected: Translatable, - vararg otherExpected: Translatable - ): AssertionPlant = checkerBuilder.standardUebersetzungVon(expected, *otherExpected) - - @JvmStatic - @Deprecated( - "Use the extension fun `defaultTranslationOf` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", - ReplaceWith("checkerBuilder.defaultTranslationOf(expected, *otherExpected)") - ) - fun defaultTranslationOfIgnoringCase( - checkerBuilder: CharSequenceContainsCheckerBuilder, - expected: Translatable, - vararg otherExpected: Translatable - ): AssertionPlant = checkerBuilder.standardUebersetzungVon(expected, *otherExpected) - - - @JvmStatic - @Deprecated( - "Use the extension fun `regex` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", - ReplaceWith("checkerBuilder.regex(pattern, *otherPatterns)") - ) - fun regex( - checkerBuilder: CharSequenceContainsCheckerBuilder, - pattern: String, - vararg otherPatterns: String - ): AssertionPlant = checkerBuilder.regex(pattern, *otherPatterns) - - @JvmStatic - @Deprecated( - "Use the extension fun `regex` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", - ReplaceWith("checkerBuilder.regex(pattern, *otherPatterns)") - ) - fun regexIgnoringCase( - checkerBuilder: CharSequenceContainsCheckerBuilder, - pattern: String, - vararg otherPatterns: String - ): AssertionPlant = checkerBuilder.regex(pattern, *otherPatterns) -} diff --git a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/anyDeprecatedAssertions.kt b/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/anyDeprecatedAssertions.kt deleted file mode 100644 index dad2530c6..000000000 --- a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/anyDeprecatedAssertions.kt +++ /dev/null @@ -1,28 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") - -@file:JvmMultifileClass -@file:JvmName("AnyAssertionsKt") -package ch.tutteli.atrium.api.cc.de_CH - -import ch.tutteli.atrium.creating.AssertionPlantNullable -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.domain.builders.AssertImpl - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] is `null`. - * - * @return Does not support a fluent API because: what else would you want to assert about `null` anyway? - * - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Will be removed with 1.0.0 because it is redundant in terms of `ist(null)` without adding enough to be a legit alternative.", ReplaceWith("ist(null)")) -fun AssertionPlantNullable.istNull() { - addAssertion(AssertImpl.any.toBeNull(this)) -} - -@Deprecated("Use the extension function, will be removed with 1.0.0", ReplaceWith("plant.ist(null)")) -@Suppress("UNUSED_PARAMETER") -fun ist(plant: AssertionPlantNullable, void: Void?) { - plant.addAssertion(AssertImpl.any.toBeNull(plant)) -} diff --git a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/assertions/charsequence/contains/builders/CharSequenceContainsAtLeastCheckerBuilder.kt b/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/assertions/charsequence/contains/builders/CharSequenceContainsAtLeastCheckerBuilder.kt deleted file mode 100644 index 3972eecb4..000000000 --- a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/assertions/charsequence/contains/builders/CharSequenceContainsAtLeastCheckerBuilder.kt +++ /dev/null @@ -1,33 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0 */) -package ch.tutteli.atrium.api.cc.de_CH.assertions.charsequence.contains.builders - -import ch.tutteli.atrium.assertions.charsequence.contains.builders.CharSequenceContainsCheckerBuilder -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains - -/** - * Represents the *deprecated* builder of a `contains at least` check within the fluent API of a sophisticated - * `contains` assertion for [CharSequence]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - * - * @constructor Represents the builder of a `contains at least` check within the fluent API of a sophisticated - * `contains` assertion for [CharSequence]. - * @param times The number which the check will compare against the actual number of times an expected object is - * found in the input of the search. - * @param containsBuilder The previously used [CharSequenceContains.Builder]. - */ -@Deprecated( - "Use the builder from the package creating; will be removed with 1.0.0", - ReplaceWith( - "AtLeastCheckerOption", - "ch.tutteli.atrium.api.cc.de_CH.creating.charsequence.contains.builders.AtLeastCheckerOption" - ) -) -open class CharSequenceContainsAtLeastCheckerBuilder( - times: Int, - containsBuilder: CharSequenceContains.Builder -) : ch.tutteli.atrium.api.cc.de_CH.creating.charsequence.contains.builders.impl.AtLeastCheckerOptionImpl( - times, containsBuilder -), CharSequenceContainsCheckerBuilder - diff --git a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/assertions/charsequence/contains/builders/CharSequenceContainsAtMostCheckerBuilder.kt b/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/assertions/charsequence/contains/builders/CharSequenceContainsAtMostCheckerBuilder.kt deleted file mode 100644 index 54654a976..000000000 --- a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/assertions/charsequence/contains/builders/CharSequenceContainsAtMostCheckerBuilder.kt +++ /dev/null @@ -1,32 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0 */) -package ch.tutteli.atrium.api.cc.de_CH.assertions.charsequence.contains.builders - -import ch.tutteli.atrium.assertions.charsequence.contains.builders.CharSequenceContainsCheckerBuilder -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains - -/** - * Represents the *deprecated* builder of a `contains at least once but at most` check within the fluent API of a - * sophisticated `contains` assertion for [CharSequence]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - * - * @constructor Represents the builder of a `contains at least once but at most` check within the fluent API of a - * sophisticated `contains` assertion for [CharSequence]. - * @param times The number which the check will compare against the actual number of times an expected object is - * found in the input of the search. - * @param containsBuilder The previously used [CharSequenceContains.Builder]. - */ -@Deprecated( - "Use the builder from the package creating; will be removed with 1.0.0", - ReplaceWith( - "AtMostCheckerOption", - "ch.tutteli.atrium.api.cc.de_CH.creating.charsequence.contains.builders.AtMostCheckerOption" - ) -) -open class CharSequenceContainsAtMostCheckerBuilder( - times: Int, - containsBuilder: CharSequenceContains.Builder -) : ch.tutteli.atrium.api.cc.de_CH.creating.charsequence.contains.builders.impl.AtMostCheckerOptionImpl( - times, containsBuilder -), CharSequenceContainsCheckerBuilder diff --git a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/assertions/charsequence/contains/builders/CharSequenceContainsButAtMostCheckerBuilder.kt b/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/assertions/charsequence/contains/builders/CharSequenceContainsButAtMostCheckerBuilder.kt deleted file mode 100644 index 80c44601b..000000000 --- a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/assertions/charsequence/contains/builders/CharSequenceContainsButAtMostCheckerBuilder.kt +++ /dev/null @@ -1,33 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0 */) -package ch.tutteli.atrium.api.cc.de_CH.assertions.charsequence.contains.builders - -import ch.tutteli.atrium.assertions.charsequence.contains.builders.CharSequenceContainsCheckerBuilder -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains - -/** - * Represents the *deprecated* builder of the second step of a `contains at least but at most` check within the - * fluent API of a sophisticated `contains` assertion for [CharSequence]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied to the input of the search. - * - * @constructor Represents the builder of the second step of a `contains at least but at most` check within the - * fluent API of a sophisticated `contains` assertion for [CharSequence]. - * @param times The number which the check will compare against the actual number of times an expected object is - * found in the input of the search. - * @param containsBuilder The previously used [CharSequenceContains.Builder]. - */ -@Deprecated( - "Use the builder from the package creating; will be removed with 1.0.0", - ReplaceWith( - "ButAtMostCheckerOption", - "ch.tutteli.atrium.api.cc.de_CH.creating.charsequence.contains.builders.ButAtMostCheckerOption" - ) -) -open class CharSequenceContainsButAtMostCheckerBuilder( - times: Int, - atLeastBuilder: CharSequenceContainsAtLeastCheckerBuilder, - containsBuilder: CharSequenceContains.Builder -) : ch.tutteli.atrium.api.cc.de_CH.creating.charsequence.contains.builders.impl.ButAtMostCheckerOptionImpl( - times, atLeastBuilder, containsBuilder -), CharSequenceContainsCheckerBuilder diff --git a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/assertions/charsequence/contains/builders/CharSequenceContainsExactlyCheckerBuilder.kt b/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/assertions/charsequence/contains/builders/CharSequenceContainsExactlyCheckerBuilder.kt deleted file mode 100644 index f46774fe7..000000000 --- a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/assertions/charsequence/contains/builders/CharSequenceContainsExactlyCheckerBuilder.kt +++ /dev/null @@ -1,32 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0 */) -package ch.tutteli.atrium.api.cc.de_CH.assertions.charsequence.contains.builders - -import ch.tutteli.atrium.assertions.charsequence.contains.builders.CharSequenceContainsCheckerBuilder -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains - -/** - * Represents the *deprecated* builder of a `contains exactly` check within the fluent API of a sophisticated - * `contains` assertion for [CharSequence]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - * - * @constructor Represents the builder of a `contains exactly` check within the fluent API of a sophisticated - * `contains` assertion for [CharSequence]. - * @param times The number which the check will compare against the actual number of times an expected object is - * found in the input of the search. - * @param containsBuilder The previously used [CharSequenceContains.Builder]. - */ -@Deprecated( - "Use the builder from the package creating; will be removed with 1.0.0", - ReplaceWith( - "ExactlyCheckerOption", - "ch.tutteli.atrium.api.cc.de_CH.creating.charsequence.contains.builders.ExactlyCheckerOption" - ) -) -open class CharSequenceContainsExactlyCheckerBuilder( - times: Int, - containsBuilder: CharSequenceContains.Builder -) : ch.tutteli.atrium.api.cc.de_CH.creating.charsequence.contains.builders.impl.ExactlyCheckerOptionImpl( - times, containsBuilder -), CharSequenceContainsCheckerBuilder diff --git a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/assertions/charsequence/contains/builders/CharSequenceContainsNotCheckerBuilder.kt b/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/assertions/charsequence/contains/builders/CharSequenceContainsNotCheckerBuilder.kt deleted file mode 100644 index 4782e1859..000000000 --- a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/assertions/charsequence/contains/builders/CharSequenceContainsNotCheckerBuilder.kt +++ /dev/null @@ -1,30 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0 */) -package ch.tutteli.atrium.api.cc.de_CH.assertions.charsequence.contains.builders - -import ch.tutteli.atrium.assertions.charsequence.contains.builders.CharSequenceContainsCheckerBuilder -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains - -/** - * Represents the *deprecated* builder of a `contains not at all` check within the fluent API of a sophisticated - * `contains` assertion for [CharSequence]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - * - * @constructor Represents the builder of a `contains not at all` check within the fluent API of a sophisticated - * `contains` assertion for [CharSequence]. - * @param containsBuilder The previously used [CharSequenceContains.Builder]. - */ -@Deprecated( - "Use the builder from the package creating; will be removed with 1.0.0", - ReplaceWith( - "NotCheckerOption", - "ch.tutteli.atrium.api.cc.de_CH.creating.charsequence.contains.builders.NotCheckerOption" - ) -) -open class CharSequenceContainsNotCheckerBuilder( - containsBuilder: CharSequenceContains.Builder -) : ch.tutteli.atrium.api.cc.de_CH.creating.charsequence.contains.builders.impl.NotCheckerOptionImpl( - containsBuilder -), CharSequenceContainsCheckerBuilder - diff --git a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/assertions/charsequence/contains/builders/CharSequenceContainsNotOrAtMostCheckerBuilder.kt b/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/assertions/charsequence/contains/builders/CharSequenceContainsNotOrAtMostCheckerBuilder.kt deleted file mode 100644 index d670c622f..000000000 --- a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/assertions/charsequence/contains/builders/CharSequenceContainsNotOrAtMostCheckerBuilder.kt +++ /dev/null @@ -1,32 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0 */) -package ch.tutteli.atrium.api.cc.de_CH.assertions.charsequence.contains.builders - -import ch.tutteli.atrium.assertions.charsequence.contains.builders.CharSequenceContainsCheckerBuilder -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains - -/** - * Represents the *deprecated* builder of a `contains not or at most` check within the fluent API of a - * sophisticated `contains` assertion for [CharSequence]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - * - * @constructor Represents the builder of a `contains not or at most` check within the fluent API of a - * sophisticated `contains` assertion for [CharSequence]. - * @param times The number which the check will compare against the actual number of times an expected object is - * found in the input of the search. - * @param containsBuilder The previously used [CharSequenceContains.Builder]. - */ -@Deprecated( - "Use the builder from the package creating; will be removed with 1.0.0", - ReplaceWith( - "NotOrAtMostCheckerOption", - "ch.tutteli.atrium.api.cc.de_CH.creating.charsequence.contains.builders.NotOrAtMostCheckerOption" - ) -) -open class CharSequenceContainsNotOrAtMostCheckerBuilder( - times: Int, - containsBuilder: CharSequenceContains.Builder -) : ch.tutteli.atrium.api.cc.de_CH.creating.charsequence.contains.builders.impl.NotOrAtMostCheckerOptionImpl( - times, containsBuilder -), CharSequenceContainsCheckerBuilder diff --git a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/assertions/iterable/contains/builders/IterableContainsAtLeastCheckerBuilder.kt b/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/assertions/iterable/contains/builders/IterableContainsAtLeastCheckerBuilder.kt deleted file mode 100644 index a1313ec1b..000000000 --- a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/assertions/iterable/contains/builders/IterableContainsAtLeastCheckerBuilder.kt +++ /dev/null @@ -1,32 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0 */) -package ch.tutteli.atrium.api.cc.de_CH.assertions.iterable.contains.builders - -import ch.tutteli.atrium.assertions.iterable.contains.builders.IterableContainsCheckerBuilder -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InAnyOrderSearchBehaviour - -/** - * Represents the *deprecated* builder of a `contains at least` check within the fluent API of a sophisticated - * `contains` assertion for [Iterable]. - * - * @param T The input type of the search. - * - * @constructor Represents the builder of a `contains at least` check within the fluent API of a sophisticated - * `contains` assertion for [Iterable]. - * @param times The number which the check will compare against the actual number of times an expected entry is - * found in the [Iterable]. - * @param containsBuilder The previously used [IterableContains.Builder]. - */ -@Deprecated( - "Use the builder from the package creating; will be removed with 1.0.0", - ReplaceWith( - "AtLeastCheckerOption", - "ch.tutteli.atrium.api.cc.de_CH.creating.iterable.contains.builders.AtLeastCheckerOption" - ) -) -open class IterableContainsAtLeastCheckerBuilder>( - times: Int, - containsBuilder: IterableContains.Builder -) : ch.tutteli.atrium.api.cc.de_CH.creating.iterable.contains.builders.impl.AtLeastCheckerOptionImpl( - times, containsBuilder -), IterableContainsCheckerBuilder diff --git a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/assertions/iterable/contains/builders/IterableContainsAtMostCheckerBuilder.kt b/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/assertions/iterable/contains/builders/IterableContainsAtMostCheckerBuilder.kt deleted file mode 100644 index fdad81964..000000000 --- a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/assertions/iterable/contains/builders/IterableContainsAtMostCheckerBuilder.kt +++ /dev/null @@ -1,32 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0 */) -package ch.tutteli.atrium.api.cc.de_CH.assertions.iterable.contains.builders - -import ch.tutteli.atrium.assertions.iterable.contains.builders.IterableContainsCheckerBuilder -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InAnyOrderSearchBehaviour - -/** - * Represents the *deprecated* builder of a `contains at least once but at most` check within the fluent API of a - * sophisticated `contains` assertion for [Iterable]. - * - * @param T The input type of the search. - * - * @constructor Represents the builder of a `contains at least once but at most` check within the fluent API of a - * sophisticated `contains` assertion for [Iterable]. - * @param times The number which the check will compare against the actual number of times an expected entry is - * found in the [Iterable]. - * @param containsBuilder The previously used [IterableContains.Builder]. - */ -@Deprecated( - "Use the builder from the package creating; will be removed with 1.0.0", - ReplaceWith( - "AtMostCheckerOption", - "ch.tutteli.atrium.api.cc.de_CH.creating.iterable.contains.builders.AtMostCheckerOption" - ) -) -open class IterableContainsAtMostCheckerBuilder>( - times: Int, - containsBuilder: IterableContains.Builder -) : ch.tutteli.atrium.api.cc.de_CH.creating.iterable.contains.builders.impl.AtMostCheckerOptionImpl( - times, containsBuilder -), IterableContainsCheckerBuilder diff --git a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/assertions/iterable/contains/builders/IterableContainsButAtMostCheckerBuilder.kt b/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/assertions/iterable/contains/builders/IterableContainsButAtMostCheckerBuilder.kt deleted file mode 100644 index c4b1fd638..000000000 --- a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/assertions/iterable/contains/builders/IterableContainsButAtMostCheckerBuilder.kt +++ /dev/null @@ -1,33 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0 */) -package ch.tutteli.atrium.api.cc.de_CH.assertions.iterable.contains.builders - -import ch.tutteli.atrium.assertions.iterable.contains.builders.IterableContainsCheckerBuilder -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InAnyOrderSearchBehaviour - -/** - * Represents the *deprecated* builder of the second step of a `contains at least but at most` check within the - * fluent API of a sophisticated `contains` assertion for [Iterable]. - * - * @param T The input type of the search. - * - * @constructor Represents the builder of the second step of a `contains at least but at most` check within the - * fluent API of a sophisticated `contains` assertion for [Iterable]. - * @param times The number which the check will compare against the actual number of times an expected entry is - * found in the [Iterable]. - * @param containsBuilder The previously used [IterableContains.Builder]. - */ -@Deprecated( - "Use the builder from the package creating; will be removed with 1.0.0", - ReplaceWith( - "ButAtMostCheckerOption", - "ch.tutteli.atrium.api.cc.de_CH.creating.iterable.contains.builders.ButAtMostCheckerOption" - ) -) -open class IterableContainsButAtMostCheckerBuilder>( - times: Int, - atLeastBuilder: IterableContainsAtLeastCheckerBuilder, - containsBuilder: IterableContains.Builder -) : ch.tutteli.atrium.api.cc.de_CH.creating.iterable.contains.builders.impl.ButAtMostCheckerOptionImpl( - times, atLeastBuilder, containsBuilder -), IterableContainsCheckerBuilder diff --git a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/assertions/iterable/contains/builders/IterableContainsExactlyCheckerBuilder.kt b/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/assertions/iterable/contains/builders/IterableContainsExactlyCheckerBuilder.kt deleted file mode 100644 index 3d851d695..000000000 --- a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/assertions/iterable/contains/builders/IterableContainsExactlyCheckerBuilder.kt +++ /dev/null @@ -1,32 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0 */) -package ch.tutteli.atrium.api.cc.de_CH.assertions.iterable.contains.builders - -import ch.tutteli.atrium.assertions.iterable.contains.builders.IterableContainsCheckerBuilder -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InAnyOrderSearchBehaviour - -/** - * Represents the *deprecated* builder of a `contains exactly` check within the fluent API of a sophisticated - * `contains` assertion for [Iterable]. - * - * @param T The input type of the search. - * - * @constructor Represents the builder of a `contains exactly` check within the fluent API of a sophisticated - * `contains` assertion for [Iterable]. - * @param times The number which the check will compare against the actual number of times an expected entry is - * found in the [Iterable]. - * @param containsBuilder The previously used [IterableContains.Builder]. - */ -@Deprecated( - "Use the builder from the package creating; will be removed with 1.0.0", - ReplaceWith( - "ExactlyCheckerOption", - "ch.tutteli.atrium.api.cc.de_CH.creating.iterable.contains.builders.ExactlyCheckerOption" - ) -) -open class IterableContainsExactlyCheckerBuilder>( - times: Int, - containsBuilder: IterableContains.Builder -) : ch.tutteli.atrium.api.cc.de_CH.creating.iterable.contains.builders.impl.ExactlyCheckerOptionImpl( - times, containsBuilder -), IterableContainsCheckerBuilder diff --git a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/assertions/iterable/contains/builders/IterableContainsNotCheckerBuilder.kt b/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/assertions/iterable/contains/builders/IterableContainsNotCheckerBuilder.kt deleted file mode 100644 index 515ce9528..000000000 --- a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/assertions/iterable/contains/builders/IterableContainsNotCheckerBuilder.kt +++ /dev/null @@ -1,31 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0 */) -package ch.tutteli.atrium.api.cc.de_CH.assertions.iterable.contains.builders - -import ch.tutteli.atrium.assertions.iterable.contains.builders.IterableContainsCheckerBuilder -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InAnyOrderSearchBehaviour - -/** - * Represents the *deprecated* builder of a `contains not at all` check within the fluent API of a sophisticated - * `contains` assertion for [Iterable]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - * - * @constructor Represents the builder of a `contains not at all` check within the fluent API of a sophisticated - * `contains not` assertion for [Iterable]. - * @param containsBuilder The previously used [IterableContains.Builder]. - */ -@Deprecated( - "Use the builder from the package creating; will be removed with 1.0.0", - ReplaceWith( - "NotCheckerOption", - "ch.tutteli.atrium.api.cc.de_CH.creating.iterable.contains.builders.NotCheckerOption" - ) -) -open class IterableContainsNotCheckerBuilder>( - containsBuilder: IterableContains.Builder -) : ch.tutteli.atrium.api.cc.de_CH.creating.iterable.contains.builders.impl.NotCheckerOptionImpl( - containsBuilder -), IterableContainsCheckerBuilder - diff --git a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/assertions/iterable/contains/builders/IterableContainsNotOrAtMostCheckerBuilder.kt b/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/assertions/iterable/contains/builders/IterableContainsNotOrAtMostCheckerBuilder.kt deleted file mode 100644 index 5e7245ce4..000000000 --- a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/assertions/iterable/contains/builders/IterableContainsNotOrAtMostCheckerBuilder.kt +++ /dev/null @@ -1,32 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0 */) -package ch.tutteli.atrium.api.cc.de_CH.assertions.iterable.contains.builders - -import ch.tutteli.atrium.assertions.iterable.contains.builders.IterableContainsCheckerBuilder -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InAnyOrderSearchBehaviour - -/** - * Represents the *deprecated* builder of a `contains not or at most` check within the fluent API of a - * sophisticated `contains` assertion for [Iterable]. - * - * @param T The input type of the search. - * - * @constructor Represents the builder of a `contains at least once but at most` check within the fluent API of a - * sophisticated `contains` assertion for [Iterable]. - * @param times The number which the check will compare against the actual number of times an expected entry is - * found in the [Iterable]. - * @param containsBuilder The previously used [IterableContains.Builder]. - */ -@Deprecated( - "Use the builder from the package creating; will be removed with 1.0.0", - ReplaceWith( - "NotOrAtMostCheckerOption", - "ch.tutteli.atrium.api.cc.de_CH.creating.iterable.contains.builders.NotOrAtMostCheckerOption" - ) -) -open class IterableContainsNotOrAtMostCheckerBuilder>( - times: Int, - containsBuilder: IterableContains.Builder -) : ch.tutteli.atrium.api.cc.de_CH.creating.iterable.contains.builders.impl.NotOrAtMostCheckerOptionImpl( - times, containsBuilder -), IterableContainsCheckerBuilder diff --git a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/bigDecimalAssertions.kt b/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/bigDecimalAssertions.kt deleted file mode 100644 index 528127c84..000000000 --- a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/bigDecimalAssertions.kt +++ /dev/null @@ -1,110 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") - -package ch.tutteli.atrium.api.cc.de_CH - -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.AssertionPlantNullable -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.domain.builders.AssertImpl -import ch.tutteli.atrium.domain.builders.bigDecimal -import ch.tutteli.atrium.domain.builders.creating.PleaseUseReplacementException -import java.math.BigDecimal - -@Deprecated("Verwende `istNumerischGleichWie` wenn du erwartest, dass die folgende Behauptung stimmt:\n" + - "`esGilt(BigDecimal(\"10\").ist(BigDecimal(\"10.0\"))`\n" + - "Erwartest du hingegen, dass die Behauptung falsch ist (da `BigDecimal.scale` anders ist), dann verwende `istGleichInklusiveScale`.", - ReplaceWith("istNumerischGleichWie(expected) oder istGleichInklusiveScale(expected)")) -@Suppress("UNUSED_PARAMETER", "unused") -fun Assert.ist(expected: T): Nothing - = throw PleaseUseReplacementException("BigDecimal.equals() vergleicht auch BigDecimal.scale, was dir womöglich nicht bewusst war.\n" + - "Falls doch und du möchtest dass `scale` verglichen wird, dann verwende `istGleichInklusiveScale`.") - -@Deprecated("Verwende `istNichtNumerischGleichWie` wenn du erwartest, dass die folgende Behauptung falsch ist:\n" + - "`esGilt(BigDecimal(\"10\").istNicht(BigDecimal(\"10.0\"))`\n" + - "Erwartest du hingegen, dass die Behauptung stimmt (da `BigDecimal.scale` anders ist), dann verwende `istNichtGleichInklusiveScale`.", - ReplaceWith("istNichtNumerischGleichWie(expected) or istNichtGleichInklusiveScale(expected)")) -@Suppress("UNUSED_PARAMETER", "unused") -fun Assert.istNicht(expected: T): Nothing - = throw PleaseUseReplacementException("BigDecimal.equals() vergleicht auch BigDecimal.scale, was dir womöglich nicht bewusst war.\n" + - "Falls doch und du möchtest dass `scale` verglichen wird, dann verwende `istNichtGleichInklusiveScale`.") - -@Deprecated("Verwende `istNichtNullAber { istNumerischGleichWie(...) }` wenn du erwartest, dass die folgende Behauptung stimmt:\n" + - "`esGilt(BigDecimal(\"10\").ist(BigDecimal(\"10.0\"))`\n" + - "Erwartest du hingegen, dass die Behauptung falsch ist (da `BigDecimal.scale` anders ist), dann verwende `istNichtNullAber { istGleichInklusiveScale(...) }`.", - ReplaceWith("istNichtNullAber { istNumerischGleichWie(expected) } oder istNichtNullAber { istGleichInklusiveScale(expected) }")) -@Suppress("UNUSED_PARAMETER", "unused") -infix fun AssertionPlantNullable.istNichtNullAber(expected: T): Nothing - = throw PleaseUseReplacementException("BigDecimal.equals() vergleicht auch BigDecimal.scale, was dir womöglich nicht bewusst war.\n" + - "Falls doch und du möchtest dass `scale` verglichen wird, dann verwende `istGleichInklusiveScale`.") - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] is numerically equal to [expected]. - * - * By numerically is meant that it will not compare [BigDecimal.scale] (or in other words, - * it uses `compareTo(expected) == 0`) - * - * Most of the time you want to use this function instead of [istGleichInklusiveScale] because - * [istGleichInklusiveScale] compares [BigDecimal.scale]. - * Following the two functions compared: - * - `esGilt(BigDecimal("10")).istGleichInklusiveScale(BigDecimal("10.0"))` does not hold - * - `esGilt(BigDecimal("10")).istNumerischGleichWie(BigDecimal("10.0"))` holds. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -fun Assert.istNumerischGleichWie(expected: T) - = addAssertion(AssertImpl.bigDecimal.isNumericallyEqualTo(this, expected)) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] is not numerically equal to [expected]. - * - * By numerically is meant that it will not compare [BigDecimal.scale] (or in other words, - * it uses `compareTo(expected) != 0`) - * - * Most of the time you want to use this function instead of [istNichtGleichInklusiveScale] because - * [istNichtGleichInklusiveScale] compares [BigDecimal.scale]. - * Following the two functions compared: - * - `esGilt(BigDecimal("10")).istNichtGleichInklusiveScale(BigDecimal("10.0"))` holds - * - `esGilt(BigDecimal("10")).istNichtNumerischGleichWie(BigDecimal("10.0"))` does not hold. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -fun Assert.istNichtNumerischGleichWie(expected: T) - = addAssertion(AssertImpl.bigDecimal.isNotNumericallyEqualTo(this, expected)) - - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] is equal to [expected] including [BigDecimal.scale]. - * - * Most of the time you want to use [istNumerischGleichWie] which does not compare [BigDecimal.scale] - * in contrast to this function. - * Following the two functions compared: - * - `esGilt(BigDecimal("10")).istGleichInklusiveScale(BigDecimal("10.0"))` does not hold - * - `esGilt(BigDecimal("10")).istNumerischGleichWie(BigDecimal("10.0"))` holds. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -fun Assert.istGleichInklusiveScale(expected: T) - = addAssertion(AssertImpl.bigDecimal.isEqualIncludingScale(this, expected, this::istNumerischGleichWie.name)) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] is not equal to [expected] including [BigDecimal.scale]. - * - * Most of the time you want to use [istNichtNumerischGleichWie] which does not compare [BigDecimal.scale] - * in contrast to this function. - * Following the two functions compared: - * - `assert(BigDecimal("10")).istNichtGleichInklusiveScale(BigDecimal("10.0"))` holds. - * - `assert(BigDecimal("10")).istNichtNumerischGleichWie(BigDecimal("10.0"))` does not hold. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -fun Assert.istNichtGleichInklusiveScale(expected: T) - = addAssertion(AssertImpl.bigDecimal.isNotEqualIncludingScale(this, expected)) diff --git a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/booleanDeprecatedAssertions.kt b/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/booleanDeprecatedAssertions.kt deleted file mode 100644 index 20ed50895..000000000 --- a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/booleanDeprecatedAssertions.kt +++ /dev/null @@ -1,30 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") - -@file:JvmName("BooleanAssertionsKt") -package ch.tutteli.atrium.api.cc.de_CH - -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.SubjectProvider - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] is `true`. - * - * Delegates to [ist] with argument `true`. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Will be removed with 1.0.0 because it is redundant in terms of `ist(true)` without adding enough to be a legit alternative.", ReplaceWith("ist(true)")) -fun Assert.istTrue() = ist(true) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] is `false`. - * - * Delegates to [ist] with argument `false`. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Will be removed with 1.0.0 because it is redundant with `ist(false)` without adding enough to be a legit alternative.", ReplaceWith("ist(false)")) -fun Assert.istFalse() = ist(false) diff --git a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/charSequenceDeprecatedAssertions.kt b/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/charSequenceDeprecatedAssertions.kt deleted file mode 100644 index 08c192733..000000000 --- a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/charSequenceDeprecatedAssertions.kt +++ /dev/null @@ -1,67 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") - -@file:JvmMultifileClass -@file:JvmName("CharSequenceAssertionsKt") -package ch.tutteli.atrium.api.cc.de_CH - -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.domain.builders.AssertImpl -import ch.tutteli.atrium.domain.creating.charsequence.contains.searchbehaviours.NoOpSearchBehaviour -import ch.tutteli.atrium.domain.creating.charsequence.contains.searchbehaviours.NotSearchBehaviour -import ch.tutteli.atrium.reporting.translating.Translatable -import ch.tutteli.atrium.api.cc.de_CH.assertions.charsequence.contains.builders.CharSequenceContainsNotCheckerBuilder as DeprecatedNotCheckerBuilder -import ch.tutteli.atrium.assertions.charsequence.contains.builders.CharSequenceContainsBuilder as DeprecatedBuilder - -@Deprecated("Use the extension fun `enthaelt` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", ReplaceWith("plant.enthaelt")) -fun getEnthaelt(plant: Assert): DeprecatedBuilder - = DeprecatedBuilder(plant, plant.enthaelt.searchBehaviour) - -@Deprecated("Use the extension fun `enthaeltNicht` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", ReplaceWith("plant.enthaeltNicht")) -fun getEnthaeltNicht(plant: Assert): DeprecatedNotCheckerBuilder - = DeprecatedNotCheckerBuilder(AssertImpl.charSequence.containsNotBuilder(plant)) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] contains [expected]'s [getDefault][Translatable.getDefault] - * representation and the [getDefault][Translatable.getDefault] representations of the [otherExpected] (if given), - * using a non disjoint search. - * - * It is a shortcut for `enthaelt.zumindest(1).standardUebersetzungVon(expected, *otherExpected)`. - * - * By non disjoint is meant that `'aa'` in `'aaaa'` is found three times and not only two times. - * Also notice, that it does not search for unique matches. Meaning, if the input of the search is `'a'` and the - * default translation of [expected] is defined as `'a'` and one default translation of the - * [otherExpected] is defined as `'a'` as well, then both match, even though they match the - * same sequence in the input of the search. Use an option such as [zumindest], [hoechstens] and [genau] to control - * the number of occurrences you expect. - * - * Meaning you might want to use: - * `enthaelt.genau(2).standardUebersetzungVon(IS)` - * instead of: - * `enthaeltStandardUebersetzungVon(IS, IS)` - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Most probably only used by Atrium itself; will be made internal with 1.0.0", ReplaceWith("please open an issue on GitHub if you use it as well")) -fun Assert.enthaeltStandardUebersetzungVon( - expected: Translatable, - vararg otherExpected: Translatable -) = enthaelt.zumindest(1).standardUebersetzungVon(expected, *otherExpected) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] does not contain [expected]'s - * [getDefault][Translatable.getDefault] representation and neither one of the [otherExpected]'s - * [getDefault][Translatable.getDefault] representation (if given). - * - * It is a shortcut for `enthaeltNicht.standardUebersetzungVon(expected, *otherExpected)`. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Most probably only used by Atrium itself; will be made internal with 1.0.0", ReplaceWith("please open an issue on GitHub if you use it as well")) -fun Assert.enthaeltNichtDieStandardUebersetzungVon( - expected: Translatable, - vararg otherExpected: Translatable -) = enthaeltNicht.standardUebersetzungVon(expected, *otherExpected) diff --git a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/charSequenceDeprecatedContainsCheckers.kt b/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/charSequenceDeprecatedContainsCheckers.kt deleted file mode 100644 index 4ac523a5a..000000000 --- a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/charSequenceDeprecatedContainsCheckers.kt +++ /dev/null @@ -1,36 +0,0 @@ -@file:Suppress("DEPRECATION" /* will be removed with 1.0.0 */) -@file:JvmMultifileClass -@file:JvmName("CharSequenceContainsCheckersKt") -package ch.tutteli.atrium.api.cc.de_CH - -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains.SearchBehaviour -import ch.tutteli.atrium.api.cc.de_CH.assertions.charsequence.contains.builders.CharSequenceContainsAtLeastCheckerBuilder as DeprecatedAtLeastCheckerBuilder -import ch.tutteli.atrium.api.cc.de_CH.assertions.charsequence.contains.builders.CharSequenceContainsAtMostCheckerBuilder as DeprecatedAtMostCheckerBuilder -import ch.tutteli.atrium.api.cc.de_CH.assertions.charsequence.contains.builders.CharSequenceContainsButAtMostCheckerBuilder as DeprecatedButAtMostCheckerBuilder -import ch.tutteli.atrium.api.cc.de_CH.assertions.charsequence.contains.builders.CharSequenceContainsExactlyCheckerBuilder as DeprecatedExactlyCheckerBuilder -import ch.tutteli.atrium.api.cc.de_CH.assertions.charsequence.contains.builders.CharSequenceContainsNotCheckerBuilder as DeprecatedNotCheckerBuilder -import ch.tutteli.atrium.api.cc.de_CH.assertions.charsequence.contains.builders.CharSequenceContainsNotOrAtMostCheckerBuilder as DeprecatedNotOrAtMostCheckerBuilder -import ch.tutteli.atrium.assertions.charsequence.contains.CharSequenceContains.SearchBehaviour as DeprecatedSearchBehaviour -import ch.tutteli.atrium.assertions.charsequence.contains.builders.CharSequenceContainsBuilder as DeprecatedBuilder -import ch.tutteli.atrium.assertions.charsequence.contains.searchbehaviours.CharSequenceContainsNoOpSearchBehaviour as DeprecatedNoOpSearchBehaviour -import ch.tutteli.atrium.assertions.charsequence.contains.searchbehaviours.CharSequenceContainsNotSearchBehaviour as DeprecatedNotSearchBehaviour - -@Deprecated("Use the extension fun `zumindest`. This fun is only here to retain binary compatibility; will be removed with 1.0.0", ReplaceWith("builder.zumindest(times)")) -fun zumindest(builder: DeprecatedBuilder, times: Int): DeprecatedAtLeastCheckerBuilder - = DeprecatedAtLeastCheckerBuilder(times, builder) - -@Deprecated("Use the extension fun `aberHoechstens`. This fun is only here to retain binary compatibility; will be removed with 1.0.0", ReplaceWith("checkerBuilder.aberHoechstens(times)")) -fun aberHoechstens(checkerBuilder: DeprecatedAtLeastCheckerBuilder, times: Int): DeprecatedButAtMostCheckerBuilder - = DeprecatedButAtMostCheckerBuilder(times, checkerBuilder, checkerBuilder.containsBuilder) - -@Deprecated("Use the extension fun `genau`. This fun is only here to retain binary compatibility; will be removed with 1.0.0", ReplaceWith("builder.genau(times)")) -fun genau(builder: DeprecatedBuilder, times: Int): DeprecatedExactlyCheckerBuilder - = DeprecatedExactlyCheckerBuilder(times, builder) - -@Deprecated("Use the extension fun `hoechstens`. This fun is only here to retain binary compatibility; will be removed with 1.0.0", ReplaceWith("builder.hoechstens(times)")) -fun hoechstens(builder: DeprecatedBuilder, times: Int): DeprecatedAtMostCheckerBuilder - = DeprecatedAtMostCheckerBuilder(times, builder) - -@Deprecated("Use the extension fun `nichtOderHoechstens`. This fun is only here to retain binary compatibility; will be removed with 1.0.0", ReplaceWith("builder.nichtOderHoechstens(times)")) -fun nichtOderHoechstens(builder: DeprecatedBuilder, times: Int): DeprecatedNotOrAtMostCheckerBuilder - = DeprecatedNotOrAtMostCheckerBuilder(times, builder) diff --git a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/charSequenceDeprecatedContainsCreators.kt b/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/charSequenceDeprecatedContainsCreators.kt deleted file mode 100644 index 143e56112..000000000 --- a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/charSequenceDeprecatedContainsCreators.kt +++ /dev/null @@ -1,72 +0,0 @@ -@file:Suppress("DEPRECATION" /* will be removed with 1.0.0 */) -@file:JvmMultifileClass -@file:JvmName("CharSequenceContainsCreatorsKt") -package ch.tutteli.atrium.api.cc.de_CH - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.domain.builders.AssertImpl -import ch.tutteli.atrium.domain.builders.creating.basic.contains.addAssertionForAssert -import ch.tutteli.kbox.glue -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains -import ch.tutteli.atrium.domain.creating.charsequence.contains.searchbehaviours.IgnoringCaseSearchBehaviour -import ch.tutteli.atrium.domain.creating.charsequence.contains.searchbehaviours.NoOpSearchBehaviour -import ch.tutteli.atrium.reporting.translating.Translatable - -/** - * Finishes the specification of the sophisticated `contains` assertion where the [expected]'s - * [getDefault][Translatable.getDefault] representation as well as the [getDefault][Translatable.getDefault] - * representations of the [otherExpected] (if given) shall be searched, using a non disjoint search. - * - * By non disjoint is meant that `'aa'` in `'aaaa'` is found three times and not only two times. - * Also notice, that it does not search for unique matches. Meaning, if the input of the search is `'a'` and the - * default translation of [expected] is defined as `'a'` and one default translation of the - * [otherExpected] is defined as `'a'` as well, then both match, even though they match the - * same sequence in the input of the search. Use an option such as [zumindest], [hoechstens] and [genau] to control - * the number of occurrences you expect. - * - * Meaning you might want to use: - * `enthaelt.genau(2).standardUebersetzungVon(IS)` - * instead of: - * `enthaelt.zumindest(1).standardUebersetzungVon(IS, IS)` - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Most probably only used by Atrium itself; will be made internal with 1.0.0", ReplaceWith("please open an issue on GitHub if you use it as well")) -fun CharSequenceContains.CheckerOption.standardUebersetzungVon(expected: Translatable, vararg otherExpected: Translatable): AssertionPlant - = addAssertion(AssertImpl.charSequence.contains.defaultTranslationOf(this, expected glue otherExpected)) - -/** - * Finishes the specification of the sophisticated `contains` assertion where the [expected]'s - * [getDefault][Translatable.getDefault] representation as well as the [getDefault][Translatable.getDefault] - * representations of the [otherExpected] (if given) shall be searched (ignoring case), using a non disjoint search. - * - * By non disjoint is meant that `'aa'` in `'aaaa'` is found three times and not only two times. - * Also notice, that it does not search for unique matches. Meaning, if the input of the search is `'a'` and the - * default translation of [expected] is defined as `'a'` and one default translation of the - * [otherExpected] is defined as `'a'` as well, then both match, even though they match the - * same sequence in the input of the search. Use an option such as [zumindest], [hoechstens] and [genau] to control - * the number of occurrences you expect. - * - * Meaning you might want to use: - * `enthaelt.genau(2).standardUebersetzungVon(IS)` - * instead of: - * `enthaelt.zumindest(1).standardUebersetzungVon(IS, IS)` - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Most probably only used by Atrium itself; will be made internal with 1.0.0", ReplaceWith("please open an issue on GitHub if you use it as well")) -@JvmName("standardUebersetzungVonGrossKleinschreibungIgnorierend") -fun CharSequenceContains.CheckerOption.standardUebersetzungVon(expected: Translatable, vararg otherExpected: Translatable): AssertionPlant - = addAssertion(AssertImpl.charSequence.contains.defaultTranslationOfIgnoringCase(this, expected glue otherExpected)) - -/** - * Helper method to simplify adding assertions to the plant which itself is stored in - * [CharSequenceContains.CheckerOption.containsBuilder]. - * - * @return The plant to support a fluent API. - */ -private fun CharSequenceContains.CheckerOption.addAssertion(assertion: Assertion): AssertionPlant - = addAssertionForAssert(assertion) diff --git a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/charSequenceDeprecatedContainsDecorators.kt b/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/charSequenceDeprecatedContainsDecorators.kt deleted file mode 100644 index 93110d711..000000000 --- a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/charSequenceDeprecatedContainsDecorators.kt +++ /dev/null @@ -1,20 +0,0 @@ -@file:Suppress("DEPRECATION" /* will be removed with 1.0.0 */) -@file:JvmMultifileClass -@file:JvmName("CharSequenceContainsDecoratorsKt") -package ch.tutteli.atrium.api.cc.de_CH - -import ch.tutteli.atrium.domain.creating.charsequence.contains.searchbehaviours.IgnoringCaseSearchBehaviour -import ch.tutteli.atrium.domain.creating.charsequence.contains.searchbehaviours.NoOpSearchBehaviour -import ch.tutteli.atrium.domain.creating.charsequence.contains.searchbehaviours.NotSearchBehaviour -import ch.tutteli.atrium.api.cc.de_CH.assertions.charsequence.contains.builders.CharSequenceContainsNotCheckerBuilder as DeprecatedNotCheckerBuilder -import ch.tutteli.atrium.assertions.charsequence.contains.builders.CharSequenceContainsBuilder as DeprecatedBuilder - -@Deprecated("Use the extension fun `ignoriereGrossKleinschreibung` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", ReplaceWith("builder.ignoriereGrossKleinschreibung")) -fun getIgnoriereGrossKleinschreibung(builder: DeprecatedBuilder) - : DeprecatedBuilder - = DeprecatedBuilder(builder.subjectProvider, builder.ignoriereGrossKleinschreibung.searchBehaviour) - -@Deprecated("Use the extension fun `ignoriereGrossKleinschreibung` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", ReplaceWith("builder.ignoriereGrossKleinschreibung")) -fun getIgnoriereGrossKleinschreibung(builder: DeprecatedNotCheckerBuilder) - : DeprecatedNotCheckerBuilder - = DeprecatedNotCheckerBuilder(builder.containsBuilder.ignoriereGrossKleinschreibung) diff --git a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/deprecatedParameterObjects.kt b/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/deprecatedParameterObjects.kt deleted file mode 100644 index 48b3a072c..000000000 --- a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/deprecatedParameterObjects.kt +++ /dev/null @@ -1,43 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") - -@file:JvmMultifileClass -@file:JvmName("ParameterObjectsKt") - -package ch.tutteli.atrium.api.cc.de_CH - -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.domain.builders.utils.GroupWithNullableEntries -import ch.tutteli.kbox.glue - -@Deprecated("Use Wert instead, it was opened up to Any? in 0.8.0; will be removed with 1.0.0", ReplaceWith("Wert(expected)")) -data class NullableWert(val expected: T) : GroupWithNullableEntries { - override fun toList() = listOf(expected) -} - -@Deprecated("Use Werte instead, it was opened up to Any? in 0.8.0; will be removed with 1.0.0", ReplaceWith("Werte(expected, *otherExpected)")) -class NullableWerte(private val expected: T, vararg val otherExpected: T) : GroupWithNullableEntries{ - override fun toList() = listOf(expected, *otherExpected) -} - -@Deprecated("Use Eintrag instead, it was opened up to `(Assert.() -> Unit)?` in 0.8.0; will be removed with 1.0.0", ReplaceWith("Eintrag(assertionCreator)")) -class NullableEintrag( - val assertionCreator: (Assert.() -> Unit)? -) : GroupWithNullableEntries<(Assert.() -> Unit)?> { - override fun toList(): List<(Assert.() -> Unit)?> = listOf(assertionCreator) -} - -@Deprecated("Use Eintraege instead, it was opened up to Any? in 0.8.0; will be removed with 1.0.0", ReplaceWith("Eintraege(assertionCreatorOrNull, *otherAssertionCreatorsOrNulls)")) -class NullableEintraege( - val assertionCreatorOrNull: (Assert.() -> Unit)?, - vararg val otherAssertionCreatorsOrNulls: (Assert.() -> Unit)? -) : GroupWithNullableEntries<(Assert.() -> Unit)?> { - override fun toList(): List<(Assert.() -> Unit)?> = assertionCreatorOrNull glue otherAssertionCreatorsOrNulls -} - -@Deprecated("Use KeyValue instead, it was opened up to `(Assert.() -> Unit)?` in 0.8.0; will be removed with 1.0.0", ReplaceWith("KeyValue(key, *valueAssertionCreatorOrNull)")) -data class KeyNullableValue(val key: K, val valueAssertionCreatorOrNull: (Assert.() -> Unit)?) { - fun toPair(): Pair.() -> Unit)?> = key to valueAssertionCreatorOrNull - override fun toString(): String - = "KeyNullableValue(key=$key, value=${if (valueAssertionCreatorOrNull == null) "null" else "lambda"})" -} diff --git a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/floatingPointJvmAssertions.kt b/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/floatingPointJvmAssertions.kt deleted file mode 100644 index a47a7cf79..000000000 --- a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/floatingPointJvmAssertions.kt +++ /dev/null @@ -1,29 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") - -@file:JvmMultifileClass -@file:JvmName("FloatingPointAssertionsKt") - -package ch.tutteli.atrium.api.cc.de_CH - -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.domain.builders.AssertImpl -import java.math.BigDecimal - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] is equal to [expected] with an error [tolerance] - * (range including bounds). - * - * It effectively compares the absolute difference between [Assert.subject][SubjectProvider.subject] and [expected] and compares it with - * the [tolerance]. As long as it is less than or equal the [tolerance] the assertion holds; otherwise it fails. - * A more mathematical way of expressing the assertion is the following inequality: - * - * | [Assert.subject][SubjectProvider.subject] - [expected] | ≤ [tolerance] - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0") -fun Assert.istMitFehlerToleranz(expected: T, tolerance: T) - = addAssertion(AssertImpl.floatingPoint.toBeWithErrorTolerance(this, expected, tolerance)) diff --git a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/iterableDeprecatedAssertions.kt b/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/iterableDeprecatedAssertions.kt deleted file mode 100644 index 198e56fda..000000000 --- a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/iterableDeprecatedAssertions.kt +++ /dev/null @@ -1,122 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") - -@file:JvmMultifileClass -@file:JvmName("IterableAssertionsKt") -package ch.tutteli.atrium.api.cc.de_CH - -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.domain.builders.AssertImpl -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.NoOpSearchBehaviour -import ch.tutteli.atrium.api.cc.de_CH.assertions.iterable.contains.builders.IterableContainsNotCheckerBuilder as DeprecatedNotCheckerBuilder -import ch.tutteli.atrium.assertions.iterable.contains.builders.IterableContainsBuilder as DeprecatedBuilder - -@Deprecated("Use the extension fun `enthaelt` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", ReplaceWith("plant.enthaelt")) -fun > getEnthaelt(plant: Assert): DeprecatedBuilder - = DeprecatedBuilder(plant, plant.enthaelt.searchBehaviour) - -@Deprecated("Use the extension fun `enthaeltNicht` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", ReplaceWith("plant.enthaeltNicht")) -fun > getEnthaeltNicht(plant: Assert): DeprecatedNotCheckerBuilder - = DeprecatedNotCheckerBuilder(AssertImpl.iterable.containsNotBuilder(plant)) - -@Deprecated("Use `enthaelt` instead; will be removed with 1.0.0", ReplaceWith("enthaelt(expectedOrNull)")) -fun > Assert.enthaeltNullableWert(expectedOrNull: E): AssertionPlant - = enthaelt(expectedOrNull) - -@Deprecated("Use `enthaelt` instead; will be removed with 1.0.0", ReplaceWith("enthaelt(expectedOrNull, *otherExpectedOrNulls)")) -fun > Assert.enthaeltNullableWerte(expectedOrNull: E, vararg otherExpectedOrNulls: E): AssertionPlant - = enthaelt(expectedOrNull, *otherExpectedOrNulls) - -@Deprecated("Use `enthaelt` instead; will be removed with 1.0.0", ReplaceWith("enthaelt(assertionCreatorOrNull)")) -fun > Assert.enthaeltNullableEintrag(assertionCreatorOrNull: (Assert.() -> Unit)?): AssertionPlant - = enthaelt(assertionCreatorOrNull) - -@Deprecated("Use `enthaelt` instead; will be removed with 1.0.0", ReplaceWith("enthaelt(assertionCreatorOrNull, *otherAssertionCreatorsOrNulls)")) -fun > Assert.enthaeltNullableEintraege(assertionCreatorOrNull: (Assert.() -> Unit)?, vararg otherAssertionCreatorsOrNulls: (Assert.() -> Unit)?): AssertionPlant - = enthaelt(assertionCreatorOrNull, *otherAssertionCreatorsOrNulls) - - -@Deprecated("Use extension function `enthaelt` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", ReplaceWith("plant.enthaelt(expected, *otherExpected)")) -@JvmName("enthaeltNonNullable") -fun > enthaelt(plant: Assert, expected: E, vararg otherExpected: E): AssertionPlant - = plant.enthaelt(expected, *otherExpected) - -@Deprecated("Use extension function `enthaelt` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", ReplaceWith("plant.enthaelt(assertionCreatorOrNull)")) -@JvmName("enthaeltNullable") -fun > enthaelt(plant: Assert, assertionCreatorOrNull: (Assert.() -> Unit)?): AssertionPlant - = plant.enthaelt(assertionCreatorOrNull) - -@Deprecated("Use extension function `enthaelt` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", ReplaceWith("plant.enthaelt(assertionCreatorOrNull, *otherAssertionCreatorsOrNulls)")) -@JvmName("enthaeltNullable") -fun > enthaelt(plant: Assert, assertionCreatorOrNull: (Assert.() -> Unit)?, vararg otherAssertionCreatorsOrNulls: (Assert.() -> Unit)?): AssertionPlant - = plant.enthaelt(assertionCreatorOrNull, *otherAssertionCreatorsOrNulls) - -@Deprecated("Use extension function `enthaeltNicht` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", ReplaceWith("plant.enthaeltNicht(expected, *otherExpected)")) -fun > enthaeltNichtNonNullable(plant: Assert, expected: E, vararg otherExpected: E) - = plant.enthaeltNicht(expected, *otherExpected) - - -@JvmName("enthaeltStriktDeprecated") -@Deprecated("Use `enthaeltExakt` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", ReplaceWith("enthaeltStriktNullableEintraege(assertionCreator, *otherAssertionCreators)")) -fun > Assert.enthaeltStrikt(assertionCreator: (Assert.() -> Unit)?, vararg otherAssertionCreators: (Assert.() -> Unit)?): AssertionPlant - = enthaeltExakt(assertionCreator, *otherAssertionCreators) - -@Deprecated("Use the extension fun `enthaeltStriktNullableEintraege` instead; will be removed with 1.0.0", ReplaceWith("plant.enthaeltStriktNullableEintraege(assertionCreator, *otherAssertionCreators)")) -fun > enthaeltStriktNullable(plant: Assert, assertionCreator: (Assert.() -> Unit)?, vararg otherAssertionCreators: (Assert.() -> Unit)?): AssertionPlant - = plant.enthaeltStriktNullableEintraege(assertionCreator, *otherAssertionCreators) - -@Deprecated( - "Replaced with enthaeltExakt for clearer naming; will be removed with 1.0.0", - ReplaceWith("enthaeltExakt(expected,*otherExpected)", "ch.tutteli.atrium.api.cc.de_CH.enthaeltExakt") -) -fun > Assert.enthaeltStrikt(expected: E, vararg otherExpected: E): AssertionPlant - = enthaeltExakt(expected, *otherExpected) - -@Deprecated( - "Replaced with enthaeltExakt for clearer naming; will be removed with 1.0.0", - ReplaceWith("enthaeltExakt(expectedOrNull)", "ch.tutteli.atrium.api.cc.de_CH.enthaeltExakt") -) -fun > Assert.enthaeltStriktNullableWert(expectedOrNull: E): AssertionPlant - = enthaeltExakt(expectedOrNull) - -@Deprecated( - "Replaced with enthaeltExakt for clearer naming; will be removed with 1.0.0", - ReplaceWith("enthaeltExakt(expectedOrNull,*otherExpectedOrNulls)", "ch.tutteli.atrium.api.cc.de_CH.enthaeltExakt") -) -fun > Assert.enthaeltStriktNullableWerte(expectedOrNull: E, vararg otherExpectedOrNulls: E): AssertionPlant - = enthaeltExakt(expectedOrNull, *otherExpectedOrNulls) - -@Deprecated( - "Replaced with enthaeltExakt for clearer naming; will be removed with 1.0.0", - ReplaceWith("enthaeltExakt(assertionCreator,*otherAssertionCreators)", "ch.tutteli.atrium.api.cc.de_CH.enthaeltExakt") -) -fun > Assert.enthaeltStrikt(assertionCreator: Assert.() -> Unit, vararg otherAssertionCreators: Assert.() -> Unit): AssertionPlant - = enthaeltExakt(assertionCreator, *otherAssertionCreators) - -@Deprecated( - "Replaced with enthaeltExaktNullableEintrag for clearer naming; will be removed with 1.0.0", - ReplaceWith("enthaeltExaktNullableEintrag(assertionCreatorOrNull)", "ch.tutteli.atrium.api.cc.de_CH.enthaeltExaktNullableEintrag") -) -fun > Assert.enthaeltStriktNullableEintrag(assertionCreatorOrNull: (Assert.() -> Unit)?): AssertionPlant - = enthaeltExakt(assertionCreatorOrNull) - -@Deprecated( - "Replaced with enthaeltExakt for clearer naming; will be removed with 1.0.0", - ReplaceWith("enthaeltExakt(assertionCreatorOrNull,*otherAssertionCreatorsOrNulls)", "ch.tutteli.atrium.api.cc.de_CH.enthaeltExakt") -) -fun > Assert.enthaeltStriktNullableEintraege(assertionCreatorOrNull: (Assert.() -> Unit)?, vararg otherAssertionCreatorsOrNulls: (Assert.() -> Unit)?): AssertionPlant - = enthaeltExakt(assertionCreatorOrNull, *otherAssertionCreatorsOrNulls) - - -@Deprecated("Use `irgendEiner` instead; will be removed with 1.0.0", ReplaceWith("irgendEiner(assertionCreatorOrNull)")) -fun > Assert.irgendEinNullable(assertionCreatorOrNull: (Assert.() -> Unit)?): AssertionPlant - = irgendEiner(assertionCreatorOrNull) - -@Deprecated("Use `keiner` instead; will be removed with 1.0.0", ReplaceWith("keiner(assertionCreatorOrNull)")) -fun > Assert.keinerDerNullable(assertionCreatorOrNull: (Assert.() -> Unit)?) - = keiner(assertionCreatorOrNull) - -@Deprecated("Use `alle` instead; will be removed with 1.0.0", ReplaceWith("alle(assertionCreatorOrNull)")) -fun > Assert.alleDerNullable(assertionCreatorOrNull: (Assert.() -> Unit)?) - = alle(assertionCreatorOrNull) diff --git a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/iterableDeprecatedContainsCheckers.kt b/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/iterableDeprecatedContainsCheckers.kt deleted file mode 100644 index af15b61bf..000000000 --- a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/iterableDeprecatedContainsCheckers.kt +++ /dev/null @@ -1,33 +0,0 @@ -@file:Suppress("DEPRECATION" /* will be removed with 1.0.0 */) -@file:JvmMultifileClass -@file:JvmName("IterableContainsCheckersKt") -package ch.tutteli.atrium.api.cc.de_CH - -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InAnyOrderSearchBehaviour -import ch.tutteli.atrium.api.cc.de_CH.assertions.iterable.contains.builders.IterableContainsAtLeastCheckerBuilder as DeprecatedAtLeastCheckerBuilder -import ch.tutteli.atrium.api.cc.de_CH.assertions.iterable.contains.builders.IterableContainsAtMostCheckerBuilder as DeprecatedAtMostCheckerBuilder -import ch.tutteli.atrium.api.cc.de_CH.assertions.iterable.contains.builders.IterableContainsButAtMostCheckerBuilder as DeprecatedButAtMostCheckerBuilder -import ch.tutteli.atrium.api.cc.de_CH.assertions.iterable.contains.builders.IterableContainsExactlyCheckerBuilder as DeprecatedExactlyCheckerBuilder -import ch.tutteli.atrium.api.cc.de_CH.assertions.iterable.contains.builders.IterableContainsNotOrAtMostCheckerBuilder as DeprecatedNotOrAtMostCheckerBuilder -import ch.tutteli.atrium.assertions.iterable.contains.builders.IterableContainsBuilder as DeprecatedBuilder - -@Deprecated("Use the extension fun `zumindest` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", ReplaceWith("builder.zumindest(times)")) -fun > zumindest(builder: DeprecatedBuilder, times: Int): DeprecatedAtLeastCheckerBuilder - = DeprecatedAtLeastCheckerBuilder(times, builder) - -@Deprecated("Use the extension fun `aberHoechstens` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", ReplaceWith("checkerBuilder.aberHoechstens(times)")) -fun > aberHoechstens(checkerBuilder: DeprecatedAtLeastCheckerBuilder, times: Int): DeprecatedButAtMostCheckerBuilder - = DeprecatedButAtMostCheckerBuilder(times, checkerBuilder, checkerBuilder.containsBuilder) - -@Deprecated("Use the extension fun `genau` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", ReplaceWith("builder.genau(times)")) -fun > genau(builder: DeprecatedBuilder, times: Int): DeprecatedExactlyCheckerBuilder - = DeprecatedExactlyCheckerBuilder(times, builder) - - -@Deprecated("Use the extension fun `hoechstens` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", ReplaceWith("builder.hoechstens(times)")) -fun > hoechstens(builder: DeprecatedBuilder, times: Int): DeprecatedAtMostCheckerBuilder - = DeprecatedAtMostCheckerBuilder(times, builder) - -@Deprecated("Use the extension fun `nichtOderHoechstens` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", ReplaceWith("builder.nichtOderHoechstens(times)")) -fun > nichtOderHoechstens(builder: DeprecatedBuilder, times: Int): DeprecatedNotOrAtMostCheckerBuilder - = DeprecatedNotOrAtMostCheckerBuilder(times, builder) diff --git a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/iterableDeprecatedContainsDecorators.kt b/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/iterableDeprecatedContainsDecorators.kt deleted file mode 100644 index c92849b18..000000000 --- a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/iterableDeprecatedContainsDecorators.kt +++ /dev/null @@ -1,23 +0,0 @@ -@file:Suppress("DEPRECATION" /* will be removed with 1.0.0 */) -@file:JvmMultifileClass -@file:JvmName("IterableContainsDecoratorsKt") -package ch.tutteli.atrium.api.cc.de_CH - -import ch.tutteli.atrium.assertions.iterable.contains.builders.IterableContainsBuilder -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.* - -@Deprecated("Use the extension fun `inBeliebigerReihenfolge` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", ReplaceWith("builder.inBeliebigerReihenfolge")) -fun > getInBeliebigerReihenfolge(builder: IterableContainsBuilder): IterableContainsBuilder - = IterableContainsBuilder(builder.subjectProvider, builder.inBeliebigerReihenfolge.searchBehaviour) - -@Deprecated("Use the extension fun `nur` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", ReplaceWith("builder.nur")) -fun > inAnyOrderOnly(builder: IterableContainsBuilder): IterableContainsBuilder - = IterableContainsBuilder(builder.subjectProvider, builder.nur.searchBehaviour) - -@Deprecated("Use the extension fun `inGegebenerReihenfolge` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", ReplaceWith("builder.inGegebenerReihenfolge")) -fun > getInGegebenerReihenfolge(builder: IterableContainsBuilder): IterableContainsBuilder - = IterableContainsBuilder(builder.subjectProvider, builder.inGegebenerReihenfolge.searchBehaviour) - -@Deprecated("Use the extension fun `only` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", ReplaceWith("builder.nur")) -fun > inOrderOnly(builder: IterableContainsBuilder): IterableContainsBuilder - = IterableContainsBuilder(builder.subjectProvider, builder.nur.searchBehaviour) diff --git a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/iterableDeprecatedContainsInAnyOrderCreators.kt b/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/iterableDeprecatedContainsInAnyOrderCreators.kt deleted file mode 100644 index da3c86f7e..000000000 --- a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/iterableDeprecatedContainsInAnyOrderCreators.kt +++ /dev/null @@ -1,79 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") -@file:JvmMultifileClass -@file:JvmName("IterableContainsInAnyOrderCreatorsKt") -package ch.tutteli.atrium.api.cc.de_CH - -import ch.tutteli.atrium.assertions.iterable.contains.builders.IterableContainsCheckerBuilder -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InAnyOrderSearchBehaviour - -@Deprecated("Use the extension fun `wert` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", ReplaceWith("checkerBuilder.wert(expected)")) -fun > wert(checkerBuilder: IterableContainsCheckerBuilder, expected: E): AssertionPlant - = werte(checkerBuilder, expected) - -@Deprecated("Use the extension fun `werte` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", ReplaceWith("checkerBuilder.werte(expected, *otherExpected)")) -fun > werte(checkerBuilder: IterableContainsCheckerBuilder, expected: E, vararg otherExpected: E): AssertionPlant - = checkerBuilder.werte(expected, *otherExpected) - - -@Deprecated("Will be removed with 1.0.0 because it is redundant in terms of `wert(expected)` without adding enough to be a legit alternative.", ReplaceWith("wert(expected)")) -fun > IterableContains.CheckerOption.objekt(expected: E): AssertionPlant - = werte(expected) - -@Deprecated("Use the extension fun `wert` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", ReplaceWith("checkerBuilder.wert(expected)")) -fun > objekt(checkerBuilder: IterableContainsCheckerBuilder, expected: E): AssertionPlant - = werte(checkerBuilder, expected) - -@Deprecated("Will be removed with 1.0.0 because it is redundant in terms of `werte(expected, otherExpected)` without adding enough to be a legit alternative.", ReplaceWith("werte(expected, *otherExpected)")) -fun > IterableContains.CheckerOption.objekte(expected: E, vararg otherExpected: E): AssertionPlant - = werte(expected, *otherExpected) - -@Deprecated("Use the extension fun `werte` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", ReplaceWith("checkerBuilder.werte(expected, *otherExpected)")) -fun > objekte(checkerBuilder: IterableContainsCheckerBuilder, expected: E, vararg otherExpected: E): AssertionPlant - = checkerBuilder.werte(expected, *otherExpected) - -@Deprecated("Use the extension fun `eintrag` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", ReplaceWith("checkerBuilder.eintrag(assertionCreator)")) -fun > eintrag(checkerBuilder: IterableContainsCheckerBuilder, assertionCreator: Assert.() -> Unit): AssertionPlant - = eintraege(checkerBuilder, assertionCreator) - -@Deprecated("Use the extension fun `eintrag` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", ReplaceWith("checkerBuilder.eintrag(assertionCreator)")) -fun > nullableEintrag(checkerBuilder: IterableContainsCheckerBuilder, assertionCreator: (Assert.() -> Unit)?): AssertionPlant - = nullableEintraege(checkerBuilder, assertionCreator) - -@Deprecated("Use the extension fun `eintraege` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", ReplaceWith("checkerBuilder.eintraege(assertionCreator, *otherAssertionCreators)")) -fun > eintraege( - checkerBuilder: IterableContainsCheckerBuilder, - assertionCreator: Assert.() -> Unit, - vararg otherAssertionCreators: Assert.() -> Unit -): AssertionPlant - = checkerBuilder.eintraege(assertionCreator, *otherAssertionCreators) - -@Deprecated("Use the extension fun `eintraege` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", ReplaceWith("checkerBuilder.eintraege(assertionCreator, *otherAssertionCreators)")) -fun > nullableEintraege( - checkerBuilder: IterableContainsCheckerBuilder, - assertionCreator: (Assert.() -> Unit)?, - vararg otherAssertionCreators: (Assert.() -> Unit)? -): AssertionPlant - = checkerBuilder.eintraege(assertionCreator, *otherAssertionCreators) - -@Deprecated("Use `wert` instead; will be removed with 1.0.0", ReplaceWith("wert(expectedOrNull)")) -fun > IterableContains.CheckerOption.nullableWert(expectedOrNull: E): AssertionPlant - = wert(expectedOrNull) - -@Deprecated("Use `eintrag` instead; will be removed with 1.0.0", ReplaceWith("eintrag(assertionCreatorOrNull)")) -infix fun > IterableContains.CheckerOption.nullableEintrag(assertionCreatorOrNull: (Assert.() -> Unit)?): AssertionPlant - = eintrag(assertionCreatorOrNull) - -@Deprecated("Use `werte` instead; will be removed with 1.0.0", ReplaceWith("werte(expectedOrNull, *otherExpectedOrNulls)")) -fun > IterableContains.CheckerOption.nullableWerte(expectedOrNull: E, vararg otherExpectedOrNulls: E): AssertionPlant - = werte(expectedOrNull, *otherExpectedOrNulls) - -@Deprecated("Use `entry` instead; will be removed with 1.0.0", ReplaceWith("entries(assertionCreatorOrNull, *otherAssertionCreatorsOrNulls)")) -fun > IterableContains.CheckerOption.nullableEintraege( - assertionCreatorOrNull: (Assert.() -> Unit)?, - vararg otherAssertionCreatorsOrNulls: (Assert.() -> Unit)? -): AssertionPlant = eintraege(assertionCreatorOrNull, *otherAssertionCreatorsOrNulls) - diff --git a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/iterableDeprecatedContainsInAnyOrderOnlyCreators.kt b/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/iterableDeprecatedContainsInAnyOrderOnlyCreators.kt deleted file mode 100644 index 6991045fd..000000000 --- a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/iterableDeprecatedContainsInAnyOrderOnlyCreators.kt +++ /dev/null @@ -1,80 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") -@file:JvmMultifileClass -@file:JvmName("IterableContainsInAnyOrderOnlyCreatorsKt") -package ch.tutteli.atrium.api.cc.de_CH - -import ch.tutteli.atrium.assertions.iterable.contains.builders.IterableContainsBuilder -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InAnyOrderOnlySearchBehaviour - -@Deprecated("Use the extension fun `wert` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", ReplaceWith("checkerBuilder.wert(expected)")) -fun > wert(checkerBuilder: IterableContainsBuilder, expected: E): AssertionPlant - = werte(checkerBuilder, expected) - -@Deprecated("Use the extension fun `werte` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", ReplaceWith("checkerBuilder.werte(expected, *otherExpected)")) -fun > werte(checkerBuilder: IterableContainsBuilder, expected: E, vararg otherExpected: E): AssertionPlant - = checkerBuilder.werte(expected, *otherExpected) - -@Deprecated("Will be removed with 1.0.0 because it is redundant in terms of `wert(expected)` without adding enough to be a legit alternative.", ReplaceWith("wert(expected)")) -fun > IterableContains.Builder.objekt(expected: E): AssertionPlant - = werte(expected) - -@Deprecated("Use the extension fun `wert` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", ReplaceWith("checkerBuilder.wert(expected)")) -fun > objekt(checkerBuilder: IterableContainsBuilder, expected: E): AssertionPlant - = werte(checkerBuilder, expected) - -@Deprecated("Will be removed with 1.0.0 because it is redundant in terms of `werte(expected, otherExpected)` without adding enough to be a legit alternative.", ReplaceWith("werte(expected, *otherExpected)")) -fun > IterableContains.Builder.objekte(expected: E, vararg otherExpected: E): AssertionPlant - = werte(expected, *otherExpected) - -@Deprecated("Use the extension fun `werte` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", ReplaceWith("checkerBuilder.werte(expected, *otherExpected)")) -fun > objekte(checkerBuilder: IterableContainsBuilder, expected: E, vararg otherExpected: E): AssertionPlant - = checkerBuilder.werte(expected, *otherExpected) - -@Deprecated("Use the extension fun `eintrag` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", ReplaceWith("checkerBuilder.eintrag(assertionCreator)")) -fun > eintrag(checkerBuilder: IterableContainsBuilder, assertionCreator: Assert.() -> Unit): AssertionPlant - = eintraege(checkerBuilder, assertionCreator) - - -@Deprecated("Use the extension fun `eintrag` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", ReplaceWith("checkerBuilder.eintrag(assertionCreator)")) -fun > nullableEintrag(checkerBuilder: IterableContainsBuilder, assertionCreator: (Assert.() -> Unit)?): AssertionPlant - = nullableEintraege(checkerBuilder, assertionCreator) - -@Deprecated("Use the extension fun `eintraege` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", ReplaceWith("checkerBuilder.eintraege(assertionCreator, *otherAssertionCreators)")) -fun > eintraege( - checkerBuilder: IterableContainsBuilder, - assertionCreator: Assert.() -> Unit, - vararg otherAssertionCreators: Assert.() -> Unit -): AssertionPlant - = checkerBuilder.eintraege(assertionCreator, *otherAssertionCreators) - - - -@Deprecated("Use the extension fun `eintraege` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", ReplaceWith("checkerBuilder.eintraege(assertionCreator, *otherAssertionCreators)")) -fun > nullableEintraege( - checkerBuilder: IterableContainsBuilder, - assertionCreator: (Assert.() -> Unit)?, - vararg otherAssertionCreators: (Assert.() -> Unit)? -): AssertionPlant - = checkerBuilder.eintraege(assertionCreator, *otherAssertionCreators) - -@Deprecated("Use `wert` instead; will be removed with 1.0.0", ReplaceWith("wert(expectedOrNull)")) -infix fun > IterableContains.Builder.nullableWert(expectedOrNull: E): AssertionPlant - = wert(expectedOrNull) - -@Deprecated("Use `eintrag` instead; will be removed with 1.0.0", ReplaceWith("v(assertionCreatorOrNull)")) -infix fun > IterableContains.Builder.nullableEintrag(assertionCreatorOrNull: (Assert.() -> Unit)?): AssertionPlant - = eintrag(assertionCreatorOrNull) - -@Deprecated("Use `werte` instead; will be removed with 1.0.0", ReplaceWith("v(expectedOrNull, *otherExpectedOrNulls)")) -fun > IterableContains.Builder.nullableWerte(expectedOrNull: E, vararg otherExpectedOrNulls: E): AssertionPlant - = werte(expectedOrNull, *otherExpectedOrNulls) - -@Deprecated("Use `eintraege` instead; will be removed with 1.0.0", ReplaceWith("eintraege(assertionCreatorOrNull, *otherAssertionCreatorsOrNulls)")) -fun > IterableContains.Builder.nullableEintraege( - assertionCreatorOrNull: (Assert.() -> Unit)?, - vararg otherAssertionCreatorsOrNulls: (Assert.() -> Unit)? -): AssertionPlant = eintraege(assertionCreatorOrNull, *otherAssertionCreatorsOrNulls) diff --git a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/iterableDeprecatedContainsInOrderOnlyCreators.kt b/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/iterableDeprecatedContainsInOrderOnlyCreators.kt deleted file mode 100644 index 338da7c5d..000000000 --- a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/iterableDeprecatedContainsInOrderOnlyCreators.kt +++ /dev/null @@ -1,78 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") -@file:JvmMultifileClass -@file:JvmName("IterableContainsInOrderOnlyCreatorsKt") -package ch.tutteli.atrium.api.cc.de_CH - -import ch.tutteli.atrium.assertions.iterable.contains.builders.IterableContainsBuilder -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InOrderOnlySearchBehaviour - -@Deprecated("Use the extension fun `wert` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", ReplaceWith("checkerBuilder.wert(expected)")) -fun > wert(checkerBuilder: IterableContainsBuilder, expected: E): AssertionPlant - = werte(checkerBuilder, expected) - -@Deprecated("Use the extension fun `werte` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", ReplaceWith("checkerBuilder.werte(expected, *otherExpected)")) -fun > werte(checkerBuilder: IterableContainsBuilder, expected: E, vararg otherExpected: E): AssertionPlant - = checkerBuilder.werte(expected, *otherExpected) - -@Deprecated("Will be removed with 1.0.0 because it is redundant in terms of `wert(expected)` without adding enough to be a legit alternative.", ReplaceWith("wert(expected)")) -fun > IterableContains.Builder.objekt(expected: E): AssertionPlant - = werte(expected) - -@Deprecated("Use the extension fun `wert` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", ReplaceWith("checkerBuilder.wert(expected)")) -fun > objekt(checkerBuilder: IterableContainsBuilder, expected: E): AssertionPlant - = werte(checkerBuilder, expected) - -@Deprecated("Will be removed with 1.0.0 because it is redundant in terms of `werte(expected, otherExpected)` without adding enough to be a legit alternative.", ReplaceWith("werte(expected, *otherExpected)")) -fun > IterableContains.Builder.objekte(expected: E, vararg otherExpected: E): AssertionPlant - = werte(expected, *otherExpected) - -@Deprecated("Use the extension fun `werte` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", ReplaceWith("checkerBuilder.werte(expected, *otherExpected)")) -fun > objekte(checkerBuilder: IterableContainsBuilder, expected: E, vararg otherExpected: E): AssertionPlant - = checkerBuilder.werte(expected, *otherExpected) - -@Deprecated("Use the extension fun `eintrag` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", ReplaceWith("checkerBuilder.eintrag(assertionCreator)")) -fun > eintrag(checkerBuilder: IterableContainsBuilder, assertionCreator: Assert.() -> Unit): AssertionPlant - = eintraege(checkerBuilder, assertionCreator) - -@Deprecated("Use the extension fun `eintrag` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", ReplaceWith("checkerBuilder.eintrag(assertionCreator)")) -fun > nullableEintrag(checkerBuilder: IterableContainsBuilder, assertionCreator: (Assert.() -> Unit)?): AssertionPlant - = nullableEintraege(checkerBuilder, assertionCreator) - -@Deprecated("Use the extension fun `eintraege` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", ReplaceWith("checkerBuilder.eintraege(assertionCreator, *otherAssertionCreators)")) -fun > eintraege( - checkerBuilder: IterableContainsBuilder, - assertionCreator: Assert.() -> Unit, - vararg otherAssertionCreators: Assert.() -> Unit -): AssertionPlant - = checkerBuilder.eintraege(assertionCreator, *otherAssertionCreators) - -@Deprecated("Use the extension fun `eintraege` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0", ReplaceWith("checkerBuilder.eintraege(assertionCreator, *otherAssertionCreators)")) -fun > nullableEintraege( - checkerBuilder: IterableContainsBuilder, - assertionCreator: (Assert.() -> Unit)?, - vararg otherAssertionCreators: (Assert.() -> Unit)? -): AssertionPlant - = checkerBuilder.eintraege(assertionCreator, *otherAssertionCreators) - - -@Deprecated("Use `wert` instead; will be removed with 1.0.0", ReplaceWith("wert(expectedOrNull)")) -infix fun > IterableContains.Builder.nullableWert(expectedOrNull: E): AssertionPlant - = wert(expectedOrNull) - -@Deprecated("Use `eintrag` instead; will be removed with 1.0.0", ReplaceWith("eintrag(assertionCreatorOrNull)")) -infix fun > IterableContains.Builder.nullableEintrag(assertionCreatorOrNull: (Assert.() -> Unit)?): AssertionPlant - = eintrag(assertionCreatorOrNull) - -@Deprecated("Use `werte` instead; will be removed with 1.0.0", ReplaceWith("werte(expectedOrNull, *otherExpectedOrNulls)")) -fun > IterableContains.Builder.nullableWerte(expectedOrNull: E, vararg otherExpectedOrNulls: E): AssertionPlant - = werte(expectedOrNull, *otherExpectedOrNulls) - -@Deprecated("Use `eintraege` instead; will be removed with 1.0.0", ReplaceWith("eintraege(assertionCreatorOrNull, *otherAssertionCreatorsOrNulls)")) -fun > IterableContains.Builder.nullableEintraege( - assertionCreatorOrNull: (Assert.() -> Unit)?, - vararg otherAssertionCreatorsOrNulls: (Assert.() -> Unit)? -): AssertionPlant = eintraege(assertionCreatorOrNull, *otherAssertionCreatorsOrNulls) diff --git a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/iterableDeprecatedContainsInOrderOnlyGroupedCreators.kt b/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/iterableDeprecatedContainsInOrderOnlyGroupedCreators.kt deleted file mode 100644 index 07580042c..000000000 --- a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/iterableDeprecatedContainsInOrderOnlyGroupedCreators.kt +++ /dev/null @@ -1,61 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") -@file:JvmMultifileClass -@file:JvmName("IterableContainsInOrderOnlyGroupedCreatorsKt") - -package ch.tutteli.atrium.api.cc.de_CH - -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.domain.builders.utils.GroupWithNullableEntries -import ch.tutteli.atrium.domain.builders.utils.GroupWithoutNullableEntries -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InOrderOnlyGroupedWithinSearchBehaviour - - -@Deprecated( - "Use the extension function which expects Group instead; will be removed with 1.0.0", - ReplaceWith("builder.inBeliebigerReihenfolge(firstGroup, secondGroup, *otherExpectedGroups)") -) -fun > inBeliebigerReihenfolge( - builder: IterableContains.Builder, - firstGroup: GroupWithoutNullableEntries, - secondGroup: GroupWithoutNullableEntries, - vararg otherExpectedGroups: GroupWithoutNullableEntries -): AssertionPlant = builder.inBeliebigerReihenfolge(firstGroup, secondGroup, *otherExpectedGroups) - -@Deprecated( - "Use the extension function which expects Group instead; will be removed with 1.0.0", - ReplaceWith("builder.inBeliebigerReihenfolge(firstGroup, secondGroup, *otherExpectedGroups)") -) -fun > inBeliebigerReihenfolge( - builder: IterableContains.Builder, - firstGroup: GroupWithNullableEntries, - secondGroup: GroupWithNullableEntries, - vararg otherExpectedGroups: GroupWithNullableEntries -): AssertionPlant = builder.inBeliebigerReihenfolge(firstGroup, secondGroup, *otherExpectedGroups) - -@Deprecated( - "Use the extension function which expects Group instead; will be removed with 1.0.0", - ReplaceWith("builder.inBeliebigerReihenfolge(firstGroup, secondGroup, *otherExpectedGroups)") -) -@JvmName("inBeliebigerReihenfolgeEintraege") -fun > inBeliebigerReihenfolge( - builder: IterableContains.Builder, - firstGroup: GroupWithoutNullableEntries.() -> Unit>, - secondGroup: GroupWithoutNullableEntries.() -> Unit>, - vararg otherExpectedGroups: GroupWithoutNullableEntries.() -> Unit> -): AssertionPlant = builder.inBeliebigerReihenfolge(firstGroup, secondGroup, *otherExpectedGroups) - - -@Deprecated( - "Use the extension function which expects Group instead; will be removed with 1.0.0", - ReplaceWith("builder.inBeliebigerReihenfolge(firstGroup, secondGroup, *otherExpectedGroups)") -) -@JvmName("inBeliebigerReihenfolgeNullableEintraege") -fun > inBeliebigerReihenfolge( - builder: IterableContains.Builder, - firstGroup: GroupWithNullableEntries<(Assert.() -> Unit)?>, - secondGroup: GroupWithNullableEntries<(Assert.() -> Unit)?>, - vararg otherExpectedGroups: GroupWithNullableEntries<(Assert.() -> Unit)?> -): AssertionPlant = builder.inBeliebigerReihenfolge(firstGroup, secondGroup, *otherExpectedGroups) diff --git a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/throwableDeprecatedAssertions.kt b/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/throwableDeprecatedAssertions.kt deleted file mode 100644 index 03a6c88d0..000000000 --- a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/throwableDeprecatedAssertions.kt +++ /dev/null @@ -1,22 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") -@file:JvmMultifileClass -@file:JvmName("ThrowableAssertionsKt") -package ch.tutteli.atrium.api.cc.de_CH - -import ch.tutteli.atrium.domain.creating.throwable.thrown.ThrowableThrown - -/** - * Makes the assertion that the thrown [Throwable] is of type [TExpected]. - * - * @return Notice, that this assertion function cannot provide a fluent API because it depends on whether the assertion - * (a [Throwable] was thrown and is of type [TExpected]) holds or not. - * If you want to define subsequent assertions on the down-casted [Throwable], then use the overload which expects a - * lambda (where you can define subsequent assertions). - * - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Does not add enough to be a valid alternative to the overload with assertionCreator; will be removed with 1.0.0", ReplaceWith("wirft {}")) -inline fun ThrowableThrown.Builder.wirft() { - wirft {} -} diff --git a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/typeTransformationDeprecatedAssertions.kt b/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/typeTransformationDeprecatedAssertions.kt deleted file mode 100644 index 7bc51144e..000000000 --- a/misc/deprecated/apis/cc-de_CH/atrium-api-cc-de_CH-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/de_CH/typeTransformationDeprecatedAssertions.kt +++ /dev/null @@ -1,23 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") -@file:JvmMultifileClass -@file:JvmName("TypeTransformationAssertionsKt") -package ch.tutteli.atrium.api.cc.de_CH - -import ch.tutteli.atrium.creating.AssertionPlantNullable -import ch.tutteli.atrium.creating.SubjectProvider - -/** - * Makes the assertion that [AssertionPlantNullable.subject][SubjectProvider.subject] is not null but the [expected] value. - * - * Is a shortcut for `istNichtNull { ist(expected) }` - * - * @return Notice, that this assertion function cannot provide a fluent API because it depends on whether the first - * assertion ([Assert.subject][SubjectProvider.subject] is not null) holds or not. - * - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Will be removed with 1.0.0 because it is redundant in terms of `ist(expected)` without adding enough to be a legit alternative.", ReplaceWith("ist(expected)")) -inline fun AssertionPlantNullable.istNichtNullAber(expected: T) { - istNichtNull { ist(expected) } -} diff --git a/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/build.gradle b/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/build.gradle deleted file mode 100644 index a2c6d90ea..000000000 --- a/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/build.gradle +++ /dev/null @@ -1,5 +0,0 @@ -description = 'An assertion function API in en_GB with a focus on code completion as common module.' - -dependencies { - api prefixedProject('domain-builders-common') -} diff --git a/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/anyAssertions.kt b/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/anyAssertions.kt deleted file mode 100644 index 975da3ec7..000000000 --- a/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/anyAssertions.kt +++ /dev/null @@ -1,169 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") -@file:JvmMultifileClass -@file:JvmName("AnyAssertionsKt") - -package ch.tutteli.atrium.api.cc.en_GB - -import ch.tutteli.atrium.checking.AssertionChecker -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.creating.AssertionPlantNullable -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.domain.builders.AssertImpl -import ch.tutteli.atrium.reporting.Reporter -import kotlin.jvm.JvmMultifileClass -import kotlin.jvm.JvmName - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] is (equal to) [expected]. - * - * This method might enforce in the future, that [expected] has to be the same type as [Assert.subject][SubjectProvider.subject]. - * Currently the following is possible: `assert(1).toBe(1.0)` - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().toBe(expected).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.fluent.en_GB.toBe" - ) -) -fun Assert.toBe(expected: T) = addAssertion(AssertImpl.any.toBe(this, expected)) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] is not (equal to) [expected]. - * - * This method might enforce in the future, that [expected] has to be the same type as [Assert.subject][SubjectProvider.subject]. - * Currently the following is possible: `assert(1).notToBe(1.0)` - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().notToBe(expected).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.fluent.en_GB.notToBe" - ) -) -fun Assert.notToBe(expected: T) = addAssertion(AssertImpl.any.notToBe(this, expected)) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] is the same instance as [expected]. - * - * This method might enforce in the future, that [expected] has to be the same type as [Assert.subject][SubjectProvider.subject]. - * Currently the following is possible: `assert(1).isSameAs(1.0)` - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().isSameAs(expected).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.fluent.en_GB.isSameAs" - ) -) -fun Assert.isSameAs(expected: T) = addAssertion(AssertImpl.any.isSame(this, expected)) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] is not the same instance as [expected]. - * - * This method might enforce in the future, that [expected] has to be the same type as [Assert.subject][SubjectProvider.subject]. - * Currently the following is possible: `assert(1).isNotSameAs(1.0)` - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().isNotSameAs(expected).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.fluent.en_GB.isNotSameAs" - ) -) -fun Assert.isNotSameAs(expected: T) = addAssertion(AssertImpl.any.isNotSame(this, expected)) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] is [expected]. - * - * @return Does not support a fluent API because: what else would you want to assert about `null` anyway? - * - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().toBe(expected).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.fluent.en_GB.toBe" - ) -) -inline fun AssertionPlantNullable.toBe(expected: T?) { - addAssertion(AssertImpl.any.isNullable(this, T::class, expected)) -} - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] is either `null` if [assertionCreatorOrNull] - * is `null` or is not `null` and holds all assertions [assertionCreatorOrNull] might create. - * - * It is a shortcut for - * ```kotlin - * if (assertionCreatorOrNull == null) toBe(null) - * else notToBeNull(assertionCreatorOrNull) - * ``` - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().toBeNullIfNullGivenElse(assertionCreatorOrNull).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.fluent.en_GB.toBeNullIfNullGivenElse" - ) -) -inline fun AssertionPlantNullable.toBeNullIfNullGivenElse( - noinline assertionCreatorOrNull: (Assert.() -> Unit)? -) { - addAssertion(AssertImpl.any.isNullIfNullGivenElse(this, T::class, assertionCreatorOrNull)) -} - -/** - * Can be used to separate assertions when using the fluent API. - * - * For instance `assert(1).isLessThan(2).and.isGreaterThan(0)` creates - * two assertions (not one assertion with two sub-assertions) - the first asserts that 1 is less than 2 and a second - * asserts that 1 is greater than 0. If the first assertion fails, then usually (depending on the configured - * [AssertionChecker]) the second assertion is not evaluated. - * - * @return This plant to support a fluent API. - */ -val AssertionPlant.and: AssertionPlant get() = this - -/** - * Can be used to create a group of sub assertions when using the fluent API. - * - * For instance `assert(1).isLessThan(3).and { isEven(); isGreaterThan(1) }` creates - * two assertions where the second one consists of two sub-assertions. In case the first assertion holds, then the - * second one is evaluated as a whole. Meaning, even though 1 is not even, it still evaluates that 1 is greater than 1. - * Hence the reporting might (depending on the configured [Reporter]) contain both failing sub-assertions. - * - * @return This plant to support a fluent API. - */ -infix fun AssertionPlant.and(assertionCreator: Assert.() -> Unit) = - addAssertionsCreatedBy(assertionCreator) diff --git a/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/arrayAssertions.kt b/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/arrayAssertions.kt deleted file mode 100644 index 3cad3f2ef..000000000 --- a/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/arrayAssertions.kt +++ /dev/null @@ -1,400 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") -package ch.tutteli.atrium.api.cc.en_GB - -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.domain.builders.ExpectImpl -import kotlin.jvm.JvmName - -/** - * Turns `Assert>` into `Assert>`. - * - * The transformation as such is not reflected in reporting. - * Use `returnValueOf(Array::asIterable)` if you want to show the transformation in reporting. - * - * @return The newly created [AssertionPlant] for the transformed subject. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().asList().asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.fluent.en_GB.asList" - ) -) -fun Assert>.asIterable(): Assert> = - ExpectImpl.changeSubject(this).unreported { it.asIterable() } - -/** - * Turns `Assert>` into `Assert>` and makes the assertion that the assertions the given - * [assertionCreator] might create hold. - * - * The transformation as such is not reflected in reporting. - * Use `returnValueOf(Array::asIterable)` if you want to show the transformation in reporting. - * - * @return The newly created [AssertionPlant] for the transformed subject. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().asList().asAssert(assertionCreator)", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.fluent.en_GB.asList" - ) -) -fun Assert>.asIterable(assertionCreator: Assert>.() -> Unit): Assert> = - asIterable().addAssertionsCreatedBy(assertionCreator) - - -/** - * Turns `Assert` into `Assert>`. - * - * The transformation as such is not reflected in reporting. - * Use `returnValueOf(ByteArray::asIterable)` if you want to show the transformation in reporting. - * - * @return The newly created [Assert] for the transformed subject. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().asList().asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.fluent.en_GB.asList" - ) -) -@JvmName("byteArrAsIterable") -fun Assert.asIterable(): Assert> = - ExpectImpl.changeSubject(this).unreported { it.asIterable() } - -/** - * Turns `Assert` into `Assert>` and makes the assertion that the assertions the given - * [assertionCreator] might create hold. - * - * The transformation as such is not reflected in reporting. - * Use `returnValueOf(ByteArray::asIterable)` if you want to show the transformation in reporting. - * - * @return The newly created [Assert] for the transformed subject. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().asList().asAssert(assertionCreator)", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.fluent.en_GB.asList" - ) -) -@JvmName("byteArrAsIterable") -fun Assert.asIterable(assertionCreator: Assert>.() -> Unit): Assert> = - asIterable().addAssertionsCreatedBy(assertionCreator) - - -/** - * Turns `Assert` into `Assert>`. - * - * The transformation as such is not reflected in reporting. - * Use `returnValueOf(CharArray::asIterable)` if you want to show the transformation in reporting. - * - * @return The newly created [AssertionPlant] for the transformed subject. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().asList().asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.fluent.en_GB.asList" - ) -) -@JvmName("charArrAsIterable") -fun Assert.asIterable(): Assert> = - ExpectImpl.changeSubject(this).unreported { it.asIterable() } - -/** - * Turns `Assert` into `Assert>` and makes the assertion that the assertions the given - * [assertionCreator] might create hold. - * - * The transformation as such is not reflected in reporting. - * Use `returnValueOf(CharArray::asIterable)` if you want to show the transformation in reporting. - * - * @return The newly created [AssertionPlant] for the transformed subject. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().asList().asAssert(assertionCreator)", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.fluent.en_GB.asList" - ) -) -@JvmName("charArrAsIterable") -fun Assert.asIterable(assertionCreator: Assert>.() -> Unit): Assert> = - asIterable().addAssertionsCreatedBy(assertionCreator) - - -/** - * Turns `Assert` into `Assert>`. - * - * The transformation as such is not reflected in reporting. - * Use `returnValueOf(ShortArray::asIterable)` if you want to show the transformation in reporting. - * - * @return The newly created [AssertionPlant] for the transformed subject. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().asList().asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.fluent.en_GB.asList" - ) -) -@JvmName("shortArrAsIterable") -fun Assert.asIterable(): Assert> = - ExpectImpl.changeSubject(this).unreported { it.asIterable() } - -/** - * Turns `Assert` into `Assert>` and makes the assertion that the assertions the given - * [assertionCreator] might create hold. - * - * The transformation as such is not reflected in reporting. - * Use `returnValueOf(ShortArray::asIterable)` if you want to show the transformation in reporting. - * - * @return The newly created [AssertionPlant] for the transformed subject. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().asList().asAssert(assertionCreator)", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.fluent.en_GB.asList" - ) -) -@JvmName("shortArrAsIterable") -fun Assert.asIterable(assertionCreator: Assert>.() -> Unit): Assert> = - asIterable().addAssertionsCreatedBy(assertionCreator) - - -/** - * Turns `Assert` into `Assert>`. - * - * The transformation as such is not reflected in reporting. - * Use `returnValueOf(IntArray::asIterable)` if you want to show the transformation in reporting. - * - * @return The newly created [AssertionPlant] for the transformed subject. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().asList().asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.fluent.en_GB.asList" - ) -) -@JvmName("intArrAsIterable") -fun Assert.asIterable(): Assert> = ExpectImpl.changeSubject(this).unreported { it.asIterable() } - -/** - * Turns `Assert` into `Assert>` and makes the assertion that the assertions the given - * [assertionCreator] might create hold. - * - * The transformation as such is not reflected in reporting. - * Use `returnValueOf(IntArray::asIterable)` if you want to show the transformation in reporting. - * - * @return The newly created [AssertionPlant] for the transformed subject. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().asList().asAssert(assertionCreator)", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.fluent.en_GB.asList" - ) -) -@JvmName("intArrAsIterable") -fun Assert.asIterable(assertionCreator: Assert>.() -> Unit): Assert> = - asIterable().addAssertionsCreatedBy(assertionCreator) - - -/** - * Turns `Assert` into `Assert>`. - * - * The transformation as such is not reflected in reporting. - * Use `returnValueOf(LongArray::asIterable)` if you want to show the transformation in reporting. - * - * @return The newly created [AssertionPlant] for the transformed subject. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().asList().asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.fluent.en_GB.asList" - ) -) -@JvmName("longArrAsIterable") -fun Assert.asIterable(): Assert> = - ExpectImpl.changeSubject(this).unreported { it.asIterable() } - -/** - * Turns `Assert` into `Assert>` and makes the assertion that the assertions the given - * [assertionCreator] might create hold. - * - * The transformation as such is not reflected in reporting. - * Use `returnValueOf(LongArray::asIterable)` if you want to show the transformation in reporting. - * - * @return The newly created [AssertionPlant] for the transformed subject. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().asList().asAssert(assertionCreator)", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.fluent.en_GB.asList" - ) -) -@JvmName("longArrAsIterable") -fun Assert.asIterable(assertionCreator: Assert>.() -> Unit): Assert> = - asIterable().addAssertionsCreatedBy(assertionCreator) - - -/** - * Turns `Assert` into `Assert>`. - * - * The transformation as such is not reflected in reporting. - * Use `returnValueOf(FloatArray::asIterable)` if you want to show the transformation in reporting. - * - * @return The newly created [AssertionPlant] for the transformed subject. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().asList().asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.fluent.en_GB.asList" - ) -) -@JvmName("floatArrAsIterable") -fun Assert.asIterable(): Assert> = - ExpectImpl.changeSubject(this).unreported { it.asIterable() } - -/** - * Turns `Assert` into `Assert>` and makes the assertion that the assertions the given - * [assertionCreator] might create hold. - * - * The transformation as such is not reflected in reporting. - * Use `returnValueOf(FloatArray::asIterable)` if you want to show the transformation in reporting. - * - * @return The newly created [AssertionPlant] for the transformed subject. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().asList().asAssert(assertionCreator)", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.fluent.en_GB.asList" - ) -) -@JvmName("floatArrAsIterable") -fun Assert.asIterable(assertionCreator: Assert>.() -> Unit): Assert> = - asIterable().addAssertionsCreatedBy(assertionCreator) - - -/** - * Turns `Assert` into `Assert>`. - * - * The transformation as such is not reflected in reporting. - * Use `returnValueOf(DoubleArray::asIterable)` if you want to show the transformation in reporting. - * - * @return The newly created [AssertionPlant] for the transformed subject. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().asList().asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.fluent.en_GB.asList" - ) -) -@JvmName("doubleArrAsIterable") -fun Assert.asIterable(): Assert> = - ExpectImpl.changeSubject(this).unreported { it.asIterable() } - -/** - * Turns `Assert` into `Assert>` and makes the assertion that the assertions the given - * [assertionCreator] might create hold. - * - * The transformation as such is not reflected in reporting. - * Use `returnValueOf(DoubleArray::asIterable)` if you want to show the transformation in reporting. - * - * @return The newly created [AssertionPlant] for the transformed subject. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().asList().asAssert(assertionCreator)", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.fluent.en_GB.asList" - ) -) -@JvmName("doubleArrAsIterable") -fun Assert.asIterable(assertionCreator: Assert>.() -> Unit): Assert> = - asIterable().addAssertionsCreatedBy(assertionCreator) - - -/** - * Turns `Assert` into `Assert>`. - * - * The transformation as such is not reflected in reporting. - * Use `returnValueOf(BooleanArray::asIterable)` if you want to show the transformation in reporting. - * - * @return The newly created [AssertionPlant] for the transformed subject. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().asList().asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.fluent.en_GB.asList" - ) -) -@JvmName("boolArrAsIterable") -fun Assert.asIterable(): Assert> = - ExpectImpl.changeSubject(this).unreported { it.asIterable() } - -/** - * Turns `Assert` into `Assert>` and makes the assertion that the assertions the given - * [assertionCreator] might create hold. - * - * The transformation as such is not reflected in reporting. - * Use `returnValueOf(BooleanArray::asIterable)` if you want to show the transformation in reporting. - * - * @return The newly created [AssertionPlant] for the transformed subject. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().asList().asAssert(assertionCreator)", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.fluent.en_GB.asList" - ) -) -@JvmName("boolArrAsIterable") -fun Assert.asIterable(assertionCreator: Assert>.() -> Unit): Assert> = - asIterable().addAssertionsCreatedBy(assertionCreator) diff --git a/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/charSequenceAssertions.kt b/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/charSequenceAssertions.kt deleted file mode 100644 index 8a99f4daf..000000000 --- a/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/charSequenceAssertions.kt +++ /dev/null @@ -1,270 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") -package ch.tutteli.atrium.api.cc.en_GB - -import ch.tutteli.atrium.api.cc.en_GB.creating.charsequence.contains.builders.NotCheckerOption -import ch.tutteli.atrium.api.cc.en_GB.creating.charsequence.contains.builders.impl.NotCheckerOptionImpl -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.domain.builders.AssertImpl -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains -import ch.tutteli.atrium.domain.creating.charsequence.contains.searchbehaviours.NoOpSearchBehaviour -import ch.tutteli.atrium.domain.creating.charsequence.contains.searchbehaviours.NotSearchBehaviour - -/** - * Creates a [CharSequenceContains.Builder] based on this [AssertionPlant] which allows to define - * more sophisticated `contains` assertions. - * - * @return The newly created builder. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().contains", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.api.fluent.en_GB.contains" - ) -) -val Assert.contains: CharSequenceContains.Builder - get() = AssertImpl.charSequence.containsBuilder(this) - -/** - * Creates a [CharSequenceContains.Builder] based on this [AssertionPlant] which allows to define - * more sophisticated `contains not` assertions. - * - * @return The newly created builder. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().containsNot", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.api.fluent.en_GB.containsNot" - ) -) -val Assert.containsNot: NotCheckerOption - get() = NotCheckerOptionImpl(AssertImpl.charSequence.containsNotBuilder(this)) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] contains [expected]'s [toString] representation - * and the [toString] representation of the [otherExpected] (if given), using a non disjoint search. - * - * It is a shortcut for `contains.atLeast(1).values(expected, *otherExpected)`. - * - * Notice that a runtime check applies which assures that only [CharSequence], [Number] and [Char] are passed (this - * function expects `Any` for your convenience, so that you can mix [String] and [Int] for instance). - * - * By non disjoint is meant that `'aa'` in `'aaaa'` is found three times and not only two times. - * Also notice, that it does not search for unique matches. Meaning, if the input of the search is `'a'` and [expected] - * is defined as `'a'` and one [otherExpected] is defined as `'a'` as well, then both match, even though they match the - * same sequence in the input of the search. Use the property `contains` to create a more sophisticated `contains` - * assertion where you can use options such as [atLeast], [atMost] and [exactly] to control the number of occurrences - * you expect. - * - * Meaning you might want to use: - * `contains.exactly(2).value('a')` - * instead of: - * `contains('a', 'a')` - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - * @throws IllegalArgumentException in case [expected] or one of the [otherExpected] is not a - * [CharSequence], [Number] or [Char]. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().contains(expected, *otherExpected).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.fluent.en_GB.contains" - ) -) -fun Assert.contains(expected: Any, vararg otherExpected: Any): AssertionPlant = - contains.atLeast(1).values(expected, *otherExpected) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] does not contain [expected]'s [toString] representation - * and neither one of the [otherExpected]'s [toString] representation (if given). - * - * It is a shortcut for `containsNot.values(expected, *otherExpected)`. - * - * Notice that a runtime check applies which assures that only [CharSequence], [Number] and [Char] are passed (this - * function expects `Any` for your convenience, so that you can mix [String] and [Int] for instance). - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().containsNot(expected, *otherExpected).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.fluent.en_GB.containsNot" - ) -) -fun Assert.containsNot(expected: Any, vararg otherExpected: Any) = - containsNot.values(expected, *otherExpected) - - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] contains a sequence which matches the given regular expression - * [pattern] as well as the [otherPatterns] (if given), using a non disjoint search. - * - * It is a shortcut for `contains.atLeast(1).regex(pattern, *otherPatterns)`. - * - * By non disjoint is meant that `'aa'` in `'aaaa'` is found three times and not only two times. - * Also notice, that it does not search for unique matches. Meaning, if the input of the search is `'ab'` and [pattern] - * is defined as `'a(b)?'` and one of the [otherPatterns] is defined as `'a(b)?'` as well, then both match, even though - * they match the same sequence in the input of the search. Use an option such as [atLeast], [atMost] and [exactly] to - * control the number of occurrences you expect. - * - * Meaning you might want to use: - * `contains.exactly(2).regex('a(b)?')` - * instead of: - * `contains.atLeast(1).regex('a(b)?', 'a(b)?')` - * - * @param pattern The pattern which is expected to have a match against the input of the search. - * @param otherPatterns Additional patterns which are expected to have a match against the input of the search. - * - * @return The [AssertionPlant] for which the assertion was built to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().containsRegex(pattern, *otherPatterns).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.fluent.en_GB.containsRegex" - ) -) -fun Assert.containsRegex(pattern: String, vararg otherPatterns: String): AssertionPlant = - contains.atLeast(1).regex(pattern, *otherPatterns) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] starts with [expected]. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().startsWith(expected).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.fluent.en_GB.startsWith" - ) -) -fun Assert.startsWith(expected: CharSequence) = - addAssertion(AssertImpl.charSequence.startsWith(this, expected)) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] does not start with [expected]. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().startsNotWith(expected).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.fluent.en_GB.startsNotWith" - ) -) -fun Assert.startsNotWith(expected: CharSequence) = - addAssertion(AssertImpl.charSequence.startsNotWith(this, expected)) - - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] ends with [expected]. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().endsWith(expected).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.fluent.en_GB.endsWith" - ) -) -fun Assert.endsWith(expected: CharSequence) = - addAssertion(AssertImpl.charSequence.endsWith(this, expected)) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] does not end with [expected]. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().endsNotWith(expected).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.fluent.en_GB.endsNotWith" - ) -) -fun Assert.endsNotWith(expected: CharSequence) = - addAssertion(AssertImpl.charSequence.endsNotWith(this, expected)) - - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] [CharSequence].[kotlin.text.isEmpty]. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().isEmpty().asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.fluent.en_GB.isEmpty" - ) -) -fun Assert.isEmpty() = addAssertion(AssertImpl.charSequence.isEmpty(this)) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] [CharSequence].[kotlin.text.isNotEmpty]. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().isNotEmpty().asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.fluent.en_GB.isNotEmpty" - ) -) -fun Assert.isNotEmpty() = addAssertion(AssertImpl.charSequence.isNotEmpty(this)) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] [CharSequence].[kotlin.text.isNotBlank]. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().isNotBlank().asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.fluent.en_GB.isNotBlank" - ) -) -fun Assert.isNotBlank() = addAssertion(AssertImpl.charSequence.isNotBlank(this)) diff --git a/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/charSequenceContainsCheckers.kt b/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/charSequenceContainsCheckers.kt deleted file mode 100644 index 24d950ed5..000000000 --- a/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/charSequenceContainsCheckers.kt +++ /dev/null @@ -1,122 +0,0 @@ -@file:Suppress("DEPRECATION" /* will be removed with 1.0.0 */) - -package ch.tutteli.atrium.api.cc.en_GB - -import ch.tutteli.atrium.api.cc.en_GB.creating.charsequence.contains.builders.* -import ch.tutteli.atrium.api.cc.en_GB.creating.charsequence.contains.builders.impl.* -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains.SearchBehaviour - -/** - * Restricts a `contains` assertion by specifying that the number of occurrences of the value which we are looking - * for occurs `at least` number of [times] within the search input. - * - * @param times The number which the check will compare against the actual number of times an expected value is - * found in the input of the search. - * - * @return The newly created builder. - * @throws IllegalArgumentException In case [times] is smaller than zero. - * @throws IllegalArgumentException In case [times] equals to zero; use [containsNot] instead. - */ -@Deprecated( - "Switch from api-cc-en_GB to api-fluent-en_GB; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.atLeast(times)", - "ch.tutteli.atrium.api.fluent.en_GB.atLeast" - ) -) -fun CharSequenceContains.Builder.atLeast(times: Int): AtLeastCheckerOption = - AtLeastCheckerOptionImpl(times, this) - -/** - * Restricts a `contains at least` assertion by specifying that the number of occurrences of the value which we - * are looking for occurs `at most` number of [times] within the search input. - * - * The resulting restriction will be a `contains at least but at most` assertion. - * - * @param times The number which the check will compare against the actual number of times an expected value is - * found in the input of the search. - * - * @return The newly created builder. - * @throws IllegalArgumentException In case [times] is smaller than zero. - * @throws IllegalArgumentException In case [times] equals to zero; use [containsNot] instead. - * @throws IllegalArgumentException In case [times] of this `at most` restriction equals to the number of the - * `at least` restriction; use the [exactly] restriction instead. - */ -@Deprecated( - "Switch from api-cc-en_GB to api-fluent-en_GB; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.butAtMost(times)", - "ch.tutteli.atrium.api.fluent.en_GB.butAtMost" - ) -) -fun AtLeastCheckerOption.butAtMost(times: Int): ButAtMostCheckerOption = - ButAtMostCheckerOptionImpl(times, this, containsBuilder) - -/** - * Restricts a `contains` assertion by specifying that the number of occurrences of the value which we - * are looking for occurs `exactly` number of [times] within the search input. - * - * @param times The number which the check will compare against the actual number of times an expected value is - * found in the input of the search. - * - * @return The newly created builder. - * @throws IllegalArgumentException In case [times] is smaller than zero. - * @throws IllegalArgumentException In case [times] equals to zero; use [containsNot] instead. - */ -@Deprecated( - "Switch from api-cc-en_GB to api-fluent-en_GB; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.exactly(times)", - "ch.tutteli.atrium.api.fluent.en_GB.exactly" - ) -) -fun CharSequenceContains.Builder.exactly(times: Int): ExactlyCheckerOption = - ExactlyCheckerOptionImpl(times, this) - -/** - * Restricts a `contains` assertion by specifying that the number of occurrences of the value which we - * are looking for occurs `at least` once but `at most` number of [times] within the search input. - * - * If you want to use a higher lower bound than one, then use `atLeast(2).butAtMost(3)` instead of `atMost(3)`. - * And in case you want to state that it is either not contained at all or at most a certain number of times, - * then use `notOrAtMost(2)` instead. - * - * @param times The number which the check will compare against the actual number of times an expected value is - * found in the input of the search. - * - * @return The newly created builder. - * @throws IllegalArgumentException In case [times] is smaller than zero. - * @throws IllegalArgumentException In case [times] equals to zero; use [containsNot] instead. - * @throws IllegalArgumentException In case [times] equals to one; use [exactly] instead. - */ -@Deprecated( - "Switch from api-cc-en_GB to api-fluent-en_GB; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.atMost(times)", - "ch.tutteli.atrium.api.fluent.en_GB.atMost" - ) -) -fun CharSequenceContains.Builder.atMost(times: Int): AtMostCheckerOption = - AtMostCheckerOptionImpl(times, this) - -/** - * Restricts a `contains` assertion by specifying that the number of occurrences of the value which we - * are looking for occurs `not at all or at most` number of [times] within the search input. - * - * @param times The number which the check will compare against the actual number of times an expected value is - * found in the input of the search. - * - * @return The newly created builder. - * @throws IllegalArgumentException In case [times] is smaller than zero. - * @throws IllegalArgumentException In case [times] equals to zero; use [containsNot] instead. - */ -@Deprecated( - "Switch from api-cc-en_GB to api-fluent-en_GB; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.notOrAtMost(times)", - "ch.tutteli.atrium.api.fluent.en_GB.notOrAtMost" - ) -) -fun CharSequenceContains.Builder.notOrAtMost(times: Int): NotOrAtMostCheckerOption = - NotOrAtMostCheckerOptionImpl(times, this) diff --git a/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/charSequenceContainsCreators.kt b/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/charSequenceContainsCreators.kt deleted file mode 100644 index 51ea01520..000000000 --- a/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/charSequenceContainsCreators.kt +++ /dev/null @@ -1,326 +0,0 @@ -@file:Suppress("DEPRECATION" /* will be removed with 1.0.0 */) - -package ch.tutteli.atrium.api.cc.en_GB - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.domain.builders.AssertImpl -import ch.tutteli.atrium.domain.builders.creating.basic.contains.addAssertionForAssert -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains -import ch.tutteli.atrium.domain.creating.charsequence.contains.searchbehaviours.IgnoringCaseSearchBehaviour -import ch.tutteli.atrium.domain.creating.charsequence.contains.searchbehaviours.NoOpSearchBehaviour -import ch.tutteli.kbox.glue -import kotlin.jvm.JvmName - -/** - * Finishes the specification of the sophisticated `contains` assertion where the [expected] object shall be searched, - * using a non disjoint search. - * - * Delegates to `values(expected)`. - * - * Notice that a runtime check applies which assures that only [CharSequence], [Number] and [Char] are passed (this - * function expects `Any` for your convenience, so that you can mix [String] and [Int] for instance). - * - * By non disjoint is meant that 'aa' in 'aaaa' is found three times and not only two times. - * - * @param expected The value which is expected to be contained within the input of the search. - * - * @return The [AssertionPlant] for which the assertion was built to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - * @throws IllegalArgumentException in case [expected] is not a [CharSequence], [Number] or [Char]. - */ - -@Deprecated( - "Switch from api-cc-en_GB to api-fluent-en_GB; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.value(expected)", - "ch.tutteli.atrium.api.fluent.en_GB.value" - ) -) -fun CharSequenceContains.CheckerOption.value(expected: Any): AssertionPlant = - values(expected) - -/** - * Finishes the specification of the sophisticated `contains` assertion where the [expected] value as well as - * the [otherExpected] values shall be searched, using a non disjoint search. - * - * Notice that a runtime check applies which assures that only [CharSequence], [Number] and [Char] are passed (this - * function expects `Any` for your convenience, so that you can mix [String] and [Int] for instance). - * - * By non disjoint is meant that `'aa'` in `'aaaa'` is found three times and not only two times. - * Also notice, that it does not search for unique matches. Meaning, if the input of the search is `'a'` and [expected] - * is defined as `'a'` and one [otherExpected] is defined as `'a'` as well, then both match, even though they match the - * same sequence in the input of the search. Use an option such as [atLeast], [atMost] and [exactly] to control - * the number of occurrences you expect. - * - * Meaning you might want to use: - * `contains.exactly(2).value('a')` - * instead of: - * `contains.atLeast(1).values('a', 'a')` - * - * @param expected The value which is expected to be contained within the input of the search. - * @param otherExpected Additional values which are expected to be contained within the input of the search. - * - * @return The [AssertionPlant] for which the assertion was built to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - * @throws IllegalArgumentException in case [expected] or one of the [otherExpected] is not a - * [CharSequence], [Number] or [Char]. - */ - -@Deprecated( - "Switch from api-cc-en_GB to api-fluent-en_GB; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.values(expected, *otherExpected)", - "ch.tutteli.atrium.api.fluent.en_GB.values" - ) -) -fun CharSequenceContains.CheckerOption.values( - expected: Any, - vararg otherExpected: Any -): AssertionPlant = addAssertion(AssertImpl.charSequence.contains.values(this, expected glue otherExpected)) - - -/** - * Finishes the specification of the sophisticated `contains` assertion where the [expected] value shall be searched - * (ignoring case), using a non disjoint search. - * - * Delegates to `values(expected)`. - * - * Notice that a runtime check applies which assures that only [CharSequence], [Number] and [Char] are passed (this - * function expects `Any` for your convenience, so that you can mix [String] and [Int] for instance). - * - * By non disjoint is meant that 'aa' in 'aaaa' is found three times and not only two times. - * - * @param expected The value which is expected to be contained within the input of the search. - * - * @return The [AssertionPlant] for which the assertion was built to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - * @throws IllegalArgumentException in case [expected] is not a [CharSequence], [Number] or [Char]. - */ -@Deprecated( - "Switch from api-cc-en_GB to api-fluent-en_GB; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.value(expected)", - "ch.tutteli.atrium.api.fluent.en_GB.value" - ) -) -@JvmName("valueIgnoringCase") -fun CharSequenceContains.CheckerOption.value(expected: Any): AssertionPlant = - values(expected) - -/** - * Finishes the specification of the sophisticated `contains` assertion where the [expected] value as well as - * the [otherExpected] values shall be searched (ignoring case), using a non disjoint search. - * - * Notice that a runtime check applies which assures that only [CharSequence], [Number] and [Char] are passed (this - * function expects `Any` for your convenience, so that you can mix [String] and [Int] for instance). - * - * By non disjoint is meant that `'aa'` in `'aaaa'` is found three times and not only two times. - * Also notice, that it does not search for unique matches. Meaning, if the input of the search is `'a'` and [expected] - * is defined as `'a'` and one [otherExpected] is defined as `'a'` as well, then both match, even though they match the - * same sequence in the input of the search. Use an option such as [atLeast], [atMost] and [exactly] to control - * the number of occurrences you expect. - * - * Meaning you might want to use: - * `contains.ignoringCase.exactly(2).value('a')` - * instead of: - * `contains.ignoringCase.atLeast(1).values('a', 'a')` - * - * @param expected The value which is expected to be contained within the input of the search. - * @param otherExpected Additional values which are expected to be contained within the input of the search. - * - * @return The [AssertionPlant] for which the assertion was built to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - * @throws IllegalArgumentException in case [expected] or one of the [otherExpected] is not a - * [CharSequence], [Number] or [Char]. - */ -@Deprecated( - "Switch from api-cc-en_GB to api-fluent-en_GB; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.values(expected, *otherExpected)", - "ch.tutteli.atrium.api.fluent.en_GB.values" - ) -) -@JvmName("valuesIgnoringCase") -fun CharSequenceContains.CheckerOption.values( - expected: Any, - vararg otherExpected: Any -): AssertionPlant = - addAssertion(AssertImpl.charSequence.contains.valuesIgnoringCase(this, expected glue otherExpected)) - - -/** - * Finishes the specification of the sophisticated `contains` assertion where the [expected] value shall be searched - * (ignoring case), using a non disjoint search where it needs to be contained at least once. - * - * Delegates to `atLeast(1).values(expected)`. - * - * Notice that a runtime check applies which assures that only [CharSequence], [Number] and [Char] are passed (this - * function expects `Any` for your convenience, so that you can mix [String] and [Int] for instance). - * - * By non disjoint is meant that 'aa' in 'aaaa' is found three times and not only two times. - * - * @param expected The value which is expected to be contained within the input of the search. - * - * @return The [AssertionPlant] for which the assertion was built to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - * @throws IllegalArgumentException in case [expected] is not a [CharSequence], [Number] or [Char]. - */ -@Deprecated( - "Switch from api-cc-en_GB to api-fluent-en_GB; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.value(expected)", - "ch.tutteli.atrium.api.fluent.en_GB.value" - ) -) -fun CharSequenceContains.Builder.value(expected: Any): AssertionPlant = - atLeast(1).value(expected) - -/** - * Finishes the specification of the sophisticated `contains` assertion where the [expected] value as well as - * the [otherExpected] values shall be searched (ignoring case), using a non disjoint search - * where each need to be contained at least once. - * - * Delegates to `atLeast(1).values(expected, otherExpected)` - * - * Notice that a runtime check applies which assures that only [CharSequence], [Number] and [Char] are passed (this - * function expects `Any` for your convenience, so that you can mix [String] and [Int] for instance). - * - * By non disjoint is meant that `'aa'` in `'aaaa'` is found three times and not only two times. - * Also notice, that it does not search for unique matches. Meaning, if the input of the search is `'a'` and [expected] - * is defined as `'a'` and one [otherExpected] is defined as `'a'` as well, then both match, even though they match the - * same sequence in the input of the search. - * - * @param expected The value which is expected to be contained within the input of the search. - * @param otherExpected Additional values which are expected to be contained within the input of the search. - * - * @return The [AssertionPlant] for which the assertion was built to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - * @throws IllegalArgumentException in case [expected] or one of the [otherExpected] is not a - * [CharSequence], [Number] or [Char]. - */ -@Deprecated( - "Switch from api-cc-en_GB to api-fluent-en_GB; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.values(expected, *otherExpected)", - "ch.tutteli.atrium.api.fluent.en_GB.values" - ) -) -fun CharSequenceContains.Builder.values( - expected: Any, - vararg otherExpected: Any -): AssertionPlant = atLeast(1).values(expected, *otherExpected) - -/** - * Finishes the specification of the sophisticated `contains` assertion where the given regular expression [pattern] - * as well as the [otherPatterns] are expected to have a match, using a non disjoint search. - * - * By non disjoint is meant that `'aa'` in `'aaaa'` is found three times and not only two times. - * Also notice, that it does not search for unique matches. Meaning, if the input of the search is `'ab'` and [pattern] - * is defined as `'a(b)?'` and one of the [otherPatterns] is defined as `'a(b)?'` as well, then both match, even though - * they match the same sequence in the input of the search. Use an option such as [atLeast], [atMost] and [exactly] to - * control the number of occurrences you expect. - * - * Meaning you might want to use: - * `contains.exactly(2).regex('a(b)?')` - * instead of: - * `contains.atLeast(1).regex('a(b)?', 'a(b)?')` - * - * @param pattern The pattern which is expected to have a match against the input of the search. - * @param otherPatterns Additional patterns which are expected to have a match against the input of the search. - * - * @return The [AssertionPlant] for which the assertion was built to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated( - "Switch from api-cc-en_GB to api-fluent-en_GB; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.regex(pattern, *otherPatterns)", - "ch.tutteli.atrium.api.fluent.en_GB.regex" - ) -) -fun CharSequenceContains.CheckerOption.regex( - pattern: String, - vararg otherPatterns: String -): AssertionPlant = addAssertion(AssertImpl.charSequence.contains.regex(this, pattern glue otherPatterns)) - -/** - * Finishes the specification of the sophisticated `contains` assertion where the given regular expression [pattern] - * as well as the [otherPatterns] are expected to have a match (ignoring case), using a non disjoint search. - * - * By non disjoint is meant that `'aa'` in `'aaaa'` is found three times and not only two times. - * Also notice, that it does not search for unique matches. Meaning, if the input of the search is `'ab'` and [pattern] - * is defined as `'a(b)?'` and one of the [otherPatterns] is defined as `'a(b)?'` as well, then both match, even though - * they match the same sequence in the input of the search. Use an option such as [atLeast], [atMost] and [exactly] to - * control the number of occurrences you expect. - * - * Meaning you might want to use: - * `contains.ignoringCase.exactly(2).regex('a(b)?')` - * instead of: - * `contains.ignoringCase.atLeast(1).regex('a(b)?', 'a(b)?')` - * - * @param pattern The pattern which is expected to have a match against the input of the search. - * @param otherPatterns Additional patterns which are expected to have a match against the input of the search. - * - * @return The [AssertionPlant] for which the assertion was built to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@JvmName("regexIgnoringCase") -@Deprecated( - "Switch from api-cc-en_GB to api-fluent-en_GB; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.regex(pattern, *otherPatterns)", - "ch.tutteli.atrium.api.fluent.en_GB.regex" - ) -) -fun CharSequenceContains.CheckerOption.regex( - pattern: String, - vararg otherPatterns: String -): AssertionPlant = - addAssertion(AssertImpl.charSequence.contains.regexIgnoringCase(this, pattern glue otherPatterns)) - -/** - * Finishes the specification of the sophisticated `contains` assertion where the given regular expression [pattern] - * as well as the [otherPatterns] are expected to to have at least one match (ignoring case), - * using a non disjoint search. - * - * Delegates to `atLeast(1).regex(pattern, otherPatterns)` - * - * By non disjoint is meant that `'aa'` in `'aaaa'` is found three times and not only two times. - * Also notice, that it does not search for unique matches. Meaning, if the input of the search is `'ab'` and [pattern] - * is defined as `'a(b)?'` and one of the [otherPatterns] is defined as `'a(b)?'` as well, then both match, even though - * they match the same sequence in the input of the search. Use an option such as [atLeast], [atMost] and [exactly] - * to control the number of occurrences you expect. - * - * Meaning you might want to use: - * `contains.ignoringCase.exactly(2).regex('a(b)?')` - * instead of: - * `contains.ignoringCase.atLeast(1).regex('a(b)?', 'a(b)?')` - * - * @param pattern The pattern which is expected to have a match against the input of the search. - * @param otherPatterns Additional patterns which are expected to have a match against the input of the search. - * - * @return The [AssertionPlant] for which the assertion was built to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated( - "Switch from api-cc-en_GB to api-fluent-en_GB; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.regex(pattern, *otherPatterns)", - "ch.tutteli.atrium.api.fluent.en_GB.regex" - ) -) -fun CharSequenceContains.Builder.regex( - pattern: String, - vararg otherPatterns: String -): AssertionPlant = atLeast(1).regex(pattern, *otherPatterns) - -/** - * Helper method to simplify adding assertions to the plant which itself is stored in - * [CharSequenceContains.CheckerOption.containsBuilder]. - * - * @return The plant to support a fluent API. - */ -private fun CharSequenceContains.CheckerOption.addAssertion( - assertion: Assertion -): AssertionPlant = addAssertionForAssert(assertion) diff --git a/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/charSequenceContainsSearchBehaviours.kt b/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/charSequenceContainsSearchBehaviours.kt deleted file mode 100644 index 67466a4ac..000000000 --- a/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/charSequenceContainsSearchBehaviours.kt +++ /dev/null @@ -1,42 +0,0 @@ -@file:Suppress("DEPRECATION" /* will be removed with 1.0.0 */) -package ch.tutteli.atrium.api.cc.en_GB - -import ch.tutteli.atrium.api.cc.en_GB.creating.charsequence.contains.builders.NotCheckerOption -import ch.tutteli.atrium.api.cc.en_GB.creating.charsequence.contains.builders.impl.NotCheckerOptionImpl -import ch.tutteli.atrium.domain.builders.AssertImpl -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains -import ch.tutteli.atrium.domain.creating.charsequence.contains.searchbehaviours.IgnoringCaseSearchBehaviour -import ch.tutteli.atrium.domain.creating.charsequence.contains.searchbehaviours.NoOpSearchBehaviour -import ch.tutteli.atrium.domain.creating.charsequence.contains.searchbehaviours.NotSearchBehaviour - -/** - * Defines that the v behaviour `ignore case` shall be applied to this sophisticated `contains` assertion. - * - * @return The newly created builder. - */ -@Deprecated( - "Switch from api-cc-en_GB to api-fluent-en_GB; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.ignoringCase", - "ch.tutteli.atrium.api.fluent.en_GB.ignoringCase" - ) -) -val CharSequenceContains.Builder.ignoringCase - get() : CharSequenceContains.Builder - = AssertImpl.charSequence.contains.searchBehaviours.ignoringCase(this) - -/** - * Defines that the search behaviour `ignore case` shall be applied to this sophisticated `contains not` assertion. - * - * @return The newly created builder. - */ -@Deprecated( - "Switch from api-cc-en_GB to api-fluent-en_GB; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.ignoringCase", - "ch.tutteli.atrium.api.fluent.en_GB.ignoringCase" - ) -) -val NotCheckerOption.ignoringCase - get() : NotCheckerOption - = NotCheckerOptionImpl(containsBuilder.ignoringCase) diff --git a/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/collectionAssertions.kt b/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/collectionAssertions.kt deleted file mode 100644 index 6025b3322..000000000 --- a/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/collectionAssertions.kt +++ /dev/null @@ -1,105 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") -package ch.tutteli.atrium.api.cc.en_GB - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.domain.builders.AssertImpl - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject]'s [Collection.size] is [size]. - * - * Shortcut for `size.toBe(expectedSize)` depends on the underlying implementation though. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().hasSize(size).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.fluent.en_GB.hasSize" - ) -) -fun > Assert.hasSize(size: Int) - = addAssertion(AssertImpl.collection.hasSize(this, size)) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] is an empty [Collection]. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().isEmpty().asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.fluent.en_GB.isEmpty" - ) -) -fun > Assert.isEmpty() - = addAssertion(AssertImpl.collection.isEmpty(this)) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] is not an empty [Collection]. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().isNotEmpty().asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.fluent.en_GB.isNotEmpty" - ) -) -fun > Assert.isNotEmpty() - = addAssertion(AssertImpl.collection.isNotEmpty(this)) - -/** - * Creates an [AssertionPlant] for the [Assert.subject][SubjectProvider.subject]'s property - * [size][Collection.size] so that further fluent calls are assertions about it. - * - * Wrap it into Kotlin's [apply] if you want to make subsequent assertions on the current subject or use the overload - * which expects an assertionCreator lambda where sub assertions are evaluated together (form an assertion group block). - * - * @return The newly created [AssertionPlant]. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().size", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.api.fluent.en_GB.size" - ) -) -val Assert>.size get(): Assert = property(Collection<*>::size) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject]'s property [size][Collection.size] - * holds all assertions the given [assertionCreator] might create for it. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if a created [Assertion]s (by calling [assertionCreator]) - * does not hold. - * @throws IllegalArgumentException in case the given [assertionCreator] did not create a single assertion. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().size.asAssert(assertionCreator)", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.fluent.en_GB.size" - ) -) -fun > Assert.size(assertionCreator: Assert.() -> Unit): Assert - = addAssertion(AssertImpl.collection.size(this, assertionCreator)) diff --git a/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/comparableAssertions.kt b/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/comparableAssertions.kt deleted file mode 100644 index a5c797ccd..000000000 --- a/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/comparableAssertions.kt +++ /dev/null @@ -1,80 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") -package ch.tutteli.atrium.api.cc.en_GB - -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.domain.builders.AssertImpl - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] is less than [expected]. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().isLessThan(expected).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.fluent.en_GB.isLessThan" - ) -) -fun > Assert.isLessThan(expected: T) - = addAssertion(AssertImpl.comparable.isLessThan(this, expected)) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] is less than or equals [expected]. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().isLessThanOrEqual(expected).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.fluent.en_GB.isLessThanOrEqual" - ) -) -fun > Assert.isLessOrEquals(expected: T) - = addAssertion(AssertImpl.comparable.isLessOrEquals(this, expected)) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] is greater than [expected]. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().isGreaterThan(expected).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.fluent.en_GB.isGreaterThan" - ) -) -fun > Assert.isGreaterThan(expected: T) - = addAssertion(AssertImpl.comparable.isGreaterThan(this, expected)) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] is greater than or equals [expected]. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().isGreaterThanOrEqual(expected).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.fluent.en_GB.isGreaterThanOrEqual" - ) -) -fun > Assert.isGreaterOrEquals(expected: T) - = addAssertion(AssertImpl.comparable.isGreaterOrEquals(this, expected)) - diff --git a/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/creating/charsequence/contains/builders/AtLeastCheckerOption.kt b/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/creating/charsequence/contains/builders/AtLeastCheckerOption.kt deleted file mode 100644 index 92ae8874f..000000000 --- a/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/creating/charsequence/contains/builders/AtLeastCheckerOption.kt +++ /dev/null @@ -1,18 +0,0 @@ -//TODO remove with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.api.cc.en_GB.creating.charsequence.contains.builders - -import ch.tutteli.atrium.domain.builders.creating.charsequence.contains.builders.WithTimesCheckerOption -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains - -/** - * Represents the extension point for another option after a `contains at least`-check within a sophisticated - * `contains` assertion building process for [CharSequence]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - */ -@Deprecated("Switch from api-cc-en_GB to api-fluent-en_GB; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.") -interface AtLeastCheckerOption - : WithTimesCheckerOption diff --git a/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/creating/charsequence/contains/builders/AtMostCheckerOption.kt b/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/creating/charsequence/contains/builders/AtMostCheckerOption.kt deleted file mode 100644 index df57848c9..000000000 --- a/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/creating/charsequence/contains/builders/AtMostCheckerOption.kt +++ /dev/null @@ -1,17 +0,0 @@ -//TODO remove with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.api.cc.en_GB.creating.charsequence.contains.builders - -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains - -/** - * Represents the extension point for another option after a `contains at least once but at most`-check within - * a sophisticated `contains` assertion building process for [CharSequence]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - */ -@Deprecated("Switch from api-cc-en_GB to api-fluent-en_GB; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.") -interface AtMostCheckerOption - : CharSequenceContains.CheckerOption diff --git a/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/creating/charsequence/contains/builders/ButAtMostCheckerOption.kt b/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/creating/charsequence/contains/builders/ButAtMostCheckerOption.kt deleted file mode 100644 index bffbe43e2..000000000 --- a/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/creating/charsequence/contains/builders/ButAtMostCheckerOption.kt +++ /dev/null @@ -1,17 +0,0 @@ -//TODO remove with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.api.cc.en_GB.creating.charsequence.contains.builders - -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains - -/** - * Represents the extension point for another option after a `contains at least but at most`-check within - * a sophisticated `contains` assertion building process for [CharSequence]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - */ -@Deprecated("Switch from api-cc-en_GB to api-fluent-en_GB; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.") -interface ButAtMostCheckerOption - : CharSequenceContains.CheckerOption diff --git a/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/creating/charsequence/contains/builders/ExactlyCheckerOption.kt b/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/creating/charsequence/contains/builders/ExactlyCheckerOption.kt deleted file mode 100644 index aa28a6fc1..000000000 --- a/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/creating/charsequence/contains/builders/ExactlyCheckerOption.kt +++ /dev/null @@ -1,17 +0,0 @@ -//TODO remove with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.api.cc.en_GB.creating.charsequence.contains.builders - -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains - -/** - * Represents the extension point for another option after a `contains exactly`-check within - * a sophisticated `contains` assertion building process for [CharSequence]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - */ -@Deprecated("Switch from api-cc-en_GB to api-fluent-en_GB; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.") -interface ExactlyCheckerOption - : CharSequenceContains.CheckerOption diff --git a/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/creating/charsequence/contains/builders/NotCheckerOption.kt b/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/creating/charsequence/contains/builders/NotCheckerOption.kt deleted file mode 100644 index db7a14931..000000000 --- a/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/creating/charsequence/contains/builders/NotCheckerOption.kt +++ /dev/null @@ -1,17 +0,0 @@ -//TODO remove with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.api.cc.en_GB.creating.charsequence.contains.builders - -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains - -/** - * Represents the extension point for another option after a `contains not at all`-check within - * a sophisticated `contains` assertion building process for [CharSequence]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - */ -@Deprecated("Switch from api-cc-en_GB to api-fluent-en_GB; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.") -interface NotCheckerOption - : CharSequenceContains.CheckerOption diff --git a/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/creating/charsequence/contains/builders/NotOrAtMostCheckerOption.kt b/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/creating/charsequence/contains/builders/NotOrAtMostCheckerOption.kt deleted file mode 100644 index e831a3971..000000000 --- a/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/creating/charsequence/contains/builders/NotOrAtMostCheckerOption.kt +++ /dev/null @@ -1,17 +0,0 @@ -//TODO remove with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.api.cc.en_GB.creating.charsequence.contains.builders - -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains - -/** - * Represents the extension point for another option after a `contains not or at most`-check within - * a sophisticated `contains` assertion building process for [CharSequence]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - */ -@Deprecated("Switch from api-cc-en_GB to api-fluent-en_GB; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.") -interface NotOrAtMostCheckerOption - : CharSequenceContains.CheckerOption diff --git a/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/creating/charsequence/contains/builders/impl/AtLeastCheckerOptionImpl.kt b/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/creating/charsequence/contains/builders/impl/AtLeastCheckerOptionImpl.kt deleted file mode 100644 index f4e60604a..000000000 --- a/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/creating/charsequence/contains/builders/impl/AtLeastCheckerOptionImpl.kt +++ /dev/null @@ -1,30 +0,0 @@ -@file:Suppress("DEPRECATION" /* will be removed with 1.0.0 */) -package ch.tutteli.atrium.api.cc.en_GB.creating.charsequence.contains.builders.impl - -import ch.tutteli.atrium.api.cc.en_GB.atLeast -import ch.tutteli.atrium.api.cc.en_GB.creating.charsequence.contains.builders.AtLeastCheckerOption -import ch.tutteli.atrium.domain.builders.creating.charsequence.contains.builders.AtLeastCheckerOptionBase -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains - -/** - * Represents the builder of a `contains at least`-check within the fluent API of a sophisticated - * `contains` assertion for [CharSequence]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - * - * @constructor Represents the builder of a `contains at least` check within the fluent API of a sophisticated - * `contains` assertion for [CharSequence]. - * @param times The number which the check will compare against the actual number of times an expected object is - * found in the input of the search. - * @param containsBuilder The previously used [CharSequenceContains.Builder]. - */ -internal class AtLeastCheckerOptionImpl( - times: Int, - containsBuilder: CharSequenceContains.Builder -) : AtLeastCheckerOptionBase( - times, - containsBuilder, - nameContainsNotValuesFun(), - { "${containsBuilder::atLeast.name}($it)" } -), AtLeastCheckerOption diff --git a/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/creating/charsequence/contains/builders/impl/AtMostCheckerOptionImpl.kt b/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/creating/charsequence/contains/builders/impl/AtMostCheckerOptionImpl.kt deleted file mode 100644 index 8f471ac73..000000000 --- a/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/creating/charsequence/contains/builders/impl/AtMostCheckerOptionImpl.kt +++ /dev/null @@ -1,34 +0,0 @@ -@file:Suppress("DEPRECATION" /* will be removed with 1.0.0 */) -package ch.tutteli.atrium.api.cc.en_GB.creating.charsequence.contains.builders.impl - -import ch.tutteli.atrium.api.cc.en_GB.atLeast -import ch.tutteli.atrium.api.cc.en_GB.atMost -import ch.tutteli.atrium.api.cc.en_GB.creating.charsequence.contains.builders.AtMostCheckerOption -import ch.tutteli.atrium.api.cc.en_GB.exactly -import ch.tutteli.atrium.domain.builders.creating.charsequence.contains.builders.AtMostCheckerOptionBase -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains - -/** - * Represents the builder of a `contains at least once but at most` check within the fluent API of a - * sophisticated `contains` assertion for [CharSequence]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - * - * @constructor Represents the builder of a `contains at least once but at most` check within the fluent API of a - * sophisticated `contains` assertion for [CharSequence]. - * @param times The number which the check will compare against the actual number of times an expected object is - * found in the input of the search. - * @param containsBuilder The previously used [CharSequenceContains.Builder]. - */ -internal class AtMostCheckerOptionImpl( - times: Int, - containsBuilder: CharSequenceContains.Builder -) : AtMostCheckerOptionBase( - times, - containsBuilder, - nameContainsNotValuesFun(), - { "${containsBuilder::atMost.name}($it)" }, - { "${containsBuilder::atLeast.name}($it)" }, - { "${containsBuilder::exactly.name}($it)" } -), AtMostCheckerOption diff --git a/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/creating/charsequence/contains/builders/impl/ButAtMostCheckerOptionImpl.kt b/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/creating/charsequence/contains/builders/impl/ButAtMostCheckerOptionImpl.kt deleted file mode 100644 index bd24ad1e7..000000000 --- a/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/creating/charsequence/contains/builders/impl/ButAtMostCheckerOptionImpl.kt +++ /dev/null @@ -1,40 +0,0 @@ -@file:Suppress("DEPRECATION" /* will be removed with 1.0.0 */) -package ch.tutteli.atrium.api.cc.en_GB.creating.charsequence.contains.builders.impl - -import ch.tutteli.atrium.api.cc.en_GB.atLeast -import ch.tutteli.atrium.api.cc.en_GB.atMost -import ch.tutteli.atrium.api.cc.en_GB.butAtMost -import ch.tutteli.atrium.api.cc.en_GB.creating.charsequence.contains.builders.AtLeastCheckerOption -import ch.tutteli.atrium.api.cc.en_GB.creating.charsequence.contains.builders.ButAtMostCheckerOption -import ch.tutteli.atrium.api.cc.en_GB.exactly -import ch.tutteli.atrium.domain.builders.creating.charsequence.contains.builders.ButAtMostCheckerOptionBase -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains - -/** - * Represents the builder of the second step of a `contains at least but at most` check within the - * fluent API of a sophisticated `contains` assertion for [CharSequence]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied to the input of the search. - * - * @constructor Represents the builder of the second step of a `contains at least but at most` check within the - * fluent API of a sophisticated `contains` assertion for [CharSequence]. - * @param times The number which the check will compare against the actual number of times an expected object is - * found in the input of the search. - * @param containsBuilder The previously used [CharSequenceContains.Builder]. - */ -internal class ButAtMostCheckerOptionImpl( - times: Int, - atLeastBuilder: AtLeastCheckerOption, - containsBuilder: CharSequenceContains.Builder -) : ButAtMostCheckerOptionBase( - times, - atLeastBuilder, - containsBuilder, - nameContainsNotValuesFun(), - { l, u -> "${containsBuilder::atLeast.name}($l).${atLeastBuilder::butAtMost.name}($u)" }, - { "${containsBuilder::atMost.name}($it)" }, - { "${containsBuilder::atLeast.name}($it)" }, - { "${atLeastBuilder::butAtMost.name}($it)" }, - { "${containsBuilder::exactly.name}($it)" } -), ButAtMostCheckerOption diff --git a/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/creating/charsequence/contains/builders/impl/ExactlyCheckerOptionImpl.kt b/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/creating/charsequence/contains/builders/impl/ExactlyCheckerOptionImpl.kt deleted file mode 100644 index 5686c9c7e..000000000 --- a/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/creating/charsequence/contains/builders/impl/ExactlyCheckerOptionImpl.kt +++ /dev/null @@ -1,30 +0,0 @@ -@file:Suppress("DEPRECATION" /* will be removed with 1.0.0 */) -package ch.tutteli.atrium.api.cc.en_GB.creating.charsequence.contains.builders.impl - -import ch.tutteli.atrium.api.cc.en_GB.creating.charsequence.contains.builders.ExactlyCheckerOption -import ch.tutteli.atrium.api.cc.en_GB.exactly -import ch.tutteli.atrium.domain.builders.creating.charsequence.contains.builders.ExactlyCheckerOptionBase -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains - -/** - * Represents the builder of a `contains exactly` check within the fluent API of a sophisticated - * `contains` assertion for [CharSequence]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - * - * @constructor Represents the builder of a `contains exactly` check within the fluent API of a sophisticated - * `contains` assertion for [CharSequence]. - * @param times The number which the check will compare against the actual number of times an expected object is - * found in the input of the search. - * @param containsBuilder The previously used [CharSequenceContains.Builder]. - */ -internal class ExactlyCheckerOptionImpl( - times: Int, - containsBuilder: CharSequenceContains.Builder -) : ExactlyCheckerOptionBase( - times, - containsBuilder, - nameContainsNotValuesFun(), - { "${containsBuilder::exactly.name}($it)" } -), ExactlyCheckerOption diff --git a/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/creating/charsequence/contains/builders/impl/NotCheckerOptionImpl.kt b/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/creating/charsequence/contains/builders/impl/NotCheckerOptionImpl.kt deleted file mode 100644 index c7acf8e3d..000000000 --- a/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/creating/charsequence/contains/builders/impl/NotCheckerOptionImpl.kt +++ /dev/null @@ -1,22 +0,0 @@ -@file:Suppress("DEPRECATION" /* will be removed with 1.0.0 */) -package ch.tutteli.atrium.api.cc.en_GB.creating.charsequence.contains.builders.impl - -import ch.tutteli.atrium.api.cc.en_GB.creating.charsequence.contains.builders.NotCheckerOption -import ch.tutteli.atrium.domain.builders.creating.charsequence.contains.builders.NotCheckerOptionBase -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains - -/** - * Represents the builder of a `contains not at all` check within the fluent API of a sophisticated - * `contains` assertion for [CharSequence]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - * - * @constructor Represents the builder of a `contains not at all` check within the fluent API of a sophisticated - * `contains` assertion for [CharSequence]. - * @param containsBuilder The previously used [CharSequenceContains.Builder]. - */ -internal class NotCheckerOptionImpl( - containsBuilder: CharSequenceContains.Builder -) : NotCheckerOptionBase(containsBuilder), - NotCheckerOption diff --git a/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/creating/charsequence/contains/builders/impl/NotOrAtMostCheckerOptionImpl.kt b/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/creating/charsequence/contains/builders/impl/NotOrAtMostCheckerOptionImpl.kt deleted file mode 100644 index c8743408a..000000000 --- a/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/creating/charsequence/contains/builders/impl/NotOrAtMostCheckerOptionImpl.kt +++ /dev/null @@ -1,30 +0,0 @@ -@file:Suppress("DEPRECATION" /* will be removed with 1.0.0 */) -package ch.tutteli.atrium.api.cc.en_GB.creating.charsequence.contains.builders.impl - -import ch.tutteli.atrium.api.cc.en_GB.creating.charsequence.contains.builders.NotOrAtMostCheckerOption -import ch.tutteli.atrium.api.cc.en_GB.notOrAtMost -import ch.tutteli.atrium.domain.builders.creating.charsequence.contains.builders.NotOrAtMostCheckerOptionBase -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains - -/** - * Represents the builder of a `contains not or at most` check within the fluent API of a - * sophisticated `contains` assertion for [CharSequence]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - * - * @constructor Represents the builder of a `contains not or at most` check within the fluent API of a - * sophisticated `contains` assertion for [CharSequence]. - * @param times The number which the check will compare against the actual number of times an expected object is - * found in the input of the search. - * @param containsBuilder The previously used [CharSequenceContains.Builder]. - */ -internal class NotOrAtMostCheckerOptionImpl( - times: Int, - containsBuilder: CharSequenceContains.Builder -) : NotOrAtMostCheckerOptionBase( - times, - containsBuilder, - nameContainsNotValuesFun(), - { "${containsBuilder::notOrAtMost.name}($it)" } -), NotOrAtMostCheckerOption diff --git a/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/creating/charsequence/contains/builders/impl/nameContainsNotFun.kt b/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/creating/charsequence/contains/builders/impl/nameContainsNotFun.kt deleted file mode 100644 index df7741ea5..000000000 --- a/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/creating/charsequence/contains/builders/impl/nameContainsNotFun.kt +++ /dev/null @@ -1,11 +0,0 @@ -@file:Suppress("DEPRECATION" /* will be removed with 1.0.0 */) -package ch.tutteli.atrium.api.cc.en_GB.creating.charsequence.contains.builders.impl - -import ch.tutteli.atrium.api.cc.en_GB.containsNot -import ch.tutteli.atrium.creating.AssertionPlant -import kotlin.reflect.KFunction3 - -internal fun nameContainsNotValuesFun(): String { - val f: KFunction3, Any, Array, AssertionPlant> = AssertionPlant::containsNot - return f.name -} diff --git a/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/creating/iterable/contains/builders/AtLeastCheckerOption.kt b/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/creating/iterable/contains/builders/AtLeastCheckerOption.kt deleted file mode 100644 index 711fcfdc7..000000000 --- a/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/creating/iterable/contains/builders/AtLeastCheckerOption.kt +++ /dev/null @@ -1,18 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.api.cc.en_GB.creating.iterable.contains.builders - -import ch.tutteli.atrium.domain.builders.creating.iterable.contains.builders.WithTimesCheckerOption -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains - -/** - * Represents the extension point for another option after a `contains at least`-check within a sophisticated - * `contains` assertion building process for [Iterable]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - */ -@Deprecated("Switch from api-cc-en_GB to api-fluent-en_GB; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.") -interface AtLeastCheckerOption, out S : IterableContains.SearchBehaviour> - : WithTimesCheckerOption diff --git a/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/creating/iterable/contains/builders/AtMostCheckerOption.kt b/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/creating/iterable/contains/builders/AtMostCheckerOption.kt deleted file mode 100644 index daf9e3bf9..000000000 --- a/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/creating/iterable/contains/builders/AtMostCheckerOption.kt +++ /dev/null @@ -1,18 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.api.cc.en_GB.creating.iterable.contains.builders - -import ch.tutteli.atrium.domain.builders.creating.iterable.contains.builders.WithTimesCheckerOption -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains - -/** - * Represents the extension point for another option after a `contains at least once but at most`-check within - * a sophisticated `contains` assertion building process for [Iterable]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - */ -@Deprecated("Switch from api-cc-en_GB to api-fluent-en_GB; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.") -interface AtMostCheckerOption, out S : IterableContains.SearchBehaviour> - : WithTimesCheckerOption diff --git a/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/creating/iterable/contains/builders/ButAtMostCheckerOption.kt b/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/creating/iterable/contains/builders/ButAtMostCheckerOption.kt deleted file mode 100644 index 812172dc9..000000000 --- a/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/creating/iterable/contains/builders/ButAtMostCheckerOption.kt +++ /dev/null @@ -1,17 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION") -package ch.tutteli.atrium.api.cc.en_GB.creating.iterable.contains.builders - -import ch.tutteli.atrium.domain.builders.creating.iterable.contains.builders.WithTimesCheckerOption -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains - -/** - * Represents the extension point for another option after a `contains at least but at most`-check within a - * sophisticated `contains` assertion building process for [Iterable]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - */ -@Deprecated("Switch from api-cc-en_GB to api-fluent-en_GB; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.") -interface ButAtMostCheckerOption, out S : IterableContains.SearchBehaviour> - : WithTimesCheckerOption diff --git a/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/creating/iterable/contains/builders/ExactlyCheckerOption.kt b/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/creating/iterable/contains/builders/ExactlyCheckerOption.kt deleted file mode 100644 index 14ef6b649..000000000 --- a/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/creating/iterable/contains/builders/ExactlyCheckerOption.kt +++ /dev/null @@ -1,18 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.api.cc.en_GB.creating.iterable.contains.builders - -import ch.tutteli.atrium.domain.builders.creating.iterable.contains.builders.WithTimesCheckerOption -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains - -/** - * Represents the extension point for another option after a `contains exactly`-check within - * a sophisticated `contains` assertion building process for [Iterable]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - */ -@Deprecated("Switch from api-cc-en_GB to api-fluent-en_GB; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.") -interface ExactlyCheckerOption, out S : IterableContains.SearchBehaviour> - : WithTimesCheckerOption diff --git a/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/creating/iterable/contains/builders/NotCheckerOption.kt b/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/creating/iterable/contains/builders/NotCheckerOption.kt deleted file mode 100644 index fa19c2b12..000000000 --- a/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/creating/iterable/contains/builders/NotCheckerOption.kt +++ /dev/null @@ -1,17 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.api.cc.en_GB.creating.iterable.contains.builders - -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains - -/** - * Represents the extension point for another option after a `contains not at all`-check within - * a sophisticated `contains` assertion building process for [Iterable]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - */ -@Deprecated("Switch from api-cc-en_GB to api-fluent-en_GB; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.") -interface NotCheckerOption, out S : IterableContains.SearchBehaviour> - : IterableContains.CheckerOption diff --git a/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/creating/iterable/contains/builders/NotOrAtMostCheckerOption.kt b/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/creating/iterable/contains/builders/NotOrAtMostCheckerOption.kt deleted file mode 100644 index 545df31c4..000000000 --- a/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/creating/iterable/contains/builders/NotOrAtMostCheckerOption.kt +++ /dev/null @@ -1,18 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.api.cc.en_GB.creating.iterable.contains.builders - -import ch.tutteli.atrium.domain.builders.creating.iterable.contains.builders.WithTimesCheckerOption -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains - -/** - * Represents the extension point for another option after a `contains not or at most`-check within - * a sophisticated `contains` assertion building process for [Iterable]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - */ -@Deprecated("Switch from api-cc-en_GB to api-fluent-en_GB; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.") -interface NotOrAtMostCheckerOption, out S : IterableContains.SearchBehaviour> - : WithTimesCheckerOption diff --git a/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/creating/iterable/contains/builders/impl/AtLeastCheckerOptionImpl.kt b/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/creating/iterable/contains/builders/impl/AtLeastCheckerOptionImpl.kt deleted file mode 100644 index 9719e3986..000000000 --- a/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/creating/iterable/contains/builders/impl/AtLeastCheckerOptionImpl.kt +++ /dev/null @@ -1,30 +0,0 @@ -@file:Suppress("DEPRECATION" /* will be removed with 1.0.0 */) -package ch.tutteli.atrium.api.cc.en_GB.creating.iterable.contains.builders.impl - -import ch.tutteli.atrium.api.cc.en_GB.atLeast -import ch.tutteli.atrium.api.cc.en_GB.creating.iterable.contains.builders.AtLeastCheckerOption -import ch.tutteli.atrium.domain.builders.creating.iterable.contains.builders.AtLeastCheckerOptionBase -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InAnyOrderSearchBehaviour - -/** - * Represents the builder of a `contains at least` check within the fluent API of a sophisticated - * `contains` assertion for [Iterable]. - * - * @param T The input type of the search. - * - * @constructor Represents the builder of a `contains at least` check within the fluent API of a sophisticated - * `contains` assertion for [Iterable]. - * @param times The number which the check will compare against the actual number of times an expected entry is - * found in the [Iterable]. - * @param containsBuilder The previously used [IterableContains.Builder]. - */ -internal class AtLeastCheckerOptionImpl, out S : InAnyOrderSearchBehaviour>( - times: Int, - containsBuilder: IterableContains.Builder -) : AtLeastCheckerOptionBase( - times, - containsBuilder, - nameContainsNotValuesFun(), - { "${containsBuilder::atLeast.name}($it)" } -), AtLeastCheckerOption diff --git a/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/creating/iterable/contains/builders/impl/AtMostCheckerOptionImpl.kt b/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/creating/iterable/contains/builders/impl/AtMostCheckerOptionImpl.kt deleted file mode 100644 index 5b9e66d39..000000000 --- a/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/creating/iterable/contains/builders/impl/AtMostCheckerOptionImpl.kt +++ /dev/null @@ -1,34 +0,0 @@ -@file:Suppress("DEPRECATION" /* will be removed with 1.0.0 */) -package ch.tutteli.atrium.api.cc.en_GB.creating.iterable.contains.builders.impl - -import ch.tutteli.atrium.api.cc.en_GB.atLeast -import ch.tutteli.atrium.api.cc.en_GB.atMost -import ch.tutteli.atrium.api.cc.en_GB.creating.iterable.contains.builders.AtMostCheckerOption -import ch.tutteli.atrium.api.cc.en_GB.exactly -import ch.tutteli.atrium.domain.builders.creating.iterable.contains.builders.AtMostCheckerOptionBase -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InAnyOrderSearchBehaviour - -/** - * Represents the builder of a `contains at least once but at most` check within the fluent API of a - * sophisticated `contains` assertion for [Iterable]. - * - * @param T The input type of the search. - * - * @constructor Represents the builder of a `contains at least once but at most` check within the fluent API of a - * sophisticated `contains` assertion for [Iterable]. - * @param times The number which the check will compare against the actual number of times an expected entry is - * found in the [Iterable]. - * @param containsBuilder The previously used [IterableContains.Builder]. - */ -internal class AtMostCheckerOptionImpl, out S : InAnyOrderSearchBehaviour>( - times: Int, - containsBuilder: IterableContains.Builder -) : AtMostCheckerOptionBase( - times, - containsBuilder, - nameContainsNotValuesFun(), - { "${containsBuilder::atMost.name}($it)" }, - { "${containsBuilder::atLeast.name}($it)" }, - { "${containsBuilder::exactly.name}($it)" } -), AtMostCheckerOption diff --git a/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/creating/iterable/contains/builders/impl/ButAtMostCheckerOptionImpl.kt b/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/creating/iterable/contains/builders/impl/ButAtMostCheckerOptionImpl.kt deleted file mode 100644 index 1f561eb56..000000000 --- a/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/creating/iterable/contains/builders/impl/ButAtMostCheckerOptionImpl.kt +++ /dev/null @@ -1,40 +0,0 @@ -@file:Suppress("DEPRECATION" /* will be removed with 1.0.0 */) -package ch.tutteli.atrium.api.cc.en_GB.creating.iterable.contains.builders.impl - -import ch.tutteli.atrium.api.cc.en_GB.atLeast -import ch.tutteli.atrium.api.cc.en_GB.atMost -import ch.tutteli.atrium.api.cc.en_GB.butAtMost -import ch.tutteli.atrium.api.cc.en_GB.creating.iterable.contains.builders.AtLeastCheckerOption -import ch.tutteli.atrium.api.cc.en_GB.creating.iterable.contains.builders.ButAtMostCheckerOption -import ch.tutteli.atrium.api.cc.en_GB.exactly -import ch.tutteli.atrium.domain.builders.creating.iterable.contains.builders.ButAtMostCheckerOptionBase -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InAnyOrderSearchBehaviour - -/** - * Represents the builder of the second step of a `contains at least but at most` check within the - * fluent API of a sophisticated `contains` assertion for [Iterable]. - * - * @param T The input type of the search. - * - * @constructor Represents the builder of the second step of a `contains at least but at most` check within the - * fluent API of a sophisticated `contains` assertion for [Iterable]. - * @param times The number which the check will compare against the actual number of times an expected entry is - * found in the [Iterable]. - * @param containsBuilder The previously used [IterableContains.Builder]. - */ -internal class ButAtMostCheckerOptionImpl, out S : InAnyOrderSearchBehaviour>( - times: Int, - atLeastBuilder: AtLeastCheckerOption, - containsBuilder: IterableContains.Builder -) : ButAtMostCheckerOptionBase( - times, - atLeastBuilder, - containsBuilder, - nameContainsNotValuesFun(), - { l, u -> "${containsBuilder::atLeast.name}($l).${atLeastBuilder::butAtMost.name}($u)" }, - { "${containsBuilder::atMost.name}($it)" }, - { "${containsBuilder::atLeast.name}($it)" }, - { "${atLeastBuilder::butAtMost.name}($it)" }, - { "${containsBuilder::exactly.name}($it)" } -), ButAtMostCheckerOption diff --git a/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/creating/iterable/contains/builders/impl/ExactlyCheckerOptionImpl.kt b/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/creating/iterable/contains/builders/impl/ExactlyCheckerOptionImpl.kt deleted file mode 100644 index d283bee7d..000000000 --- a/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/creating/iterable/contains/builders/impl/ExactlyCheckerOptionImpl.kt +++ /dev/null @@ -1,30 +0,0 @@ -@file:Suppress("DEPRECATION" /* will be removed with 1.0.0 */) -package ch.tutteli.atrium.api.cc.en_GB.creating.iterable.contains.builders.impl - -import ch.tutteli.atrium.api.cc.en_GB.creating.iterable.contains.builders.ExactlyCheckerOption -import ch.tutteli.atrium.api.cc.en_GB.exactly -import ch.tutteli.atrium.domain.builders.creating.iterable.contains.builders.ExactlyCheckerOptionBase -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InAnyOrderSearchBehaviour - -/** - * Represents the builder of a `contains exactly` check within the fluent API of a sophisticated - * `contains` assertion for [Iterable]. - * - * @param T The input type of the search. - * - * @constructor Represents the builder of a `contains exactly` check within the fluent API of a sophisticated - * `contains` assertion for [Iterable]. - * @param times The number which the check will compare against the actual number of times an expected entry is - * found in the [Iterable]. - * @param containsBuilder The previously used [IterableContains.Builder]. - */ -internal class ExactlyCheckerOptionImpl, out S : InAnyOrderSearchBehaviour>( - times: Int, - containsBuilder: IterableContains.Builder -) : ExactlyCheckerOptionBase( - times, - containsBuilder, - nameContainsNotValuesFun(), - { "${containsBuilder::exactly.name}($it)" } -), ExactlyCheckerOption diff --git a/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/creating/iterable/contains/builders/impl/NotCheckerOptionImpl.kt b/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/creating/iterable/contains/builders/impl/NotCheckerOptionImpl.kt deleted file mode 100644 index 7f24cbfe4..000000000 --- a/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/creating/iterable/contains/builders/impl/NotCheckerOptionImpl.kt +++ /dev/null @@ -1,23 +0,0 @@ -@file:Suppress("DEPRECATION" /* will be removed with 1.0.0 */) -package ch.tutteli.atrium.api.cc.en_GB.creating.iterable.contains.builders.impl - -import ch.tutteli.atrium.api.cc.en_GB.creating.iterable.contains.builders.NotCheckerOption -import ch.tutteli.atrium.domain.builders.creating.iterable.contains.builders.NotCheckerOptionBase -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InAnyOrderSearchBehaviour - -/** - * Represents the builder of a `contains not at all` check within the fluent API of a sophisticated - * `contains` assertion for [Iterable]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - * - * @constructor Represents the builder of a `contains not at all` check within the fluent API of a sophisticated - * `contains not` assertion for [Iterable]. - * @param containsBuilder The previously used [IterableContains.Builder]. - */ -internal class NotCheckerOptionImpl, out S : InAnyOrderSearchBehaviour>( - containsBuilder: IterableContains.Builder -) : NotCheckerOptionBase(containsBuilder), - NotCheckerOption diff --git a/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/creating/iterable/contains/builders/impl/NotOrAtMostCheckerOptionImpl.kt b/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/creating/iterable/contains/builders/impl/NotOrAtMostCheckerOptionImpl.kt deleted file mode 100644 index d59783a28..000000000 --- a/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/creating/iterable/contains/builders/impl/NotOrAtMostCheckerOptionImpl.kt +++ /dev/null @@ -1,30 +0,0 @@ -@file:Suppress("DEPRECATION" /* will be removed with 1.0.0 */) -package ch.tutteli.atrium.api.cc.en_GB.creating.iterable.contains.builders.impl - -import ch.tutteli.atrium.api.cc.en_GB.creating.iterable.contains.builders.NotOrAtMostCheckerOption -import ch.tutteli.atrium.api.cc.en_GB.notOrAtMost -import ch.tutteli.atrium.domain.builders.creating.iterable.contains.builders.NotOrAtMostCheckerOptionBase -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InAnyOrderSearchBehaviour - -/** - * Represents the builder of a `contains not or at most` check within the fluent API of a - * sophisticated `contains` assertion for [Iterable]. - * - * @param T The input type of the search. - * - * @constructor Represents the builder of a `contains at least once but at most` check within the fluent API of a - * sophisticated `contains` assertion for [Iterable]. - * @param times The number which the check will compare against the actual number of times an expected entry is - * found in the [Iterable]. - * @param containsBuilder The previously used [IterableContains.Builder]. - */ -internal class NotOrAtMostCheckerOptionImpl, out S : InAnyOrderSearchBehaviour>( - times: Int, - containsBuilder: IterableContains.Builder -) : NotOrAtMostCheckerOptionBase( - times, - containsBuilder, - nameContainsNotValuesFun(), - { "${containsBuilder::notOrAtMost.name}($it)" } -), NotOrAtMostCheckerOption diff --git a/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/creating/iterable/contains/builders/impl/nameContainsNotFun.kt b/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/creating/iterable/contains/builders/impl/nameContainsNotFun.kt deleted file mode 100644 index 817ca65b8..000000000 --- a/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/creating/iterable/contains/builders/impl/nameContainsNotFun.kt +++ /dev/null @@ -1,12 +0,0 @@ -@file:Suppress("DEPRECATION" /* will be removed with 1.0.0 */) -package ch.tutteli.atrium.api.cc.en_GB.creating.iterable.contains.builders.impl - -import ch.tutteli.atrium.api.cc.en_GB.containsNot -import ch.tutteli.atrium.creating.AssertionPlant -import kotlin.reflect.KFunction3 - -internal fun nameContainsNotValuesFun(): String { - val f: KFunction3>, Double, Array, AssertionPlant>> = - AssertionPlant>::containsNot - return f.name -} diff --git a/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/featureAssertions.kt b/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/featureAssertions.kt deleted file mode 100644 index a54b75352..000000000 --- a/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/featureAssertions.kt +++ /dev/null @@ -1,1017 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") -package ch.tutteli.atrium.api.cc.en_GB - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.assertions.AssertionGroup -import ch.tutteli.atrium.assertions.FeatureAssertionGroupType -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.creating.AssertionPlantNullable -import ch.tutteli.atrium.creating.CollectingAssertionPlant -import ch.tutteli.atrium.domain.builders.AssertImpl -import ch.tutteli.atrium.domain.builders.creating.PleaseUseReplacementException -import kotlin.reflect.* -import kotlin.jvm.JvmName - -/** - * Creates an [AssertionPlant] for the given [property] which eventually adds [AssertionGroup]s with a - * [FeatureAssertionGroupType], containing the assertions created for the given [property], to the current plant. - * - * @return An [AssertionPlant] for the given [property]. - */ -@Deprecated( - "Switch from Assert to Expect and use feature instead; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().feature { f(property) }.asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.fluent.en_GB.feature" - ) -) -fun Assert.property(property: KProperty0): AssertionPlant - = AssertImpl.feature.property(this, property) - -@Suppress("DeprecatedCallableAddReplaceWith", "unused", "UNUSED_PARAMETER") -@Deprecated("Use the overload with KProperty1 instead, this way you do not access `subject` too early. Use `YourClass::property` instead of `subject::property`") -fun CollectingAssertionPlant.property(property: KProperty0): AssertionPlant - = throw PleaseUseReplacementException("Use the overload with KProperty1 instead, this way you do not access `subject` too early. Use `YourClass::property` instead of `subject::property`") - -/** - * Creates an [AssertionPlant] for the given [property] which eventually adds [AssertionGroup]s with a - * [FeatureAssertionGroupType], containing the assertions created for the given [property], to the current plant. - * - * @return An [AssertionPlant] for the given [property]. - */ -@Deprecated( - "Switch from Assert to Expect and use feature instead; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().feature(property).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.fluent.en_GB.feature" - ) -) -fun Assert.property(property: KProperty1): AssertionPlant - = AssertImpl.feature.property(this, property) - - -/** - * Creates an [AssertionPlant] for the given [property] which eventually adds [AssertionGroup]s with a - * [FeatureAssertionGroupType], containing the assertions created for the given [property], to the current plant -- - * starting with a group consisting of the [Assertion]s created by the [assertionCreator] lambda. - * - * @return An [AssertionPlant] for the given [property]. - * - * @throws AssertionError Might throw an [AssertionError] if an additionally created [Assertion] - * (by calling [assertionCreator]) does not hold. - */ -@Deprecated( - "Switch from Assert to Expect and use feature instead; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().feature({ f(property) }, { asAssert(assertionCreator) }).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.fluent.en_GB.feature" - ) -) -fun Assert.property(property: KProperty0, assertionCreator: Assert.() -> Unit): AssertionPlant - = AssertImpl.feature.property(this, property, assertionCreator) - -@Suppress("DeprecatedCallableAddReplaceWith", "unused", "UNUSED_PARAMETER") -@Deprecated("Use the overload with KProperty1 instead, this way you do not access `subject` too early. Use `YourClass::property` instead of `subject::property`") -fun CollectingAssertionPlant.property(property: KProperty0, assertionCreator: Assert.() -> Unit): AssertionPlant - = throw PleaseUseReplacementException("Use the overload with KProperty1 instead, this way you do not access `subject` too early. Use `YourClass::property` instead of `subject::property`") - -/** - * Creates an [AssertionPlant] for the given [property] which eventually adds [AssertionGroup]s with a - * [FeatureAssertionGroupType], containing the assertions created for the given [property], to the current plant -- - * starting with a group consisting of the [Assertion]s created by the [assertionCreator] lambda. - * - * @return An [AssertionPlant] for the given [property]. - * - * @throws AssertionError Might throw an [AssertionError] if an additionally created [Assertion] - * (by calling [assertionCreator]) does not hold. - */ -@Deprecated( - "Switch from Assert to Expect and use feature instead; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().feature(property, { asAssert(assertionCreator) }).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.fluent.en_GB.feature" - ) -) -fun Assert.property(property: KProperty1, assertionCreator: Assert.() -> Unit): AssertionPlant - = AssertImpl.feature.property(this, property, assertionCreator) - - -/** - * Creates an [AssertionPlantNullable] for the given [property] which eventually adds [AssertionGroup]s with a - * [FeatureAssertionGroupType], containing the assertions created for the given [property], to the current plant. - * - * @return An [AssertionPlantNullable] for the given [property]. - */ -@Deprecated( - "Switch from Assert to Expect and use feature instead; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().feature { f(property) }.asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.fluent.en_GB.feature" - ) -) -fun Assert.property(property: KProperty0): AssertionPlantNullable - = AssertImpl.feature.property(this, property) - -@Suppress("DeprecatedCallableAddReplaceWith", "unused", "UNUSED_PARAMETER") -@Deprecated("Use the overload with KProperty1 instead, this way you do not access `subject` too early. Use `YourClass::property` instead of `subject::property`") -fun CollectingAssertionPlant.property(property: KProperty0): AssertionPlantNullable - = throw PleaseUseReplacementException("Use the overload with KProperty1 instead, this way you do not access `subject` too early. Use `YourClass::property` instead of `subject::property`") - -/** - * Creates an [AssertionPlantNullable] for the given [property] which eventually adds [AssertionGroup]s with a - * [FeatureAssertionGroupType], containing the assertions created for the given [property], to the current plant. - * - * @return An [AssertionPlantNullable] for the given [property]. - */ -@Deprecated( - "Switch from Assert to Expect and use feature instead; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().feature(property).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.fluent.en_GB.feature" - ) -) -fun Assert.property(property: KProperty1): AssertionPlantNullable - = AssertImpl.feature.property(this, property) - - -// Arg 0 ---------------------------------------------------------------------------- - -/** - * Creates an [AssertionPlant], for the value returned by calling [method], which eventually adds [AssertionGroup]s - * with a [FeatureAssertionGroupType], containing the assertions created for the return value, to the current plant. - * - * @return An [AssertionPlant] for the return value of the given [method]. - */ -@Deprecated( - "Switch from Assert to Expect and use feature instead; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().feature { f(method) }.asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.fluent.en_GB.feature" - ) -) -fun Assert.returnValueOf(method: KFunction0): AssertionPlant - = AssertImpl.feature.returnValueOf0(this, method) - -@Suppress("DeprecatedCallableAddReplaceWith", "unused", "UNUSED_PARAMETER") -@Deprecated("Use the overload with KFunction1 instead, this way you do not access `subject` too early. Use `YourClass::property` instead of `subject::property`") -fun CollectingAssertionPlant.returnValueOf(method: KFunction0): AssertionPlant - = throw PleaseUseReplacementException("Use the overload with KFunction1 instead, this way you do not access `subject` too early. Use `YourClass::property` instead of `subject::property`") - -/** - * Creates an [AssertionPlant], for the value returned by calling [method], which eventually adds [AssertionGroup]s - * with a [FeatureAssertionGroupType], containing the assertions created for the return value, to the current plant. - * - * @return An [AssertionPlant] for the return value of the given [method]. - */ -@JvmName("safeReturnValueOf") -@Deprecated( - "Switch from Assert to Expect and use feature instead; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().feature(method).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.fluent.en_GB.feature" - ) -) -fun Assert.returnValueOf(method: KFunction1): AssertionPlant - = AssertImpl.feature.returnValueOf0(this, method) - - -/** - * Creates an [AssertionPlant], for the value returned by calling [method], which eventually adds - * [AssertionGroup]s with a [FeatureAssertionGroupType], containing the assertions created for the return value, - * to the current plant -- starting with a group consisting of the [Assertion]s created by the - * [assertionCreator] lambda. - * - * @return An [AssertionPlant] for the return value of the given [method]. - * - * @throws AssertionError Might throw an [AssertionError] if an additionally created [Assertion] - * (by calling [assertionCreator]) does not hold. - */ -@Deprecated( - "Switch from Assert to Expect and use feature instead; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().feature({ f(method) }, { asAssert(assertionCreator) }).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.fluent.en_GB.feature" - ) -) -fun Assert.returnValueOf(method: KFunction0, assertionCreator: Assert.() -> Unit): AssertionPlant - = AssertImpl.feature.returnValueOf0(this, method, assertionCreator) - -@Suppress("DeprecatedCallableAddReplaceWith", "unused", "UNUSED_PARAMETER") -@Deprecated("Use the overload with KFunction1 instead, this way you do not access `subject` too early. Use `YourClass::property` instead of `subject::property`") -fun CollectingAssertionPlant.returnValueOf(method: KFunction0, assertionCreator: Assert.() -> Unit): AssertionPlant - = throw PleaseUseReplacementException("Use the overload with KFunction1 instead, this way you do not access `subject` too early. Use `YourClass::property` instead of `subject::property`") - -/** - * Creates an [AssertionPlant], for the value returned by calling [method], which eventually adds - * [AssertionGroup]s with a [FeatureAssertionGroupType], containing the assertions created for the return value, - * to the current plant -- starting with a group consisting of the [Assertion]s created by the - * [assertionCreator] lambda. - * - * @return An [AssertionPlant] for the return value of the given [method]. - * - * @throws AssertionError Might throw an [AssertionError] if an additionally created [Assertion] - * (by calling [assertionCreator]) does not hold. - */ -@JvmName("safeReturnValueOf") -@Deprecated( - "Switch from Assert to Expect and use feature instead; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().feature(method, { asAssert(assertionCreator) }).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.fluent.en_GB.feature" - ) -) -fun Assert.returnValueOf(method: KFunction1, assertionCreator: Assert.() -> Unit): AssertionPlant - = AssertImpl.feature.returnValueOf0(this, method, assertionCreator) - - -/** - * Creates an [AssertionPlantNullable], for the value returned by calling [method], which eventually adds - * [AssertionGroup]s with a [FeatureAssertionGroupType], containing the assertions created for the return value, - * to the current plant. - * - * @return An [AssertionPlantNullable] for the given [property]. - */ -@Deprecated( - "Switch from Assert to Expect and use feature instead; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().feature { f(method) }.asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.fluent.en_GB.feature" - ) -) -fun Assert.returnValueOf(method: KFunction0): AssertionPlantNullable - = AssertImpl.feature.returnValueOf0(this, method) - -@Suppress("DeprecatedCallableAddReplaceWith", "unused", "UNUSED_PARAMETER") -@Deprecated("Use the overload with KFunction1 instead, this way you do not access `subject` too early. Use `YourClass::property` instead of `subject::property`") -fun CollectingAssertionPlant.returnValueOf(method: KFunction0): AssertionPlantNullable - = throw PleaseUseReplacementException("Use the overload with KFunction1 instead, this way you do not access `subject` too early. Use `YourClass::property` instead of `subject::property`") - -/** - * Creates an [AssertionPlantNullable], for the value returned by calling [method], which eventually adds - * [AssertionGroup]s with a [FeatureAssertionGroupType], containing the assertions created for the return value, - * to the current plant. - * - * @return An [AssertionPlantNullable] for the given [property]. - */ -@JvmName("safeReturnValueOf") -@Deprecated( - "Switch from Assert to Expect and use feature instead; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().feature(method).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.fluent.en_GB.feature" - ) -) -fun Assert.returnValueOf(method: KFunction1): AssertionPlantNullable - = AssertImpl.feature.returnValueOf0(this, method) - - -// Arg 1 ---------------------------------------------------------------------------- - -/** - * Creates an [AssertionPlant], for the value returned by calling [method] with [arg1], which eventually adds - * [AssertionGroup]s with a [FeatureAssertionGroupType], containing the assertions created for the return value, - * to the current plant. - * - * @return An [AssertionPlant] for the return value of the given [method]. - */ -@Deprecated( - "Switch from Assert to Expect and use feature instead; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().feature { f(method, arg1) }.asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.fluent.en_GB.feature" - ) -) -fun Assert.returnValueOf(method: KFunction1, arg1: T1): AssertionPlant - = AssertImpl.feature.returnValueOf1(this, method, arg1) - -@Suppress("DeprecatedCallableAddReplaceWith", "unused", "UNUSED_PARAMETER") -@Deprecated("Use the overload with KFunction2 instead, this way you do not access `subject` too early. Use `YourClass::property` instead of `subject::property`") -fun CollectingAssertionPlant.returnValueOf(method: KFunction1, arg1: T1): AssertionPlant - = throw PleaseUseReplacementException("Use the overload with KFunction2 instead, this way you do not access `subject` too early. Use `YourClass::property` instead of `subject::property`") - -/** - * Creates an [AssertionPlant], for the value returned by calling [method] with [arg1], which eventually adds - * [AssertionGroup]s with a [FeatureAssertionGroupType], containing the assertions created for the return value, - * to the current plant. - * - * @return An [AssertionPlant] for the return value of the given [method]. - */ -@JvmName("safeReturnValueOf") -//TODO deprecate as soon as https://youtrack.jetbrains.com/issue/KT-33398 is fixed -//@Deprecated( -// "Switch from Assert to Expect and use feature instead; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", -// ReplaceWith( -// "this.asExpect().feature(method, arg1).asAssert()", -// "ch.tutteli.atrium.domain.builders.migration.asExpect", -// "ch.tutteli.atrium.domain.builders.migration.asAssert", -// "ch.tutteli.atrium.api.fluent.en_GB.feature" -// ) -//) -fun Assert.returnValueOf(method: KFunction2, arg1: T1): AssertionPlant - = AssertImpl.feature.returnValueOf1(this, method, arg1) - - -/** - * Creates an [AssertionPlant], for the value returned by calling [method] with [arg1], which eventually adds - * [AssertionGroup]s with a [FeatureAssertionGroupType], containing the assertions created for the return value, - * to the current plant -- starting with a group consisting of the [Assertion]s created by the - * [assertionCreator] lambda. - * - * @return An [AssertionPlant] for the return value of the given [method]. - * - * @throws AssertionError Might throw an [AssertionError] if an additionally created [Assertion] - * (by calling [assertionCreator]) does not hold. - */ -@Deprecated( - "Switch from Assert to Expect and use feature instead; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().feature({ f(method, arg1) }, { asAssert(assertionCreator) }).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.fluent.en_GB.feature" - ) -) -fun Assert.returnValueOf(method: KFunction1, arg1: T1, assertionCreator: Assert.() -> Unit): AssertionPlant - = AssertImpl.feature.returnValueOf1(this, method, arg1, assertionCreator) - -@Suppress("DeprecatedCallableAddReplaceWith", "unused", "UNUSED_PARAMETER") -@Deprecated("Use the overload with KFunction2 instead, this way you do not access `subject` too early. Use `YourClass::property` instead of `subject::property`") -fun CollectingAssertionPlant.returnValueOf(method: KFunction1, arg1: T1, assertionCreator: Assert.() -> Unit): AssertionPlant - = throw PleaseUseReplacementException("Use the overload with KFunction2 instead, this way you do not access `subject` too early. Use `YourClass::property` instead of `subject::property`") - -/** - * Creates an [AssertionPlant], for the value returned by calling [method] with [arg1], which eventually adds - * [AssertionGroup]s with a [FeatureAssertionGroupType], containing the assertions created for the return value, - * to the current plant -- starting with a group consisting of the [Assertion]s created by the - * [assertionCreator] lambda. - * - * @return An [AssertionPlant] for the return value of the given [method]. - * - * @throws AssertionError Might throw an [AssertionError] if an additionally created [Assertion] - * (by calling [assertionCreator]) does not hold. - */ -@JvmName("safeReturnValueOf") -@Deprecated( - "Switch from Assert to Expect and use feature instead; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().feature(method, arg1, { asAssert(assertionCreator) }).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.fluent.en_GB.feature" - ) -) -fun Assert.returnValueOf(method: KFunction2, arg1: T1, assertionCreator: Assert.() -> Unit): AssertionPlant - = AssertImpl.feature.returnValueOf1(this, method, arg1, assertionCreator) - - -/** - * Creates an [AssertionPlantNullable], for the value returned by calling [method] with [arg1], which eventually adds - * [AssertionGroup]s with a [FeatureAssertionGroupType], containing the assertions created for the return value, - * to the current plant. - * - * @return An [AssertionPlantNullable] for the given [property]. - */ -@Deprecated( - "Switch from Assert to Expect and use feature instead; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().feature { f(method, arg1) }.asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.fluent.en_GB.feature" - ) -) -fun Assert.returnValueOf(method: KFunction1, arg1: T1): AssertionPlantNullable - = AssertImpl.feature.returnValueOf1(this, method, arg1) - -@Suppress("DeprecatedCallableAddReplaceWith", "unused", "UNUSED_PARAMETER") -@Deprecated("Use the overload with KFunction2 instead, this way you do not access `subject` too early. Use `YourClass::property` instead of `subject::property`") -fun CollectingAssertionPlant.returnValueOf(method: KFunction1, arg1: T1): AssertionPlantNullable - = throw PleaseUseReplacementException("Use the overload with KFunction2 instead, this way you do not access `subject` too early. Use `YourClass::property` instead of `subject::property`") - -/** - * Creates an [AssertionPlantNullable], for the value returned by calling [method] with [arg1], which eventually adds - * [AssertionGroup]s with a [FeatureAssertionGroupType], containing the assertions created for the return value, - * to the current plant. - * - * @return An [AssertionPlantNullable] for the given [property]. - */ -@JvmName("safeReturnValueOf") -@Deprecated( - "Switch from Assert to Expect and use feature instead; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().feature(method, arg1).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.fluent.en_GB.feature" - ) -) -fun Assert.returnValueOf(method: KFunction2, arg1: T1): AssertionPlantNullable - = AssertImpl.feature.returnValueOf1(this, method, arg1) - - -// Arg 2 ---------------------------------------------------------------------------- - -/** - * Creates an [AssertionPlant], for the value returned by calling [method] with [arg1] and [arg2], which eventually - * adds [AssertionGroup]s with a [FeatureAssertionGroupType], containing the assertions created for the return value, - * to the current plant. - * - * @return An [AssertionPlant] for the return value of the given [method]. - */ -@Deprecated( - "Switch from Assert to Expect and use feature instead; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().feature { f(method, arg1, arg2) }.asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.fluent.en_GB.feature" - ) -) -fun Assert.returnValueOf(method: KFunction2, arg1: T1, arg2: T2): AssertionPlant - = AssertImpl.feature.returnValueOf2(this, method, arg1, arg2) - -@Suppress("DeprecatedCallableAddReplaceWith", "unused", "UNUSED_PARAMETER") -@Deprecated("Use the overload with KFunction3 instead, this way you do not access `subject` too early. Use `YourClass::property` instead of `subject::property`") -fun CollectingAssertionPlant.returnValueOf(method: KFunction2, arg1: T1, arg2: T2): AssertionPlant - = throw PleaseUseReplacementException("Use the overload with KFunction3 instead, this way you do not access `subject` too early. Use `YourClass::property` instead of `subject::property`") - -/** - * Creates an [AssertionPlant], for the value returned by calling [method] with [arg1] and [arg2], which eventually - * adds [AssertionGroup]s with a [FeatureAssertionGroupType], containing the assertions created for the return value, - * to the current plant. - * - * @return An [AssertionPlant] for the return value of the given [method]. - */ -@JvmName("safeReturnValueOf") -@Deprecated( - "Switch from Assert to Expect and use feature instead; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().feature(method, arg1, arg2).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.fluent.en_GB.feature" - ) -) -fun Assert.returnValueOf(method: KFunction3, arg1: T1, arg2: T2): AssertionPlant - = AssertImpl.feature.returnValueOf2(this, method, arg1, arg2) - - -/** - * Creates an [AssertionPlant], for the value returned by calling [method] with [arg1] and [arg2], which eventually - * adds [AssertionGroup]s with a [FeatureAssertionGroupType], containing the assertions created for the return value, - * to the current plant -- starting with a group consisting of the [Assertion]s created by the - * [assertionCreator] lambda. - * - * @return An [AssertionPlant] for the return value of the given [method]. - * - * @throws AssertionError Might throw an [AssertionError] if an additionally created [Assertion] - * (by calling [assertionCreator]) does not hold. - */ -@Deprecated( - "Switch from Assert to Expect and use feature instead; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().feature({ f(method, arg1, arg2) }, { asAssert(assertionCreator) }).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.fluent.en_GB.feature" - ) -) -fun Assert.returnValueOf(method: KFunction2, arg1: T1, arg2: T2, assertionCreator: Assert.() -> Unit): AssertionPlant - = AssertImpl.feature.returnValueOf2(this, method, arg1, arg2, assertionCreator) - -@Suppress("DeprecatedCallableAddReplaceWith", "unused", "UNUSED_PARAMETER") -@Deprecated("Use the overload with KFunction3 instead, this way you do not access `subject` too early. Use `YourClass::property` instead of `subject::property`") -fun CollectingAssertionPlant.returnValueOf(method: KFunction2, arg1: T1, arg2: T2, assertionCreator: Assert.() -> Unit): AssertionPlant - = throw PleaseUseReplacementException("Use the overload with KFunction3 instead, this way you do not access `subject` too early. Use `YourClass::property` instead of `subject::property`") - -/** - * Creates an [AssertionPlant], for the value returned by calling [method] with [arg1] and [arg2], which eventually - * adds [AssertionGroup]s with a [FeatureAssertionGroupType], containing the assertions created for the return value, - * to the current plant -- starting with a group consisting of the [Assertion]s created by the - * [assertionCreator] lambda. - * - * @return An [AssertionPlant] for the return value of the given [method]. - * - * @throws AssertionError Might throw an [AssertionError] if an additionally created [Assertion] - * (by calling [assertionCreator]) does not hold. - */ -@JvmName("safeReturnValueOf") -@Deprecated( - "Switch from Assert to Expect and use feature instead; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().feature(method, arg1, arg2, { asAssert(assertionCreator) }).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.fluent.en_GB.feature" - ) -) -fun Assert.returnValueOf(method: KFunction3, arg1: T1, arg2: T2, assertionCreator: Assert.() -> Unit): AssertionPlant - = AssertImpl.feature.returnValueOf2(this, method, arg1, arg2, assertionCreator) - - -/** - * Creates an [AssertionPlantNullable], for the value returned by calling [method] with [arg1] and [arg2], which - * eventually adds [AssertionGroup]s with a [FeatureAssertionGroupType], containing the assertions created for - * the return value, to the current plant. - * - * @return An [AssertionPlantNullable] for the given [property]. - */ -@Deprecated( - "Switch from Assert to Expect and use feature instead; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().feature { f(method, arg1, arg2) }.asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.fluent.en_GB.feature" - ) -) -fun Assert.returnValueOf(method: KFunction2, arg1: T1, arg2: T2): AssertionPlantNullable - = AssertImpl.feature.returnValueOf2(this, method, arg1, arg2) - -@Suppress("DeprecatedCallableAddReplaceWith", "unused", "UNUSED_PARAMETER") -@Deprecated("Use the overload with KFunction3 instead, this way you do not access `subject` too early. Use `YourClass::property` instead of `subject::property`") -fun CollectingAssertionPlant.returnValueOf(method: KFunction2, arg1: T1, arg2: T2): AssertionPlantNullable - = throw PleaseUseReplacementException("Use the overload with KFunction3 instead, this way you do not access `subject` too early. Use `YourClass::property` instead of `subject::property`") - -/** - * Creates an [AssertionPlantNullable], for the value returned by calling [method] with [arg1] and [arg2], which - * eventually adds [AssertionGroup]s with a [FeatureAssertionGroupType], containing the assertions created for - * the return value, to the current plant. - * - * @return An [AssertionPlantNullable] for the given [property]. - */ -@JvmName("safeReturnValueOf") -@Deprecated( - "Switch from Assert to Expect and use feature instead; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().feature(method, arg1, arg2).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.fluent.en_GB.feature" - ) -) -fun Assert.returnValueOf(method: KFunction3, arg1: T1, arg2: T2): AssertionPlantNullable - = AssertImpl.feature.returnValueOf2(this, method, arg1, arg2) - - -// Arg 3 ---------------------------------------------------------------------------- - -/** - * Creates an [AssertionPlant], for the value returned by calling [method] with [arg1], [arg2] and [arg3], - * which eventually adds [AssertionGroup]s with a [FeatureAssertionGroupType], containing the assertions created - * for the return value, to the current plant. - * - * @return An [AssertionPlant] for the return value of the given [method]. - */ -@Deprecated( - "Switch from Assert to Expect and use feature instead; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().feature { f(method, arg1, arg2, arg3) }.asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.fluent.en_GB.feature" - ) -) -fun Assert.returnValueOf(method: KFunction3, arg1: T1, arg2: T2, arg3: T3): AssertionPlant - = AssertImpl.feature.returnValueOf3(this, method, arg1, arg2, arg3) - -@Suppress("DeprecatedCallableAddReplaceWith", "unused", "UNUSED_PARAMETER") -@Deprecated("Use the overload with KFunction4 instead, this way you do not access `subject` too early. Use `YourClass::property` instead of `subject::property`") -fun CollectingAssertionPlant.returnValueOf(method: KFunction3, arg1: T1, arg2: T2, arg3: T3): AssertionPlant - = throw PleaseUseReplacementException("Use the overload with KFunction4 instead, this way you do not access `subject` too early. Use `YourClass::property` instead of `subject::property`") - -/** - * Creates an [AssertionPlant], for the value returned by calling [method] with [arg1], [arg2] and [arg3], - * which eventually adds [AssertionGroup]s with a [FeatureAssertionGroupType], containing the assertions created - * for the return value, to the current plant. - * - * @return An [AssertionPlant] for the return value of the given [method]. - */ -@JvmName("safeReturnValueOf") -@Deprecated( - "Switch from Assert to Expect and use feature instead; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().feature(method, arg1, arg2, arg3).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.fluent.en_GB.feature" - ) -) -fun Assert.returnValueOf(method: KFunction4, arg1: T1, arg2: T2, arg3: T3): AssertionPlant - = AssertImpl.feature.returnValueOf3(this, method, arg1, arg2, arg3) - - -/** - * Creates an [AssertionPlant], for the value returned by calling [method] with [arg1], [arg2] and [arg3], - * which eventually adds [AssertionGroup]s with a [FeatureAssertionGroupType], containing the assertions created - * for the return value, to the current plant -- starting with a group consisting of the [Assertion]s created by the - * [assertionCreator] lambda. - * - * @return An [AssertionPlant] for the return value of the given [method]. - * - * @throws AssertionError Might throw an [AssertionError] if an additionally created [Assertion] - * (by calling [assertionCreator]) does not hold. - */ -@Deprecated( - "Switch from Assert to Expect and use feature instead; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().feature({ f(method, arg1, arg2, arg3, arg4) }, { asAssert(assertionCreator) }).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.fluent.en_GB.feature" - ) -) -fun Assert.returnValueOf(method: KFunction3, arg1: T1, arg2: T2, arg3: T3, assertionCreator: Assert.() -> Unit): AssertionPlant - = AssertImpl.feature.returnValueOf3(this, method, arg1, arg2, arg3, assertionCreator) - -@Suppress("DeprecatedCallableAddReplaceWith", "unused", "UNUSED_PARAMETER") -@Deprecated("Use the overload with KFunction4 instead, this way you do not access `subject` too early. Use `YourClass::property` instead of `subject::property`") -fun CollectingAssertionPlant.returnValueOf(method: KFunction3, arg1: T1, arg2: T2, arg3: T3, assertionCreator: Assert.() -> Unit): AssertionPlant - = throw PleaseUseReplacementException("Use the overload with KFunction4 instead, this way you do not access `subject` too early. Use `YourClass::property` instead of `subject::property`") - -/** - * Creates an [AssertionPlant], for the value returned by calling [method] with [arg1], [arg2] and [arg3], - * which eventually adds [AssertionGroup]s with a [FeatureAssertionGroupType], containing the assertions created - * for the return value, to the current plant -- starting with a group consisting of the [Assertion]s created by the - * [assertionCreator] lambda. - * - * @return An [AssertionPlant] for the return value of the given [method]. - * - * @throws AssertionError Might throw an [AssertionError] if an additionally created [Assertion] - * (by calling [assertionCreator]) does not hold. - */ -@JvmName("safeReturnValueOf") -@Deprecated( - "Switch from Assert to Expect and use feature instead; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().feature(method, arg1, arg2, arg3, { asAssert(assertionCreator) }).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.fluent.en_GB.feature" - ) -) -fun Assert.returnValueOf(method: KFunction4, arg1: T1, arg2: T2, arg3: T3, assertionCreator: Assert.() -> Unit): AssertionPlant - = AssertImpl.feature.returnValueOf3(this, method, arg1, arg2, arg3, assertionCreator) - - -/** - * Creates an [AssertionPlantNullable], for the value returned by calling [method] with [arg1], [arg2] and [arg3], - * which eventually adds [AssertionGroup]s with a [FeatureAssertionGroupType], containing the assertions created for - * the return value, to the current plant. - * - * @return An [AssertionPlantNullable] for the given [property]. - */ -@Deprecated( - "Switch from Assert to Expect and use feature instead; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().feature { f(method, arg1, arg2, arg3) }.asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.fluent.en_GB.feature" - ) -) -fun Assert.returnValueOf(method: KFunction3, arg1: T1, arg2: T2, arg3: T3): AssertionPlantNullable - = AssertImpl.feature.returnValueOf3(this, method, arg1, arg2, arg3) - -@Suppress("DeprecatedCallableAddReplaceWith", "unused", "UNUSED_PARAMETER") -@Deprecated("Use the overload with KFunction4 instead, this way you do not access `subject` too early. Use `YourClass::property` instead of `subject::property`") -fun CollectingAssertionPlant.returnValueOf(method: KFunction3, arg1: T1, arg2: T2, arg3: T3): AssertionPlantNullable - = throw PleaseUseReplacementException("Use the overload with KFunction4 instead, this way you do not access `subject` too early. Use `YourClass::property` instead of `subject::property`") - -/** - * Creates an [AssertionPlantNullable], for the value returned by calling [method] with [arg1], [arg2] and [arg3], - * which eventually adds [AssertionGroup]s with a [FeatureAssertionGroupType], containing the assertions created for - * the return value, to the current plant. - * - * @return An [AssertionPlantNullable] for the given [property]. - */ -@JvmName("safeReturnValueOf") -@Deprecated( - "Switch from Assert to Expect and use feature instead; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().feature(method, arg1, arg2, arg3).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.fluent.en_GB.feature" - ) -) -fun Assert.returnValueOf(method: KFunction4, arg1: T1, arg2: T2, arg3: T3): AssertionPlantNullable - = AssertImpl.feature.returnValueOf3(this, method, arg1, arg2, arg3) - - -// Arg 4 ---------------------------------------------------------------------------- - -/** - * Creates an [AssertionPlant], for the value returned by calling [method] with [arg1], [arg2], [arg3] and [arg4], - * which eventually adds [AssertionGroup]s with a [FeatureAssertionGroupType], containing the assertions created - * for the return value, to the current plant. - * - * @return An [AssertionPlant] for the return value of the given [method]. - */ -@Deprecated( - "Switch from Assert to Expect and use feature instead; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().feature { f(method, arg1, arg2, arg3, arg4) }.asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.fluent.en_GB.feature" - ) -) -fun Assert.returnValueOf(method: KFunction4, arg1: T1, arg2: T2, arg3: T3, arg4: T4): AssertionPlant - = AssertImpl.feature.returnValueOf4(this, method, arg1, arg2, arg3, arg4) - -@Suppress("DeprecatedCallableAddReplaceWith", "unused", "UNUSED_PARAMETER") -@Deprecated("Use the overload with KFunction5 instead, this way you do not access `subject` too early. Use `YourClass::property` instead of `subject::property`") -fun CollectingAssertionPlant.returnValueOf(method: KFunction4, arg1: T1, arg2: T2, arg3: T3, arg4: T4): AssertionPlant - = throw PleaseUseReplacementException("Use the overload with KFunction5 instead, this way you do not access `subject` too early. Use `YourClass::property` instead of `subject::property`") - -/** - * Creates an [AssertionPlant], for the value returned by calling [method] with [arg1], [arg2], [arg3] and [arg4], - * which eventually adds [AssertionGroup]s with a [FeatureAssertionGroupType], containing the assertions created - * for the return value, to the current plant. - * - * @return An [AssertionPlant] for the return value of the given [method]. - */ -@JvmName("safeReturnValueOf") -@Deprecated( - "Switch from Assert to Expect and use feature instead; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().feature(method, arg1, arg2, arg3, arg4).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.fluent.en_GB.feature" - ) -) -fun Assert.returnValueOf(method: KFunction5, arg1: T1, arg2: T2, arg3: T3, arg4: T4): AssertionPlant - = AssertImpl.feature.returnValueOf4(this, method, arg1, arg2, arg3, arg4) - - -/** - * Creates an [AssertionPlant], for the value returned by calling [method] with [arg1], [arg2], [arg3] and [arg4], - * which eventually adds [AssertionGroup]s with a [FeatureAssertionGroupType], containing the assertions created - * for the return value, to the current plant -- starting with a group consisting of the [Assertion]s created by the - * [assertionCreator] lambda. - * - * @return An [AssertionPlant] for the return value of the given [method]. - * - * @throws AssertionError Might throw an [AssertionError] if an additionally created [Assertion] - * (by calling [assertionCreator]) does not hold. - */ -@Deprecated( - "Switch from Assert to Expect and use feature instead; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().feature({ f(method, arg1, arg2, arg3, arg4) }, { asAssert(assertionCreator) }).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.fluent.en_GB.feature" - ) -) -fun Assert.returnValueOf(method: KFunction4, arg1: T1, arg2: T2, arg3: T3, arg4: T4, assertionCreator: Assert.() -> Unit): AssertionPlant - = AssertImpl.feature.returnValueOf4(this, method, arg1, arg2, arg3, arg4, assertionCreator) - -@Suppress("DeprecatedCallableAddReplaceWith", "unused", "UNUSED_PARAMETER") -@Deprecated("Use the overload with KFunction5 instead, this way you do not access `subject` too early. Use `YourClass::property` instead of `subject::property`") -fun CollectingAssertionPlant.returnValueOf(method: KFunction4, arg1: T1, arg2: T2, arg3: T3, arg4: T4, assertionCreator: Assert.() -> Unit): AssertionPlant - = throw PleaseUseReplacementException("Use the overload with KFunction5 instead, this way you do not access `subject` too early. Use `YourClass::property` instead of `subject::property`") - -/** - * Creates an [AssertionPlant], for the value returned by calling [method] with [arg1], [arg2], [arg3] and [arg4], - * which eventually adds [AssertionGroup]s with a [FeatureAssertionGroupType], containing the assertions created - * for the return value, to the current plant -- starting with a group consisting of the [Assertion]s created by the - * [assertionCreator] lambda. - * - * @return An [AssertionPlant] for the return value of the given [method]. - * - * @throws AssertionError Might throw an [AssertionError] if an additionally created [Assertion] - * (by calling [assertionCreator]) does not hold. - */ -@JvmName("safeReturnValueOf") -@Deprecated( - "Switch from Assert to Expect and use feature instead; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().feature(method, arg1, arg2, arg3, arg4, { asAssert(assertionCreator) }).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.fluent.en_GB.feature" - ) -) -fun Assert.returnValueOf(method: KFunction5, arg1: T1, arg2: T2, arg3: T3, arg4: T4, assertionCreator: Assert.() -> Unit): AssertionPlant - = AssertImpl.feature.returnValueOf4(this, method, arg1, arg2, arg3, arg4, assertionCreator) - - -/** - * Creates an [AssertionPlantNullable], for the value returned by calling [method] with [arg1], [arg2], [arg3] - * and [arg4], which eventually adds [AssertionGroup]s with a [FeatureAssertionGroupType], containing the assertions - * created for the return value, to the current plant. - * - * @return An [AssertionPlantNullable] for the given [property]. - */ -@Deprecated( - "Switch from Assert to Expect and use feature instead; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().feature { f(method, arg1, arg2, arg3, arg4) }.asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.fluent.en_GB.feature" - ) -) -fun Assert.returnValueOf(method: KFunction4, arg1: T1, arg2: T2, arg3: T3, arg4: T4): AssertionPlantNullable - = AssertImpl.feature.returnValueOf4(this, method, arg1, arg2, arg3, arg4) - -@Suppress("DeprecatedCallableAddReplaceWith", "unused", "UNUSED_PARAMETER") -@Deprecated("Use the overload with KFunction5 instead, this way you do not access `subject` too early. Use `YourClass::property` instead of `subject::property`") -fun CollectingAssertionPlant.returnValueOf(method: KFunction4, arg1: T1, arg2: T2, arg3: T3, arg4: T4): AssertionPlantNullable - = throw PleaseUseReplacementException("Use the overload with KFunction5 instead, this way you do not access `subject` too early. Use `YourClass::property` instead of `subject::property`") - -/** - * Creates an [AssertionPlantNullable], for the value returned by calling [method] with [arg1], [arg2], [arg3] - * and [arg4], which eventually adds [AssertionGroup]s with a [FeatureAssertionGroupType], containing the assertions - * created for the return value, to the current plant. - * - * @return An [AssertionPlantNullable] for the given [property]. - */ -@JvmName("safeReturnValueOf") -@Deprecated( - "Switch from Assert to Expect and use feature instead; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().feature(method, arg1, arg2, arg3, arg4).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.fluent.en_GB.feature" - ) -) -fun Assert.returnValueOf(method: KFunction5, arg1: T1, arg2: T2, arg3: T3, arg4: T4): AssertionPlantNullable - = AssertImpl.feature.returnValueOf4(this, method, arg1, arg2, arg3, arg4) - - -// Arg 5 ---------------------------------------------------------------------------- - -/** - * Creates an [AssertionPlant], for the value returned by calling [method] with [arg1], [arg2], [arg3], [arg4] - * and [arg5], which eventually adds [AssertionGroup]s with a [FeatureAssertionGroupType], containing the assertions - * created for the return value, to the current plant. - * - * @return An [AssertionPlant] for the return value of the given [method]. - */ -@Deprecated( - "Switch from Assert to Expect and use feature instead; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().feature { f(method, arg1, arg2, arg3, arg4, arg5) }.asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.fluent.en_GB.feature" - ) -) -fun Assert.returnValueOf(method: KFunction5, arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5): AssertionPlant - = AssertImpl.feature.returnValueOf5(this, method, arg1, arg2, arg3, arg4, arg5) - -@Suppress("DeprecatedCallableAddReplaceWith", "unused", "UNUSED_PARAMETER") -@Deprecated("Use the overload with KFunction6 instead, this way you do not access `subject` too early. Use `YourClass::property` instead of `subject::property`") -fun CollectingAssertionPlant.returnValueOf(method: KFunction5, arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5): AssertionPlant - = throw PleaseUseReplacementException("Use the overload with KFunction6 instead, this way you do not access `subject` too early. Use `YourClass::property` instead of `subject::property`") - -/** - * Creates an [AssertionPlant], for the value returned by calling [method] with [arg1], [arg2], [arg3], [arg4] - * and [arg5], which eventually adds [AssertionGroup]s with a [FeatureAssertionGroupType], containing the assertions - * created for the return value, to the current plant. - * - * @return An [AssertionPlant] for the return value of the given [method]. - */ -@JvmName("safeReturnValueOf") -@Deprecated( - "Switch from Assert to Expect and use feature instead; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().feature(method, arg1, arg2, arg3, arg4, arg5).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.fluent.en_GB.feature" - ) -) -fun Assert.returnValueOf(method: KFunction6, arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5): AssertionPlant - = AssertImpl.feature.returnValueOf5(this, method, arg1, arg2, arg3, arg4, arg5) - - -/** - * Creates an [AssertionPlant], for the value returned by calling [method] with [arg1], [arg2], [arg3], [arg4] - * and [arg5], which eventually adds [AssertionGroup]s with a [FeatureAssertionGroupType], containing the assertions - * created for the return value, to the current plant -- starting with a group consisting of the [Assertion]s created - * by the [assertionCreator] lambda. - * - * @return An [AssertionPlant] for the return value of the given [method]. - * - * @throws AssertionError Might throw an [AssertionError] if an additionally created [Assertion] - * (by calling [assertionCreator]) does not hold. - */ -@Deprecated( - "Switch from Assert to Expect and use feature instead; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().feature({ f(method, arg1, arg2, arg3, arg4, arg5) }, { asAssert(assertionCreator) }).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.fluent.en_GB.feature" - ) -) -fun Assert.returnValueOf(method: KFunction5, arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, assertionCreator: Assert.() -> Unit): AssertionPlant - = AssertImpl.feature.returnValueOf5(this, method, arg1, arg2, arg3, arg4, arg5, assertionCreator) - -@Suppress("DeprecatedCallableAddReplaceWith", "unused", "UNUSED_PARAMETER") -@Deprecated("Use the overload with KFunction6 instead, this way you do not access `subject` too early. Use `YourClass::property` instead of `subject::property`") -fun CollectingAssertionPlant.returnValueOf(method: KFunction5, arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, assertionCreator: Assert.() -> Unit): AssertionPlant - = throw PleaseUseReplacementException("Use the overload with KFunction6 instead, this way you do not access `subject` too early. Use `YourClass::property` instead of `subject::property`") - -/** - * Creates an [AssertionPlant], for the value returned by calling [method] with [arg1], [arg2], [arg3], [arg4] - * and [arg5], which eventually adds [AssertionGroup]s with a [FeatureAssertionGroupType], containing the assertions - * created for the return value, to the current plant -- starting with a group consisting of the [Assertion]s created - * by the [assertionCreator] lambda. - * - * @return An [AssertionPlant] for the return value of the given [method]. - * - * @throws AssertionError Might throw an [AssertionError] if an additionally created [Assertion] - * (by calling [assertionCreator]) does not hold. - */ -@JvmName("safeReturnValueOf") -@Deprecated( - "Switch from Assert to Expect and use feature instead; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().feature(method, arg1, arg2, arg3, arg4, arg5, { asAssert(assertionCreator) }).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.fluent.en_GB.feature" - ) -) -fun Assert.returnValueOf(method: KFunction6, arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, assertionCreator: Assert.() -> Unit): AssertionPlant - = AssertImpl.feature.returnValueOf5(this, method, arg1, arg2, arg3, arg4, arg5, assertionCreator) - - -/** - * Creates an [AssertionPlantNullable], for the value returned by calling [method] with [arg1], [arg2], [arg3], - * [arg4] and [arg5], which eventually adds [AssertionGroup]s with a [FeatureAssertionGroupType], containing the - * assertions created for the return value, to the current plant. - * - * @return An [AssertionPlantNullable] for the given [property]. - */ -@Deprecated( - "Switch from Assert to Expect and use feature instead; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().feature { f(method, arg1, arg2, arg3, arg4, arg5) }.asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.fluent.en_GB.feature" - ) -) -fun Assert.returnValueOf(method: KFunction5, arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5): AssertionPlantNullable - = AssertImpl.feature.returnValueOf5(this, method, arg1, arg2, arg3, arg4, arg5) - -@Suppress("DeprecatedCallableAddReplaceWith", "unused", "UNUSED_PARAMETER") -@Deprecated("Use the overload with KFunction6 instead, this way you do not access `subject` too early. Use `YourClass::property` instead of `subject::property`") -fun CollectingAssertionPlant.returnValueOf(method: KFunction5, arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5): AssertionPlantNullable - = throw PleaseUseReplacementException("Use the overload with KFunction6 instead, this way you do not access `subject` too early. Use `YourClass::property` instead of `subject::property`") - -/** - * Creates an [AssertionPlantNullable], for the value returned by calling [method] with [arg1], [arg2], [arg3], - * [arg4] and [arg5], which eventually adds [AssertionGroup]s with a [FeatureAssertionGroupType], containing the - * assertions created for the return value, to the current plant. - * - * @return An [AssertionPlantNullable] for the given [property]. - */ -@JvmName("safeReturnValueOf") -@Deprecated( - "Switch from Assert to Expect and use feature instead; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().feature(method, arg1, arg2, arg3, arg4, arg5).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.fluent.en_GB.feature" - ) -) -fun Assert.returnValueOf(method: KFunction6, arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5): AssertionPlantNullable - = AssertImpl.feature.returnValueOf5(this, method, arg1, arg2, arg3, arg4, arg5) diff --git a/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/floatingPointAssertions.kt b/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/floatingPointAssertions.kt deleted file mode 100644 index a44fb9ac0..000000000 --- a/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/floatingPointAssertions.kt +++ /dev/null @@ -1,62 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") -@file:JvmMultifileClass -@file:JvmName("FloatingPointAssertionsKt") - -package ch.tutteli.atrium.api.cc.en_GB - -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.domain.builders.AssertImpl -import kotlin.jvm.JvmMultifileClass -import kotlin.jvm.JvmName - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] is equal to [expected] with an error [tolerance] - * (range including bounds). - * - * It effectively compares the absolute difference between [Assert.subject][SubjectProvider.subject] and [expected] and compares it with - * the [tolerance]. As long as it is less than or equal the [tolerance] the assertion holds; otherwise it fails. - * A more mathematical way of expressing the assertion is the following inequality: - * - * | [Assert.subject][SubjectProvider.subject] - [expected] | ≤ [tolerance] - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().toBeWithErrorTolerance(expected, tolerance).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.fluent.en_GB.toBeWithErrorTolerance" - ) -) -fun Assert.toBeWithErrorTolerance(expected: Float, tolerance: Float) - = addAssertion(AssertImpl.floatingPoint.toBeWithErrorTolerance(this, expected, tolerance)) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] is equal to [expected] with an error [tolerance] - * (range including bounds). - * - * It effectively compares the absolute difference between [Assert.subject][SubjectProvider.subject] and [expected] and compares it with - * the [tolerance]. As long as it is less than or equal the [tolerance] the assertion holds; otherwise it fails. - * A more mathematical way of expressing the assertion is the following inequality: - * - * | [Assert.subject][SubjectProvider.subject] - [expected] | ≤ [tolerance] - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().toBeWithErrorTolerance(expected, tolerance).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.fluent.en_GB.toBeWithErrorTolerance" - ) -) -fun Assert.toBeWithErrorTolerance(expected: Double, tolerance: Double) - = addAssertion(AssertImpl.floatingPoint.toBeWithErrorTolerance(this, expected, tolerance)) diff --git a/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/iterableAssertions.kt b/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/iterableAssertions.kt deleted file mode 100644 index eee667bb9..000000000 --- a/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/iterableAssertions.kt +++ /dev/null @@ -1,315 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") -@file:JvmMultifileClass -@file:JvmName("IterableAssertionsKt") -package ch.tutteli.atrium.api.cc.en_GB - -import ch.tutteli.atrium.api.cc.en_GB.creating.iterable.contains.builders.NotCheckerOption -import ch.tutteli.atrium.api.cc.en_GB.creating.iterable.contains.builders.impl.NotCheckerOptionImpl -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.domain.builders.AssertImpl -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.NoOpSearchBehaviour -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.NotSearchBehaviour -import kotlin.jvm.JvmMultifileClass -import kotlin.jvm.JvmName - -/** - * Creates an [IterableContains.Builder] based on this [AssertionPlant] which allows to define - * more sophisticated `contains` assertions. - * - * @return The newly created builder. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().contains", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.api.fluent.en_GB.contains" - ) -) -val > Assert.contains: IterableContains.Builder - get() = AssertImpl.iterable.containsBuilder(this) - -/** - * Creates an [IterableContains.Builder] based on this [AssertionPlant] which allows to define - * more sophisticated `contains not` assertions. - * - * @return The newly created builder. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().containsNot", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.api.fluent.en_GB.containsNot" - ) -) -val > Assert.containsNot: NotCheckerOption - get() = NotCheckerOptionImpl(AssertImpl.iterable.containsNotBuilder(this)) - - -/**c - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] contains the - * [expected] value and the [otherExpected] values (if given). - * - * It is a shortcut for `contains.inAnyOrder.atLeast(1).values(expected, *otherExpected)` - * - * Notice, that it does not search for unique matches. Meaning, if the iterable is `setOf('a', 'b')` and [expected] is - * defined as `'a'` and one [otherExpected] is defined as `'a'` as well, then both match, even though they match the - * same entry. Use an option such as [atLeast], [atMost] and [exactly] to control the number of occurrences you expect. - * - * Meaning you might want to use: - * `contains.inAnyOrder.exactly(2).value('a')` - * instead of: - * `contains('a', 'a')` - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().contains(expected, *otherExpected).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.fluent.en_GB.contains" - ) -) -fun > Assert.contains(expected: E, vararg otherExpected: E): AssertionPlant - = contains.inAnyOrder.atLeast(1).values(expected, *otherExpected) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] contains an entry holding the - * assertions created by [assertionCreatorOrNull] or an entry which is `null` in case [assertionCreatorOrNull] - * is defined as `null`. - * - * It is a shortcut for `contains.inAnyOrder.atLeast(1).entry(assertionCreatorOrNull)` - * - * @param assertionCreatorOrNull The identification lambda which creates the assertions which the entry we are looking - * for has to hold; or in other words, the function which defines whether an entry is the one we are looking for - * or not. In case it is defined as `null`, then an entry is identified if it is `null` as well. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().contains(asSubExpect(assertionCreatorOrNull)).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.domain.builders.migration.asSubExpect", - "ch.tutteli.atrium.api.fluent.en_GB.contains" - ) -) -fun > Assert.contains(assertionCreatorOrNull: (Assert.() -> Unit)?): AssertionPlant - = contains.inAnyOrder.atLeast(1).entry(assertionCreatorOrNull) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] contains an entry holding the - * assertions created by [assertionCreatorOrNull] or an entry which is `null` in case [assertionCreatorOrNull] - * is defined as `null` -- likewise an entry (can be the same) is searched for each - * of the [otherAssertionCreatorsOrNulls]. - * - * It is a shortcut for `contains.inAnyOrder.atLeast(1).entries(assertionCreatorOrNull, *otherAssertionCreatorsOrNulls)` - * - * @param assertionCreatorOrNull The identification lambda which creates the assertions which the entry we are looking - * for has to hold; or in other words, the function which defines whether an entry is the one we are looking for - * or not. In case it is defined as `null`, then an entry is identified if it is `null` as well. - * @param otherAssertionCreatorsOrNulls Additional identification lambdas which each identify (separately) an entry - * which we are looking for (see [assertionCreatorOrNull] for more information). - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().contains(\n" + - "asSubExpect(assertionCreatorOrNull),\n" + - "*otherAssertionCreatorsOrNulls.map { asSubExpect(it)}.toTypedArray()\n" + - ").asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.domain.builders.migration.asSubExpect", - "ch.tutteli.atrium.api.fluent.en_GB.contains" - ) -) -fun > Assert.contains(assertionCreatorOrNull: (Assert.() -> Unit)?, vararg otherAssertionCreatorsOrNulls: (Assert.() -> Unit)?): AssertionPlant - = contains.inAnyOrder.atLeast(1).entries(assertionCreatorOrNull, *otherAssertionCreatorsOrNulls) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] contains only - * the [expected] value and the [otherExpected] values (if given) in the defined order. - * - * It is a shortcut for `contains.inOrder.only.values(expected, *otherExpected)` - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().containsExactly(expected, *otherExpected).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.fluent.en_GB.containsExactly" - ) -) -fun > Assert.containsExactly(expected: E, vararg otherExpected: E): AssertionPlant - = contains.inOrder.only.values(expected, *otherExpected) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] contains only an entry holding - * the assertions created by [assertionCreatorOrNull] or only one entry which is `null` in case [assertionCreatorOrNull] - * is defined as `null`. - * - * It is a shortcut for `contains.inOrder.only.entry(assertionCreatorOrNull)` - * - * @param assertionCreatorOrNull The identification lambda which creates the assertions which the entry we are looking - * for has to hold; or in other words, the function which defines whether an entry is the one we are looking for - * or not. In case it is defined as `null`, then an entry is identified if it is `null` as well. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().containsExactly(asSubExpect(assertionCreatorOrNull)).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.domain.builders.migration.asSubExpect", - "ch.tutteli.atrium.api.fluent.en_GB.containsExactly" - ) -) -fun > Assert.containsExactly(assertionCreatorOrNull: (Assert.() -> Unit)?): AssertionPlant - = contains.inOrder.only.entry(assertionCreatorOrNull) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] contains only an entry holding - * the assertions created by [assertionCreatorOrNull] or `null` in case [assertionCreatorOrNull] is defined as `null` - * and likewise an additional entry for each [otherAssertionCreatorsOrNulls] (if given) - * whereas the entries have to appear in the defined order. - * - * It is a shortcut for `contains.inOrder.only.entries(assertionCreatorOrNull, *otherAssertionCreatorsOrNulls)` - * - * @param assertionCreatorOrNull The identification lambda which creates the assertions which the entry we are looking - * for has to hold; or in other words, the function which defines whether an entry is the one we are looking for - * or not. In case it is defined as `null`, then an entry is identified if it is `null` as well. - * @param otherAssertionCreatorsOrNulls Additional identification lambdas which each identify (separately) an entry - * which we are looking for (see [assertionCreatorOrNull] for more information). - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().containsExactly(\n" + - "asSubExpect(assertionCreatorOrNull),\n" + - "*otherAssertionCreatorsOrNulls.map { asSubExpect(it) }.toTypedArray()\n" + - ").asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.domain.builders.migration.asSubExpect", - "ch.tutteli.atrium.api.fluent.en_GB.containsExactly" - ) -) -fun > Assert.containsExactly(assertionCreatorOrNull: (Assert.() -> Unit)?, vararg otherAssertionCreatorsOrNulls: (Assert.() -> Unit)?): AssertionPlant - = contains.inOrder.only.entries(assertionCreatorOrNull, *otherAssertionCreatorsOrNulls) - - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] does not contain the [expected] value - * and neither one of the [otherExpected] values (if given). - * - * It is a shortcut for `containsNot.values(expected, *otherExpected)` - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().containsNot(expected, *otherExpected).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.fluent.en_GB.containsNot" - ) -) -fun > Assert.containsNot(expected: E, vararg otherExpected: E) - = containsNot.values(expected, *otherExpected) - - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] contains an entry holding - * the assertions created by [assertionCreatorOrNull] or an entry which is `null` in case [assertionCreatorOrNull] - * is defined as `null`. - * - * It is a shortcut for `contains.inAnyOrder.atLeast(1).entry(assertionCreatorOrNull)` - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().any(asSubExpect(assertionCreatorOrNull)).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.domain.builders.migration.asSubExpect", - "ch.tutteli.atrium.api.fluent.en_GB.any" - ) -) -fun > Assert.any(assertionCreatorOrNull: (Assert.() -> Unit)?): AssertionPlant - = contains.inAnyOrder.atLeast(1).entry(assertionCreatorOrNull) - - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] does not contain a single entry - * which holds all assertions created by [assertionCreatorOrNull] or does not contain a single entry which is `null` - * in case [assertionCreatorOrNull] is defined as `null`. - * - * It is a shortcut for `containsNot.entry(assertionCreatorOrNull)` - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().none(asSubExpect(assertionCreatorOrNull)).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.domain.builders.migration.asSubExpect", - "ch.tutteli.atrium.api.fluent.en_GB.none" - ) -) -fun > Assert.none(assertionCreatorOrNull: (Assert.() -> Unit)?) - = containsNot.entry(assertionCreatorOrNull) - - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] has at least one element and - * that every element holds all assertions created by the [assertionCreatorOrNull] or that all elements are `null` - * in case [assertionCreatorOrNull] is defined as `null`. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().all(asSubExpect(assertionCreatorOrNull)).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.domain.builders.migration.asSubExpect", - "ch.tutteli.atrium.api.fluent.en_GB.all" - ) -) -fun > Assert.all(assertionCreatorOrNull: (Assert.() -> Unit)?) - = addAssertion(AssertImpl.iterable.all(this, assertionCreatorOrNull)) diff --git a/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/iterableContainsCheckers.kt b/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/iterableContainsCheckers.kt deleted file mode 100644 index 136668408..000000000 --- a/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/iterableContainsCheckers.kt +++ /dev/null @@ -1,121 +0,0 @@ -@file:Suppress("DEPRECATION" /* will be removed with 1.0.0 */) -package ch.tutteli.atrium.api.cc.en_GB - -import ch.tutteli.atrium.api.cc.en_GB.creating.iterable.contains.builders.* -import ch.tutteli.atrium.api.cc.en_GB.creating.iterable.contains.builders.impl.* -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InAnyOrderSearchBehaviour - -/** - * Restricts a `contains` assertion by specifying that the number of occurrences of the entry which we are looking - * for occurs `at least` number of [times] within the [Iterable]. - * - * @param times The number which the check will compare against the actual number of times an expected entry is - * found in the [Iterable]. - * - * @return The newly created builder. - * @throws IllegalArgumentException In case [times] is smaller than zero. - * @throws IllegalArgumentException In case [times] equals to zero; use [containsNot] instead. - */ -@Deprecated( - "Switch from api-cc-en_GB to api-fluent-en_GB; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.atLeast(times)", - "ch.tutteli.atrium.api.fluent.en_GB.atLeast" - ) -) -fun , S: InAnyOrderSearchBehaviour> IterableContains.Builder.atLeast(times: Int): AtLeastCheckerOption - = AtLeastCheckerOptionImpl(times, this) - -/** - * Restricts a `contains at least` assertion by specifying that the number of occurrences of the entry which we - * are looking for occurs `at most` number of [times] within the [Iterable]. - * - * The resulting restriction will be a `contains at least but at most` assertion. - * - * @param times The number which the check will compare against the actual number of times an expected entry is - * found in the [Iterable]. - * - * @return The newly created builder. - * @throws IllegalArgumentException In case [times] is smaller than zero. - * @throws IllegalArgumentException In case [times] equals to zero; use [containsNot] instead. - * @throws IllegalArgumentException In case [times] of this `at most` restriction equals to the number of the - * `at least` restriction; use the [exactly] restriction instead. - */ -@Deprecated( - "Switch from api-cc-en_GB to api-fluent-en_GB; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.butAtMost(times)", - "ch.tutteli.atrium.api.fluent.en_GB.butAtMost" - ) -) -fun , S: InAnyOrderSearchBehaviour> AtLeastCheckerOption.butAtMost(times: Int): ButAtMostCheckerOption - = ButAtMostCheckerOptionImpl(times, this, containsBuilder) - -/** - * Restricts a `contains` assertion by specifying that the number of occurrences of the entry which we - * are looking for occurs `exactly` number of [times] within the [Iterable]. - * - * @param times The number which the check will compare against the actual number of times an expected entry is - * found in the [Iterable]. - * - * @return The newly created builder. - * @throws IllegalArgumentException In case [times] is smaller than zero. - * @throws IllegalArgumentException In case [times] equals to zero; use [containsNot] instead. - */ -@Deprecated( - "Switch from api-cc-en_GB to api-fluent-en_GB; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.exactly(times)", - "ch.tutteli.atrium.api.fluent.en_GB.exactly" - ) -) -fun , S: InAnyOrderSearchBehaviour> IterableContains.Builder.exactly(times: Int): ExactlyCheckerOption - = ExactlyCheckerOptionImpl(times, this) - -/** - * Restricts a `contains` assertion by specifying that the number of occurrences of the entry which we - * are looking for occurs `at least` once but `at most` number of [times] within the [Iterable]. - * - * If you want to use a higher lower bound than one, then use `atLeast(2).butAtMost(3)` instead of `atMost(3)`. - * And in case you want to state that it is either not contained at all or at most a certain number of times, - * then use `notOrAtMost(2)` instead. - * - * @param times The number which the check will compare against the actual number of times an expected entry is - * found in the [Iterable]. - * - * @return The newly created builder. - * @throws IllegalArgumentException In case [times] is smaller than zero. - * @throws IllegalArgumentException In case [times] equals to zero; use [containsNot] instead. - * @throws IllegalArgumentException In case [times] equals to one; use [exactly] instead. - */ -@Deprecated( - "Switch from api-cc-en_GB to api-fluent-en_GB; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.atMost(times)", - "ch.tutteli.atrium.api.fluent.en_GB.atMost" - ) -) -fun , S: InAnyOrderSearchBehaviour> IterableContains.Builder.atMost(times: Int): AtMostCheckerOption - = AtMostCheckerOptionImpl(times, this) - -/** - * Restricts a `contains` assertion by specifying that the number of occurrences of the entry which we - * are looking for occurs `not at all or at most` number of [times] within the [Iterable]. - * - * @param times The number which the check will compare against the actual number of times an expected entry is - * found in the [Iterable]. - * - * @return The newly created builder. - * @throws IllegalArgumentException In case [times] is smaller than zero. - * @throws IllegalArgumentException In case [times] equals to zero; use [containsNot] instead. - */ -@Deprecated( - "Switch from api-cc-en_GB to api-fluent-en_GB; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.notOrAtMost(times)", - "ch.tutteli.atrium.api.fluent.en_GB.notOrAtMost" - ) -) -fun , S: InAnyOrderSearchBehaviour> IterableContains.Builder.notOrAtMost(times: Int): NotOrAtMostCheckerOption - = NotOrAtMostCheckerOptionImpl(times, this) diff --git a/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/iterableContainsInAnyOrderCreators.kt b/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/iterableContainsInAnyOrderCreators.kt deleted file mode 100644 index 879024e30..000000000 --- a/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/iterableContainsInAnyOrderCreators.kt +++ /dev/null @@ -1,136 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") -@file:JvmMultifileClass -@file:JvmName("IterableContainsInAnyOrderCreatorsKt") -package ch.tutteli.atrium.api.cc.en_GB - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.domain.builders.AssertImpl -import ch.tutteli.atrium.domain.builders.creating.basic.contains.addAssertionForAssert -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains -import ch.tutteli.kbox.glue -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains - -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InAnyOrderSearchBehaviour -import kotlin.jvm.JvmMultifileClass -import kotlin.jvm.JvmName - -/** - * Finishes the specification of the sophisticated `contains` assertion where the [expected] - * value shall be searched within the [Iterable]. - * - * Delegates to `values(expected)`. - * - * @param expected The value which is expected to be contained within the [Iterable]. - * - * @return The [AssertionPlant] for which the assertion was built to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated( - "Switch from api-cc-en_GB to api-fluent-en_GB; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.value(expected)", - "ch.tutteli.atrium.api.fluent.en_GB.value" - ) -) -fun > IterableContains.CheckerOption.value(expected: E): AssertionPlant - = values(expected) - -/** - * Finishes the specification of the sophisticated `contains` assertion where the [expected] - * value as well as the [otherExpected] values (if given) shall be searched within the [Iterable]. - * - * Notice, that it does not search for unique matches. Meaning, if the iterable is `setOf('a', 'b')` and - * [expected] is defined as `'a'` and one [otherExpected] is defined as `'a'` as well, then both match, - * even though they match the same entry. Use an option such as [atLeast], [atMost] and [exactly] to control the - * number of occurrences you expect. - * - * Meaning you might want to use: - * `contains.inAnyOrder.exactly(2).values('a')` - * instead of: - * `contains.inAnyOrder.atLeast(1).values('a', 'a')` - * - * @param expected The object which is expected to be contained within the [Iterable]. - * @param otherExpected Additional objects which are expected to be contained within [Iterable]. - * - * @return The [AssertionPlant] for which the assertion was built to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated( - "Switch from api-cc-en_GB to api-fluent-en_GB; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.values(expected, *otherExpected)", - "ch.tutteli.atrium.api.fluent.en_GB.values" - ) -) -fun > IterableContains.CheckerOption.values(expected: E, vararg otherExpected: E): AssertionPlant - = addAssertion(AssertImpl.iterable.contains.valuesInAnyOrder(this, expected glue otherExpected)) - -/** - * Finishes the specification of the sophisticated `contains` assertion where an entry shall be searched which either - * holds all assertions [assertionCreatorOrNull] might create or needs to be `null` in case [assertionCreatorOrNull] - * is defined as `null`. - * - * Delegates to `entries(assertionCreatorOrNull)`. - * - * @param assertionCreatorOrNull The identification lambda which creates the assertions which the entry we are looking - * for has to hold; or in other words, the function which defines whether an entry is the one we are looking for - * or not. In case it is defined as `null`, then an entry is identified if it is `null` as well. - * - * @return The [AssertionPlant] for which the assertion was built to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated( - "Switch from api-cc-en_GB to api-fluent-en_GB; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.entry(asSubExpect(assertionCreatorOrNull))", - "ch.tutteli.atrium.domain.builders.migration.asSubExpect", - "ch.tutteli.atrium.api.fluent.en_GB.entry" - ) -) -fun > IterableContains.CheckerOption.entry(assertionCreatorOrNull: (Assert.() -> Unit)?): AssertionPlant - = entries(assertionCreatorOrNull) - -/** - * Finishes the specification of the sophisticated `contains` assertion where an entry shall be searched which either - * holds all assertions [assertionCreatorOrNull] might create or needs to be `null` in case - * [assertionCreatorOrNull] is defined as `null` -- likewise an entry (can be the same) is searched for each - * of the [otherAssertionCreatorsOrNulls]. - * - * @param assertionCreatorOrNull The identification lambda which creates the assertions which the entry we are looking - * for has to hold; or in other words, the function which defines whether an entry is the one we are looking for - * or not. In case it is defined as `null`, then an entry is identified if it is `null` as well. - * @param otherAssertionCreatorsOrNulls Additional identification lambdas which each identify (separately) an entry - * which we are looking for (see [assertionCreatorOrNull] for more information). - * - * @return The [AssertionPlant] for which the assertion was built to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated( - "Switch from api-cc-en_GB to api-fluent-en_GB; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.entries(\n" + - "asSubExpect(assertionCreatorOrNull),\n" + - "*otherAssertionCreatorsOrNulls.map { asSubExpect(it) }.toTypedArray()\n" + - ")", - "ch.tutteli.atrium.domain.builders.migration.asSubExpect", - "ch.tutteli.atrium.api.fluent.en_GB.entries" - ) -) -fun > IterableContains.CheckerOption.entries( - assertionCreatorOrNull: (Assert.() -> Unit)?, - vararg otherAssertionCreatorsOrNulls: (Assert.() -> Unit)? -): AssertionPlant - = addAssertion(AssertImpl.iterable.contains.entriesInAnyOrderWithAssert(this, assertionCreatorOrNull glue otherAssertionCreatorsOrNulls)) - -/** - * Helper method to simplify adding assertions to the plant which itself is stored in - * [CharSequenceContains.CheckerOption.containsBuilder]. - * - * @return The plant to support a fluent API. - */ -private fun , S : IterableContains.SearchBehaviour> IterableContains.CheckerOption.addAssertion( - assertion: Assertion -): AssertionPlant = addAssertionForAssert(assertion) diff --git a/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/iterableContainsInAnyOrderOnlyCreators.kt b/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/iterableContainsInAnyOrderOnlyCreators.kt deleted file mode 100644 index ac11967bd..000000000 --- a/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/iterableContainsInAnyOrderOnlyCreators.kt +++ /dev/null @@ -1,137 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") -@file:JvmMultifileClass -@file:JvmName("IterableContainsInAnyOrderOnlyCreatorsKt") -package ch.tutteli.atrium.api.cc.en_GB - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.domain.builders.AssertImpl -import ch.tutteli.atrium.domain.builders.creating.basic.contains.addAssertionForAssert -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains -import ch.tutteli.kbox.glue -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InAnyOrderOnlySearchBehaviour -import kotlin.jvm.JvmMultifileClass -import kotlin.jvm.JvmName - - -/** - * Finishes the specification of the sophisticated `contains` assertion where the [Iterable] needs to contain only the - * [expected] value. - * - * Delegates to `values(expected)`. - * - * @param expected The value which is expected to be contained within the [Iterable]. - * - * @return The [AssertionPlant] for which the assertion was built to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated( - "Switch from api-cc-en_GB to api-fluent-en_GB; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.value(expected)", - "ch.tutteli.atrium.api.fluent.en_GB.value" - ) -) -fun > IterableContains.Builder.value(expected: E): AssertionPlant - = values(expected) - -/** - * Finishes the specification of the sophisticated `contains` assertion where the [expected] - * value as well as the [otherExpected] values (if given) need to be - * contained in [Iterable] where it does not matter in which order but only as - * many entries should be returned by the [Iterable] as values defined. - * - * @param expected The value which is expected to be contained within the [Iterable]. - * @param otherExpected Additional values which are expected to be contained within [Iterable]. - * - * @return The [AssertionPlant] for which the assertion was built to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated( - "Switch from api-cc-en_GB to api-fluent-en_GB; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.values(expected, *otherExpected)", - "ch.tutteli.atrium.api.fluent.en_GB.values" - ) -) -fun > IterableContains.Builder.values(expected: E, vararg otherExpected: E): AssertionPlant - = addAssertion(AssertImpl.iterable.contains.valuesInAnyOrderOnly(this, expected glue otherExpected)) - -/** - * Finishes the specification of the sophisticated `contains` assertion where the [Iterable] needs to contain only one - * entry which holds all assertions created by the given [assertionCreatorOrNull] or is `null` in case - * [assertionCreatorOrNull] is defined as `null`. - * - * Delegates to `entries(assertionCreatorOrNull)`. - * - * @param assertionCreatorOrNull The identification lambda which creates the assertions which the entry we are looking - * for has to hold; or in other words, the function which defines whether an entry is the one we are looking for - * or not. In case it is defined as `null`, then an entry is identified if it is `null` as well. - * - * @return The [AssertionPlant] for which the assertion was built to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated( - "Switch from api-cc-en_GB to api-fluent-en_GB; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.entry(asSubExpect(assertionCreatorOrNull))", - "ch.tutteli.atrium.domain.builders.migration.asSubExpect", - "ch.tutteli.atrium.api.fluent.en_GB.entry" - ) -) -fun > IterableContains.Builder.entry(assertionCreatorOrNull: (Assert.() -> Unit)?): AssertionPlant - = entries(assertionCreatorOrNull) - -/** - * Finishes the specification of the sophisticated `contains` assertion where an entry needs to be contained in the - * [Iterable] which holds all assertions [assertionCreatorOrNull] might create or needs to be `null` in case - * [assertionCreatorOrNull] is defined as `null` -- likewise an entry for each - * [otherAssertionCreatorsOrNulls] needs to be contained in the [Iterable] where it does not matter in which order the - * entries appear but only as many entries should be returned by the [Iterable] as assertion creators are defined. - * - * Notice, that a first-wins strategy applies which means your assertion creator lambdas -- which kind of serve as - * identification lambdas -- should be ordered in such a way that the most specific identification lambda appears - * first, not that a less specific lambda wins. For instance, given a `setOf(1, 2)` you should not search for - * `entries({ isGreaterThan(0) }, { toBe(1) })` but for - * `entries({ toBe(1) }, { isGreaterThan(0) })` otherwise - * `isGreaterThan(0)` matches `1` before `toBe(1)` would match it. As a consequence `toBe(1)` could only match the - * entry which is left -- in this case `2` -- and of course this would fail. - * - * @param assertionCreatorOrNull The identification lambda which creates the assertions which the entry we are looking for - * has to hold; or in other words, the function which defines whether an entry is the one we are looking for - * or not. In case it is defined as `null`, then an entry is identified if it is `null` as well. - * @param otherAssertionCreatorsOrNulls Additional identification lambdas which each identify (separately) an entry - * which we are looking for (see [assertionCreatorOrNull] for more information). - * - * @return The [AssertionPlant] for which the assertion was built to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated( - "Switch from api-cc-en_GB to api-fluent-en_GB; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.entries(\n" + - "asSubExpect(assertionCreatorOrNull),\n" + - "*otherAssertionCreatorsOrNulls.map { asSubExpect(it) }.toTypedArray()\n" + - ")", - "ch.tutteli.atrium.domain.builders.migration.asSubExpect", - "ch.tutteli.atrium.api.fluent.en_GB.entries" - ) -) -fun > IterableContains.Builder.entries( - assertionCreatorOrNull: (Assert.() -> Unit)?, - vararg otherAssertionCreatorsOrNulls: (Assert.() -> Unit)? -): AssertionPlant - = addAssertion(AssertImpl.iterable.contains.entriesInAnyOrderOnlyWithAssert(this, assertionCreatorOrNull glue otherAssertionCreatorsOrNulls)) - -/** - * Helper method to simplify adding assertions to the plant which itself is stored in - * [CharSequenceContains.CheckerOption.containsBuilder]. - * - * @return The plant to support a fluent API. - */ -internal fun , S : IterableContains.SearchBehaviour> IterableContains.Builder.addAssertion( - assertion: Assertion -): AssertionPlant = addAssertionForAssert(assertion) diff --git a/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/iterableContainsInOrderOnlyCreators.kt b/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/iterableContainsInOrderOnlyCreators.kt deleted file mode 100644 index e05c47201..000000000 --- a/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/iterableContainsInOrderOnlyCreators.kt +++ /dev/null @@ -1,113 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") -@file:JvmMultifileClass -@file:JvmName("IterableContainsInOrderOnlyCreatorsKt") -package ch.tutteli.atrium.api.cc.en_GB - -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.domain.builders.AssertImpl -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InOrderOnlySearchBehaviour -import ch.tutteli.kbox.glue -import kotlin.jvm.JvmMultifileClass -import kotlin.jvm.JvmName - -/** - * Finishes the specification of the sophisticated `contains` assertion where the [Iterable] needs to contain only the - * [expected] value. - * - * Delegates to `values(expected)`. - * - * @param expected The value which is expected to be contained within the [Iterable]. - * - * @return The [AssertionPlant] for which the assertion was built to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated( - "Switch from api-cc-en_GB to api-fluent-en_GB; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.value(expected)", - "ch.tutteli.atrium.api.fluent.en_GB.value" - ) -) -fun > IterableContains.Builder.value(expected: E): AssertionPlant - = values(expected) - -/** - * Finishes the specification of the sophisticated `contains` assertion where the [Iterable] needs to contain only the - * [expected] value as well as the [otherExpected] values - * (if given) in the specified order. - * - * @param expected The value which is expected to be contained within the [Iterable]. - * @param otherExpected Additional values which are expected to be contained within [Iterable]. - * - * @return The [AssertionPlant] for which the assertion was built to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated( - "Switch from api-cc-en_GB to api-fluent-en_GB; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.values(expected, *otherExpected)", - "ch.tutteli.atrium.api.fluent.en_GB.values" - ) -) -fun > IterableContains.Builder.values(expected: E, vararg otherExpected: E): AssertionPlant - = addAssertion(AssertImpl.iterable.contains.valuesInOrderOnly(this, expected glue otherExpected)) - -/** - * Finishes the specification of the sophisticated `contains` assertion where the [Iterable] needs to contain only a - * single entry which holds all assertions created by the given [assertionCreatorOrNull] or needs to be `null` - * in case [assertionCreatorOrNull] is defined as `null`. - * - * Delegates to `entries(assertionCreatorOrNull)`. - * - * @param assertionCreatorOrNull The identification lambda which creates the assertions which the entry we are looking - * for has to hold; or in other words, the function which defines whether an entry is the one we are looking for - * or not. In case it is defined as `null`, then an entry is identified if it is `null` as well. - * - * @return The [AssertionPlant] for which the assertion was built to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated( - "Switch from api-cc-en_GB to api-fluent-en_GB; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.entry(asSubExpect(assertionCreatorOrNull))", - "ch.tutteli.atrium.domain.builders.migration.asSubExpect", - "ch.tutteli.atrium.api.fluent.en_GB.entry" - ) -) -fun > IterableContains.Builder.entry(assertionCreatorOrNull: (Assert.() -> Unit)?): AssertionPlant - = entries(assertionCreatorOrNull) - -/** - * Finishes the specification of the sophisticated `contains` assertion where the [Iterable] needs to contain only an - * entry which holds all assertions [assertionCreatorOrNull] might create or is `null` in case [assertionCreatorOrNull] - * is defined as `null` and likewise a further entry for each - * [otherAssertionCreatorsOrNulls] (if given) whereas the entries have to appear in the specified order. - * - * @param assertionCreatorOrNull The identification lambda which creates the assertions which the entry we are looking - * for has to hold; or in other words, the function which defines whether an entry is the one we are looking for - * or not. In case it is defined as `null`, then an entry is identified if it is `null` as well. - * @param otherAssertionCreatorsOrNulls Additional identification lambdas which each identify (separately) an entry - * which we are looking for (see [assertionCreatorOrNull] for more information). - * - * @return The [AssertionPlant] for which the assertion was built to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated( - "Switch from api-cc-en_GB to api-fluent-en_GB; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.entries(\n" + - "asSubExpect(assertionCreatorOrNull),\n" + - "*otherAssertionCreatorsOrNulls.map { asSubExpect(it) }.toTypedArray()\n" + - ")", - "ch.tutteli.atrium.domain.builders.migration.asSubExpect", - "ch.tutteli.atrium.api.fluent.en_GB.entries" - ) -) -fun > IterableContains.Builder.entries( - assertionCreatorOrNull: (Assert.() -> Unit)?, - vararg otherAssertionCreatorsOrNulls: (Assert.() -> Unit)? -): AssertionPlant - = addAssertion(AssertImpl.iterable.contains.entriesInOrderOnlyWithAssert(this, assertionCreatorOrNull glue otherAssertionCreatorsOrNulls)) diff --git a/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/iterableContainsInOrderOnlyGroupedCreators.kt b/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/iterableContainsInOrderOnlyGroupedCreators.kt deleted file mode 100644 index d56b671c1..000000000 --- a/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/iterableContainsInOrderOnlyGroupedCreators.kt +++ /dev/null @@ -1,92 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") -@file:JvmMultifileClass -@file:JvmName("IterableContainsInOrderOnlyGroupedCreatorsKt") -package ch.tutteli.atrium.api.cc.en_GB - -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.domain.builders.AssertImpl -import ch.tutteli.atrium.domain.builders.utils.Group -import ch.tutteli.atrium.domain.builders.utils.groupsToList -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InOrderOnlyGroupedWithinSearchBehaviour -import kotlin.jvm.JvmMultifileClass -import kotlin.jvm.JvmName - -/** - * Finishes the specification of the sophisticated `contains` assertion where the expected [firstGroup] as well as - * the [secondGroup] and optionally [otherExpectedGroups] of values need to be contained in [Iterable] - * as only elements and in the specified order whereas the values within the groups can occur in any order. - * - * This function will be renamed on a JVM level to `inAnyOrder` with v1.0.0 - * - * @param firstGroup A group of values which have to appear at first within the [Iterable]. - * @param secondGroup A group of values which have to appear after the values of the [firstGroup] within the [Iterable]. - * @param otherExpectedGroups Additional groups of values which are expected to appear after the [secondGroup] within - * [Iterable] whereas the groups have to appear in the given order. - * - * @return The [AssertionPlant] for which the assertion was built to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated( - "Switch from api-cc-en_GB to api-fluent-en_GB; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.inAnyOrder(firstGroup, secondGroup, *otherExpectedGroups)", - "ch.tutteli.atrium.api.fluent.en_GB.inAnyOrder" - ) -) -@JvmName("inAnyOrderNullableValues") -fun > IterableContains.Builder.inAnyOrder( - firstGroup: Group, - secondGroup: Group, - vararg otherExpectedGroups: Group -): AssertionPlant = addAssertion( - AssertImpl.iterable.contains.valuesInOrderOnlyGrouped( - this, - groupsToList(firstGroup, secondGroup, otherExpectedGroups) - ) -) - -/** - * Finishes the specification of the sophisticated `contains` assertion where the expected [firstGroup] as well as - * the [secondGroup] and optionally [otherExpectedGroups] of identification lambdas, identifying an entry, - * need to be contained in [Iterable] as only elements and in the specified order whereas - * the identification lambdas within the groups can occur in any order. - * - * An identification lambda can also be defined as `null` in which case it matches an entry which is `null` as well. - * Have a look at [entries] for more information about identification lambdas. - * - * This function will be renamed on a JVM level to `inAnyOrderEntries` with v1.0.0 - * - * @param firstGroup A group of identification lambdas which have to appear at first within the [Iterable]. - * @param secondGroup A group of identification lambdas which have to appear after the values of the [firstGroup] within the [Iterable]. - * @param otherExpectedGroups Additional groups of values which are expected to appear after the [secondGroup] within - * [Iterable] whereas the groups have to appear in the given order. - * - * @return The [AssertionPlant] for which the assertion was built to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated( - "Switch from api-cc-en_GB to api-fluent-en_GB; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.inAnyOrder(" + - "asExpectGroup(order.firstGroup)," + - "asExpectGroup(order.secondGroup), " + - "*order.otherExpectedGroups.map { asExpectGroup(it) }.toTypedArray())"+ - ")", - "ch.tutteli.atrium.api.fluent.en_GB.inAnyOrder", - "ch.tutteli.atrium.domain.builders.migration.asExpectGroup" - ) -) -@JvmName("inAnyOrderNullableEntries") -fun > IterableContains.Builder.inAnyOrder( - firstGroup: Group<(Assert.() -> Unit)?>, - secondGroup: Group<(Assert.() -> Unit)?>, - vararg otherExpectedGroups: Group<(Assert.() -> Unit)?> -): AssertionPlant = addAssertion( - AssertImpl.iterable.contains.entriesInOrderOnlyGroupedWithAssert( - this, - groupsToList(firstGroup, secondGroup, otherExpectedGroups) - ) -) diff --git a/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/iterableContainsSearchBehaviours.kt b/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/iterableContainsSearchBehaviours.kt deleted file mode 100644 index 47af4817e..000000000 --- a/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/iterableContainsSearchBehaviours.kt +++ /dev/null @@ -1,106 +0,0 @@ -@file:Suppress("DEPRECATION" /* will be removed with 1.0.0 */) -package ch.tutteli.atrium.api.cc.en_GB - -import ch.tutteli.atrium.domain.builders.AssertImpl -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.* -import kotlin.jvm.JvmName - -/** - * Defines that the search behaviour "find entries `in any order` in the [Iterable]" shall be applied to this - * sophisticated `contains` in [Iterable] assertion. - * - * @return The newly created builder. - */ -@Deprecated( - "Switch from api-cc-en_GB to api-fluent-en_GB; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.inAnyOrder", - "ch.tutteli.atrium.api.fluent.en_GB.inAnyOrder" - ) -) -val > IterableContains.Builder.inAnyOrder - get() = AssertImpl.iterable.contains.searchBehaviours.inAnyOrder(this) - -/** - * Defines that the constraint "`only` the specified entries exist in the [Iterable]" shall be applied to this - * sophisticated `contains` [Iterable] assertion. - * - * @return The newly created builder. - */ -@Deprecated( - "Switch from api-cc-en_GB to api-fluent-en_GB; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.inAnyOrder", - "ch.tutteli.atrium.api.fluent.en_GB.only" - ) -) -val > IterableContains.Builder.only - @JvmName("butOnly") - get() = AssertImpl.iterable.contains.searchBehaviours.inAnyOrderOnly(this) - - -/** - * Defines that the search behaviour "find entries `in order` in the [Iterable]" shall be applied to this - * sophisticated `contains` in [Iterable] assertion. - * - * @return The newly created builder. - */ -@Deprecated( - "Switch from api-cc-en_GB to api-fluent-en_GB; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.inAnyOrder", - "ch.tutteli.atrium.api.fluent.en_GB.inOrder" - ) -) -val > IterableContains.Builder.inOrder - get() = AssertImpl.iterable.contains.searchBehaviours.inOrder(this) - -/** - * Defines that the constraint "`only` the specified entries exist in the [Iterable]" shall be applied to this - * sophisticated `contains in order` [Iterable] assertion. - * - * @return The newly created builder. - */ -//TODO deprecate as soon as https://youtrack.jetbrains.com/issue/KT-33398 is fixed -//@Deprecated( -// "Switch from api-cc-en_GB to api-fluent-en_GB; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", -// ReplaceWith( -// "this.inAnyOrder", -// "ch.tutteli.atrium.api.fluent.en_GB.only" -// ) -//) -val > IterableContains.Builder.only - @JvmName("andOnly") - get() = AssertImpl.iterable.contains.searchBehaviours.inOrderOnly(this) - -/** - * Defines that the [Iterable] contains `in order only` groups of entries - * whereas the order within the group is specified as next step. - * - * @return The newly created builder. - */ -@Deprecated( - "Switch from api-cc-en_GB to api-fluent-en_GB; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.inAnyOrder", - "ch.tutteli.atrium.api.fluent.en_GB.grouped" - ) -) -val > IterableContains.Builder.grouped - get() = AssertImpl.iterable.contains.searchBehaviours.inOrderOnlyGrouped(this) - -/** - * A filler word to emphasis that the next step defines the order within expected groups of values. - * - * @return The newly created builder. - */ -@Deprecated( - "Switch from api-cc-en_GB to api-fluent-en_GB; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.inAnyOrder", - "ch.tutteli.atrium.api.fluent.en_GB.within" - ) -) -val > IterableContains.Builder.within - get() = AssertImpl.iterable.contains.searchBehaviours.inOrderOnlyGroupedWithin(this) diff --git a/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/listAssertions.kt b/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/listAssertions.kt deleted file mode 100644 index b767ee0f8..000000000 --- a/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/listAssertions.kt +++ /dev/null @@ -1,68 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") -package ch.tutteli.atrium.api.cc.en_GB - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.AssertionPlantNullable -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.domain.builders.AssertImpl - -/** - * Makes the assertion that the given [index] is within the bounds of [Assert.subject][SubjectProvider.subject], - * creates a feature assertion plant for the corresponding element and returns the newly created plant. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the given [index] is out of bound. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().get(index).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.fluent.en_GB.get" - ) -) -fun > Assert.get(index: Int): Assert - = AssertImpl.list.get(this, index) - -/** - * Makes the assertion that the given [index] is within the bounds of [Assert.subject][SubjectProvider.subject] and that - * the corresponding element holds all assertions the given [assertionCreator] might create for it. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if a created [Assertion]s (by calling [assertionCreator]) - * does not hold. - * @throws IllegalArgumentException in case the given [assertionCreator] did not create a single assertion. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.apply { asExpect().get(index).asAssert(assertionCreator) }", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.fluent.en_GB.get" - ) -) -fun > Assert.get(index: Int, assertionCreator: Assert.() -> Unit) - = addAssertion(AssertImpl.list.get(this, index, assertionCreator)) - -/** - * Makes the assertion that the given [index] is within the bounds of [Assert.subject][SubjectProvider.subject], - * creates a feature assertion plant for the corresponding nullable element and returns the newly created plant. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the given [index] is out of bound. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().get(index).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.fluent.en_GB.get" - ) -) -fun > Assert.get(index: Int): AssertionPlantNullable - = AssertImpl.list.getNullable(this, index) diff --git a/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/mapAssertions.kt b/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/mapAssertions.kt deleted file mode 100644 index af1124371..000000000 --- a/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/mapAssertions.kt +++ /dev/null @@ -1,340 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") -package ch.tutteli.atrium.api.cc.en_GB - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.creating.AssertionPlantNullable -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.domain.builders.AssertImpl -import ch.tutteli.atrium.domain.builders.ExpectImpl -import ch.tutteli.kbox.glue -import kotlin.js.JsName - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] contains a key as defined by [keyValuePair]'s [Pair.first] - * with a corresponding value as defined by [keyValuePair]'s [Pair.second] -- optionally the same assertions - * are created for the [otherPairs]. - * - * Notice, that it does not search for unique matches. Meaning, if the map is `mapOf('a' to 1)` and [keyValuePair] is - * defined as `'a' to 1` and one of the [otherPairs] is defined as `'a' to 1` as well, then both match, - * even though they match the same entry. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().contains(keyValuePair, *otherPairs).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.fluent.en_GB.contains" - ) -) -fun > Assert.contains(keyValuePair: Pair, vararg otherPairs: Pair) - = addAssertion(AssertImpl.map.contains(this, keyValuePair glue otherPairs)) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] contains a key as defined by [keyValue]'s [KeyValue.key] - * with a corresponding value which either holds all assertions [keyValue]'s - * [KeyValue.valueAssertionCreatorOrNull] might create or needs to be `null` in case - * [KeyValue.valueAssertionCreatorOrNull] is defined as `null` - * -- optionally the same assertions are created for the [otherKeyValues]. - * - * Notice, that it does not search for unique matches. Meaning, if the map is `mapOf('a' to 1)` and [keyValue] is - * defined as `Key('a') { isGreaterThan(0) }` and one of the [otherKeyValues] is defined as `Key('a') { isLessThan(2) }` - * , then both match, even though they match the same entry. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().contains(keyValue, *otherKeyValues).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.fluent.en_GB.contains" - ) -) -fun > Assert.contains( - keyValue: KeyValue, - vararg otherKeyValues: KeyValue -) = addAssertion(AssertImpl.map.containsKeyWithValueAssertions(this, (keyValue glue otherKeyValues).map { it.toPair() })) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] contains the given [key]. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().containsKey(key).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.fluent.en_GB.containsKey" - ) -) -fun Assert>.containsKey(key: K) - = addAssertion(AssertImpl.map.containsKey(this, key)) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] does not contain the given [key]. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().containsNotKey(key).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.fluent.en_GB.containsNotKey" - ) -) -fun Assert>.containsNotKey(key: K) - = addAssertion(AssertImpl.map.containsNotKey(this, key)) - - - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] contains the given [key], creates a feature - * assertion plant for the corresponding value and returns the newly created plant. - * - * @return The newly created plant for the feature - * @throws AssertionError Might throw an [AssertionError] if the given [key] does not exist. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().getExisting(key).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.fluent.en_GB.getExisting" - ) -) -@JsName("getExisting") -fun > Assert.getExisting(key: K): Assert - = AssertImpl.map.getExisting(this, key) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] contains the given [key] and that - * the corresponding value holds all assertions the given [assertionCreator] might create for it. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if a created [Assertion]s (by calling [assertionCreator]) - * does not hold. - * @throws IllegalArgumentException in case the given [assertionCreator] did not create a single assertion. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().apply { getExisting(key).asAssert(assertionCreator) }.asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.fluent.en_GB.getExisting" - ) -) -fun > Assert.getExisting(key: K, assertionCreator: Assert.() -> Unit) - = addAssertion(AssertImpl.map.getExisting(this, key, assertionCreator)) - - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] contains the given [key], creates a feature - * assertion plant for the corresponding nullable value and returns the newly created plant. - * - * @return The newly created plant for the feature - * @throws AssertionError Might throw an [AssertionError] if the given [key] does not exist. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().getExisting(key).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.fluent.en_GB.getExisting" - ) -) -fun > Assert.getExisting(key: K): AssertionPlantNullable - = AssertImpl.map.getExistingNullable(this, key) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject]'s [Map.size] is [size]. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().apply { feature(Map<*, *>::size).toBe(size) }.asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.fluent.en_GB.feature" - ) -) -fun > Assert.hasSize(size: Int) - = addAssertion(AssertImpl.map.hasSize(this, size)) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] is an empty [Map]. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().isEmpty().asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.fluent.en_GB.isEmpty" - ) -) -fun > Assert.isEmpty() - = addAssertion(AssertImpl.map.isEmpty(this)) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] is not an empty [Map]. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().isNotEmpty().asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.fluent.en_GB.isNotEmpty" - ) -) -fun > Assert.isNotEmpty() - = addAssertion(AssertImpl.map.isNotEmpty(this)) - - -/** - * Creates an [AssertionPlant] for the [Assert.subject][SubjectProvider.subject]'s property [keys][Map.keys] so that further - * fluent calls are assertions about it. - * - * Wrap it into Kotlin's [apply] if you want to make subsequent assertions on the current subject or use the overload - * which expects an assertionCreator lambda where sub assertions are evaluated together (form an assertion group block). - * - * @return The newly created [AssertionPlant]. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().keys", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.api.fluent.en_GB.keys" - ) -) -val Assert>.keys get() : Assert> = property(Map::keys) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject]'s property [keys][Map.keys] holds all assertions the given - * [assertionCreator] might create for it. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if a created [Assertion]s (by calling [assertionCreator]) - * does not hold. - * @throws IllegalArgumentException in case the given [assertionCreator] did not create a single assertion. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().apply { keys.asAssert(assertionCreator) }.asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.fluent.en_GB.keys" - ) -) -fun > Assert.keys(assertionCreator: Assert>.() -> Unit) - = addAssertion(AssertImpl.map.keys(this, assertionCreator)) - -/** - * Creates an [AssertionPlant] for the [Assert.subject][SubjectProvider.subject]'s property [values][Map.values] so that further - * fluent calls are assertions about it. - * - * Wrap it into Kotlin's [apply] if you want to make subsequent assertions on the current subject or use the overload - * which expects an assertionCreator lambda where sub assertions are evaluated together (form an assertion group block). - * - * @return The newly created [AssertionPlant]. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().values", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.api.fluent.en_GB.values" - ) -) -val Assert>.values get() : Assert> = property(Map<*, V>::values) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject]'s property [values][Map.values] holds all assertions the given - * [assertionCreator] might create for it. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if a created [Assertion]s (by calling [assertionCreator]) - * does not hold. - * @throws IllegalArgumentException in case the given [assertionCreator] did not create a single assertion. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().apply { values.asAssert(assertionCreator) }.asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.fluent.en_GB.values" - ) -) -fun > Assert.values(assertionCreator: Assert>.() -> Unit) - = addAssertion(AssertImpl.map.values(this, assertionCreator)) - -/** - * Turns `Assert>` into `Assert>>`. - * - * The transformation as such is not reflected in reporting. - * Use `property(subject::entries)` if you want to show the transformation in reporting. - * - * @return The newly created [AssertionPlant] for the transformed subject. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().asEntries().asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.fluent.en_GB.asEntries" - ) -) -fun Assert>.asEntries(): Assert>> - = ExpectImpl.changeSubject(this).unreported { it.entries } - -/** - * Turns `Assert>` into `Assert>>` and makes the assertion that the assertions the given - * [assertionCreator] might create hold. - * - * The transformation as such is not reflected in reporting. - * Use `property(subject::entries)` if you want to show the transformation in reporting. - * - * @return The newly created [AssertionPlant] for the transformed subject. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().apply { asEntries().asAssert(assertionCreator) }.asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.fluent.en_GB.asEntries" - ) -) -fun Assert>.asEntries(assertionCreator: Assert>>.() -> Unit): Assert>> - = asEntries().addAssertionsCreatedBy(assertionCreator) diff --git a/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/mapEntryAssertions.kt b/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/mapEntryAssertions.kt deleted file mode 100644 index 201698f2e..000000000 --- a/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/mapEntryAssertions.kt +++ /dev/null @@ -1,153 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") -package ch.tutteli.atrium.api.cc.en_GB - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.creating.AssertionPlantNullable -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.domain.builders.AssertImpl - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject]'s [Map.Entry.key] is (equal to) the given [key] and - * [Map.Entry.value] is [value]. - * - * Kind of a shortcut for `key { toBe(key) }.and.value { toBe(value) }` but should be evaluated in - * an assertion group block -- which has the effect that the assertion about the value is still evaluated even - * if the assertion about the key fails. Moreover, it might be that reporting differs compared to using the long form. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().isKeyValue(key, value).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.fluent.en_GB.isKeyValue" - ) -) -fun Assert>.isKeyValue(key: K, value: V): Assert> - = addAssertion(AssertImpl.map.entry.isKeyValue(this, key, value)) - -/** - * Creates an [AssertionPlant] for the [Assert.subject][SubjectProvider.subject]'s property [key][Map.Entry.key] so that further - * fluent calls are assertions about it. - * - * Wrap it into Kotlin's [apply] if you want to make subsequent assertions on the current subject or use the overload - * which expects an assertionCreator lambda where sub assertions are evaluated together (form an assertion group block). - * - * @return The newly created [AssertionPlant]. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().key", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.api.fluent.en_GB.key" - ) -) -val Assert>.key get() : Assert = property(Map.Entry::key) - -/** - * Creates an [AssertionPlant] for the [Assert.subject][SubjectProvider.subject]'s property [key][Map.Entry.key] (which could be `null`) - * so that further fluent calls are assertions about it. - * - * Wrap it into Kotlin's [apply] if you want to make subsequent assertions on the current subject or use the overload - * which expects an assertionCreator lambda where sub assertions are evaluated together (form an assertion group block). - * - * @return The newly created [AssertionPlant]. - */ -//TODO deprecate as soon as https://youtrack.jetbrains.com/issue/KT-33398 is fixed -//@Deprecated( -// "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", -// ReplaceWith( -// "this.asExpect().key", -// "ch.tutteli.atrium.domain.builders.migration.asExpect", -// "ch.tutteli.atrium.api.fluent.en_GB.key" -// ) -//) -val Assert>.key get() : AssertionPlantNullable = property(Map.Entry::key) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject]'s property [key][Map.Entry.key] holds all assertions the given - * [assertionCreator] might create for it. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if a created [Assertion]s (by calling [assertionCreator]) - * does not hold. - * @throws IllegalArgumentException in case the given [assertionCreator] did not create a single assertion. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().apply { key.asAssert(assertionCreator) }.asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.fluent.en_GB.key" - ) -) -fun Assert>.key(assertionCreator: Assert.() -> Unit) - = addAssertion(AssertImpl.map.entry.key(this, assertionCreator)) - -/** - * Creates an [AssertionPlant] for the [Assert.subject][SubjectProvider.subject]'s property [value][Map.Entry.value] so that further - * fluent calls are assertions about it. - * - * Wrap it into Kotlin's [apply] if you want to make subsequent assertions on the current subject or use the overload - * which expects an assertionCreator lambda where sub assertions are evaluated together (form an assertion group block). - * - * @return The newly created [AssertionPlant]. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().value", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.api.fluent.en_GB.value" - ) -) -val Assert>.value get() : Assert = property(Map.Entry<*, V>::value) - -/** - * Creates an [AssertionPlant] for the [Assert.subject][SubjectProvider.subject]'s property [value][Map.Entry.value] - * (which could be `null`) so that further fluent calls are assertions about it. - * - * Wrap it into Kotlin's [apply] if you want to make subsequent assertions on the current subject or use the overload - * which expects an assertionCreator lambda where sub assertions are evaluated together (form an assertion group block). - * - * @return The newly created [AssertionPlant]. - */ -//TODO deprecate as soon as https://youtrack.jetbrains.com/issue/KT-33398 is fixed -//@Deprecated( -// "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", -// ReplaceWith( -// "this.asExpect().value", -// "ch.tutteli.atrium.domain.builders.migration.asExpect", -// "ch.tutteli.atrium.api.fluent.en_GB.value" -// ) -//) -val Assert>.value get() : AssertionPlantNullable = property(Map.Entry<*, V>::value) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject]'s property [value][Map.Entry.value] holds all assertions the given - * [assertionCreator] might create for it. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if a created [Assertion]s (by calling [assertionCreator]) - * does not hold. - * @throws IllegalArgumentException in case the given [assertionCreator] did not create a single assertion. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().apply { value.asAssert(assertionCreator) }.asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.fluent.en_GB.value" - ) -) -fun Assert>.value(assertionCreator: Assert.() -> Unit) - = addAssertion(AssertImpl.map.entry.value(this, assertionCreator)) diff --git a/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/pairAssertions.kt b/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/pairAssertions.kt deleted file mode 100644 index 95cb0ca32..000000000 --- a/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/pairAssertions.kt +++ /dev/null @@ -1,132 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") -package ch.tutteli.atrium.api.cc.en_GB - -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.creating.AssertionPlantNullable -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.domain.builders.AssertImpl - -/** - * Creates an [AssertionPlant] for the [Assert.subject][SubjectProvider.subject]'s property [first][Pair.first] so that further - * fluent calls are assertions about it. - * - * Wrap it into Kotlin's [apply] if you want to make subsequent assertions on the current subject or use the overload - * which expects an assertionCreator lambda where sub assertions are evaluated together (form an assertion group block). - * - * @return The newly created [AssertionPlant]. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().first", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.api.fluent.en_GB.first" - ) -) -val Assert>.first get() : Assert = property(Pair::first) - -/** - * Creates an [AssertionPlant] for the [Assert.subject][SubjectProvider.subject]'s property [first][Pair.first] (which could be `null`) - * so that further fluent calls are assertions about it. - * - * Wrap it into Kotlin's [apply] if you want to make subsequent assertions on the current subject or use the overload - * which expects an assertionCreator lambda where sub assertions are evaluated together (form an assertion group block). - * - * @return The newly created [AssertionPlant]. - */ -//TODO deprecate as soon as https://youtrack.jetbrains.com/issue/KT-33398 is fixed -//@Deprecated( -// "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", -// ReplaceWith( -// "this.asExpect().first", -// "ch.tutteli.atrium.domain.builders.migration.asExpect", -// "ch.tutteli.atrium.api.fluent.en_GB.first" -// ) -//) -val Assert>.first get() : AssertionPlantNullable = property(Pair::first) - - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject]'s property [first][Pair.first] holds all assertions the given - * [assertionCreator] might create for it. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if a created [Assertion]s (by calling [assertionCreator]) - * does not hold. - * @throws IllegalArgumentException in case the given [assertionCreator] did not create a single assertion. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().apply { first.asAssert(assertionCreator) }.asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.fluent.en_GB.first" - ) -) -fun Assert>.first(assertionCreator: Assert.() -> Unit) - = addAssertion(AssertImpl.pair.first(this, assertionCreator)) - -/** - * Creates an [AssertionPlant] for the [Assert.subject][SubjectProvider.subject]'s property [second][Pair.second] so that further - * fluent calls are assertions about it. - * - * Wrap it into Kotlin's [apply] if you want to make subsequent assertions on the current subject or use the overload - * which expects an assertionCreator lambda where sub assertions are evaluated together (form an assertion group block). - * - * @return The newly created [AssertionPlant]. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().second", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.api.fluent.en_GB.second" - ) -) -val Assert>.second get() : Assert = property(Pair<*, V>::second) - -/** - * Creates an [AssertionPlant] for the [Assert.subject][SubjectProvider.subject]'s property [second][Pair.second] - * (which could be `null`) so that further fluent calls are assertions about it. - * - * Wrap it into Kotlin's [apply] if you want to make subsequent assertions on the current subject or use the overload - * which expects an assertionCreator lambda where sub assertions are evaluated together (form an assertion group block). - * - * @return The newly created [AssertionPlant]. - */ -//TODO deprecate as soon as https://youtrack.jetbrains.com/issue/KT-33398 is fixed -//@Deprecated( -// "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", -// ReplaceWith( -// "this.asExpect().second", -// "ch.tutteli.atrium.domain.builders.migration.asExpect", -// "ch.tutteli.atrium.api.fluent.en_GB.second" -// ) -//) -val Assert>.second get() : AssertionPlantNullable = property(Pair<*, V>::second) - - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject]'s property [second][Pair.second] holds all assertions the given - * [assertionCreator] might create for it. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if a created [Assertion]s (by calling [assertionCreator]) - * does not hold. - * @throws IllegalArgumentException in case the given [assertionCreator] did not create a single assertion. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().apply { second.asAssert(assertionCreator) }.asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.fluent.en_GB.second" - ) -) -fun Assert>.second(assertionCreator: Assert.() -> Unit) - = addAssertion(AssertImpl.pair.second(this, assertionCreator)) diff --git a/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/parameterObjects.kt b/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/parameterObjects.kt deleted file mode 100644 index 359674f94..000000000 --- a/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/parameterObjects.kt +++ /dev/null @@ -1,83 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") - -package ch.tutteli.atrium.api.cc.en_GB - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.domain.builders.utils.Group -import ch.tutteli.atrium.domain.builders.utils.GroupWithNullableEntries -import ch.tutteli.atrium.domain.builders.utils.GroupWithoutNullableEntries -import ch.tutteli.atrium.domain.builders.utils.VarArgHelper -import ch.tutteli.kbox.glue - -/** - * Parameter object to express a [Group] with a single identification lambda. - * -In case `null` is used for the identification lambda then it is expected that the corresponding entry - * is `null` as well. - * - * @param assertionCreatorOrNull The identification lambda identifying the entry where an entry is considered - * to be identified if it holds all [Assertion]s the lambda might create. - * In case it is defined as `null`, then an entry is identified if it is `null` as well. - */ -@Deprecated("Switch from api-cc-en_GB to api-fluent-en_GB; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.") -class Entry( - val assertionCreatorOrNull: (Assert.() -> Unit)? -): GroupWithoutNullableEntries<(Assert.() -> Unit)?>, GroupWithNullableEntries<(Assert.() -> Unit)?> { - override fun toList(): List<(Assert.() -> Unit)?> = listOf(assertionCreatorOrNull) -} - -/** - * Parameter object to express a [Group] of identification lambdas. - * - * In case `null` is used for an identification lambda then it is expected that the corresponding entry - * is `null` as well. - * - * @param assertionCreatorOrNull The identification lambda identifying the entry where an entry is considered - * to be identified if it holds all [Assertion]s the lambda might create. - * In case it is defined as `null`, then an entry is identified if it is `null` as well. - * @param otherAssertionCreatorsOrNulls A variable amount of additional identification lambdas or `null`s. - */ -@Deprecated("Switch from api-cc-en_GB to api-fluent-en_GB; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.") -class Entries( - val assertionCreatorOrNull: (Assert.() -> Unit)?, - vararg val otherAssertionCreatorsOrNulls: (Assert.() -> Unit)? -) : GroupWithoutNullableEntries<(Assert.() -> Unit)?>, GroupWithNullableEntries<(Assert.() -> Unit)?>, VarArgHelper<(Assert.() -> Unit)?> { - override val expected get() = assertionCreatorOrNull - override val otherExpected get() = otherAssertionCreatorsOrNulls - - override fun toList(): List<(Assert.() -> Unit)?> = assertionCreatorOrNull glue otherAssertionCreatorsOrNulls -} - - -/** - * Parameter object to express a key/value [Pair] whose value type is a nullable lambda with an - * [Assert][AssertionPlant] receiver, which means one can either pass a lambda or `null`. - */ -@Deprecated("Switch from api-cc-en_GB to api-fluent-en_GB; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.") -data class KeyValue(val key: K, val valueAssertionCreatorOrNull: (Assert.() -> Unit)?) { - fun toPair(): Pair.() -> Unit)?> = key to valueAssertionCreatorOrNull - override fun toString(): String - = "KeyValue(key=$key, value=${if (valueAssertionCreatorOrNull == null) "null" else "lambda"})" -} - -/** - * Represents a [Group] with a single value. - */ -@Deprecated("Switch from api-cc-en_GB to api-fluent-en_GB; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.") -data class Value(val expected: T) : GroupWithNullableEntries, GroupWithoutNullableEntries { - override fun toList() = listOf(expected) -} - -/** - * Represents a [Group] of multiple values. - */ -@Deprecated("Switch from api-cc-en_GB to api-fluent-en_GB; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.") -class Values( - override val expected: T, - override vararg val otherExpected: T -) : GroupWithoutNullableEntries, GroupWithNullableEntries, VarArgHelper { - override fun toList() = listOf(expected, *otherExpected) -} diff --git a/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/sequenceAssertions.kt b/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/sequenceAssertions.kt deleted file mode 100644 index f6315619d..000000000 --- a/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/sequenceAssertions.kt +++ /dev/null @@ -1,26 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") -package ch.tutteli.atrium.api.cc.en_GB - -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.domain.builders.ExpectImpl - -/** - * Turns `Assert>` into `Assert>`. - * - * The transformation as such is not reflected in reporting. - * Use `returnValueOf(Sequence::asIterable)` if you want to show the transformation in reporting. - * - * @return The newly created [AssertionPlant] for the transformed subject. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().asIterable()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.api.fluent.en_GB.asIterable" - ) -) -fun Assert>.asIterable(): Assert> - = ExpectImpl.changeSubject(this).unreported { it.asIterable() } diff --git a/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/throwableAssertions.kt b/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/throwableAssertions.kt deleted file mode 100644 index bc28c3675..000000000 --- a/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/throwableAssertions.kt +++ /dev/null @@ -1,104 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") -package ch.tutteli.atrium.api.cc.en_GB - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.AssertionPlantNullable -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.domain.builders.AssertImpl -import ch.tutteli.atrium.domain.creating.throwable.thrown.ThrowableThrown - -/** - * Makes the assertion that the thrown [Throwable] is of type [TExpected] and holds all assertions the - * [assertionCreator] might create in addition. - * - * @return Notice, that this assertion function cannot provide a fluent API because it depends on whether the first - * assertion (a [Throwable] was thrown) holds or not. - * Define subsequent assertions via the [assertionCreator] lambda. - * - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.toThrow().asAssert(assertionCreator)", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.fluent.en_GB.toThrow" - ) -) -inline fun ThrowableThrown.Builder.toThrow(noinline assertionCreator: Assert.() -> Unit) { - AssertImpl.throwable.thrown.toBe(this, TExpected::class, assertionCreator) -} - -/** - * Makes the assertion that no [Throwable] is thrown at all. - * - * @return Notice, that this assertion function cannot provide a fluent API because we assume nothing happens, - * so there is nothing we could make assertions on in addition. - * - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.notToThrow()", - "ch.tutteli.atrium.api.fluent.en_GB.notToThrow" - ) -) -fun ThrowableThrown.Builder.notToThrow(){ - AssertImpl.throwable.thrown.nothingThrown(this) -} - -/** - * Creates an [AssertionPlantNullable] for the [message][Throwable.message] of the plant's - * [subject][SubjectProvider.subject] (which is a [Throwable]) and makes the assertion that message [notToBeNull] - * and uses [assertionCreator] which might create further [Assertion]s which are lazily evaluated at the end. - * - * @return Notice, that this assertion function cannot provide a fluent API because it depends on whether the first - * assertion [message][Throwable.message] is not null) holds or not. - * Define subsequent assertions via the [assertionCreator] lambda. - * - * @throws AssertionError Might throw an [AssertionError] in case [message][Throwable.message] is `null` - * or if an additionally created [Assertion]s (by calling [assertionCreator]) does not hold. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().message.asAssert(assertionCreator)", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.api.fluent.en_GB.message" - ) -) -fun Assert.message(assertionCreator: Assert.() -> Unit) { - property(Throwable::message).notToBeNull(assertionCreator) -} - -/** - * Creates the assertion that the [Throwable]'s [message][Throwable.message] is not null (see [message]) contains - * [expected]'s [toString] representation and the [toString] representation of the [otherExpected] (if given), - * using a non disjoint search. - * - * It is a shortcut for `message { contains.atLeast(1).values(expected, otherExpected) }` - * - * Notice that a runtime check applies which assures that only [CharSequence], [Number] and [Char] are passed - * (this function expects `Any` for your convenience, so that you can mix [String] and [Int] for instance). - * - * @return Notice, that this assertion function cannot provide a fluent API because it depends on whether the first - * assertion [message][Throwable.message] is not null) holds or not. - * - * @throws AssertionError Might throw an [AssertionError] in case [message][Throwable.message] is `null` - * or does not contain [expected] or [otherExpected]. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().messageContains(expected, *otherExpected).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.fluent.en_GB.messageContains" - ) -) -fun Assert.messageContains(expected: Any, vararg otherExpected: Any) { - message { contains(expected, *otherExpected) } -} diff --git a/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/typeTransformationAssertions.kt b/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/typeTransformationAssertions.kt deleted file mode 100644 index 485e3d3e9..000000000 --- a/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/typeTransformationAssertions.kt +++ /dev/null @@ -1,71 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") -@file:JvmMultifileClass -@file:JvmName("TypeTransformationAssertionsKt") -package ch.tutteli.atrium.api.cc.en_GB - -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.creating.AssertionPlantNullable -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.domain.builders.AssertImpl -import kotlin.jvm.JvmMultifileClass -import kotlin.jvm.JvmName - -/** - * Makes the assertion that [AssertionPlantNullable.subject][SubjectProvider.subject] is not null and if so, uses [assertionCreator] - * which could create further assertions which are added as a group. - * - * @return Notice, that this assertion function cannot provide a fluent API because it depends on whether the first - * assertion ([Assert.subject][SubjectProvider.subject] is not null) holds or not. Define subsequent assertions - * via the [assertionCreator] lambda. - * - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().notToBeNull().asAssert(assertionCreator)", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.fluent.en_GB.notToBeNull" - ) -) -inline fun AssertionPlantNullable.notToBeNull(noinline assertionCreator: Assert.() -> Unit) { - addAssertion(AssertImpl.any.isNotNull(this, T::class, assertionCreator)) -} - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] *is a* [TSub] (the same type or a sub-type) and if so, - * uses [assertionCreator] which could create further assertions which are added as a group. - * - * Notice, that asserting a function type is [flawed](https://youtrack.jetbrains.com/issue/KT-27846). - * The actual types are ignored as function types erase to Function0, - * Function1 etc. on byte code level, which means the assertion holds as long as the [Assert.subject][SubjectProvider.subject] is a - * function and has the same amount of arguments regardless if the types differ. For instance - * `assert({x: Int -> "hello"}).isA Unit>{}` holds, even though `(Int) -> String` is clearly not - * a `(String) -> Unit`. - * - * More generally speaking, the [flaw](https://youtrack.jetbrains.com/issue/KT-27826) applies to all generic types. - * For instance `isA>` would only check if the [Assert.subject][SubjectProvider.subject] is a `List` without checking if - * the element type is actually `String`. Or in other words - * `assert(listOf(1, 2)).isA>{}` holds, even though `List` is clearly not a `List`. - * - * @return Notice, that this assertion function cannot provide a fluent API because it depends on whether the first - * assertion ([Assert.subject][SubjectProvider.subject] *is a* [TSub]) holds or not. Define subsequent assertions - * via the [assertionCreator] lambda. - * - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().isA().asAssert(assertionCreator)", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.fluent.en_GB.isA" - ) -) -inline fun Assert.isA(noinline assertionCreator: AssertionPlant.() -> Unit) { - AssertImpl.any.typeTransformation.isA(this, TSub::class, assertionCreator) -} diff --git a/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-js/build.gradle b/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-js/build.gradle deleted file mode 100644 index 4cdd1069c..000000000 --- a/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-js/build.gradle +++ /dev/null @@ -1,8 +0,0 @@ -description = 'An assertion function API in en_GB with a focus on code completion for the JS platform.' + - 'It provides a fluent API in en_GB which is designed to ease the usage of code completion or ' + - 'in other words, the developer should be able to: ' + - 'start creating an assertion + code completion + . + code completion + . + and so on.' - -dependencies { - api prefixedProject('domain-builders-js') -} diff --git a/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-jvm/build.gradle b/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-jvm/build.gradle deleted file mode 100644 index bc285fda0..000000000 --- a/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-jvm/build.gradle +++ /dev/null @@ -1,27 +0,0 @@ -description = 'An assertion function API in en_GB with a focus on code completion for the JVM platform.' + - 'It provides a fluent API in en_GB which is designed to ease the usage of code completion or ' + - 'in other words, the developer should be able to: ' + - 'start creating an assertion + code completion + . + code completion + . + and so on.' - -ext.jacoco_additional = [ - prefixedProject('translations-en_GB-jvm'), - prefixedProject('domain-builders-jvm'), - prefixedProject('domain-robstoll-jvm'), - prefixedProject('domain-robstoll-lib-jvm'), - prefixedProject('core-robstoll-jvm'), - prefixedProject('core-robstoll-lib-jvm'), -] - -dependencies { - api prefixedProject('domain-builders-jvm') - - testImplementation prefixedProject('verbs-internal-jvm') -} - -//TODO should not be necessary https://youtrack.jetbrains.com/issue/KT-28124 -compileTestKotlin.dependsOn( - prefixedProject('core-robstoll-jvm').compileKotlin, - prefixedProject('core-robstoll-jvm').processResources, - prefixedProject('domain-robstoll-jvm').compileKotlin, - prefixedProject('domain-robstoll-jvm').processResources -) diff --git a/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/anyDeprecatedAssertions.kt b/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/anyDeprecatedAssertions.kt deleted file mode 100644 index 50b893225..000000000 --- a/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/anyDeprecatedAssertions.kt +++ /dev/null @@ -1,13 +0,0 @@ -@file:Suppress("DEPRECATION" /* will be removed with 1.0.0 */) -@file:JvmMultifileClass -@file:JvmName("AnyAssertionsKt") -package ch.tutteli.atrium.api.cc.en_GB - -import ch.tutteli.atrium.creating.AssertionPlantNullable -import ch.tutteli.atrium.domain.builders.AssertImpl - -@Deprecated("Use the extension function, will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", ReplaceWith("plant.toBe(null)")) -@Suppress("UNUSED_PARAMETER") -fun toBe(plant: AssertionPlantNullable, void: Void?) { - plant.addAssertion(AssertImpl.any.toBeNull(plant)) -} diff --git a/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/bigDecimalAssertions.kt b/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/bigDecimalAssertions.kt deleted file mode 100644 index 32c7e8ba0..000000000 --- a/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/bigDecimalAssertions.kt +++ /dev/null @@ -1,142 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") - -package ch.tutteli.atrium.api.cc.en_GB - -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.AssertionPlantNullable -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.domain.builders.AssertImpl -import ch.tutteli.atrium.domain.builders.bigDecimal -import ch.tutteli.atrium.domain.builders.creating.PleaseUseReplacementException -import java.math.BigDecimal - -@Deprecated("Use `isNumericallyEqualTo` if you expect that the following assertion holds:\n" + - "`assert(BigDecimal(\"10\").toBe(BigDecimal(\"10.0\"))`\n" + - "However, if you expect it to be wrong (because `BigDecimal.scale` differ), then use `isEqualIncludingScale`.", - ReplaceWith("isNumericallyEqualTo(expected) or isEqualIncludingScale(expected)")) -@Suppress("UNUSED_PARAMETER", "unused") -fun Assert.toBe(expected: T): Nothing - = throw PleaseUseReplacementException("BigDecimal.equals() compares also BigDecimal.scale, which you might not be aware of.\n" + - "If you know it and want that `scale` is included in the comparison, then use `isEqualIncludingScale`.") - -@Deprecated("Use `isNotNumericallyEqualTo` if you expect that the following assertion is wrong:\n" + - "`assert(BigDecimal(\"10\") notToBe BigDecimal(\"10.0\")`\n" + - "However, if you expect it to hold (because `BigDecimal.scale` differ), then use `isNotEqualIncludingScale`.", - ReplaceWith("isNotNumericallyEqualTo(expected) or isNotEqualIncludingScale(expected)")) -@Suppress("UNUSED_PARAMETER", "unused") -fun Assert.notToBe(expected: T): Nothing - = throw PleaseUseReplacementException("BigDecimal.equals() compares also BigDecimal.scale, which you might not be aware of.\n" + - "If you know it and want that `scale` is included in the comparison, then use `isNotEqualIncludingScale`.") - -@Deprecated("Use `notToBeNullBut { isNumericallyEqualTo(...) }` if you expect that the following assertion holds:\n" + - "`assert(BigDecimal(\"10\").toBe(BigDecimal(\"10.0\"))`\n" + - "However, if you expect it to be wrong (because `BigDecimal.scale` differ), then use `notToBeNullBut { isEqualIncludingScale(...) }`.", - ReplaceWith("notToBeNullBut { isNumericallyEqualTo(expected) } or notToBeNullBut { isEqualIncludingScale(expected) }")) -@Suppress("UNUSED_PARAMETER", "unused") -fun AssertionPlantNullable.notToBeNullBut(expected: T): Nothing - = throw PleaseUseReplacementException("BigDecimal.equals() compares also BigDecimal.scale, which you might not be aware of.\n" + - "If you know it and want that `scale` is included in the comparison, then use `notToBeNullBut { isEqualIncludingScale(expected) }`.") - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] is numerically equal to [expected]. - * - * By numerically is meant that it will not compare [BigDecimal.scale] (or in other words, - * it uses `compareTo(expected) == 0`) - * - * Most of the time you want to use this function instead of [isEqualIncludingScale] because - * [isEqualIncludingScale] compares [BigDecimal.scale]. - * Following the two functions compared: - * - `assert(BigDecimal("10")).isEqualIncludingScale(BigDecimal("10.0"))` does not hold. - * - `assert(BigDecimal("10")).isNumericallyEqualTo(BigDecimal("10.0"))` holds. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().isNumericallyEqualTo(expected).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.fluent.en_GB.isNumericallyEqualTo" - ) -) -fun Assert.isNumericallyEqualTo(expected: T) - = addAssertion(AssertImpl.bigDecimal.isNumericallyEqualTo(this, expected)) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] is not numerically equal to [expected]. - * - * By numerically is meant that it will not compare [BigDecimal.scale] (or in other words, - * it uses `compareTo(expected) != 0`) - * - * Most of the time you want to use this function instead of [isNotEqualIncludingScale] because - * [isNotEqualIncludingScale] compares [BigDecimal.scale]. - * Following the two functions compared: - * - `assert(BigDecimal("10")).isNotEqualIncludingScale(BigDecimal("10.0"))` holds. - * - `assert(BigDecimal("10")).isNotNumericallyEqualTo(BigDecimal("10.0"))` does not hold. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().isNotNumericallyEqualTo(expected).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.fluent.en_GB.isNotNumericallyEqualTo" - ) -) -fun Assert.isNotNumericallyEqualTo(expected: T) - = addAssertion(AssertImpl.bigDecimal.isNotNumericallyEqualTo(this, expected)) - - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] is equal to [expected] including [BigDecimal.scale]. - * - * Most of the time you want to use [isNumericallyEqualTo] which does not compare [BigDecimal.scale] - * in contrast to this function. - * Following the two functions compared: - * - `assert(BigDecimal("10")).isEqualIncludingScale(BigDecimal("10.0"))` does not hold. - * - `assert(BigDecimal("10")).isNumericallyEqualTo(BigDecimal("10.0"))` holds. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().isEqualIncludingScale(expected).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.fluent.en_GB.isEqualIncludingScale" - ) -) -fun Assert.isEqualIncludingScale(expected: T) - = addAssertion(AssertImpl.bigDecimal.isEqualIncludingScale(this, expected, this::isNumericallyEqualTo.name)) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] is not equal to [expected] including [BigDecimal.scale]. - * - * Most of the time you want to use [isNotNumericallyEqualTo] which does not compare [BigDecimal.scale] - * in contrast to this function. - * Following the two functions compared: - * - `assert(BigDecimal("10")).isNotEqualIncludingScale(BigDecimal("10.0"))` holds. - * - `assert(BigDecimal("10")).isNotNumericallyEqualTo(BigDecimal("10.0"))` does not hold. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().isNotEqualIncludingScale(expected).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.fluent.en_GB.isNotEqualIncludingScale" - ) -) -fun Assert.isNotEqualIncludingScale(expected: T) - = addAssertion(AssertImpl.bigDecimal.isNotEqualIncludingScale(this, expected)) diff --git a/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/deprecatedParameterObjects.kt b/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/deprecatedParameterObjects.kt deleted file mode 100644 index 98819923e..000000000 --- a/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/deprecatedParameterObjects.kt +++ /dev/null @@ -1,41 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") -@file:JvmMultifileClass -@file:JvmName("ParameterObjectsKt") -package ch.tutteli.atrium.api.cc.en_GB - -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.domain.builders.utils.GroupWithNullableEntries -import ch.tutteli.kbox.glue - -@Deprecated("Use Value instead, it was opened up to Any? in 0.8.0; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", ReplaceWith("Value(expected)")) -data class NullableValue(val expected: T) : GroupWithNullableEntries { - override fun toList() = listOf(expected) -} - -@Deprecated("Use Values instead, it was opened up to Any? in 0.8.0; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", ReplaceWith("Values(expected, *otherExpected)")) -class NullableValues(private val expected: T, vararg val otherExpected: T) : GroupWithNullableEntries{ - override fun toList() = listOf(expected, *otherExpected) -} - -@Deprecated("Use Entry instead, it was opened up to `(Assert.() -> Unit)?` in 0.8.0; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", ReplaceWith("Entry(assertionCreator)")) -class NullableEntry( - val assertionCreator: (Assert.() -> Unit)? -) : GroupWithNullableEntries<(Assert.() -> Unit)?> { - override fun toList(): List<(Assert.() -> Unit)?> = listOf(assertionCreator) -} - -@Deprecated("Use Entries instead, it was opened up to Any? in 0.8.0; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", ReplaceWith("Entries(assertionCreatorOrNull, *otherAssertionCreatorsOrNulls)")) -class NullableEntries( - val assertionCreatorOrNull: (Assert.() -> Unit)?, - vararg val otherAssertionCreatorsOrNulls: (Assert.() -> Unit)? -) : GroupWithNullableEntries<(Assert.() -> Unit)?> { - override fun toList(): List<(Assert.() -> Unit)?> = assertionCreatorOrNull glue otherAssertionCreatorsOrNulls -} - -@Deprecated("Use KeyValue instead, it was opened up to `(Assert.() -> Unit)?` in 0.8.0; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", ReplaceWith("KeyValue(key, *valueAssertionCreatorOrNull)")) -data class KeyNullableValue(val key: K, val valueAssertionCreatorOrNull: (Assert.() -> Unit)?) { - fun toPair(): Pair.() -> Unit)?> = key to valueAssertionCreatorOrNull - override fun toString(): String - = "KeyNullableValue(key=$key, value=${if (valueAssertionCreatorOrNull == null) "null" else "lambda"})" -} diff --git a/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/floatingPointJvmAssertions.kt b/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/floatingPointJvmAssertions.kt deleted file mode 100644 index b9be8e3fd..000000000 --- a/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/floatingPointJvmAssertions.kt +++ /dev/null @@ -1,36 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") -@file:JvmMultifileClass -@file:JvmName("FloatingPointAssertionsKt") - -package ch.tutteli.atrium.api.cc.en_GB - -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.domain.builders.AssertImpl -import java.math.BigDecimal - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] is equal to [expected] with an error [tolerance] - * (range including bounds). - * - * It effectively compares the absolute difference between [Assert.subject][SubjectProvider.subject] and [expected] and compares it with - * the [tolerance]. As long as it is less than or equal the [tolerance] the assertion holds; otherwise it fails. - * A more mathematical way of expressing the assertion is the following inequality: - * - * | [Assert.subject][SubjectProvider.subject] - [expected] | ≤ [tolerance] - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().toBeWithErrorTolerance(expected).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.fluent.en_GB.toBeWithErrorTolerance" - ) -) -fun Assert.toBeWithErrorTolerance(expected: BigDecimal, tolerance: BigDecimal) - = addAssertion(AssertImpl.floatingPoint.toBeWithErrorTolerance(this, expected, tolerance)) diff --git a/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/iterableContainsInAnyOrderDeprecatedCreators.kt b/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/iterableContainsInAnyOrderDeprecatedCreators.kt deleted file mode 100644 index 080d593fb..000000000 --- a/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/iterableContainsInAnyOrderDeprecatedCreators.kt +++ /dev/null @@ -1,28 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") -@file:JvmMultifileClass -@file:JvmName("IterableContainsInAnyOrderCreatorsKt") -package ch.tutteli.atrium.api.cc.en_GB - -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InAnyOrderSearchBehaviour - -@Deprecated("Use `value` instead; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", ReplaceWith("value(expectedOrNull)")) -infix fun > IterableContains.CheckerOption.nullableValue(expectedOrNull: E): AssertionPlant - = value(expectedOrNull) - -@Deprecated("Use `entry` instead; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", ReplaceWith("entry(assertionCreatorOrNull)")) -infix fun > IterableContains.CheckerOption.nullableEntry(assertionCreatorOrNull: (Assert.() -> Unit)?): AssertionPlant - = entry(assertionCreatorOrNull) - -@Deprecated("Use `values` instead; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", ReplaceWith("values(expectedOrNull, *otherExpectedOrNulls)")) -fun > IterableContains.CheckerOption.nullableValues(expectedOrNull: E, vararg otherExpectedOrNulls: E): AssertionPlant - = values(expectedOrNull, *otherExpectedOrNulls) - -@Deprecated("Use `entries` instead; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", ReplaceWith("entries(assertionCreatorOrNull, *otherAssertionCreatorsOrNulls)")) -fun > IterableContains.CheckerOption.nullableEntries( - assertionCreatorOrNull: (Assert.() -> Unit)?, - vararg otherAssertionCreatorsOrNulls: (Assert.() -> Unit)? -): AssertionPlant = entries(assertionCreatorOrNull, *otherAssertionCreatorsOrNulls) diff --git a/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/iterableContainsInAnyOrderOnlyDeprecatedCreators.kt b/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/iterableContainsInAnyOrderOnlyDeprecatedCreators.kt deleted file mode 100644 index c3639b447..000000000 --- a/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/iterableContainsInAnyOrderOnlyDeprecatedCreators.kt +++ /dev/null @@ -1,30 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") -@file:JvmMultifileClass -@file:JvmName("IterableContainsInAnyOrderOnlyCreatorsKt") -package ch.tutteli.atrium.api.cc.en_GB - -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.domain.builders.AssertImpl -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InAnyOrderOnlySearchBehaviour -import ch.tutteli.kbox.glue - -@Deprecated("Use `value` instead; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", ReplaceWith("value(expectedOrNull)")) -infix fun > IterableContains.Builder.nullableValue(expectedOrNull: E): AssertionPlant - = value(expectedOrNull) - -@Deprecated("Use `entry` instead; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", ReplaceWith("entry(assertionCreatorOrNull)")) -infix fun > IterableContains.Builder.nullableEntry(assertionCreatorOrNull: (Assert.() -> Unit)?): AssertionPlant - = entry(assertionCreatorOrNull) - -@Deprecated("Use `values` instead; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", ReplaceWith("values(expectedOrNull, *otherExpectedOrNulls)")) -fun > IterableContains.Builder.nullableValues(expectedOrNull: E, vararg otherExpectedOrNulls: E): AssertionPlant - = values(expectedOrNull, *otherExpectedOrNulls) - -@Deprecated("Use `entries` instead; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", ReplaceWith("entries(assertionCreatorOrNull, *otherAssertionCreatorsOrNulls)")) -fun > IterableContains.Builder.nullableEntries( - assertionCreatorOrNull: (Assert.() -> Unit)?, - vararg otherAssertionCreatorsOrNulls: (Assert.() -> Unit)? -): AssertionPlant = entries(assertionCreatorOrNull, *otherAssertionCreatorsOrNulls) diff --git a/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/iterableContainsInOrderOnlyDeprecatedCreators.kt b/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/iterableContainsInOrderOnlyDeprecatedCreators.kt deleted file mode 100644 index 6b99d294e..000000000 --- a/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/iterableContainsInOrderOnlyDeprecatedCreators.kt +++ /dev/null @@ -1,30 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") -@file:JvmMultifileClass -@file:JvmName("IterableContainsInOrderOnlyCreatorsKt") -package ch.tutteli.atrium.api.cc.en_GB - -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.domain.builders.AssertImpl -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InOrderOnlySearchBehaviour -import ch.tutteli.kbox.glue - -@Deprecated("Use `value` instead; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", ReplaceWith("value(expectedOrNull)")) -infix fun > IterableContains.Builder.nullableValue(expectedOrNull: E): AssertionPlant - = value(expectedOrNull) - -@Deprecated("Use `entry` instead; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", ReplaceWith("entry(assertionCreatorOrNull)")) -infix fun > IterableContains.Builder.nullableEntry(assertionCreatorOrNull: (Assert.() -> Unit)?): AssertionPlant - = entry(assertionCreatorOrNull) - -@Deprecated("Use `values` instead; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", ReplaceWith("values(expectedOrNull, *otherExpectedOrNulls)")) -fun > IterableContains.Builder.nullableValues(expectedOrNull: E, vararg otherExpectedOrNulls: E): AssertionPlant - = values(expectedOrNull, *otherExpectedOrNulls) - -@Deprecated("Use `entries` instead; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", ReplaceWith("entries(assertionCreatorOrNull, *otherAssertionCreatorsOrNulls)")) -fun > IterableContains.Builder.nullableEntries( - assertionCreatorOrNull: (Assert.() -> Unit)?, - vararg otherAssertionCreatorsOrNulls: (Assert.() -> Unit)? -): AssertionPlant = entries(assertionCreatorOrNull, *otherAssertionCreatorsOrNulls) diff --git a/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/iterableDeprecatedAssertions.kt b/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/iterableDeprecatedAssertions.kt deleted file mode 100644 index 99d716424..000000000 --- a/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/iterableDeprecatedAssertions.kt +++ /dev/null @@ -1,80 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") -@file:JvmMultifileClass -@file:JvmName("IterableAssertionsKt") -package ch.tutteli.atrium.api.cc.en_GB - -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.AssertionPlant - -@Deprecated("Use `contains` instead; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", ReplaceWith("contains(expectedOrNull)")) -fun > Assert.containsNullableValue(expectedOrNull: E): AssertionPlant - = contains(expectedOrNull) - -@Deprecated("Use `contains` instead; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", ReplaceWith("contains(expectedOrNull, *otherExpectedOrNulls)")) -fun > Assert.containsNullableValues(expectedOrNull: E, vararg otherExpectedOrNulls: E): AssertionPlant - = contains(expectedOrNull, *otherExpectedOrNulls) - -@Deprecated("Use `contains` instead; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", ReplaceWith("contains(assertionCreatorOrNull)")) -fun > Assert.containsNullableEntry(assertionCreatorOrNull: (Assert.() -> Unit)?): AssertionPlant - = contains(assertionCreatorOrNull) - -@Deprecated("Use `contains` instead; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", ReplaceWith("contains(assertionCreatorOrNull, *otherAssertionCreatorsOrNulls)")) -fun > Assert.containsNullableEntries(assertionCreatorOrNull: (Assert.() -> Unit)?, vararg otherAssertionCreatorsOrNulls: (Assert.() -> Unit)?): AssertionPlant - = contains(assertionCreatorOrNull, *otherAssertionCreatorsOrNulls) - -@Deprecated( - "Replaced with containsExactly for clearer naming; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith("containsExactly(expected, *otherExpected)", "ch.tutteli.atrium.api.cc.en_GB.containsExactly") -) -fun > Assert.containsStrictly(expected: E, vararg otherExpected: E): AssertionPlant - = containsExactly(expected, *otherExpected) - -@Deprecated( - "Replaced with containsExactly for clearer naming; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith("containsExactly(expectedOrNull)", "ch.tutteli.atrium.api.cc.en_GB.containsExactly") -) -fun > Assert.containsStrictlyNullableValue(expectedOrNull: E): AssertionPlant - = containsExactly(expectedOrNull) - -@Deprecated( - "Replaced with containsExactly for clearer naming; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith("containsExactly(expectedOrNull, *otherExpectedOrNulls)", "ch.tutteli.atrium.api.cc.en_GB.containsExactly") -) -fun > Assert.containsStrictlyNullableValues(expectedOrNull: E, vararg otherExpectedOrNulls: E): AssertionPlant - = containsExactly(expectedOrNull, *otherExpectedOrNulls) - - -@Deprecated( - "Replaced with containsExactly for clearer naming; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith("containsExactly(assertionCreator, *otherAssertionCreators)", "ch.tutteli.atrium.api.cc.en_GB.containsExactly") -) -fun > Assert.containsStrictly(assertionCreator: Assert.() -> Unit, vararg otherAssertionCreators: Assert.() -> Unit): AssertionPlant - = containsExactly(assertionCreator, *otherAssertionCreators) - -@Deprecated( - "Replaced with containsExactly for clearer naming; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith("containsExactly(assertionCreatorOrNull)", "ch.tutteli.atrium.api.cc.en_GB.containsExactly") -) -fun > Assert.containsStrictlyNullableEntry(assertionCreatorOrNull: (Assert.() -> Unit)?): AssertionPlant - = containsExactly(assertionCreatorOrNull) - -@Deprecated( - "Replaced with containsExactly for clearer naming; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith("containsExactly(assertionCreatorOrNull, *otherAssertionCreatorsOrNulls)", "ch.tutteli.atrium.api.cc.en_GB.containsExactly") -) -fun > Assert.containsStrictlyNullableEntries(assertionCreatorOrNull: (Assert.() -> Unit)?, vararg otherAssertionCreatorsOrNulls: (Assert.() -> Unit)?): AssertionPlant - = containsExactly(assertionCreatorOrNull, *otherAssertionCreatorsOrNulls) - - -@Deprecated("Use `any` instead; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", ReplaceWith("any(assertionCreatorOrNull)")) -fun > Assert.anyOfNullable(assertionCreatorOrNull: (Assert.() -> Unit)?): AssertionPlant - = any(assertionCreatorOrNull) - -@Deprecated("Use `none` instead; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", ReplaceWith("none(assertionCreatorOrNull)")) -fun > Assert.noneOfNullable(assertionCreatorOrNull: (Assert.() -> Unit)?) - = none(assertionCreatorOrNull) - -@Deprecated("Use `all` instead; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", ReplaceWith("all(assertionCreatorOrNull)")) -fun > Assert.allOfNullable(assertionCreatorOrNull: (Assert.() -> Unit)?) - = all(assertionCreatorOrNull) diff --git a/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/iterableDeprecatedContainsInOrderOnlyGroupedCreators.kt b/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/iterableDeprecatedContainsInOrderOnlyGroupedCreators.kt deleted file mode 100644 index 0273b83b8..000000000 --- a/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/iterableDeprecatedContainsInOrderOnlyGroupedCreators.kt +++ /dev/null @@ -1,60 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") -@file:JvmMultifileClass -@file:JvmName("IterableContainsInOrderOnlyGroupedCreatorsKt") -package ch.tutteli.atrium.api.cc.en_GB - -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.domain.builders.utils.GroupWithNullableEntries -import ch.tutteli.atrium.domain.builders.utils.GroupWithoutNullableEntries -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InOrderOnlyGroupedWithinSearchBehaviour - - -@Deprecated( - "Use the extension function which expects Group instead; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith("builder.inAnyOrder(firstGroup, secondGroup, *otherExpectedGroups)") -) -fun > inAnyOrder( - builder: IterableContains.Builder, - firstGroup: GroupWithoutNullableEntries, - secondGroup: GroupWithoutNullableEntries, - vararg otherExpectedGroups: GroupWithoutNullableEntries -): AssertionPlant = builder.inAnyOrder(firstGroup, secondGroup, *otherExpectedGroups) - -@Deprecated( - "Use the extension function which expects Group instead; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith("builder.inAnyOrder(firstGroup, secondGroup, *otherExpectedGroups)") -) -fun > inAnyOrder( - builder: IterableContains.Builder, - firstGroup: GroupWithNullableEntries, - secondGroup: GroupWithNullableEntries, - vararg otherExpectedGroups: GroupWithNullableEntries -): AssertionPlant = builder.inAnyOrder(firstGroup, secondGroup, *otherExpectedGroups) - -@Deprecated( - "Use the extension function which expects Group instead; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith("builder.inAnyOrder(firstGroup, secondGroup, *otherExpectedGroups)") -) -@JvmName("inAnyOrderEntries") -fun > inAnyOrder( - builder: IterableContains.Builder, - firstGroup: GroupWithoutNullableEntries.() -> Unit>, - secondGroup: GroupWithoutNullableEntries.() -> Unit>, - vararg otherExpectedGroups: GroupWithoutNullableEntries.() -> Unit> -): AssertionPlant = builder.inAnyOrder(firstGroup, secondGroup, *otherExpectedGroups) - - -@Deprecated( - "Use the extension function which expects Group instead; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.", - ReplaceWith("builder.inAnyOrder(firstGroup, secondGroup, *otherExpectedGroups)") -) -@JvmName("inAnyOrderNullableEntries") -fun > inAnyOrder( - builder: IterableContains.Builder, - firstGroup: GroupWithNullableEntries<(Assert.() -> Unit)?>, - secondGroup: GroupWithNullableEntries<(Assert.() -> Unit)?>, - vararg otherExpectedGroups: GroupWithNullableEntries<(Assert.() -> Unit)?> -): AssertionPlant = builder.inAnyOrder(firstGroup, secondGroup, *otherExpectedGroups) diff --git a/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/typeTransformationDeprecatedAssertions.kt b/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/typeTransformationDeprecatedAssertions.kt deleted file mode 100644 index e25ab3e7a..000000000 --- a/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/en_GB/typeTransformationDeprecatedAssertions.kt +++ /dev/null @@ -1,31 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") -@file:JvmMultifileClass -@file:JvmName("TypeTransformationAssertionsKt") - -package ch.tutteli.atrium.api.cc.en_GB - -import ch.tutteli.atrium.creating.AssertionPlantNullable -import ch.tutteli.atrium.creating.SubjectProvider - -/** - * Makes the assertion that [AssertionPlantNullable.subject][SubjectProvider.subject] is not null but the [expected] value. - * - * Is a shortcut for `istNichtNull { ist(expected) }` - * - * @return Notice, that this assertion function cannot provide a fluent API because it depends on whether the first - * assertion ([Assert.subject][SubjectProvider.subject] is not null) holds or not. - * - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated( - "Will be removed with 1.0.0 because it is redundant in terms of `ist(expected)` without adding enough to be a legit alternative.", - ReplaceWith("toBe(expected)") -) -inline fun AssertionPlantNullable.notToBeNullBut(expected: T) { - notToBeNull { - @Suppress("DEPRECATION") - toBe(expected) - } -} - diff --git a/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-jvm/src/module/module-info.java b/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-jvm/src/module/module-info.java deleted file mode 100644 index 52f9963ea..000000000 --- a/misc/deprecated/apis/cc-en_GB/atrium-api-cc-en_GB-jvm/src/module/module-info.java +++ /dev/null @@ -1,9 +0,0 @@ -module ch.tutteli.atrium.api.cc.en_GB { - requires ch.tutteli.atrium.domain.builders; - requires kotlin.stdlib; - - - exports ch.tutteli.atrium.api.cc.en_GB; - exports ch.tutteli.atrium.api.cc.en_GB.creating.charsequence.contains.builders; - exports ch.tutteli.atrium.api.cc.en_GB.creating.iterable.contains.builders; -} diff --git a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/build.gradle b/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/build.gradle deleted file mode 100644 index 5cbb03c89..000000000 --- a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/build.gradle +++ /dev/null @@ -1,5 +0,0 @@ -description = 'An API in en_GB with a focus on code completion and infix functions as common module.' - -dependencies { - api prefixedProject('domain-builders-common') -} diff --git a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/anyAssertions.kt b/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/anyAssertions.kt deleted file mode 100644 index af0453bce..000000000 --- a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/anyAssertions.kt +++ /dev/null @@ -1,202 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") - -@file:JvmMultifileClass -@file:JvmName("AnyAssertionsKt") -package ch.tutteli.atrium.api.cc.infix.en_GB - -import ch.tutteli.atrium.api.cc.infix.en_GB.keywords.ERR_KEYWORD_GIVEN_COLLECTION_ASSUMED -import ch.tutteli.atrium.api.cc.infix.en_GB.keywords.Keyword -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.creating.AssertionPlantNullable -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.domain.builders.AssertImpl -import ch.tutteli.atrium.domain.builders.creating.PleaseUseReplacementException -import ch.tutteli.atrium.reporting.Reporter -import kotlin.jvm.JvmMultifileClass -import kotlin.jvm.JvmName - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] is (equal to) [expected]. - * - * This method might enforce in the future, that [expected] has to be the same type as [Assert.subject][SubjectProvider.subject]. - * Currently the following is possible: `assert(1).toBe(1.0)` - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().toBe(expected).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.infix.en_GB.toBe" - ) -) -infix fun Assert.toBe(expected: T) - = addAssertion(AssertImpl.any.toBe(this, expected)) - -@Deprecated(ERR_KEYWORD_GIVEN_COLLECTION_ASSUMED, ReplaceWith("this toBe (keyword as Any)")) -@Suppress("UNUSED_PARAMETER", "unused") -infix fun Assert.toBe(keyword: Keyword): Nothing - = throw PleaseUseReplacementException("this toBe (keyword as Any)") - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] is not (equal to) [expected]. - * - * This method might enforce in the future, that [expected] has to be the same type as [Assert.subject][SubjectProvider.subject]. - * Currently the following is possible: `assert(1).notToBe(1.0)` - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().notToBe(expected).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.infix.en_GB.notToBe" - ) -) -infix fun Assert.notToBe(expected: T) - = addAssertion(AssertImpl.any.notToBe(this, expected)) - -@Deprecated(ERR_KEYWORD_GIVEN_COLLECTION_ASSUMED, ReplaceWith("this notToBe (keyword as Any)")) -@Suppress("UNUSED_PARAMETER", "unused") -infix fun Assert.notToBe(keyword: Keyword): Nothing - = throw PleaseUseReplacementException("this notToBe (keyword as Any)") - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] is the same instance as [expected]. - * - * This method might enforce in the future, that [expected] has to be the same type as [Assert.subject][SubjectProvider.subject]. - * Currently the following is possible: `assert(1).isSameAs(1.0)` - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().isSameAs(expected).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.infix-en_GB.isSameAs" - ) -) -infix fun Assert.isSameAs(expected: T) - = addAssertion(AssertImpl.any.isSame(this, expected)) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] is not the same instance as [expected]. - * - * This method might enforce in the future, that [expected] has to be the same type as [Assert.subject][SubjectProvider.subject]. - * Currently the following is possible: `assert(1).isNotSameAs(1.0)` - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().isNotSameAs(expected).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.infix-en_GB.isNotSameAs" - ) -) -infix fun Assert.isNotSameAs(expected: T) - = addAssertion(AssertImpl.any.isNotSame(this, expected)) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] is [expected]. - * - * @return Does not support a fluent API because: what else would you want to assert about `null` anyway? - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Suppress("DEPRECATION") -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().toBe(expected).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.infix.en_GB.toBe" - ) -) -inline infix fun AssertionPlantNullable.toBe(expected: T?) { - addAssertion(AssertImpl.any.isNullable(this, T::class, expected)) -} - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] is either `null` if [assertionCreatorOrNull] - * is `null` or is not `null` and holds all assertions [assertionCreatorOrNull] might create. - * - * It is a shortcut for - * ```kotlin - * if (assertionCreatorOrNull == null) - * o toBe null - * else - * o notToBeNull assertionCreatorOrNull - * ``` - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Suppress("DEPRECATION") -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().toBeNullIfNullGivenElse(assertionCreatorOrNull).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.infix.en_GB.toBeNullIfNullGivenElse" - ) -) -inline infix fun AssertionPlantNullable.toBeNullIfNullGivenElse(noinline assertionCreatorOrNull: (Assert.() -> Unit)?) { - addAssertion(AssertImpl.any.isNullIfNullGivenElse(this, T::class, assertionCreatorOrNull)) -} - -/** - * Can be used to create a group of sub assertions when using the fluent API. - * - * For instance `assert(1).isLessThan(3).and { isEven(); isGreaterThan(1) }` creates - * two assertions where the second one consists of two sub-assertions. In case the first assertion holds, then the - * second one is evaluated as a whole. Meaning, even though 1 is not even, it still evaluates that 1 is greater than 1. - * Hence the reporting might (depending on the configured [Reporter]) contain both failing sub-assertions. - * - * @return This plant to support a fluent API. - */ -infix fun AssertionPlant.and(assertionCreator: Assert.() -> Unit) - = addAssertionsCreatedBy(assertionCreator) - -/** - * Inline property referring actually to `this` and allows to write nicer sub-assertions. - * - * For instance, instead of: - * ``` - * assert("hello world"){ - * this startsWith "hello" - * this ends with "world" - * } - * ``` - * You can write - * ``` - * assert("hello world"){ - * o startsWith "hello" - * o ends with "world" - * } - * ``` - */ -@Deprecated( - "Switch from Assert to Expect and use `it` instead; will be removed with 1.0.0", - ReplaceWith( - "this.asExpect().it.asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.api.infix.en_GB.it" - ) -) -inline val Assert.o get() : Assert = this diff --git a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/arrayAssertions.kt b/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/arrayAssertions.kt deleted file mode 100644 index f086fd179..000000000 --- a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/arrayAssertions.kt +++ /dev/null @@ -1,429 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") - -package ch.tutteli.atrium.api.cc.infix.en_GB - -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.domain.builders.ExpectImpl -import kotlin.jvm.JvmName - -/** - * Turns `Assert>` into `Assert>`. - * - * The transformation as such is not reflected in reporting. - * Use `returnValueOf(Array::asIterable)` if you want to show the transformation in reporting. - * - * @return The newly created [AssertionPlant] for the transformed subject. - */ -@Suppress("DEPRECATION") -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().asList(ch.tutteli.atrium.api.infix.en_GB.o).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.infix.en_GB.asList", - "ch.tutteli.atrium.api.infix.en_GB.o" - ) -) -fun Assert>.asIterable(): Assert> - = ExpectImpl.changeSubject(this).unreported { it.asIterable() } - -/** - * Turns `Assert>` into `Assert>` and makes the assertion that the assertions the given - * [assertionCreator] might create hold. - * - * The transformation as such is not reflected in reporting. - * Use `returnValueOf(Array::asIterable)` if you want to show the transformation in reporting. - * - * @return The newly created [AssertionPlant] for the transformed subject. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().asList(ch.tutteli.atrium.api.infix.en_GB.o).asAssert(assertionCreator)", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.infix.en_GB.asList", - "ch.tutteli.atrium.api.infix.en_GB.o" - ) -) -infix fun Assert>.asIterable(assertionCreator: Assert>.() -> Unit): Assert> - = asIterable().addAssertionsCreatedBy(assertionCreator) - - -/** - * Turns `Assert` into `Assert>`. - * - * The transformation as such is not reflected in reporting. - * Use `returnValueOf(ByteArray::asIterable)` if you want to show the transformation in reporting. - * - * @return The newly created [Assert] for the transformed subject. - */ -@Suppress("DEPRECATION") -@JvmName("byteArrAsIterable") -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().asList(ch.tutteli.atrium.api.infix.en_GB.o).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.infix.en_GB.asList", - "ch.tutteli.atrium.api.infix.en_GB.o" - ) -) -fun Assert.asIterable(): Assert> - = ExpectImpl.changeSubject(this).unreported { it.asIterable() } - -/** - * Turns `Assert` into `Assert>` and makes the assertion that the assertions the given - * [assertionCreator] might create hold. - * - * The transformation as such is not reflected in reporting. - * Use `returnValueOf(ByteArray::asIterable)` if you want to show the transformation in reporting. - * - * @return The newly created [Assert] for the transformed subject. - */ -@JvmName("byteArrAsIterable") -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().asList(ch.tutteli.atrium.api.infix.en_GB.o).asAssert(assertionCreator)", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.infix.en_GB.asList", - "ch.tutteli.atrium.api.infix.en_GB.o" - ) -) -infix fun Assert.asIterable(assertionCreator: Assert>.() -> Unit): Assert> - = asIterable().addAssertionsCreatedBy(assertionCreator) - - -/** - * Turns `Assert` into `Assert>`. - * - * The transformation as such is not reflected in reporting. - * Use `returnValueOf(CharArray::asIterable)` if you want to show the transformation in reporting. - * - * @return The newly created [AssertionPlant] for the transformed subject. - */ -@Suppress("DEPRECATION") -@JvmName("charArrAsIterable") -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().asList(ch.tutteli.atrium.api.infix.en_GB.o).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.infix.en_GB.asList", - "ch.tutteli.atrium.api.infix.en_GB.o" - ) -) -fun Assert.asIterable(): Assert> - = ExpectImpl.changeSubject(this).unreported { it.asIterable() } - -/** - * Turns `Assert` into `Assert>` and makes the assertion that the assertions the given - * [assertionCreator] might create hold. - * - * The transformation as such is not reflected in reporting. - * Use `returnValueOf(CharArray::asIterable)` if you want to show the transformation in reporting. - * - * @return The newly created [AssertionPlant] for the transformed subject. - */ -@JvmName("charArrAsIterable") -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().asList(ch.tutteli.atrium.api.infix.en_GB.o).asAssert(assertionCreator)", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.infix.en_GB.asList", - "ch.tutteli.atrium.api.infix.en_GB.o" - ) -) -infix fun Assert.asIterable(assertionCreator: Assert>.() -> Unit): Assert> - = asIterable().addAssertionsCreatedBy(assertionCreator) - - -/** - * Turns `Assert` into `Assert>`. - * - * The transformation as such is not reflected in reporting. - * Use `returnValueOf(ShortArray::asIterable)` if you want to show the transformation in reporting. - * - * @return The newly created [AssertionPlant] for the transformed subject. - */ -@Suppress("DEPRECATION") -@JvmName("shortArrAsIterable") -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().asList(ch.tutteli.atrium.api.infix.en_GB.o).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.infix.en_GB.asList", - "ch.tutteli.atrium.api.infix.en_GB.o" - ) -) -fun Assert.asIterable(): Assert> - = ExpectImpl.changeSubject(this).unreported { it.asIterable() } - -/** - * Turns `Assert` into `Assert>` and makes the assertion that the assertions the given - * [assertionCreator] might create hold. - * - * The transformation as such is not reflected in reporting. - * Use `returnValueOf(ShortArray::asIterable)` if you want to show the transformation in reporting. - * - * @return The newly created [AssertionPlant] for the transformed subject. - */ -@JvmName("shortArrAsIterable") -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().asList(ch.tutteli.atrium.api.infix.en_GB.o).asAssert(assertionCreator)", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.infix.en_GB.asList", - "ch.tutteli.atrium.api.infix.en_GB.o" - ) -) -infix fun Assert.asIterable(assertionCreator: Assert>.() -> Unit): Assert> - = asIterable().addAssertionsCreatedBy(assertionCreator) - - -/** - * Turns `Assert` into `Assert>`. - * - * The transformation as such is not reflected in reporting. - * Use `returnValueOf(IntArray::asIterable)` if you want to show the transformation in reporting. - * - * @return The newly created [AssertionPlant] for the transformed subject. - */ -@Suppress("DEPRECATION") -@JvmName("intArrAsIterable") -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().asList(ch.tutteli.atrium.api.infix.en_GB.o).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.infix.en_GB.asList", - "ch.tutteli.atrium.api.infix.en_GB.o" - ) -) -fun Assert.asIterable(): Assert> - = ExpectImpl.changeSubject(this).unreported { it.asIterable() } - -/** - * Turns `Assert` into `Assert>` and makes the assertion that the assertions the given - * [assertionCreator] might create hold. - * - * The transformation as such is not reflected in reporting. - * Use `returnValueOf(IntArray::asIterable)` if you want to show the transformation in reporting. - * - * @return The newly created [AssertionPlant] for the transformed subject. - */ -@JvmName("intArrAsIterable") -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().asList(ch.tutteli.atrium.api.infix.en_GB.o).asAssert(assertionCreator)", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.infix.en_GB.asList", - "ch.tutteli.atrium.api.infix.en_GB.o" - ) -) -infix fun Assert.asIterable(assertionCreator: Assert>.() -> Unit): Assert> - = asIterable().addAssertionsCreatedBy(assertionCreator) - - -/** - * Turns `Assert` into `Assert>`. - * - * The transformation as such is not reflected in reporting. - * Use `returnValueOf(LongArray::asIterable)` if you want to show the transformation in reporting. - * - * @return The newly created [AssertionPlant] for the transformed subject. - */ -@Suppress("DEPRECATION") -@JvmName("longArrAsIterable") -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().asList(ch.tutteli.atrium.api.infix.en_GB.o).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.infix.en_GB.asList", - "ch.tutteli.atrium.api.infix.en_GB.o" - ) -) -fun Assert.asIterable(): Assert> - = ExpectImpl.changeSubject(this).unreported { it.asIterable() } - -/** - * Turns `Assert` into `Assert>` and makes the assertion that the assertions the given - * [assertionCreator] might create hold. - * - * The transformation as such is not reflected in reporting. - * Use `returnValueOf(LongArray::asIterable)` if you want to show the transformation in reporting. - * - * @return The newly created [AssertionPlant] for the transformed subject. - */ -@JvmName("longArrAsIterable") -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().asList(ch.tutteli.atrium.api.infix.en_GB.o).asAssert(assertionCreator)", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.infix.en_GB.asList", - "ch.tutteli.atrium.api.infix.en_GB.o" - ) -) -infix fun Assert.asIterable(assertionCreator: Assert>.() -> Unit): Assert> - = asIterable().addAssertionsCreatedBy(assertionCreator) - - -/** - * Turns `Assert` into `Assert>`. - * - * The transformation as such is not reflected in reporting. - * Use `returnValueOf(FloatArray::asIterable)` if you want to show the transformation in reporting. - * - * @return The newly created [AssertionPlant] for the transformed subject. - */ -@Suppress("DEPRECATION") -@JvmName("floatArrAsIterable") -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().asList(ch.tutteli.atrium.api.infix.en_GB.o).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.infix.en_GB.asList", - "ch.tutteli.atrium.api.infix.en_GB.o" - ) -) -fun Assert.asIterable(): Assert> - = ExpectImpl.changeSubject(this).unreported { it.asIterable() } - -/** - * Turns `Assert` into `Assert>` and makes the assertion that the assertions the given - * [assertionCreator] might create hold. - * - * The transformation as such is not reflected in reporting. - * Use `returnValueOf(FloatArray::asIterable)` if you want to show the transformation in reporting. - * - * @return The newly created [AssertionPlant] for the transformed subject. - */ -@JvmName("floatArrAsIterable") -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().asList(ch.tutteli.atrium.api.infix.en_GB.o).asAssert(assertionCreator)", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.infix.en_GB.asList", - "ch.tutteli.atrium.api.infix.en_GB.o" - ) -) -infix fun Assert.asIterable(assertionCreator: Assert>.() -> Unit): Assert> - = asIterable().addAssertionsCreatedBy(assertionCreator) - - -/** - * Turns `Assert` into `Assert>`. - * - * The transformation as such is not reflected in reporting. - * Use `returnValueOf(DoubleArray::asIterable)` if you want to show the transformation in reporting. - * - * @return The newly created [AssertionPlant] for the transformed subject. - */ -@Suppress("DEPRECATION") -@JvmName("doubleArrAsIterable") -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().asList(ch.tutteli.atrium.api.infix.en_GB.o).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.infix.en_GB.asList", - "ch.tutteli.atrium.api.infix.en_GB.o" - ) -) -fun Assert.asIterable(): Assert> - = ExpectImpl.changeSubject(this).unreported { it.asIterable() } - -/** - * Turns `Assert` into `Assert>` and makes the assertion that the assertions the given - * [assertionCreator] might create hold. - * - * The transformation as such is not reflected in reporting. - * Use `returnValueOf(DoubleArray::asIterable)` if you want to show the transformation in reporting. - * - * @return The newly created [AssertionPlant] for the transformed subject. - */ -@JvmName("doubleArrAsIterable") -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().asList(ch.tutteli.atrium.api.infix.en_GB.o).asAssert(assertionCreator)", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.infix.en_GB.asList", - "ch.tutteli.atrium.api.infix.en_GB.o" - ) -) -infix fun Assert.asIterable(assertionCreator: Assert>.() -> Unit): Assert> - = asIterable().addAssertionsCreatedBy(assertionCreator) - - -/** - * Turns `Assert` into `Assert>`. - * - * The transformation as such is not reflected in reporting. - * Use `returnValueOf(BooleanArray::asIterable)` if you want to show the transformation in reporting. - * - * @return The newly created [AssertionPlant] for the transformed subject. - */ -@Suppress("DEPRECATION") -@JvmName("boolArrAsIterable") -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().asList(ch.tutteli.atrium.api.infix.en_GB.o).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.infix.en_GB.asList", - "ch.tutteli.atrium.api.infix.en_GB.o" - ) -) -fun Assert.asIterable(): Assert> - = ExpectImpl.changeSubject(this).unreported { it.asIterable() } - -/** - * Turns `Assert` into `Assert>` and makes the assertion that the assertions the given - * [assertionCreator] might create hold. - * - * The transformation as such is not reflected in reporting. - * Use `returnValueOf(BooleanArray::asIterable)` if you want to show the transformation in reporting. - * - * @return The newly created [AssertionPlant] for the transformed subject. - */ -@JvmName("boolArrAsIterable") -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().asList(ch.tutteli.atrium.api.infix.en_GB.o).asAssert(assertionCreator)", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.infix.en_GB.asList", - "ch.tutteli.atrium.api.infix.en_GB.o" - ) -) -infix fun Assert.asIterable(assertionCreator: Assert>.() -> Unit): Assert> - = asIterable().addAssertionsCreatedBy(assertionCreator) diff --git a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/charSequenceAssertions.kt b/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/charSequenceAssertions.kt deleted file mode 100644 index 115e9fba5..000000000 --- a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/charSequenceAssertions.kt +++ /dev/null @@ -1,363 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") - -package ch.tutteli.atrium.api.cc.infix.en_GB - -import ch.tutteli.atrium.api.cc.infix.en_GB.creating.charsequence.contains.builders.NotCheckerOption -import ch.tutteli.atrium.api.cc.infix.en_GB.creating.charsequence.contains.builders.impl.NotCheckerOptionImpl -import ch.tutteli.atrium.api.cc.infix.en_GB.keywords.Blank -import ch.tutteli.atrium.api.cc.infix.en_GB.keywords.Empty -import ch.tutteli.atrium.api.cc.infix.en_GB.keywords.contain -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.domain.builders.AssertImpl -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains -import ch.tutteli.atrium.domain.creating.charsequence.contains.searchbehaviours.NoOpSearchBehaviour -import ch.tutteli.atrium.domain.creating.charsequence.contains.searchbehaviours.NotSearchBehaviour - -/** - * Creates a [CharSequenceContains.Builder] based on this [AssertionPlant] which allows to define - * a sophisticated `contains` assertions. - * - * @param contain Has to be `contain`. - * - * @return The newly created builder. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().contains(ch.tutteli.atrium.api.infix.en_GB.o)", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.infix.en_GB.contains", - "ch.tutteli.atrium.api.infix.en_GB.o" - ) -) -infix fun Assert.to(@Suppress("UNUSED_PARAMETER") contain: contain): CharSequenceContains.Builder - = AssertImpl.charSequence.containsBuilder(this) - -/** - * Creates a [CharSequenceContains.Builder] based on this [AssertionPlant] which allows to define - * more sophisticated `contains not` assertions. - * - * @return The newly created builder. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().containsNot(ch.tutteli.atrium.api.infix.en_GB.o)", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.infix.en_GB.containsNot", - "ch.tutteli.atrium.api.infix.en_GB.o" - ) -) -infix fun Assert.notTo(@Suppress("UNUSED_PARAMETER") contain: contain): NotCheckerOption - = NotCheckerOptionImpl(AssertImpl.charSequence.containsNotBuilder(this)) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] contains the [toString] representation of the given [expected] - * using a non disjoint search. - * - * It is a shortcut for `to contain atLeast 1 value expected` - * - * Notice that a runtime check applies which assures that only [CharSequence], [Number] and [Char] are passed (this - * function expects `Any` for your convenience, so that you can mix [String] and [Int] for instance). - * - * By non disjoint is meant that `'aa'` in `'aaaa'` is found three times and not only two times. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - * @throws IllegalArgumentException in case [expected] is not a [CharSequence], [Number] or [Char]. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().contains(expected).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.infix.en_GB.contains" - ) -) -infix fun Assert.contains(expected: Any): AssertionPlant - = this contains Values(expected) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] contains the given [values] [toString] representation - * using a non disjoint search. - * - * It is a shortcut for `to contain atLeast 1 the Values(...)` - * - * Notice that a runtime check applies which assures that only [CharSequence], [Number] and [Char] are passed (this - * function expects `Any` for your convenience, so that you can mix [String] and [Int] for instance). - * - * By non disjoint is meant that `'aa'` in `'aaaa'` is found three times and not only two times. - * Also notice, that it does not search for unique matches. Meaning, if the input of the search is `'a'` and [Values.expected] - * is defined as `'a'` and one [Values.otherExpected] is defined as `'a'` as well, then both match, even though they match the - * same sequence in the input of the search. Use the property `contains` to create a more sophisticated `contains` - * assertion where you can use options such as [atLeast], [atMost] and [exactly] to control the number of occurrences - * you expect. - * - * Meaning you might want to use: - * `to contain exactly 2 the value 'a'` - * instead of: - * `contains Values('a', 'a')` - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - * @throws IllegalArgumentException in case one of the [values] is not a [CharSequence], [Number] or [Char]. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().contains(ch.tutteli.atrium.api.infix.en_GB.values(values.expected, *values.otherExpected)).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.infix.en_GB.contains", - "ch.tutteli.atrium.api.infix.en_GB.values" - ) -) -infix fun Assert.contains(values: Values): AssertionPlant - = this to contain atLeast 1 the values - - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] contains a sequence which matches the given [pattern]. - * - * It is a shortcut for `to contain atLeast 1 regex pattern`. - * - * @return The [AssertionPlant] for which the assertion was built to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().containsRegex(pattern).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.infix.en_GB.containsRegex" - ) -) -infix fun Assert.containsRegex(pattern: String): AssertionPlant - = this contains RegexPatterns(pattern) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] contains a sequence which matches the given [patterns] - * using a non disjoint search. - * - * It is a shortcut for `to contain atLeast 1 the RegexPatterns(...)`. - * - * By non disjoint is meant that `'aa'` in `'aaaa'` is found three times and not only two times. - * Also notice, that it does not search for unique matches. Meaning, if the input of the search is `'ab'` and - * [RegexPatterns.expected] is defined as `'a(b)?'` and one of the [RegexPatterns.otherExpected] is defined as - * `'a(b)?'` as well, then both match, even though they match the same sequence in the input of the search. - * Use an option such as [atLeast], [atMost] and [exactly] to control the number of occurrences you expect. - * - * Meaning you might want to use: - * `to contain exactly 2 the regex 'a(b)?'` - * instead of: - * `to contain atLeast 1 the RegexPatterns('a(b)?', 'a(b)?')` - * - * @param patterns The patterns which are expected to have a match against the input of the search. - * - * @return The [AssertionPlant] for which the assertion was built to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().contains(regexPatterns(patterns.expected, *patterns.otherExpected)).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.infix.en_GB.contains", - "ch.tutteli.atrium.api.infix.en_GB.regexPatterns" - ) -) -infix fun Assert.contains(patterns: RegexPatterns): AssertionPlant - = this to contain atLeast 1 the patterns - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] does not [expected]'s [toString] representation. - * - * Delegates to [containsNot] [Values]. - * - * Notice that a runtime check applies which assures that only [CharSequence], [Number] and [Char] are passed (this - * function expects `Any` for your convenience, so that you can mix [String] and [Int] for instance). - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().containsNot(expected).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.infix.en_GB.containsNot" - ) -) -infix fun Assert.containsNot(expected: Any) - = this containsNot Values(expected) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] does not contain the [toString] representation - * of the given [values]. - * - * It is a shortcut for `notTo contain the Values(expected, *otherExpected)`. - * - * Notice that a runtime check applies which assures that only [CharSequence], [Number] and [Char] are passed (this - * function expects `Any` for your convenience, so that you can mix [String] and [Int] for instance). - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().containsNot(ch.tutteli.atrium.api.infix.en_GB.values(values.expected, *values.otherExpected)).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.infix.en_GB.containsNot", - "ch.tutteli.atrium.api.infix.en_GB.values" - ) -) -infix fun Assert.containsNot(values: Values) - = this notTo contain the values - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] starts with [expected]. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().startsWith(expected).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.infix.en_GB.startsWith" - ) -) -infix fun Assert.startsWith(expected: CharSequence) - = addAssertion(AssertImpl.charSequence.startsWith(this, expected)) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] does not start with [expected]. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().startsNotWith(expected).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.infix.en_GB.startsNotWith" - ) -) -infix fun Assert.startsNotWith(expected: CharSequence) - = addAssertion(AssertImpl.charSequence.startsNotWith(this, expected)) - - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] ends with [expected]. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().endsWith(expected).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.infix.en_GB.endsWith" - ) -) -infix fun Assert.endsWith(expected: CharSequence) - = addAssertion(AssertImpl.charSequence.endsWith(this, expected)) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] does not end with [expected]. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().endsNotWith(expected).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.infix.en_GB.endsNotWith" - ) -) -infix fun Assert.endsNotWith(expected: CharSequence) - = addAssertion(AssertImpl.charSequence.endsNotWith(this, expected)) - - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] [CharSequence].[kotlin.text.isEmpty]. - * - * @param Empty Has to be `Empty`. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().toBe(empty).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.infix.en_GB.toBe", - "ch.tutteli.atrium.api.infix.en_GB.empty" - ) -) -infix fun Assert.toBe(@Suppress("UNUSED_PARAMETER") Empty: Empty) - = addAssertion(AssertImpl.charSequence.isEmpty(this)) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] [CharSequence].[kotlin.text.isNotEmpty]. - * - * @param Empty Has to be `Empty`. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().notToBe(empty).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.infix.en_GB.notToBe", - "ch.tutteli.atrium.api.infix.en_GB.empty" - ) -) -infix fun Assert.notToBe(@Suppress("UNUSED_PARAMETER") Empty: Empty) - = addAssertion(AssertImpl.charSequence.isNotEmpty(this)) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] [CharSequence].[kotlin.text.isNotBlank]. - * - * @param Blank Has to be `Blank`. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().notToBe(blank).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.infix.en_GB.notToBe", - "ch.tutteli.atrium.api.infix.en_GB.blank" - ) -) -infix fun Assert.notToBe(@Suppress("UNUSED_PARAMETER") Blank: Blank) - = addAssertion(AssertImpl.charSequence.isNotBlank(this)) diff --git a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/charSequenceContainsCheckers.kt b/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/charSequenceContainsCheckers.kt deleted file mode 100644 index c01e40da6..000000000 --- a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/charSequenceContainsCheckers.kt +++ /dev/null @@ -1,121 +0,0 @@ -@file:Suppress("DEPRECATION" /* will be removed with 1.0.0 */) -package ch.tutteli.atrium.api.cc.infix.en_GB - -import ch.tutteli.atrium.api.cc.infix.en_GB.creating.charsequence.contains.builders.* -import ch.tutteli.atrium.api.cc.infix.en_GB.creating.charsequence.contains.builders.impl.* -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains.SearchBehaviour - -/** - * Restricts a `contains` assertion by specifying that the number of occurrences of the value which we are looking - * for occurs `at least` number of [times] within the search input. - * - * @param times The number which the check will compare against the actual number of times an expected value is - * found in the input of the search. - * - * @return The newly created builder. - * @throws IllegalArgumentException In case [times] is smaller than zero. - * @throws IllegalArgumentException In case [times] equals to zero; use [enthaeltNicht] instead. - */ -@Deprecated( - "Switch from api-cc-infix-en_GB to api-infix-en_GB; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.atLeast(times)", - "ch.tutteli.atrium.api.infix.en_GB.atLeast" - ) -) -infix fun CharSequenceContains.Builder.atLeast(times: Int): AtLeastCheckerOption - = AtLeastCheckerOptionImpl(times, this) - -/** - * Restricts a `contains at least` assertion by specifying that the number of occurrences of the value which we - * are looking for occurs `at most` number of [times] within the search input. - * - * The resulting restriction will be a `contains at least but at most` assertion. - * - * @param times The number which the check will compare against the actual number of times an expected value is - * found in the input of the search. - * - * @return The newly created builder. - * @throws IllegalArgumentException In case [times] is smaller than zero. - * @throws IllegalArgumentException In case [times] equals to zero; use [enthaeltNicht] instead. - * @throws IllegalArgumentException In case [times] of this `at most` restriction equals to the number of the - * `at least` restriction; use the [genau] restriction instead. - */ -@Deprecated( - "Switch from api-cc-infix-en_GB to api-infix-en_GB; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.butAtMost(times)", - "ch.tutteli.atrium.api.infix.en_GB.butAtMost" - ) -) -infix fun AtLeastCheckerOption.butAtMost(times: Int): ButAtMostCheckerOption - = ButAtMostCheckerOptionImpl(times, this, containsBuilder) - -/** - * Restricts a `contains` assertion by specifying that the number of occurrences of the value which we - * are looking for occurs `exactly` number of [times] within the search input. - * - * @param times The number which the check will compare against the actual number of times an expected value is - * found in the input of the search. - * - * @return The newly created builder. - * @throws IllegalArgumentException In case [times] is smaller than zero. - * @throws IllegalArgumentException In case [times] equals to zero; use [enthaeltNicht] instead. - */ -@Deprecated( - "Switch from api-cc-infix-en_GB to api-infix-en_GB; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.exactly(times)", - "ch.tutteli.atrium.api.infix.en_GB.exactly" - ) -) -infix fun CharSequenceContains.Builder.exactly(times: Int): ExactlyCheckerOption - = ExactlyCheckerOptionImpl(times, this) - -/** - * Restricts a `contains` assertion by specifying that the number of occurrences of the value which we - * are looking for occurs `at least` once but `at most` number of [times] within the search input. - * - * If you want to use a higher lower bound than one, then use `atLeast(2).butAtMost(3)` instead of `atMost(3)`. - * And in case you want to state that it is either not contained at all or at most a certain number of times, - * then use `notOrAtMost(2)` instead. - * - * @param times The number which the check will compare against the actual number of times an expected value is - * found in the input of the search. - * - * @return The newly created builder. - * @throws IllegalArgumentException In case [times] is smaller than zero. - * @throws IllegalArgumentException In case [times] equals to zero; use [containsNot] instead. - * @throws IllegalArgumentException In case [times] equals to one; use [exactly] instead. - */ -@Deprecated( - "Switch from api-cc-infix-en_GB to api-infix-en_GB; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.atMost(times)", - "ch.tutteli.atrium.api.infix.en_GB.atMost" - ) -) -infix fun CharSequenceContains.Builder.atMost(times: Int): AtMostCheckerOption - = AtMostCheckerOptionImpl(times, this) - -/** - * Restricts a `contains` assertion by specifying that the number of occurrences of the value which we - * are looking for occurs `not at all or at most` number of [times] within the search input. - * - * @param times The number which the check will compare against the actual number of times an expected value is - * found in the input of the search. - * - * @return The newly created builder. - * @throws IllegalArgumentException In case [times] is smaller than zero. - * @throws IllegalArgumentException In case [times] equals to zero; use [enthaeltNicht] instead. - */ -@Deprecated( - "Switch from api-cc-infix-en_GB to api-infix-en_GB; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.notOrAtMost(times)", - "ch.tutteli.atrium.api.infix.en_GB.notOrAtMost" - ) -) -infix fun CharSequenceContains.Builder.notOrAtMost(times: Int): NotOrAtMostCheckerOption - = NotOrAtMostCheckerOptionImpl(times, this) diff --git a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/charSequenceContainsCreators.kt b/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/charSequenceContainsCreators.kt deleted file mode 100644 index 255c12a5d..000000000 --- a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/charSequenceContainsCreators.kt +++ /dev/null @@ -1,384 +0,0 @@ -@file:Suppress("DEPRECATION" /* will be removed with 1.0.0 */) -package ch.tutteli.atrium.api.cc.infix.en_GB - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.domain.builders.AssertImpl -import ch.tutteli.atrium.domain.builders.creating.basic.contains.addAssertionForAssert -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains -import ch.tutteli.atrium.domain.creating.charsequence.contains.searchbehaviours.IgnoringCaseSearchBehaviour -import ch.tutteli.atrium.domain.creating.charsequence.contains.searchbehaviours.NoOpSearchBehaviour -import kotlin.jvm.JvmName - -/** - * Finishes the specification of the sophisticated `contains` assertion where the [expected] object shall be searched, - * using a non disjoint search. - * - * Delegates to `the Values(expected)`. - * - * Notice that a runtime check applies which assures that only [CharSequence], [Number] and [Char] are passed (this - * function expects `Any` for your convenience, so that you can mix [String] and [Int] for instance). - * - * By non disjoint is meant that 'aa' in 'aaaa' is found three times and not only two times. - * - * @param expected The value which is expected to be contained within the input of the search. - * - * @return The [AssertionPlant] for which the assertion was built to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - * @throws IllegalArgumentException in case [expected] is not a [CharSequence], [Number] or [Char]. - */ -@Deprecated( - "Switch from api-cc-infix-en_GB to api-infix-en_GB; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.value(expected)", - "ch.tutteli.atrium.api.infix.en_GB.value" - ) -) -infix fun CharSequenceContains.CheckerOption.value(expected: Any): AssertionPlant - = this the Values(expected) - -/** - * Finishes the specification of the sophisticated `contains` assertion where the given [values] - * shall be searched, using a non disjoint search. - * - * Notice that a runtime check applies which assures that only [CharSequence], [Number] and [Char] are passed (this - * function expects `Any` for your convenience, so that you can mix [String] and [Int] for instance). - * - * By non disjoint is meant that `'aa'` in `'aaaa'` is found three times and not only two times. - * Also notice, that it does not search for unique matches. Meaning, if the input of the search is `'a'` and [Values.expected] - * is defined as `'a'` and one [Values.otherExpected] is defined as `'a'` as well, then both match, even though they match the - * same sequence in the input of the search. Use an option such as [atLeast], [atMost] and [exactly] to control - * the number of occurrences you expect. - * - * Meaning you might want to use: - * `to contain exactly 2 the value 'a'` - * instead of: - * `to contain atLeast 1 the Values('a', 'a')` - * - * @param values The values which are expected to be contained within the input of the search. - * - * @return The [AssertionPlant] for which the assertion was built to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - * @throws IllegalArgumentException in case one of the [values] is not a [CharSequence], [Number] or [Char]. - */ -@Deprecated( - "Switch from api-cc-infix-en_GB to api-infix-en_GB; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.the(ch.tutteli.atrium.api.infix.en_GB.values(values.expected, *values.otherExpected)).asAssert()", - "ch.tutteli.atrium.api.infix.en_GB.the", - "ch.tutteli.atrium.api.infix.en_GB.values", - "ch.tutteli.atrium.domain.builders.migration.asAssert" - ) -) -infix fun CharSequenceContains.CheckerOption.the(values: Values): AssertionPlant - = addAssertion(AssertImpl.charSequence.contains.values(this, values.toList())) - - -/** - * Finishes the specification of the sophisticated `contains` assertion where the [expected] value shall be searched - * (ignoring case), using a non disjoint search. - * - * Delegates to `the Values(expected)`. - * - * Notice that a runtime check applies which assures that only [CharSequence], [Number] and [Char] are passed (this - * function expects `Any` for your convenience, so that you can mix [String] and [Int] for instance). - * - * By non disjoint is meant that 'aa' in 'aaaa' is found three times and not only two times. - * - * @param expected The value which is expected to be contained within the input of the search. - * - * @return The [AssertionPlant] for which the assertion was built to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - * @throws IllegalArgumentException in case [expected] is not a [CharSequence], [Number] or [Char]. - */ -@Deprecated( - "Switch from api-cc-infix-en_GB to api-infix-en_GB; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.value(expected)", - "ch.tutteli.atrium.api.infix.en_GB.value" - ) -) -@JvmName("valueIgnoringCase") -infix fun CharSequenceContains.CheckerOption.value(expected: Any): AssertionPlant - = this the Values(expected) - -/** - * Finishes the specification of the sophisticated `contains` assertion where the [values] - * shall be searched (ignoring case), using a non disjoint search. - * - * Notice that a runtime check applies which assures that only [CharSequence], [Number] and [Char] are passed (this - * function expects `Any` for your convenience, so that you can mix [String] and [Int] for instance). - * - * By non disjoint is meant that `'aa'` in `'aaaa'` is found three times and not only two times. - * Also notice, that it does not search for unique matches. Meaning, if the input of the search is `'a'` and [Values.expected] - * is defined as `'a'` and one [Values.otherExpected] is defined as `'a'` as well, then both match, even though they match the - * same sequence in the input of the search. Use an option such as [atLeast], [atMost] and [exactly] to control - * the number of occurrences you expect. - * - * Meaning you might want to use: - * `to contain ignoring case exactly 2 the value 'a'` - * instead of: - * `to contain ignoring case atLeast 1 the Values('a', 'a')` - * - * @param values The values which are expected to be contained within the input of the search. - * - * @return The [AssertionPlant] for which the assertion was built to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - * @throws IllegalArgumentException in case one of the [values] is not a [CharSequence], [Number] or [Char]. - */ -@Deprecated( - "Switch from api-cc-infix-en_GB to api-infix-en_GB; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.the(ch.tutteli.atrium.api.infix.en_GB.values(values.expected, *values.otherExpected)).asAssert()", - "ch.tutteli.atrium.api.infix.en_GB.the", - "ch.tutteli.atrium.api.infix.en_GB.values", - "ch.tutteli.atrium.domain.builders.migration.asAssert" - ) -) -@JvmName("valuesIgnoringCase") -infix fun CharSequenceContains.CheckerOption.the(values: Values): AssertionPlant - = addAssertion(AssertImpl.charSequence.contains.valuesIgnoringCase(this, values.toList())) - -/** - * Finishes the specification of the sophisticated `contains` assertion where the [expected] value shall be searched - * (ignoring case), using a non disjoint search where it needs to be contained at least once. - * - * Delegates to `atLeast 1 value expected`. - * - * Notice that a runtime check applies which assures that only [CharSequence], [Number] and [Char] are passed (this - * function expects `Any` for your convenience, so that you can mix [String] and [Int] for instance). - * - * By non disjoint is meant that 'aa' in 'aaaa' is found three times and not only two times. - * - * @param expected The value which is expected to be contained within the input of the search. - * - * @return The [AssertionPlant] for which the assertion was built to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - * @throws IllegalArgumentException in case [expected] is not a [CharSequence], [Number] or [Char]. - */ -@Deprecated( - "Switch from api-cc-infix-en_GB to api-infix-en_GB; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.value(expected)", - "ch.tutteli.atrium.api.infix.en_GB.value" - ) -) -infix fun CharSequenceContains.Builder.value(expected: Any): AssertionPlant - = this atLeast 1 value expected - -/** - * Finishes the specification of the sophisticated `contains` assertion where the [values] - * shall be searched (ignoring case), using a non disjoint search - * where each need to be contained at least once. - * - * Delegates to `atLeast 1 the value` - * - * By non disjoint is meant that `'aa'` in `'aaaa'` is found three times and not only two times. - * Also notice, that it does not search for unique matches. Meaning, if the input of the search is `'a'` and [Values.expected] - * is defined as `'a'` and one [Values.otherExpected] is defined as `'a'` as well, then both match, even though they match the - * same sequence in the input of the search. Use an option such as [atLeast], [atMost] and [exactly] to control - * the number of occurrences you expect. - * - * Meaning you might want to use: - * `to contain ignoring case exactly 2 the value 'a'` - * instead of: - * `to contain ignoring case atLeast 1 the Values('a', 'a')` - * - * @param values The values which are expected to be contained within the input of the search. - * - * @return The [AssertionPlant] for which the assertion was built to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - * @throws IllegalArgumentException in case one of the [values] is not a [CharSequence], [Number] or [Char]. - */ -@Deprecated( - "Switch from api-cc-infix-en_GB to api-infix-en_GB; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.the(ch.tutteli.atrium.api.infix.en_GB.values(values.expected, *values.otherExpected)).asAssert()", - "ch.tutteli.atrium.api.infix.en_GB.the", - "ch.tutteli.atrium.api.infix.en_GB.values", - "ch.tutteli.atrium.domain.builders.migration.asAssert" - ) -) -infix fun CharSequenceContains.Builder.the(values: Values): AssertionPlant - = this atLeast 1 the values - -/** - * Finishes the specification of the sophisticated `contains` assertion where the given regular expression [pattern] - * is expected to have a match, using a non disjoint search. - * - * Delegates to `the RegexPatterns(pattern)`. - * - * @param pattern The pattern which is expected to have a match against the input of the search. - * - * @return The [AssertionPlant] for which the assertion was built to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated( - "Switch from api-cc-infix-en_GB to api-infix-en_GB; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.regex(pattern)", - "ch.tutteli.atrium.api.infix.en_GB.regex" - ) -) -infix fun CharSequenceContains.CheckerOption.regex(pattern: String): AssertionPlant - = this the RegexPatterns(pattern) - -/** - * Finishes the specification of the sophisticated `contains` assertion where the given regular expression [patterns] - * are expected to have a match, using a non disjoint search. - * - * By non disjoint is meant that `'aa'` in `'aaaa'` is found three times and not only two times. - * Also notice, that it does not search for unique matches. Meaning, if the input of the search is `'ab'` and - * [patterns].[pattern][RegexPatterns.expected] is defined as `'a(b)?'` and one of the - * [patterns].[otherPatterns][RegexPatterns.otherExpected] is defined as `'a(b)?'` as well, then both match, even though - * they match the same sequence in the input of the search. Use an option such as [atLeast], [atMost] and [exactly] to - * control the number of occurrences you expect. - * - * Meaning you might want to use: - * `to contain exactly 2 the regex 'a(b)?'` - * instead of: - * `to contain atLeast 1 the RegexPatterns('a(b)?', 'a(b)?')` - * - * @param patterns The patterns which are expected to have a match against the input of the search. - * - * @return The [AssertionPlant] for which the assertion was built to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated( - "Switch from api-cc-infix-en_GB to api-infix-en_GB; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.the(regexPatterns(patterns.expected, *patterns.otherExpected)).asAssert()", - "ch.tutteli.atrium.api.infix.en_GB.the", - "ch.tutteli.atrium.api.infix.en_GB.regexPatterns", - "ch.tutteli.atrium.domain.builders.migration.asAssert" - ) -) -infix fun CharSequenceContains.CheckerOption.the(patterns: RegexPatterns): AssertionPlant - = addAssertion(AssertImpl.charSequence.contains.regex(this, patterns.toList())) - - -/** - * Finishes the specification of the sophisticated `contains` assertion where the given regular expression [pattern] - * is expected to have a match (ignoring case), using a non disjoint search. - * - * Delegates to `the RegexPatterns(pattern)`. - * - * @param pattern The patterns which is expected to have a match against the input of the search. - * - * @return The [AssertionPlant] for which the assertion was built to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated( - "Switch from api-cc-infix-en_GB to api-infix-en_GB; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.regex(pattern)", - "ch.tutteli.atrium.api.infix.en_GB.regex" - ) -) -@JvmName("regexIgnoringCase") -infix fun CharSequenceContains.CheckerOption.regex(pattern: String): AssertionPlant - = this the RegexPatterns(pattern) - -/** - * Finishes the specification of the sophisticated `contains` assertion where the given regular expression [patterns] - * are expected to have a match (ignoring case), using a non disjoint search. - * - * By non disjoint is meant that `'aa'` in `'aaaa'` is found three times and not only two times. - * Also notice, that it does not search for unique matches. Meaning, if the input of the search is `'ab'` and - * [patterns].[pattern][RegexPatterns.expected] is defined as `'a(b)?'` and one of the - * [patterns].[otherPatterns][RegexPatterns.otherExpected] is defined as `'a(b)?'` as well, then both match, even though - * they match the same sequence in the input of the search. Use an option such as [atLeast], [atMost] and [exactly] to - * control the number of occurrences you expect. - * - * Meaning you might want to use: - * `to contain ignoring case exactly 2 the regex 'a(b)?'` - * instead of: - * `to contain ignoring case atLeast 1 the RegexPatterns('a(b)?', 'a(b)?')` - * - * @param patterns The patterns which are expected to have a match against the input of the search. - * - * @return The [AssertionPlant] for which the assertion was built to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated( - "Switch from api-cc-infix-en_GB to api-infix-en_GB; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.the(regexPatterns(patterns.expected, *patterns.otherExpected)).asAssert()", - "ch.tutteli.atrium.api.infix.en_GB.the", - "ch.tutteli.atrium.api.infix.en_GB.regexPatterns", - "ch.tutteli.atrium.domain.builders.migration.asAssert" - ) -) -@JvmName("regexIgnoringCase") -infix fun CharSequenceContains.CheckerOption.the(patterns: RegexPatterns): AssertionPlant - = addAssertion(AssertImpl.charSequence.contains.regexIgnoringCase(this, patterns.toList())) - -/** - * Finishes the specification of the sophisticated `contains` assertion where the given regular expression [pattern] - * is expected to have at least one match (ignoring case), using a non disjoint search. - * - * Delegates to `the RegexPatterns(pattern)`. - * - * @param pattern The patterns which is expected to have a match against the input of the search. - * - * @return The [AssertionPlant] for which the assertion was built to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated( - "Switch from api-cc-infix-en_GB to api-infix-en_GB; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.regex(pattern)", - "ch.tutteli.atrium.api.infix.en_GB.regex" - ) -) -infix fun CharSequenceContains.Builder.regex(pattern: String): AssertionPlant - = this atLeast 1 regex pattern - -/** - * Finishes the specification of the sophisticated `contains` assertion where the given regular expression [patterns] - * are expected to have at least one match (ignoring case), using a non disjoint search. - * - * By non disjoint is meant that `'aa'` in `'aaaa'` is found three times and not only two times. - * Also notice, that it does not search for unique matches. Meaning, if the input of the search is `'ab'` and - * [patterns].[pattern][RegexPatterns.expected] is defined as `'a(b)?'` and one of the - * [patterns].[otherPatterns][RegexPatterns.otherExpected] is defined as `'a(b)?'` as well, then both match, even though - * they match the same sequence in the input of the search. Use an option such as [atLeast], [atMost] and [exactly] to - * control the number of occurrences you expect. - * - * Meaning you might want to use: - * `to contain ignoring case exactly 2 the regex 'a(b)?'` - * instead of: - * `to contain ignoring case atLeast 1 the RegexPatterns('a(b)?', 'a(b)?')` - * - * @param patterns The patterns which are expected to have a match against the input of the search. - * - * @return The [AssertionPlant] for which the assertion was built to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated( - "Switch from api-cc-infix-en_GB to api-infix-en_GB; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.the(regexPatterns(patterns.expected, *patterns.otherExpected)).asAssert()", - "ch.tutteli.atrium.api.infix.en_GB.the", - "ch.tutteli.atrium.api.infix.en_GB.regexPatterns", - "ch.tutteli.atrium.domain.builders.migration.asAssert" - ) -) -infix fun CharSequenceContains.Builder.the(patterns: RegexPatterns): AssertionPlant - = this atLeast 1 the patterns - -/** - * Helper method to simplify adding assertions to the plant which itself is stored in - * [CharSequenceContains.CheckerOption.containsBuilder]. - * - * @return The plant to support a fluent API. - */ -@Deprecated( - "Switch from api-cc-infix-en_GB to api-infix-en_GB; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.addAssertion(assertion)", - "ch.tutteli.atrium.api.infix.en_GB.addAssertion" - ) -) -private fun CharSequenceContains.CheckerOption.addAssertion(assertion: Assertion): AssertionPlant - = addAssertionForAssert(assertion) diff --git a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/charSequenceContainsSearchBehaviours.kt b/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/charSequenceContainsSearchBehaviours.kt deleted file mode 100644 index d191704a3..000000000 --- a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/charSequenceContainsSearchBehaviours.kt +++ /dev/null @@ -1,44 +0,0 @@ -@file:Suppress("DEPRECATION" /* will be removed with 1.0.0 */) -package ch.tutteli.atrium.api.cc.infix.en_GB - -import ch.tutteli.atrium.api.cc.infix.en_GB.creating.charsequence.contains.builders.NotCheckerOption -import ch.tutteli.atrium.api.cc.infix.en_GB.creating.charsequence.contains.builders.impl.NotCheckerOptionImpl -import ch.tutteli.atrium.api.cc.infix.en_GB.keywords.case -import ch.tutteli.atrium.domain.builders.AssertImpl -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains -import ch.tutteli.atrium.domain.creating.charsequence.contains.searchbehaviours.IgnoringCaseSearchBehaviour -import ch.tutteli.atrium.domain.creating.charsequence.contains.searchbehaviours.NoOpSearchBehaviour -import ch.tutteli.atrium.domain.creating.charsequence.contains.searchbehaviours.NotSearchBehaviour - -/** - * Defines that the search behaviour `ignore case` shall be applied to this sophisticated `contains` assertion. - * - * @param case Has to be `case`. - * - * @return The newly created builder. - */ -@Deprecated( - "Switch from api-cc-en_GB to api-fluent-en_GB; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.ignoringCase", - "ch.tutteli.atrium.api.infix.en_GB.ignoringCase" - ) -) -infix fun CharSequenceContains.Builder.ignoring(@Suppress("UNUSED_PARAMETER") case: case): CharSequenceContains.Builder = AssertImpl.charSequence.contains.searchBehaviours.ignoringCase(this) - -/** - * Defines that the search behaviour `ignore case` shall be applied to this sophisticated `contains not` assertion. - * - * @param case Has to be `case`. - * - * @return The newly created builder. - */ -@Deprecated( - "Switch from api-cc-en_GB to api-fluent-en_GB; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.ignoringCase", - "ch.tutteli.atrium.api.infix.en_GB.ignoringCase" - ) -) -infix fun NotCheckerOption.ignoring(@Suppress("UNUSED_PARAMETER") case: case): NotCheckerOption - = NotCheckerOptionImpl(containsBuilder ignoring case) diff --git a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/collectionAssertions.kt b/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/collectionAssertions.kt deleted file mode 100644 index af3b21cf2..000000000 --- a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/collectionAssertions.kt +++ /dev/null @@ -1,112 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") - -package ch.tutteli.atrium.api.cc.infix.en_GB - -import ch.tutteli.atrium.api.cc.infix.en_GB.keywords.Empty -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.domain.builders.AssertImpl - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject]'s [Collection.size] is [size]. - * - * Shortcut for `size toBe expectedSize` depends on the underlying implementation though. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().hasSize(size).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.infix.en_GB.hasSize" - ) -) -@Suppress("DEPRECATION") -infix fun > Assert.hasSize(size: Int) - = addAssertion(AssertImpl.collection.hasSize(this, size)) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] is an empty [Collection]. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().toBe(empty).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.infix.en_GB.toBe", - "ch.tutteli.atrium.api.infix.en_GB.empty" - ) -) -infix fun > Assert.toBe(@Suppress("UNUSED_PARAMETER") Empty: Empty) - = addAssertion(AssertImpl.collection.isEmpty(this)) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] is not an empty [Collection]. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().notToBe(empty).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.infix.en_GB.notToBe", - "ch.tutteli.atrium.api.infix.en_GB.empty" - ) -) -infix fun > Assert.notToBe(@Suppress("UNUSED_PARAMETER") Empty: Empty) - = addAssertion(AssertImpl.collection.isNotEmpty(this)) - - -/** - * Creates an [AssertionPlant] for the [Assert.subject][SubjectProvider.subject]'s property - * [size][Collection.size] so that further fluent calls are assertions about it. - * - * Wrap it into Kotlin's [apply] if you want to make subsequent assertions on the current subject or use the overload - * which expects an assertionCreatorOrNull lambda where sub assertions are evaluated together (form an assertion group block). - * - * @return The newly created [AssertionPlant]. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().size", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.api.infix.en_GB.size" - ) -) -val Assert>.size get(): Assert = property(Collection<*>::size) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject]'s property [size][Collection.size] - * holds all assertions the given [assertionCreator] might create for it. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if a created [Assertion]s (by calling [assertionCreator]) - * does not hold. - * @throws IllegalArgumentException in case the given [assertionCreator] did not create a single assertion. - */ -@Suppress("DEPRECATION") -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().size.asAssert(assertionCreator)", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.infix.en_GB.size" - ) -) -infix fun > Assert.size (assertionCreator: Assert.() -> Unit): Assert - = addAssertion(AssertImpl.collection.size(this, assertionCreator)) diff --git a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/comparableAssertions.kt b/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/comparableAssertions.kt deleted file mode 100644 index ad1ed9336..000000000 --- a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/comparableAssertions.kt +++ /dev/null @@ -1,81 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") - -package ch.tutteli.atrium.api.cc.infix.en_GB - -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.domain.builders.AssertImpl - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] is less than [expected]. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().isLessThan(expected).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.infix.en_GB.isLessThan" - ) -) -infix fun > Assert.isLessThan(expected: T) - = addAssertion(AssertImpl.comparable.isLessThan(this, expected)) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] is less than or equals [expected]. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().isLessThanOrEqual(expected).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.infix.en_GB.isLessThanOrEqual" - ) -) -infix fun > Assert.isLessOrEquals(expected: T) - = addAssertion(AssertImpl.comparable.isLessOrEquals(this, expected)) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] is greater than [expected]. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().isGreaterThan(expected).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.infix.en_GB.isGreaterThan" - ) -) -infix fun > Assert.isGreaterThan(expected: T) - = addAssertion(AssertImpl.comparable.isGreaterThan(this, expected)) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] is greater than or equals [expected]. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().isGreaterThanOrEqual(expected).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.infix.en_GB.isGreaterThanOrEqual" - ) -) -infix fun > Assert.isGreaterOrEquals(expected: T) - = addAssertion(AssertImpl.comparable.isGreaterOrEquals(this, expected)) - diff --git a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/charsequence/contains/builders/AtLeastCheckerOption.kt b/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/charsequence/contains/builders/AtLeastCheckerOption.kt deleted file mode 100644 index 8db765924..000000000 --- a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/charsequence/contains/builders/AtLeastCheckerOption.kt +++ /dev/null @@ -1,18 +0,0 @@ -//TODO remove with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.api.cc.infix.en_GB.creating.charsequence.contains.builders - -import ch.tutteli.atrium.domain.builders.creating.charsequence.contains.builders.WithTimesCheckerOption -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains - -/** - * Represents the extension point for another option after a `contains at least`-check within a sophisticated - * `contains` assertion building process for [CharSequence]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - */ -@Deprecated("Switch from api-cc-infix-en_GB to api-infix-en_GB; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.") -interface AtLeastCheckerOption - : WithTimesCheckerOption diff --git a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/charsequence/contains/builders/AtMostCheckerOption.kt b/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/charsequence/contains/builders/AtMostCheckerOption.kt deleted file mode 100644 index e01448ebe..000000000 --- a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/charsequence/contains/builders/AtMostCheckerOption.kt +++ /dev/null @@ -1,17 +0,0 @@ -//TODO remove with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.api.cc.infix.en_GB.creating.charsequence.contains.builders - -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains - -/** - * Represents the extension point for another option after a `contains at least once but at most`-check within - * a sophisticated `contains` assertion building process for [CharSequence]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - */ -@Deprecated("Switch from api-cc-infix-en_GB to api-infix-en_GB; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.") -interface AtMostCheckerOption - : CharSequenceContains.CheckerOption diff --git a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/charsequence/contains/builders/ButAtMostCheckerOption.kt b/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/charsequence/contains/builders/ButAtMostCheckerOption.kt deleted file mode 100644 index d1e0f64db..000000000 --- a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/charsequence/contains/builders/ButAtMostCheckerOption.kt +++ /dev/null @@ -1,17 +0,0 @@ -//TODO remove with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.api.cc.infix.en_GB.creating.charsequence.contains.builders - -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains - -/** - * Represents the extension point for another option after a `contains at least but at most`-check within - * a sophisticated `contains` assertion building process for [CharSequence]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - */ -@Deprecated("Switch from api-cc-infix-en_GB to api-infix-en_GB; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.") -interface ButAtMostCheckerOption - : CharSequenceContains.CheckerOption diff --git a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/charsequence/contains/builders/ExactlyCheckerOption.kt b/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/charsequence/contains/builders/ExactlyCheckerOption.kt deleted file mode 100644 index 7e5ed23fc..000000000 --- a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/charsequence/contains/builders/ExactlyCheckerOption.kt +++ /dev/null @@ -1,18 +0,0 @@ -//TODO remove with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.api.cc.infix.en_GB.creating.charsequence.contains.builders - -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains - -/** - * Represents the extension point for another option after a `contains exactly`-check within - * a sophisticated `contains` assertion building process for [CharSequence]. - * - * @param T The input type of the search. - * @param - * S The search behaviour which should be applied for the input of the search. - */ -@Deprecated("Switch from api-cc-infix-en_GB to api-infix-en_GB; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.") -interface ExactlyCheckerOption - : CharSequenceContains.CheckerOption diff --git a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/charsequence/contains/builders/NotCheckerOption.kt b/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/charsequence/contains/builders/NotCheckerOption.kt deleted file mode 100644 index 58c6ca605..000000000 --- a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/charsequence/contains/builders/NotCheckerOption.kt +++ /dev/null @@ -1,17 +0,0 @@ -//TODO remove with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.api.cc.infix.en_GB.creating.charsequence.contains.builders - -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains - -/** - * Represents the extension point for another option after a `contains not at all`-check within - * a sophisticated `contains` assertion building process for [CharSequence]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - */ -@Deprecated("Switch from api-cc-infix-en_GB to api-infix-en_GB; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.") -interface NotCheckerOption - : CharSequenceContains.CheckerOption diff --git a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/charsequence/contains/builders/NotOrAtMostCheckerOption.kt b/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/charsequence/contains/builders/NotOrAtMostCheckerOption.kt deleted file mode 100644 index 12dff8c94..000000000 --- a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/charsequence/contains/builders/NotOrAtMostCheckerOption.kt +++ /dev/null @@ -1,17 +0,0 @@ -//TODO remove with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.api.cc.infix.en_GB.creating.charsequence.contains.builders - -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains - -/** - * Represents the extension point for another option after a `contains not or at most`-check within - * a sophisticated `contains` assertion building process for [CharSequence]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - */ -@Deprecated("Switch from api-cc-infix-en_GB to api-infix-en_GB; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.") -interface NotOrAtMostCheckerOption - : CharSequenceContains.CheckerOption diff --git a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/charsequence/contains/builders/impl/AtLeastCheckerOptionImpl.kt b/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/charsequence/contains/builders/impl/AtLeastCheckerOptionImpl.kt deleted file mode 100644 index 2ca9f097f..000000000 --- a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/charsequence/contains/builders/impl/AtLeastCheckerOptionImpl.kt +++ /dev/null @@ -1,30 +0,0 @@ -@file:Suppress("DEPRECATION" /* will be removed with 1.0.0 */) -package ch.tutteli.atrium.api.cc.infix.en_GB.creating.charsequence.contains.builders.impl - -import ch.tutteli.atrium.api.cc.infix.en_GB.atLeast -import ch.tutteli.atrium.api.cc.infix.en_GB.creating.charsequence.contains.builders.AtLeastCheckerOption -import ch.tutteli.atrium.domain.builders.creating.charsequence.contains.builders.AtLeastCheckerOptionBase -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains - -/** - * Represents the builder of a `contains at least`-check within the fluent API of a sophisticated - * `contains` assertion for [CharSequence]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - * - * @constructor Represents the builder of a `contains at least` check within the fluent API of a sophisticated - * `contains` assertion for [CharSequence]. - * @param times The number which the check will compare against the actual number of times an expected object is - * found in the input of the search. - * @param containsBuilder The previously used [CharSequenceContains.Builder]. - */ -internal class AtLeastCheckerOptionImpl( - times: Int, - containsBuilder: CharSequenceContains.Builder -) : AtLeastCheckerOptionBase( - times, - containsBuilder, - nameContainsNotValuesFun(), - { "`${containsBuilder::atLeast.name} $it`" } -), AtLeastCheckerOption diff --git a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/charsequence/contains/builders/impl/AtMostCheckerOptionImpl.kt b/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/charsequence/contains/builders/impl/AtMostCheckerOptionImpl.kt deleted file mode 100644 index bd478d69e..000000000 --- a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/charsequence/contains/builders/impl/AtMostCheckerOptionImpl.kt +++ /dev/null @@ -1,34 +0,0 @@ -@file:Suppress("DEPRECATION" /* will be removed with 1.0.0 */) -package ch.tutteli.atrium.api.cc.infix.en_GB.creating.charsequence.contains.builders.impl - -import ch.tutteli.atrium.api.cc.infix.en_GB.atLeast -import ch.tutteli.atrium.api.cc.infix.en_GB.atMost -import ch.tutteli.atrium.api.cc.infix.en_GB.creating.charsequence.contains.builders.AtMostCheckerOption -import ch.tutteli.atrium.api.cc.infix.en_GB.exactly -import ch.tutteli.atrium.domain.builders.creating.charsequence.contains.builders.AtMostCheckerOptionBase -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains - -/** - * Represents the builder of a `contains at least once but at most` check within the fluent API of a - * sophisticated `contains` assertion for [CharSequence]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - * - * @constructor Represents the builder of a `contains at least once but at most` check within the fluent API of a - * sophisticated `contains` assertion for [CharSequence]. - * @param times The number which the check will compare against the actual number of times an expected object is - * found in the input of the search. - * @param containsBuilder The previously used [CharSequenceContains.Builder]. - */ -internal class AtMostCheckerOptionImpl( - times: Int, - containsBuilder: CharSequenceContains.Builder -) : AtMostCheckerOptionBase( - times, - containsBuilder, - nameContainsNotValuesFun(), - { "`${containsBuilder::atMost.name} $it`" }, - { "`${containsBuilder::atLeast.name} $it`" }, - { "`${containsBuilder::exactly.name} $it`" } -), AtMostCheckerOption diff --git a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/charsequence/contains/builders/impl/ButAtMostCheckerOptionImpl.kt b/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/charsequence/contains/builders/impl/ButAtMostCheckerOptionImpl.kt deleted file mode 100644 index a0c8202e5..000000000 --- a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/charsequence/contains/builders/impl/ButAtMostCheckerOptionImpl.kt +++ /dev/null @@ -1,40 +0,0 @@ -@file:Suppress("DEPRECATION" /* will be removed with 1.0.0 */) -package ch.tutteli.atrium.api.cc.infix.en_GB.creating.charsequence.contains.builders.impl - -import ch.tutteli.atrium.api.cc.infix.en_GB.atLeast -import ch.tutteli.atrium.api.cc.infix.en_GB.atMost -import ch.tutteli.atrium.api.cc.infix.en_GB.butAtMost -import ch.tutteli.atrium.api.cc.infix.en_GB.creating.charsequence.contains.builders.AtLeastCheckerOption -import ch.tutteli.atrium.api.cc.infix.en_GB.creating.charsequence.contains.builders.ButAtMostCheckerOption -import ch.tutteli.atrium.api.cc.infix.en_GB.exactly -import ch.tutteli.atrium.domain.builders.creating.charsequence.contains.builders.ButAtMostCheckerOptionBase -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains - -/** - * Represents the builder of the second step of a `contains at least but at most` check within the - * fluent API of a sophisticated `contains` assertion for [CharSequence]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied to the input of the search. - * - * @constructor Represents the builder of the second step of a `contains at least but at most` check within the - * fluent API of a sophisticated `contains` assertion for [CharSequence]. - * @param times The number which the check will compare against the actual number of times an expected object is - * found in the input of the search. - * @param containsBuilder The previously used [CharSequenceContains.Builder]. - */ -internal class ButAtMostCheckerOptionImpl( - times: Int, - atLeastBuilder: AtLeastCheckerOption, - containsBuilder: CharSequenceContains.Builder -) : ButAtMostCheckerOptionBase( - times, - atLeastBuilder, - containsBuilder, - nameContainsNotValuesFun(), - { l, u -> "`${containsBuilder::atLeast.name} $l ${atLeastBuilder::butAtMost.name} $u`" }, - { "`${containsBuilder::atMost.name} $it`" }, - { "`${containsBuilder::atLeast.name} $it`" }, - { "`${atLeastBuilder::butAtMost.name} $it`" }, - { "`${containsBuilder::exactly.name} $it`" } -), ButAtMostCheckerOption diff --git a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/charsequence/contains/builders/impl/ExactlyCheckerOptionImpl.kt b/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/charsequence/contains/builders/impl/ExactlyCheckerOptionImpl.kt deleted file mode 100644 index f1744b959..000000000 --- a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/charsequence/contains/builders/impl/ExactlyCheckerOptionImpl.kt +++ /dev/null @@ -1,30 +0,0 @@ -@file:Suppress("DEPRECATION" /* will be removed with 1.0.0 */) -package ch.tutteli.atrium.api.cc.infix.en_GB.creating.charsequence.contains.builders.impl - -import ch.tutteli.atrium.api.cc.infix.en_GB.creating.charsequence.contains.builders.ExactlyCheckerOption -import ch.tutteli.atrium.api.cc.infix.en_GB.exactly -import ch.tutteli.atrium.domain.builders.creating.charsequence.contains.builders.ExactlyCheckerOptionBase -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains - -/** - * Represents the builder of a `contains exactly` check within the fluent API of a sophisticated - * `contains` assertion for [CharSequence]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - * - * @constructor Represents the builder of a `contains exactly` check within the fluent API of a sophisticated - * `contains` assertion for [CharSequence]. - * @param times The number which the check will compare against the actual number of times an expected object is - * found in the input of the search. - * @param containsBuilder The previously used [CharSequenceContains.Builder]. - */ -internal class ExactlyCheckerOptionImpl( - times: Int, - containsBuilder: CharSequenceContains.Builder -) : ExactlyCheckerOptionBase( - times, - containsBuilder, - nameContainsNotValuesFun(), - { "`${containsBuilder::exactly.name} $it`" } -), ExactlyCheckerOption diff --git a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/charsequence/contains/builders/impl/NotCheckerOptionImpl.kt b/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/charsequence/contains/builders/impl/NotCheckerOptionImpl.kt deleted file mode 100644 index d9981cedf..000000000 --- a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/charsequence/contains/builders/impl/NotCheckerOptionImpl.kt +++ /dev/null @@ -1,22 +0,0 @@ -@file:Suppress("DEPRECATION" /* will be removed with 1.0.0 */) -package ch.tutteli.atrium.api.cc.infix.en_GB.creating.charsequence.contains.builders.impl - -import ch.tutteli.atrium.api.cc.infix.en_GB.creating.charsequence.contains.builders.NotCheckerOption -import ch.tutteli.atrium.domain.builders.creating.charsequence.contains.builders.NotCheckerOptionBase -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains - -/** - * Represents the builder of a `contains not at all` check within the fluent API of a sophisticated - * `contains` assertion for [CharSequence]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - * - * @constructor Represents the builder of a `contains not at all` check within the fluent API of a sophisticated - * `contains` assertion for [CharSequence]. - * @param containsBuilder The previously used [CharSequenceContains.Builder]. - */ -internal class NotCheckerOptionImpl( - containsBuilder: CharSequenceContains.Builder -) : NotCheckerOptionBase(containsBuilder), - NotCheckerOption diff --git a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/charsequence/contains/builders/impl/NotOrAtMostCheckerOptionImpl.kt b/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/charsequence/contains/builders/impl/NotOrAtMostCheckerOptionImpl.kt deleted file mode 100644 index d361b67ef..000000000 --- a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/charsequence/contains/builders/impl/NotOrAtMostCheckerOptionImpl.kt +++ /dev/null @@ -1,30 +0,0 @@ -@file:Suppress("DEPRECATION" /* will be removed with 1.0.0 */) -package ch.tutteli.atrium.api.cc.infix.en_GB.creating.charsequence.contains.builders.impl - -import ch.tutteli.atrium.api.cc.infix.en_GB.creating.charsequence.contains.builders.NotOrAtMostCheckerOption -import ch.tutteli.atrium.api.cc.infix.en_GB.notOrAtMost -import ch.tutteli.atrium.domain.builders.creating.charsequence.contains.builders.NotOrAtMostCheckerOptionBase -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains - -/** - * Represents the builder of a `contains not or at most` check within the fluent API of a - * sophisticated `contains` assertion for [CharSequence]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - * - * @constructor Represents the builder of a `contains not or at most` check within the fluent API of a - * sophisticated `contains` assertion for [CharSequence]. - * @param times The number which the check will compare against the actual number of times an expected object is - * found in the input of the search. - * @param containsBuilder The previously used [CharSequenceContains.Builder]. - */ -internal class NotOrAtMostCheckerOptionImpl( - times: Int, - containsBuilder: CharSequenceContains.Builder -) : NotOrAtMostCheckerOptionBase( - times, - containsBuilder, - nameContainsNotValuesFun(), - { "`${containsBuilder::notOrAtMost.name} $it`" } -), NotOrAtMostCheckerOption diff --git a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/charsequence/contains/builders/impl/nameContainsNotFun.kt b/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/charsequence/contains/builders/impl/nameContainsNotFun.kt deleted file mode 100644 index 95109b82d..000000000 --- a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/charsequence/contains/builders/impl/nameContainsNotFun.kt +++ /dev/null @@ -1,13 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") -package ch.tutteli.atrium.api.cc.infix.en_GB.creating.charsequence.contains.builders.impl - -import ch.tutteli.atrium.api.cc.infix.en_GB.Values -import ch.tutteli.atrium.api.cc.infix.en_GB.containsNot -import ch.tutteli.atrium.creating.Assert -import kotlin.reflect.KFunction2 - -internal fun nameContainsNotValuesFun(): String { - val f: KFunction2, Values, Assert> = Assert::containsNot - return "${f.name} ${Values::class.simpleName}" -} diff --git a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/iterable/contains/builders/AtLeastCheckerOption.kt b/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/iterable/contains/builders/AtLeastCheckerOption.kt deleted file mode 100644 index 29989b1d6..000000000 --- a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/iterable/contains/builders/AtLeastCheckerOption.kt +++ /dev/null @@ -1,18 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.api.cc.infix.en_GB.creating.iterable.contains.builders - -import ch.tutteli.atrium.domain.builders.creating.iterable.contains.builders.WithTimesCheckerOption -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains - -/** - * Represents the extension point for another option after a `contains at least`-check within a sophisticated - * `contains` assertion building process for [Iterable]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - */ -@Deprecated("Switch from api-cc-infix-en_GB to api-infix-en_GB; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.") -interface AtLeastCheckerOption, out S : IterableContains.SearchBehaviour> - : WithTimesCheckerOption diff --git a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/iterable/contains/builders/AtMostCheckerOption.kt b/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/iterable/contains/builders/AtMostCheckerOption.kt deleted file mode 100644 index 1f48e0704..000000000 --- a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/iterable/contains/builders/AtMostCheckerOption.kt +++ /dev/null @@ -1,18 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.api.cc.infix.en_GB.creating.iterable.contains.builders - -import ch.tutteli.atrium.domain.builders.creating.iterable.contains.builders.WithTimesCheckerOption -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains - -/** - * Represents the extension point for another option after a `contains at least once but at most`-check within - * a sophisticated `contains` assertion building process for [Iterable]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - */ -@Deprecated("Switch from api-cc-infix-en_GB to api-infix-en_GB; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.") -interface AtMostCheckerOption, out S : IterableContains.SearchBehaviour> - : WithTimesCheckerOption diff --git a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/iterable/contains/builders/ButAtMostCheckerOption.kt b/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/iterable/contains/builders/ButAtMostCheckerOption.kt deleted file mode 100644 index 7c9bf17c1..000000000 --- a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/iterable/contains/builders/ButAtMostCheckerOption.kt +++ /dev/null @@ -1,18 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.api.cc.infix.en_GB.creating.iterable.contains.builders - -import ch.tutteli.atrium.domain.builders.creating.iterable.contains.builders.WithTimesCheckerOption -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains - -/** - * Represents the extension point for another option after a `contains at least but at most`-check within a - * sophisticated `contains` assertion building process for [Iterable]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - */ -@Deprecated("Switch from api-cc-infix-en_GB to api-infix-en_GB; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.") -interface ButAtMostCheckerOption, out S : IterableContains.SearchBehaviour> - : WithTimesCheckerOption diff --git a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/iterable/contains/builders/ExactlyCheckerOption.kt b/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/iterable/contains/builders/ExactlyCheckerOption.kt deleted file mode 100644 index e592fbff9..000000000 --- a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/iterable/contains/builders/ExactlyCheckerOption.kt +++ /dev/null @@ -1,18 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.api.cc.infix.en_GB.creating.iterable.contains.builders - -import ch.tutteli.atrium.domain.builders.creating.iterable.contains.builders.WithTimesCheckerOption -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains - -/** - * Represents the extension point for another option after a `contains exactly`-check within - * a sophisticated `contains` assertion building process for [Iterable]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - */ -@Deprecated("Switch from api-cc-infix-en_GB to api-infix-en_GB; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.") -interface ExactlyCheckerOption, out S : IterableContains.SearchBehaviour> - : WithTimesCheckerOption diff --git a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/iterable/contains/builders/NotCheckerOption.kt b/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/iterable/contains/builders/NotCheckerOption.kt deleted file mode 100644 index 763fded34..000000000 --- a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/iterable/contains/builders/NotCheckerOption.kt +++ /dev/null @@ -1,17 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.api.cc.infix.en_GB.creating.iterable.contains.builders - -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains - -/** - * Represents the extension point for another option after a `contains not at all`-check within - * a sophisticated `contains` assertion building process for [Iterable]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - */ -@Deprecated("Switch from api-cc-infix-en_GB to api-infix-en_GB; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.") -interface NotCheckerOption, out S : IterableContains.SearchBehaviour> - : IterableContains.CheckerOption diff --git a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/iterable/contains/builders/NotOrAtMostCheckerOption.kt b/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/iterable/contains/builders/NotOrAtMostCheckerOption.kt deleted file mode 100644 index 3e4662388..000000000 --- a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/iterable/contains/builders/NotOrAtMostCheckerOption.kt +++ /dev/null @@ -1,18 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.api.cc.infix.en_GB.creating.iterable.contains.builders - -import ch.tutteli.atrium.domain.builders.creating.iterable.contains.builders.WithTimesCheckerOption -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains - -/** - * Represents the extension point for another option after a `contains not or at most`-check within - * a sophisticated `contains` assertion building process for [Iterable]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - */ -@Deprecated("Switch from api-cc-infix-en_GB to api-infix-en_GB; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.") -interface NotOrAtMostCheckerOption, out S : IterableContains.SearchBehaviour> - : WithTimesCheckerOption diff --git a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/iterable/contains/builders/impl/AtLeastCheckerOptionImpl.kt b/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/iterable/contains/builders/impl/AtLeastCheckerOptionImpl.kt deleted file mode 100644 index bd029d9cb..000000000 --- a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/iterable/contains/builders/impl/AtLeastCheckerOptionImpl.kt +++ /dev/null @@ -1,30 +0,0 @@ -@file:Suppress("DEPRECATION" /* will be removed with 1.0.0 */) -package ch.tutteli.atrium.api.cc.infix.en_GB.creating.iterable.contains.builders.impl - -import ch.tutteli.atrium.api.cc.infix.en_GB.atLeast -import ch.tutteli.atrium.api.cc.infix.en_GB.creating.iterable.contains.builders.AtLeastCheckerOption -import ch.tutteli.atrium.domain.builders.creating.iterable.contains.builders.AtLeastCheckerOptionBase -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InAnyOrderSearchBehaviour - -/** - * Represents the builder of a `contains at least` check within the fluent API of a sophisticated - * `contains` assertion for [Iterable]. - * - * @param T The input type of the search. - * - * @constructor Represents the builder of a `contains at least` check within the fluent API of a sophisticated - * `contains` assertion for [Iterable]. - * @param times The number which the check will compare against the actual number of times an expected entry is - * found in the [Iterable]. - * @param containsBuilder The previously used [IterableContains.Builder]. - */ -internal class AtLeastCheckerOptionImpl, out S : InAnyOrderSearchBehaviour>( - times: Int, - containsBuilder: IterableContains.Builder -) : AtLeastCheckerOptionBase( - times, - containsBuilder, - nameContainsNotValuesFun(), - { "`${containsBuilder::atLeast.name} $it`" } -), AtLeastCheckerOption diff --git a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/iterable/contains/builders/impl/AtMostCheckerOptionImpl.kt b/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/iterable/contains/builders/impl/AtMostCheckerOptionImpl.kt deleted file mode 100644 index d5998c88f..000000000 --- a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/iterable/contains/builders/impl/AtMostCheckerOptionImpl.kt +++ /dev/null @@ -1,34 +0,0 @@ -@file:Suppress("DEPRECATION" /* will be removed with 1.0.0 */) -package ch.tutteli.atrium.api.cc.infix.en_GB.creating.iterable.contains.builders.impl - -import ch.tutteli.atrium.api.cc.infix.en_GB.atLeast -import ch.tutteli.atrium.api.cc.infix.en_GB.atMost -import ch.tutteli.atrium.api.cc.infix.en_GB.creating.iterable.contains.builders.AtMostCheckerOption -import ch.tutteli.atrium.api.cc.infix.en_GB.exactly -import ch.tutteli.atrium.domain.builders.creating.iterable.contains.builders.AtMostCheckerOptionBase -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InAnyOrderSearchBehaviour - -/** - * Represents the builder of a `contains at least once but at most` check within the fluent API of a - * sophisticated `contains` assertion for [Iterable]. - * - * @param T The input type of the search. - * - * @constructor Represents the builder of a `contains at least once but at most` check within the fluent API of a - * sophisticated `contains` assertion for [Iterable]. - * @param times The number which the check will compare against the actual number of times an expected entry is - * found in the [Iterable]. - * @param containsBuilder The previously used [IterableContains.Builder]. - */ -internal class AtMostCheckerOptionImpl, out S : InAnyOrderSearchBehaviour>( - times: Int, - containsBuilder: IterableContains.Builder -) : AtMostCheckerOptionBase( - times, - containsBuilder, - nameContainsNotValuesFun(), - { "`${containsBuilder::atMost.name} $it`" }, - { "`${containsBuilder::atLeast.name} $it`" }, - { "`${containsBuilder::exactly.name} $it`" } -), AtMostCheckerOption diff --git a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/iterable/contains/builders/impl/ButAtMostCheckerOptionImpl.kt b/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/iterable/contains/builders/impl/ButAtMostCheckerOptionImpl.kt deleted file mode 100644 index a2c9f3af4..000000000 --- a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/iterable/contains/builders/impl/ButAtMostCheckerOptionImpl.kt +++ /dev/null @@ -1,40 +0,0 @@ -@file:Suppress("DEPRECATION" /* will be removed with 1.0.0 */) -package ch.tutteli.atrium.api.cc.infix.en_GB.creating.iterable.contains.builders.impl - -import ch.tutteli.atrium.api.cc.infix.en_GB.atLeast -import ch.tutteli.atrium.api.cc.infix.en_GB.atMost -import ch.tutteli.atrium.api.cc.infix.en_GB.butAtMost -import ch.tutteli.atrium.api.cc.infix.en_GB.creating.iterable.contains.builders.AtLeastCheckerOption -import ch.tutteli.atrium.api.cc.infix.en_GB.creating.iterable.contains.builders.ButAtMostCheckerOption -import ch.tutteli.atrium.api.cc.infix.en_GB.exactly -import ch.tutteli.atrium.domain.builders.creating.iterable.contains.builders.ButAtMostCheckerOptionBase -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InAnyOrderSearchBehaviour - -/** - * Represents the builder of the second step of a `contains at least but at most` check within the - * fluent API of a sophisticated `contains` assertion for [Iterable]. - * - * @param T The input type of the search. - * - * @constructor Represents the builder of the second step of a `contains at least but at most` check within the - * fluent API of a sophisticated `contains` assertion for [Iterable]. - * @param times The number which the check will compare against the actual number of times an expected entry is - * found in the [Iterable]. - * @param containsBuilder The previously used [IterableContains.Builder]. - */ -internal class ButAtMostCheckerOptionImpl, out S : InAnyOrderSearchBehaviour>( - times: Int, - atLeastBuilder: AtLeastCheckerOption, - containsBuilder: IterableContains.Builder -) : ButAtMostCheckerOptionBase( - times, - atLeastBuilder, - containsBuilder, - nameContainsNotValuesFun(), - { l, u -> "`${containsBuilder::atLeast.name} $l ${atLeastBuilder::butAtMost.name} $u`" }, - { "`${containsBuilder::atMost.name} $it`" }, - { "`${containsBuilder::atLeast.name} $it`" }, - { "`${atLeastBuilder::butAtMost.name} $it`" }, - { "`${containsBuilder::exactly.name} $it`" } -), ButAtMostCheckerOption diff --git a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/iterable/contains/builders/impl/ExactlyCheckerOptionImpl.kt b/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/iterable/contains/builders/impl/ExactlyCheckerOptionImpl.kt deleted file mode 100644 index f6faf82b8..000000000 --- a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/iterable/contains/builders/impl/ExactlyCheckerOptionImpl.kt +++ /dev/null @@ -1,30 +0,0 @@ -@file:Suppress("DEPRECATION" /* will be removed with 1.0.0 */) -package ch.tutteli.atrium.api.cc.infix.en_GB.creating.iterable.contains.builders.impl - -import ch.tutteli.atrium.api.cc.infix.en_GB.creating.iterable.contains.builders.ExactlyCheckerOption -import ch.tutteli.atrium.api.cc.infix.en_GB.exactly -import ch.tutteli.atrium.domain.builders.creating.iterable.contains.builders.ExactlyCheckerOptionBase -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InAnyOrderSearchBehaviour - -/** - * Represents the builder of a `contains exactly` check within the fluent API of a sophisticated - * `contains` assertion for [Iterable]. - * - * @param T The input type of the search. - * - * @constructor Represents the builder of a `contains exactly` check within the fluent API of a sophisticated - * `contains` assertion for [Iterable]. - * @param times The number which the check will compare against the actual number of times an expected entry is - * found in the [Iterable]. - * @param containsBuilder The previously used [IterableContains.Builder]. - */ -internal class ExactlyCheckerOptionImpl, out S : InAnyOrderSearchBehaviour>( - times: Int, - containsBuilder: IterableContains.Builder -) : ExactlyCheckerOptionBase( - times, - containsBuilder, - nameContainsNotValuesFun(), - { "`${containsBuilder::exactly.name} $it`" } -), ExactlyCheckerOption diff --git a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/iterable/contains/builders/impl/NotCheckerOptionImpl.kt b/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/iterable/contains/builders/impl/NotCheckerOptionImpl.kt deleted file mode 100644 index 3dff10417..000000000 --- a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/iterable/contains/builders/impl/NotCheckerOptionImpl.kt +++ /dev/null @@ -1,23 +0,0 @@ -@file:Suppress("DEPRECATION" /* will be removed with 1.0.0 */) -package ch.tutteli.atrium.api.cc.infix.en_GB.creating.iterable.contains.builders.impl - -import ch.tutteli.atrium.api.cc.infix.en_GB.creating.iterable.contains.builders.NotCheckerOption -import ch.tutteli.atrium.domain.builders.creating.iterable.contains.builders.NotCheckerOptionBase -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InAnyOrderSearchBehaviour - -/** - * Represents the builder of a `contains not at all` check within the fluent API of a sophisticated - * `contains` assertion for [Iterable]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - * - * @constructor Represents the builder of a `contains not at all` check within the fluent API of a sophisticated - * `contains not` assertion for [Iterable]. - * @param containsBuilder The previously used [IterableContains.Builder]. - */ -internal class NotCheckerOptionImpl, out S : InAnyOrderSearchBehaviour>( - containsBuilder: IterableContains.Builder -) : NotCheckerOptionBase(containsBuilder), - NotCheckerOption diff --git a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/iterable/contains/builders/impl/NotOrAtMostCheckerOptionImpl.kt b/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/iterable/contains/builders/impl/NotOrAtMostCheckerOptionImpl.kt deleted file mode 100644 index 06e39cd03..000000000 --- a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/iterable/contains/builders/impl/NotOrAtMostCheckerOptionImpl.kt +++ /dev/null @@ -1,30 +0,0 @@ -@file:Suppress("DEPRECATION" /* will be removed with 1.0.0 */) -package ch.tutteli.atrium.api.cc.infix.en_GB.creating.iterable.contains.builders.impl - -import ch.tutteli.atrium.api.cc.infix.en_GB.creating.iterable.contains.builders.NotOrAtMostCheckerOption -import ch.tutteli.atrium.api.cc.infix.en_GB.notOrAtMost -import ch.tutteli.atrium.domain.builders.creating.iterable.contains.builders.NotOrAtMostCheckerOptionBase -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InAnyOrderSearchBehaviour - -/** - * Represents the builder of a `contains not or at most` check within the fluent API of a - * sophisticated `contains` assertion for [Iterable]. - * - * @param T The input type of the search. - * - * @constructor Represents the builder of a `contains at least once but at most` check within the fluent API of a - * sophisticated `contains` assertion for [Iterable]. - * @param times The number which the check will compare against the actual number of times an expected entry is - * found in the [Iterable]. - * @param containsBuilder The previously used [IterableContains.Builder]. - */ -internal class NotOrAtMostCheckerOptionImpl, out S : InAnyOrderSearchBehaviour>( - times: Int, - containsBuilder: IterableContains.Builder -) : NotOrAtMostCheckerOptionBase( - times, - containsBuilder, - nameContainsNotValuesFun(), - { "`${containsBuilder::notOrAtMost.name} $it`" } -), NotOrAtMostCheckerOption diff --git a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/iterable/contains/builders/impl/nameContainsNotFun.kt b/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/iterable/contains/builders/impl/nameContainsNotFun.kt deleted file mode 100644 index d58e4a52d..000000000 --- a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/iterable/contains/builders/impl/nameContainsNotFun.kt +++ /dev/null @@ -1,13 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") -package ch.tutteli.atrium.api.cc.infix.en_GB.creating.iterable.contains.builders.impl - -import ch.tutteli.atrium.api.cc.infix.en_GB.Values -import ch.tutteli.atrium.api.cc.infix.en_GB.containsNot -import ch.tutteli.atrium.creating.Assert -import kotlin.reflect.KFunction2 - -internal fun nameContainsNotValuesFun(): String { - val f: KFunction2, Values, Assert> = Assert::containsNot - return "${f.name} ${Values::class.simpleName}" -} diff --git a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/list/get/builders/ListGetNullableOption.kt b/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/list/get/builders/ListGetNullableOption.kt deleted file mode 100644 index a6de56b0e..000000000 --- a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/list/get/builders/ListGetNullableOption.kt +++ /dev/null @@ -1,51 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") - -package ch.tutteli.atrium.api.cc.infix.en_GB.creating.list.get.builders - -import ch.tutteli.atrium.api.cc.infix.en_GB.creating.list.get.builders.impl.ListGetNullableOptionImpl -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.creating.AssertionPlantNullable -import ch.tutteli.atrium.creating.SubjectProvider - -/** - * Represents the extension point for another option after a `get index`-step within a - * sophisticated `get` assertion building process for [List]. - * - * @param E The element type of the [List]. - * @param T A subtype of [List]. - */ -@Deprecated("Switch from api-cc-infix-en_GB to api-infix-en_GB; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.") -interface ListGetNullableOption> { - /** - * The [AssertionPlant] for which this assertion is created - */ - val plant: Assert - - /** - * The given index which will be used to perform the [List.get]. - */ - val index: Int - - /** - * Makes the assertion that the given [index] is within the bounds of [Assert.subject][SubjectProvider.subject] and that - * the corresponding nullable entry holds all assertions the given [assertionCreator] might create for it. - * - * Notice, that the corresponding entry of the given [index] can be `null` even if the index is within bounds - * as the [List] has a nullable element type. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if a created [Assertion]s (by calling [assertionCreator]) - * does not hold. - * @throws IllegalArgumentException in case the given [assertionCreator] did not create a single assertion. - */ - infix fun assertIt(assertionCreator: AssertionPlantNullable.() -> Unit): Assert - - companion object { - fun > create(plant: Assert, index: Int): ListGetNullableOption - = ListGetNullableOptionImpl(plant, index) - } -} - diff --git a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/list/get/builders/ListGetOption.kt b/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/list/get/builders/ListGetOption.kt deleted file mode 100644 index acfb895e9..000000000 --- a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/list/get/builders/ListGetOption.kt +++ /dev/null @@ -1,47 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") - -package ch.tutteli.atrium.api.cc.infix.en_GB.creating.list.get.builders - -import ch.tutteli.atrium.api.cc.infix.en_GB.creating.list.get.builders.impl.ListGetOptionImpl -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.creating.SubjectProvider - -/** - * Represents the extension point for another option after a `get index`-step within a - * sophisticated `get` assertion building process for [List]. - * - * @param E The element type of the [List]. - * @param T A subtype of [List]. - */ -@Deprecated("Switch from api-cc-infix-en_GB to api-infix-en_GB; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.") -interface ListGetOption> { - /** - * The [AssertionPlant] for which this assertion is created - */ - val plant: Assert - - /** - * The given index which will be used to perform the [List.get]. - */ - val index: Int - - /** - * Makes the assertion that the given [index] is within the bounds of [Assert.subject][SubjectProvider.subject] and that - * the corresponding entry holds all assertions the given [assertionCreator] might create for it. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if a created [Assertion]s (by calling [assertionCreator]) - * does not hold. - * @throws IllegalArgumentException in case the given [assertionCreator] did not create a single assertion. - */ - infix fun assertIt(assertionCreator: Assert.() -> Unit): Assert - - companion object { - fun > create(plant: Assert, index: Int): ListGetOption - = ListGetOptionImpl(plant, index) - } -} - diff --git a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/list/get/builders/impl/ListGetNullableOptionImpl.kt b/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/list/get/builders/impl/ListGetNullableOptionImpl.kt deleted file mode 100644 index fedb069ba..000000000 --- a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/list/get/builders/impl/ListGetNullableOptionImpl.kt +++ /dev/null @@ -1,19 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") - -package ch.tutteli.atrium.api.cc.infix.en_GB.creating.list.get.builders.impl - -import ch.tutteli.atrium.api.cc.infix.en_GB.creating.list.get.builders.ListGetNullableOption -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.AssertionPlantNullable -import ch.tutteli.atrium.domain.builders.AssertImpl - -internal class ListGetNullableOptionImpl>( - override val plant: Assert, - override val index: Int -) : ListGetNullableOption { - - @Suppress("DEPRECATION") - override infix fun assertIt(assertionCreator: AssertionPlantNullable.() -> Unit): Assert - = plant.addAssertion(AssertImpl.list.getNullable(plant, index, assertionCreator)) -} diff --git a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/list/get/builders/impl/ListGetOptionImpl.kt b/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/list/get/builders/impl/ListGetOptionImpl.kt deleted file mode 100644 index 36320c47b..000000000 --- a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/list/get/builders/impl/ListGetOptionImpl.kt +++ /dev/null @@ -1,18 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") - -package ch.tutteli.atrium.api.cc.infix.en_GB.creating.list.get.builders.impl - -import ch.tutteli.atrium.api.cc.infix.en_GB.creating.list.get.builders.ListGetOption -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.domain.builders.AssertImpl - -internal class ListGetOptionImpl>( - override val plant: Assert, - override val index: Int -) : ListGetOption { - - @Suppress("DEPRECATION") - override infix fun assertIt(assertionCreator: Assert.() -> Unit): Assert - = plant.addAssertion(AssertImpl.list.get(plant, index, assertionCreator)) -} diff --git a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/map/get/builders/MapGetNullableOption.kt b/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/map/get/builders/MapGetNullableOption.kt deleted file mode 100644 index 89b282000..000000000 --- a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/map/get/builders/MapGetNullableOption.kt +++ /dev/null @@ -1,52 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") - -package ch.tutteli.atrium.api.cc.infix.en_GB.creating.map.get.builders - -import ch.tutteli.atrium.api.cc.infix.en_GB.creating.map.get.builders.impl.MapGetNullableOptionImpl -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.creating.AssertionPlantNullable -import ch.tutteli.atrium.creating.SubjectProvider - -/** - * Represents the extension point for another option after a `get key`-step within a - * sophisticated `get` assertion building process for [Map]. - * - * @param K The key type of the [Map]. - * @param V the value type of the [Map]. - * @param T A subtype of [Map]. - */ -@Deprecated("Switch from api-cc-infix-en_GB to api-infix-en_GB; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.") -interface MapGetNullableOption> { - /** - * The [AssertionPlant] for which this assertion is created - */ - val plant: Assert - - /** - * The given key which will be used to perform the [Map.get]. - */ - val key: K - - /** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] contains the previously specified [key] - * and that the corresponding nullable value holds all assertions the given [assertionCreator] might create for it. - * - * Notice, that the corresponding value of the given [key] can be `null` even if the key exists as the [Map] has a - * nullable value type. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if a created [Assertion]s (by calling [assertionCreator]) - * does not hold. - * @throws IllegalArgumentException in case the given [assertionCreator] did not create a single assertion. - */ - infix fun assertIt(assertionCreator: AssertionPlantNullable.() -> Unit): Assert - - companion object { - fun > create(plant: Assert, key: K): MapGetNullableOption - = MapGetNullableOptionImpl(plant, key) - } -} - diff --git a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/map/get/builders/MapGetOption.kt b/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/map/get/builders/MapGetOption.kt deleted file mode 100644 index b549a0a7c..000000000 --- a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/map/get/builders/MapGetOption.kt +++ /dev/null @@ -1,51 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") - -package ch.tutteli.atrium.api.cc.infix.en_GB.creating.map.get.builders - -import ch.tutteli.atrium.api.cc.infix.en_GB.creating.map.get.builders.impl.MapGetOptionImpl -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.creating.SubjectProvider - -/** - * Represents the extension point for another option after a `get key`-step within a - * sophisticated `get` assertion building process for [Map]. - * - * @param K The key type of the [Map]. - * @param V the value type of the [Map]. - * @param T A subtype of [Map]. - */ -@Deprecated("Switch from api-cc-infix-en_GB to api-infix-en_GB; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.") -interface MapGetOption> { - /** - * The [AssertionPlant] for which this assertion is created - */ - val plant: Assert - - /** - * The given key which will be used to perform the [Map.get]. - */ - val key: K - - /** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] contains the previously specified [key] and that the - * corresponding value holds all assertions the given [assertionCreator] might create for it. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if a created [Assertion]s (by calling [assertionCreator]) - * does not hold. - * @throws IllegalArgumentException in case the given [assertionCreator] did not create a single assertion. - */ - infix fun assertIt(assertionCreator: Assert.() -> Unit): Assert - - companion object { - /** - * Creates a [MapGetOption] based on the given [plant] and [key]. - */ - fun > create(plant: Assert, key: K): MapGetOption - = MapGetOptionImpl(plant, key) - } -} - diff --git a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/map/get/builders/impl/MapGetNullableOptionImpl.kt b/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/map/get/builders/impl/MapGetNullableOptionImpl.kt deleted file mode 100644 index dcd6ae996..000000000 --- a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/map/get/builders/impl/MapGetNullableOptionImpl.kt +++ /dev/null @@ -1,19 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") - -package ch.tutteli.atrium.api.cc.infix.en_GB.creating.map.get.builders.impl - -import ch.tutteli.atrium.api.cc.infix.en_GB.creating.map.get.builders.MapGetNullableOption -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.AssertionPlantNullable -import ch.tutteli.atrium.domain.builders.AssertImpl - -internal class MapGetNullableOptionImpl>( - override val plant: Assert, - override val key: K -) : MapGetNullableOption { - - @Suppress("DEPRECATION") - override infix fun assertIt(assertionCreator: AssertionPlantNullable.() -> Unit): Assert - = plant.addAssertion(AssertImpl.map.getExistingNullable(plant, key, assertionCreator)) -} diff --git a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/map/get/builders/impl/MapGetOptionImpl.kt b/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/map/get/builders/impl/MapGetOptionImpl.kt deleted file mode 100644 index 43bdb5d7d..000000000 --- a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/creating/map/get/builders/impl/MapGetOptionImpl.kt +++ /dev/null @@ -1,18 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") - -package ch.tutteli.atrium.api.cc.infix.en_GB.creating.map.get.builders.impl - -import ch.tutteli.atrium.api.cc.infix.en_GB.creating.map.get.builders.MapGetOption -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.domain.builders.AssertImpl - -internal class MapGetOptionImpl>( - override val plant: Assert, - override val key: K -) : MapGetOption { - - @Suppress("DEPRECATION") - override infix fun assertIt(assertionCreator: Assert.() -> Unit): Assert - = plant.addAssertion(AssertImpl.map.getExisting(plant, key, assertionCreator)) -} diff --git a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/featureAssertions.kt b/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/featureAssertions.kt deleted file mode 100644 index 9b2423f41..000000000 --- a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/featureAssertions.kt +++ /dev/null @@ -1,1041 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") - -package ch.tutteli.atrium.api.cc.infix.en_GB - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.assertions.AssertionGroup -import ch.tutteli.atrium.assertions.FeatureAssertionGroupType -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.creating.AssertionPlantNullable -import ch.tutteli.atrium.creating.CollectingAssertionPlant -import ch.tutteli.atrium.domain.builders.AssertImpl -import ch.tutteli.atrium.domain.builders.creating.PleaseUseReplacementException -import kotlin.reflect.* -import kotlin.jvm.JvmName - -/** - * Creates an [AssertionPlant] for the given [property] which eventually adds [AssertionGroup]s with a - * [FeatureAssertionGroupType], containing the assertions created for the given [property], to the current plant. - * - * @return An [AssertionPlant] for the given [property]. - */ -@Deprecated( - "Switch from Assert to Expect and use feature instead; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().feature { f(property) }.asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.infix.en_GB.feature" - ) -) -fun Assert.property(property: KProperty0): AssertionPlant - = AssertImpl.feature.property(this, property) - -@Suppress("DeprecatedCallableAddReplaceWith", "unused", "UNUSED_PARAMETER") -@Deprecated("Use the overload with KProperty1 instead, this way you do not access `subject` too early. Use `YourClass::property` instead of `subject::property`") -fun CollectingAssertionPlant.property(property: KProperty0): AssertionPlant - = throw PleaseUseReplacementException("Use the overload with KProperty1 instead, this way you do not access `subject` too early. Use `YourClass::property` instead of `subject::property`") - -/** - * Creates an [AssertionPlant] for the given [property] which eventually adds [AssertionGroup]s with a - * [FeatureAssertionGroupType], containing the assertions created for the given [property], to the current plant. - * - * @return An [AssertionPlant] for the given [property]. - */ -@Deprecated( - "Switch from Assert to Expect and use feature instead; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().feature(property).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.infix.en_GB.feature" - ) -) -fun Assert.property(property: KProperty1): AssertionPlant - = AssertImpl.feature.property(this, property) - - -/** - * Creates an [AssertionPlant] for the given [property] which eventually adds [AssertionGroup]s with a - * [FeatureAssertionGroupType], containing the assertions created for the given [property], to the current plant -- - * starting with a group consisting of the [Assertion]s created by the [assertionCreator] lambda. - * - * @return An [AssertionPlant] for the given [property]. - * - * @throws AssertionError Might throw an [AssertionError] if an additionally created [Assertion] - * (by calling [assertionCreator]) does not hold. - */ -@Deprecated( - "Switch from Assert to Expect and use feature instead; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().feature(of({ f(property) }, { asAssert(assertionCreator) })).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.infix.en_GB.feature", - "ch.tutteli.atrium.api.infix.en_GB.of" - ) -) -fun Assert.property(property: KProperty0, assertionCreator: Assert.() -> Unit): AssertionPlant - = AssertImpl.feature.property(this, property, assertionCreator) - -@Suppress("DeprecatedCallableAddReplaceWith", "unused", "UNUSED_PARAMETER") -@Deprecated("Use the overload with KProperty1 instead, this way you do not access `subject` too early. Use `YourClass::property` instead of `subject::property`") -fun CollectingAssertionPlant.property(property: KProperty0, assertionCreator: Assert.() -> Unit): AssertionPlant - = throw PleaseUseReplacementException("Use the overload with KProperty1 instead, this way you do not access `subject` too early. Use `YourClass::property` instead of `subject::property`") - -/** - * Creates an [AssertionPlant] for the given [property] which eventually adds [AssertionGroup]s with a - * [FeatureAssertionGroupType], containing the assertions created for the given [property], to the current plant -- - * starting with a group consisting of the [Assertion]s created by the [assertionCreator] lambda. - * - * @return An [AssertionPlant] for the given [property]. - * - * @throws AssertionError Might throw an [AssertionError] if an additionally created [Assertion] - * (by calling [assertionCreator]) does not hold. - */ -@Deprecated( - "Switch from Assert to Expect and use feature instead; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().feature(of(property, { asAssert(assertionCreator) })).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.infix.en_GB.feature", - "ch.tutteli.atrium.api.infix.en_GB.of" - ) -) -fun Assert.property(property: KProperty1, assertionCreator: Assert.() -> Unit): AssertionPlant - = AssertImpl.feature.property(this, property, assertionCreator) - - -/** - * Creates an [AssertionPlantNullable] for the given [property] which eventually adds [AssertionGroup]s with a - * [FeatureAssertionGroupType], containing the assertions created for the given [property], to the current plant. - * - * @return An [AssertionPlantNullable] for the given [property]. - */ -@Deprecated( - "Switch from Assert to Expect and use feature instead; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().feature { f(property) }.asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.infix.en_GB.feature" - ) -) -fun Assert.property(property: KProperty0): AssertionPlantNullable - = AssertImpl.feature.property(this, property) - -@Suppress("DeprecatedCallableAddReplaceWith", "unused", "UNUSED_PARAMETER") -@Deprecated("Use the overload with KProperty1 instead, this way you do not access `subject` too early. Use `YourClass::property` instead of `subject::property`") -fun CollectingAssertionPlant.property(property: KProperty0): AssertionPlantNullable - = throw PleaseUseReplacementException("Use the overload with KProperty1 instead, this way you do not access `subject` too early. Use `YourClass::property` instead of `subject::property`") - -/** - * Creates an [AssertionPlantNullable] for the given [property] which eventually adds [AssertionGroup]s with a - * [FeatureAssertionGroupType], containing the assertions created for the given [property], to the current plant. - * - * @return An [AssertionPlantNullable] for the given [property]. - */ -@Deprecated( - "Switch from Assert to Expect and use feature instead; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().feature(property).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.infix.en_GB.feature" - ) -) -fun Assert.property(property: KProperty1): AssertionPlantNullable - = AssertImpl.feature.property(this, property) - - -// Arg 0 ---------------------------------------------------------------------------- - -/** - * Creates an [AssertionPlant], for the value returned by calling [method], which eventually adds [AssertionGroup]s - * with a [FeatureAssertionGroupType], containing the assertions created for the return value, to the current plant. - * - * @return An [AssertionPlant] for the return value of the given [method]. - */ -@Deprecated( - "Switch from Assert to Expect and use feature instead; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().feature { f(method) }.asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.infix.en_GB.feature" - ) -) -fun Assert.returnValueOf(method: KFunction0): AssertionPlant - = AssertImpl.feature.returnValueOf0(this, method) - -@Suppress("DeprecatedCallableAddReplaceWith", "unused", "UNUSED_PARAMETER") -@Deprecated("Use the overload with KFunction1 instead, this way you do not access `subject` too early. Use `YourClass::property` instead of `subject::property`") -fun CollectingAssertionPlant.returnValueOf(method: KFunction0): AssertionPlant - = throw PleaseUseReplacementException("Use the overload with KFunction1 instead, this way you do not access `subject` too early. Use `YourClass::property` instead of `subject::property`") - -/** - * Creates an [AssertionPlant], for the value returned by calling [method], which eventually adds [AssertionGroup]s - * with a [FeatureAssertionGroupType], containing the assertions created for the return value, to the current plant. - * - * @return An [AssertionPlant] for the return value of the given [method]. - */ -@JvmName("safeReturnValueOf") -@Deprecated( - "Switch from Assert to Expect and use feature instead; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().feature(method).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.infix.en_GB.feature" - ) -) -fun Assert.returnValueOf(method: KFunction1): AssertionPlant - = AssertImpl.feature.returnValueOf0(this, method) - - -/** - * Creates an [AssertionPlant], for the value returned by calling [method], which eventually adds - * [AssertionGroup]s with a [FeatureAssertionGroupType], containing the assertions created for the return value, - * to the current plant -- starting with a group consisting of the [Assertion]s created by the - * [assertionCreator] lambda. - * - * @return An [AssertionPlant] for the return value of the given [method]. - * - * @throws AssertionError Might throw an [AssertionError] if an additionally created [Assertion] - * (by calling [assertionCreator]) does not hold. - */ -@Deprecated( - "Switch from Assert to Expect and use feature instead; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().feature(of({ f(method) }, { asAssert(assertionCreator) })).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.infix.en_GB.feature", - "ch.tutteli.atrium.api.infix.en_GB.of" - ) -) -fun Assert.returnValueOf(method: KFunction0, assertionCreator: Assert.() -> Unit): AssertionPlant - = AssertImpl.feature.returnValueOf0(this, method, assertionCreator) - -@Suppress("DeprecatedCallableAddReplaceWith", "unused", "UNUSED_PARAMETER") -@Deprecated("Use the overload with KFunction1 instead, this way you do not access `subject` too early. Use `YourClass::property` instead of `subject::property`") -fun CollectingAssertionPlant.returnValueOf(method: KFunction0, assertionCreator: Assert.() -> Unit): AssertionPlant - = throw PleaseUseReplacementException("Use the overload with KFunction1 instead, this way you do not access `subject` too early. Use `YourClass::property` instead of `subject::property`") - -/** - * Creates an [AssertionPlant], for the value returned by calling [method], which eventually adds - * [AssertionGroup]s with a [FeatureAssertionGroupType], containing the assertions created for the return value, - * to the current plant -- starting with a group consisting of the [Assertion]s created by the - * [assertionCreator] lambda. - * - * @return An [AssertionPlant] for the return value of the given [method]. - * - * @throws AssertionError Might throw an [AssertionError] if an additionally created [Assertion] - * (by calling [assertionCreator]) does not hold. - */ -@JvmName("safeReturnValueOf") -@Deprecated( - "Switch from Assert to Expect and use feature instead; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().feature(of(method, { asAssert(assertionCreator) })).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.infix.en_GB.feature", - "ch.tutteli.atrium.api.infix.en_GB.of" - ) -) -fun Assert.returnValueOf(method: KFunction1, assertionCreator: Assert.() -> Unit): AssertionPlant - = AssertImpl.feature.returnValueOf0(this, method, assertionCreator) - - -/** - * Creates an [AssertionPlantNullable], for the value returned by calling [method], which eventually adds - * [AssertionGroup]s with a [FeatureAssertionGroupType], containing the assertions created for the return value, - * to the current plant. - * - * @return An [AssertionPlantNullable] for the given [property]. - */ -@Deprecated( - "Switch from Assert to Expect and use feature instead; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().feature { f(method) }.asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.infix.en_GB.feature" - ) -) -fun Assert.returnValueOf(method: KFunction0): AssertionPlantNullable - = AssertImpl.feature.returnValueOf0(this, method) - -@Suppress("DeprecatedCallableAddReplaceWith", "unused", "UNUSED_PARAMETER") -@Deprecated("Use the overload with KFunction1 instead, this way you do not access `subject` too early. Use `YourClass::property` instead of `subject::property`") -fun CollectingAssertionPlant.returnValueOf(method: KFunction0): AssertionPlantNullable - = throw PleaseUseReplacementException("Use the overload with KFunction1 instead, this way you do not access `subject` too early. Use `YourClass::property` instead of `subject::property`") - -/** - * Creates an [AssertionPlantNullable], for the value returned by calling [method], which eventually adds - * [AssertionGroup]s with a [FeatureAssertionGroupType], containing the assertions created for the return value, - * to the current plant. - * - * @return An [AssertionPlantNullable] for the given [property]. - */ -@JvmName("safeReturnValueOf") -@Deprecated( - "Switch from Assert to Expect and use feature instead; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().feature(method).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.infix.en_GB.feature" - ) -) -fun Assert.returnValueOf(method: KFunction1): AssertionPlantNullable - = AssertImpl.feature.returnValueOf0(this, method) - - -// Arg 1 ---------------------------------------------------------------------------- - -/** - * Creates an [AssertionPlant], for the value returned by calling [method] with [arg1], which eventually adds - * [AssertionGroup]s with a [FeatureAssertionGroupType], containing the assertions created for the return value, - * to the current plant. - * - * @return An [AssertionPlant] for the return value of the given [method]. - */ -@Deprecated( - "Switch from Assert to Expect and use feature instead; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().feature { f(method, arg1) }.asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.infix.en_GB.feature" - ) -) -fun Assert.returnValueOf(method: KFunction1, arg1: T1): AssertionPlant - = AssertImpl.feature.returnValueOf1(this, method, arg1) - -@Suppress("DeprecatedCallableAddReplaceWith", "unused", "UNUSED_PARAMETER") -@Deprecated("Use the overload with KFunction2 instead, this way you do not access `subject` too early. Use `YourClass::property` instead of `subject::property`") -fun CollectingAssertionPlant.returnValueOf(method: KFunction1, arg1: T1): AssertionPlant - = throw PleaseUseReplacementException("Use the overload with KFunction2 instead, this way you do not access `subject` too early. Use `YourClass::property` instead of `subject::property`") - -/** - * Creates an [AssertionPlant], for the value returned by calling [method] with [arg1], which eventually adds - * [AssertionGroup]s with a [FeatureAssertionGroupType], containing the assertions created for the return value, - * to the current plant. - * - * @return An [AssertionPlant] for the return value of the given [method]. - */ -@JvmName("safeReturnValueOf") -@Deprecated( - "Switch from Assert to Expect and use feature instead; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().feature(of(method, arg1)).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.infix.en_GB.feature", - "ch.tutteli.atrium.api.infix.en_GB.of" - ) -) -fun Assert.returnValueOf(method: KFunction2, arg1: T1): AssertionPlant - = AssertImpl.feature.returnValueOf1(this, method, arg1) - - -/** - * Creates an [AssertionPlant], for the value returned by calling [method] with [arg1], which eventually adds - * [AssertionGroup]s with a [FeatureAssertionGroupType], containing the assertions created for the return value, - * to the current plant -- starting with a group consisting of the [Assertion]s created by the - * [assertionCreator] lambda. - * - * @return An [AssertionPlant] for the return value of the given [method]. - * - * @throws AssertionError Might throw an [AssertionError] if an additionally created [Assertion] - * (by calling [assertionCreator]) does not hold. - */ -@Deprecated( - "Switch from Assert to Expect and use feature instead; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().feature(of({ f(method, arg1) }, { asAssert(assertionCreator) })).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.infix.en_GB.feature", - "ch.tutteli.atrium.api.infix.en_GB.of" - ) -) -fun Assert.returnValueOf(method: KFunction1, arg1: T1, assertionCreator: Assert.() -> Unit): AssertionPlant - = AssertImpl.feature.returnValueOf1(this, method, arg1, assertionCreator) - -@Suppress("DeprecatedCallableAddReplaceWith", "unused", "UNUSED_PARAMETER") -@Deprecated("Use the overload with KFunction2 instead, this way you do not access `subject` too early. Use `YourClass::property` instead of `subject::property`") -fun CollectingAssertionPlant.returnValueOf(method: KFunction1, arg1: T1, assertionCreator: Assert.() -> Unit): AssertionPlant - = throw PleaseUseReplacementException("Use the overload with KFunction2 instead, this way you do not access `subject` too early. Use `YourClass::property` instead of `subject::property`") - -/** - * Creates an [AssertionPlant], for the value returned by calling [method] with [arg1], which eventually adds - * [AssertionGroup]s with a [FeatureAssertionGroupType], containing the assertions created for the return value, - * to the current plant -- starting with a group consisting of the [Assertion]s created by the - * [assertionCreator] lambda. - * - * @return An [AssertionPlant] for the return value of the given [method]. - * - * @throws AssertionError Might throw an [AssertionError] if an additionally created [Assertion] - * (by calling [assertionCreator]) does not hold. - */ -@JvmName("safeReturnValueOf") -@Deprecated( - "Switch from Assert to Expect and use feature instead; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().feature(of(method, arg1, { asAssert(assertionCreator) })).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.infix.en_GB.feature", - "ch.tutteli.atrium.api.infix.en_GB.of" - ) -) -fun Assert.returnValueOf(method: KFunction2, arg1: T1, assertionCreator: Assert.() -> Unit): AssertionPlant - = AssertImpl.feature.returnValueOf1(this, method, arg1, assertionCreator) - - -/** - * Creates an [AssertionPlantNullable], for the value returned by calling [method] with [arg1], which eventually adds - * [AssertionGroup]s with a [FeatureAssertionGroupType], containing the assertions created for the return value, - * to the current plant. - * - * @return An [AssertionPlantNullable] for the given [property]. - */ -@Deprecated( - "Switch from Assert to Expect and use feature instead; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().feature { f(method, arg1) }.asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.infix.en_GB.feature" - ) -) -fun Assert.returnValueOf(method: KFunction1, arg1: T1): AssertionPlantNullable - = AssertImpl.feature.returnValueOf1(this, method, arg1) - -@Suppress("DeprecatedCallableAddReplaceWith", "unused", "UNUSED_PARAMETER") -@Deprecated("Use the overload with KFunction2 instead, this way you do not access `subject` too early. Use `YourClass::property` instead of `subject::property`") -fun CollectingAssertionPlant.returnValueOf(method: KFunction1, arg1: T1): AssertionPlantNullable - = throw PleaseUseReplacementException("Use the overload with KFunction2 instead, this way you do not access `subject` too early. Use `YourClass::property` instead of `subject::property`") - -/** - * Creates an [AssertionPlantNullable], for the value returned by calling [method] with [arg1], which eventually adds - * [AssertionGroup]s with a [FeatureAssertionGroupType], containing the assertions created for the return value, - * to the current plant. - * - * @return An [AssertionPlantNullable] for the given [property]. - */ -@JvmName("safeReturnValueOf") -@Deprecated( - "Switch from Assert to Expect and use feature instead; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().feature(of(method, arg1)).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.infix.en_GB.feature", - "ch.tutteli.atrium.api.infix.en_GB.of" - ) -) -fun Assert.returnValueOf(method: KFunction2, arg1: T1): AssertionPlantNullable - = AssertImpl.feature.returnValueOf1(this, method, arg1) - - -// Arg 2 ---------------------------------------------------------------------------- - -/** - * Creates an [AssertionPlant], for the value returned by calling [method] with [arg1] and [arg2], which eventually - * adds [AssertionGroup]s with a [FeatureAssertionGroupType], containing the assertions created for the return value, - * to the current plant. - * - * @return An [AssertionPlant] for the return value of the given [method]. - */ -@Deprecated( - "Switch from Assert to Expect and use feature instead; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().feature { f(method, arg1, arg2) }.asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.infix.en_GB.feature" - ) -) -fun Assert.returnValueOf(method: KFunction2, arg1: T1, arg2: T2): AssertionPlant - = AssertImpl.feature.returnValueOf2(this, method, arg1, arg2) - -@Suppress("DeprecatedCallableAddReplaceWith", "unused", "UNUSED_PARAMETER") -@Deprecated("Use the overload with KFunction3 instead, this way you do not access `subject` too early. Use `YourClass::property` instead of `subject::property`") -fun CollectingAssertionPlant.returnValueOf(method: KFunction2, arg1: T1, arg2: T2): AssertionPlant - = throw PleaseUseReplacementException("Use the overload with KFunction3 instead, this way you do not access `subject` too early. Use `YourClass::property` instead of `subject::property`") - -/** - * Creates an [AssertionPlant], for the value returned by calling [method] with [arg1] and [arg2], which eventually - * adds [AssertionGroup]s with a [FeatureAssertionGroupType], containing the assertions created for the return value, - * to the current plant. - * - * @return An [AssertionPlant] for the return value of the given [method]. - */ -@JvmName("safeReturnValueOf") -@Deprecated( - "Switch from Assert to Expect and use feature instead; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().feature(of(method, arg1, arg2)).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.infix.en_GB.feature", - "ch.tutteli.atrium.api.infix.en_GB.of" - ) -) -fun Assert.returnValueOf(method: KFunction3, arg1: T1, arg2: T2): AssertionPlant - = AssertImpl.feature.returnValueOf2(this, method, arg1, arg2) - - -/** - * Creates an [AssertionPlant], for the value returned by calling [method] with [arg1] and [arg2], which eventually - * adds [AssertionGroup]s with a [FeatureAssertionGroupType], containing the assertions created for the return value, - * to the current plant -- starting with a group consisting of the [Assertion]s created by the - * [assertionCreator] lambda. - * - * @return An [AssertionPlant] for the return value of the given [method]. - * - * @throws AssertionError Might throw an [AssertionError] if an additionally created [Assertion] - * (by calling [assertionCreator]) does not hold. - */ -@Deprecated( - "Switch from Assert to Expect and use feature instead; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().feature(of({ f(method, arg1, arg2) }, { asAssert(assertionCreator) })).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.infix.en_GB.feature", - "ch.tutteli.atrium.api.infix.en_GB.of" - ) -) -fun Assert.returnValueOf(method: KFunction2, arg1: T1, arg2: T2, assertionCreator: Assert.() -> Unit): AssertionPlant - = AssertImpl.feature.returnValueOf2(this, method, arg1, arg2, assertionCreator) - -@Suppress("DeprecatedCallableAddReplaceWith", "unused", "UNUSED_PARAMETER") -@Deprecated("Use the overload with KFunction3 instead, this way you do not access `subject` too early. Use `YourClass::property` instead of `subject::property`") -fun CollectingAssertionPlant.returnValueOf(method: KFunction2, arg1: T1, arg2: T2, assertionCreator: Assert.() -> Unit): AssertionPlant - = throw PleaseUseReplacementException("Use the overload with KFunction3 instead, this way you do not access `subject` too early. Use `YourClass::property` instead of `subject::property`") - -/** - * Creates an [AssertionPlant], for the value returned by calling [method] with [arg1] and [arg2], which eventually - * adds [AssertionGroup]s with a [FeatureAssertionGroupType], containing the assertions created for the return value, - * to the current plant -- starting with a group consisting of the [Assertion]s created by the - * [assertionCreator] lambda. - * - * @return An [AssertionPlant] for the return value of the given [method]. - * - * @throws AssertionError Might throw an [AssertionError] if an additionally created [Assertion] - * (by calling [assertionCreator]) does not hold. - */ -@JvmName("safeReturnValueOf") -@Deprecated( - "Switch from Assert to Expect and use feature instead; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().feature(of(method, arg1, arg2, { asAssert(assertionCreator) })).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.infix.en_GB.feature", - "ch.tutteli.atrium.api.infix.en_GB.of" - ) -) -fun Assert.returnValueOf(method: KFunction3, arg1: T1, arg2: T2, assertionCreator: Assert.() -> Unit): AssertionPlant - = AssertImpl.feature.returnValueOf2(this, method, arg1, arg2, assertionCreator) - - -/** - * Creates an [AssertionPlantNullable], for the value returned by calling [method] with [arg1] and [arg2], which - * eventually adds [AssertionGroup]s with a [FeatureAssertionGroupType], containing the assertions created for - * the return value, to the current plant. - * - * @return An [AssertionPlantNullable] for the given [property]. - */ -@Deprecated( - "Switch from Assert to Expect and use feature instead; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().feature { f(method, arg1, arg2) }.asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.infix.en_GB.feature" - ) -) -fun Assert.returnValueOf(method: KFunction2, arg1: T1, arg2: T2): AssertionPlantNullable - = AssertImpl.feature.returnValueOf2(this, method, arg1, arg2) - -@Suppress("DeprecatedCallableAddReplaceWith", "unused", "UNUSED_PARAMETER") -@Deprecated("Use the overload with KFunction3 instead, this way you do not access `subject` too early. Use `YourClass::property` instead of `subject::property`") -fun CollectingAssertionPlant.returnValueOf(method: KFunction2, arg1: T1, arg2: T2): AssertionPlantNullable - = throw PleaseUseReplacementException("Use the overload with KFunction3 instead, this way you do not access `subject` too early. Use `YourClass::property` instead of `subject::property`") - -/** - * Creates an [AssertionPlantNullable], for the value returned by calling [method] with [arg1] and [arg2], which - * eventually adds [AssertionGroup]s with a [FeatureAssertionGroupType], containing the assertions created for - * the return value, to the current plant. - * - * @return An [AssertionPlantNullable] for the given [property]. - */ -@JvmName("safeReturnValueOf") -@Deprecated( - "Switch from Assert to Expect and use feature instead; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().feature(of(method, arg1, arg2)).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.infix.en_GB.feature", - "ch.tutteli.atrium.api.infix.en_GB.of" - ) -) -fun Assert.returnValueOf(method: KFunction3, arg1: T1, arg2: T2): AssertionPlantNullable - = AssertImpl.feature.returnValueOf2(this, method, arg1, arg2) - - -// Arg 3 ---------------------------------------------------------------------------- - -/** - * Creates an [AssertionPlant], for the value returned by calling [method] with [arg1], [arg2] and [arg3], - * which eventually adds [AssertionGroup]s with a [FeatureAssertionGroupType], containing the assertions created - * for the return value, to the current plant. - * - * @return An [AssertionPlant] for the return value of the given [method]. - */ -@Deprecated( - "Switch from Assert to Expect and use feature instead; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().feature { f(method, arg1, arg2, arg3) }.asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.infix.en_GB.feature" - ) -) -fun Assert.returnValueOf(method: KFunction3, arg1: T1, arg2: T2, arg3: T3): AssertionPlant - = AssertImpl.feature.returnValueOf3(this, method, arg1, arg2, arg3) - -@Suppress("DeprecatedCallableAddReplaceWith", "unused", "UNUSED_PARAMETER") -@Deprecated("Use the overload with KFunction4 instead, this way you do not access `subject` too early. Use `YourClass::property` instead of `subject::property`") -fun CollectingAssertionPlant.returnValueOf(method: KFunction3, arg1: T1, arg2: T2, arg3: T3): AssertionPlant - = throw PleaseUseReplacementException("Use the overload with KFunction4 instead, this way you do not access `subject` too early. Use `YourClass::property` instead of `subject::property`") - -/** - * Creates an [AssertionPlant], for the value returned by calling [method] with [arg1], [arg2] and [arg3], - * which eventually adds [AssertionGroup]s with a [FeatureAssertionGroupType], containing the assertions created - * for the return value, to the current plant. - * - * @return An [AssertionPlant] for the return value of the given [method]. - */ -@JvmName("safeReturnValueOf") -@Deprecated( - "Switch from Assert to Expect and use feature instead; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().feature(of(method, arg1, arg2, arg3)).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.infix.en_GB.feature", - "ch.tutteli.atrium.api.infix.en_GB.of" - ) -) -fun Assert.returnValueOf(method: KFunction4, arg1: T1, arg2: T2, arg3: T3): AssertionPlant - = AssertImpl.feature.returnValueOf3(this, method, arg1, arg2, arg3) - - -/** - * Creates an [AssertionPlant], for the value returned by calling [method] with [arg1], [arg2] and [arg3], - * which eventually adds [AssertionGroup]s with a [FeatureAssertionGroupType], containing the assertions created - * for the return value, to the current plant -- starting with a group consisting of the [Assertion]s created by the - * [assertionCreator] lambda. - * - * @return An [AssertionPlant] for the return value of the given [method]. - * - * @throws AssertionError Might throw an [AssertionError] if an additionally created [Assertion] - * (by calling [assertionCreator]) does not hold. - */ -@Deprecated( - "Switch from Assert to Expect and use feature instead; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().feature(of({ f(method, arg1, arg2, arg3) }, { asAssert(assertionCreator) })).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.infix.en_GB.feature", - "ch.tutteli.atrium.api.infix.en_GB.of" - ) -) -fun Assert.returnValueOf(method: KFunction3, arg1: T1, arg2: T2, arg3: T3, assertionCreator: Assert.() -> Unit): AssertionPlant - = AssertImpl.feature.returnValueOf3(this, method, arg1, arg2, arg3, assertionCreator) - -@Suppress("DeprecatedCallableAddReplaceWith", "unused", "UNUSED_PARAMETER") -@Deprecated("Use the overload with KFunction4 instead, this way you do not access `subject` too early. Use `YourClass::property` instead of `subject::property`") -fun CollectingAssertionPlant.returnValueOf(method: KFunction3, arg1: T1, arg2: T2, arg3: T3, assertionCreator: Assert.() -> Unit): AssertionPlant - = throw PleaseUseReplacementException("Use the overload with KFunction4 instead, this way you do not access `subject` too early. Use `YourClass::property` instead of `subject::property`") - -/** - * Creates an [AssertionPlant], for the value returned by calling [method] with [arg1], [arg2] and [arg3], - * which eventually adds [AssertionGroup]s with a [FeatureAssertionGroupType], containing the assertions created - * for the return value, to the current plant -- starting with a group consisting of the [Assertion]s created by the - * [assertionCreator] lambda. - * - * @return An [AssertionPlant] for the return value of the given [method]. - * - * @throws AssertionError Might throw an [AssertionError] if an additionally created [Assertion] - * (by calling [assertionCreator]) does not hold. - */ -@JvmName("safeReturnValueOf") -@Deprecated( - "Switch from Assert to Expect and use feature instead; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().feature(of(method, arg1, arg2, arg3, { asAssert(assertionCreator) })).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.infix.en_GB.feature", - "ch.tutteli.atrium.api.infix.en_GB.of" - ) -) -fun Assert.returnValueOf(method: KFunction4, arg1: T1, arg2: T2, arg3: T3, assertionCreator: Assert.() -> Unit): AssertionPlant - = AssertImpl.feature.returnValueOf3(this, method, arg1, arg2, arg3, assertionCreator) - - -/** - * Creates an [AssertionPlantNullable], for the value returned by calling [method] with [arg1], [arg2] and [arg3], - * which eventually adds [AssertionGroup]s with a [FeatureAssertionGroupType], containing the assertions created for - * the return value, to the current plant. - * - * @return An [AssertionPlantNullable] for the given [property]. - */ -@Deprecated( - "Switch from Assert to Expect and use feature instead; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().feature { f(method, arg1, arg2, arg3) }.asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.infix.en_GB.feature" - ) -) -fun Assert.returnValueOf(method: KFunction3, arg1: T1, arg2: T2, arg3: T3): AssertionPlantNullable - = AssertImpl.feature.returnValueOf3(this, method, arg1, arg2, arg3) - -@Suppress("DeprecatedCallableAddReplaceWith", "unused", "UNUSED_PARAMETER") -@Deprecated("Use the overload with KFunction4 instead, this way you do not access `subject` too early. Use `YourClass::property` instead of `subject::property`") -fun CollectingAssertionPlant.returnValueOf(method: KFunction3, arg1: T1, arg2: T2, arg3: T3): AssertionPlantNullable - = throw PleaseUseReplacementException("Use the overload with KFunction4 instead, this way you do not access `subject` too early. Use `YourClass::property` instead of `subject::property`") - -/** - * Creates an [AssertionPlantNullable], for the value returned by calling [method] with [arg1], [arg2] and [arg3], - * which eventually adds [AssertionGroup]s with a [FeatureAssertionGroupType], containing the assertions created for - * the return value, to the current plant. - * - * @return An [AssertionPlantNullable] for the given [property]. - */ -@JvmName("safeReturnValueOf") -@Deprecated( - "Switch from Assert to Expect and use feature instead; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().feature(of(method, arg1, arg2, arg3)).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.infix.en_GB.feature", - "ch.tutteli.atrium.api.infix.en_GB.of" - ) -) -fun Assert.returnValueOf(method: KFunction4, arg1: T1, arg2: T2, arg3: T3): AssertionPlantNullable - = AssertImpl.feature.returnValueOf3(this, method, arg1, arg2, arg3) - - -// Arg 4 ---------------------------------------------------------------------------- - -/** - * Creates an [AssertionPlant], for the value returned by calling [method] with [arg1], [arg2], [arg3] and [arg4], - * which eventually adds [AssertionGroup]s with a [FeatureAssertionGroupType], containing the assertions created - * for the return value, to the current plant. - * - * @return An [AssertionPlant] for the return value of the given [method]. - */ -@Deprecated( - "Switch from Assert to Expect and use feature instead; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().feature { f(method, arg1, arg2, arg3, arg4) }.asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.infix.en_GB.feature" - ) -) -fun Assert.returnValueOf(method: KFunction4, arg1: T1, arg2: T2, arg3: T3, arg4: T4): AssertionPlant - = AssertImpl.feature.returnValueOf4(this, method, arg1, arg2, arg3, arg4) - -@Suppress("DeprecatedCallableAddReplaceWith", "unused", "UNUSED_PARAMETER") -@Deprecated("Use the overload with KFunction5 instead, this way you do not access `subject` too early. Use `YourClass::property` instead of `subject::property`") -fun CollectingAssertionPlant.returnValueOf(method: KFunction4, arg1: T1, arg2: T2, arg3: T3, arg4: T4): AssertionPlant - = throw PleaseUseReplacementException("Use the overload with KFunction5 instead, this way you do not access `subject` too early. Use `YourClass::property` instead of `subject::property`") - -/** - * Creates an [AssertionPlant], for the value returned by calling [method] with [arg1], [arg2], [arg3] and [arg4], - * which eventually adds [AssertionGroup]s with a [FeatureAssertionGroupType], containing the assertions created - * for the return value, to the current plant. - * - * @return An [AssertionPlant] for the return value of the given [method]. - */ -@JvmName("safeReturnValueOf") -@Deprecated( - "Switch from Assert to Expect and use feature instead; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().feature(of(method, arg1, arg2, arg3, arg4)).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.infix.en_GB.feature", - "ch.tutteli.atrium.api.infix.en_GB.of" - ) -) -fun Assert.returnValueOf(method: KFunction5, arg1: T1, arg2: T2, arg3: T3, arg4: T4): AssertionPlant - = AssertImpl.feature.returnValueOf4(this, method, arg1, arg2, arg3, arg4) - - -/** - * Creates an [AssertionPlant], for the value returned by calling [method] with [arg1], [arg2], [arg3] and [arg4], - * which eventually adds [AssertionGroup]s with a [FeatureAssertionGroupType], containing the assertions created - * for the return value, to the current plant -- starting with a group consisting of the [Assertion]s created by the - * [assertionCreator] lambda. - * - * @return An [AssertionPlant] for the return value of the given [method]. - * - * @throws AssertionError Might throw an [AssertionError] if an additionally created [Assertion] - * (by calling [assertionCreator]) does not hold. - */ -@Deprecated( - "Switch from Assert to Expect and use feature instead; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().feature(of({ f(method, arg1, arg2, arg3, arg4) }, { asAssert(assertionCreator) })).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.infix.en_GB.feature", - "ch.tutteli.atrium.api.infix.en_GB.of" - ) -) -fun Assert.returnValueOf(method: KFunction4, arg1: T1, arg2: T2, arg3: T3, arg4: T4, assertionCreator: Assert.() -> Unit): AssertionPlant - = AssertImpl.feature.returnValueOf4(this, method, arg1, arg2, arg3, arg4, assertionCreator) - -@Suppress("DeprecatedCallableAddReplaceWith", "unused", "UNUSED_PARAMETER") -@Deprecated("Use the overload with KFunction5 instead, this way you do not access `subject` too early. Use `YourClass::property` instead of `subject::property`") -fun CollectingAssertionPlant.returnValueOf(method: KFunction4, arg1: T1, arg2: T2, arg3: T3, arg4: T4, assertionCreator: Assert.() -> Unit): AssertionPlant - = throw PleaseUseReplacementException("Use the overload with KFunction5 instead, this way you do not access `subject` too early. Use `YourClass::property` instead of `subject::property`") - -/** - * Creates an [AssertionPlant], for the value returned by calling [method] with [arg1], [arg2], [arg3] and [arg4], - * which eventually adds [AssertionGroup]s with a [FeatureAssertionGroupType], containing the assertions created - * for the return value, to the current plant -- starting with a group consisting of the [Assertion]s created by the - * [assertionCreator] lambda. - * - * @return An [AssertionPlant] for the return value of the given [method]. - * - * @throws AssertionError Might throw an [AssertionError] if an additionally created [Assertion] - * (by calling [assertionCreator]) does not hold. - */ -@JvmName("safeReturnValueOf") -@Deprecated( - "Switch from Assert to Expect and use feature instead; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().feature(of(method, arg1, arg2, arg3, arg4, { asAssert(assertionCreator) })).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.infix.en_GB.feature", - "ch.tutteli.atrium.api.infix.en_GB.of" - ) -) -fun Assert.returnValueOf(method: KFunction5, arg1: T1, arg2: T2, arg3: T3, arg4: T4, assertionCreator: Assert.() -> Unit): AssertionPlant - = AssertImpl.feature.returnValueOf4(this, method, arg1, arg2, arg3, arg4, assertionCreator) - - -/** - * Creates an [AssertionPlantNullable], for the value returned by calling [method] with [arg1], [arg2], [arg3] - * and [arg4], which eventually adds [AssertionGroup]s with a [FeatureAssertionGroupType], containing the assertions - * created for the return value, to the current plant. - * - * @return An [AssertionPlantNullable] for the given [property]. - */ -@Deprecated( - "Switch from Assert to Expect and use feature instead; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().feature { f(method, arg1, arg2, arg3, arg4) }.asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.infix.en_GB.feature" - ) -) -fun Assert.returnValueOf(method: KFunction4, arg1: T1, arg2: T2, arg3: T3, arg4: T4): AssertionPlantNullable - = AssertImpl.feature.returnValueOf4(this, method, arg1, arg2, arg3, arg4) - -@Suppress("DeprecatedCallableAddReplaceWith", "unused", "UNUSED_PARAMETER") -@Deprecated("Use the overload with KFunction5 instead, this way you do not access `subject` too early. Use `YourClass::property` instead of `subject::property`") -fun CollectingAssertionPlant.returnValueOf(method: KFunction4, arg1: T1, arg2: T2, arg3: T3, arg4: T4): AssertionPlantNullable - = throw PleaseUseReplacementException("Use the overload with KFunction5 instead, this way you do not access `subject` too early. Use `YourClass::property` instead of `subject::property`") - -/** - * Creates an [AssertionPlantNullable], for the value returned by calling [method] with [arg1], [arg2], [arg3] - * and [arg4], which eventually adds [AssertionGroup]s with a [FeatureAssertionGroupType], containing the assertions - * created for the return value, to the current plant. - * - * @return An [AssertionPlantNullable] for the given [property]. - */ -@JvmName("safeReturnValueOf") -@Deprecated( - "Switch from Assert to Expect and use feature instead; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().feature(of(method, arg1, arg2, arg3, arg4)).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.infix.en_GB.feature", - "ch.tutteli.atrium.api.infix.en_GB.of" - ) -) -fun Assert.returnValueOf(method: KFunction5, arg1: T1, arg2: T2, arg3: T3, arg4: T4): AssertionPlantNullable - = AssertImpl.feature.returnValueOf4(this, method, arg1, arg2, arg3, arg4) - - -// Arg 5 ---------------------------------------------------------------------------- - -/** - * Creates an [AssertionPlant], for the value returned by calling [method] with [arg1], [arg2], [arg3], [arg4] - * and [arg5], which eventually adds [AssertionGroup]s with a [FeatureAssertionGroupType], containing the assertions - * created for the return value, to the current plant. - * - * @return An [AssertionPlant] for the return value of the given [method]. - */ -@Deprecated( - "Switch from Assert to Expect and use feature instead; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().feature { f(method, arg1, arg2, arg3, arg4, arg5) }.asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.infix.en_GB.feature" - ) -) -fun Assert.returnValueOf(method: KFunction5, arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5): AssertionPlant - = AssertImpl.feature.returnValueOf5(this, method, arg1, arg2, arg3, arg4, arg5) - -@Suppress("DeprecatedCallableAddReplaceWith", "unused", "UNUSED_PARAMETER") -@Deprecated("Use the overload with KFunction6 instead, this way you do not access `subject` too early. Use `YourClass::property` instead of `subject::property`") -fun CollectingAssertionPlant.returnValueOf(method: KFunction5, arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5): AssertionPlant - = throw PleaseUseReplacementException("Use the overload with KFunction6 instead, this way you do not access `subject` too early. Use `YourClass::property` instead of `subject::property`") - -/** - * Creates an [AssertionPlant], for the value returned by calling [method] with [arg1], [arg2], [arg3], [arg4] - * and [arg5], which eventually adds [AssertionGroup]s with a [FeatureAssertionGroupType], containing the assertions - * created for the return value, to the current plant. - * - * @return An [AssertionPlant] for the return value of the given [method]. - */ -@JvmName("safeReturnValueOf") -@Deprecated( - "Switch from Assert to Expect and use feature instead; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().feature(of(method, arg1, arg2, arg3, arg4, arg5)).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.infix.en_GB.feature", - "ch.tutteli.atrium.api.infix.en_GB.of" - ) -) -fun Assert.returnValueOf(method: KFunction6, arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5): AssertionPlant - = AssertImpl.feature.returnValueOf5(this, method, arg1, arg2, arg3, arg4, arg5) - - -/** - * Creates an [AssertionPlant], for the value returned by calling [method] with [arg1], [arg2], [arg3], [arg4] - * and [arg5], which eventually adds [AssertionGroup]s with a [FeatureAssertionGroupType], containing the assertions - * created for the return value, to the current plant -- starting with a group consisting of the [Assertion]s created - * by the [assertionCreator] lambda. - * - * @return An [AssertionPlant] for the return value of the given [method]. - * - * @throws AssertionError Might throw an [AssertionError] if an additionally created [Assertion] - * (by calling [assertionCreator]) does not hold. - */ -@Deprecated( - "Switch from Assert to Expect and use feature instead; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().feature(of({ f(method, arg1, arg2, arg3, arg4, arg5) }, { asAssert(assertionCreator) })).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.infix.en_GB.feature", - "ch.tutteli.atrium.api.infix.en_GB.of" - ) -) -fun Assert.returnValueOf(method: KFunction5, arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, assertionCreator: Assert.() -> Unit): AssertionPlant - = AssertImpl.feature.returnValueOf5(this, method, arg1, arg2, arg3, arg4, arg5, assertionCreator) - -@Suppress("DeprecatedCallableAddReplaceWith", "unused", "UNUSED_PARAMETER") -@Deprecated("Use the overload with KFunction6 instead, this way you do not access `subject` too early. Use `YourClass::property` instead of `subject::property`") -fun CollectingAssertionPlant.returnValueOf(method: KFunction5, arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, assertionCreator: Assert.() -> Unit): AssertionPlant - = throw PleaseUseReplacementException("Use the overload with KFunction6 instead, this way you do not access `subject` too early. Use `YourClass::property` instead of `subject::property`") - -/** - * Creates an [AssertionPlant], for the value returned by calling [method] with [arg1], [arg2], [arg3], [arg4] - * and [arg5], which eventually adds [AssertionGroup]s with a [FeatureAssertionGroupType], containing the assertions - * created for the return value, to the current plant -- starting with a group consisting of the [Assertion]s created - * by the [assertionCreator] lambda. - * - * @return An [AssertionPlant] for the return value of the given [method]. - * - * @throws AssertionError Might throw an [AssertionError] if an additionally created [Assertion] - * (by calling [assertionCreator]) does not hold. - */ -@JvmName("safeReturnValueOf") -@Deprecated( - "Switch from Assert to Expect and use feature instead; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().feature(of(method, arg1, arg2, arg3, arg4, arg5, { asAssert(assertionCreator) })).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.infix.en_GB.feature", - "ch.tutteli.atrium.api.infix.en_GB.of" - ) -) -fun Assert.returnValueOf(method: KFunction6, arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, assertionCreator: Assert.() -> Unit): AssertionPlant - = AssertImpl.feature.returnValueOf5(this, method, arg1, arg2, arg3, arg4, arg5, assertionCreator) - - -/** - * Creates an [AssertionPlantNullable], for the value returned by calling [method] with [arg1], [arg2], [arg3], - * [arg4] and [arg5], which eventually adds [AssertionGroup]s with a [FeatureAssertionGroupType], containing the - * assertions created for the return value, to the current plant. - * - * @return An [AssertionPlantNullable] for the given [property]. - */ -@Deprecated( - "Switch from Assert to Expect and use feature instead; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().feature { f(method, arg1, arg2, arg3, arg4, arg5) }.asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.infix.en_GB.feature" - ) -) -fun Assert.returnValueOf(method: KFunction5, arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5): AssertionPlantNullable - = AssertImpl.feature.returnValueOf5(this, method, arg1, arg2, arg3, arg4, arg5) - -@Suppress("DeprecatedCallableAddReplaceWith", "unused", "UNUSED_PARAMETER") -@Deprecated("Use the overload with KFunction6 instead, this way you do not access `subject` too early. Use `YourClass::property` instead of `subject::property`") -fun CollectingAssertionPlant.returnValueOf(method: KFunction5, arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5): AssertionPlantNullable - = throw PleaseUseReplacementException("Use the overload with KFunction6 instead, this way you do not access `subject` too early. Use `YourClass::property` instead of `subject::property`") - -/** - * Creates an [AssertionPlantNullable], for the value returned by calling [method] with [arg1], [arg2], [arg3], - * [arg4] and [arg5], which eventually adds [AssertionGroup]s with a [FeatureAssertionGroupType], containing the - * assertions created for the return value, to the current plant. - * - * @return An [AssertionPlantNullable] for the given [property]. - */ -@JvmName("safeReturnValueOf") -@Deprecated( - "Switch from Assert to Expect and use feature instead; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().feature(of(method, arg1, arg2, arg3, arg4, arg5)).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.infix.en_GB.feature", - "ch.tutteli.atrium.api.infix.en_GB.of" - ) -) -fun Assert.returnValueOf(method: KFunction6, arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5): AssertionPlantNullable - = AssertImpl.feature.returnValueOf5(this, method, arg1, arg2, arg3, arg4, arg5) diff --git a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/iterableAssertions.kt b/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/iterableAssertions.kt deleted file mode 100644 index 5a79ccbf7..000000000 --- a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/iterableAssertions.kt +++ /dev/null @@ -1,375 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") - -@file:JvmMultifileClass -@file:JvmName("IterableAssertionsKt") -package ch.tutteli.atrium.api.cc.infix.en_GB - -import ch.tutteli.atrium.api.cc.infix.en_GB.creating.iterable.contains.builders.NotCheckerOption -import ch.tutteli.atrium.api.cc.infix.en_GB.creating.iterable.contains.builders.impl.NotCheckerOptionImpl -import ch.tutteli.atrium.api.cc.infix.en_GB.keywords.contain -import ch.tutteli.atrium.api.cc.infix.en_GB.keywords.only -import ch.tutteli.atrium.api.cc.infix.en_GB.keywords.order -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.domain.builders.AssertImpl -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.NoOpSearchBehaviour -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.NotSearchBehaviour -import kotlin.jvm.JvmMultifileClass -import kotlin.jvm.JvmName - -/** - * Creates an [IterableContains.Builder] based on this [AssertionPlant] which allows to define - * more sophisticated `contains` assertions. - * - * @return The newly created builder. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().contains(ch.tutteli.atrium.api.infix.en_GB.o)", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.infix.en_GB.contains", - "ch.tutteli.atrium.api.infix.en_GB.o" - ) -) -infix fun > Assert.to(@Suppress("UNUSED_PARAMETER") contain: contain): IterableContains.Builder - = AssertImpl.iterable.containsBuilder(this) - -/** - * Creates an [IterableContains.Builder] based on this [AssertionPlant] which allows to define - * more sophisticated `contains not` assertions. - * - * @return The newly created builder. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().containsNot(ch.tutteli.atrium.api.infix.en_GB.o)", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.infix.en_GB.containsNot", - "ch.tutteli.atrium.api.infix.en_GB.o" - ) -) -infix fun > Assert.notTo(@Suppress("UNUSED_PARAMETER") contain: contain): NotCheckerOption - = NotCheckerOptionImpl(AssertImpl.iterable.containsNotBuilder(this)) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] contains the [expected] value. - * - * It is a shortcut for `to contain inAny order atLeast 1 value expected` - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().contains(expected).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.api.infix.en_GB.contains", - "ch.tutteli.atrium.domain.builders.migration.asAssert" - ) -) -infix fun > Assert.contains(expected: E) - = o to contain inAny order atLeast 1 value expected - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] contains the expected [values]. - * - * It is a shortcut for `to contain inAny order atLeast 1 the Values(...)` - * - * Notice, that it does not search for unique matches. Meaning, if the iterable is `setOf('a', 'b')` and - * [values].[expected][Values.expected] is defined as `'a'` and - * one [values].[otherExpected][Values.otherExpected] is defined as `'a'` as well, then both match, - * even though they match the same entry. Use an option such as [atLeast], [atMost] and [exactly] to control the - * number of occurrences you expect. - * - * Meaning you might want to use: - * `to contain inAny order exactly 2 value 'a'` - * instead of: - * `contains Values('a', 'a')` - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().contains(ch.tutteli.atrium.api.infix.en_GB.values(values.expected, *values.otherExpected)).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.api.infix.en_GB.contains", - "ch.tutteli.atrium.api.infix.en_GB.values", - "ch.tutteli.atrium.domain.builders.migration.asAssert" - ) -) -infix fun > Assert.contains(values: Values): AssertionPlant - = o to contain inAny order atLeast 1 the values - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] contains an entry holding the - * assertions created by [assertionCreatorOrNull] or an entry which is `null` - * in case [assertionCreatorOrNull] is defined as `null`. - * - * It is a shortcut for `to contain inAny order atLeast 1 entry assertionCreatorOrNull` - * - * @param assertionCreatorOrNull The identification lambda which creates the assertions which the entry we are looking - * for has to hold; or in other words, the function which defines whether an entry is the one we are looking for - * or not. In case it is defined as `null`, then an entry is identified if it is `null` as well. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().contains(asSubExpect(assertionCreatorOrNull)).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.domain.builders.migration.asSubExpect", - "ch.tutteli.atrium.api.infix.en_GB.contains" - ) -) -infix fun > Assert.contains(assertionCreatorOrNull: (Assert.() -> Unit)?): AssertionPlant - = o to contain inAny order atLeast 1 entry assertionCreatorOrNull - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] contains an entry holding the - * assertions created by [entries].[assertionCreatorOrNull][Entries.assertionCreatorOrNull] or an entry - * which is `null` in case [entries].[assertionCreatorOrNull][Entries.assertionCreatorOrNull] - * is defined as `null` -- likewise an entry (can be the same) is searched for each of the - * [entries].[otherAssertionCreatorsOrNulls][Entries.otherAssertionCreatorsOrNulls]. - * - * It is a shortcut for `to contain inAny order atLeast 1 the Entries(...)` - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().contains(entries.mapArguments.to { asSubExpect(it) }.let { (first, rest) -> ch.tutteli.atrium.api.infix.en_GB.entries(first, *rest) }).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.api.infix.en_GB.contains", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.domain.builders.utils.mapArguments", - "ch.tutteli.atrium.domain.builders.migration.asSubExpect" - ) -) -infix fun > Assert.contains(entries: Entries): AssertionPlant - = o to contain inAny order atLeast 1 the entries - - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] contains only - * the [expected] value. - * - * It is a shortcut for `to contain inGiven order and only value expected` - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().containsExactly(expected).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.api.infix.en_GB.containsExactly", - "ch.tutteli.atrium.domain.builders.migration.asAssert" - ) -) -infix fun > Assert.containsExactly(expected: E): AssertionPlant - = o to contain inGiven order and only value expected - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] contains only - * the expected [values] in the defined order. - * - * It is a shortcut for `to contain inGiven order and only the Values(...)` - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().containsExactly(ch.tutteli.atrium.api.infix.en_GB.values(values.expected, *values.otherExpected)).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.api.infix.en_GB.containsExactly", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.infix.en_GB.values" - ) -) -infix fun > Assert.containsExactly(values: Values): AssertionPlant - = o to contain inGiven order and only the values - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] contains only one entry - * which is holding the assertions created by [assertionCreatorOrNull] or - * only one entry which is `null` in case [assertionCreatorOrNull] is defined as `null`. - * - * It is a shortcut for `to contain inGiven order and only entry assertionCreatorOrNull` - * - * @param assertionCreatorOrNull The identification lambda which creates the assertions which the entry we are looking - * for has to hold; or in other words, the function which defines whether an entry is the one we are looking for - * or not. In case it is defined as `null`, then an entry is identified if it is `null` as well. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().containsExactly(asSubExpect(assertionCreatorOrNull)).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.domain.builders.migration.asSubExpect", - "ch.tutteli.atrium.api.fluent.en_GB.containsExactly" - ) -) -infix fun > Assert.containsExactly(assertionCreatorOrNull: (Assert.() -> Unit)?): AssertionPlant - = o to contain inGiven order and only entry assertionCreatorOrNull - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] contains only an entry holding - * the assertions created by [entries].[assertionCreatorOrNull][Entries.assertionCreatorOrNull] or - * `null` in case [entries].[assertionCreatorOrNull][Entries.assertionCreatorOrNull] is defined as `null` - * and likewise an additional entry for each - * [entries].[otherAssertionCreatorsOrNulls][Entries.otherAssertionCreatorsOrNulls] (if given) - * whereas the entries have to appear in the defined order. - * - * It is a shortcut for `to contain inGiven order and only the Entries(...)` - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().containsExactly(entries.mapArguments.to { asSubExpect(it) }.let { (first, rest) -> ch.tutteli.atrium.api.infix.en_GB.entries(first, *rest) }).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.api.infix.en_GB.containsExactly", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.domain.builders.utils.mapArguments", - "ch.tutteli.atrium.domain.builders.migration.asSubExpect" - ) -) -infix fun > Assert.containsExactly(entries: Entries): AssertionPlant - = o to contain inGiven order and only the entries - - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] does not contain the [expected] value. - * - * It is a shortcut for `notTo contain value expected` - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().containsNot(expected).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.api.infix.en_GB.containsNot", - "ch.tutteli.atrium.domain.builders.migration.asAssert" - ) -) -infix fun > Assert.containsNot(expected: E): AssertionPlant - = o notTo contain value expected - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] does not contain the expected [values]. - * - * It is a shortcut for `notTo contain the Values(...)` - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().containsNot(ch.tutteli.atrium.api.infix.en_GB.values(values.expected, *values.otherExpected)).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.api.infix.en_GB.containsNot", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.infix.en_GB.values" - ) -) -infix fun > Assert.containsNot(values: Values): AssertionPlant - = o notTo contain the values - - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] contains an entry holding - * the assertions created by the [assertionCreatorOrNull] or an entry - * which is `null` in case [assertionCreatorOrNull] is defined as `null`. - * - * It is a shortcut for `to contain inAny order atLeast 1 entry assertionCreatorOrNull` - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().any(asSubExpect(assertionCreatorOrNull)).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.domain.builders.migration.asSubExpect", - "ch.tutteli.atrium.api.infix.en_GB.any" - ) -) -infix fun > Assert.any(assertionCreatorOrNull: (Assert.() -> Unit)?): AssertionPlant - = o to contain inAny order atLeast 1 entry assertionCreatorOrNull - - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] does not contain a single entry - * which holds all assertions created by [assertionCreatorOrNull] - * or does not contain a single entry which is `null` in case [assertionCreatorOrNull] is defined as `null`. - * - * It is a shortcut for `notTo contain entry assertionCreatorOrNull` - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().none(asSubExpect(assertionCreatorOrNull)).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.domain.builders.migration.asSubExpect", - "ch.tutteli.atrium.api.infix.en_GB.none" - ) -) -infix fun > Assert.none(assertionCreatorOrNull: (Assert.() -> Unit)?) - = o notTo contain entry assertionCreatorOrNull - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] has at least one element and - * that every element holds all assertions created by the - * [assertionCreatorOrNull] or that all elements are `null` - * in case [assertionCreatorOrNull] is defined as `null`. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Suppress("DEPRECATION") -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().all(asSubExpect(assertionCreatorOrNull)).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.domain.builders.migration.asSubExpect", - "ch.tutteli.atrium.api.infix.en_GB.all" - ) -) -infix fun > Assert.all(assertionCreatorOrNull: (Assert.() -> Unit)?) - = addAssertion(AssertImpl.iterable.all(this, assertionCreatorOrNull)) diff --git a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/iterableContainsCheckers.kt b/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/iterableContainsCheckers.kt deleted file mode 100644 index 7d02f61b6..000000000 --- a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/iterableContainsCheckers.kt +++ /dev/null @@ -1,121 +0,0 @@ -@file:Suppress("DEPRECATION" /* will be removed with 1.0.0 */) -package ch.tutteli.atrium.api.cc.infix.en_GB - -import ch.tutteli.atrium.api.cc.infix.en_GB.creating.iterable.contains.builders.* -import ch.tutteli.atrium.api.cc.infix.en_GB.creating.iterable.contains.builders.impl.* -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InAnyOrderSearchBehaviour - -/** - * Restricts a `contains` assertion by specifying that the number of occurrences of the entry which we are looking - * for occurs `at least` number of [times] within the [Iterable]. - * - * @param times The number which the check will compare against the actual number of times an expected entry is - * found in the [Iterable]. - * - * @return The newly created builder. - * @throws IllegalArgumentException In case [times] is smaller than zero. - * @throws IllegalArgumentException In case [times] equals to zero; use [containsNot] instead. - */ -@Deprecated( - "Switch from api-cc-infix-en_GB to api-infix-en_GB; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.atLeast(times)", - "ch.tutteli.atrium.api.infix.en_GB.atLeast" - ) -) -infix fun , S: InAnyOrderSearchBehaviour> IterableContains.Builder.atLeast(times: Int): AtLeastCheckerOption - = AtLeastCheckerOptionImpl(times, this) - -/** - * Restricts a `contains at least` assertion by specifying that the number of occurrences of the entry which we - * are looking for occurs `at most` number of [times] within the [Iterable]. - * - * The resulting restriction will be a `contains at least but at most` assertion. - * - * @param times The number which the check will compare against the actual number of times an expected entry is - * found in the [Iterable]. - * - * @return The newly created builder. - * @throws IllegalArgumentException In case [times] is smaller than zero. - * @throws IllegalArgumentException In case [times] equals to zero; use [containsNot] instead. - * @throws IllegalArgumentException In case [times] of this `at most` restriction equals to the number of the - * `at least` restriction; use the [exactly] restriction instead. - */ -@Deprecated( - "Switch from api-cc-infix-en_GB to api-infix-en_GB; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.butAtMost(times)", - "ch.tutteli.atrium.api.infix.en_GB.butAtMost" - ) -) -infix fun , S: InAnyOrderSearchBehaviour> AtLeastCheckerOption.butAtMost(times: Int): ButAtMostCheckerOption - = ButAtMostCheckerOptionImpl(times, this, containsBuilder) - -/** - * Restricts a `contains` assertion by specifying that the number of occurrences of the entry which we - * are looking for occurs `exactly` number of [times] within the [Iterable]. - * - * @param times The number which the check will compare against the actual number of times an expected entry is - * found in the [Iterable]. - * - * @return The newly created builder. - * @throws IllegalArgumentException In case [times] is smaller than zero. - * @throws IllegalArgumentException In case [times] equals to zero; use [containsNot] instead. - */ -@Deprecated( - "Switch from api-cc-infix-en_GB to api-infix-en_GB; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.exactly(times)", - "ch.tutteli.atrium.api.infix.en_GB.exactly" - ) -) -infix fun , S: InAnyOrderSearchBehaviour> IterableContains.Builder.exactly(times: Int): ExactlyCheckerOption - = ExactlyCheckerOptionImpl(times, this) - -/** - * Restricts a `contains` assertion by specifying that the number of occurrences of the entry which we - * are looking for occurs `at least` once but `at most` number of [times] within the [Iterable]. - * - * If you want to use a higher lower bound than one, then use `atLeast(2).butAtMost(3)` instead of `atMost(3)`. - * And in case you want to state that it is either not contained at all or at most a certain number of times, - * then use `notOrAtMost(2)` instead. - * - * @param times The number which the check will compare against the actual number of times an expected entry is - * found in the [Iterable]. - * - * @return The newly created builder. - * @throws IllegalArgumentException In case [times] is smaller than zero. - * @throws IllegalArgumentException In case [times] equals to zero; use [containsNot] instead. - * @throws IllegalArgumentException In case [times] equals to one; use [exactly] instead. - */ -@Deprecated( - "Switch from api-cc-infix-en_GB to api-infix-en_GB; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.atMost(times)", - "ch.tutteli.atrium.api.infix.en_GB.atMost" - ) -) -infix fun , S: InAnyOrderSearchBehaviour> IterableContains.Builder.atMost(times: Int): AtMostCheckerOption - = AtMostCheckerOptionImpl(times, this) - -/** - * Restricts a `contains` assertion by specifying that the number of occurrences of the entry which we - * are looking for occurs `not at all or at most` number of [times] within the [Iterable]. - * - * @param times The number which the check will compare against the actual number of times an expected entry is - * found in the [Iterable]. - * - * @return The newly created builder. - * @throws IllegalArgumentException In case [times] is smaller than zero. - * @throws IllegalArgumentException In case [times] equals to zero; use [containsNot] instead. - */ -@Deprecated( - "Switch from api-cc-infix-en_GB to api-infix-en_GB; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.notOrAtMost(times)", - "ch.tutteli.atrium.api.infix.en_GB.notOrAtMost" - ) -) -infix fun , S: InAnyOrderSearchBehaviour> IterableContains.Builder.notOrAtMost(times: Int): NotOrAtMostCheckerOption - = NotOrAtMostCheckerOptionImpl(times, this) diff --git a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/iterableContainsInAnyOrderCreators.kt b/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/iterableContainsInAnyOrderCreators.kt deleted file mode 100644 index a700850b9..000000000 --- a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/iterableContainsInAnyOrderCreators.kt +++ /dev/null @@ -1,129 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") - -@file:JvmMultifileClass -@file:JvmName("IterableContainsInAnyOrderCreatorsKt") -package ch.tutteli.atrium.api.cc.infix.en_GB - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.domain.builders.AssertImpl -import ch.tutteli.atrium.domain.builders.creating.basic.contains.addAssertionForAssert -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InAnyOrderSearchBehaviour -import kotlin.jvm.JvmMultifileClass -import kotlin.jvm.JvmName - -/** - * Finishes the specification of the sophisticated `contains` assertion where the [expected] - * value shall be searched within the [Iterable]. - * - * Delegates to `the Values(expectedOrNull)`. - * - * @param expected The value which is expected to be contained within the [Iterable]. - * - * @return The [AssertionPlant] for which the assertion was built to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated( - "Switch from api-cc-infix-en_GB to api-infix-en_GB; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.value(expected)", - "ch.tutteli.atrium.api.infix.en_GB.value" - ) -) -infix fun > IterableContains.CheckerOption.value(expected: E): AssertionPlant - = this the Values(expected) - -/** - * Finishes the specification of the sophisticated `contains` assertion where the expected [values] - * shall be searched within the [Iterable]. - * - * Notice, that it does not search for unique matches. Meaning, if the iterable is `setOf('a', 'b')` and - * [values].[expected][Values.expected] is defined as `'a'` and one - * [values].[otherExpected][Values.otherExpected] is defined as `'a'` as well, then both match, - * even though they match the same entry. Use an option such as [atLeast], [atMost] and [exactly] to control the - * number of occurrences you expect. - * - * Meaning you might want to use: - * `to contain inAny order exactly 2 value 'a'` - * instead of: - * `to contain inAny order exactly 1 the Values('a', 'a')` - * - * @param values The values which are expected to be contained within the [Iterable]. - * - * @return The [AssertionPlant] for which the assertion was built to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated( - "Switch from api-cc-infix-en_GB to api-infix-en_GB; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.the(ch.tutteli.atrium.api.infix.en_GB.values(values.expected, *values.otherExpected))", - "ch.tutteli.atrium.api.infix.en_GB.the", - "ch.tutteli.atrium.api.infix.en_GB.values" - ) -) -infix fun > IterableContains.CheckerOption.the(values: Values): AssertionPlant - = addAssertion(AssertImpl.iterable.contains.valuesInAnyOrder(this, values.toList())) - -/** - * Finishes the specification of the sophisticated `contains` assertion where an entry shall be searched which either - * holds all assertions [assertionCreatorOrNull] might create or needs to be `null` in case [assertionCreatorOrNull] - * is defined as `null`. - * - * Delegates to `the Entries(assertionCreatorOrNull)`. - * - * @param assertionCreatorOrNull The identification lambda which creates the assertions which the entry we are looking for - * has to hold; or in other words, the function which defines whether an entry is the one we are looking for - * or not. In case it is defined as `null`, then an entry is identified if it is `null` as well. - * - * @return The [AssertionPlant] for which the assertion was built to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.entry(asSubExpect(assertionCreatorOrNull))", - "ch.tutteli.atrium.api.infix.en_GB.entry", - "ch.tutteli.atrium.domain.builders.migration.asSubExpect" - ) -) -infix fun > IterableContains.CheckerOption.entry(assertionCreatorOrNull: (Assert.() -> Unit)?): AssertionPlant - = this the Entries(assertionCreatorOrNull) - -/** - * Finishes the specification of the sophisticated `contains` assertion where an entry shall be searched which either - * holds all assertions [entries].[assertionCreatorOrNull][Entries.assertionCreatorOrNull] might create or - * needs to be `null` in case [entries].[assertionCreatorOrNull][Entries.otherAssertionCreatorsOrNulls] - * is defined as `null` -- likewise an entry (can be the same) is searched for each of - * the [entries].[otherAssertionCreatorsOrNulls][Entries.otherAssertionCreatorsOrNulls]. - * - * @param entries The parameter object which contains the identification lambdas. - * - * @return The [AssertionPlant] for which the assertion was built to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Suppress("DEPRECATION") -@Deprecated( - "Switch from api-cc-infix-en_GB to api-infix-en_GB; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.the(entries.mapArguments.to { asSubExpect(it) }.let { (first, rest) -> ch.tutteli.atrium.api.infix.en_GB.entries(first, *rest) })", - "ch.tutteli.atrium.api.infix.en_GB.the", - "ch.tutteli.atrium.domain.builders.utils.mapArguments", - "ch.tutteli.atrium.domain.builders.migration.asSubExpect" - ) -) -infix fun > IterableContains.CheckerOption.the(entries: Entries): AssertionPlant - = addAssertion(AssertImpl.iterable.contains.entriesInAnyOrderWithAssert(this, entries.toList())) - -/** - * Helper method to simplify adding assertions to the plant which itself is stored in - * [CharSequenceContains.CheckerOption.containsBuilder]. - * - * @return The plant to support a fluent API. - */ -private fun , S : IterableContains.SearchBehaviour> IterableContains.CheckerOption.addAssertion( - assertion: Assertion -): AssertionPlant = addAssertionForAssert(assertion) diff --git a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/iterableContainsInAnyOrderOnlyCreators.kt b/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/iterableContainsInAnyOrderOnlyCreators.kt deleted file mode 100644 index f71f889c1..000000000 --- a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/iterableContainsInAnyOrderOnlyCreators.kt +++ /dev/null @@ -1,124 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") -@file:JvmMultifileClass -@file:JvmName("IterableContainsInAnyOrderOnlyCreatorsKt") -package ch.tutteli.atrium.api.cc.infix.en_GB - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.domain.builders.AssertImpl -import ch.tutteli.atrium.domain.builders.creating.basic.contains.addAssertionForAssert -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InAnyOrderOnlySearchBehaviour -import kotlin.jvm.JvmMultifileClass -import kotlin.jvm.JvmName - -/** - * Finishes the specification of the sophisticated `contains` assertion where the [Iterable] must contain only the - * [expected] value. - * - * Delegates to `the Values(expected)`. - * - * @param expected The value which is expected to be contained within the [Iterable]. - * - * @return The [AssertionPlant] for which the assertion was built to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated( - "Switch from api-cc-infix-en_GB to api-infix-en_GB; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.value(expected)", - "ch.tutteli.atrium.api.infix.en_GB.value" - ) -) -infix fun > IterableContains.Builder.value(expected: E): AssertionPlant - = this the Values(expected) - -/** - * Finishes the specification of the sophisticated `contains` assertion where the expected [values] - * must be contained in [Iterable] but it does not matter in which order. - * - * @param values The values which are expected to be contained within the [Iterable]. - * - * @return The [AssertionPlant] for which the assertion was built to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated( - "Switch from api-cc-infix-en_GB to api-infix-en_GB; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.the(ch.tutteli.atrium.api.infix.en_GB.values(values.expected, *values.otherExpected))", - "ch.tutteli.atrium.api.infix.en_GB.the", - "ch.tutteli.atrium.api.infix.en_GB.values" - ) -) -infix fun > IterableContains.Builder.the(values: Values): AssertionPlant - = addAssertion(AssertImpl.iterable.contains.valuesInAnyOrderOnly(this, values.toList())) - -/** - * Finishes the specification of the sophisticated `contains` assertion where the [Iterable] must contain only one - * entry which holds all assertions created by the given [assertionCreatorOrNull] or has to be `null` in case - * [assertionCreatorOrNull] is defined as `null`. - * - * Delegates to `the Entries(assertionCreatorOrNull)`. - * - * @param assertionCreatorOrNull The identification lambda. - * - * @return The [AssertionPlant] for which the assertion was built to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.entry(asSubExpect(assertionCreatorOrNull))", - "ch.tutteli.atrium.api.infix.en_GB.entry", - "ch.tutteli.atrium.domain.builders.migration.asSubExpect" - ) -) -infix fun > IterableContains.Builder.entry(assertionCreatorOrNull: (Assert.() -> Unit)?): AssertionPlant - = this the Entries(assertionCreatorOrNull) - -/** - * Finishes the specification of the sophisticated `contains` assertion where an entry needs to be contained in the - * [Iterable] which holds all assertions [entries].[assertionCreatorOrNull][Entries.assertionCreatorOrNull] - * might create or it needs to be `null` in case - * [entries].[assertionCreatorOrNull][Entries.assertionCreatorOrNull] is defined as `null` -- likewise an - * entry for each [entries].[otherAssertionCreatorsOrNulls][Entries.otherAssertionCreatorsOrNulls] needs to - * be contained in the [Iterable] where it does not matter in which order the entries appear but only as many entries - * should be returned by the [Iterable] as assertion creators are defined. - * - * Notice, that a first-wins strategy applies which means your assertion creator lambdas -- which kind of serve as - * identification lambdas -- should be ordered in such a way that the most specific identification lambda appears - * first, not that a less specific lambda wins. For instance, given a `setOf(1, 2)` you should not search for - * `Entries({ isGreaterThan(0) }, { toBe(1) })` but for `Entries({ toBe(1) }, { isGreaterThan(0) })` - * otherwise `isGreaterThan(0)` matches `1` before `toBe(1)` would match it. As a consequence `toBe(1)` could - * only match the entry which is left -- in this case `2` -- and of course this would fail. - * - * @param entries The parameter object containing the identification lambdas. - * - * @return The [AssertionPlant] for which the assertion was built to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Suppress("DEPRECATION") -@Deprecated( - "Switch from api-cc-infix-en_GB to api-infix-en_GB; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.the(entries.mapArguments.to { asSubExpect(it) }.let { (first, rest) -> ch.tutteli.atrium.api.infix.en_GB.entries(first, *rest) })", - "ch.tutteli.atrium.api.infix.en_GB.the", - "ch.tutteli.atrium.domain.builders.utils.mapArguments", - "ch.tutteli.atrium.domain.builders.migration.asSubExpect" - ) -) -infix fun > IterableContains.Builder.the(entries: Entries): AssertionPlant - = addAssertion(AssertImpl.iterable.contains.entriesInAnyOrderOnlyWithAssert(this, entries.toList())) - -/** - * Helper method to simplify adding assertions to the plant which itself is stored in - * [CharSequenceContains.CheckerOption.containsBuilder]. - * - * @return The plant to support a fluent API. - */ -internal fun , S : IterableContains.SearchBehaviour> IterableContains.Builder.addAssertion( - assertion: Assertion -): AssertionPlant = addAssertionForAssert(assertion) diff --git a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/iterableContainsInOrderOnlyCreators.kt b/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/iterableContainsInOrderOnlyCreators.kt deleted file mode 100644 index 53fc5448a..000000000 --- a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/iterableContainsInOrderOnlyCreators.kt +++ /dev/null @@ -1,105 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") -@file:JvmMultifileClass -@file:JvmName("IterableContainsInOrderOnlyCreatorsKt") -package ch.tutteli.atrium.api.cc.infix.en_GB - -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.domain.builders.AssertImpl -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InOrderOnlySearchBehaviour -import kotlin.jvm.JvmMultifileClass -import kotlin.jvm.JvmName - -/** - * Finishes the specification of the sophisticated `contains` assertion where the [Iterable] needs to contain only the - * [expected] value. - * - * Delegates to `the Values(expected)`. - * - * @param expected The nullable value which is expected to be contained within the [Iterable]. - * - * @return The [AssertionPlant] for which the assertion was built to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated( - "Switch from api-cc-infix-en_GB to api-infix-en_GB; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.value(expected)", - "ch.tutteli.atrium.api.infix.en_GB.value" - ) -) -infix fun > IterableContains.Builder.value(expected: E): AssertionPlant - = this the Values(expected) - -/** - * Finishes the specification of the sophisticated `contains` assertion where the [Iterable] needs to contain only the - * expected [values] in the specified order. - * - * @param values The nullable values which are expected to be contained within the [Iterable]. - * - * @return The [AssertionPlant] for which the assertion was built to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated( - "Switch from api-cc-infix-en_GB to api-infix-en_GB; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.the(ch.tutteli.atrium.api.infix.en_GB.values(values.expected, *values.otherExpected))", - "ch.tutteli.atrium.api.infix.en_GB.the", - "ch.tutteli.atrium.api.infix.en_GB.values" - ) -) -infix fun > IterableContains.Builder.the(values: Values): AssertionPlant - = addAssertion(AssertImpl.iterable.contains.valuesInOrderOnly(this, values.toList())) - -/** - * Finishes the specification of the sophisticated `contains` assertion where the [Iterable] needs to contain only a - * single entry which holds all assertions created by the given [assertionCreatorOrNull] or needs to be `null` - * in case [assertionCreatorOrNull] is defined as `null`. - * - * Delegates to `the Entries(assertionCreatorOrNull)`. - * - * @param assertionCreatorOrNull The identification lambda. - * - * @return The [AssertionPlant] for which the assertion was built to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.entry(asSubExpect(assertionCreatorOrNull))", - "ch.tutteli.atrium.domain.builders.migration.asSubExpect", - "ch.tutteli.atrium.api.infix.en_GB.entry" - ) -) -infix fun > IterableContains.Builder.entry(assertionCreatorOrNull: (Assert.() -> Unit)?): AssertionPlant - = this the Entries(assertionCreatorOrNull) - -/** - * Finishes the specification of the sophisticated `contains` assertion where the [Iterable] needs to contain only an - * entry which holds all assertions [entries].[assertionCreatorOrNull][Entries.assertionCreatorOrNull] - * might create or is `null` in case [entries].[assertionCreatorOrNull][Entries.otherAssertionCreatorsOrNulls] - * is defined as `null` and likewise a further entry for each - * [entries].[otherAssertionCreatorsOrNulls][Entries.otherExpected] - * (if given) whereas the entries have to appear in the specified order. - * - * This function will be renamed on the JVM level to `the` with 1.0.0; - * - * @param entries The parameter object containing the identification lambdas. - * - * @return The [AssertionPlant] for which the assertion was built to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Suppress("DEPRECATION") -@Deprecated( - "Switch from api-cc-infix-en_GB to api-infix-en_GB; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.the(entries.mapArguments.to { asSubExpect(it) }.let { (first, rest) -> ch.tutteli.atrium.api.infix.en_GB.entries(first, *rest) })", - "ch.tutteli.atrium.api.infix.en_GB.the", - "ch.tutteli.atrium.domain.builders.utils.mapArguments", - "ch.tutteli.atrium.domain.builders.migration.asSubExpect" - ) -) -infix fun > IterableContains.Builder.the(entries: Entries): AssertionPlant - = addAssertion(AssertImpl.iterable.contains.entriesInOrderOnlyWithAssert(this, entries.toList())) diff --git a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/iterableContainsInOrderOnlyGroupedCreators.kt b/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/iterableContainsInOrderOnlyGroupedCreators.kt deleted file mode 100644 index 832f6077e..000000000 --- a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/iterableContainsInOrderOnlyGroupedCreators.kt +++ /dev/null @@ -1,79 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") -@file:JvmMultifileClass -@file:JvmName("IterableContainsInOrderOnlyGroupedCreatorsKt") - -package ch.tutteli.atrium.api.cc.infix.en_GB - -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.domain.builders.AssertImpl -import ch.tutteli.atrium.domain.builders.utils.Group -import ch.tutteli.atrium.domain.builders.utils.groupsToList -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InOrderOnlyGroupedWithinSearchBehaviour -import kotlin.jvm.JvmMultifileClass -import kotlin.jvm.JvmName - -/** - * Finishes the specification of the sophisticated `contains` assertion where the expected [Order.firstGroup] as well as - * the [Order.secondGroup] and optionally [Order.otherExpectedGroups] of values need to be - * contained in [Iterable] in the specified order whereas the values within the groups can occur in any order. - * - * @param order A parameter object containing the different groups which have to appear in order in the [Iterable]. - * - * @return The [AssertionPlant] for which the assertion was built to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated( - "Switch from api-cc-infix-en_GB to api-infix-en_GB; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.inAny(ch.tutteli.atrium.api.infix.en_GB.order(order.firstGroup, order.secondGroup, *order.otherExpectedGroups))", - "ch.tutteli.atrium.api.fluent.en_GB.inAny", - "ch.tutteli.atrium.api.fluent.en_GB.order" - ) -) -infix fun > IterableContains.Builder.inAny( - order: Order> -): AssertionPlant = addAssertion( - AssertImpl.iterable.contains.valuesInOrderOnlyGrouped( - this, - groupsToList(order.firstGroup, order.secondGroup, order.otherExpectedGroups) - ) -) - -/** - * Finishes the specification of the sophisticated `contains` assertion where the expected [Order.firstGroup] as well as - * the [Order.secondGroup] and optionally [Order.otherExpectedGroups] of identification lambdas, identifying an entry, - * need to be contained in [Iterable] in the specified order whereas the identification lambdas within the groups - * can occur in any order. - * - * An identification lambda can also be defined as `null` in which case it matches an entry which is `null` as well. - * - * @param order A parameter object containing the different groups which have to appear in order in the [Iterable]. - * - * @return The [AssertionPlant] for which the assertion was built to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated( - "Switch from api-cc-infix-en_GB to api-infix-en_GB; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.inAny(ch.tutteli.atrium.api.infix.en_GB.order(" + - "asExpectGroup(order.firstGroup)," + - "asExpectGroup(order.secondGroup), " + - "*order.otherExpectedGroups.map { asExpectGroup(it) }.toTypedArray())" + - ")", - "ch.tutteli.atrium.api.fluent.en_GB.inAny", - "ch.tutteli.atrium.api.fluent.en_GB.order", - "ch.tutteli.atrium.domain.builders.migration.asExpectGroup" - ) -) -@JvmName("inAnyOrderEntries") -infix fun > IterableContains.Builder.inAny( - order: Order<(Assert.() -> Unit)?, Group<(Assert.() -> Unit)?>> -): AssertionPlant = addAssertion( - AssertImpl.iterable.contains.entriesInOrderOnlyGroupedWithAssert( - this, - groupsToList(order.firstGroup, order.secondGroup, order.otherExpectedGroups) - ) -) diff --git a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/iterableContainsSearchBehaviours.kt b/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/iterableContainsSearchBehaviours.kt deleted file mode 100644 index c807fb9b6..000000000 --- a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/iterableContainsSearchBehaviours.kt +++ /dev/null @@ -1,117 +0,0 @@ -@file:Suppress("DEPRECATION" /* will be removed with 1.0.0 */) -package ch.tutteli.atrium.api.cc.infix.en_GB - -import ch.tutteli.atrium.api.cc.infix.en_GB.keywords.entries -import ch.tutteli.atrium.api.cc.infix.en_GB.keywords.group -import ch.tutteli.atrium.api.cc.infix.en_GB.keywords.only -import ch.tutteli.atrium.api.cc.infix.en_GB.keywords.order -import ch.tutteli.atrium.domain.builders.AssertImpl -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.* - -/** - * Defines that the search behaviour "find entries `in any order` in the [Iterable]" shall be applied to this - * sophisticated `contains` in [Iterable] assertion. - * - * @param order Has to be `order`. - * - * @return The newly created builder. - */ -@Deprecated( - "Switch from api-cc-infix-en_GB to api-infix-en_GB; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.inAny(ch.tutteli.atrium.api.infix.en_GB.order)", - "ch.tutteli.atrium.api.infix.en_GB.inAny", - "ch.tutteli.atrium.api.infix.en_GB.order" - ) -) -infix fun > IterableContains.Builder.inAny(@Suppress("UNUSED_PARAMETER") order: order) - = AssertImpl.iterable.contains.searchBehaviours.inAnyOrder(this) - -/** - * Defines that the constraint "`only` the specified entries exist in the [Iterable]" shall be applied to this - * sophisticated `contains` [Iterable] assertion. - * - * @return The newly created builder. - */ -@Deprecated( - "Switch from api-cc-infix-en_GB to api-infix-en_GB; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.but(ch.tutteli.atrium.api.infix.en_GB.only)", - "ch.tutteli.atrium.api.infix.en_GB.but", - "ch.tutteli.atrium.api.infix.en_GB.only" - ) -) -infix fun > IterableContains.Builder.but(@Suppress("UNUSED_PARAMETER") only: only) - = AssertImpl.iterable.contains.searchBehaviours.inAnyOrderOnly(this) - - -/** - * Defines that the search behaviour "find entries `in order` in the [Iterable]" shall be applied to this - * sophisticated `contains` in [Iterable] assertion. - * - * @param order Has to be `order`. - * - * @return The newly created builder. - */ -@Deprecated( - "Switch from api-cc-infix-en_GB to api-infix-en_GB; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.inGiven(ch.tutteli.atrium.api.infix.en_GB.order)", - "ch.tutteli.atrium.api.infix.en_GB.inGiven", - "ch.tutteli.atrium.api.infix.en_GB.order" - ) -) -infix fun > IterableContains.Builder.inGiven(@Suppress("UNUSED_PARAMETER") order: order) - = AssertImpl.iterable.contains.searchBehaviours.inOrder(this) - -/** - * Defines that the constraint "`only` the specified entries exist in the [Iterable]" shall be applied to this - * sophisticated `contains in order` [Iterable] assertion. - * - * @return The newly created builder. - */ -@Deprecated( - "Switch from api-cc-infix-en_GB to api-infix-en_GB; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.and(ch.tutteli.atrium.api.infix.en_GB.only)", - "ch.tutteli.atrium.api.infix.en_GB.and", - "ch.tutteli.atrium.api.infix.en_GB.only" - ) -) -infix fun > IterableContains.Builder.and(@Suppress("UNUSED_PARAMETER") only: only) - = AssertImpl.iterable.contains.searchBehaviours.inOrderOnly(this) - -/** - * Defines that the [Iterable] contains groups of entries `in order only` where the entries within the group can be in - * any order. - * - * @return The newly created builder. - */ -@Deprecated( - "Switch from api-cc-infix-en_GB to api-infix-en_GB; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.grouped(ch.tutteli.atrium.api.infix.en_GB.entries)", - "ch.tutteli.atrium.api.infix.en_GB.grouped", - "ch.tutteli.atrium.api.infix.en_GB.entries" - ) -) -infix fun > IterableContains.Builder.grouped(@Suppress("UNUSED_PARAMETER") entries: entries) - = AssertImpl.iterable.contains.searchBehaviours.inOrderOnlyGrouped(this) - -/** - * Defines that the [Iterable] contains groups of entries `in order only` where the entries within the group can be in - * any order. - * - * @return The newly created builder. - */ -@Deprecated( - "Switch from api-cc-infix-en_GB to api-infix-en_GB; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.within(ch.tutteli.atrium.api.infix.en_GB.group)", - "ch.tutteli.atrium.api.infix.en_GB.within", - "ch.tutteli.atrium.api.infix.en_GB.group" - ) -) -infix fun > IterableContains.Builder.within(@Suppress("UNUSED_PARAMETER") group: group) - = AssertImpl.iterable.contains.searchBehaviours.inOrderOnlyGroupedWithin(this) diff --git a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/keywords/keywords.kt b/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/keywords/keywords.kt deleted file mode 100644 index ad28e7b1d..000000000 --- a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/keywords/keywords.kt +++ /dev/null @@ -1,59 +0,0 @@ -@file:Suppress("ClassName") -package ch.tutteli.atrium.api.cc.infix.en_GB.keywords - -import ch.tutteli.atrium.api.cc.infix.en_GB.and -import ch.tutteli.atrium.api.cc.infix.en_GB.ignoring -import ch.tutteli.atrium.api.cc.infix.en_GB.inAny -import ch.tutteli.atrium.api.cc.infix.en_GB.to - -/** - * Marker interface for keywords. - * - * For instance, can be used to add a deprecated overload in case an assertion function accepts Any as argument type - * (see toBe). - */ -interface Keyword -internal const val ERR_KEYWORD_GIVEN_COLLECTION_ASSUMED = "This call will most probably fail at runtime because the given subject is not a collection as you might have assumed. If you really want to compare the subject against the keyword, then cast the keyword to Any" - -/** - * Represents a helper construct which allows to express emptiness. - * It can be used for a parameter less function so that it has one parameter and thus can be used as infix function. - */ -object Empty: Keyword - -/** - * Represents a helper construct which allows to express blankness. - * It can be used for a parameter less function so that it has one parameter and thus can be used as infix function. - */ -object Blank: Keyword - -/** - * Represents the pseudo keyword `contain` as in [to] `contain`. - */ -object contain: Keyword - -/** - * Represents the pseudo keyword `case` as in [ignoring] `case`. - */ -object case: Keyword - -/** - * Represents the pseudo keyword `entries` as in [grouped] `entries`. - */ -object entries: Keyword - -/** - * Represents the pseudo keyword `group` as in [within] `group`. - */ -object group: Keyword - -/** - * Represents the pseudo keyword `only` as in [and] `only`. - */ -object only: Keyword - -/** - * Represents the pseudo keyword `order` as in [inAny] `order`. - */ -object order: Keyword - diff --git a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/listAssertions.kt b/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/listAssertions.kt deleted file mode 100644 index cd1bc33d7..000000000 --- a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/listAssertions.kt +++ /dev/null @@ -1,91 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") -package ch.tutteli.atrium.api.cc.infix.en_GB - -import ch.tutteli.atrium.api.cc.infix.en_GB.creating.list.get.builders.ListGetNullableOption -import ch.tutteli.atrium.api.cc.infix.en_GB.creating.list.get.builders.ListGetOption -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.domain.builders.AssertImpl - -/** - * Makes the assertion that the given [index] is within the bounds of [Assert.subject][SubjectProvider.subject], - * creates a feature assertion plant for the corresponding element and returns the newly created plant. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the given [index] is out of bound. - */ -@Suppress("DEPRECATION") -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().get(index).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.infix.en_GB.get" - ) -) -infix fun > Assert.get(index: Int) - = AssertImpl.list.get(this, index) - -/** - * Prepares the assertion about the return value of calling [get][List.get] with the given [index]. - * - * @return A fluent builder to finish the assertion. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().get(ch.tutteli.atrium.api.infix.en_GB.index(index.index) { \n/* needs further adjustments, move the lambda passed to assertIt to here and remove assertIt */ \n }).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.infix.en_GB.get", - "ch.tutteli.atrium.api.infix.en_GB.index" - ) -) -infix fun > Assert.get(index: Index): ListGetOption - = ListGetOption.create(this, index.index) - - -/** - * Makes the assertion that the given [index] is within the bounds of [Assert.subject][SubjectProvider.subject], - * creates a feature assertion plant for the corresponding nullable element and returns the newly created plant. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the given [index] is out of bound. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().get(index).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.infix.en_GB.get" - ) -) -@Suppress("DEPRECATION") -infix fun > Assert.get(index: Int) - = AssertImpl.list.getNullable(this, index) - -/** - * Prepares the assertion about the nullable return value of calling [get][List.get] with the given [index]. - * - * Notice, that the corresponding element of the given [index] can be `null` even if the index is within bounds - * as the [List] has a nullable element type. - * - * @return A fluent builder to finish the assertion. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().get(ch.tutteli.atrium.api.infix.en_GB.index(index.index) { \n/* needs further adjustments, move the lambda passed to assertIt to here and remove assertIt */ \n }).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.infix.en_GB.get", - "ch.tutteli.atrium.api.infix.en_GB.index" - ) -) -infix fun > Assert.get(index: Index): ListGetNullableOption - = ListGetNullableOption.create(this, index.index) - diff --git a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/mapAssertions.kt b/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/mapAssertions.kt deleted file mode 100644 index 22c3898e8..000000000 --- a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/mapAssertions.kt +++ /dev/null @@ -1,389 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") - -package ch.tutteli.atrium.api.cc.infix.en_GB - -import ch.tutteli.atrium.api.cc.infix.en_GB.creating.map.get.builders.MapGetNullableOption -import ch.tutteli.atrium.api.cc.infix.en_GB.creating.map.get.builders.MapGetOption -import ch.tutteli.atrium.api.cc.infix.en_GB.keywords.Empty -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.domain.builders.AssertImpl -import ch.tutteli.atrium.domain.builders.ExpectImpl -import kotlin.js.JsName - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] contains a key as defined by - * [keyValuePair]'s [Pair.first] with a corresponding value as defined by [keyValuePair]'s [Pair.second]. - * - * Delegates to `contains Pairs(keyValuePair)`. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().contains(keyValuePair).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.infix.en_GB.contains" - ) -) -infix fun > Assert.contains(keyValuePair: Pair) - = this contains Pairs(keyValuePair) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] contains for each entry in [keyValuePairs], - * a key as defined by entry's [Pair.first] with a corresponding value as defined by entry's [Pair.second]. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Suppress("DEPRECATION") -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().contains(pairs(keyValuePairs.expected, *keyValuePairs.otherExpected)).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.infix.en_GB.contains", - "ch.tutteli.atrium.api.infix.en_GB.pairs" - ) -) -infix fun > Assert.contains(keyValuePairs: Pairs) - = addAssertion(AssertImpl.map.contains(this, keyValuePairs.toList())) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] contains a key as defined by [keyValue]'s [KeyValue.key] - * with a corresponding value which either holds all assertions [keyValue]'s - * [KeyValue.valueAssertionCreatorOrNull] might create or needs to be `null` in case - * [KeyValue.valueAssertionCreatorOrNull] is defined as `null`. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().contains(ch.tutteli.atrium.api.infix.en_GB.keyValue(keyValue.key, asSubExpect(keyValue.valueAssertionCreatorOrNull))).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.domain.builders.migration.asSubExpect", - "ch.tutteli.atrium.api.infix.en_GB.contains", - "ch.tutteli.atrium.api.infix.en_GB.keyValue" - ) -) -infix fun > Assert.contains(keyValue: KeyValue) - = contains(All(keyValue)) - -/** - * Makes the assertion that for each of the [KeyValue] in [keyValues], the [Assert.subject][SubjectProvider.subject] contains - * a key as defined by keyValue's [KeyValue.key] with a corresponding value which either holds all assertions - * keyValue's [KeyValue.valueAssertionCreatorOrNull] might create or needs to be `null` in case - * [KeyValue.valueAssertionCreatorOrNull] is defined as `null`. - * - * Notice, that it does not search for unique matches. Meaning, if the map is `mapOf('a' to 1)` and one of the - * [keyValues] is defined as `Key('a') { isGreaterThan(0) }` and another one is defined as `Key('a') { isLessThan(2) }` - * then both match, even though they match the same entry. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().contains(keyValues.mapArguments.to> { keyValue -> ch.tutteli.atrium.api.infix.en_GB.keyValue(keyValue.key, asSubExpect(keyValue.valueAssertionCreatorOrNull))}.let { (first, rest) -> ch.tutteli.atrium.api.infix.en_GB.all(first, *rest) }).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.domain.builders.migration.asSubExpect", - "ch.tutteli.atrium.api.infix.en_GB.contains", - "ch.tutteli.atrium.api.infix.en_GB.keyValue", - "ch.tutteli.atrium.domain.builders.utils.mapArguments" - ) -) -@Suppress("DEPRECATION") -infix fun > Assert.contains(keyValues: All>) - = addAssertion(AssertImpl.map.containsKeyWithValueAssertions(this, keyValues.toList().map { it.toPair() })) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] contains the given [key]. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().containsKey(key).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.infix.en_GB.containsKey" - ) -) -infix fun Assert>.containsKey(key: K) - = addAssertion(AssertImpl.map.containsKey(this, key)) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] does not contain the given [key]. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().containsNotKey(key).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.infix.en_GB.containsNotKey" - ) -) -infix fun Assert>.containsNotKey(key: K) - = addAssertion(AssertImpl.map.containsNotKey(this, key)) - - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] contains the given [key], creates a feature - * assertion plant for the corresponding value and returns the newly created plant. - * - * @return The newly created plant for the feature - * @throws AssertionError Might throw an [AssertionError] if the given [key] does not exist. - */ -@Suppress("DEPRECATION") -@JsName("getExisting") -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().getExisting(key).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.infix.en_GB.getExisting" - ) -) -infix fun > Assert.getExisting(key: K): Assert - = AssertImpl.map.getExisting(this, key) - -/** - * Prepares the assertion about the return value of calling [get][Map.get] with the given [key]. - * - * @return A fluent builder to finish the assertion. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().getExisting(ch.tutteli.atrium.api.infix.en_GB.key(key.key) { \n/* needs further adjustments, move the lambda passed to assertIt to here and remove assertIt */ \n }).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.infix.en_GB.getExisting", - "ch.tutteli.atrium.api.infix.en_GB.key" - ) -) -infix fun > Assert.getExisting(key: Key): MapGetOption - = MapGetOption.create(this, key.key) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] contains the given [key], creates a feature - * assertion plant for the corresponding nullable value and returns the newly created plant. - * - * @return The newly created plant for the feature - * @throws AssertionError Might throw an [AssertionError] if the given [key] does not exist. - */ -@Suppress("DEPRECATION") -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().getExisting(key).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.infix.en_GB.getExisting" - ) -) -infix fun > Assert.getExisting(key: K) - = AssertImpl.map.getExistingNullable(this, key) - -/** - * Prepares the assertion about the nullable return value of calling [get][Map.get] with the given [key]. - * - * Notice, that the corresponding value of the given [key] can be `null` even if the key exists as the [Map] has a - * nullable value type. - * - * @return A fluent builder to finish the assertion. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().getExisting(ch.tutteli.atrium.api.infix.en_GB.key(key.key) { \n/* needs further adjustments, move the lambda passed to assertIt to here and remove assertIt */ \n }).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.infix.en_GB.getExisting", - "ch.tutteli.atrium.api.infix.en_GB.key" - ) -) -infix fun > Assert.getExisting(key: Key): MapGetNullableOption - = MapGetNullableOption.create(this, key.key) - - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject]'s [Map.size] is [size]. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Suppress("DEPRECATION") -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().apply { feature(Map<*, *>::size).toBe(size) }.asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.infix.en_GB.feature" - ) -) -infix fun > Assert.hasSize(size: Int) - = addAssertion(AssertImpl.map.hasSize(this, size)) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] is an empty [Map]. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().toBe(empty).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.infix.en_GB.toBe", - "ch.tutteli.atrium.api.infix.en_GB.empty" - ) -) -infix fun > Assert.toBe(@Suppress("UNUSED_PARAMETER") Empty: Empty) - = addAssertion(AssertImpl.map.isEmpty(this)) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] is not an empty [Map]. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().notToBe(empty).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.infix.en_GB.notToBe", - "ch.tutteli.atrium.api.infix.en_GB.empty" - ) -) -infix fun > Assert.notToBe(@Suppress("UNUSED_PARAMETER") Empty: Empty) - = addAssertion(AssertImpl.map.isNotEmpty(this)) - - -/** - * Creates an [AssertionPlant] for the [Assert.subject][SubjectProvider.subject]'s property [keys][Map.keys] so that further - * fluent calls are assertions about it. - * - * Wrap it into Kotlin's [apply] if you want to make subsequent assertions on the current subject or use the overload - * which expects an assertionCreatorOrNull lambda where sub assertions are evaluated together (form an assertion group block). - * - * @return The newly created [AssertionPlant]. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().keys", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.api.infix.en_GB.keys" - ) -) -val Assert>.keys get() : Assert> = property(Map::keys) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject]'s property [keys][Map.keys] holds all assertions the given - * [assertionCreator] might create. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if a created [Assertion]s (by calling [assertionCreator]) - * does not hold. - */ -@Suppress("DEPRECATION") -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().apply { keys.asAssert(assertionCreator) }.asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.infix.en_GB.keys" - ) -) -infix fun > Assert.keys(assertionCreator: Assert>.() -> Unit) - = addAssertion(AssertImpl.map.keys(this, assertionCreator)) - -/** - * Creates an [AssertionPlant] for the [Assert.subject][SubjectProvider.subject]'s property [values][Map.values] so that further - * fluent calls are assertions about it. - * - * Wrap it into Kotlin's [apply] if you want to make subsequent assertions on the current subject or use the overload - * which expects an assertionCreatorOrNull lambda where sub assertions are evaluated together (form an assertion group block). - * - * @return The newly created [AssertionPlant]. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().values", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.api.infix.en_GB.values" - ) -) -val Assert>.values get() : Assert> = property(Map::values) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject]'s property [values][Map.values] holds all assertions the given - * [assertionCreator] might create. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if a created [Assertion]s (by calling [assertionCreator]) - * does not hold. - */ -@Suppress("DEPRECATION") -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().apply { values.asAssert(assertionCreator) }.asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.infix.en_GB.values" - ) -) -infix fun > Assert.values(assertionCreator: Assert>.() -> Unit) - = addAssertion(AssertImpl.map.values(this, assertionCreator)) - -/** - * Turns `Assert>` into `Assert>>`. - * - * The transformation as such is not reflected in reporting. - * Use `property(subject::entries)` if you want to show the transformation in reporting. - * - * @return The newly created [AssertionPlant] for the transformed subject. - */ -@Suppress("DEPRECATION") -fun Assert>.asEntries(): Assert>> - = ExpectImpl.changeSubject(this).unreported { it.entries } - -/** - * Turns `Assert>` into `Assert>>` and makes the assertion that the assertions the given - * [assertionCreator] might create hold. - * - * The transformation as such is not reflected in reporting. - * Use `property(subject::entries)` if you want to show the transformation in reporting. - * - * @return The newly created [AssertionPlant] for the transformed subject. - */ -infix fun Assert>.asEntries(assertionCreator: Assert>>.() -> Unit): Assert>> - = asEntries().addAssertionsCreatedBy(assertionCreator) diff --git a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/mapEntryAssertions.kt b/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/mapEntryAssertions.kt deleted file mode 100644 index 74875af7d..000000000 --- a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/mapEntryAssertions.kt +++ /dev/null @@ -1,157 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") -package ch.tutteli.atrium.api.cc.infix.en_GB - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.creating.AssertionPlantNullable -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.domain.builders.AssertImpl - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject]'s [Map.Entry.key] is (equal to) the given [Pair.first] and - * [Map.Entry.value] is [Pair.second]. - * - * Kind of a shortcut for `key.toBe(keyValuePair.first); value.toBe(keyValuePair.second)` but should be evaluated in - * an assertion group block -- which has the effect that the assertion about the value is still evaluated even - * if the assertion about the key fails. Moreover, it might be that reporting differs compared to using the long form. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().isKeyValue(keyValuePair).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.infix.en_GB.isKeyValue" - ) -) -@Suppress("DEPRECATION") -infix fun Assert>.isKeyValue(keyValuePair: Pair): Assert> - = addAssertion(AssertImpl.map.entry.isKeyValue(this, keyValuePair.first, keyValuePair.second)) - -/** - * Creates an [AssertionPlant] for the [Assert.subject][SubjectProvider.subject]'s property [key][Map.Entry.key] so that further - * fluent calls are assertions about it. - * - * Wrap it into Kotlin's [apply] if you want to make subsequent assertions on the current subject or use the overload - * which expects an assertionCreatorOrNull lambda where sub assertions are evaluated together (form an assertion group block). - * - * @return The newly created [AssertionPlant]. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().key", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.api.infix.en_GB.key" - ) -) -val Assert>.key get() : Assert = property(Map.Entry::key) - -/** - * Creates an [AssertionPlant] for the [Assert.subject][SubjectProvider.subject]'s property [key][Map.Entry.key] (which could be `null`) - * so that further fluent calls are assertions about it. - * - * Wrap it into Kotlin's [apply] if you want to make subsequent assertions on the current subject or use the overload - * which expects an assertionCreatorOrNull lambda where sub assertions are evaluated together (form an assertion group block). - * - * @return The newly created [AssertionPlant]. - */ -//TODO deprecate as soon as https://youtrack.jetbrains.com/issue/KT-33398 is fixed -//@Deprecated( -// "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", -// ReplaceWith( -// "this.asExpect().key", -// "ch.tutteli.atrium.domain.builders.migration.asExpect", -// "ch.tutteli.atrium.api.infix.en_GB.key" -// ) -//) -val Assert>.key get() : AssertionPlantNullable = property(Map.Entry::key) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject]'s property [key][Map.Entry.key] holds all assertions the given - * [assertionCreator] might create for it. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if a created [Assertion]s (by calling [assertionCreator]) - * does not hold. - * @throws IllegalArgumentException in case the given [assertionCreator] did not create a single assertion. - */ -@Suppress("DEPRECATION") -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().apply { key.asAssert(assertionCreator) }.asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.infix.en_GB.key" - ) -) -infix fun Assert>.key(assertionCreator: Assert.() -> Unit) - = addAssertion(AssertImpl.map.entry.key(this, assertionCreator)) - - -/** - * Creates an [AssertionPlant] for the [Assert.subject][SubjectProvider.subject]'s property [value][Map.Entry.value] so that further - * fluent calls are assertions about it. - * - * Wrap it into Kotlin's [apply] if you want to make subsequent assertions on the current subject or use the overload - * which expects an assertionCreatorOrNull lambda where sub assertions are evaluated together (form an assertion group block). - * - * @return The newly created [AssertionPlant]. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().value", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.api.infix.en_GB.value" - ) -) -val Assert>.value get() : Assert = property(Map.Entry<*, V>::value) - -/** - * Creates an [AssertionPlant] for the [Assert.subject][SubjectProvider.subject]'s property [value][Map.Entry.value] - * (which could be `null`) so that further fluent calls are assertions about it. - * - * Wrap it into Kotlin's [apply] if you want to make subsequent assertions on the current subject or use the overload - * which expects an assertionCreatorOrNull lambda where sub assertions are evaluated together (form an assertion group block). - * - * @return The newly created [AssertionPlant]. - */ -//TODO deprecate as soon as https://youtrack.jetbrains.com/issue/KT-33398 is fixed -//@Deprecated( -// "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", -// ReplaceWith( -// "this.asExpect().value", -// "ch.tutteli.atrium.domain.builders.migration.asExpect", -// "ch.tutteli.atrium.api.infix.en_GB.value" -// ) -//) -val Assert>.value get() : AssertionPlantNullable = property(Map.Entry<*, V>::value) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject]'s property [value][Map.Entry.value] holds all assertions the given - * [assertionCreator] might create for it. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if a created [Assertion]s (by calling [assertionCreator]) - * does not hold. - * @throws IllegalArgumentException in case the given [assertionCreator] did not create a single assertion. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().apply { value.asAssert(assertionCreator) }.asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.infix.en_GB.value" - ) -) -@Suppress("DEPRECATION") -infix fun Assert>.value(assertionCreator: Assert.() -> Unit) - = addAssertion(AssertImpl.map.entry.value(this, assertionCreator)) diff --git a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/pairAssertions.kt b/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/pairAssertions.kt deleted file mode 100644 index 07f47a8cc..000000000 --- a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/pairAssertions.kt +++ /dev/null @@ -1,134 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") -package ch.tutteli.atrium.api.cc.infix.en_GB - -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.creating.AssertionPlantNullable -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.domain.builders.AssertImpl - -/** - * Creates an [AssertionPlant] for the [Assert.subject][SubjectProvider.subject]'s property [first][Pair.first] so that further - * fluent calls are assertions about it. - * - * Wrap it into Kotlin's [apply] if you want to make subsequent assertions on the current subject or use the overload - * which expects an assertionCreatorOrNull lambda where sub assertions are evaluated together (form an assertion group block). - * - * @return The newly created [AssertionPlant]. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().first", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.api.infix.en_GB.first" - ) -) -val Assert>.first get() : Assert = property(Pair::first) - -/** - * Creates an [AssertionPlant] for the [Assert.subject][SubjectProvider.subject]'s property [first][Pair.first] (which could be `null`) - * so that further fluent calls are assertions about it. - * - * Wrap it into Kotlin's [apply] if you want to make subsequent assertions on the current subject or use the overload - * which expects an assertionCreatorOrNull lambda where sub assertions are evaluated together (form an assertion group block). - * - * @return The newly created [AssertionPlant]. - */ -//TODO deprecate as soon as https://youtrack.jetbrains.com/issue/KT-33398 is fixed -//@Deprecated( -// "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", -// ReplaceWith( -// "this.asExpect().first", -// "ch.tutteli.atrium.domain.builders.migration.asExpect", -// "ch.tutteli.atrium.api.infix.en_GB.first" -// ) -//) -val Assert>.first get() : AssertionPlantNullable = property(Pair::first) - - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject]'s property [first][Pair.first] holds all assertions the given - * [assertionCreator] might create for it. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if a created [Assertion]s (by calling [assertionCreator]) - * does not hold. - * @throws IllegalArgumentException in case the given [assertionCreator] did not create a single assertion. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().apply { first.asAssert(assertionCreator) }.asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.infix.en_GB.first" - ) -) -@Suppress("DEPRECATION") -infix fun Assert>.first(assertionCreator: Assert.() -> Unit) - = addAssertion(AssertImpl.pair.first(this, assertionCreator)) - - -/** - * Creates an [AssertionPlant] for the [Assert.subject][SubjectProvider.subject]'s property [second][Pair.second] so that further - * fluent calls are assertions about it. - * - * Wrap it into Kotlin's [apply] if you want to make subsequent assertions on the current subject or use the overload - * which expects an assertionCreatorOrNull lambda where sub assertions are evaluated together (form an assertion group block). - * - * @return The newly created [AssertionPlant]. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().second", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.api.infix.en_GB.second" - ) -) -val Assert>.second get() : Assert = property(Pair<*, V>::second) - -/** - * Creates an [AssertionPlant] for the [Assert.subject][SubjectProvider.subject]'s property [second][Pair.second] - * (which could be `null`) so that further fluent calls are assertions about it. - * - * Wrap it into Kotlin's [apply] if you want to make subsequent assertions on the current subject or use the overload - * which expects an assertionCreatorOrNull lambda where sub assertions are evaluated together (form an assertion group block). - * - * @return The newly created [AssertionPlant]. - */ -//TODO deprecate as soon as https://youtrack.jetbrains.com/issue/KT-33398 is fixed -//@Deprecated( -// "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", -// ReplaceWith( -// "this.asExpect().second", -// "ch.tutteli.atrium.domain.builders.migration.asExpect", -// "ch.tutteli.atrium.api.infix.en_GB.second" -// ) -//) -val Assert>.second get() : AssertionPlantNullable = property(Pair<*, V>::second) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject]'s property [second][Pair.second] holds all assertions the given - * [assertionCreator] might create for it. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if a created [Assertion]s (by calling [assertionCreator]) - * does not hold. - * @throws IllegalArgumentException in case the given [assertionCreator] did not create a single assertion. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().apply { second.asAssert(assertionCreator) }.asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.infix.en_GB.second" - ) -) -@Suppress("DEPRECATION") -infix fun Assert>.second(assertionCreator: Assert.() -> Unit) - = addAssertion(AssertImpl.pair.second(this, assertionCreator)) diff --git a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/parameterObjects.kt b/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/parameterObjects.kt deleted file mode 100644 index 107cf387e..000000000 --- a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/parameterObjects.kt +++ /dev/null @@ -1,166 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") -@file:JvmMultifileClass -@file:JvmName("ParameterObjectsKt") -package ch.tutteli.atrium.api.cc.infix.en_GB - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.domain.builders.utils.* -import ch.tutteli.kbox.glue -import kotlin.jvm.JvmMultifileClass -import kotlin.jvm.JvmName - - -/** - * Parameter object to express `T, vararg T` in the infix-api. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith("ch.tutteli.atrium.api.infix.en_GB.all(expected, *otherExpected)") -) -class All(override val expected: T, override vararg val otherExpected: T) : VarArgHelper - - -/** - * Parameter object to express a [Group] with a single identification lambda. - * - * @param assertionCreatorOrNull The identification lambda identifying the entry where an entry is considered - * to be identified if it holds all [Assertion]s the lambda might create. - * In case it is defined as `null`, then an entry is identified if it is `null` as well. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith("ch.tutteli.atrium.api.infix.en_GB.entry(assertionCreatorOrNull)") -) -class Entry( - val assertionCreatorOrNull: (Assert.() -> Unit)? -): GroupWithoutNullableEntries<(Assert.() -> Unit)?>, GroupWithNullableEntries<(Assert.() -> Unit)?> { - override fun toList(): List<(Assert.() -> Unit)?> = listOf(assertionCreatorOrNull) -} - -/** - * Parameter object to express a [Group] of identification lambdas. - * - * It is also used to express `(Assert.() -> Unit)?, vararg (Assert.() -> Unit)?` at other places the infix-api. - * - * In case `null` is used for an identification lambda then it is expected that the corresponding entry - * is `null` as well. - * - * @param assertionCreatorOrNull The identification lambda identifying the entry where an entry is considered - * to be identified if it holds all [Assertion]s the lambda might create. - * In case it is defined as `null`, then an entry is identified if it is `null` as well. - * @param otherAssertionCreatorsOrNulls A variable amount of additional identification lambdas or `null`s. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith("ch.tutteli.atrium.api.infix.en_GB.entries(assertionCreatorOrNull, *otherAssertionCreatorsOrNulls)") -) -class Entries( - val assertionCreatorOrNull: (Assert.() -> Unit)?, - vararg val otherAssertionCreatorsOrNulls: (Assert.() -> Unit)? -) : GroupWithoutNullableEntries<(Assert.() -> Unit)?>, GroupWithNullableEntries<(Assert.() -> Unit)?>, VarArgHelper<(Assert.() -> Unit)?> { - override val expected get() = assertionCreatorOrNull - override val otherExpected get() = otherAssertionCreatorsOrNulls - - override fun toList(): List<(Assert.() -> Unit)?> = assertionCreatorOrNull glue otherAssertionCreatorsOrNulls -} - -/** - * Wrapper for a single index -- can be used as distinguishable type for an overload where Int is already in use. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith("ch.tutteli.atrium.api.infix.en_GB.index(index)") -) -data class Index(val index: Int) - -/** - * Wrapper for a single key -- can be used as distinguishable type for an overload where [K] is already in use. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith("ch.tutteli.atrium.api.infix.en_GB.key(key)") -) -data class Key(val key: K) - -/** - * Parameter object to express a key/value [Pair] whose value type is a lambda with an - * [Assert][AssertionPlant] receiver, which means one can either pass a lambda or `null`. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith("ch.tutteli.atrium.api.infix.en_GB.keyValue(key, valueAssertionCreatorOrNull)") -) -data class KeyValue(val key: K, val valueAssertionCreatorOrNull: (Assert.() -> Unit)?) { - fun toPair(): Pair.() -> Unit)?> = key to valueAssertionCreatorOrNull - override fun toString(): String - = "KeyValue(key=$key, value=${if (valueAssertionCreatorOrNull == null) "null" else "lambda"})" -} - - -/** - * Parameter object to express `Group, Group, vararg Group` in the infix-api. - * - * Notice, most probably the type parameter G will be removed in the future, will be fixed to [Group]. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith("ch.tutteli.atrium.api.infix.en_GB.order(firstGroup, secondGroup, *otherExpectedGroups)") -) -class Order>( - val firstGroup: G, - val secondGroup: G, - vararg val otherExpectedGroups: G -) - -/** - * Parameter object to express `Pair, vararg Pair` in the infix-api. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith("ch.tutteli.atrium.api.infix.en_GB.pairs(expected, *otherExpected)") -) -class Pairs( - override val expected: Pair, - override vararg val otherExpected: Pair -) : VarArgHelper> - -/** - * Parameter object to express `String, vararg String` in the infix-api. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith("ch.tutteli.atrium.api.infix.en_GB.regexPatterns(pattern, *otherPatterns)") -) -class RegexPatterns(pattern: String, vararg otherPatterns: String) : VarArgHelper { - override val expected = pattern - override val otherExpected = otherPatterns -} - - -/** - * Represents a [Group] with a single value. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith("ch.tutteli.atrium.api.infix.en_GB.value(expected)") -) -data class Value(val expected: T) : GroupWithNullableEntries, GroupWithoutNullableEntries { - override fun toList() = listOf(expected) -} - -/** - * Represents a [Group] of multiple values. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith("ch.tutteli.atrium.api.infix.en_GB.values(expected, *otherExpected)") -) -class Values( - override val expected: T, - override vararg val otherExpected: T -) : GroupWithoutNullableEntries, GroupWithNullableEntries, VarArgHelper { - override fun toList() = listOf(expected, *otherExpected) -} diff --git a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/sequenceAssertions.kt b/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/sequenceAssertions.kt deleted file mode 100644 index fe928866c..000000000 --- a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/sequenceAssertions.kt +++ /dev/null @@ -1,27 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") -package ch.tutteli.atrium.api.cc.infix.en_GB - -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.domain.builders.ExpectImpl - -/** - * Turns `Assert>` into `Assert>`. - * - * The transformation as such is not reflected in reporting. - * Use `returnValueOf(Sequence::asIterable)` if you want to show the transformation in reporting. - * - * @return The newly created [AssertionPlant] for the transformed subject. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().asIterable()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.api.infix.en_GB.asIterable" - ) -) -@Suppress("DEPRECATION") -fun Assert>.asIterable(): Assert> - = ExpectImpl.changeSubject(this).unreported { it.asIterable() } diff --git a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/throwableAssertions.kt b/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/throwableAssertions.kt deleted file mode 100644 index f12eab5e9..000000000 --- a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/throwableAssertions.kt +++ /dev/null @@ -1,134 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") -package ch.tutteli.atrium.api.cc.infix.en_GB - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.AssertionPlantNullable -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.domain.builders.AssertImpl -import ch.tutteli.atrium.domain.creating.throwable.thrown.ThrowableThrown - -/** - * Makes the assertion that the thrown [Throwable] is of type [TExpected] and holds all assertions the - * [assertionCreator] might create in addition. - * - * @return Notice, that this assertion function cannot provide a fluent API because it depends on whether the first - * assertion (a [Throwable] was thrown) holds or not. - * Define subsequent assertions via the [assertionCreator] lambda. - * - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.toThrow().asAssert(assertionCreator)", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.infix.en_GB.toThrow" - ) -) -inline infix fun ThrowableThrown.Builder.toThrow(noinline assertionCreator: Assert.() -> Unit) { - @Suppress("DEPRECATION") - AssertImpl.throwable.thrown.toBe(this, TExpected::class, assertionCreator) -} - -/** - * Makes the assertion that no [Throwable] is thrown at all. - * - * @return Notice, that this assertion function cannot provide a fluent API because we assume nothing happens, - * so there is nothing we could make assertions on in addition. - * - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.notToThrow()", - "ch.tutteli.atrium.api.infix.en_GB.notToThrow" - ) -) -fun ThrowableThrown.Builder.notToThrow(){ - @Suppress("DEPRECATION") - AssertImpl.throwable.thrown.nothingThrown(this) -} - -/** - * Creates an [AssertionPlantNullable] for the [message][Throwable.message] of the plant's - * [subject][SubjectProvider.subject] (which is a [Throwable]) and makes the assertion that the message ought - * [notToBeNull] and uses [assertionCreator] which might create further [Assertion]s which are lazily evaluated at the end. - * - * @return Notice, that this assertion function cannot provide a fluent API because it depends on whether the first - * assertion [message][Throwable.message] is not null) holds or not. - * Define subsequent assertions via the [assertionCreator] lambda. - * - * @throws AssertionError Might throw an [AssertionError] in case [message][Throwable.message] is `null` - * or if an additionally created [Assertion]s (by calling [assertionCreator]) does not hold. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().message.asAssert(assertionCreator)", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.api.infix.en_GB.message" - ) -) -infix fun Assert.message(assertionCreator: Assert.() -> Unit) { - property(Throwable::message).notToBeNull(assertionCreator) -} - -/** - * Creates the assertion that the [Throwable]'s [message][Throwable.message] is not null (see [message]) and contains - * the [toString] representation of the given [expected] using a non disjoint search. - * - * It is a shortcut for `message { this to contain atLeast 1 value expected }` - * - * Notice that a runtime check applies which assures that only [CharSequence], [Number] and [Char] are passed (this - * function expects `Any` for your convenience. - * - * @return Notice, that this assertion function cannot provide a fluent API because it depends on whether the first - * assertion [message][Throwable.message] is not null) holds or not. - * - * @throws AssertionError Might throw an [AssertionError] in case [message][Throwable.message] is `null` - * or does not contain the [expected] object. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().messageContains(expected).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.infix.en_GB.messageContains" - ) -) -infix fun Assert.messageContains(expected: Any) { - this messageContains Values(expected) -} - -/** - * Creates the assertion that the [Throwable]'s [message][Throwable.message] is not null (see [message]) and contains - * the [toString] representation of the given [values] using a non disjoint search. - * - * It is a shortcut for `message { this to contain atLeast 1 the values }` - * - * Notice that a runtime check applies which assures that only [CharSequence], [Number] and [Char] are passed as - * [values] (this function expects `Any` for your convenience, so that you can mix [String] and [Int] for instance). - * - * @return Notice, that this assertion function cannot provide a fluent API because it depends on whether the first - * assertion [message][Throwable.message] is not null) holds or not. - * - * @throws AssertionError Might throw an [AssertionError] in case [message][Throwable.message] is `null` - * or does not contain all the [values]. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().messageContains(ch.tutteli.atrium.api.infix.en_GB.values(values.expected, *values.otherExpected)).asAssert()", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.infix.en_GB.messageContains", - "ch.tutteli.atrium.api.infix.en_GB.values" - ) -) -infix fun Assert.messageContains(values: Values) { - message { contains(values) } -} diff --git a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/typeTransformationAssertions.kt b/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/typeTransformationAssertions.kt deleted file mode 100644 index d5fdea006..000000000 --- a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-common/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/typeTransformationAssertions.kt +++ /dev/null @@ -1,76 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") -@file:JvmMultifileClass -@file:JvmName("TypeTransformationAssertionsKt") - -package ch.tutteli.atrium.api.cc.infix.en_GB - -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.creating.AssertionPlantNullable -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.domain.builders.AssertImpl -import kotlin.jvm.JvmMultifileClass -import kotlin.jvm.JvmName - -/** - * Makes the assertion that [AssertionPlantNullable.subject][SubjectProvider.subject] is not null and if so, uses [assertionCreator] - * which could create further assertions which are added as a group. - * - * @return Notice, that this assertion function cannot provide a fluent API because it depends on whether the first - * assertion ([Assert.subject][SubjectProvider.subject] is not null) holds or not. Define subsequent assertions - * via the [assertionCreator] lambda. - * - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().notToBeNull(ch.tutteli.atrium.api.infix.en_GB.o).asAssert(assertionCreator)", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.infix.en_GB.notToBeNull", - "ch.tutteli.atrium.api.infix.en_GB.o" - ) -) -@Suppress("DEPRECATION") -inline infix fun AssertionPlantNullable.notToBeNull(noinline assertionCreator: Assert.() -> Unit) { - addAssertion(AssertImpl.any.isNotNull(this, T::class, assertionCreator)) -} - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] *is a* [TSub] (the same type or a sub-type) and if so, - * uses [assertionCreator] which could create further assertions which are added as a group. - * - * Notice, that asserting a function type is [flawed](https://youtrack.jetbrains.com/issue/KT-27846). - * The actual types are ignored as function types erase to Function0, - * Function1 etc. on byte code level, which means the assertion holds as long as the [Assert.subject][SubjectProvider.subject] is a - * function and has the same amount of arguments regardless if the types differ. For instance - * `assert({x: Int -> "hello"}).isA Unit>{}` holds, even though `(Int) -> String` is clearly not - * a `(String) -> Unit`. - * - * More generally speaking, the [flaw](https://youtrack.jetbrains.com/issue/KT-27826) applies to all generic types. - * For instance `isA>` would only check if the [Assert.subject][SubjectProvider.subject] is a `List` without checking if - * the element type is actually `String`. Or in other words - * `assert(listOf(1, 2)).isA>{}` holds, even though `List` is clearly not a `List`. - * - * @return Notice, that this assertion function cannot provide a fluent API because it depends on whether the first - * assertion ([Assert.subject][SubjectProvider.subject] *is a* [TSub]) holds or not. Define subsequent assertions - * via the [assertionCreator] lambda. - * - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.", - ReplaceWith( - "this.asExpect().isA().asAssert(assertionCreator)", - "ch.tutteli.atrium.domain.builders.migration.asExpect", - "ch.tutteli.atrium.domain.builders.migration.asAssert", - "ch.tutteli.atrium.api.infix.en_GB.isA" - ) -) -inline infix fun Assert.isA(noinline assertionCreator: AssertionPlant.() -> Unit) { - @Suppress("DEPRECATION") - AssertImpl.any.typeTransformation.isA(this, TSub::class, assertionCreator) -} - diff --git a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-js/build.gradle b/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-js/build.gradle deleted file mode 100644 index 2ca149d87..000000000 --- a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-js/build.gradle +++ /dev/null @@ -1,6 +0,0 @@ -description = 'An API in en_GB with a focus on code completion and infix functions for the JS platform.' + - 'It provides a fluent API in en_GB which is designed to ease the usage of code completion.' - -dependencies { - api prefixedProject('domain-builders-js') -} diff --git a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-jvm/build.gradle b/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-jvm/build.gradle deleted file mode 100644 index ddeca8877..000000000 --- a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-jvm/build.gradle +++ /dev/null @@ -1,25 +0,0 @@ -description = 'An API in en_GB with a focus on code completion and infix functions for the JVM platform.' + - 'It provides a fluent API in en_GB which is designed to ease the usage of code completion.' - -ext.jacoco_additional = [ - prefixedProject('translations-en_GB-jvm'), - prefixedProject('domain-robstoll-jvm'), - prefixedProject('domain-robstoll-lib-jvm'), - prefixedProject('core-robstoll-jvm'), - prefixedProject('core-robstoll-lib-jvm'), -] - -dependencies { - api prefixedProject('domain-builders-jvm') - - testImplementation prefixedProject('verbs-internal-jvm') - testImplementation prefixedProject('api-infix-en_GB-jvm') -} - -//TODO should not be necessary https://youtrack.jetbrains.com/issue/KT-28124 -compileTestKotlin.dependsOn( - prefixedProject('core-robstoll-jvm').compileKotlin, - prefixedProject('core-robstoll-jvm').processResources, - prefixedProject('domain-robstoll-jvm').compileKotlin, - prefixedProject('domain-robstoll-jvm').processResources -) diff --git a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/anyDeprecatedAssertions.kt b/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/anyDeprecatedAssertions.kt deleted file mode 100644 index 2b0ea1b3e..000000000 --- a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/anyDeprecatedAssertions.kt +++ /dev/null @@ -1,13 +0,0 @@ -@file:Suppress("DEPRECATION" /* will be removed with 1.0.0 */) -@file:JvmMultifileClass -@file:JvmName("AnyAssertionsKt") -package ch.tutteli.atrium.api.cc.infix.en_GB - -import ch.tutteli.atrium.creating.AssertionPlantNullable -import ch.tutteli.atrium.domain.builders.AssertImpl - -@Deprecated("Use the extension function, will be removed with 1.0.0", ReplaceWith("plant toBe null")) -@Suppress("UNUSED_PARAMETER") -fun toBe(plant: AssertionPlantNullable, void: Void?) { - plant.addAssertion(AssertImpl.any.toBeNull(plant)) -} diff --git a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/bigDecimalAssertions.kt b/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/bigDecimalAssertions.kt deleted file mode 100644 index a7cc28724..000000000 --- a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/bigDecimalAssertions.kt +++ /dev/null @@ -1,105 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") -package ch.tutteli.atrium.api.cc.infix.en_GB - -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.AssertionPlantNullable -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.domain.builders.AssertImpl -import ch.tutteli.atrium.domain.builders.bigDecimal -import ch.tutteli.atrium.domain.builders.creating.PleaseUseReplacementException -import java.math.BigDecimal - -@Deprecated("Use `isNumericallyEqualTo` if you expect that the following assertion holds:\n" + - "`assert(BigDecimal(\"10\").toBe(BigDecimal(\"10.0\"))`\n" + - "However, if you expect it to be wrong (because `BigDecimal.scale` differ), then use `isEqualIncludingScale`.", - ReplaceWith("this isNumericallyEqualTo expected or isEqualIncludingScale expected")) -@Suppress("UNUSED_PARAMETER", "unused") -infix fun Assert.toBe(expected: T): Nothing - = throw PleaseUseReplacementException("BigDecimal.equals() compares also BigDecimal.scale, which you might not be aware of.\n" + - "If you know it and want that `scale` is included in the comparison, then use `isEqualIncludingScale`.") - -@Deprecated("Use `isNotNumericallyEqualTo` if you expect that the following assertion is wrong:\n" + - "`assert(BigDecimal(\"10\") notToBe BigDecimal(\"10.0\")`\n" + - "However, if you expect it to hold (because `BigDecimal.scale` differ), then use `isNotEqualIncludingScale`.", - ReplaceWith("this isNotNumericallyEqualTo expected or isNotEqualIncludingScale expected")) -@Suppress("UNUSED_PARAMETER", "unused") -infix fun Assert.notToBe(expected: T): Nothing - = throw PleaseUseReplacementException("BigDecimal.equals() compares also BigDecimal.scale, which you might not be aware of.\n" + - "If you know it and want that `scale` is included in the comparison, then use `isNotEqualIncludingScale`.") - -@Deprecated("Use `notToBeNullBut { isNumericallyEqualTo ... }` if you expect that the following assertion holds:\n" + - "`assert(BigDecimal(\"10\").toBe(BigDecimal(\"10.0\"))`\n" + - "However, if you expect it to be wrong (because `BigDecimal.scale` differ), then use `notToBeNullBut { isEqualIncludingScale ... }`.", - ReplaceWith("this notToBeNullBut { o isNumericallyEqualTo expected } or notToBeNullBut { o isEqualIncludingScale expected }")) -@Suppress("UNUSED_PARAMETER", "unused") -infix fun AssertionPlantNullable.notToBeNullBut(expected: T): Nothing - = throw PleaseUseReplacementException("BigDecimal.equals() compares also BigDecimal.scale, which you might not be aware of.\n" + - "If you know it and want that `scale` is included in the comparison, then use `notToBeNullBut { o isEqualIncludingScale expected }`.") - - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] is numerically equal to [expected]. - * - * By numerically is meant that it will not compare [BigDecimal.scale] (or in other words, - * it uses `compareTo(expected) == 0`) - * - * Most of the time you want to use this function instead of [isEqualIncludingScale] because - * [isEqualIncludingScale] compares [BigDecimal.scale]. - * Following the two functions compared: - * - `assert(BigDecimal("10")) isEqualIncludingScale BigDecimal("10.0")` does not hold - * - `assert(BigDecimal("10")) isNumericallyEqualTo BigDecimal("10.0")` holds. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -infix fun Assert.isNumericallyEqualTo(expected: T) - = addAssertion(AssertImpl.bigDecimal.isNumericallyEqualTo(this, expected)) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] is not numerically equal to [expected]. - * - * By numerically is meant that it will not compare [BigDecimal.scale] (or in other words, - * it uses `compareTo(expected) != 0`) - * Most of the time you want to use this function instead of [isNotEqualIncludingScale] because - * [isNotEqualIncludingScale] compares [BigDecimal.scale]. - * Following the two functions compared: - * - `assert(BigDecimal("10")) notToBe BigDecimal("10.0")` holds. - * - `assert(BigDecimal("10")) isNotNumericallyEqualTo BigDecimal("10.0")` does not hold. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -infix fun Assert.isNotNumericallyEqualTo(expected: T) - = addAssertion(AssertImpl.bigDecimal.isNotNumericallyEqualTo(this, expected)) - - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] is (equal to) [expected] including [BigDecimal.scale]. - * - * Most of the time you want to use [isNumericallyEqualTo] which does not compare [BigDecimal.scale] - * in contrast to this function. - * Following the two functions compared: - * - `assert(BigDecimal("10")) isEqualIncludingScale BigDecimal("10.0")` does not hold. - * - `assert(BigDecimal("10")) isNumericallyEqualTo BigDecimal("10.0")` holds. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -infix fun Assert.isEqualIncludingScale(expected: T) - = addAssertion(AssertImpl.bigDecimal.isEqualIncludingScale(this, expected, this::isNumericallyEqualTo.name)) - -/** - * Makes the assertion that the [Assert.subject][SubjectProvider.subject] is not equal to [expected] including [BigDecimal.scale]. - * - * Most of the time you want to use [isNotNumericallyEqualTo] which does not compare [BigDecimal.scale] - * in contrast to this function. - * Following the two functions compared: - * - `assert(BigDecimal("10")) isNotEqualIncludingScale BigDecimal("10.0")` holds. - * - `assert(BigDecimal("10")) isNotNumericallyEqualTo BigDecimal("10.0")` does not hold. - * - * @return This plant to support a fluent API. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -infix fun Assert.isNotEqualIncludingScale(expected: T) - = addAssertion(AssertImpl.bigDecimal.isNotEqualIncludingScale(this, expected)) diff --git a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/deprecatedParameterObjects.kt b/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/deprecatedParameterObjects.kt deleted file mode 100644 index 323219ba1..000000000 --- a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/deprecatedParameterObjects.kt +++ /dev/null @@ -1,41 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") -@file:JvmMultifileClass -@file:JvmName("ParameterObjectsKt") -package ch.tutteli.atrium.api.cc.infix.en_GB - -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.domain.builders.utils.GroupWithNullableEntries -import ch.tutteli.kbox.glue - -@Deprecated("Use Value instead, it was opened up to Any? in 0.8.0; will be removed with 1.0.0", ReplaceWith("Value(expected)")) -data class NullableValue(val expected: T) : GroupWithNullableEntries { - override fun toList() = listOf(expected) -} - -@Deprecated("Use Values instead, it was opened up to Any? in 0.8.0; will be removed with 1.0.0", ReplaceWith("Values(expected, *otherExpected)")) -class NullableValues(val expected: T, vararg val otherExpected: T) : GroupWithNullableEntries{ - override fun toList() = listOf(expected, *otherExpected) -} - -@Deprecated("Use Entry instead, it was opened up to `(Assert.() -> Unit)?` in 0.8.0; will be removed with 1.0.0", ReplaceWith("Entry(assertionCreatorOrNull)")) -class NullableEntry( - val assertionCreator: (Assert.() -> Unit)? -) : GroupWithNullableEntries<(Assert.() -> Unit)?> { - override fun toList(): List<(Assert.() -> Unit)?> = listOf(assertionCreator) -} - -@Deprecated("Use Entries instead, it was opened up to Any? in 0.8.0; will be removed with 1.0.0", ReplaceWith("Entries(assertionCreatorOrNull, *otherAssertionCreatorsOrNulls)")) -class NullableEntries( - val assertionCreatorOrNull: (Assert.() -> Unit)?, - vararg val otherAssertionCreatorsOrNulls: (Assert.() -> Unit)? -) : GroupWithNullableEntries<(Assert.() -> Unit)?> { - override fun toList(): List<(Assert.() -> Unit)?> = assertionCreatorOrNull glue otherAssertionCreatorsOrNulls -} - -@Deprecated("Use KeyValue instead, it was opened up to `(Assert.() -> Unit)?` in 0.8.0; will be removed with 1.0.0", ReplaceWith("KeyValue(key, *valueAssertionCreatorOrNull)")) -data class KeyNullableValue(val key: K, val valueAssertionCreatorOrNull: (Assert.() -> Unit)?) { - fun toPair(): Pair.() -> Unit)?> = key to valueAssertionCreatorOrNull - override fun toString(): String - = "KeyNullableValue(key=$key, value=${if (valueAssertionCreatorOrNull == null) "null" else "lambda"})" -} diff --git a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/iterableContainsInAnyOrderDeprecatedCreators.kt b/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/iterableContainsInAnyOrderDeprecatedCreators.kt deleted file mode 100644 index 60870ff25..000000000 --- a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/iterableContainsInAnyOrderDeprecatedCreators.kt +++ /dev/null @@ -1,27 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") -@file:JvmMultifileClass -@file:JvmName("IterableContainsInAnyOrderCreatorsKt") -package ch.tutteli.atrium.api.cc.infix.en_GB - -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InAnyOrderSearchBehaviour - -@Deprecated("Use `value` instead; will be removed with 1.0.0", ReplaceWith("this value expectedOrNull")) -infix fun > IterableContains.CheckerOption.nullableValue(expectedOrNull: E): AssertionPlant - = this value expectedOrNull - -@Deprecated("Use `entry` instead; will be removed with 1.0.0", ReplaceWith("this entry assertionCreatorOrNull")) -infix fun > IterableContains.CheckerOption.nullableEntry(assertionCreatorOrNull: (Assert.() -> Unit)?): AssertionPlant - = this entry assertionCreatorOrNull - -@Deprecated("Use `the Values` instead; will be removed with 1.0.0", ReplaceWith("this the Values(nullableValues.expected, *nullableValues.otherExpected)")) -infix fun > IterableContains.CheckerOption.the(nullableValues: NullableValues): AssertionPlant - = this the Values(nullableValues.expected, *nullableValues.otherExpected) - -@Deprecated("Use `the Entries` instead; will be removed with 1.0.0", ReplaceWith("this the Entries(nullableEntries.assertionCreatorOrNull, *nullableEntries.otherAssertionCreatorsOrNulls)")) -infix fun > IterableContains.CheckerOption.the(nullableEntries: NullableEntries): AssertionPlant - = this the Entries(nullableEntries.assertionCreatorOrNull, *nullableEntries.otherAssertionCreatorsOrNulls) - diff --git a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/iterableContainsInAnyOrderOnlyDeprecatedCreators.kt b/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/iterableContainsInAnyOrderOnlyDeprecatedCreators.kt deleted file mode 100644 index 149f42b2b..000000000 --- a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/iterableContainsInAnyOrderOnlyDeprecatedCreators.kt +++ /dev/null @@ -1,26 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") -@file:JvmMultifileClass -@file:JvmName("IterableContainsInAnyOrderOnlyCreatorsKt") -package ch.tutteli.atrium.api.cc.infix.en_GB - -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InAnyOrderOnlySearchBehaviour - -@Deprecated("Use `value` instead; will be removed with 1.0.0", ReplaceWith("this value expectedOrNull")) -infix fun > IterableContains.Builder.nullableValue(expectedOrNull: E): AssertionPlant - = this value expectedOrNull - -@Deprecated("Use `entry` instead; will be removed with 1.0.0", ReplaceWith("this entry assertionCreatorOrNull")) -infix fun > IterableContains.Builder.nullableEntry(assertionCreatorOrNull: (Assert.() -> Unit)?): AssertionPlant - = this entry assertionCreatorOrNull - -@Deprecated("Use `the Values` instead; will be removed with 1.0.0", ReplaceWith("this the Values(nullableValues.expected, *nullableValues.otherExpected)")) -infix fun > IterableContains.Builder.the(nullableValues: NullableValues): AssertionPlant - = this the Values(nullableValues.expected, *nullableValues.otherExpected) - -@Deprecated("Use `the Entries` instead; will be removed with 1.0.0", ReplaceWith("this the Entries(nullableEntries.assertionCreatorOrNull, *nullableEntries.otherAssertionCreatorsOrNulls)")) -infix fun > IterableContains.Builder.the(nullableEntries: NullableEntries): AssertionPlant - = this the Entries(nullableEntries.assertionCreatorOrNull, *nullableEntries.otherAssertionCreatorsOrNulls) diff --git a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/iterableContainsInOrderOnlyDeprecatedCreators.kt b/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/iterableContainsInOrderOnlyDeprecatedCreators.kt deleted file mode 100644 index 358633db4..000000000 --- a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/iterableContainsInOrderOnlyDeprecatedCreators.kt +++ /dev/null @@ -1,27 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") -@file:JvmMultifileClass -@file:JvmName("IterableContainsInOrderOnlyCreatorsKt") -package ch.tutteli.atrium.api.cc.infix.en_GB - -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.domain.builders.AssertImpl -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InOrderOnlySearchBehaviour - -@Deprecated("Use `value` instead; will be removed with 1.0.0", ReplaceWith("this value expectedOrNull")) -infix fun > IterableContains.Builder.nullableValue(expectedOrNull: E): AssertionPlant - = this value expectedOrNull - -@Deprecated("Use `entry` instead; will be removed with 1.0.0", ReplaceWith("this entry assertionCreatorOrNull")) -infix fun > IterableContains.Builder.nullableEntry(assertionCreatorOrNull: (Assert.() -> Unit)?): AssertionPlant - = this entry assertionCreatorOrNull - -@Deprecated("Use `the Values` instead; will be removed with 1.0.0", ReplaceWith("this the Values(nullableValues.expected, *nullableValues.otherExpected)")) -infix fun > IterableContains.Builder.the(nullableValues: NullableValues): AssertionPlant - = this the Values(nullableValues.expected, *nullableValues.otherExpected) - -@Deprecated("Use `the Entries` instead; will be removed with 1.0.0", ReplaceWith("this the Entries(nullableEntries.assertionCreatorOrNull, *nullableEntries.otherAssertionCreatorsOrNulls)")) -infix fun > IterableContains.Builder.the(nullableEntries: NullableEntries): AssertionPlant - = this the Entries(nullableEntries.assertionCreatorOrNull, *nullableEntries.otherAssertionCreatorsOrNulls) diff --git a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/iterableContainsInOrderOnlyGroupedDeprecatedCreators.kt b/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/iterableContainsInOrderOnlyGroupedDeprecatedCreators.kt deleted file mode 100644 index 70550a49e..000000000 --- a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/iterableContainsInOrderOnlyGroupedDeprecatedCreators.kt +++ /dev/null @@ -1,31 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") -@file:JvmMultifileClass -@file:JvmName("IterableContainsInOrderOnlyGroupedCreatorsKt") -package ch.tutteli.atrium.api.cc.infix.en_GB - -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.domain.builders.utils.GroupWithNullableEntries -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InOrderOnlyGroupedWithinSearchBehaviour - -@Deprecated( - "Use the extension function which expects Group instead; will be removed with 1.0.0", - ReplaceWith("builder inAny order") -) -@JvmName("inAnyOrderNullableValues") -fun > inAny( - builder: IterableContains.Builder, - order: Order> -): AssertionPlant = builder inAny order - -@Deprecated( - "Use the extension function which expects Group instead; will be removed with 1.0.0", - ReplaceWith(" builder inAny order") -) -@JvmName("inAnyOrderNullableEntries") -fun > inAny( - builder: IterableContains.Builder, - order: Order<(Assert.() -> Unit)?, GroupWithNullableEntries<(Assert.() -> Unit)?>> -): AssertionPlant = builder inAny order diff --git a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/iterableDeprecatedAssertions.kt b/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/iterableDeprecatedAssertions.kt deleted file mode 100644 index e3b49555f..000000000 --- a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/iterableDeprecatedAssertions.kt +++ /dev/null @@ -1,96 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") -@file:JvmMultifileClass -@file:JvmName("IterableAssertionsKt") -package ch.tutteli.atrium.api.cc.infix.en_GB - -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.AssertionPlant - -@Deprecated("Use `contains` instead; will be removed with 1.0.0", ReplaceWith("this contains nullableValue.expected")) -infix fun > Assert.contains(nullableValue: NullableValue) - = this contains nullableValue.expected - -@Deprecated("Use `contains` instead; will be removed with 1.0.0", ReplaceWith("this contains Values(nullableValues.expected, *nullableValues.otherExpected)")) -infix fun > Assert.contains(nullableValues: NullableValues): AssertionPlant - = this contains Values(nullableValues.expected, *nullableValues.otherExpected) - -@Deprecated("Use `contains` instead; will be removed with 1.0.0", ReplaceWith("this contains nullableEntry.assertionCreator")) -infix fun > Assert.contains(nullableEntry: NullableEntry): AssertionPlant - = this contains nullableEntry.assertionCreator - -@Deprecated("Use `contains` instead; will be removed with 1.0.0", ReplaceWith("this contains Entries(nullableEntries.assertionCreatorOrNull, *nullableEntries.otherAssertionCreatorsOrNulls)")) -infix fun > Assert.contains(nullableEntries: NullableEntries): AssertionPlant - = this contains Entries(nullableEntries.assertionCreatorOrNull, *nullableEntries.otherAssertionCreatorsOrNulls) - -@Deprecated( - "Replaced with containsExactly for clearer naming; will be removed with 1.0.0", - ReplaceWith("this containsExactly expected", "ch.tutteli.atrium.api.cc.infix.en_GB.containsExactly") -) -infix fun > Assert.containsStrictly(expected: E): AssertionPlant - = this containsExactly expected - -@Deprecated( - "Replaced with containsExactly for clearer naming; will be removed with 1.0.0", - ReplaceWith("this containsExactly expected.expected", "ch.tutteli.atrium.api.cc.infix.en_GB.containsExactly") -) -infix fun > Assert.containsStrictly(expected: NullableValue): AssertionPlant - = this containsExactly expected.expected - -@Deprecated( - "Replaced with containsExactly for clearer naming; will be removed with 1.0.0", - ReplaceWith("this containsExactly values", "ch.tutteli.atrium.api.cc.infix.en_GB.containsExactly") -) -infix fun > Assert.containsStrictly(values: Values): AssertionPlant - = this containsExactly values - -@Deprecated( - "Replaced with containsExactly for clearer naming; will be removed with 1.0.0", - ReplaceWith("this containsExactly Values(nullableValues.expected, *nullableValues.otherExpected)", "ch.tutteli.atrium.api.cc.infix.en_GB.containsExactly") -) -infix fun > Assert.containsStrictly(nullableValues: NullableValues): AssertionPlant - = this containsExactly Values(nullableValues.expected, *nullableValues.otherExpected) - -@Deprecated( - "Replaced with containsExactly for clearer naming; will be removed with 1.0.0", - ReplaceWith(" this containsExactly assertionCreator", "ch.tutteli.atrium.api.cc.infix.en_GB.containsExactly") -) -infix fun > Assert.containsStrictly(assertionCreator: Assert.() -> Unit): AssertionPlant - = this containsExactly assertionCreator - -@Deprecated( - "Replaced with containsExactly for clearer naming; will be removed with 1.0.0", - ReplaceWith("this containsExactly nullableEntry.assertionCreator", "ch.tutteli.atrium.api.cc.infix.en_GB.containsExactly") -) -infix fun > Assert.containsStrictly(nullableEntry: NullableEntry): AssertionPlant - = this containsExactly nullableEntry.assertionCreator - -@Deprecated( - "Replaced with containsExactly for clearer naming; will be removed with 1.0.0", - ReplaceWith("this containsExactly entries", "ch.tutteli.atrium.api.cc.infix.en_GB.containsExactly") -) -infix fun > Assert.containsStrictly(entries: Entries): AssertionPlant - = this containsExactly entries - -@Deprecated( - "Replaced with containsExactly for clearer naming; will be removed with 1.0.0", - ReplaceWith( - "this containsExactly Entries(nullableEntries.assertionCreatorOrNull, *nullableEntries.otherAssertionCreatorsOrNulls)", - "ch.tutteli.atrium.api.cc.infix.en_GB.containsExactly" - ) -) -infix fun > Assert.containsStrictly(nullableEntries: NullableEntries): AssertionPlant - = this containsExactly Entries(nullableEntries.assertionCreatorOrNull, *nullableEntries.otherAssertionCreatorsOrNulls) - -@Deprecated("Use `any` instead; will be removed with 1.0.0", ReplaceWith("this any nullableEntry.assertionCreator")) -infix fun > Assert.any(nullableEntry: NullableEntry): AssertionPlant - = this any nullableEntry.assertionCreator - -@Deprecated("Use `none` instead; will be removed with 1.0.0", ReplaceWith("this none nullableEntry.assertionCreator")) -infix fun > Assert.none(nullableEntry: NullableEntry) - = this none nullableEntry.assertionCreator - -@Deprecated("Use `all` instead; will be removed with 1.0.0", ReplaceWith("this all nullableEntry.assertionCreator")) -infix fun > Assert.all(nullableEntry: NullableEntry) - = this all nullableEntry.assertionCreator - diff --git a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/typeTransformationDeprecatedAssertions.kt b/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/typeTransformationDeprecatedAssertions.kt deleted file mode 100644 index 2247b2eea..000000000 --- a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-jvm/src/main/kotlin/ch/tutteli/atrium/api/cc/infix/en_GB/typeTransformationDeprecatedAssertions.kt +++ /dev/null @@ -1,32 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") -@file:JvmMultifileClass -@file:JvmName("TypeTransformationAssertionsKt") -package ch.tutteli.atrium.api.cc.infix.en_GB - -import ch.tutteli.atrium.api.cc.infix.en_GB.keywords.ERR_KEYWORD_GIVEN_COLLECTION_ASSUMED -import ch.tutteli.atrium.api.cc.infix.en_GB.keywords.Keyword -import ch.tutteli.atrium.creating.AssertionPlantNullable -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.domain.builders.creating.PleaseUseReplacementException - - -/** - * Makes the assertion that [AssertionPlantNullable.subject][SubjectProvider.subject] is not null but the [expected] value. - * - * Is a shortcut for `istNichtNull { ist(expected) }` - * - * @return Notice, that this assertion function cannot provide a fluent API because it depends on whether the first - * assertion ([Assert.subject][SubjectProvider.subject] is not null) holds or not. - * - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - */ -@Deprecated("Will be removed with 1.0.0 because it is redundant in terms of `ist(expected)` without adding enough to be a legit alternative.", ReplaceWith("ist(expected)")) -inline infix fun AssertionPlantNullable.notToBeNullBut(expected: T) { - notToBeNull { this toBe expected } -} - -@Deprecated(ERR_KEYWORD_GIVEN_COLLECTION_ASSUMED, ReplaceWith("this notToBeNullBut (keyword as Any)")) -@Suppress("UNUSED_PARAMETER", "unused") -infix fun AssertionPlantNullable.notToBeNullBut(keyword: Keyword): Nothing - = throw PleaseUseReplacementException("this notToBe (keyword as Any)") diff --git a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-jvm/src/module/module-info.java b/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-jvm/src/module/module-info.java deleted file mode 100644 index b2bed01cf..000000000 --- a/misc/deprecated/apis/cc-infix-en_GB/atrium-api-cc-infix-en_GB-jvm/src/module/module-info.java +++ /dev/null @@ -1,11 +0,0 @@ -module ch.tutteli.atrium.api.cc.infix.en_GB { - requires ch.tutteli.atrium.domain.builders; - requires kotlin.stdlib; - - exports ch.tutteli.atrium.api.cc.infix.en_GB; - exports ch.tutteli.atrium.api.cc.infix.en_GB.creating.charsequence.contains.builders; - exports ch.tutteli.atrium.api.cc.infix.en_GB.creating.iterable.contains.builders; - exports ch.tutteli.atrium.api.cc.infix.en_GB.creating.list.get.builders; - exports ch.tutteli.atrium.api.cc.infix.en_GB.creating.map.get.builders; - exports ch.tutteli.atrium.api.cc.infix.en_GB.keywords; -} diff --git a/misc/deprecated/apis/fluent-en_GB-jdk8/atrium-api-fluent-en_GB-jdk8-common/build.gradle b/misc/deprecated/apis/fluent-en_GB-jdk8/atrium-api-fluent-en_GB-jdk8-common/build.gradle deleted file mode 100644 index f67c62d0c..000000000 --- a/misc/deprecated/apis/fluent-en_GB-jdk8/atrium-api-fluent-en_GB-jdk8-common/build.gradle +++ /dev/null @@ -1,9 +0,0 @@ -description = 'dummy project, will be removed once Atrium switches to the new MPP plugin.' - -dependencies { - api prefixedProject('api-fluent-en_GB-common') - api prefixedProject('domain-builders-common') - api niok() - - testImplementation prefixedProject('specs-common') -} diff --git a/misc/deprecated/apis/fluent-en_GB-jdk8/atrium-api-fluent-en_GB-jdk8-jvm/build.gradle b/misc/deprecated/apis/fluent-en_GB-jdk8/atrium-api-fluent-en_GB-jdk8-jvm/build.gradle deleted file mode 100644 index f7fccff97..000000000 --- a/misc/deprecated/apis/fluent-en_GB-jdk8/atrium-api-fluent-en_GB-jdk8-jvm/build.gradle +++ /dev/null @@ -1,26 +0,0 @@ -description = 'JDK 8 specific assertion functions and builders for fluent-en_GB.' - -ext.jacoco_additional = [ - prefixedProject('domain-builders-jvm'), - prefixedProject('domain-robstoll-jvm'), - prefixedProject('domain-robstoll-lib-jvm'), - prefixedProject('core-robstoll-jvm'), - prefixedProject('core-robstoll-lib-jvm'), -] - -dependencies { - api prefixedProject('api-fluent-en_GB-jvm') - api prefixedProject('domain-builders-jvm') - api niok() - - testImplementation prefixedProject('specs-jvm') -} - - -//TODO should not be necessary https://youtrack.jetbrains.com/issue/KT-28124 -compileTestKotlin.dependsOn( - prefixedProject('core-robstoll-jvm').compileKotlin, - prefixedProject('core-robstoll-jvm').processResources, - prefixedProject('domain-robstoll-jvm').compileKotlin, - prefixedProject('domain-robstoll-jvm').processResources -) diff --git a/misc/deprecated/apis/fluent-en_GB-jdk8/atrium-api-fluent-en_GB-jdk8-jvm/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/jdk8/chronoLocalDateAssertions.kt b/misc/deprecated/apis/fluent-en_GB-jdk8/atrium-api-fluent-en_GB-jdk8-jvm/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/jdk8/chronoLocalDateAssertions.kt deleted file mode 100644 index 99164d01c..000000000 --- a/misc/deprecated/apis/fluent-en_GB-jdk8/atrium-api-fluent-en_GB-jdk8-jvm/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/jdk8/chronoLocalDateAssertions.kt +++ /dev/null @@ -1,94 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress( - "DEPRECATION", - /* TODO remove once https://youtrack.jetbrains.com/issue/KT-35343 is fixed */ - "JAVA_MODULE_DOES_NOT_READ_UNNAMED_MODULE" -) - -package ch.tutteli.atrium.api.fluent.en_GB.jdk8 - -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.domain.builders.ExpectImpl -import ch.tutteli.atrium.domain.builders.chronoLocalDate -import java.time.chrono.ChronoLocalDate - -/** - * Expects that the subject of the assertion (a [ChronoLocalDate]) - * is before the [expected] [ChronoLocalDate]. - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - * - * @since 0.9.0 - */ -@Deprecated( - "Use the function from the normal jvm module; the jdk8 extension will be removed with 1.0.0", - ReplaceWith("this.isBefore(expected)", "ch.tutteli.atrium.api.fluent.en_GB.isBefore") -) -fun Expect.isBefore(expected: ChronoLocalDate): Expect = - addAssertion(ExpectImpl.chronoLocalDate.isBefore(this, expected)) - -/** - * Expects that the subject of the assertion (a [ChronoLocalDate]) - * is before or equal the [expected] [ChronoLocalDate]. - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - * - * @since 0.9.0 - */ -@Deprecated( - "Use the function from the normal jvm module; the jdk8 extension will be removed with 1.0.0", - ReplaceWith("this.isBeforeOrEqual(expected)", "ch.tutteli.atrium.api.fluent.en_GB.isBeforeOrEqual") -) -fun Expect.isBeforeOrEqual(expected: ChronoLocalDate): Expect = - addAssertion(ExpectImpl.chronoLocalDate.isBeforeOrEquals(this, expected)) - - -/** - * Expects that the subject of the assertion (a [ChronoLocalDate]) - * is after the [expected] [ChronoLocalDate]. - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - * - * @since 0.9.0 - */ -@Deprecated( - "Use the function from the normal jvm module; the jdk8 extension will be removed with 1.0.0", - ReplaceWith("this.isAfter(expected)", "ch.tutteli.atrium.api.fluent.en_GB.isAfter") -) -fun Expect.isAfter(expected: ChronoLocalDate): Expect = - addAssertion(ExpectImpl.chronoLocalDate.isAfter(this, expected)) - -/** - * Expects that the subject of the assertion (a [ChronoLocalDate]) - * is after or equal the [expected] [ChronoLocalDate]. - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - * - * @since 0.9.0 - */ -@Deprecated( - "Use the function from the normal jvm module; the jdk8 extension will be removed with 1.0.0", - ReplaceWith("this.isAfterOrEqual(expected)", "ch.tutteli.atrium.api.fluent.en_GB.isAfterOrEqual") -) -fun Expect.isAfterOrEqual(expected: ChronoLocalDate): Expect = - addAssertion(ExpectImpl.chronoLocalDate.isAfterOrEquals(this, expected)) - -/** - * Expects that the subject of the assertion (a [ChronoLocalDate]) - * is equal to the [expected] [ChronoLocalDate]. - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - * - * @since 0.9.0 - */ -@Deprecated( - "Use the function from the normal jvm module; the jdk8 extension will be removed with 1.0.0", - ReplaceWith("this.isEqual(expected)", "ch.tutteli.atrium.api.fluent.en_GB.isEqual") -) -fun Expect.isEqual(expected: ChronoLocalDate): Expect = - addAssertion(ExpectImpl.chronoLocalDate.isEqual(this, expected)) diff --git a/misc/deprecated/apis/fluent-en_GB-jdk8/atrium-api-fluent-en_GB-jdk8-jvm/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/jdk8/chronoLocalDateTimeAssertions.kt b/misc/deprecated/apis/fluent-en_GB-jdk8/atrium-api-fluent-en_GB-jdk8-jvm/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/jdk8/chronoLocalDateTimeAssertions.kt deleted file mode 100644 index 5a2a780d7..000000000 --- a/misc/deprecated/apis/fluent-en_GB-jdk8/atrium-api-fluent-en_GB-jdk8-jvm/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/jdk8/chronoLocalDateTimeAssertions.kt +++ /dev/null @@ -1,97 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress( - "DEPRECATION", - /* TODO remove once https://youtrack.jetbrains.com/issue/KT-35343 is fixed */ - "JAVA_MODULE_DOES_NOT_READ_UNNAMED_MODULE" -) -package ch.tutteli.atrium.api.fluent.en_GB.jdk8 - -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.domain.builders.ExpectImpl -import ch.tutteli.atrium.domain.builders.chronoLocalDateTime -import java.time.chrono.ChronoLocalDate -import java.time.chrono.ChronoLocalDateTime - -/** - * Expects that the subject of the assertion (a [ChronoLocalDateTime]) - * is before the [expected] [ChronoLocalDateTime]. - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - * - * @since 0.9.0 - */ -@Deprecated( - "Use the function from the normal jvm module; the jdk8 extension will be removed with 1.0.0", - ReplaceWith("this.isBefore(expected)","ch.tutteli.atrium.api.fluent.en_GB.isBefore") -) -fun > Expect.isBefore(expected: ChronoLocalDateTime<*>): Expect = - addAssertion(ExpectImpl.chronoLocalDateTime.isBefore(this, expected)) - -/** - * Expects that the subject of the assertion (a [ChronoLocalDateTime]) - * is before or equal the [expected] [ChronoLocalDateTime]. - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - * - * @since 0.9.0 - */ -@Deprecated( - "Use the function from the normal jvm module; the jdk8 extension will be removed with 1.0.0", - ReplaceWith("this.isBeforeOrEqual(expected)","ch.tutteli.atrium.api.fluent.en_GB.isBeforeOrEqual") -) -fun > Expect.isBeforeOrEqual( - expected: ChronoLocalDateTime<*> -): Expect = addAssertion(ExpectImpl.chronoLocalDateTime.isBeforeOrEquals(this, expected)) - -/** - * Expects that the subject of the assertion (a [ChronoLocalDateTime]) - * is after the [expected] [ChronoLocalDateTime]. - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - * - * @since 0.9.0 - */ -@Deprecated( - "Use the function from the normal jvm module; the jdk8 extension will be removed with 1.0.0", - ReplaceWith("this.isAfter(expected)","ch.tutteli.atrium.api.fluent.en_GB.isAfter") -) -fun > Expect.isAfter( - expected: ChronoLocalDateTime<*> -): Expect = addAssertion(ExpectImpl.chronoLocalDateTime.isAfter(this, expected)) - -/** - * Expects that the subject of the assertion (a [ChronoLocalDateTime]) - * is after or equal the [expected] [ChronoLocalDateTime]. - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - * - * @since 0.9.0 - */ -@Deprecated( - "Use the function from the normal jvm module; the jdk8 extension will be removed with 1.0.0", - ReplaceWith("this.isAfterOrEqual(expected)","ch.tutteli.atrium.api.fluent.en_GB.isAfterOrEqual") -) -fun > Expect.isAfterOrEqual( - expected: ChronoLocalDateTime<*> -): Expect = addAssertion(ExpectImpl.chronoLocalDateTime.isAfterOrEquals(this, expected)) - -/** - * Expects that the subject of the assertion (a [ChronoLocalDateTime]) - * is equal to the [expected] [ChronoLocalDateTime]. - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - * - * @since 0.9.0 - */ -@Deprecated( - "Use the function from the normal jvm module; the jdk8 extension will be removed with 1.0.0", - ReplaceWith("this.isEqual(expected)","ch.tutteli.atrium.api.fluent.en_GB.isEqual") -) -fun > Expect.isEqual( - expected: ChronoLocalDateTime<*> -): Expect = addAssertion(ExpectImpl.chronoLocalDateTime.isEqual(this, expected)) diff --git a/misc/deprecated/apis/fluent-en_GB-jdk8/atrium-api-fluent-en_GB-jdk8-jvm/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/jdk8/chronoZonedDateTimeAssertions.kt b/misc/deprecated/apis/fluent-en_GB-jdk8/atrium-api-fluent-en_GB-jdk8-jvm/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/jdk8/chronoZonedDateTimeAssertions.kt deleted file mode 100644 index 202b97c3f..000000000 --- a/misc/deprecated/apis/fluent-en_GB-jdk8/atrium-api-fluent-en_GB-jdk8-jvm/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/jdk8/chronoZonedDateTimeAssertions.kt +++ /dev/null @@ -1,98 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress( - "DEPRECATION", - /* TODO remove once https://youtrack.jetbrains.com/issue/KT-35343 is fixed */ - "JAVA_MODULE_DOES_NOT_READ_UNNAMED_MODULE" -) -package ch.tutteli.atrium.api.fluent.en_GB.jdk8 - -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.domain.builders.ExpectImpl -import ch.tutteli.atrium.domain.builders.chronoZonedDateTime -import java.time.chrono.ChronoLocalDate -import java.time.chrono.ChronoZonedDateTime - -/** - * Expects that the subject of the assertion (a [ChronoZonedDateTime]) - * is before the [expected] [ChronoZonedDateTime]. - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - * - * @since 0.9.0 - */ -@Deprecated( - "Use the function from the normal jvm module; the jdk8 extension will be removed with 1.0.0", - ReplaceWith("this.isBefore(expected)","ch.tutteli.atrium.api.fluent.en_GB.isBefore") -) -fun > Expect.isBefore( - expected: ChronoZonedDateTime<*> -): Expect = addAssertion(ExpectImpl.chronoZonedDateTime.isBefore(this, expected)) - -/** - * Expects that the subject of the assertion (a [ChronoZonedDateTime]) - * is before or equals the [expected] [ChronoZonedDateTime]. - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - * - * @since 0.9.0 - */ -@Deprecated( - "Use the function from the normal jvm module; the jdk8 extension will be removed with 1.0.0", - ReplaceWith("this.isBeforeOrEqual(expected)","ch.tutteli.atrium.api.fluent.en_GB.isBeforeOrEqual") -) -fun > Expect.isBeforeOrEqual( - expected: ChronoZonedDateTime<*> -): Expect = addAssertion(ExpectImpl.chronoZonedDateTime.isBeforeOrEqual(this, expected)) - -/** - * Expects that the subject of the assertion (a [ChronoZonedDateTime]) - * is after the [expected] [ChronoZonedDateTime]. - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - * - * @since 0.9.0 - */ -@Deprecated( - "Use the function from the normal jvm module; the jdk8 extension will be removed with 1.0.0", - ReplaceWith("this.isAfter(expected)","ch.tutteli.atrium.api.fluent.en_GB.isAfter") -) -fun > Expect.isAfter( - expected: ChronoZonedDateTime<*> -): Expect = addAssertion(ExpectImpl.chronoZonedDateTime.isAfter(this, expected)) - -/** - * Expects that the subject of the assertion (a [ChronoZonedDateTime]) - * is after or equal the [expected] [ChronoZonedDateTime]. - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - * - * @since 0.9.0 - */ -@Deprecated( - "Use the function from the normal jvm module; the jdk8 extension will be removed with 1.0.0", - ReplaceWith("this.isAfterOrEqual(expected)","ch.tutteli.atrium.api.fluent.en_GB.isAfterOrEqual") -) -fun > Expect.isAfterOrEqual( - expected: ChronoZonedDateTime<*> -): Expect = addAssertion(ExpectImpl.chronoZonedDateTime.isAfterOrEqual(this, expected)) - -/** - * Expects that the subject of the assertion (a [ChronoZonedDateTime]) - * is equal to the [expected] [ChronoZonedDateTime]. - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - * - * @since 0.9.0 - */ -@Deprecated( - "Use the function from the normal jvm module; the jdk8 extension will be removed with 1.0.0", - ReplaceWith("this.isEqual(expected)","ch.tutteli.atrium.api.fluent.en_GB.isEqual") -) -fun > Expect.isEqual( - expected: ChronoZonedDateTime<*> -): Expect = addAssertion(ExpectImpl.chronoZonedDateTime.isEqual(this, expected)) diff --git a/misc/deprecated/apis/fluent-en_GB-jdk8/atrium-api-fluent-en_GB-jdk8-jvm/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/jdk8/fileAssertions.kt b/misc/deprecated/apis/fluent-en_GB-jdk8/atrium-api-fluent-en_GB-jdk8-jvm/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/jdk8/fileAssertions.kt deleted file mode 100644 index 84298a7c8..000000000 --- a/misc/deprecated/apis/fluent-en_GB-jdk8/atrium-api-fluent-en_GB-jdk8-jvm/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/jdk8/fileAssertions.kt +++ /dev/null @@ -1,50 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress( - "DEPRECATION", - /* TODO remove once https://youtrack.jetbrains.com/issue/KT-35343 is fixed */ - "JAVA_MODULE_DOES_NOT_READ_UNNAMED_MODULE" -) -package ch.tutteli.atrium.api.fluent.en_GB.jdk8 - -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.domain.builders.ExpectImpl -import ch.tutteli.atrium.logic._logic -import ch.tutteli.atrium.logic.changeSubject -import java.io.File -import java.nio.file.Path - -/** - * Turns `Expect` into `Expect`. - * - * The transformation as such is not reflected in reporting. - * Use `feature(File::toPath)` if you want to show the transformation in reporting. - * - * @return The newly created [Expect] for the transformed subject. - * - * @since 0.9.0 - */ -@Deprecated( - "Use the function from the normal jvm module; the jdk8 extension will be removed with 1.0.0", - ReplaceWith("this.asPath()", "ch.tutteli.atrium.api.fluent.en_GB.asPath") -) -fun Expect.asPath(): Expect = - _logic.changeSubject.unreported { it.toPath() } - -/** - * Expects that the subject of the assertion holds all assertions the given [assertionCreator] creates for - * the subject as [Path]. - * - * The transformation as such is not reflected in reporting. - * Use `feature(File::toPath, assertionCreator)` if you want to show the transformation in reporting. - * - * @return An [Expect] for the current subject of the assertion. - * - * @since 0.9.0 - */ -@Suppress("DEPRECATION") -@Deprecated( - "Use the function from the normal jvm module; the jdk8 extension will be removed with 1.0.0", - ReplaceWith("this.asPath()", "ch.tutteli.atrium.api.fluent.en_GB.asPath") -) -fun Expect.asPath(assertionCreator: Expect.() -> Unit): Expect = - apply { asPath().addAssertionsCreatedBy(assertionCreator) } diff --git a/misc/deprecated/apis/fluent-en_GB-jdk8/atrium-api-fluent-en_GB-jdk8-jvm/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/jdk8/localDateAssertions.kt b/misc/deprecated/apis/fluent-en_GB-jdk8/atrium-api-fluent-en_GB-jdk8-jvm/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/jdk8/localDateAssertions.kt deleted file mode 100644 index c9f3db1c7..000000000 --- a/misc/deprecated/apis/fluent-en_GB-jdk8/atrium-api-fluent-en_GB-jdk8-jvm/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/jdk8/localDateAssertions.kt +++ /dev/null @@ -1,145 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress( - "DEPRECATION", - /* TODO remove once https://youtrack.jetbrains.com/issue/KT-35343 is fixed */ - "JAVA_MODULE_DOES_NOT_READ_UNNAMED_MODULE", - /* remove once https://youtrack.jetbrains.com/issue/KT-34257 is fixed */ - "FINAL_UPPER_BOUND" -) - -package ch.tutteli.atrium.api.fluent.en_GB.jdk8 - -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.domain.builders.ExpectImpl -import ch.tutteli.atrium.domain.builders.localDate -import java.time.DayOfWeek -import java.time.LocalDate - -/** - * Creates an [Expect] for the property [LocalDate.year][LocalDate.getYear] of the subject of the assertion, - * so that further fluent calls are assertions about it. - * - * @return The newly created [Expect] for the extracted feature. - * - * @since 0.9.0 - */ -@Deprecated( - "Use the function from the normal jvm module; the jdk8 extension will be removed with 1.0.0", - ReplaceWith("this.year","ch.tutteli.atrium.api.fluent.en_GB.year") -) -val Expect.year: Expect - get() = ExpectImpl.localDate.year(this).getExpectOfFeature() - -/** - * Expects that the property [LocalDate.year][LocalDate.getYear]of the subject of the assertion - * holds all assertions the given [assertionCreator] creates for it and - * returns an [Expect] for the current subject of the assertion. - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - * - * @since 0.9.0 - */ -@Deprecated( - "Use the function from the normal jvm module; the jdk8 extension will be removed with 1.0.0", - ReplaceWith("this.year(assertionCreator)","ch.tutteli.atrium.api.fluent.en_GB.year") -) -fun Expect.year(assertionCreator: Expect.() -> Unit): Expect = - ExpectImpl.localDate.year(this).addToInitial(assertionCreator) - -/** - * Creates an [Expect] for the property [LocalDate.monthValue][LocalDate.getMonthValue] of the subject of the assertion, - * so that further fluent calls are assertions about it. - * - * @return The newly created [Expect] for the extracted feature. - * - * @since 0.9.0 - */ -@Deprecated( - "Use the function from the normal jvm module; the jdk8 extension will be removed with 1.0.0", - ReplaceWith("this.month","ch.tutteli.atrium.api.fluent.en_GB.month") -) -val Expect.month: Expect - get() = ExpectImpl.localDate.month(this).getExpectOfFeature() - -/** - * Expects that the property [LocalDate.monthValue][LocalDate.getMonthValue] of the subject of the assertion - * holds all assertions the given [assertionCreator] creates for it and - * returns an [Expect] for the current subject of the assertion. - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - * - * @since 0.9.0 - */ -@Deprecated( - "Use the function from the normal jvm module; the jdk8 extension will be removed with 1.0.0", - ReplaceWith("this.month(assertionCreator)","ch.tutteli.atrium.api.fluent.en_GB.month") -) -fun Expect.month(assertionCreator: Expect.() -> Unit): Expect = - ExpectImpl.localDate.month(this).addToInitial(assertionCreator) - -/** - * Creates an [Expect] for the property [LocalDate.getDayOfWeek] of the subject of the assertion, - * so that further fluent calls are assertions about it. - * - * @return The newly created [Expect] for the extracted feature. - * - * @since 0.9.0 - */ -@Deprecated( - "Use the function from the normal jvm module; the jdk8 extension will be removed with 1.0.0", - ReplaceWith("this.dayOfWeek","ch.tutteli.atrium.api.fluent.en_GB.dayOfWeek") -) -val Expect.dayOfWeek: Expect - get() = ExpectImpl.localDate.dayOfWeek(this).getExpectOfFeature() - -/** - * Expects that the property [LocalDate.getDayOfWeek] of the subject of the assertion - * holds all assertions the given [assertionCreator] creates for it and - * returns an [Expect] for the current subject of the assertion. - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - * - * @since 0.9.0 - */ -@Deprecated( - "Use the function from the normal jvm module; the jdk8 extension will be removed with 1.0.0", - ReplaceWith("this.dayOfWeek(assertionCreator)", "ch.tutteli.atrium.api.fluent.en_GB.dayOfWeek") -) -fun Expect.dayOfWeek(assertionCreator: Expect.() -> Unit): Expect = - ExpectImpl.localDate.dayOfWeek(this).addToInitial(assertionCreator) - - -/** - * Creates an [Expect] for the property [LocalDate.dayOfMonth][LocalDate.getDayOfMonth] of the subject of the assertion, - * so that further fluent calls are assertions about it. - * - * @return The newly created [Expect] for the extracted feature. - * - * @since 0.9.0 - */ -@Deprecated( - "Use the function from the normal jvm module; the jdk8 extension will be removed with 1.0.0", - ReplaceWith("this.day", "ch.tutteli.atrium.api.fluent.en_GB.day") -) -val Expect.day: Expect - get() = ExpectImpl.localDate.day(this).getExpectOfFeature() - -/** - * Expects that the property [LocalDate.dayOfMonth][LocalDate.getDayOfMonth] of the subject of the assertion - * holds all assertions the given [assertionCreator] creates for it and - * returns an [Expect] for the current subject of the assertion. - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - * - * @since 0.9.0 - */ -@Deprecated( - "Use the function from the normal jvm module; the jdk8 extension will be removed with 1.0.0", - ReplaceWith("this.day(assertionCreator)","ch.tutteli.atrium.api.fluent.en_GB.day") -) -fun Expect.day(assertionCreator: Expect.() -> Unit): Expect = - ExpectImpl.localDate.day(this).addToInitial(assertionCreator) diff --git a/misc/deprecated/apis/fluent-en_GB-jdk8/atrium-api-fluent-en_GB-jdk8-jvm/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/jdk8/localDateTimeAssertions.kt b/misc/deprecated/apis/fluent-en_GB-jdk8/atrium-api-fluent-en_GB-jdk8-jvm/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/jdk8/localDateTimeAssertions.kt deleted file mode 100644 index b12557512..000000000 --- a/misc/deprecated/apis/fluent-en_GB-jdk8/atrium-api-fluent-en_GB-jdk8-jvm/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/jdk8/localDateTimeAssertions.kt +++ /dev/null @@ -1,145 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress( - "DEPRECATION", - /* TODO remove once https://youtrack.jetbrains.com/issue/KT-35343 is fixed */ - "JAVA_MODULE_DOES_NOT_READ_UNNAMED_MODULE", - /* remove once https://youtrack.jetbrains.com/issue/KT-34257 is fixed */ - "FINAL_UPPER_BOUND" -) - -package ch.tutteli.atrium.api.fluent.en_GB.jdk8 - -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.domain.builders.ExpectImpl -import ch.tutteli.atrium.domain.builders.localDateTime -import java.time.DayOfWeek -import java.time.LocalDateTime - -/** - * Creates an [Expect] for the property [LocalDateTime.year][[LocalDateTime.getYear] of the subject of the assertion, - * so that further fluent calls are assertions about it. - * - * @return The newly created [Expect] for the extracted feature. - * - * @since 0.9.0 - */ -@Deprecated( - "Use the function from the normal jvm module; the jdk8 extension will be removed with 1.0.0", - ReplaceWith("this.year", "ch.tutteli.atrium.api.fluent.en_GB.year") -) -val Expect.year: Expect - get() = ExpectImpl.localDateTime.year(this).getExpectOfFeature() - -/** - * Expects that the property [LocalDateTime.year][LocalDateTime.getYear] of the subject of the assertion - * holds all assertions the given [assertionCreator] creates for it and - * returns an [Expect] for the current subject of the assertion. - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - * - * @since 0.9.0 - */ -@Deprecated( - "Use the function from the normal jvm module; the jdk8 extension will be removed with 1.0.0", - ReplaceWith("this.year(assertionCreator)", "this.year(assertionCreator)", "ch.tutteli.atrium.api.fluent.en_GB.year") -) -fun Expect.year(assertionCreator: Expect.() -> Unit): Expect = - ExpectImpl.localDateTime.year(this).addToInitial(assertionCreator) - -/** - * Creates an [Expect] for the property [LocalDateTime.monthValue][LocalDateTime.getMonthValue] - * of the subject of the assertion, so that further fluent calls are assertions about it. - * - * @return The newly created [Expect] for the extracted feature. - * - * @since 0.9.0 - */ -@Deprecated( - "Use the function from the normal jvm module; the jdk8 extension will be removed with 1.0.0", - ReplaceWith("this.month", "ch.tutteli.atrium.api.fluent.en_GB.month") -) -val Expect.month: Expect - get() = ExpectImpl.localDateTime.month(this).getExpectOfFeature() - -/** - * Expects that the property [LocalDateTime.monthValue][LocalDateTime.getMonthValue]of the subject of the assertion - * holds all assertions the given [assertionCreator] creates for it and - * returns an [Expect] for the current subject of the assertion. - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - * - * @since 0.9.0 - */ -@Deprecated( - "Use the function from the normal jvm module; the jdk8 extension will be removed with 1.0.0", - ReplaceWith("this.month(assertionCreator)", "ch.tutteli.atrium.api.fluent.en_GB.month") -) -fun Expect.month(assertionCreator: Expect.() -> Unit): Expect = - ExpectImpl.localDateTime.month(this).addToInitial(assertionCreator) - -/** - * Creates an [Expect] for the property [LocalDateTime.dayOfWeek][LocalDateTime.getDayOfWeek] - * of the subject of the assertion, so that further fluent calls are assertions about it. - * - * @return The newly created [Expect] for the extracted feature. - * - * @since 0.9.0 - */ -@Deprecated( - "Use the function from the normal jvm module; the jdk8 extension will be removed with 1.0.0", - ReplaceWith("this.dayOfWeek", "ch.tutteli.atrium.api.fluent.en_GB.dayOfWeek") -) -val Expect.dayOfWeek: Expect - get() = ExpectImpl.localDateTime.dayOfWeek(this).getExpectOfFeature() - -/** - * Expects that the property [LocalDateTime.dayOfWeek][LocalDateTime.getDayOfWeek]of the subject of the assertion - * holds all assertions the given [assertionCreator] creates for it and - * returns an [Expect] for the current subject of the assertion. - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - * - * @since 0.9.0 - */ -@Deprecated( - "Use the function from the normal jvm module; the jdk8 extension will be removed with 1.0.0", - ReplaceWith("this.dayOfWeek(assertionCreator)", "ch.tutteli.atrium.api.fluent.en_GB.dayOfWeek") -) -fun Expect.dayOfWeek(assertionCreator: Expect.() -> Unit): Expect = - ExpectImpl.localDateTime.dayOfWeek(this).addToInitial(assertionCreator) - -/** - * Creates an [Expect] for the property [LocalDateTime.dayOfMonth][LocalDateTime.getDayOfMonth] - * of the subject of the assertion, so that further fluent calls are assertions about it. - * - * @return The newly created [Expect] for the extracted feature. - * - * @since 0.9.0 - */ -@Deprecated( - "Use the function from the normal jvm module; the jdk8 extension will be removed with 1.0.0", - ReplaceWith("this.day", "ch.tutteli.atrium.api.fluent.en_GB.day") -) -val Expect.day: Expect - get() = ExpectImpl.localDateTime.day(this).getExpectOfFeature() - -/** - * Expects that the property [LocalDateTime.dayOfMonth][LocalDateTime.getDayOfMonth] of the subject of the assertion - * holds all assertions the given [assertionCreator] creates for it and - * returns an [Expect] for the current subject of the assertion. - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - * - * @since 0.9.0 - */ -@Deprecated( - "Use the function from the normal jvm module; the jdk8 extension will be removed with 1.0.0", - ReplaceWith("this.day(assertionCreator)", "ch.tutteli.atrium.api.fluent.en_GB.day") -) -fun Expect.day(assertionCreator: Expect.() -> Unit): Expect = - ExpectImpl.localDateTime.day(this).addToInitial(assertionCreator) - diff --git a/misc/deprecated/apis/fluent-en_GB-jdk8/atrium-api-fluent-en_GB-jdk8-jvm/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/jdk8/optionalAssertions.kt b/misc/deprecated/apis/fluent-en_GB-jdk8/atrium-api-fluent-en_GB-jdk8-jvm/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/jdk8/optionalAssertions.kt deleted file mode 100644 index 943abbf7d..000000000 --- a/misc/deprecated/apis/fluent-en_GB-jdk8/atrium-api-fluent-en_GB-jdk8-jvm/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/jdk8/optionalAssertions.kt +++ /dev/null @@ -1,63 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress( - "DEPRECATION", - /* TODO remove once https://youtrack.jetbrains.com/issue/KT-35343 is fixed */ - "JAVA_MODULE_DOES_NOT_READ_UNNAMED_MODULE" -) -package ch.tutteli.atrium.api.fluent.en_GB.jdk8 - -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.domain.builders.ExpectImpl -import ch.tutteli.atrium.domain.builders.optional -import java.util.* - -/** - * Expects that the subject of the assertion (an [Optional]) is empty (not present). - * - * Shortcut for more or less something like `feature(Optional::isEmpty) { toBe(true) }` - * depends on the underlying implementation though. - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - * - * @since 0.9.0 - */ -@Deprecated( - "Use the function from the normal jvm module; the jdk8 extension will be removed with 1.0.0", - ReplaceWith("this.isEmpty()","ch.tutteli.atrium.api.fluent.en_GB.isEmpty") -) -fun > Expect.isEmpty(): Expect = addAssertion(ExpectImpl.optional.isEmpty(this)) - -/** - * Expects that the subject of the assertion (an [Optional]) is present - * and returns an [Expect] for the inner type [E]. - * - * Shortcut for more or less something like `feature(Optional::get)` but with error handling; yet it - * depends on the underlying implementation though. - * - * @return The newly created [Expect] for the inner type [E]. - * @throws AssertionError Might throw an [AssertionError] if the given assertion is not a success. - * - * @since 0.9.0 - */ -@Deprecated( - "Use the function from the normal jvm module; the jdk8 extension will be removed with 1.0.0", - ReplaceWith("this.isPresent()","ch.tutteli.atrium.api.fluent.en_GB.isPresent") -) -fun > Expect.isPresent(): Expect = ExpectImpl.optional.isPresent(this).getExpectOfFeature() - -/** - * Expects that the subject of the assertion (an [Optional]) is present and - * that it holds all assertions the given [assertionCreator] creates. - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the given assertions are not success. - * - * @since 0.9.0 - */ -@Deprecated( - "Use the function from the normal jvm module; the jdk8 extension will be removed with 1.0.0", - ReplaceWith("this.isPresent(assertionCreator)","ch.tutteli.atrium.api.fluent.en_GB.isPresent") -) -fun > Expect.isPresent(assertionCreator: Expect.() -> Unit): Expect = - ExpectImpl.optional.isPresent(this).addToInitial(assertionCreator) diff --git a/misc/deprecated/apis/fluent-en_GB-jdk8/atrium-api-fluent-en_GB-jdk8-jvm/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/jdk8/pathAssertions.kt b/misc/deprecated/apis/fluent-en_GB-jdk8/atrium-api-fluent-en_GB-jdk8-jvm/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/jdk8/pathAssertions.kt deleted file mode 100644 index d353fd612..000000000 --- a/misc/deprecated/apis/fluent-en_GB-jdk8/atrium-api-fluent-en_GB-jdk8-jvm/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/jdk8/pathAssertions.kt +++ /dev/null @@ -1,412 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress( - "DEPRECATION", - /* TODO remove once https://youtrack.jetbrains.com/issue/KT-35343 is fixed */ - "JAVA_MODULE_DOES_NOT_READ_UNNAMED_MODULE" -) -package ch.tutteli.atrium.api.fluent.en_GB.jdk8 - -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.domain.builders.ExpectImpl -import ch.tutteli.atrium.domain.builders.path -import java.nio.charset.Charset -import java.nio.file.Path - -/** - * Expects that the subject of the assertion (a [Path]) starts with the [expected] [Path]. - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - * - * @since 0.9.0 - */ -@Deprecated( - "Use the function from the normal jvm module; the jdk8 extension will be removed with 1.0.0", - ReplaceWith("this.startsWith(expected)", "ch.tutteli.atrium.api.fluent.en_GB.startsWith") -) -fun Expect.startsWith(expected: Path): Expect = - addAssertion(ExpectImpl.path.startsWith(this, expected)) - -/** - * Expects that the subject of the assertion (a [Path]) does not start with the [expected] [Path]. - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - * - * @since 0.9.0 - */ -@Deprecated( - "Use the function from the normal jvm module; the jdk8 extension will be removed with 1.0.0", - ReplaceWith("this.startsNotWith(expected)", "ch.tutteli.atrium.api.fluent.en_GB.startsNotWith") -) -fun Expect.startsNotWith(expected: Path): Expect = - addAssertion(ExpectImpl.path.startsNotWith(this, expected)) - -/** - * Expects that the subject of the assertion (a [Path]) ends with the expected [Path]. - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - * - * @since 0.9.0 - */ -@Deprecated( - "Use the function from the normal jvm module; the jdk8 extension will be removed with 1.0.0", - ReplaceWith("this.endsWith(expected)", "ch.tutteli.atrium.api.fluent.en_GB.endsWith") -) -fun Expect.endsWith(expected: Path): Expect = - addAssertion(ExpectImpl.path.endsWith(this, expected)) - -/** - * Expects that the subject of the assertion (a [Path]) does not end with the expected [Path]; - * - * @param expected The [Path] provided to the assertion - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - * - * @since 0.9.0 - */ -@Deprecated( - "Use the function from the normal jvm module; the jdk8 extension will be removed with 1.0.0", - ReplaceWith("this.endsNotWith(expected)", "ch.tutteli.atrium.api.fluent.en_GB.endsNotWith") -) -fun Expect.endsNotWith(expected: Path): Expect = - addAssertion(ExpectImpl.path.endsNotWith(this, expected)) - -/** - * Expects that the subject of the assertion (a [Path]) exists; - * meaning that there is a file system entry at the location the [Path] points to. - * - * This matcher _resolves_ symbolic links. Therefore, if a symbolic link exists at the location the subject points to, - * then the search will continue at that location. - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - * - * @since 0.9.0 - */ -@Deprecated( - "Use the function from the normal jvm module; the jdk8 extension will be removed with 1.0.0", - ReplaceWith("this.exists()", "ch.tutteli.atrium.api.fluent.en_GB.exists") -) -fun Expect.exists(): Expect = addAssertion(ExpectImpl.path.exists(this)) - -/** - * Expects that the subject of the assertion (a [Path]) does not exist; - * meaning that there is no file system entry at the location the [Path] points to. - * - * This matcher _resolves_ symbolic links. Therefore, if a symbolic link exists at the location the subject points to, - * then the search will continue at that location. - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - * - * @since 0.9.0 - */ -@Deprecated( - "Use the function from the normal jvm module; the jdk8 extension will be removed with 1.0.0", - ReplaceWith("this.existsNot()", "ch.tutteli.atrium.api.fluent.en_GB.existsNot") -) -fun Expect.existsNot(): Expect = addAssertion(ExpectImpl.path.existsNot(this)) - -/** - * Creates an [Expect] for the property [Path.fileNameAsString][ch.tutteli.niok.fileNameAsString] - * (provided via [niok](https://github.com/robstoll/niok)) of the subject of the assertion, - * so that further fluent calls are assertions about it. - * - * @return The newly created [Expect] for the extracted feature. - * - * @since 0.9.0 - */ -@Deprecated( - "Use the function from the normal jvm module; the jdk8 extension will be removed with 1.0.0", - ReplaceWith("this.fileName", "ch.tutteli.atrium.api.fluent.en_GB.fileName") -) -val Expect.fileName: Expect - get() = ExpectImpl.path.fileName(this).getExpectOfFeature() - -/** - * Expects that the property [Path.fileNameAsString][ch.tutteli.niok.fileNameAsString] - * (provided via [niok](https://github.com/robstoll/niok)) of the subject of the assertion - * holds all assertions the given [assertionCreator] creates for it and - * returns an [Expect] for the current subject of the assertion. - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - * - * @since 0.9.0 - */ -@Deprecated( - "Use the function from the normal jvm module; the jdk8 extension will be removed with 1.0.0", - ReplaceWith("this.fileName(assertionCreator)", "ch.tutteli.atrium.api.fluent.en_GB.fileName") -) -fun Expect.fileName(assertionCreator: Expect.() -> Unit): Expect = - ExpectImpl.path.fileName(this).addToInitial(assertionCreator) - -/** - * Creates an [Expect] for the property [Path.fileNameWithoutExtension][ch.tutteli.niok.fileNameWithoutExtension] - * (provided via [niok](https://github.com/robstoll/niok)) of the subject of the assertion, - * so that further fluent calls are assertions about it. - * - * @return The newly created [Expect] for the extracted feature. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - * - * @since 0.9.0 - */ -@Deprecated( - "Use the function from the normal jvm module; the jdk8 extension will be removed with 1.0.0", - ReplaceWith("this.fileNameWithoutExtension", "ch.tutteli.atrium.api.fluent.en_GB.fileNameWithoutExtension") -) -val Expect.fileNameWithoutExtension: Expect - get() = ExpectImpl.path.fileNameWithoutExtension(this).getExpectOfFeature() - -/** - * Expects that the property [Path.fileNameWithoutExtension][ch.tutteli.niok.fileNameWithoutExtension] - * (provided via [niok](https://github.com/robstoll/niok)) - * of the subject of the assertion holds all assertions the given [assertionCreator] creates for it - * and returns an [Expect] for the current subject of the assertion. - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - * - * @since 0.9.0 - */ -@Deprecated( - "Use the function from the normal jvm module; the jdk8 extension will be removed with 1.0.0", - ReplaceWith( - "this.fileNameWithoutExtension(assertionCreator)", - "ch.tutteli.atrium.api.fluent.en_GB.fileNameWithoutExtension" - ) -) -fun Expect.fileNameWithoutExtension(assertionCreator: Expect.() -> Unit): Expect = - ExpectImpl.path.fileNameWithoutExtension(this).addToInitial(assertionCreator) - -/** - * Expects that this [Path] has a [parent][Path.getParent] and creates an [Expect] for it, - * so that further fluent calls are assertions about it. - * - * @return The newly created [Expect] for the extracted feature. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - * - * @since 0.9.0 - */ -@Deprecated( - "Use the function from the normal jvm module; the jdk8 extension will be removed with 1.0.0", - ReplaceWith("this.parent", "ch.tutteli.atrium.api.fluent.en_GB.parent") -) -val Expect.parent: Expect - get() = ExpectImpl.path.parent(this).getExpectOfFeature() - -/** - * Expects that this [Path] has a [parent][Path.getParent], that the parent holds all assertions the - * given [assertionCreator] creates for it and returns an [Expect] for the current subject of the assertion. - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - * - * @since 0.9.0 - */ -@Deprecated( - "Use the function from the normal jvm module; the jdk8 extension will be removed with 1.0.0", - ReplaceWith("this.parent(assertionCreator)", "ch.tutteli.atrium.api.fluent.en_GB.parent") -) -fun Expect.parent(assertionCreator: Expect.() -> Unit): Expect = - ExpectImpl.path.parent(this).addToInitial(assertionCreator) - -/** - * Expects that [other] resolves against this [Path] and creates an [Expect] for the resolved [Path] - * so that further fluent calls are assertions about it. - * - * @return The newly created [Expect] for the extracted feature. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - * - * @since 0.10.0 - */ -@Deprecated( - "Use the function from the normal jvm module; the jdk8 extension will be removed with 1.0.0", - ReplaceWith("this.resolve(other)", "ch.tutteli.atrium.api.fluent.en_GB.resolve") -) -fun Expect.resolve(other: String): Expect = - ExpectImpl.path.resolve(this, other).getExpectOfFeature() - -/** - * Expects that [other] resolves against this [Path], that the resolved [Path] holds all assertions the - * given [assertionCreator] creates for it and returns an [Expect] for the current subject of the assertion. - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - * - * @since 0.10.0 - */ -@Deprecated( - "Use the function from the normal jvm module; the jdk8 extension will be removed with 1.0.0", - ReplaceWith("resolve(other, assertionCreator)", "ch.tutteli.atrium.api.fluent.en_GB.resolve") -) -fun Expect.resolve(other: String, assertionCreator: Expect.() -> Unit): Expect = - ExpectImpl.path.resolve(this, other).addToInitial(assertionCreator) - -/** - * Expects that the subject of the assertion (a [Path]) is readable; - * meaning that there is a file system entry at the location the [Path] points to and - * that the current thread has the permission to read from it. - * - * This matcher _resolves_ symbolic links. - * Therefore, if a symbolic link exists at the location the subject points to, - * search will continue at the location the link points at. - * - * This assertion is not atomic with respect to concurrent file system operations on the paths the assertion works on. - * Its result, in particular its extended explanations, may be wrong if such concurrent file system operations - * take place. - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - * - * @since 0.9.0 - */ -@Deprecated( - "Use the function from the normal jvm module; the jdk8 extension will be removed with 1.0.0", - ReplaceWith("this.isReadable()", "ch.tutteli.atrium.api.fluent.en_GB.isReadable") -) -fun Expect.isReadable(): Expect = addAssertion(ExpectImpl.path.isReadable(this)) - -/** - * Expects that the subject of the assertion (a [Path]) is writable; - * meaning that there is a file system entry at the location the [Path] points to and - * that the current thread has the permission to write to it. - * - * This matcher _resolves_ symbolic links. - * Therefore, if a symbolic link exists at the location the subject points to, search will continue - * at the location the link points at. - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - * - * @since 0.9.0 - */ -@Deprecated( - "Use the function from the normal jvm module; the jdk8 extension will be removed with 1.0.0", - ReplaceWith("this.isWritable()", "ch.tutteli.atrium.api.fluent.en_GB.isWritable") -) -fun Expect.isWritable(): Expect = addAssertion(ExpectImpl.path.isWritable(this)) - -/** - * Expects that the subject of the assertion (a [Path]) is a file; - * meaning that there is a file system entry at the location the [Path] points to and that is a regular file. - * - * This matcher _resolves_ symbolic links. - * Therefore, if a symbolic link exists at the location the subject points to, search will continue - * at the location the link points at. - * - * This assertion is not atomic with respect to concurrent file system operations on the paths the assertion works on. - * Its result, in particular its extended explanations, may be wrong if such concurrent file system operations - * take place. - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - * - * @since 0.9.0 - */ -@Deprecated( - "Use the function from the normal jvm module; the jdk8 extension will be removed with 1.0.0", - ReplaceWith("this.isRegularFile()", "ch.tutteli.atrium.api.fluent.en_GB.isRegularFile") -) -fun Expect.isRegularFile(): Expect = addAssertion(ExpectImpl.path.isRegularFile(this)) - -/** - * Expects that the subject of the assertion (a [Path]) is a directory; - * meaning that there is a file system entry at the location the [Path] points to and that is a directory. - * - * This matcher _resolves_ symbolic links. - * Therefore, if a symbolic link exists at the location the subject points to, search will continue - * at the location the link points at. - * - * This assertion is not atomic with respect to concurrent file system operations on the paths the assertion works on. - * Its result, in particular its extended explanations, may be wrong if such concurrent file system operations - * take place. - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - * - * @since 0.9.0 - */ -@Deprecated( - "Use the function from the normal jvm module; the jdk8 extension will be removed with 1.0.0", - ReplaceWith("this.isDirectory()", "ch.tutteli.atrium.api.fluent.en_GB.isDirectory") -) -fun Expect.isDirectory(): Expect = addAssertion(ExpectImpl.path.isDirectory(this)) - -/** - * Creates an [Expect] for the property [Path.extension][ch.tutteli.niok.extension] - * (provided via [niok](https://github.com/robstoll/niok)) of the subject of the assertion, - * so that further fluent calls are assertions about it. - * - * @return The newly created [Expect] for the extracted feature. - * - * @since 0.9.0 - */ -@Deprecated( - "Use the function from the normal jvm module; the jdk8 extension will be removed with 1.0.0", - ReplaceWith("this.extension", "ch.tutteli.atrium.api.fluent.en_GB.extension") -) -val Expect.extension: Expect - get() = ExpectImpl.path.extension(this).getExpectOfFeature() - -/** - * Expects that the property [Path.extension][ch.tutteli.niok.extension] - * (provided via [niok](https://github.com/robstoll/niok)) of the subject of the assertion - * holds all assertions the given [assertionCreator] creates for it and - * returns an [Expect] for the current subject of the assertion. - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - * - * @since 0.9.0 - */ -@Deprecated( - "Use the function from the normal jvm module; the jdk8 extension will be removed with 1.0.0", - ReplaceWith("this.extension(assertionCreator)", "ch.tutteli.atrium.api.fluent.en_GB.extension") -) -fun Expect.extension(assertionCreator: Expect.() -> Unit): Expect = - ExpectImpl.path.extension(this).addToInitial(assertionCreator) - -/** - * Expects that the subject of the assertion (a [Path]) has the same textual content - * as [targetPath]. - * - * @param sourceCharset source file encoding - UTF-8 per default. - * @param targetCharset target file encoding - UTF-8 per default. - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - * - * @since 0.12.0 - */ -@Deprecated( - "Use the function from the normal jvm module; the jdk8 extension will be removed with 1.0.0", - ReplaceWith( - "this.hasSameTextualContentAs(targetPath, sourceCharset, targetCharset)", - "ch.tutteli.atrium.api.fluent.en_GB.hasSameTextualContentAs" - ) -) -fun Expect.hasSameTextualContentAs( - targetPath: Path, - sourceCharset: Charset = Charsets.UTF_8, - targetCharset: Charset = Charsets.UTF_8 -): Expect = - addAssertion(ExpectImpl.path.hasSameTextualContentAs(this, targetPath, sourceCharset, targetCharset)) - -/** - * Expects that the subject of the assertion (a [Path]) has the same binary content - * as [targetPath]. - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - * - * @since 0.12.0 - */ -@Deprecated( - "Use the function from the normal jvm module; the jdk8 extension will be removed with 1.0.0", - ReplaceWith("this.hasSameBinaryContentAs(targetPath)", "ch.tutteli.atrium.api.fluent.en_GB.hasSameBinaryContentAs") -) -fun Expect.hasSameBinaryContentAs(targetPath: Path): Expect = - addAssertion(ExpectImpl.path.hasSameBinaryContentAs(this, targetPath)) diff --git a/misc/deprecated/apis/fluent-en_GB-jdk8/atrium-api-fluent-en_GB-jdk8-jvm/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/jdk8/zonedDateTimeAssertions.kt b/misc/deprecated/apis/fluent-en_GB-jdk8/atrium-api-fluent-en_GB-jdk8-jvm/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/jdk8/zonedDateTimeAssertions.kt deleted file mode 100644 index 7239c1f12..000000000 --- a/misc/deprecated/apis/fluent-en_GB-jdk8/atrium-api-fluent-en_GB-jdk8-jvm/src/main/kotlin/ch/tutteli/atrium/api/fluent/en_GB/jdk8/zonedDateTimeAssertions.kt +++ /dev/null @@ -1,144 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress( - "DEPRECATION", - /* TODO remove once https://youtrack.jetbrains.com/issue/KT-35343 is fixed */ - "JAVA_MODULE_DOES_NOT_READ_UNNAMED_MODULE", - /* remove once https://youtrack.jetbrains.com/issue/KT-34257 is fixed */ - "FINAL_UPPER_BOUND" -) - -package ch.tutteli.atrium.api.fluent.en_GB.jdk8 - -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.domain.builders.ExpectImpl -import ch.tutteli.atrium.domain.builders.zonedDateTime -import java.time.DayOfWeek -import java.time.ZonedDateTime - -/** - * Creates an [Expect] for the property [ZonedDateTime.year][ZonedDateTime.getYear] of the subject of the assertion, - * so that further fluent calls are assertions about it. - * - * @return The newly created [Expect] for the extracted feature. - * - * @since 0.9.0 - */ -@Deprecated( - "Use the function from the normal jvm module; the jdk8 extension will be removed with 1.0.0", - ReplaceWith("this.year", "ch.tutteli.atrium.api.fluent.en_GB.year") -) -val Expect.year: Expect - get() = ExpectImpl.zonedDateTime.year(this).getExpectOfFeature() - -/** - * Expects that the property [ZonedDateTime.year][ZonedDateTime.getYear] of the subject of the assertion - * holds all assertions the given [assertionCreator] creates for it and - * returns an [Expect] for the current subject of the assertion. - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - * - * @since 0.9.0 - */ -@Deprecated( - "Use the function from the normal jvm module; the jdk8 extension will be removed with 1.0.0", - ReplaceWith("this.year(assertionCreator)", "ch.tutteli.atrium.api.fluent.en_GB.year") -) -fun Expect.year(assertionCreator: Expect.() -> Unit): Expect = - ExpectImpl.zonedDateTime.year(this).addToInitial(assertionCreator) - -/** - * Creates an [Expect] for the property [ZonedDateTime.monthValue][ZonedDateTime.getMonthValue] - * of the subject of the assertion, so that further fluent calls are assertions about it. - * - * @return The newly created [Expect] for the extracted feature. - * - * @since 0.9.0 - */ -@Deprecated( - "Use the function from the normal jvm module; the jdk8 extension will be removed with 1.0.0", - ReplaceWith("this.month", "ch.tutteli.atrium.api.fluent.en_GB.month") -) -val Expect.month: Expect - get() = ExpectImpl.zonedDateTime.month(this).getExpectOfFeature() - -/** - * Expects that the property [ZonedDateTime.monthValue][ZonedDateTime.getMonthValue] of the subject of the assertion - * holds all assertions the given [assertionCreator] creates for it and - * returns an [Expect] for the current subject of the assertion. - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - * - * @since 0.9.0 - */ -@Deprecated( - "Use the function from the normal jvm module; the jdk8 extension will be removed with 1.0.0", - ReplaceWith("this.month(assertionCreator)", "ch.tutteli.atrium.api.fluent.en_GB.month") -) -fun Expect.month(assertionCreator: Expect.() -> Unit): Expect = - ExpectImpl.zonedDateTime.month(this).addToInitial(assertionCreator) - -/** - * Creates an [Expect] for the property [ZonedDatetime.dayOfWeek][ZonedDateTime.getDayOfWeek] - * of the subject of the assertion, so that further fluent calls are assertions about it. - * - * @return The newly created [Expect] for the extracted feature. - * - * @since 0.9.0 - */ -@Deprecated( - "Use the function from the normal jvm module; the jdk8 extension will be removed with 1.0.0", - ReplaceWith("this.dayOfWeek", "ch.tutteli.atrium.api.fluent.en_GB.dayOfWeek") -) -val Expect.dayOfWeek: Expect - get() = ExpectImpl.zonedDateTime.dayOfWeek(this).getExpectOfFeature() - -/** - * Expects that the property [ZonedDatetime.dayOfWeek][ZonedDateTime.getDayOfWeek] of the subject of the assertion - * holds all assertions the given [assertionCreator] creates for it and - * returns an [Expect] for the current subject of the assertion. - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - * - * @since 0.9.0 - */ -@Deprecated( - "Use the function from the normal jvm module; the jdk8 extension will be removed with 1.0.0", - ReplaceWith("this.dayOfWeek(assertionCreator)", "ch.tutteli.atrium.api.fluent.en_GB.dayOfWeek") -) -fun Expect.dayOfWeek(assertionCreator: Expect.() -> Unit): Expect = - ExpectImpl.zonedDateTime.dayOfWeek(this).addToInitial(assertionCreator) - -/** - * Creates an [Expect] for the property [ZonedDateTime.dayOfMonth][ZonedDateTime.getDayOfMonth] - * of the subject of the assertion, so that further fluent calls are assertions about it. - * - * @return The newly created [Expect] for the extracted feature. - * - * @since 0.9.0 - */ -@Deprecated( - "Use the function from the normal jvm module; the jdk8 extension will be removed with 1.0.0", - ReplaceWith("this.day", "ch.tutteli.atrium.api.fluent.en_GB.day") -) -val Expect.day: Expect - get() = ExpectImpl.zonedDateTime.day(this).getExpectOfFeature() - -/** - * Expects that the property [ZonedDateTime.dayOfMonth][ZonedDateTime.getDayOfMonth] of the subject of the assertion - * holds all assertions the given [assertionCreator] creates for it and - * returns an [Expect] for the current subject of the assertion. - * - * @return An [Expect] for the current subject of the assertion. - * @throws AssertionError Might throw an [AssertionError] if the assertion made is not correct. - * - * @since 0.9.0 - */ -@Deprecated( - "Use the function from the normal jvm module; the jdk8 extension will be removed with 1.0.0", - ReplaceWith("this.day(assertionCreator)", "ch.tutteli.atrium.api.fluent.en_GB.day") -) -fun Expect.day(assertionCreator: Expect.() -> Unit): Expect = - ExpectImpl.zonedDateTime.day(this).addToInitial(assertionCreator) diff --git a/misc/deprecated/apis/fluent-en_GB-jdk8/atrium-api-fluent-en_GB-jdk8-jvm/src/module/module-info.java b/misc/deprecated/apis/fluent-en_GB-jdk8/atrium-api-fluent-en_GB-jdk8-jvm/src/module/module-info.java deleted file mode 100644 index 709bf449c..000000000 --- a/misc/deprecated/apis/fluent-en_GB-jdk8/atrium-api-fluent-en_GB-jdk8-jvm/src/module/module-info.java +++ /dev/null @@ -1,10 +0,0 @@ -module ch.tutteli.atrium.api.fluent.en_GB.jdk8 { - requires ch.tutteli.atrium.api.fluent.en_GB; - requires ch.tutteli.atrium.domain.builders; - requires ch.tutteli.kbox; - requires ch.tutteli.niok; - requires kotlin.stdlib; - requires java.base; - - exports ch.tutteli.atrium.api.fluent.en_GB.jdk8; -} diff --git a/misc/deprecated/apis/fluent-en_GB-jdk8/atrium-api-fluent-en_GB-jdk8-jvm/src/test/kotlin/ch/tutteli/atrium/api/fluent/en_GB/jdk8/ChronoLocalDateAssertionsSpec.kt b/misc/deprecated/apis/fluent-en_GB-jdk8/atrium-api-fluent-en_GB-jdk8-jvm/src/test/kotlin/ch/tutteli/atrium/api/fluent/en_GB/jdk8/ChronoLocalDateAssertionsSpec.kt deleted file mode 100644 index 1f2d065e3..000000000 --- a/misc/deprecated/apis/fluent-en_GB-jdk8/atrium-api-fluent-en_GB-jdk8-jvm/src/test/kotlin/ch/tutteli/atrium/api/fluent/en_GB/jdk8/ChronoLocalDateAssertionsSpec.kt +++ /dev/null @@ -1,73 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.api.fluent.en_GB.jdk8 - -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.specs.fun1 -import ch.tutteli.atrium.specs.notImplemented -import org.spekframework.spek2.Spek -import java.time.LocalDate -import java.time.chrono.ChronoLocalDate -import java.time.chrono.JapaneseDate - -class ChronoLocalDateAssertionsSpec : Spek({ - include(ChronoLocalDateSpec) -}) { - object ChronoLocalDateSpec : ch.tutteli.atrium.specs.integration.ChronoLocalDateAssertionSpec( - fun1(Expect::isBefore), - fun1(Expect::isBeforeOrEqual), - fun1(Expect::isAfter), - fun1(Expect::isAfterOrEqual), - fun1(Expect::isEqual) - ) - - companion object { - fun isBefore(expect: Expect, expected: ChronoLocalDate): Expect = - //TODO #480 turn into string in ISO format - expect.isBefore(expected) - } - - @Suppress("unused", "UNUSED_VALUE") - private fun ambiguityTest() { - val chronoLocalDate: ChronoLocalDate = notImplemented() - var a1: Expect = notImplemented() - var a2: Expect = notImplemented() - - a1 = a1.isBefore(LocalDate.now()) - a1 = a1.isBeforeOrEqual(LocalDate.now()) - a1 = a1.isAfter(LocalDate.now()) - a1 = a1.isAfterOrEqual(LocalDate.now()) - a1 = a1.isEqual(LocalDate.now()) - - a2 = a2.isBefore(LocalDate.now()) - a2 = a2.isBeforeOrEqual(LocalDate.now()) - a2 = a2.isAfter(LocalDate.now()) - a2 = a2.isAfterOrEqual(LocalDate.now()) - a2 = a2.isEqual(LocalDate.now()) - - a1 = a1.isBefore(JapaneseDate.now()) - a1 = a1.isBeforeOrEqual(JapaneseDate.now()) - a1 = a1.isAfter(JapaneseDate.now()) - a1 = a1.isAfterOrEqual(JapaneseDate.now()) - a1 = a1.isEqual(JapaneseDate.now()) - - a2 = a2.isBefore(JapaneseDate.now()) - a2 = a2.isBeforeOrEqual(JapaneseDate.now()) - a2 = a2.isAfter(JapaneseDate.now()) - a2 = a2.isAfterOrEqual(JapaneseDate.now()) - a2 = a2.isEqual(JapaneseDate.now()) - - a1 = a1.isBefore(chronoLocalDate) - a1 = a1.isBeforeOrEqual(chronoLocalDate) - a1 = a1.isAfter(chronoLocalDate) - a1 = a1.isAfterOrEqual(chronoLocalDate) - a1 = a1.isEqual(chronoLocalDate) - - a2 = a2.isBefore(chronoLocalDate) - a2 = a2.isBeforeOrEqual(chronoLocalDate) - a2 = a2.isAfter(chronoLocalDate) - a2 = a2.isAfterOrEqual(chronoLocalDate) - a2 = a2.isEqual(chronoLocalDate) - } -} diff --git a/misc/deprecated/apis/fluent-en_GB-jdk8/atrium-api-fluent-en_GB-jdk8-jvm/src/test/kotlin/ch/tutteli/atrium/api/fluent/en_GB/jdk8/ChronoLocalDateTimeAssertionSpec.kt b/misc/deprecated/apis/fluent-en_GB-jdk8/atrium-api-fluent-en_GB-jdk8-jvm/src/test/kotlin/ch/tutteli/atrium/api/fluent/en_GB/jdk8/ChronoLocalDateTimeAssertionSpec.kt deleted file mode 100644 index 20bb7ce7a..000000000 --- a/misc/deprecated/apis/fluent-en_GB-jdk8/atrium-api-fluent-en_GB-jdk8-jvm/src/test/kotlin/ch/tutteli/atrium/api/fluent/en_GB/jdk8/ChronoLocalDateTimeAssertionSpec.kt +++ /dev/null @@ -1,92 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.api.fluent.en_GB.jdk8 - -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.specs.fun1 -import ch.tutteli.atrium.specs.notImplemented -import org.spekframework.spek2.Spek -import java.time.LocalDate -import java.time.LocalDateTime -import java.time.chrono.ChronoLocalDate -import java.time.chrono.ChronoLocalDateTime - -class ChronoLocalDateTimeAssertionSpec : Spek({ - include(ChronoLocalDateTimeSpec) -}) { - object ChronoLocalDateTimeSpec : ch.tutteli.atrium.specs.integration.ChronoLocalDateTimeAssertionSpec( - fun1(Expect>::isBefore), - fun1(Expect>::isBeforeOrEqual), - fun1(Expect>::isAfter), - fun1(Expect>::isAfterOrEqual), - fun1(Expect>::isEqual) - ) - - companion object { - fun isBefore( - expect: Expect>, - expected: ChronoLocalDateTime<*> - ): Expect> = - //TODO #481 turn into string in ISO format - expect.isBefore(expected) - } - - - @Suppress("unused", "UNUSED_VALUE") - private fun ambiguityTest() { - val chronoLocalDateTime: ChronoLocalDateTime<*> = notImplemented() - var a1: Expect> = notImplemented() - var a2: Expect> = notImplemented() - var a3: Expect> = notImplemented() - var a4: Expect = notImplemented() - - a1 = a1.isBefore(LocalDateTime.now()) - a1 = a1.isBeforeOrEqual(LocalDateTime.now()) - a1 = a1.isAfter(LocalDateTime.now()) - a1 = a1.isAfterOrEqual(LocalDateTime.now()) - a1 = a1.isEqual(LocalDateTime.now()) - - a2 = a2.isBefore(LocalDateTime.now()) - a2 = a2.isBeforeOrEqual(LocalDateTime.now()) - a2 = a2.isAfter(LocalDateTime.now()) - a2 = a2.isAfterOrEqual(LocalDateTime.now()) - a2 = a2.isEqual(LocalDateTime.now()) - - a3 = a3.isBefore(LocalDateTime.now()) - a3 = a3.isBeforeOrEqual(LocalDateTime.now()) - a3 = a3.isAfter(LocalDateTime.now()) - a3 = a3.isAfterOrEqual(LocalDateTime.now()) - a3 = a3.isEqual(LocalDateTime.now()) - - a4 = a4.isBefore(LocalDateTime.now()) - a4 = a4.isBeforeOrEqual(LocalDateTime.now()) - a4 = a4.isAfter(LocalDateTime.now()) - a4 = a4.isAfterOrEqual(LocalDateTime.now()) - a4 = a4.isEqual(LocalDateTime.now()) - - a1 = a1.isBefore(chronoLocalDateTime) - a1 = a1.isBeforeOrEqual(chronoLocalDateTime) - a1 = a1.isAfter(chronoLocalDateTime) - a1 = a1.isAfterOrEqual(chronoLocalDateTime) - a1 = a1.isEqual(chronoLocalDateTime) - - a2 = a2.isBefore(chronoLocalDateTime) - a2 = a2.isBeforeOrEqual(chronoLocalDateTime) - a2 = a2.isAfter(chronoLocalDateTime) - a2 = a2.isAfterOrEqual(chronoLocalDateTime) - a2 = a2.isEqual(chronoLocalDateTime) - - a3 = a3.isBefore(chronoLocalDateTime) - a3 = a3.isBeforeOrEqual(chronoLocalDateTime) - a3 = a3.isAfter(chronoLocalDateTime) - a3 = a3.isAfterOrEqual(chronoLocalDateTime) - a3 = a3.isEqual(chronoLocalDateTime) - - a4 = a4.isBefore(chronoLocalDateTime) - a4 = a4.isBeforeOrEqual(chronoLocalDateTime) - a4 = a4.isAfter(chronoLocalDateTime) - a4 = a4.isAfterOrEqual(chronoLocalDateTime) - a4 = a4.isEqual(chronoLocalDateTime) - } -} diff --git a/misc/deprecated/apis/fluent-en_GB-jdk8/atrium-api-fluent-en_GB-jdk8-jvm/src/test/kotlin/ch/tutteli/atrium/api/fluent/en_GB/jdk8/ChronoZonedDateTimeAssertionSpec.kt b/misc/deprecated/apis/fluent-en_GB-jdk8/atrium-api-fluent-en_GB-jdk8-jvm/src/test/kotlin/ch/tutteli/atrium/api/fluent/en_GB/jdk8/ChronoZonedDateTimeAssertionSpec.kt deleted file mode 100644 index 19fc2216a..000000000 --- a/misc/deprecated/apis/fluent-en_GB-jdk8/atrium-api-fluent-en_GB-jdk8-jvm/src/test/kotlin/ch/tutteli/atrium/api/fluent/en_GB/jdk8/ChronoZonedDateTimeAssertionSpec.kt +++ /dev/null @@ -1,93 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.api.fluent.en_GB.jdk8 - -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.specs.fun1 -import ch.tutteli.atrium.specs.notImplemented -import org.spekframework.spek2.Spek -import java.time.LocalDate -import java.time.ZonedDateTime -import java.time.chrono.ChronoLocalDate -import java.time.chrono.ChronoZonedDateTime - -class ChronoZonedDateTimeAssertionSpec : Spek({ - include(ChronoLocalDateTimeAssertionSpec.ChronoLocalDateTimeSpec) -}) { - object ChronoZonedDateTimeSpec : ch.tutteli.atrium.specs.integration.ChronoZonedDateTimeAssertionSpec( - fun1(Expect>::isBefore), - fun1(Expect>::isBeforeOrEqual), - fun1(Expect>::isAfter), - fun1(Expect>::isAfterOrEqual), - fun1(Expect>::isEqual) - ) - - companion object { - fun isBefore( - expect: Expect>, - expected: ChronoZonedDateTime<*> - ): Expect> = - //TODO #482 turn into string in ISO format - expect.isBefore(expected) - } - - @Suppress("unused", "UNUSED_VALUE") - private fun ambiguityTest() { - val chronoZonedDateTime: ChronoZonedDateTime<*> = notImplemented() - var a1: Expect> = notImplemented() - var a2: Expect> = notImplemented() - var a3: Expect> = notImplemented() - var a4: Expect = notImplemented() - - - a1 = a1.isBefore(ZonedDateTime.now()) - a1 = a1.isBeforeOrEqual(ZonedDateTime.now()) - a1 = a1.isAfter(ZonedDateTime.now()) - a1 = a1.isAfterOrEqual(ZonedDateTime.now()) - a1 = a1.isEqual(ZonedDateTime.now()) - - a2 = a2.isBefore(ZonedDateTime.now()) - a2 = a2.isBeforeOrEqual(ZonedDateTime.now()) - a2 = a2.isAfter(ZonedDateTime.now()) - a2 = a2.isAfterOrEqual(ZonedDateTime.now()) - a2 = a2.isEqual(ZonedDateTime.now()) - - a3 = a3.isBefore(ZonedDateTime.now()) - a3 = a3.isBeforeOrEqual(ZonedDateTime.now()) - a3 = a3.isAfter(ZonedDateTime.now()) - a3 = a3.isAfterOrEqual(ZonedDateTime.now()) - a3 = a3.isEqual(ZonedDateTime.now()) - - a4 = a4.isBefore(ZonedDateTime.now()) - a4 = a4.isBeforeOrEqual(ZonedDateTime.now()) - a4 = a4.isAfter(ZonedDateTime.now()) - a4 = a4.isAfterOrEqual(ZonedDateTime.now()) - a4 = a4.isEqual(ZonedDateTime.now()) - - - a1 = a1.isBefore(chronoZonedDateTime) - a1 = a1.isBeforeOrEqual(chronoZonedDateTime) - a1 = a1.isAfter(chronoZonedDateTime) - a1 = a1.isAfterOrEqual(chronoZonedDateTime) - a1 = a1.isEqual(chronoZonedDateTime) - - a2 = a2.isBefore(chronoZonedDateTime) - a2 = a2.isBeforeOrEqual(chronoZonedDateTime) - a2 = a2.isAfter(chronoZonedDateTime) - a2 = a2.isAfterOrEqual(chronoZonedDateTime) - a2 = a2.isEqual(chronoZonedDateTime) - - a3 = a3.isBefore(chronoZonedDateTime) - a3 = a3.isBeforeOrEqual(chronoZonedDateTime) - a3 = a3.isAfter(chronoZonedDateTime) - a3 = a3.isAfterOrEqual(chronoZonedDateTime) - a3 = a3.isEqual(chronoZonedDateTime) - - a4 = a4.isBefore(chronoZonedDateTime) - a4 = a4.isBeforeOrEqual(chronoZonedDateTime) - a4 = a4.isAfter(chronoZonedDateTime) - a4 = a4.isAfterOrEqual(chronoZonedDateTime) - a4 = a4.isEqual(chronoZonedDateTime) - } -} diff --git a/misc/deprecated/apis/fluent-en_GB-jdk8/atrium-api-fluent-en_GB-jdk8-jvm/src/test/kotlin/ch/tutteli/atrium/api/fluent/en_GB/jdk8/FileAsPathAssertionsSpec.kt b/misc/deprecated/apis/fluent-en_GB-jdk8/atrium-api-fluent-en_GB-jdk8-jvm/src/test/kotlin/ch/tutteli/atrium/api/fluent/en_GB/jdk8/FileAsPathAssertionsSpec.kt deleted file mode 100644 index 1970a3c65..000000000 --- a/misc/deprecated/apis/fluent-en_GB-jdk8/atrium-api-fluent-en_GB-jdk8-jvm/src/test/kotlin/ch/tutteli/atrium/api/fluent/en_GB/jdk8/FileAsPathAssertionsSpec.kt +++ /dev/null @@ -1,20 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.api.fluent.en_GB.jdk8 - -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.specs.notImplemented -import java.io.File - -class FileAsPathAssertionsSpec : ch.tutteli.atrium.specs.integration.FileAsPathAssertionsSpec( - Expect::asPath -) { - @Suppress("unused", "UNUSED_VALUE") - private fun ambiguityTest() { - var a1: Expect = notImplemented() - - a1.asPath() - a1 = a1.asPath { } - } -} diff --git a/misc/deprecated/apis/fluent-en_GB-jdk8/atrium-api-fluent-en_GB-jdk8-jvm/src/test/kotlin/ch/tutteli/atrium/api/fluent/en_GB/jdk8/LocalDateAssertionsSpec.kt b/misc/deprecated/apis/fluent-en_GB-jdk8/atrium-api-fluent-en_GB-jdk8-jvm/src/test/kotlin/ch/tutteli/atrium/api/fluent/en_GB/jdk8/LocalDateAssertionsSpec.kt deleted file mode 100644 index 291365d21..000000000 --- a/misc/deprecated/apis/fluent-en_GB-jdk8/atrium-api-fluent-en_GB-jdk8-jvm/src/test/kotlin/ch/tutteli/atrium/api/fluent/en_GB/jdk8/LocalDateAssertionsSpec.kt +++ /dev/null @@ -1,40 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.api.fluent.en_GB.jdk8 - -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.specs.fun1 -import ch.tutteli.atrium.specs.notImplemented -import ch.tutteli.atrium.specs.property -import java.time.DayOfWeek -import java.time.LocalDate - -class LocalDateAssertionsSpec : ch.tutteli.atrium.specs.integration.LocalDateAssertionsSpec( - property(Expect::year), - fun1.() -> Unit>(Expect::year), - property(Expect::month), - fun1.() -> Unit>(Expect::month), - property(Expect::day), - fun1.() -> Unit>(Expect::day), - property(Expect::dayOfWeek), - fun1.() -> Unit>(Expect::dayOfWeek) -) { - @Suppress("unused", "UNUSED_VALUE") - private fun ambiguityTest() { - var a1: Expect = notImplemented() - - a1.year - a1 = a1.year { } - - a1.month - a1 = a1.month { } - - a1.dayOfWeek - a1 = a1.dayOfWeek { } - - a1.day - a1 = a1.day { } - } -} - diff --git a/misc/deprecated/apis/fluent-en_GB-jdk8/atrium-api-fluent-en_GB-jdk8-jvm/src/test/kotlin/ch/tutteli/atrium/api/fluent/en_GB/jdk8/LocalDateTimeAssertionsSpec.kt b/misc/deprecated/apis/fluent-en_GB-jdk8/atrium-api-fluent-en_GB-jdk8-jvm/src/test/kotlin/ch/tutteli/atrium/api/fluent/en_GB/jdk8/LocalDateTimeAssertionsSpec.kt deleted file mode 100644 index e783c9824..000000000 --- a/misc/deprecated/apis/fluent-en_GB-jdk8/atrium-api-fluent-en_GB-jdk8-jvm/src/test/kotlin/ch/tutteli/atrium/api/fluent/en_GB/jdk8/LocalDateTimeAssertionsSpec.kt +++ /dev/null @@ -1,39 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.api.fluent.en_GB.jdk8 - -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.specs.fun1 -import ch.tutteli.atrium.specs.notImplemented -import ch.tutteli.atrium.specs.property -import java.time.DayOfWeek -import java.time.LocalDateTime - -class LocalDateTimeAssertionsSpec : ch.tutteli.atrium.specs.integration.LocalDateTimeAssertionsSpec( - property(Expect::year), - fun1.() -> Unit>(Expect::year), - property(Expect::month), - fun1.() -> Unit>(Expect::month), - property(Expect::day), - fun1.() -> Unit>(Expect::day), - property(Expect::dayOfWeek), - fun1.() -> Unit>(Expect::dayOfWeek) -) { - @Suppress("unused", "UNUSED_VALUE") - private fun ambiguityTest() { - var a1: Expect = notImplemented() - - a1.year - a1 = a1.year { } - - a1.month - a1 = a1.month { } - - a1.day - a1 = a1.day { } - - a1.dayOfWeek - a1 = a1.dayOfWeek { } - } -} diff --git a/misc/deprecated/apis/fluent-en_GB-jdk8/atrium-api-fluent-en_GB-jdk8-jvm/src/test/kotlin/ch/tutteli/atrium/api/fluent/en_GB/jdk8/OptionalAssertionsSpec.kt b/misc/deprecated/apis/fluent-en_GB-jdk8/atrium-api-fluent-en_GB-jdk8-jvm/src/test/kotlin/ch/tutteli/atrium/api/fluent/en_GB/jdk8/OptionalAssertionsSpec.kt deleted file mode 100644 index 4f36fdd2b..000000000 --- a/misc/deprecated/apis/fluent-en_GB-jdk8/atrium-api-fluent-en_GB-jdk8-jvm/src/test/kotlin/ch/tutteli/atrium/api/fluent/en_GB/jdk8/OptionalAssertionsSpec.kt +++ /dev/null @@ -1,35 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.api.fluent.en_GB.jdk8 - -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.specs.* -import ch.tutteli.atrium.specs.integration.OptionalAssertionsSpec -import java.util.* - -class OptionalAssertionsSpec : OptionalAssertionsSpec( - isEmpty = fun0(Expect>::isEmpty), - isPresentFeature = feature0, Int>(Expect>::isPresent), - isPresent = fun1, Expect.() -> Unit>(Expect>::isPresent) -) { - @Suppress("unused", "UNUSED_VALUE") - private fun ambiguityTest() { - var o1: Expect> = notImplemented() - var o1b: Expect> = notImplemented() - - var star: Expect> = notImplemented() - - o1 = o1.isEmpty() - o1b = o1b.isEmpty() - star = star.isEmpty() - o1.isPresent() - o1b.isPresent() - // following is not supported on purpose as we don't know what type the element is in this case - // star.isPresent() - o1.isPresent {} - o1b.isPresent {} - // following is not supported on purpose as we don't know what type the element is in this case - // star.isPresent {} - } -} diff --git a/misc/deprecated/apis/fluent-en_GB-jdk8/atrium-api-fluent-en_GB-jdk8-jvm/src/test/kotlin/ch/tutteli/atrium/api/fluent/en_GB/jdk8/PathAssertionsSpec.kt b/misc/deprecated/apis/fluent-en_GB-jdk8/atrium-api-fluent-en_GB-jdk8-jvm/src/test/kotlin/ch/tutteli/atrium/api/fluent/en_GB/jdk8/PathAssertionsSpec.kt deleted file mode 100644 index 89d4354f1..000000000 --- a/misc/deprecated/apis/fluent-en_GB-jdk8/atrium-api-fluent-en_GB-jdk8-jvm/src/test/kotlin/ch/tutteli/atrium/api/fluent/en_GB/jdk8/PathAssertionsSpec.kt +++ /dev/null @@ -1,62 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.api.fluent.en_GB.jdk8 - -import ch.tutteli.atrium.api.fluent.en_GB.hasDirectoryEntry -import ch.tutteli.atrium.api.fluent.en_GB.isAbsolute -import ch.tutteli.atrium.api.fluent.en_GB.isExecutable -import ch.tutteli.atrium.api.fluent.en_GB.isRelative -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.specs.* -import java.nio.file.Path -import java.nio.file.Paths - -class PathAssertionsSpec : ch.tutteli.atrium.specs.integration.PathAssertionsSpec( - fun0(Expect::exists), - fun0(Expect::existsNot), - fun1(Expect::startsWith), - fun1(Expect::startsNotWith), - fun1(Expect::endsWith), - fun1(Expect::endsNotWith), - fun0(Expect::isReadable), - fun0(Expect::isWritable), - fun0(Expect::isExecutable), // checks the new function from fluent-jvm because it is not implemented in fluent-jkd8 - fun0(Expect::isRegularFile), - fun0(Expect::isDirectory), - fun0(Expect::isAbsolute), // checks the new function from fluent-jvm because it is not implemented in fluent-jkd8 - fun0(Expect::isRelative), // checks the new function from fluent-jvm because it is not implemented in fluent-jkd8 - Expect::hasDirectoryEntry.name to Companion::hasDirectoryEntrySingle, // checks the new function from fluent-jvm because it is not implemented in fluent-jkd8 - fun2>(Expect::hasDirectoryEntry), // checks the new function from fluent-jvm because it is not implemented in fluent-jkd8 - fun1(Expect::hasSameBinaryContentAs), - fun3(Expect::hasSameTextualContentAs), - Expect::hasSameTextualContentAs.name to Companion::hasSameTextualContentAsDefaultArgs -) { - - companion object { - private fun hasSameTextualContentAsDefaultArgs(expect: Expect, targetPath: Path): Expect = - expect.hasSameTextualContentAs(targetPath) - - private fun hasDirectoryEntrySingle(expect: Expect, entry: String) = expect.hasDirectoryEntry(entry) - } - - @Suppress("unused", "UNUSED_VALUE") - private fun ambiguityTest() { - val a1: Expect = notImplemented() - - a1.exists() - a1.existsNot() - a1.startsWith(Paths.get("a")) - a1.startsNotWith(Paths.get("a")) - a1.endsWith(Paths.get("a")) - a1.endsNotWith(Paths.get("a")) - a1.isReadable() - a1.isWritable() - a1.isRegularFile() - a1.isDirectory() - a1.hasSameBinaryContentAs(Paths.get("a")) - a1.hasSameTextualContentAs(Paths.get("a")) - } -} - -class DummyPath(path: Path) : Path by path diff --git a/misc/deprecated/apis/fluent-en_GB-jdk8/atrium-api-fluent-en_GB-jdk8-jvm/src/test/kotlin/ch/tutteli/atrium/api/fluent/en_GB/jdk8/PathFeatureAssertionsSpec.kt b/misc/deprecated/apis/fluent-en_GB-jdk8/atrium-api-fluent-en_GB-jdk8-jvm/src/test/kotlin/ch/tutteli/atrium/api/fluent/en_GB/jdk8/PathFeatureAssertionsSpec.kt deleted file mode 100644 index b35fbd07f..000000000 --- a/misc/deprecated/apis/fluent-en_GB-jdk8/atrium-api-fluent-en_GB-jdk8-jvm/src/test/kotlin/ch/tutteli/atrium/api/fluent/en_GB/jdk8/PathFeatureAssertionsSpec.kt +++ /dev/null @@ -1,41 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.api.fluent.en_GB.jdk8 - -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.specs.* -import java.nio.file.Path - -class PathFeatureAssertionsSpec : ch.tutteli.atrium.specs.integration.PathFeatureAssertionsSpec( - property(Expect::parent), - fun1.() -> Unit>(Expect::parent), - feature1(Expect::resolve), - fun2.() -> Unit>(Expect::resolve), - property(Expect::fileName), - fun1.() -> Unit>(Expect::fileName), - property(Expect::fileNameWithoutExtension), - fun1.() -> Unit>(Expect::fileNameWithoutExtension), - property(Expect::extension), - fun1.() -> Unit>(Expect::extension) -) { - @Suppress("unused", "UNUSED_VALUE") - private fun ambiguityTest() { - var a1: Expect = notImplemented() - - a1.parent - a1 = a1.parent { } - - a1.fileName - a1 = a1.fileName { } - - a1.fileNameWithoutExtension - a1 = a1.fileNameWithoutExtension { } - - a1.extension - a1 = a1.extension { } - - a1.resolve("test") - a1.resolve("test", {}) - } -} diff --git a/misc/deprecated/apis/fluent-en_GB-jdk8/atrium-api-fluent-en_GB-jdk8-jvm/src/test/kotlin/ch/tutteli/atrium/api/fluent/en_GB/jdk8/ZonedDateTimeAssertionsSpec.kt b/misc/deprecated/apis/fluent-en_GB-jdk8/atrium-api-fluent-en_GB-jdk8-jvm/src/test/kotlin/ch/tutteli/atrium/api/fluent/en_GB/jdk8/ZonedDateTimeAssertionsSpec.kt deleted file mode 100644 index ce4258d31..000000000 --- a/misc/deprecated/apis/fluent-en_GB-jdk8/atrium-api-fluent-en_GB-jdk8-jvm/src/test/kotlin/ch/tutteli/atrium/api/fluent/en_GB/jdk8/ZonedDateTimeAssertionsSpec.kt +++ /dev/null @@ -1,39 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.api.fluent.en_GB.jdk8 - -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.specs.fun1 -import ch.tutteli.atrium.specs.notImplemented -import ch.tutteli.atrium.specs.property -import java.time.DayOfWeek -import java.time.ZonedDateTime - -class ZonedDateTimeAssertionsSpec : ch.tutteli.atrium.specs.integration.ZonedDateTimeAssertionsSpec( - property(Expect::year), - fun1.() -> Unit>(Expect::year), - property(Expect::month), - fun1.() -> Unit>(Expect::month), - property(Expect::day), - fun1.() -> Unit>(Expect::day), - property(Expect::dayOfWeek), - fun1.() -> Unit>(Expect::dayOfWeek) -) { - @Suppress("unused", "UNUSED_VALUE") - private fun ambiguityTest() { - var a1: Expect = notImplemented() - - a1.year - a1 = a1.year { } - - a1.month - a1 = a1.month { } - - a1.dayOfWeek - a1 = a1.dayOfWeek { } - - a1.day - a1 = a1.day { } - } -} diff --git a/misc/deprecated/atrium-assertions/build.gradle b/misc/deprecated/atrium-assertions/build.gradle deleted file mode 100644 index 45e51b218..000000000 --- a/misc/deprecated/atrium-assertions/build.gradle +++ /dev/null @@ -1,12 +0,0 @@ -description = 'A deprecated module, you should not longer rely on it; will be removed with 1.0.0\nLook at the suggested replacements' - -dependencies { - api prefixedProject('domain-api-jvm') - api prefixedProject('domain-api-deprecated') - api prefixedProject('domain-builders-jvm') - compileOnly prefixedProject('domain-robstoll-jvm') - implementation prefixedProject('domain-robstoll-lib-jvm') - api prefixedProject('core-api-jvm') - // it is up to the consumer of atrium-assertions which atrium-translations module is used at runtime - compileOnly prefixedProject('translations-en_GB-jvm') -} diff --git a/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/any/typetransformation/AnyTypeTransformation.kt b/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/any/typetransformation/AnyTypeTransformation.kt deleted file mode 100644 index e7259fa8c..000000000 --- a/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/any/typetransformation/AnyTypeTransformation.kt +++ /dev/null @@ -1,57 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0 */) -package ch.tutteli.atrium.assertions.any.typetransformation - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.assertions.any.typetransformation.AnyTypeTransformation.TypeTransformationFailureHandler -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.creating.BaseAssertionPlant -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.reporting.translating.Translatable - -/** - * Defines the contract for sophisticated narrowing assertion builders. - * - * The assertion is typically created by the [DownCaster] or the more generic [TypeTransformer] - * which itself requires a [TypeTransformationFailureHandler]. - */ -@Deprecated( - "Use the interface from package domain.creating; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.domain.creating.any.typetransformation.AnyTypeTransformation") -) -interface AnyTypeTransformation { - - /** - * A handler which decides how the lambda -- which could have created subsequent assertions for the - * transformed [AssertionPlant.subject][SubjectProvider.subject] if the transformation of the [AssertionPlant.subject][SubjectProvider.subject] to type [TSub] - * did not fail -- should be used in reporting. - * - * @param T The type of [AssertionPlant.subject][SubjectProvider.subject]. - * @param TSub The type to which [AssertionPlant.subject][SubjectProvider.subject] should have been transformed to. - */ - @Deprecated( - "Use the interface from package domain.creating; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.domain.creating.any.typetransformation.AnyTypeTransformation.TypeTransformationFailureHandler") - ) - interface TypeTransformationFailureHandler { - - /** - * Makes something with the given [assertionCreator] lambda; might add assertions to [subjectPlant]. - * - * @param warningTransformationFailed Explains why the [subjectPlant]'s [subject][SubjectProvider.subject] could not be - * should have been down-casted. - * @param subjectPlant The plant to which additional assertions would have been added. - * @param failingAssertion The failing [Assertion] representing that [subjectPlant]'s - * [subject][SubjectProvider.subject] can be transformed to [TSub]. - * @param assertionCreator The lambda which could have created subsequent assertions for the transformed - * [AssertionPlant.subject][SubjectProvider.subject]. - * - * @throws AssertionError Might throw an [AssertionError] depending on the [subjectPlant]. - */ - fun createAndAddAssertionToPlant( - warningTransformationFailed: Translatable, - subjectPlant: BaseAssertionPlant, - failingAssertion: Assertion, - assertionCreator: AssertionPlant.() -> Unit - ) - } -} diff --git a/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/any/typetransformation/DownCaster.kt b/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/any/typetransformation/DownCaster.kt deleted file mode 100644 index e6ca7d06d..000000000 --- a/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/any/typetransformation/DownCaster.kt +++ /dev/null @@ -1,64 +0,0 @@ -@file:Suppress("DEPRECATION" /* will be removed with 1.0.0 */) -package ch.tutteli.atrium.assertions.any.typetransformation - -import ch.tutteli.atrium.assertions.DescriptiveAssertion -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.creating.BaseAssertionPlant -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.reporting.translating.Translatable -import ch.tutteli.atrium.reporting.translating.TranslatableWithArgs -import ch.tutteli.atrium.translations.DescriptionTypeTransformationAssertion -import kotlin.reflect.KClass -import kotlin.reflect.full.cast - -/** - * Helps to make an assertion about the [BaseAssertionPlant.subject], that it is of type [T] and can be - * down-casted to type [TSub]. - * - * @param T The type of [BaseAssertionPlant.subject]. - * @param TSub The type to which [BaseAssertionPlant.subject] can be down-casted, hence needs to be a subtype of [T]. - * - * @constructor Helps to make an assertion about the [BaseAssertionPlant.subject], that it is of type [T] and can be - * down-casted to type [TSub]. - * @param failureHandler The handler which deals with a lambda function which could have created subsequent assertions - * for a down-casted subject. - */ -@Deprecated("Use AssertImpl.any.typeTransformation.downcast; will be removed with 1.0.0") -class DownCaster(private val failureHandler: AnyTypeTransformation.TypeTransformationFailureHandler) { - private val typeTransformer = TypeTransformer(failureHandler) - /** - * Performs the down-cast and applies the given [assertionCreator] to the down-casted - * [subject][BaseAssertionPlant.subject] of [subjectPlant] if successful or passes it - * to a [AnyTypeTransformation.TypeTransformationFailureHandler] otherwise. - * - * It also adds a [DescriptiveAssertion], representing the down-cast as such (succeeding or failing), to the given - * [subjectPlant] using the given [description]. - * - * @param description The [description][DescriptiveAssertion.description] of the resulting [DescriptiveAssertion]. - * @param subType The type to which the [subjectPlant]'s [subject][SubjectProvider.subject] should be down-casted. - * @param subjectPlant The plant to which additional assertions will be added. - * @param assertionCreator The lambda function which can create subsequent assertions for the down-casted subject. - * - * @throws AssertionError Might throw an [AssertionError] in case the down-cast cannot be performed, depending on - * the [subjectPlant] and the defined [AnyTypeTransformation.TypeTransformationFailureHandler]. - */ - @Deprecated("Use AssertImpl.any.typeTransformation.downcast; will be removed with 1.0.0", - ReplaceWith( - "AssertImpl.any.typeTransformation.downcast(description, subType, subjectPlant, assertionCreator)", - "ch.tutteli.atrium.creating.AssertImpl" - ) - ) - fun downCast( - description: Translatable, - subType: KClass, - subjectPlant: BaseAssertionPlant, - assertionCreator: AssertionPlant.() -> Unit - ) { - typeTransformer.transform( - description, subType, subjectPlant, assertionCreator, - TranslatableWithArgs(DescriptionTypeTransformationAssertion.WARNING_DOWN_CAST_FAILED, subType.qualifiedName!!), - { subType.isInstance(it) }, - { subType.cast(it) } - ) - } -} diff --git a/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/any/typetransformation/ExplanatoryTypeTransformationFailureHandler.kt b/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/any/typetransformation/ExplanatoryTypeTransformationFailureHandler.kt deleted file mode 100644 index a1eeec694..000000000 --- a/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/any/typetransformation/ExplanatoryTypeTransformationFailureHandler.kt +++ /dev/null @@ -1,66 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0 */) - -package ch.tutteli.atrium.assertions.any.typetransformation - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.assertions.AssertionGroup -import ch.tutteli.atrium.assertions.ExplanatoryAssertionGroupType -import ch.tutteli.atrium.assertions.builders.invisibleGroup -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.creating.BaseAssertionPlant -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.creating.MaybeSubject -import ch.tutteli.atrium.domain.builders.AssertImpl -import ch.tutteli.atrium.reporting.translating.Translatable - -/** - * Represents an [AnyTypeTransformation.TypeTransformationFailureHandler] which wraps subsequent assertions into an - * [AssertionGroup] with an [ExplanatoryAssertionGroupType]. - * - * @param T The type of the [AssertionPlant.subject][SubjectProvider.subject]. - * @param T The type to which the [AssertionPlant.subject][SubjectProvider.subject] should have been down-casted. - */ -@Deprecated("Use AssertImpl.any.typeTransformation.failureHandlers.newExplanatory; will be removed with 1.0.0") -class ExplanatoryTypeTransformationFailureHandler : - AnyTypeTransformation.TypeTransformationFailureHandler { - /** - * Wraps the assertions which might be created by [assertionCreator] into an [AssertionGroup] - * with an [ExplanatoryAssertionGroupType] and adds it to the given [subjectPlant]. - * - * @param warningTransformationFailed The type to which the [subjectPlant]'s [subject][SubjectProvider.subject] should have been - * down-casted. - * @param subjectPlant The plant to which additional assertions would have been added. - * @param assertionCreator The lambda which could have created subsequent assertions for the down-casted - * [AssertionPlant.subject][SubjectProvider.subject]. - * - * @throws AssertionError Might throw an [AssertionError] depending on the [subjectPlant]. - */ - override fun createAndAddAssertionToPlant( - warningTransformationFailed: Translatable, - subjectPlant: BaseAssertionPlant, - failingAssertion: Assertion, - assertionCreator: AssertionPlant.() -> Unit - ) { - val explanatoryAssertions = collectAssertions(warningTransformationFailed, assertionCreator) - val explanatoryGroup = AssertImpl.builder.explanatoryGroup - .withDefaultType - .withAssertions(explanatoryAssertions) - .build() - subjectPlant.addAssertion( - AssertImpl.builder.invisibleGroup - .withAssertions( - failingAssertion, - explanatoryGroup - ) - .build() - ) - } - - private fun collectAssertions( - warningDownCastFailed: Translatable, - assertionCreator: AssertionPlant.() -> Unit - ) = AssertImpl.collector - .forExplanation - .doNotThrowIfNoAssertionIsCollected - .collect(warningDownCastFailed, MaybeSubject.Absent, assertionCreator) -} diff --git a/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/any/typetransformation/TypeTransformer.kt b/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/any/typetransformation/TypeTransformer.kt deleted file mode 100644 index 74e8adb4e..000000000 --- a/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/any/typetransformation/TypeTransformer.kt +++ /dev/null @@ -1,55 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0 */) -package ch.tutteli.atrium.assertions.any.typetransformation - -import ch.tutteli.atrium.core.coreFactory -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.creating.BaseAssertionPlant -import ch.tutteli.atrium.domain.builders.AssertImpl -import ch.tutteli.atrium.reporting.SHOULD_NOT_BE_SHOWN_TO_THE_USER_BUG -import ch.tutteli.atrium.reporting.translating.Translatable -import ch.tutteli.atrium.reporting.translating.Untranslatable - -/** - * Deprecated, use AnyTypeTransformerAssertions.transformType; will be removed with 1.0.0 - */ -@Deprecated("Use AssertImpl.any.typeTransformation.transform; will be removed with 1.0.0") -class TypeTransformer(private val failureHandler: AnyTypeTransformation.TypeTransformationFailureHandler) { - - @Deprecated("Use AssertImpl.any.typeTransformation.transform; will be removed with 1.0.0", - ReplaceWith( - "AssertImpl.any.typeTransformation.transform(AnyTypeTransformation.ParameterObject(description, representation, subjectPlant, assertionCreator, warningTransformationFailed), canBeTransformed, transform, AssertImpl.any.typeTransformation.failureHandlers.chooseAFailureHandler)", - "ch.tutteli.atrium.creating.AssertImpl", - "ch.tutteli.atrium.domain.creating.any.typetransformation.AnyTypeTransformation" - ) - ) - fun transform( - description: Translatable, - representation: Any, - subjectPlant: BaseAssertionPlant, - assertionCreator: AssertionPlant.() -> Unit, - warningTransformationFailed: Translatable, - canBeTransformed: (T) -> Boolean, - transform: (T) -> TSub - ) { - //TODO not subject less - val subject = subjectPlant.subject - if (subject != null && canBeTransformed(subject)) { - val assertionVerb = Untranslatable(SHOULD_NOT_BE_SHOWN_TO_THE_USER_BUG) - val assertionChecker = coreFactory.newDelegatingAssertionChecker(subjectPlant) - val plant = coreFactory.newReportingPlant(assertionVerb, { transform(subject) }, assertionChecker) - plant.addAssertion(AssertImpl.builder.descriptive - .holding - .withDescriptionAndRepresentation(description, representation) - .build()) - plant.addAssertionsCreatedBy(assertionCreator) - } else { - val failingAssertion = AssertImpl.builder.descriptive - .failing - .withDescriptionAndRepresentation(description, representation) - .build() - failureHandler.createAndAddAssertionToPlant( - warningTransformationFailed, subjectPlant, failingAssertion, assertionCreator - ) - } - } -} diff --git a/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/anyAssertions.kt b/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/anyAssertions.kt deleted file mode 100644 index 66833253d..000000000 --- a/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/anyAssertions.kt +++ /dev/null @@ -1,53 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") - -package ch.tutteli.atrium.assertions - -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.creating.AssertionPlantNullable -import ch.tutteli.atrium.domain.builders.AssertImpl - -@Deprecated("Use AssertImpl.any.toBe; will be removed with 1.0.0", - ReplaceWith( - "AssertImpl.any.toBe(plant, expected)", - "ch.tutteli.atrium.creating.AssertImpl" - ) -) -fun _toBe(plant: AssertionPlant, expected: T): Assertion - = AssertImpl.any.toBe(plant, expected) - -@Deprecated("Use AssertImpl.any.notToBe; will be removed with 1.0.0", - ReplaceWith( - "AssertImpl.any.notToBe(plant, expected)", - "ch.tutteli.atrium.creating.AssertImpl" - ) -) -fun _notToBe(plant: AssertionPlant, expected: T): Assertion - = AssertImpl.any.notToBe(plant, expected) - -@Deprecated("Use AssertImpl.any.isSame; will be removed with 1.0.0", - ReplaceWith( - "AssertImpl.any.isSame(plant, expected)", - "ch.tutteli.atrium.creating.AssertImpl" - ) -) -fun _isSame(plant: AssertionPlant, expected: T): Assertion - = AssertImpl.any.isSame(plant, expected) - -@Deprecated("Use AssertImpl.any.isNotSame; will be removed with 1.0.0", - ReplaceWith( - "AssertImpl.any.isNotSame(plant, expected)", - "ch.tutteli.atrium.creating.AssertImpl" - ) -) -fun _isNotSame(plant: AssertionPlant, expected: T): Assertion - = AssertImpl.any.isNotSame(plant, expected) - -@Deprecated("Use AssertImpl.any.toBeNull; will be removed with 1.0.0", - ReplaceWith( - "AssertImpl.any.toBeNull(plant)", - "ch.tutteli.atrium.creating.AssertImpl" - ) -) -fun _isNull(plant: AssertionPlantNullable): Assertion - = AssertImpl.any.toBeNull(plant) diff --git a/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/basic/contains/builders/containsValidators.kt b/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/basic/contains/builders/containsValidators.kt deleted file mode 100644 index 0b114ee3f..000000000 --- a/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/basic/contains/builders/containsValidators.kt +++ /dev/null @@ -1,39 +0,0 @@ -package ch.tutteli.atrium.assertions.basic.contains.builders - -/** - * Validates that times is not `1`; throws an IllegalArgumentException otherwise, pointing the user to use the given - * [exactlyCall] instead of the given [atMostCall]. - */ -@Deprecated("Use the fun from module domain-builders; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.domain.builders.utils.validateAtMost")) -fun validateAtMost( - times: Int, - atMostCall: (Int) -> String, - atLeastCall: (Int) -> String, - exactlyCall: (Int) -> String -) { - require(1 != times) { - "use ${exactlyCall(times)} instead of ${atMostCall(times)}; ${atMostCall(times)} defines implicitly ${atLeastCall(1)} as well" - } -} - -/** - * Validates that [atLeastTimes] is not equal to or greater than [butAtMostTimes]; throws IllegalArgumentException - * otherwise, pointing the user to use the given [exactlyCall] in case [atLeastTimes] equals [butAtMostTimes]. - */ -@Deprecated("Use the fun from module domain-builders; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.domain.builders.utils.validateButAtMost")) -fun validateButAtMost( - atLeastTimes: Int, - butAtMostTimes: Int, - atLeastButAtMostCall: (Int, Int) -> String, - atLeastCall: (Int) -> String, - butAtMostCall: (Int) -> String, - exactlyCall: (Int) -> String -) { - require(atLeastTimes != butAtMostTimes) { - "use ${exactlyCall(butAtMostTimes)} instead of ${atLeastButAtMostCall(butAtMostTimes, butAtMostTimes)}" - } - - require(atLeastTimes < butAtMostTimes) { - "specifying ${butAtMostCall(butAtMostTimes)} does not make sense if ${atLeastCall(atLeastTimes)} was used before" - } -} diff --git a/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/basic/contains/checkers/ContainsChecker.kt b/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/basic/contains/checkers/ContainsChecker.kt deleted file mode 100644 index da9c236a3..000000000 --- a/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/basic/contains/checkers/ContainsChecker.kt +++ /dev/null @@ -1,52 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0 */) -package ch.tutteli.atrium.assertions.basic.contains.checkers - -import ch.tutteli.atrium.assertions.DescriptiveAssertion -import ch.tutteli.atrium.assertions.basic.contains.Contains -import ch.tutteli.atrium.domain.builders.AssertImpl -import ch.tutteli.atrium.reporting.StringBasedRawString -import ch.tutteli.atrium.reporting.Text -import ch.tutteli.atrium.reporting.translating.Translatable - -/** - * Represents the *deprecated* base class for [Contains.Checker]s which compare how many occurrences of an expected object are found - * in the input of the search, against how many [times] the check expect it to be contained. - * - * It further checks that [times] is bigger than 0 (throws an [IllegalArgumentException] otherwise) and additionally - * suggest to use a different function if [times] equals to zero. - * - * @property times The number which the check uses to compare against the actual number of times an expected object is - * found in the input of the search. - * - * @constructor Represents a base class for checkers which compare how many occurrences of an expected object are found - * in the input of the search, against how many [times] the check expect it to be contained. - * @param times The number which the check uses to compare against the actual number of times an expected object is - * found in the input of the search. - * @param correctCall The function which should be used instead of `wrongCall` when [times] equals to zero. - * @param wrongCall The function call which was used and should not be used if [times] equals to zero. - * - * @throws IllegalArgumentException In case [times] is smaller than 1. - */ -@Deprecated("Please open an issue if you used this class; will be removed with 1.0.0") -abstract class ContainsChecker( - val times: Int, - correctCall: String, - wrongCall: (Int) -> String -) : Contains.Checker { - init { - require(times != 0) { "use $correctCall instead of ${wrongCall(0)}" } - require(times > 0) { "only positive numbers allowed: $times given" } - } - - /** - * Creates a [DescriptiveAssertion] based on the given [description], the property [times] as [StringBasedRawString] - * and the given [check]. - * - * @param description The description used for [DescriptiveAssertion.description] - * @param check The check used for [DescriptiveAssertion.holds] - * - * @return The newly created [DescriptiveAssertion]. - */ - protected fun createBasicAssertion(description: Translatable, check: Boolean): DescriptiveAssertion - = AssertImpl.builder.createDescriptive(description, Text(times.toString())) { check } -} diff --git a/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/basic/contains/creators/ContainsAssertionCreator.kt b/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/basic/contains/creators/ContainsAssertionCreator.kt deleted file mode 100644 index 99ebae1e4..000000000 --- a/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/basic/contains/creators/ContainsAssertionCreator.kt +++ /dev/null @@ -1,79 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0 */) -package ch.tutteli.atrium.assertions.basic.contains.creators - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.assertions.AssertionGroup -import ch.tutteli.atrium.assertions.basic.contains.Contains -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.domain.builders.AssertImpl -import ch.tutteli.atrium.domain.robstoll.lib.assertions.LazyThreadUnsafeAssertionGroup -import ch.tutteli.atrium.reporting.Text -import ch.tutteli.atrium.reporting.translating.Translatable - -/** - * Represents the base class for [Contains.Creator]s, providing a template to fulfill its job. - * - * @param T The type of the [AssertionPlant.subject][SubjectProvider.subject]. - * @param S The type of the search criteria. - * @param C The type of the checkers in use (typically a sub interface of [Contains.Checker]). - * - * @property checkers The [Contains.Checker]s which shall be applied to the search result. - * - * @constructor Represents the base class for [Contains.Creator]s, providing a template to fulfill its job. - * @param checkers The [Contains.Checker]s which shall be applied to the search result. - */ -@Deprecated("Please open an issue if you used this class; will be removed with 1.0.0") -abstract class ContainsAssertionCreator( - private val checkers: List -) : Contains.Creator { - - final override fun createAssertionGroup(subjectProvider: SubjectProvider, searchCriteria: List): AssertionGroup { - val assertions = searchCriteria.map { createForSearchCriterion(subjectProvider, it) } - return createAssertionGroupForSearchCriteriaAssertions(assertions) - } - fun createAssertionGroup(subjectProvider: SubjectProvider, searchCriterion: S, otherSearchCriteria: Array) - = createAssertionGroup(subjectProvider, listOf(searchCriterion, *otherSearchCriteria)) - - /** - * Creates an [AssertionGroup] representing the sophisticated `contains` assertion as a whole based on the given - * [assertions] which where created for the search criteria. - * - * @param assertions The assertions representing search criteria passed to [createAssertionGroup]. - * - * @return The newly created [AssertionGroup]. - */ - protected abstract fun createAssertionGroupForSearchCriteriaAssertions(assertions: List): AssertionGroup - - private fun createForSearchCriterion(subjectProvider: SubjectProvider, searchCriterion: S): AssertionGroup { - return LazyThreadUnsafeAssertionGroup { - searchAndCreateAssertion(subjectProvider, searchCriterion, this::featureFactory) - } - } - - /** - * Searches for something fulfilling the given [searchCriterion] in the given [subjectProvider]'s - * [subject][SubjectProvider.subject] and should pass on the number of occurrences to the given - * [featureFactory] which creates feature assertions based on the [checkers], which in turn can be used to create - * a resulting [AssertionGroup] representing the assertion for a search criteria as a whole. - * - * @param subjectProvider The plant for which the assertion is created. - * @param searchCriterion A search criterion. - * @param featureFactory The feature factory which should be called, passing the number of occurrences (matching - * the given [searchCriterion]) including a translation for `number of occurrences`. - * - * @return The newly created [AssertionGroup]. - */ - protected abstract fun searchAndCreateAssertion( - subjectProvider: SubjectProvider, - searchCriterion: S, - featureFactory: (numberOfOccurrences: Int, description: Translatable) -> AssertionGroup - ): AssertionGroup - - private fun featureFactory(count: Int, numberOfOccurrences: Translatable): AssertionGroup { - val assertions = checkers.map { it.createAssertion(count) } - return AssertImpl.builder.feature - .withDescriptionAndRepresentation(numberOfOccurrences, Text(count.toString())) - .withAssertions(assertions) - .build() - } -} diff --git a/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/basic/contains/creators/ContainsObjectsAssertionCreator.kt b/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/basic/contains/creators/ContainsObjectsAssertionCreator.kt deleted file mode 100644 index f20df0ad1..000000000 --- a/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/basic/contains/creators/ContainsObjectsAssertionCreator.kt +++ /dev/null @@ -1,72 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0 */) -package ch.tutteli.atrium.assertions.basic.contains.creators - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.assertions.AssertionGroup -import ch.tutteli.atrium.assertions.basic.contains.Contains -import ch.tutteli.atrium.assertions.builders.invisibleGroup -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.domain.builders.AssertImpl -import ch.tutteli.atrium.reporting.translating.Translatable - -/** - * Represents the base class for [Contains.Creator]s which use bare objects as search criteria (matching them - * with `==`). - * - * It provides a template to fulfill the job of creating the sophisticated `contains` assertion. - * - * @param T The type of the [AssertionPlant.subject][SubjectProvider.subject]. - * @param S The type of the search criteria. - * @param B The type of the current [Contains.SearchBehaviour]. - * @param C The type of the checkers in use (typically a sub interface of [Contains.Checker]). - * - * @property searchBehaviour The chosen search behaviour. - * - * @constructor Represents the base class for [Contains.Creator]s which use bare objects as search criteria (matching them - * with `==`). - * @param searchBehaviour The chosen search behaviour. - * @param checkers The [Contains.Checker]s which shall be applied to the search result. - */ -@Deprecated("Please open an issue if you used this class; will be removed with 1.0.0") -abstract class ContainsObjectsAssertionCreator( - private val searchBehaviour: B, - checkers: List -) : ContainsAssertionCreator(checkers) { - - final override fun createAssertionGroupForSearchCriteriaAssertions(assertions: List): AssertionGroup - = AssertImpl.builder.invisibleGroup - .withAssertions(assertions) - .build() - - final override fun searchAndCreateAssertion(subjectProvider: SubjectProvider, searchCriterion: S, featureFactory: (Int, Translatable) -> AssertionGroup): AssertionGroup { - val count = search(subjectProvider, searchCriterion) - val featureAssertion = featureFactory(count, descriptionNumberOfOccurrences) - val description = searchBehaviour.decorateDescription(descriptionContains) - return AssertImpl.builder.list - .withDescriptionAndRepresentation(description, searchCriterion) - .withAssertion(featureAssertion) - .build() - } - - /** - * Provides the translation for `contains`. - */ - protected abstract val descriptionContains: Translatable - - /** - * Provides the translation for `number of occurrences`. - */ - protected abstract val descriptionNumberOfOccurrences: Translatable - - /** - * Searches for something matching the given [searchCriterion] in the given [subjectProvider]'s - * [subject][SubjectProvider.subject] and returns the number of occurrences. - * - * @param subjectProvider The plant or rather its [subject][SubjectProvider.subject] in which we shall look for something - * matching the given [searchCriterion]. - * @param searchCriterion The search criterion used to determine whether something matches or not. - * - * @return The number of times the [searchCriterion] matched in the [subjectProvider]'s [subject][SubjectProvider.subject]. - */ - protected abstract fun search(subjectProvider: SubjectProvider, searchCriterion: S): Int -} diff --git a/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/bigDecimalAssertions.kt b/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/bigDecimalAssertions.kt deleted file mode 100644 index cec05115f..000000000 --- a/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/bigDecimalAssertions.kt +++ /dev/null @@ -1,45 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") - -package ch.tutteli.atrium.assertions - -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.domain.builders.AssertImpl -import ch.tutteli.atrium.domain.builders.bigDecimal -import java.math.BigDecimal - -@Deprecated("Use AssertImpl.bigDecimal.isNumericallyEqualTo; will be removed with 1.0.0", - ReplaceWith( - "AssertImpl.bigDecimal.isNumericallyEqualTo(plant, expected)", - "ch.tutteli.atrium.creating.AssertImpl" - ) -) -fun _isNumericallyEqualTo(plant: AssertionPlant, expected: T) - = AssertImpl.bigDecimal.isNumericallyEqualTo(plant, expected) - -@Deprecated("Use AssertImpl.bigDecimal.isNotNumericallyEqualTo; will be removed with 1.0.0", - ReplaceWith( - "AssertImpl.bigDecimal.isNotNumericallyEqualTo(plant, expected)", - "ch.tutteli.atrium.creating.AssertImpl" - ) -) -fun _isNotNumericallyEqualTo(plant: AssertionPlant, expected: T) - = AssertImpl.bigDecimal.isNotNumericallyEqualTo(plant, expected) - -@Deprecated("Use AssertImpl.bigDecimal.isEqualIncludingScale; will be removed with 1.0.0", - ReplaceWith( - "AssertImpl.bigDecimal.isEqualIncludingScale(plant, expected, nameOfIsNumericallyEqualTo)", - "ch.tutteli.atrium.creating.AssertImpl" - ) -) -fun _isEqualIncludingScale(plant: AssertionPlant, expected: T, nameOfIsNumericallyEqualTo: String): Assertion - = AssertImpl.bigDecimal.isEqualIncludingScale(plant, expected, nameOfIsNumericallyEqualTo) - -@Deprecated("Use AssertImpl.bigDecimal.isNotEqualIncludingScale; will be removed with 1.0.0", - ReplaceWith( - "AssertImpl.bigDecimal.isNotEqualIncludingScale(plant, expected)", - "ch.tutteli.atrium.creating.AssertImpl" - ) -) -fun _isNotEqualIncludingScale(plant: AssertionPlant, expected: T) - = AssertImpl.bigDecimal.isNotEqualIncludingScale(plant, expected) diff --git a/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/charSequenceAssertions.kt b/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/charSequenceAssertions.kt deleted file mode 100644 index 7c98452f9..000000000 --- a/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/charSequenceAssertions.kt +++ /dev/null @@ -1,80 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") - -package ch.tutteli.atrium.assertions - -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.domain.builders.AssertImpl - -@Deprecated("Use AssertImpl.charSequence.containsBuilder; will be removed with 1.0.0", - ReplaceWith( - "AssertImpl.charSequence.containsBuilder(plant)", - "ch.tutteli.atrium.creating.AssertImpl" - ) -) -fun _containsBuilder(plant: AssertionPlant) - = AssertImpl.charSequence.containsBuilder(plant) - -@Deprecated("Use AssertImpl.charSequence.containsNotBuilder; will be removed with 1.0.0", - ReplaceWith( - "AssertImpl.charSequence.containsNotBuilder(plant)", - "ch.tutteli.atrium.creating.AssertImpl" - ) -) -fun _containsNotBuilder(plant: AssertionPlant) - = AssertImpl.charSequence.containsNotBuilder(plant) - - -@Deprecated("Use AssertImpl.charSequence.startsWith; will be removed with 1.0.0", - ReplaceWith( - "AssertImpl.charSequence.startsWith(plant, expected)", - "ch.tutteli.atrium.creating.AssertImpl" - ) -) -fun _startsWith(plant: AssertionPlant, expected: CharSequence): Assertion - = AssertImpl.charSequence.startsWith(plant, expected) - -@Deprecated("Use AssertImpl.charSequence.startsNotWith; will be removed with 1.0.0", - ReplaceWith( - "AssertImpl.charSequence.startsNotWith(plant, expected)", - "ch.tutteli.atrium.creating.AssertImpl" - ) -) -fun _startsNotWith(plant: AssertionPlant, expected: CharSequence): Assertion - = AssertImpl.charSequence.startsNotWith(plant, expected) - -@Deprecated("Use AssertImpl.charSequence.endsWith; will be removed with 1.0.0", - ReplaceWith( - "AssertImpl.charSequence.endsWith(plant, expected)", - "ch.tutteli.atrium.creating.AssertImpl" - ) -) -fun _endsWith(plant: AssertionPlant, expected: CharSequence): Assertion - = AssertImpl.charSequence.endsWith(plant, expected) - -@Deprecated("Use AssertImpl.charSequence.endsNotWith; will be removed with 1.0.0", - ReplaceWith( - "AssertImpl.charSequence.endsNotWith(plant, expected)", - "ch.tutteli.atrium.creating.AssertImpl" - ) -) -fun _endsNotWith(plant: AssertionPlant, expected: CharSequence): Assertion - = AssertImpl.charSequence.endsNotWith(plant, expected) - -@Deprecated("Use AssertImpl.charSequence.isEmpty; will be removed with 1.0.0", - ReplaceWith( - "AssertImpl.charSequence.isEmpty(plant)", - "ch.tutteli.atrium.creating.AssertImpl" - ) -) -fun _isEmpty(plant: AssertionPlant): Assertion - = AssertImpl.charSequence.isEmpty(plant) - -@Deprecated("Use AssertImpl.charSequence.isNotEmpty; will be removed with 1.0.0", - ReplaceWith( - "AssertImpl.charSequence.isNotEmpty(plant)", - "ch.tutteli.atrium.creating.AssertImpl" - ) -) -fun _isNotEmpty(plant: AssertionPlant): Assertion - = AssertImpl.charSequence.isNotEmpty(plant) diff --git a/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/charsequence/contains/builders/CharSequenceContainsAtLeastCheckerBuilderBase.kt b/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/charsequence/contains/builders/CharSequenceContainsAtLeastCheckerBuilderBase.kt deleted file mode 100644 index c21598d09..000000000 --- a/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/charsequence/contains/builders/CharSequenceContainsAtLeastCheckerBuilderBase.kt +++ /dev/null @@ -1,39 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0 */) -package ch.tutteli.atrium.assertions.charsequence.contains.builders - -import ch.tutteli.atrium.assertions.charsequence.contains.CharSequenceContains.Checker -import ch.tutteli.atrium.assertions.charsequence.contains.checkers.CharSequenceContainsAtLeastChecker -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains - -/** - * The base class for builders which create a `contains at least` check within the fluent API of a sophisticated - * `contains` assertion for [CharSequence]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - * - * @property times The number which the check will compare against the actual number of times an expected object - * is found in the input of the search. - * - * @constructor The base class for builders which create a `contains at least` check within the fluent API of a - * sophisticated `contains` assertion for [CharSequence]. - * @param times The number which the check will compare against the actual number of times an expected object is - * found in the input of the search. - * @param containsBuilder The previously used [CharSequenceContainsBuilder]. - * @param nameContainsNotFun The name of the function which represents a `CharSequence contains not` assertion. - * @param atLeastCall The name of the function which was called and created this builder. - */ -@Deprecated( - "Use the abstract class from package creating; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.creating.charsequence.contains.builders.CharSequenceContainsAtLeastCheckerBuilderBase") -) -abstract class CharSequenceContainsAtLeastCheckerBuilderBase( - val times: Int, - override val containsBuilder: CharSequenceContains.Builder, - nameContainsNotFun: String, - atLeastCall: (Int) -> String -) : CharSequenceContainsCheckerBuilder { - - override val checkers: List = - listOf(CharSequenceContainsAtLeastChecker(times, nameContainsNotFun, atLeastCall)) -} diff --git a/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/charsequence/contains/builders/CharSequenceContainsAtMostCheckerBuilderBase.kt b/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/charsequence/contains/builders/CharSequenceContainsAtMostCheckerBuilderBase.kt deleted file mode 100644 index 7a43dc2d0..000000000 --- a/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/charsequence/contains/builders/CharSequenceContainsAtMostCheckerBuilderBase.kt +++ /dev/null @@ -1,51 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0 */) -package ch.tutteli.atrium.assertions.charsequence.contains.builders - -import ch.tutteli.atrium.assertions.basic.contains.builders.validateAtMost -import ch.tutteli.atrium.assertions.charsequence.contains.CharSequenceContains.Checker -import ch.tutteli.atrium.assertions.charsequence.contains.checkers.CharSequenceContainsAtLeastChecker -import ch.tutteli.atrium.assertions.charsequence.contains.checkers.CharSequenceContainsAtMostChecker -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains - -/** - * The base class for builders which create a `contains at least once but at most` check within the fluent API of a - * sophisticated `contains` assertion for [CharSequence]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - * - * @property times The number which the check will compare against the actual number of times an expected object - * is found in the input of the search. - * - * @constructor The base class for builders which create a `contains at most` check within the fluent API of a - * sophisticated `contains` assertion for [CharSequence]. - * @param times The number which the check will compare against the actual number of times an expected object is - * found in the input of the search. - * @param containsBuilder The previously used [CharSequenceContainsBuilder]. - * @param nameContainsNotFun The name of the function which represents a `CharSequence contains not` assertion. - * @param atMostCall The name of the function which was called and created this builder. - * @param atLeastCall The name of the function which represents a `CharSequence contains at least` assertion. - * @param exactlyCall The name of the function which represents a `CharSequence contains exactly` assertion. - */ -@Deprecated( - "Use the abstract class from package creating; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.creating.charsequence.contains.builders.CharSequenceContainsAtMostCheckerBuilderBase") -) -abstract class CharSequenceContainsAtMostCheckerBuilderBase( - val times: Int, - override val containsBuilder: CharSequenceContains.Builder, - nameContainsNotFun: String, - atMostCall: (Int) -> String, - atLeastCall: (Int) -> String, - exactlyCall: (Int) -> String -) : CharSequenceContainsCheckerBuilder { - - init { - validateAtMost(times, atMostCall, atLeastCall, exactlyCall) - } - - override val checkers: List = listOf( - CharSequenceContainsAtLeastChecker(1, nameContainsNotFun, atLeastCall), - CharSequenceContainsAtMostChecker(times, nameContainsNotFun, atMostCall) - ) -} diff --git a/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/charsequence/contains/builders/CharSequenceContainsButAtMostCheckerBuilderBase.kt b/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/charsequence/contains/builders/CharSequenceContainsButAtMostCheckerBuilderBase.kt deleted file mode 100644 index df3d09611..000000000 --- a/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/charsequence/contains/builders/CharSequenceContainsButAtMostCheckerBuilderBase.kt +++ /dev/null @@ -1,54 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0 */) -package ch.tutteli.atrium.assertions.charsequence.contains.builders - -import ch.tutteli.atrium.assertions.basic.contains.builders.validateButAtMost -import ch.tutteli.atrium.assertions.charsequence.contains.CharSequenceContains.Checker -import ch.tutteli.atrium.assertions.charsequence.contains.checkers.CharSequenceContainsAtMostChecker -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains - -/** - * The base class for builders which create the second step of a `contains at least but at most` check within the - * fluent API of a sophisticated `contains` assertion for [CharSequence]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied to the input of the search. - * - * @property times The number which the check will compare against the actual number of times an expected object - * is found in the input of the search. - * - * @constructor The base class for builders which create the second step of a `contains at least but at most` check - * within the fluent API of a sophisticated `contains` assertion for [CharSequence]. - * @param times The number which the check will compare against the actual number of times an expected object is - * found in the input of the search. - * @param containsBuilder The previously used [CharSequenceContainsBuilder]. - * @param nameContainsNotFun The name of the function which represents a `CharSequence contains not` assertion. - * @param atMostCall The name of the function which represents a `CharSequence contains at most` assertion. - * @param atLeastCall The name of the function which represents a `CharSequence contains at least` assertion. - * @param butAtMostCall The name of the function which was called and created this builder. - * @param exactlyCall The name of the function which represents a `CharSequence contains exactly` assertion. - */ -@Deprecated( - "Use the abstract class from package creating; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.creating.charsequence.contains.builders.CharSequenceContainsButAtMostCheckerBuilderBase") -) -abstract class CharSequenceContainsButAtMostCheckerBuilderBase( - val times: Int, - atLeastBuilder: CharSequenceContainsAtLeastCheckerBuilderBase, - override val containsBuilder: CharSequenceContains.Builder, - nameContainsNotFun: String, - atLeastButAtMostCall: (Int, Int) -> String, - atMostCall: (Int) -> String, - atLeastCall: (Int) -> String, - butAtMostCall: (Int) -> String, - exactlyCall: (Int) -> String -) : CharSequenceContainsCheckerBuilder { - - init { - validateButAtMost(atLeastBuilder.times, times, atLeastButAtMostCall, atLeastCall, butAtMostCall, exactlyCall) - } - - override val checkers: List = listOf( - *atLeastBuilder.checkers.toTypedArray(), - CharSequenceContainsAtMostChecker(times, nameContainsNotFun, atMostCall) - ) -} diff --git a/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/charsequence/contains/builders/CharSequenceContainsExactlyCheckerBuilderBase.kt b/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/charsequence/contains/builders/CharSequenceContainsExactlyCheckerBuilderBase.kt deleted file mode 100644 index f3a379f9c..000000000 --- a/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/charsequence/contains/builders/CharSequenceContainsExactlyCheckerBuilderBase.kt +++ /dev/null @@ -1,39 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0 */) -package ch.tutteli.atrium.assertions.charsequence.contains.builders - -import ch.tutteli.atrium.assertions.charsequence.contains.CharSequenceContains.Checker -import ch.tutteli.atrium.assertions.charsequence.contains.checkers.CharSequenceContainsExactlyChecker -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains - -/** - * The base class for builders which create a `contains exactly` check within the fluent API of a sophisticated - * `contains` assertion for [CharSequence]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - * - * @property times The number which the check will compare against the actual number of times an expected object - * is found in the input of the search. - * - * @constructor The base class for builders which create a `contains exactly` check within the fluent API of a sophisticated - * `contains` assertion for [CharSequence]. - * @param times The number which the check will compare against the actual number of times an expected object is - * found in the input of the search. - * @param containsBuilder The previously used [CharSequenceContainsBuilder]. - * @param nameContainsNotFun The name of the function which represents a `CharSequence contains not` assertion. - * @param exactlyCall The function call which should not be used if [times] equals to zero. - */ -@Deprecated( - "Use the abstract class from package creating; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.creating.charsequence.contains.builders.CharSequenceContainsExactlyCheckerBuilderBase") -) -abstract class CharSequenceContainsExactlyCheckerBuilderBase( - val times: Int, - override val containsBuilder: CharSequenceContains.Builder, - nameContainsNotFun: String, - exactlyCall: (Int) -> String -) : CharSequenceContainsCheckerBuilder { - - override val checkers: List = - listOf(CharSequenceContainsExactlyChecker(times, nameContainsNotFun, exactlyCall)) -} diff --git a/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/charsequence/contains/builders/CharSequenceContainsNotCheckerBuilderBase.kt b/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/charsequence/contains/builders/CharSequenceContainsNotCheckerBuilderBase.kt deleted file mode 100644 index d3cc3e75f..000000000 --- a/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/charsequence/contains/builders/CharSequenceContainsNotCheckerBuilderBase.kt +++ /dev/null @@ -1,27 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0 */) -package ch.tutteli.atrium.assertions.charsequence.contains.builders - -import ch.tutteli.atrium.assertions.charsequence.contains.checkers.CharSequenceContainsNotChecker -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains - -/** - * The base class for builders which create a `contains not` check within the fluent API of a sophisticated - * `contains` assertion for [CharSequence]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - * - * @constructor The base class for builders which create a `contains at least` check within the fluent API of a - * sophisticated `contains` assertion for [CharSequence]. - */ -@Deprecated( - "Use the abstract class from package creating; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.creating.charsequence.contains.builders.CharSequenceContainsNotCheckerBuilderBase") -) -abstract class CharSequenceContainsNotCheckerBuilderBase( - override val containsBuilder: CharSequenceContains.Builder -) : CharSequenceContainsCheckerBuilder { - - override val checkers = listOf(CharSequenceContainsNotChecker()) -} - diff --git a/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/charsequence/contains/builders/CharSequenceContainsNotOrAtMostCheckerBuilderBase.kt b/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/charsequence/contains/builders/CharSequenceContainsNotOrAtMostCheckerBuilderBase.kt deleted file mode 100644 index 80b81d8fc..000000000 --- a/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/charsequence/contains/builders/CharSequenceContainsNotOrAtMostCheckerBuilderBase.kt +++ /dev/null @@ -1,40 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0 */) -package ch.tutteli.atrium.assertions.charsequence.contains.builders - -import ch.tutteli.atrium.assertions.charsequence.contains.CharSequenceContains.Checker -import ch.tutteli.atrium.assertions.charsequence.contains.checkers.CharSequenceContainsAtMostChecker -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains - -/** - * The base class for builders which create a `contains not or at most` check within the fluent API of a - * sophisticated `contains` assertion for [CharSequence]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - * - * @property times The number which the check will compare against the actual number of times an expected object - * is found in the input of the search. - * - * @constructor The base class for builders which create a `contains not or at most` check within the fluent API of a - * sophisticated `contains` assertion for [CharSequence]. - * @param times The number which the check will compare against the actual number of times an expected object is - * found in the input of the search. - * @param containsBuilder The previously used [CharSequenceContainsBuilder]. - * @param nameContainsNotFun The name of the function which represents a `CharSequence contains not` assertion. - * @param notOrAtMostCall The name of the function which was called and created this builder. - */ -@Deprecated( - "Use the abstract class from package creating; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.creating.charsequence.contains.builders.CharSequenceContainsNotOrAtMostCheckerBuilderBase") -) -abstract class CharSequenceContainsNotOrAtMostCheckerBuilderBase( - val times: Int, - override val containsBuilder: CharSequenceContains.Builder, - nameContainsNotFun: String, - notOrAtMostCall: (Int) -> String -) : CharSequenceContainsCheckerBuilder { - - override val checkers: List = listOf( - CharSequenceContainsAtMostChecker(times, nameContainsNotFun, notOrAtMostCall) - ) -} diff --git a/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/charsequence/contains/checkers/CharSequenceContainsAtLeastChecker.kt b/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/charsequence/contains/checkers/CharSequenceContainsAtLeastChecker.kt deleted file mode 100644 index 9cf8ce36d..000000000 --- a/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/charsequence/contains/checkers/CharSequenceContainsAtLeastChecker.kt +++ /dev/null @@ -1,26 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0 */) -package ch.tutteli.atrium.assertions.charsequence.contains.checkers - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.translations.DescriptionCharSequenceAssertion - -/** - * Represents a check that an expected object is contained at least [times] in the search input. - * - * @param times The number which the check uses to compare against the actual number of times an expected object is - * found in the input of the search. - * @param nameContainsNotFun The function which should be used instead of `atLeastCall` when [times] equals to zero. - * @param atLeastCall The function which was used and should not be used if [times] equals to zero. - * - * @throws IllegalArgumentException In case [times] is smaller than 1. - */ -@Deprecated("Use CharSequenceContainsCheckers.newAtLeastChecker; will be removed with 1.0.0", ReplaceWith("CharSequenceContainsCheckers.newAtLeastChecker(times, nameContainsNotFun, atLeastCall)", "ch.tutteli.atrium.creating.charsequence.contains.checkers.CharSequenceContainsCheckers")) -class CharSequenceContainsAtLeastChecker( - times: Int, - nameContainsNotFun: String, - atLeastCall: (Int) -> String -) : CharSequenceContainsChecker(times, nameContainsNotFun, atLeastCall) { - - override fun createAssertion(foundNumberOfTimes: Int): Assertion - = createBasicAssertion(DescriptionCharSequenceAssertion.AT_LEAST, foundNumberOfTimes >= times) -} diff --git a/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/charsequence/contains/checkers/CharSequenceContainsAtMostChecker.kt b/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/charsequence/contains/checkers/CharSequenceContainsAtMostChecker.kt deleted file mode 100644 index 435d21ee3..000000000 --- a/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/charsequence/contains/checkers/CharSequenceContainsAtMostChecker.kt +++ /dev/null @@ -1,26 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0 */) -package ch.tutteli.atrium.assertions.charsequence.contains.checkers - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.translations.DescriptionCharSequenceAssertion - -/** - * Represents a check that an expected object is contained at most [times] in the search input. - * - * @param times The number which the check uses to compare against the actual number of times an expected object is - * found in the input of the search. - * @param nameContainsNotFun The function which should be used instead of `atMostCall` when [times] equals to zero. - * @param atMostCall The function which was used and should not be used if [times] equals to zero. - * - * @throws IllegalArgumentException In case [times] is smaller than 1. - */ -@Deprecated("Use CharSequenceContainsCheckers.newAtMostChecker; will be removed with 1.0.0", ReplaceWith("CharSequenceContainsCheckers.newAtMostChecker(times, nameContainsNotFun, atMostCall)", "ch.tutteli.atrium.creating.charsequence.contains.checkers.CharSequenceContainsCheckers")) -class CharSequenceContainsAtMostChecker( - times: Int, - nameContainsNotFun: String, - atMostCall: (Int) -> String -) : CharSequenceContainsChecker(times, nameContainsNotFun, atMostCall) { - - override fun createAssertion(foundNumberOfTimes: Int): Assertion - = createBasicAssertion(DescriptionCharSequenceAssertion.AT_MOST, foundNumberOfTimes <= times) -} diff --git a/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/charsequence/contains/checkers/CharSequenceContainsChecker.kt b/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/charsequence/contains/checkers/CharSequenceContainsChecker.kt deleted file mode 100644 index e9290bfa9..000000000 --- a/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/charsequence/contains/checkers/CharSequenceContainsChecker.kt +++ /dev/null @@ -1,25 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0 */) -package ch.tutteli.atrium.assertions.charsequence.contains.checkers - -import ch.tutteli.atrium.assertions.basic.contains.checkers.ContainsChecker -import ch.tutteli.atrium.assertions.charsequence.contains.CharSequenceContains - -/** - * Represents the base class for [CharSequenceContains.Checker]. - * - * It does not do much more than specifying that its super class is [ContainsChecker] and sub-classes have to implement - * [CharSequenceContains.Checker]. - * - * @param times The number which the check uses to compare against the actual number of times an expected object is - * found in the input of the search. - * @param correctCall The function which should be used instead of `wrongCall` when [times] equals to zero. - * @param wrongCall The function call which was used and should not be used if [times] equals to zero. - * - * @throws IllegalArgumentException In case [times] is smaller than 1. - */ -@Deprecated("Use the abstract class from package creating; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.creating.charsequence.contains.checkers.CharSequenceContainsChecker")) -abstract class CharSequenceContainsChecker( - times: Int, - correctCall: String, - wrongCall: (Int) -> String -) : ContainsChecker(times, correctCall, wrongCall), CharSequenceContains.Checker diff --git a/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/charsequence/contains/checkers/CharSequenceContainsExactlyChecker.kt b/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/charsequence/contains/checkers/CharSequenceContainsExactlyChecker.kt deleted file mode 100644 index c7f0c16d2..000000000 --- a/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/charsequence/contains/checkers/CharSequenceContainsExactlyChecker.kt +++ /dev/null @@ -1,26 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0 */) -package ch.tutteli.atrium.assertions.charsequence.contains.checkers - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.translations.DescriptionCharSequenceAssertion - -/** - * Represents a check that an expected object is contained exactly [times] in the search input. - * - * @param times The number which the check uses to compare against the actual number of times an expected object is - * found in the input of the search. - * @param nameContainsNotFun The function which should be used instead of `exactlyCall` when [times] equals to zero. - * @param exactlyCall The function call which was used and should not be used if [times] equals to zero. - * - * @throws IllegalArgumentException In case [times] is smaller than 1. - */ -@Deprecated("Use CharSequenceContainsCheckers.newExactlyChecker; will be removed with 1.0.0", ReplaceWith("CharSequenceContainsCheckers.newExactlyChecker(times, nameContainsNotFun, exactlyCall)", "ch.tutteli.atrium.creating.charsequence.contains.checkers.CharSequenceContainsCheckers")) -class CharSequenceContainsExactlyChecker( - times: Int, - nameContainsNotFun: String, - exactlyCall: (Int) -> String -) : CharSequenceContainsChecker(times, nameContainsNotFun, exactlyCall) { - - override fun createAssertion(foundNumberOfTimes: Int): Assertion - = createBasicAssertion(DescriptionCharSequenceAssertion.EXACTLY, foundNumberOfTimes == times) -} diff --git a/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/charsequence/contains/checkers/CharSequenceContainsNotChecker.kt b/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/charsequence/contains/checkers/CharSequenceContainsNotChecker.kt deleted file mode 100644 index 67b8af0bc..000000000 --- a/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/charsequence/contains/checkers/CharSequenceContainsNotChecker.kt +++ /dev/null @@ -1,17 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0 */) -package ch.tutteli.atrium.assertions.charsequence.contains.checkers - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.assertions.charsequence.contains.CharSequenceContains -import ch.tutteli.atrium.domain.builders.AssertImpl -import ch.tutteli.atrium.translations.DescriptionBasic - -/** - * Represents a check that an expected object is not contained in the search input. - */ -@Deprecated("Use CharSequenceContainsCheckers.newNotChecker; will be removed with 1.0.0", ReplaceWith("CharSequenceContainsCheckers.newNotChecker()", "ch.tutteli.atrium.creating.charsequence.contains.checkers.CharSequenceContainsCheckers")) -class CharSequenceContainsNotChecker : CharSequenceContains.Checker { - - override fun createAssertion(foundNumberOfTimes: Int): Assertion - = AssertImpl.builder.createDescriptive(DescriptionBasic.IS, 0) { foundNumberOfTimes == 0 } -} diff --git a/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/charsequence/contains/creators/CharSequenceContainsAssertionCreator.kt b/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/charsequence/contains/creators/CharSequenceContainsAssertionCreator.kt deleted file mode 100644 index f388b73ac..000000000 --- a/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/charsequence/contains/creators/CharSequenceContainsAssertionCreator.kt +++ /dev/null @@ -1,40 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0 */) -package ch.tutteli.atrium.assertions.charsequence.contains.creators - -import ch.tutteli.atrium.assertions.AssertionGroup -import ch.tutteli.atrium.assertions.basic.contains.creators.ContainsObjectsAssertionCreator -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains.* -import ch.tutteli.atrium.translations.DescriptionCharSequenceAssertion - -/** - * Represents a creator of sophisticated `contains` assertions for [CharSequence]. - * - * A sophisticated `contains` assertion is build up by a desired [SearchBehaviour], a [Searcher] and a number of - * [Checker]s. The [searcher] searches for specified objects -- considering the given [searchBehaviour] -- and - * then passes on the result to the given [checkers] which in turn create the assertions representing the - * corresponding check. Those created assertions are then grouped into an [AssertionGroup] which represents the - * sophisticated assertion as a whole. - * - * @param T The type of the [AssertionPlant.subject][SubjectProvider.subject] for which the `contains` assertion is be build. - * @param S The search behaviour which should be applied to the input of the search. - * - * @constructor Represents a creator for sophisticated `contains` assertions for [CharSequence]. - * @param searchBehaviour The search behaviour. - * @param searcher The search method which is used to search for given objects. - * @param checkers The checkers which create assertions based on the search result. - */ -@Deprecated("Please open an issue if you used this class; will be removed with 1.0.0") -class CharSequenceContainsAssertionCreator( - searchBehaviour: S, - private val searcher: Searcher, - checkers: List -) : ContainsObjectsAssertionCreator(searchBehaviour, checkers), Creator { - - override val descriptionContains = DescriptionCharSequenceAssertion.CONTAINS - override val descriptionNumberOfOccurrences = DescriptionCharSequenceAssertion.NUMBER_OF_OCCURRENCES - - override fun search(subjectProvider: SubjectProvider, searchCriterion: Any): Int - = searcher.search(subjectProvider.subject, searchCriterion) -} diff --git a/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/charsequence/contains/creators/creators.kt b/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/charsequence/contains/creators/creators.kt deleted file mode 100644 index 21afc50b6..000000000 --- a/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/charsequence/contains/creators/creators.kt +++ /dev/null @@ -1,113 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0 */) -package ch.tutteli.atrium.assertions.charsequence.contains.creators - -import ch.tutteli.atrium.assertions.AssertionGroup -import ch.tutteli.atrium.assertions.charsequence.contains.CharSequenceContains -import ch.tutteli.atrium.assertions.charsequence.contains.builders.CharSequenceContainsCheckerBuilder -import ch.tutteli.atrium.assertions.charsequence.contains.searchbehaviours.CharSequenceContainsIgnoringCaseSearchBehaviour -import ch.tutteli.atrium.assertions.charsequence.contains.searchbehaviours.CharSequenceContainsNoOpSearchBehaviour -import ch.tutteli.atrium.assertions.charsequence.contains.searchers.CharSequenceContainsIgnoringCaseIndexSearcher -import ch.tutteli.atrium.assertions.charsequence.contains.searchers.CharSequenceContainsIgnoringCaseRegexSearcher -import ch.tutteli.atrium.assertions.charsequence.contains.searchers.CharSequenceContainsIndexSearcher -import ch.tutteli.atrium.assertions.charsequence.contains.searchers.CharSequenceContainsRegexSearcher -import ch.tutteli.atrium.reporting.translating.Translatable - -@Deprecated("Use AssertImpl.charSequence.contains.values; will be removed with 1.0.0", - ReplaceWith( - "AssertImpl.charSequence.contains.values(checker, expected, *otherExpected)", - "ch.tutteli.atrium.creating.AssertImpl" - ) -) -fun _containsValues( - checker: CharSequenceContainsCheckerBuilder, - expected: Any, - otherExpected: Array -): AssertionGroup - = checkOnlyAllowedTypeAndCreateAssertionGroup(checker, CharSequenceContainsIndexSearcher(), expected, otherExpected) - - -@Deprecated("Use AssertImpl.charSequence.contains.valuesIgnoringCase; will be removed with 1.0.0", - ReplaceWith( - "AssertImpl.charSequence.contains.valuesIgnoringCase(checker, expected, *otherExpected)", - "ch.tutteli.atrium.creating.AssertImpl" - ) -) -fun _containsValuesIgnoringCase( - checker: CharSequenceContainsCheckerBuilder, - expected: Any, - otherExpected: Array -): AssertionGroup - = checkOnlyAllowedTypeAndCreateAssertionGroup(checker, CharSequenceContainsIgnoringCaseIndexSearcher(), expected, otherExpected) - -private fun checkOnlyAllowedTypeAndCreateAssertionGroup( - checker: CharSequenceContainsCheckerBuilder, - searcher: CharSequenceContains.Searcher, - expected: Any, - otherExpected: Array -): AssertionGroup { - listOf(expected, *otherExpected).forEach { - require(it is CharSequence || it is Number || it is Char) { - "Only CharSequence, Number and Char are allowed, `$it` given.\nWe provide an API with Any for convenience (so that you can mix String and Int for instance).\nUse toString() if you really want to search for its toString()-representation." - } - } - return createAssertionGroup(checker, searcher, expected, otherExpected) -} - -//TODO remove with 1.0.0 -@Suppress("DeprecatedCallableAddReplaceWith") -@Deprecated("will be removed with 1.0.0") -fun _containsDefaultTranslationOf( - checker: CharSequenceContainsCheckerBuilder, - expected: Translatable, - otherExpected: Array -): AssertionGroup - = _containsValues(checker, expected.getDefault(), mapDefaultTranslations(otherExpected)) - -//TODO remove with 1.0.0 -@Suppress("DeprecatedCallableAddReplaceWith") -@Deprecated("will be removed with 1.0.0") -fun _containsDefaultTranslationOfIgnoringCase( - checker: CharSequenceContainsCheckerBuilder, - expected: Translatable, - otherExpected: Array -): AssertionGroup - = _containsValuesIgnoringCase(checker, expected.getDefault(), mapDefaultTranslations(otherExpected)) - -private fun mapDefaultTranslations(otherExpected: Array) = - otherExpected.map { it.getDefault() }.toTypedArray() - -@Deprecated("Use AssertImpl.charSequence.contains.regex; will be removed with 1.0.0", - ReplaceWith( - "AssertImpl.charSequence.contains.regex(checker, expected, *otherExpected)", - "ch.tutteli.atrium.creating.AssertImpl" - ) -) -fun _containsRegex( - checker: CharSequenceContainsCheckerBuilder, - expected: String, - otherExpected: Array -): AssertionGroup - = createAssertionGroup(checker, CharSequenceContainsRegexSearcher(), expected, otherExpected) - -@Deprecated("Use AssertImpl.charSequence.contains.regexIgnoringCase; will be removed with 1.0.0", - ReplaceWith( - "AssertImpl.charSequence.contains.regexIgnoringCase(checker, expected, *otherExpected)", - "ch.tutteli.atrium.creating.AssertImpl" - ) -) -fun _containsRegexIgnoringCase( - checker: CharSequenceContainsCheckerBuilder, - expected: String, - otherExpected: Array -): AssertionGroup - = createAssertionGroup(checker, CharSequenceContainsIgnoringCaseRegexSearcher(), expected, otherExpected) - -private fun createAssertionGroup( - checker: CharSequenceContainsCheckerBuilder, - searcher: CharSequenceContains.Searcher, - expected: Any, - otherExpected: Array -): AssertionGroup { - return CharSequenceContainsAssertionCreator(checker.containsBuilder.searchBehaviour, searcher, checker.checkers) - .createAssertionGroup(checker.containsBuilder.subjectProvider, expected, otherExpected) -} diff --git a/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/charsequence/contains/searchbehaviours/searchBehaviours.kt b/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/charsequence/contains/searchbehaviours/searchBehaviours.kt deleted file mode 100644 index 49befb49c..000000000 --- a/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/charsequence/contains/searchbehaviours/searchBehaviours.kt +++ /dev/null @@ -1,13 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0 */) -package ch.tutteli.atrium.assertions.charsequence.contains.searchbehaviours - -import ch.tutteli.atrium.assertions.charsequence.contains.builders.CharSequenceContainsBuilder - -@Deprecated("Use AssertImpl.charSequence.contains.searchBehaviours.ignoreCase; will be removed with 1.0.0", - ReplaceWith( - "AssertImpl.charSequence.contains.searchBehaviours.ignoreCase(containsBuilder)", - "ch.tutteli.atrium.creating.AssertImpl" - ) -) -fun _containsIgnoringCase(containsBuilder: CharSequenceContainsBuilder) - = CharSequenceContainsBuilder(containsBuilder.subjectProvider, CharSequenceContainsIgnoringCaseSearchBehaviour(containsBuilder.searchBehaviour)) diff --git a/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/charsequence/contains/searchers/CharSequenceContainsIgnoringCaseIndexSearcher.kt b/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/charsequence/contains/searchers/CharSequenceContainsIgnoringCaseIndexSearcher.kt deleted file mode 100644 index f966d0a7f..000000000 --- a/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/charsequence/contains/searchers/CharSequenceContainsIgnoringCaseIndexSearcher.kt +++ /dev/null @@ -1,17 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0 */) -package ch.tutteli.atrium.assertions.charsequence.contains.searchers - -import ch.tutteli.atrium.assertions.charsequence.contains.CharSequenceContains.Searcher -import ch.tutteli.atrium.assertions.charsequence.contains.searchbehaviours.CharSequenceContainsIgnoringCaseSearchBehaviour - -/** - * Represents a [Searcher] which implements the [CharSequenceContainsIgnoringCaseSearchBehaviour] behaviour and uses - * [CharSequence.indexOf] to find expected objects. - */ -@Deprecated("Please open an issue if you used this class; will be removed with 1.0.0") -class CharSequenceContainsIgnoringCaseIndexSearcher : Searcher { - private val searcher = CharSequenceContainsIndexSearcher() - - override fun search(searchIn: CharSequence, searchFor: Any): Int - = searcher.search(searchIn.toString().toUpperCase(), searchFor.toString().toUpperCase()) -} diff --git a/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/charsequence/contains/searchers/CharSequenceContainsIgnoringCaseRegexSearcher.kt b/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/charsequence/contains/searchers/CharSequenceContainsIgnoringCaseRegexSearcher.kt deleted file mode 100644 index c2b861c43..000000000 --- a/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/charsequence/contains/searchers/CharSequenceContainsIgnoringCaseRegexSearcher.kt +++ /dev/null @@ -1,20 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0 */) -package ch.tutteli.atrium.assertions.charsequence.contains.searchers - -import ch.tutteli.atrium.assertions.charsequence.contains.CharSequenceContains.Searcher -import ch.tutteli.atrium.assertions.charsequence.contains.searchbehaviours.CharSequenceContainsIgnoringCaseSearchBehaviour -import java.util.regex.Pattern - -/** - * Represents a [Searcher] which implements the [CharSequenceContainsIgnoringCaseSearchBehaviour] behaviour and evaluates - * the matches of a given regular expression on the input of the search. - */ -@Deprecated("Please open an issue if you used this class; will be removed with 1.0.0") -class CharSequenceContainsIgnoringCaseRegexSearcher : Searcher { - private val searcher = CharSequenceContainsRegexSearcher() - - override fun search(searchIn: CharSequence, searchFor: Any): Int { - val pattern = Pattern.compile(searchFor.toString(), Pattern.CASE_INSENSITIVE) - return searcher.search(searchIn, pattern) - } -} diff --git a/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/charsequence/contains/searchers/CharSequenceContainsIndexSearcher.kt b/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/charsequence/contains/searchers/CharSequenceContainsIndexSearcher.kt deleted file mode 100644 index 9bc40755e..000000000 --- a/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/charsequence/contains/searchers/CharSequenceContainsIndexSearcher.kt +++ /dev/null @@ -1,22 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0 */) -package ch.tutteli.atrium.assertions.charsequence.contains.searchers - -import ch.tutteli.atrium.assertions.charsequence.contains.CharSequenceContains.Searcher -import ch.tutteli.atrium.assertions.charsequence.contains.searchbehaviours.CharSequenceContainsNoOpSearchBehaviour - -/** - * Represents a [Searcher] which uses [CharSequence.indexOf] to find expected objects. - */ -@Deprecated("Please open an issue if you used this class; will be removed with 1.0.0") -class CharSequenceContainsIndexSearcher : Searcher { - override fun search(searchIn: CharSequence, searchFor: Any): Int { - val expected = searchFor.toString() - var index = searchIn.indexOf(expected) - var counter = 0 - while (index >= 0) { - index = searchIn.indexOf(expected, index + 1) - ++counter - } - return counter - } -} diff --git a/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/charsequence/contains/searchers/CharSequenceContainsRegexSearcher.kt b/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/charsequence/contains/searchers/CharSequenceContainsRegexSearcher.kt deleted file mode 100644 index acaf44bb0..000000000 --- a/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/charsequence/contains/searchers/CharSequenceContainsRegexSearcher.kt +++ /dev/null @@ -1,26 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0 */) -package ch.tutteli.atrium.assertions.charsequence.contains.searchers - -import ch.tutteli.atrium.assertions.charsequence.contains.CharSequenceContains.Searcher -import ch.tutteli.atrium.assertions.charsequence.contains.searchbehaviours.CharSequenceContainsNoOpSearchBehaviour -import java.util.regex.Pattern - -/** - * Represents a [Searcher] which evaluates the matches of a given regular expression on the input of the search. - */ -@Deprecated("Please open an issue if you used this class; will be removed with 1.0.0") -class CharSequenceContainsRegexSearcher : Searcher { - override fun search(searchIn: CharSequence, searchFor: Any): Int - = search(searchIn, Pattern.compile(searchFor.toString())) - - fun search(searchIn: CharSequence, pattern: Pattern): Int { - var index = 0 - var counter = 0 - val matcher = pattern.matcher(searchIn) - while (matcher.find(index)) { - index = matcher.start() + 1 - ++counter - } - return counter - } -} diff --git a/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/collectionAssertions.kt b/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/collectionAssertions.kt deleted file mode 100644 index 3027d4633..000000000 --- a/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/collectionAssertions.kt +++ /dev/null @@ -1,34 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") -package ch.tutteli.atrium.assertions - -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.domain.builders.AssertImpl - -@Deprecated("Use AssertImpl.collection.hasSize; will be removed with 1.0.0", - ReplaceWith( - "AssertImpl.collection.hasSize(plant, size)", - "ch.tutteli.atrium.creating.AssertImpl" - ) -) -@Suppress("DEPRECATION") -fun > _hasSize(plant: AssertionPlant, size: Int): Assertion - = AssertImpl.collection.hasSize(plant, size) - -@Deprecated("Use AssertImpl.collection.isEmpty; will be removed with 1.0.0", - ReplaceWith( - "AssertImpl.collection.isEmpty(plant)", - "ch.tutteli.atrium.creating.AssertImpl" - ) -) -fun > _isEmpty(plant: AssertionPlant): Assertion - = AssertImpl.collection.isEmpty(plant) - -@Deprecated("Use AssertImpl.collection.isNotEmpty; will be removed with 1.0.0", - ReplaceWith( - "AssertImpl.collection.isNotEmpty(plant)", - "ch.tutteli.atrium.creating.AssertImpl" - ) -) -fun > _isNotEmpty(plant: AssertionPlant): Assertion - = AssertImpl.collection.isNotEmpty(plant) diff --git a/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/comparableAssertions.kt b/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/comparableAssertions.kt deleted file mode 100644 index 5cc025105..000000000 --- a/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/comparableAssertions.kt +++ /dev/null @@ -1,42 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") -package ch.tutteli.atrium.assertions - -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.domain.builders.AssertImpl - -@Deprecated("Use AssertImpl.comparable.isLessThan; will be removed with 1.0.0", - ReplaceWith( - "AssertImpl.comparable.isLessThan(plant, expected)", - "ch.tutteli.atrium.creating.AssertImpl" - ) -) -fun > _isLessThan(plant: AssertionPlant, expected: T) - = AssertImpl.comparable.isLessThan(plant, expected) - -@Deprecated("Use AssertImpl.comparable.isLessOrEquals; will be removed with 1.0.0", - ReplaceWith( - "AssertImpl.comparable.isLessOrEquals(plant, expected)", - "ch.tutteli.atrium.creating.AssertImpl" - ) -) -fun > _isLessOrEquals(plant: AssertionPlant, expected: T) - = AssertImpl.comparable.isLessOrEquals(plant, expected) - -@Deprecated("Use AssertImpl.comparable.isGreaterThan; will be removed with 1.0.0", - ReplaceWith( - "AssertImpl.comparable.isGreaterThan(plant, expected)", - "ch.tutteli.atrium.creating.AssertImpl" - ) -) -fun > _isGreaterThan(plant: AssertionPlant, expected: T) - = AssertImpl.comparable.isGreaterThan(plant, expected) - -@Deprecated("Use AssertImpl.comparable.isGreaterOrEquals; will be removed with 1.0.0", - ReplaceWith( - "AssertImpl.comparable.isGreaterOrEquals(plant, expected)", - "ch.tutteli.atrium.creating.AssertImpl" - ) -) -fun > _isGreaterOrEquals(plant: AssertionPlant, expected: T) - = AssertImpl.comparable.isGreaterOrEquals(plant, expected) diff --git a/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/featureAssertions.kt b/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/featureAssertions.kt deleted file mode 100644 index b4abc73be..000000000 --- a/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/featureAssertions.kt +++ /dev/null @@ -1,370 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") -package ch.tutteli.atrium.assertions - -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.creating.AssertionPlantNullable -import ch.tutteli.atrium.domain.builders.AssertImpl -import kotlin.reflect.* - -@Deprecated("Use AssertImpl.feature.property; will be removed with 1.0.0", - ReplaceWith( - "AssertImpl.feature.property(plant, property)", - "ch.tutteli.atrium.creating.AssertImpl" - ) -) -fun _property(plant: AssertionPlant, property: KProperty0): AssertionPlant - = AssertImpl.feature.property(plant, property) - -@Deprecated("Use AssertImpl.feature.property; will be removed with 1.0.0", - ReplaceWith( - "AssertImpl.feature.property(plant, property, assertionCreator)", - "ch.tutteli.atrium.creating.AssertImpl" - ) -) -fun _property(plant: AssertionPlant, property: KProperty0, assertionCreator: AssertionPlant.() -> Unit): AssertionPlant - = AssertImpl.feature.property(plant, property, assertionCreator) - -@Deprecated("Use AssertImpl.feature.property; will be removed with 1.0.0", - ReplaceWith( - "AssertImpl.feature.property(plant, property)", - "ch.tutteli.atrium.creating.AssertImpl" - ) -) -fun _property(plant: AssertionPlant, property: KProperty0): AssertionPlantNullable - = AssertImpl.feature.property(plant, property) - -//Arg0 -@Deprecated("Use AssertImpl.feature.returnValueOf0; will be removed with 1.0.0", - ReplaceWith( - "AssertImpl.feature.returnValueOf0(plant, method)", - "ch.tutteli.atrium.creating.AssertImpl" - ) -) -fun _returnValueOf(plant: AssertionPlant, method: KFunction0): AssertionPlant - = AssertImpl.feature.returnValueOf0(plant, method) - -@Deprecated("Use AssertImpl.feature.returnValueOf0; will be removed with 1.0.0", - ReplaceWith( - "AssertImpl.feature.returnValueOf0(plant, method, name)", - "ch.tutteli.atrium.creating.AssertImpl" - ) -) -fun _method(plant: AssertionPlant, name: String, method: () -> TReturnValue): AssertionPlant - = AssertImpl.feature.returnValueOf0(plant, method, name) - -@Deprecated("Use AssertImpl.feature.returnValueOf0; will be removed with 1.0.0", - ReplaceWith( - "AssertImpl.feature.returnValueOf0(plant, method, assertionCreator)", - "ch.tutteli.atrium.creating.AssertImpl" - ) -) -fun _returnValueOf(plant: AssertionPlant, method: KFunction0, assertionCreator: AssertionPlant.() -> Unit): AssertionPlant - = AssertImpl.feature.returnValueOf0(plant, method, assertionCreator) - -@Deprecated("Use AssertImpl.feature.returnValueOf0; will be removed with 1.0.0", - ReplaceWith( - "AssertImpl.feature.returnValueOf0(plant, method, name, assertionCreator)", - "ch.tutteli.atrium.creating.AssertImpl" - ) -) -fun _method(plant: AssertionPlant, name: String, method: () -> TReturnValue, assertionCreator: AssertionPlant.() -> Unit): AssertionPlant - = AssertImpl.feature.returnValueOf0(plant, method, name, assertionCreator) - -@Deprecated("Use AssertImpl.feature.returnValueOf0; will be removed with 1.0.0", - ReplaceWith( - "AssertImpl.feature.returnValueOf0(plant, method)", - "ch.tutteli.atrium.creating.AssertImpl" - ) -) -fun _returnValueOf(plant: AssertionPlant, method: KFunction0): AssertionPlantNullable - = AssertImpl.feature.returnValueOf0(plant, method) - -@Deprecated("Use AssertImpl.feature.returnValueOf0; will be removed with 1.0.0", - ReplaceWith( - "AssertImpl.feature.returnValueOf0(plant, method, name)", - "ch.tutteli.atrium.creating.AssertImpl" - ) -) -fun _method(plant: AssertionPlant, name: String, method: () -> TReturnValue): AssertionPlantNullable - = AssertImpl.feature.returnValueOf0(plant, method, name) - - -//Arg1 -@Deprecated("Use AssertImpl.feature.returnValueOf1; will be removed with 1.0.0", - ReplaceWith( - "AssertImpl.feature.returnValueOf1(plant, method, arg1)", - "ch.tutteli.atrium.creating.AssertImpl" - ) -) -fun _returnValueOf(plant: AssertionPlant, method: KFunction1, arg1: T1): AssertionPlant - = AssertImpl.feature.returnValueOf1(plant, method, arg1) - -@Deprecated("Use AssertImpl.feature.returnValueOf1; will be removed with 1.0.0", - ReplaceWith( - "AssertImpl.feature.returnValueOf1(plant, method, arg1, name)", - "ch.tutteli.atrium.creating.AssertImpl" - ) -) -fun _method(plant: AssertionPlant, name: String, method: (T1) -> TReturnValue, arg1: T1): AssertionPlant - = AssertImpl.feature.returnValueOf1(plant, method, arg1, name) - -@Deprecated("Use AssertImpl.feature.returnValueOf1; will be removed with 1.0.0", - ReplaceWith( - "AssertImpl.feature.returnValueOf1(plant, method, arg1, assertionCreator)", - "ch.tutteli.atrium.creating.AssertImpl" - ) -) -fun _returnValueOf(plant: AssertionPlant, method: KFunction1, arg1: T1, assertionCreator: AssertionPlant.() -> Unit): AssertionPlant - = AssertImpl.feature.returnValueOf1(plant, method, arg1, assertionCreator) - -@Deprecated("Use AssertImpl.feature.returnValueOf1; will be removed with 1.0.0", - ReplaceWith( - "AssertImpl.feature.returnValueOf1(plant, method, arg1, name, assertionCreator)", - "ch.tutteli.atrium.creating.AssertImpl" - ) -) -fun _method(plant: AssertionPlant, name: String, method: (T1) -> TReturnValue, arg1: T1, assertionCreator: AssertionPlant.() -> Unit): AssertionPlant - = AssertImpl.feature.returnValueOf1(plant, method, arg1, name, assertionCreator) - -@Deprecated("Use AssertImpl.feature.returnValueOf1; will be removed with 1.0.0", - ReplaceWith( - "AssertImpl.feature.returnValueOf1(plant, method, arg1)", - "ch.tutteli.atrium.creating.AssertImpl" - ) -) -fun _returnValueOf(plant: AssertionPlant, method: KFunction1, arg1: T1): AssertionPlantNullable - = AssertImpl.feature.returnValueOf1(plant, method, arg1) - -@Deprecated("Use AssertImpl.feature.returnValueOf1; will be removed with 1.0.0", - ReplaceWith( - "AssertImpl.feature.returnValueOf1(plant, method, arg1, name)", - "ch.tutteli.atrium.creating.AssertImpl" - ) -) -fun _method(plant: AssertionPlant, name: String, method: (T1) -> TReturnValue, arg1: T1): AssertionPlantNullable - = AssertImpl.feature.returnValueOf1(plant, method, arg1, name) - - -//Arg2 -@Deprecated("Use AssertImpl.feature.returnValueOf2; will be removed with 1.0.0", - ReplaceWith( - "AssertImpl.feature.returnValueOf2(plant, method, arg1, arg2)", - "ch.tutteli.atrium.creating.AssertImpl" - ) -) -fun _returnValueOf(plant: AssertionPlant, method: KFunction2, arg1: T1, arg2: T2): AssertionPlant - = AssertImpl.feature.returnValueOf2(plant, method, arg1, arg2) - -@Deprecated("Use AssertImpl.feature.returnValueOf2; will be removed with 1.0.0", - ReplaceWith( - "AssertImpl.feature.returnValueOf2(plant, method, arg1, arg2, name)", - "ch.tutteli.atrium.creating.AssertImpl" - ) -) -fun _method(plant: AssertionPlant, name: String, method: (T1, T2) -> TReturnValue, arg1: T1, arg2: T2): AssertionPlant - = AssertImpl.feature.returnValueOf2(plant, method, arg1, arg2, name) - -@Deprecated("Use AssertImpl.feature.returnValueOf2; will be removed with 1.0.0", - ReplaceWith( - "AssertImpl.feature.returnValueOf2(plant, method, arg1, arg2, assertionCreator)", - "ch.tutteli.atrium.creating.AssertImpl" - ) -) -fun _returnValueOf(plant: AssertionPlant, method: KFunction2, arg1: T1, arg2: T2, assertionCreator: AssertionPlant.() -> Unit): AssertionPlant - = AssertImpl.feature.returnValueOf2(plant, method, arg1, arg2, assertionCreator) - -@Deprecated("Use AssertImpl.feature.returnValueOf2; will be removed with 1.0.0", - ReplaceWith( - "AssertImpl.feature.returnValueOf2(plant, method, arg1, arg2, name, assertionCreator)", - "ch.tutteli.atrium.creating.AssertImpl" - ) -) -fun _method(plant: AssertionPlant, name: String, method: (T1, T2) -> TReturnValue, arg1: T1, arg2: T2, assertionCreator: AssertionPlant.() -> Unit): AssertionPlant - = AssertImpl.feature.returnValueOf2(plant, method, arg1, arg2, name, assertionCreator) - -@Deprecated("Use AssertImpl.feature.returnValueOf2; will be removed with 1.0.0", - ReplaceWith( - "AssertImpl.feature.returnValueOf2(plant, method, arg1, arg2)", - "ch.tutteli.atrium.creating.AssertImpl" - ) -) -fun _returnValueOf(plant: AssertionPlant, method: KFunction2, arg1: T1, arg2: T2): AssertionPlantNullable - = AssertImpl.feature.returnValueOf2(plant, method, arg1, arg2) - -@Deprecated("Use AssertImpl.feature.returnValueOf2; will be removed with 1.0.0", - ReplaceWith( - "AssertImpl.feature.returnValueOf2(plant, method, arg1, arg2, name)", - "ch.tutteli.atrium.creating.AssertImpl" - ) -) -fun _method(plant: AssertionPlant, name: String, method: (T1, T2) -> TReturnValue, arg1: T1, arg2: T2): AssertionPlantNullable - = AssertImpl.feature.returnValueOf2(plant, method, arg1, arg2, name) - - -//Arg3 -@Deprecated("Use AssertImpl.feature.returnValueOf3; will be removed with 1.0.0", - ReplaceWith( - "AssertImpl.feature.returnValueOf3(plant, method, arg1, arg2, arg3)", - "ch.tutteli.atrium.creating.AssertImpl" - ) -) -fun _returnValueOf(plant: AssertionPlant, method: KFunction3, arg1: T1, arg2: T2, arg3: T3): AssertionPlant - = AssertImpl.feature.returnValueOf3(plant, method, arg1, arg2, arg3) - -@Deprecated("Use AssertImpl.feature.returnValueOf3; will be removed with 1.0.0", - ReplaceWith( - "AssertImpl.feature.returnValueOf3(plant, method, arg1, arg2, arg3, name)", - "ch.tutteli.atrium.creating.AssertImpl" - ) -) -fun _method(plant: AssertionPlant, name: String, method: (T1, T2, T3) -> TReturnValue, arg1: T1, arg2: T2, arg3: T3): AssertionPlant - = AssertImpl.feature.returnValueOf3(plant, method, arg1, arg2, arg3, name) - -@Deprecated("Use AssertImpl.feature.returnValueOf3; will be removed with 1.0.0", - ReplaceWith( - "AssertImpl.feature.returnValueOf3(plant, method, arg1, arg2, arg3, assertionCreator)", - "ch.tutteli.atrium.creating.AssertImpl" - ) -) -fun _returnValueOf(plant: AssertionPlant, method: KFunction3, arg1: T1, arg2: T2, arg3: T3, assertionCreator: AssertionPlant.() -> Unit): AssertionPlant - = AssertImpl.feature.returnValueOf3(plant, method, arg1, arg2, arg3, assertionCreator) - -@Deprecated("Use AssertImpl.feature.returnValueOf3; will be removed with 1.0.0", - ReplaceWith( - "AssertImpl.feature.returnValueOf3(plant, method, arg1, arg2, arg3, name, assertionCreator)", - "ch.tutteli.atrium.creating.AssertImpl" - ) -) -fun _method(plant: AssertionPlant, name: String, method: (T1, T2, T3) -> TReturnValue, arg1: T1, arg2: T2, arg3: T3, assertionCreator: AssertionPlant.() -> Unit): AssertionPlant - = AssertImpl.feature.returnValueOf3(plant, method, arg1, arg2, arg3, name, assertionCreator) - -@Deprecated("Use AssertImpl.feature.returnValueOf3; will be removed with 1.0.0", - ReplaceWith( - "AssertImpl.feature.returnValueOf3(plant, method, arg1, arg2, arg3)", - "ch.tutteli.atrium.creating.AssertImpl" - ) -) -fun _returnValueOf(plant: AssertionPlant, method: KFunction3, arg1: T1, arg2: T2, arg3: T3): AssertionPlantNullable - = AssertImpl.feature.returnValueOf3(plant, method, arg1, arg2, arg3) - -@Deprecated("Use AssertImpl.feature.returnValueOf3; will be removed with 1.0.0", - ReplaceWith( - "AssertImpl.feature.returnValueOf3(plant, method, arg1, arg2, arg3, name)", - "ch.tutteli.atrium.creating.AssertImpl" - ) -) -fun _method(plant: AssertionPlant, name: String, method: (T1, T2, T3) -> TReturnValue, arg1: T1, arg2: T2, arg3: T3): AssertionPlantNullable - = AssertImpl.feature.returnValueOf3(plant, method, arg1, arg2, arg3, name) - - -//Arg4 -@Deprecated("Use AssertImpl.feature.returnValueOf4; will be removed with 1.0.0", - ReplaceWith( - "AssertImpl.feature.returnValueOf4(plant, method, arg1, arg2, arg3, arg4)", - "ch.tutteli.atrium.creating.AssertImpl" - ) -) -fun _returnValueOf(plant: AssertionPlant, method: KFunction4, arg1: T1, arg2: T2, arg3: T3, arg4: T4): AssertionPlant - = AssertImpl.feature.returnValueOf4(plant, method, arg1, arg2, arg3, arg4) - -@Deprecated("Use AssertImpl.feature.returnValueOf4; will be removed with 1.0.0", - ReplaceWith( - "AssertImpl.feature.returnValueOf4(plant, method, arg1, arg2, arg3, arg4, name)", - "ch.tutteli.atrium.creating.AssertImpl" - ) -) -fun _method(plant: AssertionPlant, name: String, method: (T1, T2, T3, T4) -> TReturnValue, arg1: T1, arg2: T2, arg3: T3, arg4: T4): AssertionPlant - = AssertImpl.feature.returnValueOf4(plant, method, arg1, arg2, arg3, arg4, name) - -@Deprecated("Use AssertImpl.feature.returnValueOf4; will be removed with 1.0.0", - ReplaceWith( - "AssertImpl.feature.returnValueOf4(plant, method, arg1, arg2, arg3, arg4, assertionCreator)", - "ch.tutteli.atrium.creating.AssertImpl" - ) -) -fun _returnValueOf(plant: AssertionPlant, method: KFunction4, arg1: T1, arg2: T2, arg3: T3, arg4: T4, assertionCreator: AssertionPlant.() -> Unit): AssertionPlant - = AssertImpl.feature.returnValueOf4(plant, method, arg1, arg2, arg3, arg4, assertionCreator) - -@Deprecated("Use AssertImpl.feature.returnValueOf4; will be removed with 1.0.0", - ReplaceWith( - "AssertImpl.feature.returnValueOf4(plant, method, arg1, arg2, arg3, arg4, name, assertionCreator)", - "ch.tutteli.atrium.creating.AssertImpl" - ) -) -fun _method(plant: AssertionPlant, name: String, method: (T1, T2, T3, T4) -> TReturnValue, arg1: T1, arg2: T2, arg3: T3, arg4: T4, assertionCreator: AssertionPlant.() -> Unit): AssertionPlant - = AssertImpl.feature.returnValueOf4(plant, method, arg1, arg2, arg3, arg4, name, assertionCreator) - -@Deprecated("Use AssertImpl.feature.returnValueOf4; will be removed with 1.0.0", - ReplaceWith( - "AssertImpl.feature.returnValueOf4(plant, method, arg1, arg2, arg3, arg4)", - "ch.tutteli.atrium.creating.AssertImpl" - ) -) -fun _returnValueOf(plant: AssertionPlant, method: KFunction4, arg1: T1, arg2: T2, arg3: T3, arg4: T4): AssertionPlantNullable - = AssertImpl.feature.returnValueOf4(plant, method, arg1, arg2, arg3, arg4) - -@Deprecated("Use AssertImpl.feature.returnValueOf4; will be removed with 1.0.0", - ReplaceWith( - "AssertImpl.feature.returnValueOf4(plant, method, arg1, arg2, arg3, arg4, name)", - "ch.tutteli.atrium.creating.AssertImpl" - ) -) -fun _method(plant: AssertionPlant, name: String, method: (T1, T2, T3, T4) -> TReturnValue, arg1: T1, arg2: T2, arg3: T3, arg4: T4): AssertionPlantNullable - = AssertImpl.feature.returnValueOf4(plant, method, arg1, arg2, arg3, arg4, name) - - -//Arg5 -@Deprecated("Use AssertImpl.feature.returnValueOf5; will be removed with 1.0.0", - ReplaceWith( - "AssertImpl.feature.returnValueOf5(plant, method, arg1, arg2, arg3, arg4, arg5)", - "ch.tutteli.atrium.creating.AssertImpl" - ) -) -fun _returnValueOf(plant: AssertionPlant, method: KFunction5, arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5): AssertionPlant - = AssertImpl.feature.returnValueOf5(plant, method, arg1, arg2, arg3, arg4, arg5) - -@Deprecated("Use AssertImpl.feature.returnValueOf5; will be removed with 1.0.0", - ReplaceWith( - "AssertImpl.feature.returnValueOf5(plant, method, arg1, arg2, arg3, arg4, arg5, name)", - "ch.tutteli.atrium.creating.AssertImpl" - ) -) -fun _method(plant: AssertionPlant, name: String, method: (T1, T2, T3, T4, T5) -> TReturnValue, arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5): AssertionPlant - = AssertImpl.feature.returnValueOf5(plant, method, arg1, arg2, arg3, arg4, arg5, name) - -@Deprecated("Use AssertImpl.feature.returnValueOf5; will be removed with 1.0.0", - ReplaceWith( - "AssertImpl.feature.returnValueOf5(plant, method, arg1, arg2, arg3, arg4, arg5, assertionCreator)", - "ch.tutteli.atrium.creating.AssertImpl" - ) -) -fun _returnValueOf(plant: AssertionPlant, method: KFunction5, arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, assertionCreator: AssertionPlant.() -> Unit): AssertionPlant - = AssertImpl.feature.returnValueOf5(plant, method, arg1, arg2, arg3, arg4, arg5, assertionCreator) - -@Deprecated("Use AssertImpl.feature.returnValueOf5; will be removed with 1.0.0", - ReplaceWith( - "AssertImpl.feature.returnValueOf5(plant, method, arg1, arg2, arg3, arg4, arg5, name, assertionCreator)", - "ch.tutteli.atrium.creating.AssertImpl" - ) -) -fun _method(plant: AssertionPlant, name: String, method: (T1, T2, T3, T4, T5) -> TReturnValue, arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, assertionCreator: AssertionPlant.() -> Unit): AssertionPlant - = AssertImpl.feature.returnValueOf5(plant, method, arg1, arg2, arg3, arg4, arg5, name, assertionCreator) - -@Deprecated("Use AssertImpl.feature.returnValueOf5; will be removed with 1.0.0", - ReplaceWith( - "AssertImpl.feature.returnValueOf5(plant, method, arg1, arg2, arg3, arg4, arg5)", - "ch.tutteli.atrium.creating.AssertImpl" - ) -) -fun _returnValueOf(plant: AssertionPlant, method: KFunction5, arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5): AssertionPlantNullable - = AssertImpl.feature.returnValueOf5(plant, method, arg1, arg2, arg3, arg4, arg5) - -@Deprecated("Use AssertImpl.feature.returnValueOf5; will be removed with 1.0.0", - ReplaceWith( - "AssertImpl.feature.returnValueOf5(plant, method, arg1, arg2, arg3, arg4, arg5, name)", - "ch.tutteli.atrium.creating.AssertImpl" - ) -) -fun _method(plant: AssertionPlant, name: String, method: (T1, T2, T3, T4, T5) -> TReturnValue, arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5): AssertionPlantNullable - = AssertImpl.feature.returnValueOf5(plant, method, arg1, arg2, arg3, arg4, arg5, name) diff --git a/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/floatingPointAssertions.kt b/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/floatingPointAssertions.kt deleted file mode 100644 index 0d60a7c70..000000000 --- a/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/floatingPointAssertions.kt +++ /dev/null @@ -1,34 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") -package ch.tutteli.atrium.assertions - -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.domain.builders.AssertImpl -import java.math.BigDecimal - -@Deprecated("Use AssertImpl.floatingPoint.toBeWithErrorTolerance; will be removed with 1.0.0", - ReplaceWith( - "AssertImpl.floatingPoint.toBeWithErrorTolerance(plant, expected, tolerance)", - "ch.tutteli.atrium.creating.AssertImpl" - ) -) -fun _toBeWithErrorTolerance(plant: AssertionPlant, expected: Float, tolerance: Float): Assertion - = AssertImpl.floatingPoint.toBeWithErrorTolerance(plant, expected, tolerance) - -@Deprecated("Use AssertImpl.floatingPoint.toBeWithErrorTolerance; will be removed with 1.0.0", - ReplaceWith( - "AssertImpl.floatingPoint.toBeWithErrorTolerance(plant, expected, tolerance)", - "ch.tutteli.atrium.creating.AssertImpl" - ) -) -fun _toBeWithErrorTolerance(plant: AssertionPlant, expected: Double, tolerance: Double): Assertion - = AssertImpl.floatingPoint.toBeWithErrorTolerance(plant, expected, tolerance) - -@Deprecated("Use AssertImpl.floatingPoint.toBeWithErrorTolerance; will be removed with 1.0.0", - ReplaceWith( - "AssertImpl.floatingPoint.toBeWithErrorTolerance(plant, expected, tolerance)", - "ch.tutteli.atrium.creating.AssertImpl" - ) -) -fun _toBeWithErrorTolerance(plant: AssertionPlant, expected: T, tolerance: T): Assertion - = AssertImpl.floatingPoint.toBeWithErrorTolerance(plant, expected, tolerance) diff --git a/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/iterable/contains/builders/IterableContainsAtLeastCheckerBuilderBase.kt b/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/iterable/contains/builders/IterableContainsAtLeastCheckerBuilderBase.kt deleted file mode 100644 index bf16228ec..000000000 --- a/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/iterable/contains/builders/IterableContainsAtLeastCheckerBuilderBase.kt +++ /dev/null @@ -1,39 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0 */) -package ch.tutteli.atrium.assertions.iterable.contains.builders - -import ch.tutteli.atrium.assertions.iterable.contains.IterableContains.Checker -import ch.tutteli.atrium.assertions.iterable.contains.IterableContains.SearchBehaviour -import ch.tutteli.atrium.assertions.iterable.contains.checkers.IterableContainsAtLeastChecker - -/** - * The base class for builders which create a `contains at least` check within the fluent API of a sophisticated - * `contains` assertion for [Iterable]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - * - * @property times The number which the check will compare against the actual number of times an expected object - * is found in the input of the search. - * - * @constructor The base class for builders which create a `contains at least` check within the fluent API of a - * sophisticated `contains` assertion for [Iterable]. - * @param times The number which the check will compare against the actual number of times an expected entry is - * found in the [Iterable]. - * @param containsBuilder The previously used [IterableContainsBuilder]. - * @param nameContainsNotFun The name of the function which represents a `CharSequence contains not` assertion. - * @param atLeastCall The name of the function which was called and created this builder. - */ -@Deprecated( - "Use the abstract class from package creating; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.creating.iterable.contains.IterableContainsAtLeastCheckerBuilderBase") -) -abstract class IterableContainsAtLeastCheckerBuilderBase, out S : SearchBehaviour>( - val times: Int, - override val containsBuilder: IterableContainsBuilder, - nameContainsNotFun: String, - atLeastCall: (Int) -> String -) : IterableContainsCheckerBuilder { - - override val checkers: List = - listOf(IterableContainsAtLeastChecker(times, nameContainsNotFun, atLeastCall)) -} diff --git a/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/iterable/contains/builders/IterableContainsAtMostCheckerBuilderBase.kt b/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/iterable/contains/builders/IterableContainsAtMostCheckerBuilderBase.kt deleted file mode 100644 index e91c79c44..000000000 --- a/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/iterable/contains/builders/IterableContainsAtMostCheckerBuilderBase.kt +++ /dev/null @@ -1,51 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0 */) -package ch.tutteli.atrium.assertions.iterable.contains.builders - -import ch.tutteli.atrium.assertions.basic.contains.builders.validateAtMost -import ch.tutteli.atrium.assertions.iterable.contains.IterableContains.Checker -import ch.tutteli.atrium.assertions.iterable.contains.IterableContains.SearchBehaviour -import ch.tutteli.atrium.assertions.iterable.contains.checkers.IterableContainsAtLeastChecker -import ch.tutteli.atrium.assertions.iterable.contains.checkers.IterableContainsAtMostChecker - -/** - * The base class for builders which create a `contains at least once but at most` check within the fluent API of a - * sophisticated `contains` assertion for [Iterable]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - * - * @property times The number which the check will compare against the actual number of times an expected object - * is found in the input of the search. - * - * @constructor The base class for builders which create a `contains at most` check within the fluent API of a - * sophisticated `contains` assertion for [Iterable]. - * @param times The number which the check will compare against the actual number of times an expected entry is - * found in the [Iterable]. - * @param containsBuilder The previously used [IterableContainsBuilder]. - * @param nameContainsNotFun The name of the function which represents a `CharSequence contains not` assertion. - * @param atMostCall The name of the function which was called and created this builder. - * @param atLeastCall The name of the function which represents a `CharSequence contains at least` assertion. - * @param exactlyCall The name of the function which represents a `CharSequence contains exactly` assertion. - */ -@Deprecated( - "Use the abstract class from package creating; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.creating.iterable.contains.IterableContainsAtMostCheckerBuilderBase") -) -abstract class IterableContainsAtMostCheckerBuilderBase, out S : SearchBehaviour>( - val times: Int, - override val containsBuilder: IterableContainsBuilder, - nameContainsNotFun: String, - atMostCall: (Int) -> String, - atLeastCall: (Int) -> String, - exactlyCall: (Int) -> String -) : IterableContainsCheckerBuilder { - - init { - validateAtMost(times, atMostCall, atLeastCall, exactlyCall) - } - - override val checkers: List = listOf( - IterableContainsAtLeastChecker(1, nameContainsNotFun, atLeastCall), - IterableContainsAtMostChecker(times, nameContainsNotFun, atMostCall) - ) -} diff --git a/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/iterable/contains/builders/IterableContainsButAtMostCheckerBuilderBase.kt b/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/iterable/contains/builders/IterableContainsButAtMostCheckerBuilderBase.kt deleted file mode 100644 index f36bde476..000000000 --- a/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/iterable/contains/builders/IterableContainsButAtMostCheckerBuilderBase.kt +++ /dev/null @@ -1,54 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0 */) -package ch.tutteli.atrium.assertions.iterable.contains.builders - -import ch.tutteli.atrium.assertions.basic.contains.builders.validateButAtMost -import ch.tutteli.atrium.assertions.iterable.contains.IterableContains.Checker -import ch.tutteli.atrium.assertions.iterable.contains.IterableContains.SearchBehaviour -import ch.tutteli.atrium.assertions.iterable.contains.checkers.IterableContainsAtMostChecker - -/** - * The base class for builders which create the second step of a `contains at least but at most` check within the - * fluent API of a sophisticated `contains` assertion for [Iterable]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied to the input of the search. - * - * @property times The number which the check will compare against the actual number of times an expected object - * is found in the input of the search. - * - * @constructor The base class for builders which create the second step of a `contains at least but at most` check - * within the fluent API of a sophisticated `contains` assertion for [Iterable]. - * @param times The number which the check will compare against the actual number of times an expected entry is - * found in the [Iterable]. - * @param containsBuilder The previously used [IterableContainsBuilder]. - * @param nameContainsNotFun The name of the function which represents a `Iterable contains not` assertion. - * @param atMostCall The name of the function which represents a `Iterable contains at most` assertion. - * @param atLeastCall The name of the function which represents a `Iterable contains at least` assertion. - * @param atMostCall The name of the function which was called and created this builder. - * @param exactlyCall The name of the function which represents a `Iterable contains exactly` assertion. - */ -@Deprecated( - "Use the abstract class from package creating; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.creating.iterable.contains.IterableContainsButAtMostCheckerBuilderBase") -) -abstract class IterableContainsButAtMostCheckerBuilderBase, out S : SearchBehaviour>( - val times: Int, - atLeastBuilder: IterableContainsAtLeastCheckerBuilderBase, - override val containsBuilder: IterableContainsBuilder, - nameContainsNotFun: String, - atLeastButAtMostCall: (Int, Int) -> String, - atMostCall: (Int) -> String, - atLeastCall: (Int) -> String, - butAtMostCall: (Int) -> String, - exactlyCall: (Int) -> String -) : IterableContainsCheckerBuilder { - - init { - validateButAtMost(atLeastBuilder.times, times, atLeastButAtMostCall, atLeastCall, butAtMostCall, exactlyCall) - } - - override val checkers: List = listOf( - *atLeastBuilder.checkers.toTypedArray(), - IterableContainsAtMostChecker(times, nameContainsNotFun, atMostCall) - ) -} diff --git a/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/iterable/contains/builders/IterableContainsExactlyCheckerBuilderBase.kt b/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/iterable/contains/builders/IterableContainsExactlyCheckerBuilderBase.kt deleted file mode 100644 index 7adae1131..000000000 --- a/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/iterable/contains/builders/IterableContainsExactlyCheckerBuilderBase.kt +++ /dev/null @@ -1,40 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0 */) -package ch.tutteli.atrium.assertions.iterable.contains.builders - - -import ch.tutteli.atrium.assertions.iterable.contains.IterableContains.Checker -import ch.tutteli.atrium.assertions.iterable.contains.IterableContains.SearchBehaviour -import ch.tutteli.atrium.assertions.iterable.contains.checkers.IterableContainsExactlyChecker - -/** - * The base class for builders which create a `contains exactly` check within the fluent API of a sophisticated - * `contains` assertion for [Iterable]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - * - * @property times The number which the check will compare against the actual number of times an expected object - * is found in the input of the search. - * - * @constructor The base class for builders which create a `contains exactly` check within the fluent API of a sophisticated - * `contains` assertion for [Iterable]. - * @param times The number which the check will compare against the actual number of times an expected entry is - * found in the [Iterable]. - * @param containsBuilder The previously used [IterableContainsBuilder]. - * @param nameContainsNotFun The name of the function which represents a `Iterable contains not` assertion. - * @param exactlyCall The name of the function which was called and created this builder. - */ -@Deprecated( - "Use the abstract class from package creating; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.creating.iterable.contains.IterableContainsExactlyCheckerBuilderBase") -) -abstract class IterableContainsExactlyCheckerBuilderBase, out S : SearchBehaviour>( - val times: Int, - override val containsBuilder: IterableContainsBuilder, - nameContainsNotFun: String, - exactlyCall: (Int) -> String -) : IterableContainsCheckerBuilder { - - override val checkers: List = - listOf(IterableContainsExactlyChecker(times, nameContainsNotFun, exactlyCall)) -} diff --git a/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/iterable/contains/builders/IterableContainsNotCheckerBuilderBase.kt b/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/iterable/contains/builders/IterableContainsNotCheckerBuilderBase.kt deleted file mode 100644 index a6044bac8..000000000 --- a/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/iterable/contains/builders/IterableContainsNotCheckerBuilderBase.kt +++ /dev/null @@ -1,28 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0 */) -package ch.tutteli.atrium.assertions.iterable.contains.builders - -import ch.tutteli.atrium.assertions.iterable.contains.IterableContains.SearchBehaviour -import ch.tutteli.atrium.assertions.iterable.contains.checkers.IterableContainsNotChecker - - -/** - * The base class for builders which create a `contains not` check within the fluent API of a sophisticated - * `contains` assertion for [Iterable]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - * - * @constructor The base class for builders which create a `contains at least` check within the fluent API of a - * sophisticated `contains` assertion for [Iterable]. - */ -@Deprecated( - "Use the abstract class from package creating; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.creating.iterable.contains.IterableContainsNotCheckerBuilderBase") -) -abstract class IterableContainsNotCheckerBuilderBase, out S : SearchBehaviour>( - override val containsBuilder: IterableContainsBuilder -) : IterableContainsCheckerBuilder { - - override val checkers = listOf(IterableContainsNotChecker()) -} - diff --git a/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/iterable/contains/builders/IterableContainsNotOrAtMostCheckerBuilderBase.kt b/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/iterable/contains/builders/IterableContainsNotOrAtMostCheckerBuilderBase.kt deleted file mode 100644 index 1845a5427..000000000 --- a/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/iterable/contains/builders/IterableContainsNotOrAtMostCheckerBuilderBase.kt +++ /dev/null @@ -1,37 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0 */) -package ch.tutteli.atrium.assertions.iterable.contains.builders - -import ch.tutteli.atrium.assertions.iterable.contains.IterableContains.Checker -import ch.tutteli.atrium.assertions.iterable.contains.IterableContains.SearchBehaviour -import ch.tutteli.atrium.assertions.iterable.contains.checkers.IterableContainsAtMostChecker - -/** - * The base class for builders which create a `contains not or at most` check within the fluent API of a - * sophisticated `contains` assertion for [Iterable]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - * - * @constructor The base class for builders which create a `contains at most` check within the fluent API of a - * sophisticated `contains` assertion for [Iterable]. - * @param times The number which the check will compare against the actual number of times an expected entry is - * found in the [Iterable]. - * @param containsBuilder The previously used [IterableContainsBuilder]. - * @param nameContainsNotFun The name of the function which represents a `CharSequence contains not` assertion. - * @param notOrAtMostCall The name of the function which was called and created this builder. - */ -@Deprecated( - "Use the abstract class from package creating; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.creating.iterable.contains.IterableContainsNotOrAtMostCheckerBuilderBase") -) -abstract class IterableContainsNotOrAtMostCheckerBuilderBase, out S : SearchBehaviour>( - val times: Int, - override val containsBuilder: IterableContainsBuilder, - nameContainsNotFun: String, - notOrAtMostCall: (Int) -> String -) : IterableContainsCheckerBuilder { - - override val checkers: List = listOf( - IterableContainsAtMostChecker(times, nameContainsNotFun, notOrAtMostCall) - ) -} diff --git a/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/iterable/contains/checkers/IterableContainsAtLeastChecker.kt b/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/iterable/contains/checkers/IterableContainsAtLeastChecker.kt deleted file mode 100644 index 39dda04f0..000000000 --- a/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/iterable/contains/checkers/IterableContainsAtLeastChecker.kt +++ /dev/null @@ -1,25 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0 */) -package ch.tutteli.atrium.assertions.iterable.contains.checkers - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.translations.DescriptionIterableAssertion - -/** - * 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 input of the search. - * @param nameContainsNotFun The function which should be used instead of `atLeastCall` when [times] equals to zero. - * @param atLeastCall The function which was used and should not be used if [times] equals to zero. - * @throws IllegalArgumentException In case [times] is smaller than 1. - */ -@Deprecated("Use IterableContainsCheckers.newAtLeastChecker; will be removed with 1.0.0", ReplaceWith("IterableContainsCheckers.newAtLeastChecker(times, nameContainsNotFun, atLeastCall)", "ch.tutteli.atrium.creating.iterable.contains.checkers.IterableContainsCheckers")) -class IterableContainsAtLeastChecker( - times: Int, - nameContainsNotFun: String, - atLeastCall: (Int) -> String -) : IterableContainsChecker(times, nameContainsNotFun, atLeastCall) { - - override fun createAssertion(foundNumberOfTimes: Int): Assertion - = createBasicAssertion(DescriptionIterableAssertion.AT_LEAST, foundNumberOfTimes >= times) -} diff --git a/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/iterable/contains/checkers/IterableContainsAtMostChecker.kt b/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/iterable/contains/checkers/IterableContainsAtMostChecker.kt deleted file mode 100644 index a7222590f..000000000 --- a/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/iterable/contains/checkers/IterableContainsAtMostChecker.kt +++ /dev/null @@ -1,25 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0 */) -package ch.tutteli.atrium.assertions.iterable.contains.checkers - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.translations.DescriptionIterableAssertion - -/** - * 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 object is - * found in the input of the search. - * @param nameContainsNotFun The function which should be used instead of `atMostCall` when [times] equals to zero. - * @param atMostCall The function which was used and should not be used if [times] equals to zero. - * @throws IllegalArgumentException In case [times] is smaller than 1. - */ -@Deprecated("Use IterableContainsCheckers.newAtMostChecker; will be removed with 1.0.0", ReplaceWith("IterableContainsCheckers.newAtMostChecker(times, nameContainsNotFun, atMostCall)", "ch.tutteli.atrium.creating.iterable.contains.checkers.IterableContainsCheckers")) -class IterableContainsAtMostChecker( - times: Int, - nameContainsNotFun: String, - atMostCall: (Int) -> String -) : IterableContainsChecker(times, nameContainsNotFun, atMostCall) { - - override fun createAssertion(foundNumberOfTimes: Int): Assertion - = createBasicAssertion(DescriptionIterableAssertion.AT_MOST, foundNumberOfTimes <= times) -} diff --git a/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/iterable/contains/checkers/IterableContainsChecker.kt b/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/iterable/contains/checkers/IterableContainsChecker.kt deleted file mode 100644 index dd8c337e3..000000000 --- a/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/iterable/contains/checkers/IterableContainsChecker.kt +++ /dev/null @@ -1,23 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0 */) -package ch.tutteli.atrium.assertions.iterable.contains.checkers - -import ch.tutteli.atrium.assertions.basic.contains.checkers.ContainsChecker -import ch.tutteli.atrium.assertions.iterable.contains.IterableContains - -/** - * Represents the base class for [IterableContains.Checker]. - * - * It does not do much more than specifying that its super class is [ContainsChecker] and sub-classes have to implement - * [IterableContains.Checker]. - * - * @param correctCall The function which should be used instead of `wrongCall` when [times] equals to zero. - * @param wrongCall The function call which was used and should not be used if [times] equals to zero. - * - * @throws IllegalArgumentException In case [times] is smaller than 1. - */ -@Deprecated("Use the abstract class from package creating; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.creating.iterable.contains.checkers.IterableContainsChecker")) -abstract class IterableContainsChecker( - times: Int, - correctCall: String, - wrongCall: (Int) -> String -) : ContainsChecker(times, correctCall, wrongCall), IterableContains.Checker diff --git a/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/iterable/contains/checkers/IterableContainsExactlyChecker.kt b/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/iterable/contains/checkers/IterableContainsExactlyChecker.kt deleted file mode 100644 index 48a5bd023..000000000 --- a/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/iterable/contains/checkers/IterableContainsExactlyChecker.kt +++ /dev/null @@ -1,26 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0 */) -package ch.tutteli.atrium.assertions.iterable.contains.checkers - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.translations.DescriptionIterableAssertion - -/** - * Represents a check that an expected object is contained exactly [times] in the search input. - * - * @param times The number which the check uses to compare against the actual number of times an expected object is - * found in the input of the search. - * @param nameContainsNotFun The function which should be used instead of `exactlyCall` when [times] equals to zero. - * @param exactlyCall The function call which was used and should not be used if [times] equals to zero. - * - * @throws IllegalArgumentException In case [times] is smaller than 1. - */ -@Deprecated("Use IterableContainsCheckers.newExactlyChecker; will be removed with 1.0.0", ReplaceWith("IterableContainsCheckers.newExactlyChecker(times, nameContainsNotFun, exactlyCall)", "ch.tutteli.atrium.creating.iterable.contains.checkers.IterableContainsCheckers")) -class IterableContainsExactlyChecker( - times: Int, - nameContainsNotFun: String, - exactlyCall: (Int) -> String -) : IterableContainsChecker(times, nameContainsNotFun, exactlyCall) { - - override fun createAssertion(foundNumberOfTimes: Int): Assertion - = createBasicAssertion(DescriptionIterableAssertion.EXACTLY, foundNumberOfTimes == times) -} diff --git a/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/iterable/contains/checkers/IterableContainsNotChecker.kt b/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/iterable/contains/checkers/IterableContainsNotChecker.kt deleted file mode 100644 index d18607936..000000000 --- a/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/iterable/contains/checkers/IterableContainsNotChecker.kt +++ /dev/null @@ -1,17 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0 */) -package ch.tutteli.atrium.assertions.iterable.contains.checkers - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.assertions.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.builders.AssertImpl -import ch.tutteli.atrium.translations.DescriptionBasic - -/** - * Represents a check that an expected object is not contained in the search input. - */ -@Deprecated("Use IterableContainsCheckers.newNotChecker; will be removed with 1.0.0", ReplaceWith("IterableContainsCheckers.newNotChecker()", "ch.tutteli.atrium.creating.iterable.contains.checkers.IterableContainsCheckers")) -class IterableContainsNotChecker : IterableContains.Checker { - - override fun createAssertion(foundNumberOfTimes: Int): Assertion - = AssertImpl.builder.createDescriptive(DescriptionBasic.IS, 0) { foundNumberOfTimes == 0 } -} diff --git a/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/iterable/contains/creators/IterableContainsInAnyOrderEntriesAssertionCreator.kt b/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/iterable/contains/creators/IterableContainsInAnyOrderEntriesAssertionCreator.kt deleted file mode 100644 index b425372d0..000000000 --- a/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/iterable/contains/creators/IterableContainsInAnyOrderEntriesAssertionCreator.kt +++ /dev/null @@ -1,85 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0 */) -package ch.tutteli.atrium.assertions.iterable.contains.creators - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.assertions.AssertionGroup -import ch.tutteli.atrium.assertions.basic.contains.creators.ContainsAssertionCreator -import ch.tutteli.atrium.assertions.iterable.contains.IterableContains -import ch.tutteli.atrium.assertions.iterable.contains.searchbehaviours.IterableContainsInAnyOrderSearchBehaviour -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.domain.builders.AssertImpl -import ch.tutteli.atrium.reporting.translating.Translatable -import ch.tutteli.atrium.translations.DescriptionIterableAssertion -import ch.tutteli.atrium.translations.DescriptionIterableAssertion.AN_ENTRY_WHICH - -/** - * Represents a creator of a sophisticated `contains` assertions for [Iterable] where an expected entry can appear - * in any order and is identified by holding a group of assertions, created by an assertion creator lambda. - * - * @param T The type of the [AssertionPlant.subject][SubjectProvider.subject] for which the `contains` assertion is be build. - * - * @property searchBehaviour The search behaviour -- in this case representing `in any order` which is used to - * decorate the description (a [Translatable]) which is used for the [AssertionGroup]. - * - * @constructor Represents a creator of a sophisticated `contains` assertions for [Iterable] where expected entries - * can appear in any order and are identified by holding a group of assertions, created by an assertion - * creator lambda. - * @param searchBehaviour The search behaviour -- in this case representing `in any order` which is used to - * decorate the description (a [Translatable]) which is used for the [AssertionGroup]. - * @param checkers The checkers which create assertions based on the search result. - */ -@Deprecated("Please open an issue if you used this class; will be removed with 1.0.0") -open class IterableContainsInAnyOrderEntriesAssertionCreator>( - private val searchBehaviour: IterableContainsInAnyOrderSearchBehaviour, - checkers: List -) : ContainsAssertionCreator.() -> Unit)?, ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains.Checker>(checkers), - IterableContains.Creator.() -> Unit)?> { - - final override fun createAssertionGroupForSearchCriteriaAssertions(assertions: List): AssertionGroup { - val description = searchBehaviour.decorateDescription(DescriptionIterableAssertion.CONTAINS) - return AssertImpl.builder.list - .withDescriptionAndEmptyRepresentation(description) - .withAssertions(assertions) - .build() - } - - final override fun searchAndCreateAssertion(subjectProvider: SubjectProvider, searchCriterion: (AssertionPlant.() -> Unit)?, featureFactory: (Int, Translatable) -> AssertionGroup): AssertionGroup { - val (explanatoryAssertions, count) = createExplanatoryAssertionsAndMatchingCount(subjectProvider.subject.iterator(), searchCriterion) - val explanatoryGroup = AssertImpl.builder.explanatoryGroup - .withDefaultType - .withAssertions(explanatoryAssertions) - .build() - val featureAssertion = featureFactory(count, DescriptionIterableAssertion.NUMBER_OF_OCCURRENCES) - return AssertImpl.builder.list - .withDescriptionAndEmptyRepresentation(AN_ENTRY_WHICH) - .withAssertions(explanatoryGroup, featureAssertion) - .build() - - } - - private fun createExplanatoryAssertionsAndMatchingCount(itr: Iterator, assertionCreator: (AssertionPlant.() -> Unit)?): Pair, Int> { - return if (itr.hasNext()) { - val (firstNonNullOrNull, sequence) = getFirstNonNullAndSequence(itr, sequenceOf()) - val group = collectIterableAssertionsForExplanationWithFirst(assertionCreator, firstNonNullOrNull) - val count = sequence.count { allCreatedAssertionsHold(it, assertionCreator) } - group to count - } else { - val group = collectIterableAssertionsForExplanation(assertionCreator, null) - group to 0 - } - } - - private tailrec fun getFirstNonNullAndSequence(itr: Iterator, sequence: Sequence): Pair> { - return if (itr.hasNext()) { - val first = itr.next() - if (first != null) { - first to sequenceOf(first) + itr.asSequence() - } else { - getFirstNonNullAndSequence(itr, sequence + sequenceOf(first)) - } - } else { - null to sequence - } - } -} diff --git a/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/iterable/contains/creators/IterableContainsInAnyOrderObjectsAssertionCreator.kt b/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/iterable/contains/creators/IterableContainsInAnyOrderObjectsAssertionCreator.kt deleted file mode 100644 index 833c44b25..000000000 --- a/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/iterable/contains/creators/IterableContainsInAnyOrderObjectsAssertionCreator.kt +++ /dev/null @@ -1,37 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0 */) -package ch.tutteli.atrium.assertions.iterable.contains.creators - -import ch.tutteli.atrium.assertions.AssertionGroup -import ch.tutteli.atrium.assertions.basic.contains.creators.ContainsObjectsAssertionCreator -import ch.tutteli.atrium.assertions.iterable.contains.IterableContains -import ch.tutteli.atrium.assertions.iterable.contains.searchbehaviours.IterableContainsInAnyOrderSearchBehaviour -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.reporting.translating.Translatable -import ch.tutteli.atrium.translations.DescriptionIterableAssertion - -/** - * Represents a creator of a sophisticated `contains` assertions for [Iterable] where an expected entry can appear - * in any order and is identified by expected objects (equality comparison). - * - * @param T The type of the [AssertionPlant.subject][SubjectProvider.subject] for which the `contains` assertion is be build. - * @param S The type of the elements of the iterable, used as search criterion. - * - * @constructor Represents a creator of a sophisticated `contains` assertions for [Iterable] where expected entries - * can appear in any order and are identified by expected objects (equality comparison). - * @param searchBehaviour The search behaviour -- in this case representing `in any order` which is used to - * decorate the description (a [Translatable]) which is used for the [AssertionGroup]. - * @param checkers The checkers which create assertions based on the search result. - */ -@Deprecated("Please open an issue if you used this class; will be removed with 1.0.0") -class IterableContainsInAnyOrderObjectsAssertionCreator>( - searchBehaviour: IterableContainsInAnyOrderSearchBehaviour, - checkers: List -) : ContainsObjectsAssertionCreator(searchBehaviour, checkers), - IterableContains.Creator { - - override val descriptionContains = DescriptionIterableAssertion.CONTAINS - override val descriptionNumberOfOccurrences = DescriptionIterableAssertion.NUMBER_OF_OCCURRENCES - - override fun search(subjectProvider: SubjectProvider, searchCriterion: S): Int - = subjectProvider.subject.filter { it == searchCriterion }.size -} diff --git a/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/iterable/contains/creators/IterableContainsInAnyOrderOnlyAssertionCreator.kt b/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/iterable/contains/creators/IterableContainsInAnyOrderOnlyAssertionCreator.kt deleted file mode 100644 index ead54997a..000000000 --- a/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/iterable/contains/creators/IterableContainsInAnyOrderOnlyAssertionCreator.kt +++ /dev/null @@ -1,118 +0,0 @@ -//TODO remove with 1.0.0 -@file:Suppress("DEPRECATION") -package ch.tutteli.atrium.assertions.iterable.contains.creators - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.assertions.AssertionGroup -import ch.tutteli.atrium.assertions.builders.invisibleGroup -import ch.tutteli.atrium.assertions.iterable.contains.IterableContains -import ch.tutteli.atrium.assertions.iterable.contains.searchbehaviours.IterableContainsInAnyOrderOnlySearchBehaviour -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.domain.builders.AssertImpl -import ch.tutteli.atrium.domain.robstoll.lib.assertions.LazyThreadUnsafeAssertionGroup -import ch.tutteli.atrium.reporting.Text -import ch.tutteli.atrium.reporting.translating.Translatable -import ch.tutteli.atrium.translations.DescriptionBasic.TO_BE -import ch.tutteli.atrium.translations.DescriptionIterableAssertion -import ch.tutteli.atrium.translations.DescriptionIterableAssertion.* - -/** - * Represents the base class for `in any order only` assertion creators and provides a corresponding template to fulfill - * its responsibility. - * - * @param T The type of the [AssertionPlant.subject][SubjectProvider.subject] for which the `contains` assertion is be build. - * @param SC The type of the search criteria. - * - * @property searchBehaviour The search behaviour -- in this case representing `in any order only` which is used to - * decorate the description (a [Translatable]) which is used for the [AssertionGroup]. - * - * @constructor Represents the base class for `in any order only` assertion creators and provides a corresponding - * template to fulfill its responsibility. - * @param searchBehaviour The search behaviour -- in this case representing `in any order only` which is used to - * decorate the description (a [Translatable]) which is used for the [AssertionGroup]. - */ -@Deprecated("Please open an issue if you used this class; will be removed with 1.0.0") -abstract class IterableContainsInAnyOrderOnlyAssertionCreator, SC>( - private val searchBehaviour: IterableContainsInAnyOrderOnlySearchBehaviour -) : IterableContains.Creator { - - fun createAssertionGroup(plant: AssertionPlant, searchCriterion: SC, otherSearchCriteria: Array): AssertionGroup - = createAssertionGroup(plant, listOf(searchCriterion, *otherSearchCriteria)) - - final override fun createAssertionGroup(subjectProvider: SubjectProvider, searchCriteria: List): AssertionGroup { - return LazyThreadUnsafeAssertionGroup { - val list = subjectProvider.subject.toMutableList() - val actualSize = list.size - val assertions = mutableListOf() - - val mismatches = createAssertionsForAllSearchCriteria(searchCriteria, list, assertions) - val featureAssertions = createSizeFeatureAssertion(searchCriteria, actualSize) - if (mismatches == 0 && list.isNotEmpty()) { - featureAssertions.add(LazyThreadUnsafeAssertionGroup { - createExplanatoryGroupForMismatchesEtc(list, WARNING_ADDITIONAL_ENTRIES) - }) - } - assertions.add(AssertImpl.builder.feature - .withDescriptionAndRepresentation(list::size.name, Text(actualSize.toString())) - .withAssertions(featureAssertions) - .build() - ) - - val description = searchBehaviour.decorateDescription(CONTAINS) - val summary = AssertImpl.builder.summary - .withDescription(description) - .withAssertions(assertions) - .build() - - if (mismatches != 0 && list.isNotEmpty()) { - val warningDescription = when (list.size) { - mismatches -> WARNING_MISMATCHES - else -> WARNING_MISMATCHES_ADDITIONAL_ENTRIES - } - AssertImpl.builder.invisibleGroup - .withAssertions( - summary, - createExplanatoryGroupForMismatchesEtc(list, warningDescription) - ) - .build() - } else { - summary - } - } - } - - private fun createAssertionsForAllSearchCriteria(allSearchCriteria: List, list: MutableList, assertions: MutableList): Int { - var mismatches = 0 - allSearchCriteria.forEach { - val (found, assertion) = createAssertionForSearchCriterionAndRemoveMatchFromList(it, list) - if (!found) ++mismatches - assertions.add(assertion) - } - return mismatches - } - - protected abstract fun createAssertionForSearchCriterionAndRemoveMatchFromList(searchCriterion: SC, list: MutableList): Pair - - private fun createSizeFeatureAssertion(allSearchCriteria: List, actualSize: Int): MutableList - = mutableListOf(AssertImpl.builder.descriptive - .withTest { actualSize == allSearchCriteria.size } - .withDescriptionAndRepresentation( - TO_BE, - Text(allSearchCriteria.size.toString()) - ) - .build() - ) - - private fun createExplanatoryGroupForMismatchesEtc(list: MutableList, warning: DescriptionIterableAssertion): AssertionGroup { - val assertions = list.map { AssertImpl.builder.explanatory.withExplanation(it).build() } - val additionalEntries = AssertImpl.builder.list - .withDescriptionAndEmptyRepresentation(warning) - .withAssertions(assertions) - .build() - return AssertImpl.builder.explanatoryGroup - .withWarningType - .withAssertion(additionalEntries) - .build() - } -} diff --git a/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/iterable/contains/creators/IterableContainsInAnyOrderOnlyEntriesAssertionCreator.kt b/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/iterable/contains/creators/IterableContainsInAnyOrderOnlyEntriesAssertionCreator.kt deleted file mode 100644 index 391e0a2a5..000000000 --- a/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/iterable/contains/creators/IterableContainsInAnyOrderOnlyEntriesAssertionCreator.kt +++ /dev/null @@ -1,45 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0 */) -package ch.tutteli.atrium.assertions.iterable.contains.creators - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.assertions.AssertionGroup -import ch.tutteli.atrium.assertions.iterable.contains.searchbehaviours.IterableContainsInAnyOrderOnlySearchBehaviour -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.reporting.translating.Translatable - -/** - * Represents a creator of a sophisticated `contains` assertions for [Iterable] where exactly the expected entries have - * to appear in the [Iterable] but in any order -- an entry is identified by holding a group of assertions - * created by an assertion creator lambda. - * - * @param T The type of the [AssertionPlant.subject][SubjectProvider.subject] for which the `contains` assertion is be build. - * - * @constructor Represents a creator of a sophisticated `contains` assertions for [Iterable] where exactly the expected - * entries have to appear in the [Iterable] but in any order -- an entry is identified by holding a group - * of assertions created by an assertion creator lambda. - * @param searchBehaviour The search behaviour -- in this case representing `in any order only` which is used to - * decorate the description (a [Translatable]) which is used for the [AssertionGroup]. - */ -@Deprecated("Please open an issue if you used this class; will be removed with 1.0.0") -class IterableContainsInAnyOrderOnlyEntriesAssertionCreator>( - searchBehaviour: IterableContainsInAnyOrderOnlySearchBehaviour -) : IterableContainsInAnyOrderOnlyAssertionCreator.() -> Unit)?>(searchBehaviour) { - - override fun createAssertionForSearchCriterionAndRemoveMatchFromList(searchCriterion: (AssertionPlant.() -> Unit)?, list: MutableList): Pair { - val explanatoryAssertions = createExplanatoryAssertions(searchCriterion, list) - val found = removeMatch(list, searchCriterion) - return found to createEntryAssertion(explanatoryAssertions, found) - } - - private fun removeMatch(list: MutableList, assertionCreator: (AssertionPlant.() -> Unit)?): Boolean { - val itr = list.iterator() - while (itr.hasNext()) { - if (allCreatedAssertionsHold(itr.next(), assertionCreator)) { - itr.remove() - return true - } - } - return false - } -} diff --git a/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/iterable/contains/creators/IterableContainsInAnyOrderOnlyObjectsAssertionCreator.kt b/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/iterable/contains/creators/IterableContainsInAnyOrderOnlyObjectsAssertionCreator.kt deleted file mode 100644 index a1cee2998..000000000 --- a/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/iterable/contains/creators/IterableContainsInAnyOrderOnlyObjectsAssertionCreator.kt +++ /dev/null @@ -1,33 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0 */) -package ch.tutteli.atrium.assertions.iterable.contains.creators - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.assertions.AssertionGroup -import ch.tutteli.atrium.assertions.iterable.contains.searchbehaviours.IterableContainsInAnyOrderOnlySearchBehaviour -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.domain.builders.AssertImpl -import ch.tutteli.atrium.reporting.translating.Translatable -import ch.tutteli.atrium.translations.DescriptionIterableAssertion.AN_ENTRY_WHICH_IS - -/** - * Represents a creator of a sophisticated `contains` assertions for [Iterable] where exactly the expected entries have - * to appear in the [Iterable] but in any order -- an entry is identified by an expected object (equality comparison). - * - * @param T The type of the [AssertionPlant.subject][SubjectProvider.subject] for which the `contains` assertion is be build. - * - * @constructor Represents a creator of a sophisticated `contains` assertions for [Iterable] where exactly the expected - * entries have to appear in the [Iterable] but in any order -- an entry is identified by an expected - * object (equality comparison). - * @param searchBehaviour The search behaviour -- in this case representing `in any order only` which is used to - * decorate the description (a [Translatable]) which is used for the [AssertionGroup]. - */ -@Deprecated("Please open an issue if you used this class; will be removed with 1.0.0") -class IterableContainsInAnyOrderOnlyObjectsAssertionCreator>( - searchBehaviour: IterableContainsInAnyOrderOnlySearchBehaviour -) : IterableContainsInAnyOrderOnlyAssertionCreator(searchBehaviour) { - - override fun createAssertionForSearchCriterionAndRemoveMatchFromList(searchCriterion: E, list: MutableList): Pair { - val found: Boolean = list.remove(searchCriterion) - return found to AssertImpl.builder.createDescriptive(AN_ENTRY_WHICH_IS, searchCriterion) { found } - } -} diff --git a/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/iterable/contains/creators/IterableContainsInOrderOnlyAssertionCreator.kt b/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/iterable/contains/creators/IterableContainsInOrderOnlyAssertionCreator.kt deleted file mode 100644 index cdd796568..000000000 --- a/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/iterable/contains/creators/IterableContainsInOrderOnlyAssertionCreator.kt +++ /dev/null @@ -1,120 +0,0 @@ -//TODO remove with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.assertions.iterable.contains.creators - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.assertions.AssertionGroup -import ch.tutteli.atrium.assertions.iterable.contains.IterableContains -import ch.tutteli.atrium.assertions.iterable.contains.searchbehaviours.IterableContainsInOrderOnlySearchBehaviour -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.domain.builders.AssertImpl -import ch.tutteli.atrium.domain.robstoll.lib.assertions.LazyThreadUnsafeAssertionGroup -import ch.tutteli.atrium.reporting.Text -import ch.tutteli.atrium.reporting.translating.Translatable -import ch.tutteli.atrium.reporting.translating.TranslatableWithArgs -import ch.tutteli.atrium.translations.DescriptionBasic.TO_BE -import ch.tutteli.atrium.translations.DescriptionIterableAssertion - -/** - * Represents the base class for `in order only` assertion creators and provides a corresponding template to fulfill - * its responsibility. - * - * @param T The type of the [AssertionPlant.subject][SubjectProvider.subject] for which the `contains` assertion is be build. - * @param SC The type of the search criteria. - * - * @property searchBehaviour The search behaviour -- in this case representing `in order only` which is used to - * decorate the description (a [Translatable]) which is used for the [AssertionGroup]. - * - * @constructor Represents the base class for `in any order only` assertion creators and provides a corresponding - * template to fulfill its responsibility. - * @param searchBehaviour The search behaviour -- in this case representing `in order only` which is used to - * decorate the description (a [Translatable]) which is used for the [AssertionGroup]. - */ -@Deprecated("Please open an issue if you used this class; will be removed with 1.0.0") -abstract class IterableContainsInOrderOnlyAssertionCreator, SC>( - private val searchBehaviour: IterableContainsInOrderOnlySearchBehaviour -) : IterableContains.Creator { - - fun createAssertionGroup(plant: AssertionPlant, searchCriterion: SC, otherSearchCriteria: Array) - = createAssertionGroup(plant, listOf(searchCriterion, *otherSearchCriteria)) - - final override fun createAssertionGroup(subjectProvider: SubjectProvider, searchCriteria: List): AssertionGroup { - - return LazyThreadUnsafeAssertionGroup { - val assertions = mutableListOf() - val list = subjectProvider.subject.toList() - val itr = list.iterator() - searchCriteria.forEachIndexed { index, it -> - assertions.add(createEntryAssertion(list, it, createEntryAssertionTemplate(itr, index, it))) - } - assertions.add(createSizeFeatureAssertion(searchCriteria.size, list, itr)) - - val description = searchBehaviour.decorateDescription(DescriptionIterableAssertion.CONTAINS) - AssertImpl.builder.summary - .withDescription(description) - .withAssertions(assertions) - .build() - } - } - - abstract fun createEntryAssertion(iterableAsList: List, searchCriterion: SC, template: ((Boolean) -> Assertion) -> AssertionGroup): AssertionGroup - - private fun createEntryAssertionTemplate(itr: Iterator, index: Int, searchCriterion: SC): ((Boolean) -> Assertion) -> AssertionGroup - = { createEntryFeatureAssertion -> - - val (found, entryRepresentation) = if (itr.hasNext()) { - val entry = itr.next() - Pair(matches(entry, searchCriterion), entry ?: Text.NULL) - } else { - Pair(false, DescriptionIterableAssertion.SIZE_EXCEEDED) - } - val description = TranslatableWithArgs(DescriptionIterableAssertion.ENTRY_WITH_INDEX, index) - AssertImpl.builder.feature - .withDescriptionAndRepresentation(description, entryRepresentation) - .withAssertion(createEntryFeatureAssertion(found)) - .build() - } - - abstract fun matches(actual: E?, searchCriterion: SC): Boolean - - private fun createSizeFeatureAssertion(expectedSize: Int, iterableAsList: List, itr: Iterator): AssertionGroup { - val additionalEntries = mutableListOf() - val actualSize = iterableAsList.size - while (itr.hasNext()) { - additionalEntries.add(itr.next()) - } - - val sizeAssertion = AssertImpl.builder.descriptive - .withTest { actualSize == expectedSize } - .withDescriptionAndRepresentation(TO_BE, Text(expectedSize.toString())) - .build() - - val featureAssertions = mutableListOf() - featureAssertions.add(sizeAssertion) - if (actualSize > expectedSize) { - featureAssertions.add(LazyThreadUnsafeAssertionGroup { - val assertions = additionalEntries.mapIndexed { index, it -> - val description = TranslatableWithArgs(DescriptionIterableAssertion.ENTRY_WITH_INDEX, expectedSize + index) - AssertImpl.builder.descriptive - .holding - .withDescriptionAndRepresentation(description, it) - .build() - } - val warningAdditionalAssertions = AssertImpl.builder.list - .withDescriptionAndEmptyRepresentation(DescriptionIterableAssertion.WARNING_ADDITIONAL_ENTRIES) - .withAssertions(assertions) - .build() - AssertImpl.builder.explanatoryGroup - .withWarningType - .withAssertion(warningAdditionalAssertions) - .build() - }) - } - return AssertImpl.builder.feature - .withDescriptionAndRepresentation(additionalEntries::size.name, Text(actualSize.toString())) - .withAssertions(featureAssertions) - .build() - } -} diff --git a/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/iterable/contains/creators/IterableContainsInOrderOnlyEntriesAssertionCreator.kt b/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/iterable/contains/creators/IterableContainsInOrderOnlyEntriesAssertionCreator.kt deleted file mode 100644 index 509333733..000000000 --- a/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/iterable/contains/creators/IterableContainsInOrderOnlyEntriesAssertionCreator.kt +++ /dev/null @@ -1,39 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0 */) -package ch.tutteli.atrium.assertions.iterable.contains.creators - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.assertions.AssertionGroup -import ch.tutteli.atrium.assertions.iterable.contains.searchbehaviours.IterableContainsInOrderOnlySearchBehaviour -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.reporting.translating.Translatable - -/** - * Represents a creator of a sophisticated `contains` assertions for [Iterable] where exactly the expected entries - * have to appear in the specified order and where an entry is identified by holding a group of assertions, - * created by an assertion creator lambda. - * - * @param T The type of the [AssertionPlant.subject][SubjectProvider.subject] for which the `contains` assertion is be build. - * - * @constructor Represents a creator of a sophisticated `contains` assertions for [Iterable] where exactly the - * expected entries have to appear in the specified order and where an entry is identified by holding a - * group of assertions, created by an assertion creator lambda. - * @param searchBehaviour The search behaviour -- in this case representing `in any order only` which is used to - * decorate the description (a [Translatable]) which is used for the [AssertionGroup]. - */ -@Deprecated("Please open an issue if you used this class; will be removed with 1.0.0") -class IterableContainsInOrderOnlyEntriesAssertionCreator>( - searchBehaviour: IterableContainsInOrderOnlySearchBehaviour -) : IterableContainsInOrderOnlyAssertionCreator.() -> Unit)?>(searchBehaviour) { - - override fun createEntryAssertion(iterableAsList: List, searchCriterion: (AssertionPlant.() -> Unit)?, template: ((Boolean) -> Assertion) -> AssertionGroup): AssertionGroup { - val explanatoryAssertions = createExplanatoryAssertions(searchCriterion, iterableAsList) - return template(createEntryFeatureAssertion(explanatoryAssertions)) - } - - private fun createEntryFeatureAssertion(explanatoryAssertions: List): (Boolean) -> Assertion - = { found -> createEntryAssertion(explanatoryAssertions, found) } - - override fun matches(actual: E?, searchCriterion: (AssertionPlant.() -> Unit)?): Boolean - = allCreatedAssertionsHold(actual, searchCriterion) -} diff --git a/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/iterable/contains/creators/IterableContainsInOrderOnlyObjectsAssertionCreator.kt b/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/iterable/contains/creators/IterableContainsInOrderOnlyObjectsAssertionCreator.kt deleted file mode 100644 index a15e50220..000000000 --- a/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/iterable/contains/creators/IterableContainsInOrderOnlyObjectsAssertionCreator.kt +++ /dev/null @@ -1,37 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0 */) -package ch.tutteli.atrium.assertions.iterable.contains.creators - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.assertions.AssertionGroup -import ch.tutteli.atrium.assertions.iterable.contains.searchbehaviours.IterableContainsInOrderOnlySearchBehaviour -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.domain.builders.AssertImpl -import ch.tutteli.atrium.reporting.translating.Translatable -import ch.tutteli.atrium.translations.DescriptionBasic.TO_BE - -/** - * Represents a creator of a sophisticated `contains` assertions for [Iterable] where exactly the expected entries - * have to appear in the specified order and where an entry is identified by an expected object (equality comparison). - * - * @param T The type of the [AssertionPlant.subject][SubjectProvider.subject] for which the `contains` assertion is be build. - * - * @constructor Represents a creator of a sophisticated `contains` assertions for [Iterable] where exactly the - * expected entries have to appear in the specified order and where an entry is identified by an - * expected object (equality comparison). - * @param searchBehaviour The search behaviour -- in this case representing `in any order only` which is used to - * decorate the description (a [Translatable]) which is used for the [AssertionGroup]. - */ -@Deprecated("Please open an issue if you used this class; will be removed with 1.0.0") -class IterableContainsInOrderOnlyObjectsAssertionCreator>( - searchBehaviour: IterableContainsInOrderOnlySearchBehaviour -) : IterableContainsInOrderOnlyAssertionCreator(searchBehaviour) { - - override fun createEntryAssertion(iterableAsList: List, searchCriterion: E, template: ((Boolean) -> Assertion) -> AssertionGroup): AssertionGroup - = template(createEntryFeatureAssertion(searchCriterion)) - - private fun createEntryFeatureAssertion(searchCriterion: E): (Boolean) -> Assertion - = { found -> AssertImpl.builder.createDescriptive(TO_BE, searchCriterion) { found } } - - override fun matches(actual: E?, searchCriterion: E): Boolean - = actual == searchCriterion -} diff --git a/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/iterable/contains/creators/containsEntriesFun.kt b/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/iterable/contains/creators/containsEntriesFun.kt deleted file mode 100644 index e575bab8b..000000000 --- a/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/iterable/contains/creators/containsEntriesFun.kt +++ /dev/null @@ -1,65 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0 */) -package ch.tutteli.atrium.assertions.iterable.contains.creators - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.core.coreFactory -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.assertions.builders.fixedClaimGroup -import ch.tutteli.atrium.domain.builders.AssertImpl -import ch.tutteli.atrium.reporting.translating.Translatable -import ch.tutteli.atrium.translations.DescriptionIterableAssertion - -@Deprecated("Will be removed with 1.0.0", ReplaceWith("")) -internal fun createExplanatoryAssertions(assertionCreator: (AssertionPlant.() -> Unit)?, list: List) - = when { - list.isNotEmpty() -> collectIterableAssertionsForExplanationWithFirst(assertionCreator, list.firstOrNull { it != null }) - else -> collectIterableAssertionsForExplanation(assertionCreator, null) - } - -@Deprecated("Will be removed with 1.0.0", ReplaceWith("")) -internal fun collectIterableAssertionsForExplanationWithFirst(assertionCreator: (AssertionPlant.() -> Unit)?, first: E?): List { - return if (first != null) { - collectIterableAssertionsForExplanation(assertionCreator, first) - } else { - collectIterableAssertionsForExplanation( - DescriptionIterableAssertion.CANNOT_EVALUATE_SUBJECT_ONLY_NULL, assertionCreator, null - ) - } -} - -@Deprecated("Will be removed with 1.0.0", ReplaceWith("")) -internal fun collectIterableAssertionsForExplanation(assertionCreator: (AssertionPlant.() -> Unit)?, subject: E?) - = collectIterableAssertionsForExplanation( - DescriptionIterableAssertion.CANNOT_EVALUATE_SUBJECT_EMPTY_ITERABLE, assertionCreator, subject - ) - -@Deprecated("Will be removed with 1.0.0", ReplaceWith("")) -internal fun collectIterableAssertionsForExplanation(warningCannotEvaluate: Translatable, assertionCreator: (AssertionPlant.() -> Unit)?, subject: E?) - = AssertImpl.collector - .forExplanation - .throwIfNoAssertionIsCollected - .collect(warningCannotEvaluate, ch.tutteli.atrium.creating.MaybeSubject(subject), assertionCreator) - -@Deprecated("Will be removed with 1.0.0", ReplaceWith("")) -internal fun createEntryAssertion(explanatoryAssertions: List, found: Boolean) - = AssertImpl.builder.fixedClaimGroup - .withListType - .withClaim(found) - .withDescriptionAndEmptyRepresentation(DescriptionIterableAssertion.AN_ENTRY_WHICH) - .withAssertion(AssertImpl.builder.explanatoryGroup - .withDefaultType - .withAssertions(explanatoryAssertions) - .build() - ) - .build() - -@Suppress("USELESS_CAST") -@Deprecated("Will be removed with 1.0.0", ReplaceWith("")) -internal fun allCreatedAssertionsHold(subject: E?, assertionCreator: (AssertionPlant.() -> Unit)?): Boolean - = when (subject) { - null -> assertionCreator == null - else -> assertionCreator != null && - coreFactory.newCheckingPlant { subject as E } - .addAssertionsCreatedBy(assertionCreator) - .allAssertionsHold() - } diff --git a/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/iterable/contains/creators/creators.kt b/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/iterable/contains/creators/creators.kt deleted file mode 100644 index 5bbeb3960..000000000 --- a/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/iterable/contains/creators/creators.kt +++ /dev/null @@ -1,166 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0 */) -package ch.tutteli.atrium.assertions.iterable.contains.creators - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.assertions.AssertionGroup -import ch.tutteli.atrium.assertions.iterable.contains.IterableContains -import ch.tutteli.atrium.assertions.iterable.contains.builders.IterableContainsBuilder -import ch.tutteli.atrium.assertions.iterable.contains.builders.IterableContainsCheckerBuilder -import ch.tutteli.atrium.assertions.iterable.contains.builders.IterableContainsNoOpCheckerBuilder -import ch.tutteli.atrium.assertions.iterable.contains.searchbehaviours.IterableContainsInAnyOrderOnlySearchBehaviour -import ch.tutteli.atrium.assertions.iterable.contains.searchbehaviours.IterableContainsInAnyOrderSearchBehaviour -import ch.tutteli.atrium.assertions.iterable.contains.searchbehaviours.IterableContainsInOrderOnlySearchBehaviour -import ch.tutteli.atrium.creating.AssertionPlant - -@Deprecated("Use AssertImpl.iterable.contains.valuesInAnyOrder; will be removed with 1.0.0", - ReplaceWith( - "AssertImpl.iterable.contains.valuesInAnyOrder(checker, expected, *otherExpected)", - "ch.tutteli.atrium.creating.AssertImpl" - ) -) -fun > _containsObjectsInAnyOrder( - checker: IterableContainsCheckerBuilder, - expected: E, - otherExpected: Array -): Assertion - = createAssertionGroup(checker, expected, otherExpected, ::IterableContainsInAnyOrderObjectsAssertionCreator) - -@Deprecated("Use AssertImpl.iterable.contains.entriesInAnyOrderWithAssert; will be removed with 1.0.0", - ReplaceWith( - "AssertImpl.iterable.contains.entriesInAnyOrderWithAssert(checker, assertionCreator, *otherAssertionCreators)", - "ch.tutteli.atrium.creating.AssertImpl" - ) -) -fun > _containsEntriesInAnyOrder( - checker: IterableContainsCheckerBuilder, - assertionCreator: AssertionPlant.() -> Unit, - otherAssertionCreators: Array.() -> Unit> -): Assertion - = createAssertionGroup(checker, assertionCreator, otherAssertionCreators, ::IterableContainsInAnyOrderEntriesAssertionCreator) - -@Deprecated("Use AssertImpl.iterable.contains.nullableEntriesInAnyOrder; will be removed with 1.0.0", - ReplaceWith( - "AssertImpl.iterable.contains.nullableEntriesInAnyOrder(checker, assertionCreator, *otherAssertionCreators)", - "ch.tutteli.atrium.creating.AssertImpl" - ) -) -@JvmName("_containsNullableEntriesInAnyOrder") -fun > _containsEntriesInAnyOrder( - checker: IterableContainsCheckerBuilder, - assertionCreator: (AssertionPlant.() -> Unit)?, - otherAssertionCreators: Array.() -> Unit)?> -): Assertion - = createAssertionGroup(checker, assertionCreator, otherAssertionCreators, ::IterableContainsInAnyOrderEntriesAssertionCreator) - -@Deprecated("Use AssertImpl.iterable.contains.valuesInAnyOrderOnly; will be removed with 1.0.0", - ReplaceWith( - "AssertImpl.iterable.contains.valuesInAnyOrderOnly(builder, expected, *otherExpected)", - "ch.tutteli.atrium.creating.AssertImpl" - ) -) -fun > _containsObjectsInAnyOrderOnly( - builder: IterableContainsBuilder, - expected: E, - otherExpected: Array -): Assertion { - val checker = IterableContainsNoOpCheckerBuilder(builder) - return createAssertionGroupWithoutChecker(checker, expected, otherExpected, ::IterableContainsInAnyOrderOnlyObjectsAssertionCreator) -} - -@Deprecated("Use AssertImpl.iterable.contains.entriesInAnyOrderOnlyWithAssert; will be removed with 1.0.0", - ReplaceWith( - "AssertImpl.iterable.contains.entriesInAnyOrderOnlyWithAssert(builder, assertionCreator, *otherAssertionCreators)", - "ch.tutteli.atrium.creating.AssertImpl" - ) -) -fun > _containsEntriesInAnyOrderOnly( - builder: IterableContainsBuilder, - assertionCreator: AssertionPlant.() -> Unit, - otherAssertionCreators: Array.() -> Unit> -): Assertion { - val checker = IterableContainsNoOpCheckerBuilder(builder) - return createAssertionGroupWithoutChecker(checker, assertionCreator, otherAssertionCreators, ::IterableContainsInAnyOrderOnlyEntriesAssertionCreator) -} - -@Deprecated("Use AssertImpl.iterable.contains.nullableEntriesInAnyOrderOnly; will be removed with 1.0.0", - ReplaceWith( - "AssertImpl.iterable.contains.nullableEntriesInAnyOrderOnly(builder, assertionCreator, *otherAssertionCreators)", - "ch.tutteli.atrium.creating.AssertImpl" - ) -) -@JvmName("_containsNullableEntriesInAnyOrderOnly") -fun > _containsEntriesInAnyOrderOnly( - builder: IterableContainsBuilder, - assertionCreator: (AssertionPlant.() -> Unit)?, - otherAssertionCreators: Array.() -> Unit)?> -): Assertion { - val checker = IterableContainsNoOpCheckerBuilder(builder) - return createAssertionGroupWithoutChecker(checker, assertionCreator, otherAssertionCreators, ::IterableContainsInAnyOrderOnlyEntriesAssertionCreator) -} - -@Deprecated("Use AssertImpl.iterable.contains.valuesInOrderOnly; will be removed with 1.0.0", - ReplaceWith( - "AssertImpl.iterable.contains.valuesInOrderOnly(builder, expected, *otherExpected)", - "ch.tutteli.atrium.creating.AssertImpl" - ) -) -fun > _containsObjectsInOrderOnly( - builder: IterableContainsBuilder, - expected: E, - otherExpected: Array -): Assertion { - val checker = IterableContainsNoOpCheckerBuilder(builder) - return createAssertionGroupWithoutChecker(checker, expected, otherExpected, ::IterableContainsInOrderOnlyObjectsAssertionCreator) -} - -@Deprecated("Use AssertImpl.iterable.contains.entriesInOrderOnlyWithAssert; will be removed with 1.0.0", - ReplaceWith( - "AssertImpl.iterable.contains.entriesInOrderOnlyWithAssert(builder, assertionCreator, *otherAssertionCreators)", - "ch.tutteli.atrium.creating.AssertImpl" - ) -) -fun > _containsEntriesInOrderOnly( - builder: IterableContainsBuilder, - assertionCreator: AssertionPlant.() -> Unit, - otherAssertionCreators: Array.() -> Unit> -): Assertion { - val checker = IterableContainsNoOpCheckerBuilder(builder) - return createAssertionGroupWithoutChecker(checker, assertionCreator, otherAssertionCreators, ::IterableContainsInOrderOnlyEntriesAssertionCreator) -} - -@Deprecated("Use AssertImpl.iterable.contains.nullableEntriesInOrderOnly; will be removed with 1.0.0", - ReplaceWith( - "AssertImpl.iterable.contains.nullableEntriesInOrderOnly(builder, assertionCreator, *otherAssertionCreators)", - "ch.tutteli.atrium.creating.AssertImpl" - ) -) -@JvmName("_containsNullableEntriesInOrderOnly") -fun > _containsEntriesInOrderOnly( - builder: IterableContainsBuilder, - assertionCreator: (AssertionPlant.() -> Unit)?, - otherAssertionCreators: Array.() -> Unit)?> -): Assertion { - val checker = IterableContainsNoOpCheckerBuilder(builder) - return createAssertionGroupWithoutChecker(checker, assertionCreator, otherAssertionCreators, ::IterableContainsInOrderOnlyEntriesAssertionCreator) -} - - -private fun , S, B : IterableContains.SearchBehaviour> createAssertionGroupWithoutChecker( - checker: IterableContainsCheckerBuilder, - expected: S, - otherExpected: Array, - factory: (B) -> IterableContains.Creator -): AssertionGroup { - val creator = factory(checker.containsBuilder.searchBehaviour) - return creator.createAssertionGroup(checker.containsBuilder.subjectProvider, listOf(expected, *otherExpected)) -} - -private fun , S, B : IterableContains.SearchBehaviour> createAssertionGroup( - checker: IterableContainsCheckerBuilder, - expected: S, - otherExpected: Array, - factory: (B, List) -> IterableContains.Creator -): AssertionGroup { - val creator = factory(checker.containsBuilder.searchBehaviour, checker.checkers) - return creator.createAssertionGroup(checker.containsBuilder.subjectProvider, listOf(expected, *otherExpected)) -} diff --git a/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/iterable/contains/searchbehaviours/searchBehaviours.kt b/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/iterable/contains/searchbehaviours/searchBehaviours.kt deleted file mode 100644 index b97195beb..000000000 --- a/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/iterable/contains/searchbehaviours/searchBehaviours.kt +++ /dev/null @@ -1,40 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0 */) -package ch.tutteli.atrium.assertions.iterable.contains.searchbehaviours - -import ch.tutteli.atrium.assertions.iterable.contains.builders.IterableContainsBuilder - -@Deprecated("Use AssertImpl.iterable.contains.searchBehaviours.inAnyOrder; will be removed with 1.0.0", - ReplaceWith( - "AssertImpl.iterable.contains.searchBehaviours.inAnyOrder(containsBuilder)", - "ch.tutteli.atrium.creating.AssertImpl" - ) -) -fun > _containsInAnyOrder(containsBuilder: IterableContainsBuilder) - = IterableContainsBuilder(containsBuilder.subjectProvider, IterableContainsInAnyOrderSearchBehaviour()) - -@Deprecated("Use AssertImpl.iterable.contains.searchBehaviours.inAnyOrderOnly; will be removed with 1.0.0", - ReplaceWith( - "AssertImpl.iterable.contains.searchBehaviours.inAnyOrderOnly(containsBuilder)", - "ch.tutteli.atrium.creating.AssertImpl" - ) -) -fun > _containsInAnyOrderOnly(containsBuilder: IterableContainsBuilder) - = IterableContainsBuilder(containsBuilder.subjectProvider, IterableContainsInAnyOrderOnlySearchBehaviour()) - -@Deprecated("Use AssertImpl.iterable.contains.searchBehaviours.inOrder; will be removed with 1.0.0", - ReplaceWith( - "AssertImpl.iterable.contains.searchBehaviours.inOrder(containsBuilder)", - "ch.tutteli.atrium.creating.AssertImpl" - ) -) -fun > _containsInOrder(containsBuilder: IterableContainsBuilder) - = IterableContainsBuilder(containsBuilder.subjectProvider, IterableContainsInOrderSearchBehaviour()) - -@Deprecated("Use AssertImpl.iterable.contains.searchBehaviours.inOrderOnly; will be removed with 1.0.0", - ReplaceWith( - "AssertImpl.iterable.contains.searchBehaviours.inOrderOnly(containsBuilder)", - "ch.tutteli.atrium.creating.AssertImpl" - ) -) -fun > _containsInOrderOnly(containsBuilder: IterableContainsBuilder) - = IterableContainsBuilder(containsBuilder.subjectProvider, IterableContainsInOrderOnlySearchBehaviour()) diff --git a/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/iterableAssertions.kt b/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/iterableAssertions.kt deleted file mode 100644 index 97574e429..000000000 --- a/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/iterableAssertions.kt +++ /dev/null @@ -1,24 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") -package ch.tutteli.atrium.assertions - -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.domain.builders.AssertImpl - -@Deprecated("Use AssertImpl.iterable.containsBuilder; will be removed with 1.0.0", - ReplaceWith( - "AssertImpl.iterable.containsBuilder(plant)", - "ch.tutteli.atrium.creating.AssertImpl" - ) -) -fun > _containsBuilder(plant: AssertionPlant) - = AssertImpl.iterable.containsBuilder(plant) - -@Deprecated("Use AssertImpl.iterable.containsNotBuilder; will be removed with 1.0.0", - ReplaceWith( - "AssertImpl.iterable.containsNotBuilder(plant)", - "ch.tutteli.atrium.creating.AssertImpl" - ) -) -fun > _containsNotBuilder(plant: AssertionPlant) - = AssertImpl.iterable.containsNotBuilder(plant) diff --git a/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/throwable/thrown/creators/ThrowableThrownAssertionCreator.kt b/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/throwable/thrown/creators/ThrowableThrownAssertionCreator.kt deleted file mode 100644 index 90f8e4f2f..000000000 --- a/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/throwable/thrown/creators/ThrowableThrownAssertionCreator.kt +++ /dev/null @@ -1,64 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0 */) -package ch.tutteli.atrium.assertions.throwable.thrown.creators - -import ch.tutteli.atrium.assertions.any.typetransformation.AnyTypeTransformation -import ch.tutteli.atrium.assertions.any.typetransformation.DownCaster -import ch.tutteli.atrium.assertions.throwable.thrown.ThrowableThrown -import ch.tutteli.atrium.assertions.throwable.thrown.builders.ThrowableThrownBuilder -import ch.tutteli.atrium.core.coreFactory -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.creating.ReportingAssertionPlantNullable -import ch.tutteli.atrium.reporting.translating.Translatable -import kotlin.reflect.KClass - -/** - * Represents a creator of a sophisticated a [Throwable] (of type [TExpected]) was thrown assertion. - * - * It uses the given [absentThrowableMessageProvider] in case no [Throwable] was thrown at all and uses a [DownCaster] - * to perform the down-cast to the desired type [TExpected] (for this it passes on the given [failureHandler] to the - * [DownCaster]) - * - * @param TExpected The type of the [Throwable] which we expect was thrown. - * - * @constructor Represents a creator of a sophisticated a [Throwable] (of type [TExpected]) was thrown assertion. - * @param absentThrowableMessageProvider Provides a description for the case no [Throwable] was thrown at all. - * @param failureHandler A handler which decides how the assertion creator lambda (see [executeActAndCreateAssertion]) - * is used in reporting. - */ -@Deprecated("Please open an issue if you used this class; will be removed with 1.0.0") -class ThrowableThrownAssertionCreator( - private val absentThrowableMessageProvider: ThrowableThrown.AbsentThrowableMessageProvider, - private val failureHandler: AnyTypeTransformation.TypeTransformationFailureHandler -) : ThrowableThrown.Creator { - - override fun executeActAndCreateAssertion( - throwableThrownBuilder: ThrowableThrownBuilder, - description: Translatable, - expectedType: KClass, - assertionCreator: AssertionPlant.() -> Unit - ) { - val throwable: Throwable? = catchThrowable(throwableThrownBuilder) - val subjectPlant = createReportingPlantForThrowable(throwableThrownBuilder, throwable) - - DownCaster(failureHandler) - .downCast(description, expectedType, subjectPlant, assertionCreator) - } - - private fun catchThrowable(throwableThrownBuilder: ThrowableThrownBuilder): Throwable? { - return try { - throwableThrownBuilder.act() - null - } catch (t: Throwable) { - t - } - } - - private fun createReportingPlantForThrowable(throwableThrownBuilder: ThrowableThrownBuilder, throwable: Throwable?): ReportingAssertionPlantNullable { - return coreFactory.newReportingPlantNullable( - throwableThrownBuilder.assertionVerb, - { throwable }, - throwableThrownBuilder.reporter, - absentThrowableMessageProvider.message - ) - } -} diff --git a/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/throwable/thrown/providers/TranslatableAsAbsentThrowableMessageProvider.kt b/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/throwable/thrown/providers/TranslatableAsAbsentThrowableMessageProvider.kt deleted file mode 100644 index 0000bf06e..000000000 --- a/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/throwable/thrown/providers/TranslatableAsAbsentThrowableMessageProvider.kt +++ /dev/null @@ -1,15 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0 */) -package ch.tutteli.atrium.assertions.throwable.thrown.providers - -import ch.tutteli.atrium.assertions.throwable.thrown.ThrowableThrown -import ch.tutteli.atrium.reporting.RawString -import ch.tutteli.atrium.reporting.translating.Translatable - -/** - * Represents a [ThrowableThrown.AbsentThrowableMessageProvider] which is using a given [Translatable] which in $ - * turn explains an absent [Throwable]. - */ -@Deprecated("Use the provider from package creating; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.creating.throwable.thrown.providers.TranslatableAsAbsentThrowableMessageProvider")) -class TranslatableAsAbsentThrowableMessageProvider(translatable: Translatable) : ThrowableThrown.AbsentThrowableMessageProvider { - override val message = RawString.create(translatable) -} diff --git a/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/throwableAssertions.kt b/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/throwableAssertions.kt deleted file mode 100644 index b891535c6..000000000 --- a/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/throwableAssertions.kt +++ /dev/null @@ -1,20 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") - -package ch.tutteli.atrium.assertions - -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.domain.builders.AssertImpl -import ch.tutteli.atrium.domain.robstoll.lib.creating.throwable.thrown.builders.ThrowableThrownBuilder -import kotlin.reflect.KClass - -@Deprecated("Use AssertImpl.throwable.thrown.toBe; will be removed with 1.0.0", - ReplaceWith( - "AssertImpl.throwable.thrown.toBe(throwableThrownBuilder, expectedType, assertionCreator)", - "ch.tutteli.atrium.creating.AssertImpl" - ) -) -fun _toThrow(throwableThrownBuilder: ThrowableThrownBuilder, expectedType: KClass, assertionCreator: AssertionPlant.() -> Unit) { - @Suppress("DEPRECATION") - AssertImpl.throwable.thrown.toBe(throwableThrownBuilder, expectedType, assertionCreator) -} diff --git a/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/typeTransformationAssertions.kt b/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/typeTransformationAssertions.kt deleted file mode 100644 index ef46539ab..000000000 --- a/misc/deprecated/atrium-assertions/src/main/kotlin/ch/tutteli/atrium/assertions/typeTransformationAssertions.kt +++ /dev/null @@ -1,75 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") - -package ch.tutteli.atrium.assertions - -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.creating.AssertionPlantNullable -import ch.tutteli.atrium.creating.BaseAssertionPlant -import ch.tutteli.atrium.domain.builders.AssertImpl -import ch.tutteli.atrium.domain.creating.any.typetransformation.AnyTypeTransformation -import ch.tutteli.atrium.domain.creating.any.typetransformation.failurehandlers.failureHandlerFactory -import ch.tutteli.atrium.reporting.translating.Translatable -import kotlin.reflect.KClass - -@Deprecated("Use AssertImpl.any.typeTransformation.isNotNull; will be removed with 1.0.0", - ReplaceWith( - "AssertImpl.any.typeTransformation.isNotNull(plant, T::class, assertionCreator)", - "ch.tutteli.atrium.creating.AssertImpl" - ) -) -inline fun _isNotNull( - plant: AssertionPlantNullable, - noinline assertionCreator: AssertionPlant.() -> Unit -) { - plant.addAssertion(AssertImpl.any.isNotNull(plant, T::class, assertionCreator)) -} - -@Deprecated("Use AssertImpl.any.typeTransformation.isA; will be removed with 1.0.0", - ReplaceWith( - "AssertImpl.any.typeTransformation.isA(plant, TSub::class, assertionCreator)", - "ch.tutteli.atrium.creating.AssertImpl" - ) -) -inline fun _isA( - plant: AssertionPlant, - noinline assertionCreator: AssertionPlant.() -> Unit -) { - AssertImpl.any.typeTransformation.isA(plant, TSub::class, assertionCreator) -} - -@Deprecated("Use AssertImpl.any.typeTransformation.downCast; will be removed with 1.0.0", - ReplaceWith( - "AssertImpl.any.typeTransformation.downCast(description, subType, subjectPlant, assertionCreator, AssertImpl.any.typeTransformation.failureHandlers.newExplanatory())", - "ch.tutteli.atrium.creating.AssertImpl" - ) -) -fun _downCast( - description: Translatable, - subType: KClass, - subjectPlant: BaseAssertionPlant, - assertionCreator: AssertionPlant.() -> Unit -) { - AssertImpl.any.typeTransformation.downCast(description, subType, subjectPlant, assertionCreator, failureHandlerFactory.newExplanatory()) -} - -@Deprecated("Use AssertImpl.any.typeTransformation.transform; will be removed with 1.0.0", - ReplaceWith( - "AssertImpl.any.typeTransformation.transform(AnyTypeTransformation.ParameterObject(description, representation, subjectPlant, assertionCreator, warningTransformationFailed), canBeTransformed, transform, AssertImpl.any.typeTransformation.failureHandlers.newExplanatory())", - "ch.tutteli.atrium.creating.AssertImpl" - ) -) -fun _typeTransformation( - description: Translatable, - representation: Any, - subjectPlant: BaseAssertionPlant, - assertionCreator: AssertionPlant.() -> Unit, - warningTransformationFailed: Translatable, - canBeTransformed: (T) -> Boolean, - transform: (T) -> TSub -) { - val parameterObject = AnyTypeTransformation.ParameterObject( - description, representation, subjectPlant, assertionCreator, warningTransformationFailed - ) - AssertImpl.any.typeTransformation.transform(parameterObject, canBeTransformed, transform, AssertImpl.any.typeTransformation.failureHandlers.newExplanatory()) -} diff --git a/misc/deprecated/atrium-spec/build.gradle b/misc/deprecated/atrium-spec/build.gradle deleted file mode 100644 index 3361fc342..000000000 --- a/misc/deprecated/atrium-spec/build.gradle +++ /dev/null @@ -1,24 +0,0 @@ -description = 'Provides specifications of Atrium -- an assertion framework for Kotlin -- which can' + - ' be reused by implementations of Atrium, to verify that they fulfill the specification.' - -dependencies { - api prefixedProject('domain-api-jvm') - api prefixedProject('core-api-jvm') - api prefixedProject('domain-builders-jvm') - - runtimeOnly prefixedProject('domain-robstoll-jvm') - runtimeOnly prefixedProject('core-robstoll-jvm') - - implementation prefixedProject('api-cc-en_GB-jvm') - implementation prefixedProject('translations-en_GB-jvm') -} - -// spek is required (not the platform) because we are specifying abstract Specs here -repositories { - maven { url "https://dl.bintray.com/jetbrains/spek" } -} - -dependencies { - api "org.jetbrains.spek:spek-api:$spek_version", excludeKotlin - api mockito(), excludeKotlin -} diff --git a/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/AssertionVerb.kt b/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/AssertionVerb.kt deleted file mode 100644 index 7123f08d5..000000000 --- a/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/AssertionVerb.kt +++ /dev/null @@ -1,26 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0 */) -package ch.tutteli.atrium.spec - -import ch.tutteli.atrium.reporting.translating.StringBasedTranslatable - -@Deprecated( - "Switch to atrium-specs-common; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.specs.AssertionVerb") -) -enum class AssertionVerb(override val value: String) : StringBasedTranslatable { - @Deprecated( - "Switch to atrium-specs-common; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.specs.AssertionVerb.VERB") - ) - VERB("verb"), - @Deprecated( - "Switch to atrium-specs-common; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.specs.AssertionVerb.ASSERT") - ) - ASSERT("assert"), - @Deprecated( - "Switch to atrium-specs-common; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.specs.AssertionVerb.EXPECT_THROWN") - ) - EXPECT_THROWN("expect the thrown exception"), -} diff --git a/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/AssertionVerbFactory.kt b/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/AssertionVerbFactory.kt deleted file mode 100644 index 446afe59f..000000000 --- a/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/AssertionVerbFactory.kt +++ /dev/null @@ -1,20 +0,0 @@ -@file:Suppress( -/* TODO remove annotation with 1.0.0 */ "DEPRECATION", -/* TODO remove annotation with 1.0.0 */ "TYPEALIAS_EXPANSION_DEPRECATION" -) - -package ch.tutteli.atrium.spec - -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.creating.AssertionPlantNullable -import ch.tutteli.atrium.domain.creating.throwable.thrown.ThrowableThrown - -@Deprecated("Will be removed with 1.0.0") -interface AssertionVerbFactory { - fun checkImmediately(subject: T): AssertionPlant - fun checkLazily(subject: T, assertionCreator: Assert.() -> Unit): AssertionPlant - fun checkNullable(subject: T): AssertionPlantNullable - fun checkException(act: () -> Unit): ThrowableThrown.Builder -} - diff --git a/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/SpecBodyExtensions.kt b/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/SpecBodyExtensions.kt deleted file mode 100644 index 9829dccaf..000000000 --- a/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/SpecBodyExtensions.kt +++ /dev/null @@ -1,51 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0 */) -package ch.tutteli.atrium.spec - -import ch.tutteli.kbox.joinToString -import org.jetbrains.spek.api.dsl.SpecBody - -@Deprecated( - "Switch to atrium-specs and spek2; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.specs.describeFunTemplate(describePrefix, funNames, funNamePrefix, funNameSuffix, body)") -) -fun SpecBody.describeFun( - describePrefix: String, - funNames: Array, - funNamePrefix: String = "`", - funNameSuffix: String = "`", - body: SpecBody.() -> Unit -) = prefixedDescribe(describePrefix, " fun ", giveWrappedNames(funNames, funNamePrefix, funNameSuffix), body) - -@Deprecated("Switch to atrium-specs and spek2; will be removed with 1.0.0") -fun SpecBody.describeProperty( - describePrefix: String, - propertyNames: Array, - propertyNamePrefix: String = "`", - propertyNameSuffix: String = "`", - body: SpecBody.() -> Unit -) = prefixedDescribe( - describePrefix, - " property ", - giveWrappedNames(propertyNames, propertyNamePrefix, propertyNameSuffix), - body -) - -private fun giveWrappedNames(names: Array, prefix: String, postfix: String): String { - return names.joinToString(", ", " and ") { it, sb -> - sb.append(prefix).append(it).append(postfix) - } -} - -@Deprecated( - "Switch to atrium-specs and spek2; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.specs.prefixedDescribeTemplate(prefix, description, body)") -) -fun SpecBody.prefixedDescribe(prefix: String, description: String, body: SpecBody.() -> Unit) = - prefixedDescribe(prefix, "", description, body) - -@Deprecated( - "Switch to atrium-specs and spek2; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.specs.prefixedDescribeTemplate(prefix, suffix + description, body)") -) -fun SpecBody.prefixedDescribe(prefix: String, suffix: String, description: String, body: SpecBody.() -> Unit) = - group("${prefix}describe$suffix $description", body = body) diff --git a/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/SpekExtensions.kt b/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/SpekExtensions.kt deleted file mode 100644 index d63218e8c..000000000 --- a/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/SpekExtensions.kt +++ /dev/null @@ -1,59 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0 */) - -package ch.tutteli.atrium.spec - -import ch.tutteli.atrium.creating.AssertionPlant -import org.jetbrains.spek.api.dsl.ActionBody -import org.jetbrains.spek.api.dsl.SpecBody -import org.jetbrains.spek.api.dsl.TestBody -import org.jetbrains.spek.api.dsl.TestContainer - -@Deprecated("Switch to atrium-specs and spek2; will be removed with 1.0.0", ReplaceWith("context(description, body)")) -fun SpecBody.setUp(description: String, body: SpecBody.() -> Unit) = group(description, body = body) - -@Deprecated("Switch to atrium-specs and spek2; will be removed with 1.0.0", ReplaceWith("context(description, body)")) -fun SpecBody.inCaseOf(description: String, body: ActionBody.() -> Unit) = action("in case of $description", body = body) - -@Deprecated("Switch to atrium-specs and spek2; will be removed with 1.0.0", ReplaceWith("it(description, body)")) -fun TestContainer.check(description: String, body: TestBody.() -> Unit) = test(description, body = body) - -@Deprecated( - "Switch to atrium-specs and spek2; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.specs.checkNarrowingAssertion(description, act, lazy, *otherMethods)") -) -fun SpecBody.checkNarrowingAssertion( - description: String, - act: (AssertionPlant.() -> Unit) -> Unit, - lazy: (AssertionPlant.() -> Unit), - vararg otherMethods: Pair.() -> Unit)> -) { - checkGenericNarrowingAssertion(description, act, lazy, *otherMethods) -} - -@Deprecated( - "Switch to atrium-specs and spek2; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.specs.checkGenericNarrowingAssertion(description, act, lazy, *otherMethods)") -) -fun SpecBody.checkGenericNarrowingAssertion( - description: String, - act: (T.() -> Unit) -> Unit, - lazy: (T.() -> Unit), - vararg otherMethods: Pair Unit)> -) = checkGenericNarrowingAssertion(description, act, "lazy" to lazy, *otherMethods) - -@Deprecated( - "Switch to atrium-specs and spek2; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.specs.checkGenericNarrowingAssertion(description, act, *methods)") -) -fun SpecBody.checkGenericNarrowingAssertion( - description: String, act: (T.() -> Unit) -> Unit, vararg methods: Pair Unit)> -) { - group(description) { - mapOf(*methods).forEach { (checkMethod, assertion) -> - test("in case of $checkMethod evaluation") { - act(assertion) - } - } - } -} - diff --git a/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/creating/CheckingAssertionPlantSpec.kt b/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/creating/CheckingAssertionPlantSpec.kt deleted file mode 100644 index daa3084c6..000000000 --- a/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/creating/CheckingAssertionPlantSpec.kt +++ /dev/null @@ -1,100 +0,0 @@ -@file:Suppress("DEPRECATION" /* will be removed with 1.0.0 */) -package ch.tutteli.atrium.spec.creating - -import ch.tutteli.atrium.api.cc.en_GB.messageContains -import ch.tutteli.atrium.api.cc.en_GB.toBe -import ch.tutteli.atrium.api.cc.en_GB.toThrow -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.assertions.DescriptiveAssertion -import ch.tutteli.atrium.creating.CheckingAssertionPlant -import ch.tutteli.atrium.domain.builders.AssertImpl -import ch.tutteli.atrium.spec.AssertionVerbFactory -import ch.tutteli.atrium.spec.describeFun -import ch.tutteli.atrium.spec.inCaseOf -import ch.tutteli.atrium.translations.DescriptionBasic.TO_BE -import org.jetbrains.spek.api.Spek -import org.jetbrains.spek.api.dsl.SpecBody -import org.jetbrains.spek.api.dsl.it - -//TODO remove with 1.0.0 - no need to migrate to Spek2 -@Deprecated("Switch from Assert to Expect and use Spec from atrium-specs-common; will be removed with 1.0.0") -abstract class CheckingAssertionPlantSpec( - verbs: AssertionVerbFactory, - testeeFactory: (Int) -> CheckingAssertionPlant, - describePrefix: String = "[Atrium] " -) : Spek({ - - fun describeFun(vararg funName: String, body: SpecBody.() -> Unit) - = describeFun(describePrefix, funName, body = body) - - val subject = 10 - val testee = testeeFactory(subject) - - describeFun(testee::allAssertionsHold.name) { - inCaseOf("no assertion has been added so far") { - it("throws an ${IllegalStateException::class.simpleName}") { - verbs.checkException { - testee.allAssertionsHold() - }.toThrow { } - } - } - } - - describeFun(testee::createAndAddAssertion.name) { - - val a = subject - inCaseOf("an assertion which holds") { - testee.createAndAddAssertion(TO_BE, a, { a == subject }) - test("${testee::allAssertionsHold.name} returns `true` and does not throw an Exception") { - val result = testee.allAssertionsHold() - verbs.checkImmediately(result).toBe(true) - } - } - - inCaseOf("an assertion which fails") { - testee.createAndAddAssertion(TO_BE, -12, { a == 0 }) - test("${testee::allAssertionsHold.name} returns `false` and does not throw an Exception") { - val result = testee.allAssertionsHold() - verbs.checkImmediately(result).toBe(false) - } - - test("re-checking the assertions (calling ${testee::allAssertionsHold.name} twice) throws an ${IllegalStateException::class.simpleName}") { - verbs.checkException { - testee.allAssertionsHold() - }.toThrow { messageContains("create assertions first") } - } - } - - } - - describeFun(testee::addAssertion.name) { - inCaseOf("a custom assertion which holds") { - testee.addAssertion(object : Assertion { - override fun holds() = true - }) - test("${testee::allAssertionsHold.name} returns `true` and does not throw an Exception") { - val result = testee.allAssertionsHold() - verbs.checkImmediately(result).toBe(true) - } - } - - inCaseOf("a custom ${DescriptiveAssertion::class.java.simpleName} which fails") { - testee.addAssertion( - AssertImpl.builder.descriptive - .failing - .withDescriptionAndRepresentation(TO_BE, "my expected result") - .build() - ) - test("${testee::allAssertionsHold.name} returns `false` and does not throw an Exception") { - val result = testee.allAssertionsHold() - verbs.checkImmediately(result).toBe(false) - } - - test("re-checking the assertions (calling ${testee::allAssertionsHold.name} twice) throws an ${IllegalStateException::class.simpleName}") { - verbs.checkException { - testee.allAssertionsHold() - }.toThrow{} - } - } - } -}) diff --git a/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/creating/CollectingAssertionPlantSpec.kt b/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/creating/CollectingAssertionPlantSpec.kt deleted file mode 100644 index c1fc22f22..000000000 --- a/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/creating/CollectingAssertionPlantSpec.kt +++ /dev/null @@ -1,73 +0,0 @@ -@file:Suppress("DEPRECATION" /* will be removed with 1.0.0 */) -package ch.tutteli.atrium.spec.creating - -import ch.tutteli.atrium.api.cc.en_GB.toBe -import ch.tutteli.atrium.api.cc.en_GB.toThrow -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.creating.CollectingAssertionPlant -import ch.tutteli.atrium.spec.AssertionVerbFactory -import ch.tutteli.atrium.spec.inCaseOf -import ch.tutteli.atrium.spec.prefixedDescribe -import org.jetbrains.spek.api.Spek -import org.jetbrains.spek.api.dsl.SpecBody -import org.jetbrains.spek.api.dsl.context -import org.jetbrains.spek.api.dsl.it - -//TODO remove with 1.0.0 - no need to migrate to Spek2 -@Deprecated("Switch from Assert to Expect and use Spec from atrium-specs-common; will be removed with 1.0.0") -abstract class CollectingAssertionPlantSpec( - verbs: AssertionVerbFactory, - testeeFactory: (() -> Int) -> CollectingAssertionPlant, - describePrefix: String = "[Atrium] " -) : Spek({ - - fun prefixedDescribe(description: String, body: SpecBody.() -> Unit) - = prefixedDescribe(describePrefix, description, body) - - val testee = testeeFactory { 1 } - - prefixedDescribe("fun ${testee::getAssertions.name}") { - - context("no assertion has been added so far") { - it("returns an empty list") { - verbs.checkImmediately(testee.getAssertions()).toBe(listOf()) - } - - inCaseOf("an assertion is added") { - val assertion: Assertion = object : Assertion { - override fun holds() = true - } - testee.addAssertion(assertion) - it("returns the assertion") { - verbs.checkImmediately(testee.getAssertions()).toBe(listOf(assertion)) - } - - it("returns the assertion when calling ${testee::getAssertions.name} a second time") { - verbs.checkImmediately(testee.getAssertions()).toBe(listOf(assertion)) - } - } - } - } - - @Suppress("DEPRECATION" /* TODO remove with 1.0.0 */) - prefixedDescribe("accessing ${testee::subject.name}") { - context("subject was provided") { - it("does not throw an exception when accessing subject") { - testee.subject - } - } - - context("provider throws an ${ch.tutteli.atrium.creating.PlantHasNoSubjectException::class.simpleName}") { - val plantHasNoSubjectException = ch.tutteli.atrium.creating.PlantHasNoSubjectException() - val testeeThrowing = testeeFactory { throw plantHasNoSubjectException } - - it("throws the exception when accessing subject") { - verbs.checkException { - testeeThrowing.subject - }.toThrow { toBe(plantHasNoSubjectException) } - } - } - } - - -}) diff --git a/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/creating/ReportingAssertionPlantSpec.kt b/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/creating/ReportingAssertionPlantSpec.kt deleted file mode 100644 index c289d99ba..000000000 --- a/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/creating/ReportingAssertionPlantSpec.kt +++ /dev/null @@ -1,145 +0,0 @@ -@file:Suppress("DEPRECATION" /* will be removed with 1.0.0 */) -package ch.tutteli.atrium.spec.creating - -import ch.tutteli.atrium.api.cc.en_GB.messageContains -import ch.tutteli.atrium.api.cc.en_GB.toThrow -import ch.tutteli.atrium.assertions.DescriptiveAssertion -import ch.tutteli.atrium.core.falseProvider -import ch.tutteli.atrium.core.trueProvider -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.creating.AssertionPlantWithCommonFields -import ch.tutteli.atrium.creating.ReportingAssertionPlant -import ch.tutteli.atrium.domain.creating.throwable.thrown.ThrowableThrown -import ch.tutteli.atrium.reporting.Text -import ch.tutteli.atrium.spec.AssertionVerb -import ch.tutteli.atrium.spec.AssertionVerbFactory -import ch.tutteli.atrium.spec.describeFun -import ch.tutteli.atrium.spec.setUp -import ch.tutteli.atrium.translations.DescriptionBasic.TO_BE -import org.jetbrains.spek.api.Spek -import org.jetbrains.spek.api.dsl.SpecBody -import org.jetbrains.spek.api.dsl.context -import org.jetbrains.spek.api.dsl.it -import org.jetbrains.spek.api.dsl.on - -//TODO remove with 1.0.0 - no need to migrate to Spek2 -@Deprecated("Switch from Assert to Expect and use Spec from atrium-specs-common; will be removed with 1.0.0") -abstract class ReportingAssertionPlantSpec( - verbs: AssertionVerbFactory, - testeeFactory: (AssertionPlantWithCommonFields.CommonFields) -> ReportingAssertionPlant, - describePrefix: String = "[Atrium] " -) : Spek({ - - fun describeFun(vararg funName: String, body: SpecBody.() -> Unit) - = describeFun(describePrefix, funName, body = body) - - val expect = verbs::checkException - val assertionVerb = AssertionVerb.VERB - val subject = 10 - val description = TO_BE - val expected = -12 - - val assertionChecker = (verbs.checkLazily(1, {}) as ReportingAssertionPlant).commonFields.assertionChecker - fun createTestee() - = testeeFactory(AssertionPlantWithCommonFields.CommonFields(assertionVerb, { 10 }, {10}, assertionChecker, - Text.NULL - )) - - val plant = createTestee() - - fun triple(funName: String, holdingFun: AssertionPlant.() -> AssertionPlant, failingFun: AssertionPlant.() -> AssertionPlant): Triple.() -> AssertionPlant, AssertionPlant.() -> AssertionPlant> - = Triple(funName, holdingFun, failingFun) - - val basicAssertionWhichHolds = object : DescriptiveAssertion { - override val description = description - override val representation = expected - override fun holds() = true - } - val basicAssertionWhichFails = object : DescriptiveAssertion { - override val description = description - override val representation = expected - override fun holds() = false - } - - listOf( - triple( - plant::createAndAddAssertion.name, - { createAndAddAssertion(description, expected, trueProvider) }, - { createAndAddAssertion(description, expected, falseProvider) } - ), - triple( - plant::addAssertion.name, - { addAssertion(basicAssertionWhichHolds) }, - { addAssertion(basicAssertionWhichFails) }), - triple( - "${plant::addAssertionsCreatedBy.name} using ${plant::createAndAddAssertion.name} inside", - { addAssertionsCreatedBy { createAndAddAssertion(description, expected, trueProvider) } }, - { addAssertionsCreatedBy { createAndAddAssertion(description, expected, falseProvider) } } - ), - triple( - "${plant::addAssertionsCreatedBy.name} using ${plant::addAssertion.name} inside", - { addAssertionsCreatedBy { addAssertion(basicAssertionWhichHolds) } }, - { addAssertionsCreatedBy { addAssertion(basicAssertionWhichFails) } } - ), - triple( - "${plant::addAssertionsCreatedBy.name} using ${plant::addAssertionsCreatedBy.name} inside", - { addAssertionsCreatedBy { addAssertionsCreatedBy { addAssertion(basicAssertionWhichHolds) } } }, - { addAssertionsCreatedBy { addAssertionsCreatedBy { addAssertion(basicAssertionWhichFails) } } } - ) - ).forEach { (funName, holdingFun, failingFun) -> - describeFun(funName) { - setUp("in case of an assertion which holds") { - val testee = createTestee() - it("does not throw an Exception") { - testee.holdingFun() - } - - it("throws an AssertionError when an additional assertion does not hold") { - expect { - testee.failingFun() - }.toThrow{} - } - } - - setUp("in case of assertion which fails") { - setUp("throws an AssertionError") { - fun expectFun(): ThrowableThrown.Builder { - val testee = createTestee() - return expect { - testee.failingFun() - } - } - - context("exception message") { - - it("contains the ${plant.commonFields::assertionVerb.name}'") { - expectFun().toThrow { messageContains(assertionVerb.getDefault()) } - } - it("contains the subject") { - expectFun().toThrow { - messageContains(subject) - } - } - it("contains the '${DescriptiveAssertion::description.name}' of the assertion-message") { - expectFun().toThrow { messageContains(description.getDefault()) } - } - it("contains the '${DescriptiveAssertion::representation.name}' of the assertion-message") { - expectFun().toThrow { messageContains(expected) } - } - } - - on("adding a another assertion which holds") { - val testee = createTestee() - expect { - testee.failingFun() - }.toThrow{} - - it("does not re-throw due to the previous failing assertion") { - testee.holdingFun() - } - } - } - } - } - } -}) diff --git a/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/AnyAssertionsSpec.kt b/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/AnyAssertionsSpec.kt deleted file mode 100644 index 1c92646cf..000000000 --- a/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/AnyAssertionsSpec.kt +++ /dev/null @@ -1,319 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") - -package ch.tutteli.atrium.spec.integration - -import ch.tutteli.atrium.api.cc.en_GB.* -import ch.tutteli.atrium.assertions.DescriptiveAssertion -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.AssertionPlantNullable -import ch.tutteli.atrium.creating.ReportingAssertionPlantNullable -import ch.tutteli.atrium.reporting.Text -import ch.tutteli.atrium.spec.AssertionVerbFactory -import ch.tutteli.atrium.spec.describeFun -import ch.tutteli.atrium.spec.prefixedDescribe -import ch.tutteli.atrium.spec.setUp -import ch.tutteli.atrium.translations.DescriptionAnyAssertion.IS_NOT_SAME -import ch.tutteli.atrium.translations.DescriptionAnyAssertion.IS_SAME -import ch.tutteli.atrium.translations.DescriptionBasic.NOT_TO_BE -import ch.tutteli.atrium.translations.DescriptionBasic.TO_BE -import ch.tutteli.atrium.translations.DescriptionComparableAssertion -import org.jetbrains.spek.api.Spek -import org.jetbrains.spek.api.dsl.SpecBody -import org.jetbrains.spek.api.dsl.context -import org.jetbrains.spek.api.dsl.it -import org.jetbrains.spek.api.include - -@Deprecated("Switch from Assert to Expect and use Spec from atrium-specs-common; will be removed with 1.0.0") -abstract class AnyAssertionsSpec( - verbs: AssertionVerbFactory, - funInt: AnyAssertionsSpecFunFactory, - funDataClass: AnyAssertionsSpecFunFactory, - toBe: String, - notToBe: String, - isSame: String, - isNotSame: String, - toBeNullPair: Pair.() -> Unit>, - toBeNullablePair: Pair.(Int?) -> Unit>, - toBeNullIfNullElsePair: Pair.((Assert.() -> Unit)?) -> Unit>, - andPair: Pair.() -> Assert>, - andLazyPair: Pair.(Assert.() -> Unit) -> Assert>, - describePrefix: String = "[Atrium] " -) : Spek({ - - //TODO extend SubjectLess with nullable - - include(@Suppress("DEPRECATION") object : SubjectLessAssertionSpec(describePrefix, - toBe to mapToCreateAssertion { funInt.toBeFun(this, 1) }, - notToBe to mapToCreateAssertion { funInt.notToBeFun(this, 1) }, - isSame to mapToCreateAssertion { funInt.isSameFun(this, 1) }, - isNotSame to mapToCreateAssertion { funInt.isNotSameFun(this, 1) }, - andPair.first to mapToCreateAssertion { andPair.second }, - andLazyPair.first to mapToCreateAssertion { andLazyPair.second } - ) {}) - - include(@Suppress("DEPRECATION") object : CheckingAssertionSpec( - verbs, describePrefix, - checkingTriple(toBe, { funInt.toBeFun(this, 1) }, 1, 0), - checkingTriple(notToBe, { funInt.notToBeFun(this, 1) }, 0, 1), - checkingTriple(isSame, { funInt.isSameFun(this, 1) }, 1, 0), - checkingTriple(isNotSame, { funInt.isNotSameFun(this, 1) }, 0, 1) - ) {}) - - fun prefixedDescribe(description: String, body: SpecBody.() -> Unit) = - prefixedDescribe(describePrefix, description, body) - - fun describeFun(vararg funName: String, body: SpecBody.() -> Unit) = - describeFun(describePrefix, funName, body = body) - - val expect = verbs::checkException - val assert: (Int) -> Assert = verbs::checkImmediately - val (toBeNull, toBeNullFun) = toBeNullPair - val (toBeNullable, toBeNullableFun) = toBeNullablePair - val (toBeNullIfNullElse, toBeNullIfNullElseFun) = toBeNullIfNullElsePair - val (and, andProperty) = andPair - val (andLazy, andLazyGroup) = andLazyPair - - describeFun(toBe, notToBe, isSame, isNotSame) { - - context("primitive") { - val toBeFun: Assert.(Int) -> Assert = funInt.toBeFun - val notToBeFun: Assert.(Int) -> Assert = funInt.notToBeFun - val isSameFun: Assert.(Int) -> Assert = funInt.isSameFun - val isNotSameFun: Assert.(Int) -> Assert = funInt.isNotSameFun - - context("one equals the other") { - test("$toBe does not throw") { - assert(1).toBeFun(1) - } - test("$isSame does not throw") { - assert(1).isSameFun(1) - } - test("$notToBe throws AssertionError") { - expect { - assert(1).notToBeFun(1) - }.toThrow { messageContains(NOT_TO_BE.getDefault()) } - } - test("$isNotSame throws AssertionError") { - expect { - assert(1).isNotSameFun(1) - }.toThrow { messageContains(IS_NOT_SAME.getDefault()) } - } - } - context("one does not equal the other") { - test("$toBe throws AssertionError") { - expect { - assert(1).toBeFun(2) - }.toThrow { messageContains(TO_BE.getDefault()) } - } - test("$notToBe does not throw") { - assert(1).notToBeFun(2) - } - test("$isSame throws AssertionError") { - expect { - assert(1).isSameFun(2) - }.toThrow { messageContains(IS_SAME.getDefault()) } - } - test("$isNotSame does not throw") { - assert(1).isNotSameFun(2) - } - } - } - context("class") { - val test = DataClass(true) - val fluent = verbs.checkImmediately(test) - val toBeFun: Assert.(DataClass) -> Assert = funDataClass.toBeFun - val notToBeFun: Assert.(DataClass) -> Assert = funDataClass.notToBeFun - val isSameFun: Assert.(DataClass) -> Assert = funDataClass.isSameFun - val isNotSameFun: Assert.(DataClass) -> Assert = funDataClass.isNotSameFun - context("same") { - test("$toBe does not throw") { - fluent.toBeFun(test) - } - test("$notToBe throws AssertionError") { - expect { - fluent.notToBeFun(test) - }.toThrow {} - } - test("$isSame does not throw") { - fluent.isSameFun(test) - } - test("$isNotSame throws AssertionError") { - expect { - fluent.isNotSameFun(test) - }.toThrow {} - } - } - context("not same but one equals the other") { - val other = DataClass(true) - test("$toBe does not throw") { - fluent.toBeFun(other) - } - test("$notToBe throws AssertionError") { - expect { - fluent.notToBeFun(other) - }.toThrow {} - } - test("$isSame throws AssertionError") { - expect { - fluent.isSameFun(other) - }.toThrow {} - } - test("$isNotSame does not throw") { - fluent.isNotSameFun(other) - } - } - context("one does not equal the other") { - val other = DataClass(false) - test("$toBe does not throw") { - expect { - fluent.toBeFun(other) - }.toThrow {} - } - test("$notToBe throws AssertionError") { - fluent.notToBeFun(other) - } - test("$isSame throws AssertionError") { - expect { - fluent.isSameFun(other) - }.toThrow {} - } - test("$isNotSame does not throw") { - fluent.isNotSameFun(other) - } - } - } - } - - describeFun(toBeNull) { - - context("subject is null") { - val subject: Int? = null - it("does not throw an Exception") { - verbs.checkNullable(subject).toBeNullFun() - } - } - - context("subject is not null") { - val subject: Int? = 1 - val testee = verbs.checkNullable(1) as ReportingAssertionPlantNullable - val expectFun = verbs.checkException { - testee.toBeNullFun() - } - setUp("throws an AssertionError") { - context("exception message") { - it("contains the subject") { - expectFun.toThrow { messageContains(subject.toString()) } - } - it("contains the '${DescriptiveAssertion::description.name}' of the assertion-message - which should be '${TO_BE.getDefault()}'") { - expectFun.toThrow { messageContains(TO_BE.getDefault()) } - } - it("contains the '${DescriptiveAssertion::representation.name}' of the assertion-message") { - expectFun.toThrow { messageContains(Text.NULL.string) } - } - } - } - } - } - - describeFun(toBeNullable) { - - context("subject is null") { - val subject: Int? = null - it("does not throw if null is passed") { - verbs.checkNullable(subject).toBeNullableFun(null) - } - it("throws an AssertionError if not null is passed") { - expect { - verbs.checkNullable(subject).toBeNullableFun(1) - }.toThrow { - messageContains(": null", "${TO_BE.getDefault()}: 1") - } - } - } - - context("subject is not null") { - val subject: Int? = 1 - it("does not throw if expected is subject") { - verbs.checkNullable(subject).toBeNullableFun(subject) - } - it("throws an AssertionError if null is passed") { - expect { - verbs.checkNullable(subject).toBeNullableFun(null) - }.toThrow { - messageContains(": 1", "${TO_BE.getDefault()}: null") - } - } - it("throws an AssertionError if expected does not equal subject") { - expect { - verbs.checkNullable(subject).toBeNullableFun(2) - }.toThrow { - messageContains(": 1", "${TO_BE.getDefault()}: 2") - } - } - } - } - - describeFun(toBeNullIfNullElse) { - - context("subject is null") { - val subject: Int? = null - it("does not throw if null is passed") { - verbs.checkNullable(subject).toBeNullIfNullElseFun(null) - } - it("throws an AssertionError if not null is passed") { - expect { - verbs.checkNullable(subject).toBeNullIfNullElseFun { toBe(1) } - }.toThrow { - messageContains(": null", "${TO_BE.getDefault()}: 1") - } - } - } - - context("subject is not null") { - val subject: Int? = 1 - it("does not throw if sub assertion holds") { - verbs.checkNullable(subject).toBeNullIfNullElseFun { isLessThan(2) } - } - it("throws an AssertionError if sub assertion does not hold") { - expect { - verbs.checkNullable(subject).toBeNullIfNullElseFun { isGreaterThan(1) } - }.toThrow { - messageContains(": 1", "${DescriptionComparableAssertion.IS_GREATER_THAN.getDefault()}: 1") - } - } - it("throws an AssertionError if null is passed") { - expect { - verbs.checkNullable(subject).toBeNullIfNullElseFun(null) - }.toThrow { - messageContains(": 1", "${TO_BE.getDefault()}: null") - } - } - - } - } - - - prefixedDescribe("property `$and` immediate") { - it("returns the same plant") { - val plant = assert(1) - verbs.checkImmediately(plant.andProperty()).toBe(plant) - } - } - prefixedDescribe("`$andLazy` group") { - it("returns the same plant") { - val plant = assert(1) - verbs.checkImmediately(plant.andLazyGroup { }).toBe(plant) - } - } - -}) { - interface AnyAssertionsSpecFunFactory { - val toBeFun: Assert.(T) -> Assert - val notToBeFun: Assert.(T) -> Assert - val isSameFun: Assert.(T) -> Assert - val isNotSameFun: Assert.(T) -> Assert - } - - data class DataClass(val isWhatever: Boolean) -} diff --git a/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/ArrayAsIterableAssertionsSpec.kt b/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/ArrayAsIterableAssertionsSpec.kt deleted file mode 100644 index 72d370a5f..000000000 --- a/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/ArrayAsIterableAssertionsSpec.kt +++ /dev/null @@ -1,192 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") - -package ch.tutteli.atrium.spec.integration - -import ch.tutteli.atrium.api.cc.en_GB.contains -import ch.tutteli.atrium.api.cc.en_GB.containsExactly -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.spec.AssertionVerbFactory -import org.jetbrains.spek.api.dsl.describe -import org.jetbrains.spek.api.include - -@Deprecated("Switch from Assert to Expect and use Spec from atrium-specs-common; will be removed with 1.0.0") -abstract class ArrayAsIterableAssertionsSpec( - verbs: AssertionVerbFactory, - asIterableFunName: String, - arr: Assert>.() -> Assert>, - arrByte: Assert.() -> Assert>, - arrChar: Assert.() -> Assert>, - arrShort: Assert.() -> Assert>, - arrInt: Assert.() -> Assert>, - arrLong: Assert.() -> Assert>, - arrFloat: Assert.() -> Assert>, - arrDouble: Assert.() -> Assert>, - arrBoolean: Assert.() -> Assert>, - arrWithCreator: Assert>.(Assert>.() -> Unit) -> Assert>, - arrByteWithCreator: Assert.(Assert>.() -> Unit) -> Assert>, - arrCharWithCreator: Assert.(Assert>.() -> Unit) -> Assert>, - arrShortWithCreator: Assert.(Assert>.() -> Unit) -> Assert>, - arrIntWithCreator: Assert.(Assert>.() -> Unit) -> Assert>, - arrLongWithCreator: Assert.(Assert>.() -> Unit) -> Assert>, - arrFloatWithCreator: Assert.(Assert>.() -> Unit) -> Assert>, - arrDoubleWithCreator: Assert.(Assert>.() -> Unit) -> Assert>, - arrBooleanWithCreator: Assert.(Assert>.() -> Unit) -> Assert>, - describePrefix: String = "[Atrium] " -) : IterablePredicateSpecBase(verbs, { - - val asIterableWithCreator = "$asIterableFunName with Creator" - include(@Suppress("DEPRECATION") object : SubjectLessAssertionSpec>("$describePrefix[arr] ", - asIterableFunName to mapToCreateAssertion { arr(this) }, - asIterableWithCreator to mapToCreateAssertion { arrWithCreator(this) { contains(1) } } - ) {}) - include(@Suppress("DEPRECATION") object : SubjectLessAssertionSpec("$describePrefix[arrByte] ", - asIterableFunName to mapToCreateAssertion { arrByte(this) }, - asIterableWithCreator to mapToCreateAssertion { arrByteWithCreator(this) { contains(1) } } - ) {}) - include(@Suppress("DEPRECATION") object : SubjectLessAssertionSpec("$describePrefix[arrChar] ", - asIterableFunName to mapToCreateAssertion { arrChar(this) }, - asIterableWithCreator to mapToCreateAssertion { arrCharWithCreator(this) { contains('a') } } - ) {}) - include(@Suppress("DEPRECATION") object : SubjectLessAssertionSpec("$describePrefix[arrShort] ", - asIterableFunName to mapToCreateAssertion { arrShort(this) }, - asIterableWithCreator to mapToCreateAssertion { arrShortWithCreator(this) { contains(1.toShort()) } } - ) {}) - include(@Suppress("DEPRECATION") object : SubjectLessAssertionSpec("$describePrefix[arrInt] ", - asIterableFunName to mapToCreateAssertion { arrInt(this) }, - asIterableWithCreator to mapToCreateAssertion { arrIntWithCreator(this) { contains(1) } } - ) {}) - include(@Suppress("DEPRECATION") object : SubjectLessAssertionSpec("$describePrefix[arrLong] ", - asIterableFunName to mapToCreateAssertion { arrLong(this) }, - asIterableWithCreator to mapToCreateAssertion { arrLongWithCreator(this) { contains(1L) } } - ) {}) - include(@Suppress("DEPRECATION") object : SubjectLessAssertionSpec("$describePrefix[arrFloat] ", - asIterableFunName to mapToCreateAssertion { arrFloat(this) }, - asIterableWithCreator to mapToCreateAssertion { arrFloatWithCreator(this) { contains(1f) } } - ) {}) - include(@Suppress("DEPRECATION") object : SubjectLessAssertionSpec("$describePrefix[arrDouble] ", - asIterableFunName to mapToCreateAssertion { arrDouble(this) }, - asIterableWithCreator to mapToCreateAssertion { arrDoubleWithCreator(this) { contains(1.0) } } - ) {}) - include(@Suppress("DEPRECATION") object : SubjectLessAssertionSpec("$describePrefix[arrBoolean] ", - asIterableFunName to mapToCreateAssertion { arrBoolean(this) }, - asIterableWithCreator to mapToCreateAssertion { arrBooleanWithCreator(this) { contains(true) } } - ) {}) - - fun bytes(vararg bytes : Byte) = bytes - fun chars(vararg chars: Char) = chars - fun shorts(vararg shorts: Short) = shorts - fun ints(vararg ints: Int) = ints - fun longs(vararg longs: Long) = longs - fun floats(vararg floats: Float) = floats - fun doubles(vararg doubles: Double) = doubles - fun booleans(vararg booleans: Boolean) = booleans - - include(@Suppress("DEPRECATION") object : CheckingAssertionSpec>(verbs, "$describePrefix[arr] ", - checkingTriple(asIterableFunName, { arr(this).contains(5) }, arrayOf(1, 3, 5, 6), arrayOf(1, 2, 3)), - checkingTriple(asIterableWithCreator, { arrWithCreator(this) { contains(5) }}, arrayOf(1, 3, 5, 6), arrayOf(1, 2, 3)) - ) {}) - include(@Suppress("DEPRECATION") object : CheckingAssertionSpec(verbs, "$describePrefix[arrByte] ", - checkingTriple(asIterableFunName, { arrByte(this).contains(5.toByte()) }, bytes(1.toByte(), 5.toByte()), bytes()), - checkingTriple(asIterableWithCreator, { arrByteWithCreator(this) { contains(5.toByte()) }}, bytes(1.toByte(), 5.toByte()), bytes()) - ) {}) - include(@Suppress("DEPRECATION") object : CheckingAssertionSpec(verbs, "$describePrefix[arrChar] ", - checkingTriple(asIterableFunName, { arrChar(this).contains(5.toChar()) }, chars(1.toChar(), 5.toChar()), chars()), - checkingTriple(asIterableWithCreator, { arrCharWithCreator(this) { contains(5.toChar()) }}, chars(1.toChar(), 5.toChar()), chars()) - ) {}) - include(@Suppress("DEPRECATION") object : CheckingAssertionSpec(verbs, "$describePrefix[arrShort] ", - checkingTriple(asIterableFunName, { arrShort(this).contains(5.toShort()) }, shorts(1.toShort(), 5.toShort()), shorts()), - checkingTriple(asIterableWithCreator, { arrShortWithCreator(this) { contains(5.toShort()) }}, shorts(1.toShort(), 5.toShort()), shorts()) - ) {}) - include(@Suppress("DEPRECATION") object : CheckingAssertionSpec(verbs, "$describePrefix[arrInt] ", - checkingTriple(asIterableFunName, { arrInt(this).contains(5) }, ints(1, 5), ints()), - checkingTriple(asIterableWithCreator, { arrIntWithCreator(this) { contains(5) }}, ints(1, 5), ints()) - ) {}) - include(@Suppress("DEPRECATION") object : CheckingAssertionSpec(verbs, "$describePrefix[arrLong] ", - checkingTriple(asIterableFunName, { arrLong(this).contains(5) }, longs(1, 5), longs()), - checkingTriple(asIterableWithCreator, { arrLongWithCreator(this) { contains(5) }}, longs(1, 5), longs()) - ) {}) - include(@Suppress("DEPRECATION") object : CheckingAssertionSpec(verbs, "$describePrefix[arrFloat] ", - checkingTriple(asIterableFunName, { arrFloat(this).contains(5f) }, floats(1f, 5f), floats()), - checkingTriple(asIterableWithCreator, { arrFloatWithCreator(this) { contains(5f) }}, floats(1f, 5f), floats()) - ) {}) - include(@Suppress("DEPRECATION") object : CheckingAssertionSpec(verbs, "$describePrefix[arrDouble] ", - checkingTriple(asIterableFunName, { arrDouble(this).contains(5.0) }, doubles(1.0, 5.0), doubles()), - checkingTriple(asIterableWithCreator, { arrDoubleWithCreator(this) { contains(5.0) }}, doubles(1.0, 5.0), doubles()) - ) {}) - - - describe("$asIterableFunName arr") { - test("transformation can be applied and an subsequent assertion made") { - verbs.checkImmediately(arrayOf(1, 2)).arr().containsExactly(1, 2) - } - test("transformation can be applied and a sub-assertion made") { - verbs.checkImmediately(arrayOf(1, 2)).arrWithCreator { containsExactly(1, 2) } - } - } - - describe("$asIterableFunName arrByte") { - test("transformation can be applied and an subsequent assertion made") { - verbs.checkImmediately(bytes(1.toByte(), 2.toByte())).arrByte().containsExactly(1.toByte(), 2.toByte()) - } - test("transformation can be applied and a sub assertion made") { - verbs.checkImmediately(bytes(1.toByte(), 2.toByte())).arrByteWithCreator{ containsExactly(1.toByte(), 2.toByte()) } - } - } - describe("$asIterableFunName arrChar") { - test("transformation can be applied and an subsequent assertion made") { - verbs.checkImmediately(chars(1.toChar(), 2.toChar())).arrChar().containsExactly(1.toChar(), 2.toChar()) - } - test("transformation can be applied and a sub assertion made") { - verbs.checkImmediately(chars(1.toChar(), 2.toChar())).arrCharWithCreator{ containsExactly(1.toChar(), 2.toChar()) } - } - } - describe("$asIterableFunName arrShort") { - test("transformation can be applied and an subsequent assertion made") { - verbs.checkImmediately(shorts(1, 2)).arrShort().containsExactly(1.toShort(), 2.toShort()) - } - test("transformation can be applied and a sub assertion made") { - verbs.checkImmediately(shorts(1, 2)).arrShortWithCreator{ containsExactly(1.toShort(), 2.toShort()) } - } - } - describe("$asIterableFunName arrInt") { - test("transformation can be applied and an subsequent assertion made") { - verbs.checkImmediately(ints(1, 2)).arrInt().containsExactly(1, 2) - } - test("transformation can be applied and a sub assertion made") { - verbs.checkImmediately(ints(1, 2)).arrIntWithCreator{ containsExactly(1, 2) } - } - } - describe("$asIterableFunName arrLong") { - test("transformation can be applied and an subsequent assertion made") { - verbs.checkImmediately(longs(1, 2)).arrLong().containsExactly(1L, 2L) - } - test("transformation can be applied and a sub assertion made") { - verbs.checkImmediately(longs(1, 2)).arrLongWithCreator{ containsExactly(1L, 2L) } - } - } - describe("$asIterableFunName arrFloat") { - test("transformation can be applied and an subsequent assertion made") { - verbs.checkImmediately(floats(1f, 2f)).arrFloat().containsExactly(1f, 2f) - } - test("transformation can be applied and a sub assertion made") { - verbs.checkImmediately(floats(1f, 2f)).arrFloatWithCreator{ containsExactly(1f, 2f) } - } - } - describe("$asIterableFunName arrDouble") { - test("transformation can be applied and an subsequent assertion made") { - verbs.checkImmediately(doubles(1.0, 2.0)).arrDouble().containsExactly(1.0, 2.0) - } - test("transformation can be applied and a sub assertion made") { - verbs.checkImmediately(doubles(1.0, 2.0)).arrDoubleWithCreator{ containsExactly(1.0, 2.0) } - } - } - describe("$asIterableFunName arrBoolean") { - test("transformation can be applied and an subsequent assertion made") { - verbs.checkImmediately(booleans(true, false)).arrBoolean().containsExactly(true, false) - } - test("transformation can be applied and a sub assertion made") { - verbs.checkImmediately(booleans(true, false)).arrBooleanWithCreator{ containsExactly(true, false) } - } - } -}) diff --git a/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/BigDecimalAssertionsSpec.kt b/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/BigDecimalAssertionsSpec.kt deleted file mode 100644 index af3f956d3..000000000 --- a/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/BigDecimalAssertionsSpec.kt +++ /dev/null @@ -1,243 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") - -package ch.tutteli.atrium.spec.integration - -import ch.tutteli.atrium.api.cc.en_GB.* -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.domain.builders.creating.PleaseUseReplacementException -import ch.tutteli.atrium.spec.AssertionVerbFactory -import ch.tutteli.atrium.spec.describeFun -import ch.tutteli.atrium.translations.DescriptionBasic.NOT_TO_BE -import ch.tutteli.atrium.translations.DescriptionBasic.TO_BE -import ch.tutteli.atrium.translations.DescriptionBigDecimalAssertion -import org.jetbrains.spek.api.Spek -import org.jetbrains.spek.api.dsl.SpecBody -import org.jetbrains.spek.api.dsl.context -import org.jetbrains.spek.api.include -import java.math.BigDecimal - -@Deprecated("Switch from Assert to Expect and use Spec from atrium-specs-common; will be removed with 1.0.0") -abstract class BigDecimalAssertionsSpec( - verbs: AssertionVerbFactory, - toBePair: Pair.(BigDecimal) -> Assert>, - toBeAnyFun: Assert.(Any) -> Assert, - notToBePair: Pair.(BigDecimal) -> Assert>, - notToBeAnyFun: Assert.(Any) -> Assert, - isNumericallyEqualToPair: Pair.(BigDecimal) -> Assert>, - isNotNumericallyEqualToPair: Pair.(BigDecimal) -> Assert>, - isEqualIncludingScalePair: Pair.(BigDecimal) -> Assert>, - isNotEqualIncludingScalePair: Pair.(BigDecimal) -> Assert>, - describePrefix: String = "[Atrium] " -) : Spek({ - - include(@Suppress("DEPRECATION") object : SubjectLessAssertionSpec("$describePrefix[BigDecimal] ", - isNumericallyEqualToPair.first to mapToCreateAssertion { isNumericallyEqualToPair.second(this, BigDecimal.TEN) }, - isNotNumericallyEqualToPair.first to mapToCreateAssertion { isNotNumericallyEqualToPair.second(this, BigDecimal.TEN) }, - isEqualIncludingScalePair.first to mapToCreateAssertion { isEqualIncludingScalePair.second(this, BigDecimal.TEN) }, - isNotEqualIncludingScalePair.first to mapToCreateAssertion { isNotEqualIncludingScalePair.second(this, BigDecimal.TEN) } - ) {}) - - include(@Suppress("DEPRECATION") object : CheckingAssertionSpec(verbs, "$describePrefix[BigDecimal] ", - checkingTriple(isNumericallyEqualToPair.first, { isNumericallyEqualToPair.second(this, BigDecimal.TEN) }, BigDecimal("10.000"), BigDecimal("10.00001")), - checkingTriple(isNotNumericallyEqualToPair.first, { isNotNumericallyEqualToPair.second(this, BigDecimal.TEN) }, BigDecimal("10.00001"), BigDecimal("10.000")), - checkingTriple(isEqualIncludingScalePair.first, { isEqualIncludingScalePair.second(this, BigDecimal.TEN) }, BigDecimal("10"), BigDecimal("10.0")), - checkingTriple(isNotEqualIncludingScalePair.first, { isNotEqualIncludingScalePair.second(this, BigDecimal.TEN) }, BigDecimal("10.0"), BigDecimal("10")) - ) {}) - - fun describeFun(vararg funName: String, body: SpecBody.() -> Unit) = describeFun(describePrefix, funName, body = body) - - val expect = verbs::checkException - val assert: (BigDecimal) -> Assert = verbs::checkImmediately - val (isNumericallyEqualTo, isNumericallyEqualToFun) = isNumericallyEqualToPair - val (isNotNumericallyEqualTo, isNotNumericallyEqualToFun) = isNotNumericallyEqualToPair - val (isEqualIncludingScale, isEqualIncludingScaleFun) = isEqualIncludingScalePair - val (isNotEqualIncludingScale, isNotEqualIncludingScaleFun) = isNotEqualIncludingScalePair - val (toBe, toBeFun) = toBePair - val (notToBe, notToBeFun) = notToBePair - - describeFun(isNumericallyEqualTo, isNotNumericallyEqualTo) { - mapOf( - BigDecimal.TEN to BigDecimal("10.00"), - BigDecimal.ZERO to BigDecimal("0.0"), - BigDecimal.ZERO to BigDecimal("0."), - BigDecimal.ZERO to BigDecimal("0.00"), - BigDecimal.ZERO to BigDecimal("00.0") - ).forEach { subject, expected -> - context("subject $subject and expected $expected") { - test("`$isNumericallyEqualTo` does not throw") { - assert(subject).isNumericallyEqualToFun(expected) - } - test("`$isNotNumericallyEqualTo` throws AssertionError") { - expect { - assert(subject).isNotNumericallyEqualToFun(expected) - }.toThrow { - messageContains( - subject, - "${DescriptionBigDecimalAssertion.IS_NOT_NUMERICALLY_EQUAL_TO.getDefault()}: $expected" - ) - } - } - } - } - - mapOf( - BigDecimal.TEN to BigDecimal("10.00000001"), - BigDecimal.ZERO to BigDecimal("0.0000001") - ).forEach { subject, expected -> - context("subject $subject and expected $expected") { - test("`$isNumericallyEqualTo` throws AssertionError") { - expect { - assert(subject).isNumericallyEqualToFun(expected) - }.toThrow { - messageContains( - subject, - "${DescriptionBigDecimalAssertion.IS_NUMERICALLY_EQUAL_TO.getDefault()}: $expected" - ) - } - } - test("`$isNotNumericallyEqualTo` does not throw") { - assert(subject).isNotNumericallyEqualToFun(expected) - } - } - } - } - - val assertTen = assert(BigDecimal.TEN) - describeFun(toBe, isEqualIncludingScale, notToBe, isNotEqualIncludingScale) { - - val failureHintNotNumerically = String.format(DescriptionBigDecimalAssertion.FAILURE_IS_EQUAL_INCLUDING_SCALE_BUT_NUMERICALLY_EQUAL.getDefault(), isNotNumericallyEqualTo) - context("subject is 10 and expected is 10") { - val expected = BigDecimal("10") - test("$toBe with BigDecimal overload throws ${PleaseUseReplacementException::class.simpleName}") { - expect { - assertTen.toBeFun(expected) - }.toThrow {} - } - test("$notToBe with BigDecimal overload throws ${PleaseUseReplacementException::class.simpleName}") { - expect { - assertTen.notToBeFun(expected) - }.toThrow {} - } - - test("$toBe with Any overload does not throw") { - assertTen.toBeAnyFun(expected) - } - test("$isEqualIncludingScale does not throw") { - assertTen.isEqualIncludingScaleFun(expected) - } - - test("$notToBe with Any overload throws an AssertionError and does not contain the hint") { - expect { - assertTen.notToBeAnyFun(expected) - }.toThrow { - message { - contains(BigDecimal.TEN, "${NOT_TO_BE.getDefault()}: $expected") - containsNot(failureHintNotNumerically) - } - } - } - test("$isNotEqualIncludingScale throws an AssertionError and does not contain the hint") { - expect { - assertTen.isNotEqualIncludingScaleFun(expected) - }.toThrow { - message { - contains(BigDecimal.TEN, "${DescriptionBigDecimalAssertion.IS_NOT_EQUAL_INCLUDING_SCALE.getDefault()}: $expected") - containsNot(failureHintNotNumerically) - } - } - } - } - - val failureHintNumerically = String.format(DescriptionBigDecimalAssertion.FAILURE_IS_EQUAL_INCLUDING_SCALE_BUT_NUMERICALLY_EQUAL.getDefault(), isNumericallyEqualTo) - listOf( - BigDecimal("10.0"), - BigDecimal("10.00") - ).forEach { expected -> - context("subject is 10 and expected is $expected") { - test("$toBe with BigDecimal overload throws ${PleaseUseReplacementException::class.simpleName}") { - expect { - assertTen.toBeFun(expected) - }.toThrow {} - } - test("$notToBe with BigDecimal overload throws ${PleaseUseReplacementException::class.simpleName}") { - expect { - assertTen.notToBeFun(expected) - }.toThrow {} - } - - test("$toBe with Any overload throws an AssertionError and does not contain the hint") { - expect { - assertTen.toBeAnyFun(expected) - }.toThrow { - message { - contains(BigDecimal.TEN, "${TO_BE.getDefault()}: $expected") - containsNot(failureHintNumerically) - } - } - } - test("$isEqualIncludingScale throws an AssertionError mentioning that $isNumericallyEqualTo could have been used") { - expect { - assertTen.isEqualIncludingScaleFun(expected) - }.toThrow { - messageContains( - BigDecimal.TEN, - "${DescriptionBigDecimalAssertion.IS_EQUAL_INCLUDING_SCALE.getDefault()}: $expected", - failureHintNumerically - ) - } - } - - test("$notToBe with Any overload does not throw") { - assertTen.notToBeAnyFun(expected) - } - test("$isEqualIncludingScale does not throw") { - assertTen.isNotEqualIncludingScaleFun(expected) - } - } - } - - context("subject is 10 and expected is 9") { - val expected = BigDecimal("9.999999999999") - test("$toBe with BigDecimal overload throws ${PleaseUseReplacementException::class.simpleName}") { - expect { - assertTen.toBeFun(expected) - }.toThrow {} - } - test("$notToBe with BigDecimal overload throws ${PleaseUseReplacementException::class.simpleName}") { - expect { - assertTen.notToBeFun(expected) - }.toThrow {} - } - - test("$toBe with Any overload throws an AssertionError and does not contain the hint") { - expect { - assertTen.toBeAnyFun(expected) - }.toThrow { - message { - contains(BigDecimal.TEN, "${TO_BE.getDefault()}: $expected") - containsNot(failureHintNumerically) - } - } - } - test("$isEqualIncludingScale throws an AssertionError and does not contain the hint") { - expect { - assertTen.isEqualIncludingScaleFun(expected) - }.toThrow { - message { - contains(BigDecimal.TEN, "${DescriptionBigDecimalAssertion.IS_EQUAL_INCLUDING_SCALE.getDefault()}: $expected") - containsNot(failureHintNumerically) - } - } - } - - test("$notToBe with Any overload does not throw") { - assertTen.notToBeAnyFun(expected) - } - test("$isEqualIncludingScale does not throw") { - assertTen.isNotEqualIncludingScaleFun(expected) - } - } - } -}) - diff --git a/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/BooleanAssertionsSpec.kt b/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/BooleanAssertionsSpec.kt deleted file mode 100644 index 2ba75f421..000000000 --- a/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/BooleanAssertionsSpec.kt +++ /dev/null @@ -1,68 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") - -package ch.tutteli.atrium.spec.integration - -import ch.tutteli.atrium.api.cc.en_GB.messageContains -import ch.tutteli.atrium.api.cc.en_GB.toThrow -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.spec.AssertionVerbFactory -import ch.tutteli.atrium.spec.prefixedDescribe -import ch.tutteli.atrium.translations.DescriptionAnyAssertion -import ch.tutteli.atrium.translations.DescriptionBasic.TO_BE -import org.jetbrains.spek.api.Spek -import org.jetbrains.spek.api.dsl.SpecBody -import org.jetbrains.spek.api.include - -@Deprecated("Switch from Assert to Expect and use Spec from atrium-specs-common; will be removed with 1.0.0") -abstract class BooleanAssertionsSpec( - verbs: AssertionVerbFactory, - toBeTruePair: Pair.() -> Assert>, - toBeFalsePair: Pair.() -> Assert>, - describePrefix: String = "[Atrium] " -) : Spek({ - - include(@Suppress("DEPRECATION") object : SubjectLessAssertionSpec(describePrefix, - toBeTruePair.first to mapToCreateAssertion { toBeTruePair.second(this) }, - toBeFalsePair.first to mapToCreateAssertion { toBeFalsePair.second(this) } - ) {}) - - include(@Suppress("DEPRECATION") object : CheckingAssertionSpec(verbs, describePrefix, - checkingTriple(toBeTruePair.first, { toBeTruePair.second(this) }, true, false), - checkingTriple(toBeFalsePair.first, { toBeFalsePair.second(this) }, false, true) - ) {}) - - fun prefixedDescribe(description: String, body: SpecBody.() -> Unit) { - prefixedDescribe(describePrefix, description, body) - } - - val assert: (Boolean) -> Assert = verbs::checkImmediately - val expect = verbs::checkException - val (toBeTrue, toBeTrueFun) = toBeTruePair - val (toBeFalse, toBeFalseFun) = toBeFalsePair - - prefixedDescribe("subject is `true`") { - val fluent = assert(true) - test("$toBeTrue does not throw") { - fluent.toBeTrueFun() - } - test("$toBeFalse throws an AssertionError containing ${DescriptionAnyAssertion::class.simpleName}.$TO_BE and `: false`") { - expect { - fluent.toBeFalseFun() - }.toThrow { messageContains("${TO_BE.getDefault()}: false") } - } - } - - prefixedDescribe("subject is `false`") { - val fluent = assert(false) - - test("$toBeTrue throws an AssertionError containing ${DescriptionAnyAssertion::class.simpleName}.$TO_BE and `: true`") { - expect { - fluent.toBeTrueFun() - }.toThrow { messageContains("${TO_BE.getDefault()}: true") } - } - test("$toBeFalse does not throw") { - fluent.toBeFalseFun() - } - } -}) diff --git a/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/CharSequenceAssertionsSpec.kt b/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/CharSequenceAssertionsSpec.kt deleted file mode 100644 index 92120f9e2..000000000 --- a/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/CharSequenceAssertionsSpec.kt +++ /dev/null @@ -1,264 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") - -package ch.tutteli.atrium.spec.integration - -import ch.tutteli.atrium.api.cc.en_GB.contains -import ch.tutteli.atrium.api.cc.en_GB.containsNot -import ch.tutteli.atrium.api.cc.en_GB.endsWith -import ch.tutteli.atrium.api.cc.en_GB.message -import ch.tutteli.atrium.api.cc.en_GB.messageContains -import ch.tutteli.atrium.api.cc.en_GB.toThrow -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.reporting.translating.StringBasedTranslatable -import ch.tutteli.atrium.reporting.translating.Translatable -import ch.tutteli.atrium.reporting.translating.Untranslatable -import ch.tutteli.atrium.spec.AssertionVerbFactory -import ch.tutteli.atrium.spec.describeFun -import ch.tutteli.atrium.translations.DescriptionBasic -import ch.tutteli.atrium.translations.DescriptionCharSequenceAssertion -import ch.tutteli.atrium.translations.DescriptionCharSequenceAssertion.ENDS_NOT_WITH -import ch.tutteli.atrium.translations.DescriptionCharSequenceAssertion.ENDS_WITH -import ch.tutteli.atrium.translations.DescriptionCharSequenceAssertion.STARTS_NOT_WITH -import ch.tutteli.atrium.translations.DescriptionCharSequenceAssertion.STARTS_WITH -import org.jetbrains.spek.api.dsl.SpecBody -import org.jetbrains.spek.api.dsl.context -import org.jetbrains.spek.api.include - -@Deprecated("Switch from Assert to Expect and use Spec from atrium-specs-common; will be removed with 1.0.0") -abstract class CharSequenceAssertionsSpec( - verbs: AssertionVerbFactory, - containsDefaultTranslationOfPair: Pair.(Translatable, Array) -> Assert>, - containsNotDefaultTranslationOfPair: Pair.(Translatable, Array) -> Assert>, - isEmptyPair: Pair.() -> Assert>, - isNotEmptyPair: Pair.() -> Assert>, - isNotBlankPair: Pair.() -> Assert>, - startsWithPair: Pair.(CharSequence) -> Assert>, - startsNotWithPair: Pair.(CharSequence) -> Assert>, - endsWithPair: Pair.(CharSequence) -> Assert>, - endsNotWithPair: Pair.(CharSequence) -> Assert>, - rootBulletPoint: String, - listBulletPoint: String, - describePrefix: String = "[Atrium] " -) : CharSequenceContainsSpecBase({ - - include(@Suppress("DEPRECATION") object : SubjectLessAssertionSpec(describePrefix, - containsDefaultTranslationOfPair.first to mapToCreateAssertion { containsDefaultTranslationOfPair.second(this, Untranslatable("a"), arrayOf()) }, - containsNotDefaultTranslationOfPair.first to mapToCreateAssertion { containsNotDefaultTranslationOfPair.second(this, Untranslatable("a"), arrayOf()) }, - isEmptyPair.first to mapToCreateAssertion { isEmptyPair.second(this) }, - isNotEmptyPair.first to mapToCreateAssertion { isNotEmptyPair.second(this) }, - isNotBlankPair.first to mapToCreateAssertion { isNotBlankPair.second(this) }, - startsWithPair.first to mapToCreateAssertion { startsWithPair.second(this, "") }, - startsNotWithPair.first to mapToCreateAssertion { startsNotWithPair.second(this, "") }, - endsWithPair.first to mapToCreateAssertion { endsWithPair.second(this, "") }, - endsNotWithPair.first to mapToCreateAssertion { endsNotWithPair.second(this, "") } - ) {}) - - include(@Suppress("DEPRECATION") object : CheckingAssertionSpec(verbs, describePrefix, - checkingTriple(containsDefaultTranslationOfPair.first, { containsDefaultTranslationOfPair.second(this, Untranslatable("a"), arrayOf()) }, "a", "b"), - checkingTriple(containsNotDefaultTranslationOfPair.first, { containsNotDefaultTranslationOfPair.second(this, Untranslatable("a"), arrayOf()) }, "b", "a"), - checkingTriple(isEmptyPair.first, { isEmptyPair.second(this) }, "", "not empty"), - checkingTriple(isNotEmptyPair.first, { isNotEmptyPair.second(this) }, "not empty", ""), - checkingTriple(isNotBlankPair.first, { isNotBlankPair.second(this) }, "not blank", ""), - checkingTriple(startsWithPair.first, { startsWithPair.second(this, "a") }, "abc", "xyz"), - checkingTriple(startsNotWithPair.first, { startsNotWithPair.second(this, "a") }, "xyz", "abc"), - checkingTriple(endsWithPair.first, { endsWithPair.second(this, "c") }, "abc", "xyz"), - checkingTriple(endsNotWithPair.first, { endsNotWithPair.second(this, "c") }, "xyz", "abc") - ) {}) - - fun describeFun(vararg funName: String, body: SpecBody.() -> Unit) - = describeFun(describePrefix, funName, body = body) - - val assert: (CharSequence) -> Assert = verbs::checkImmediately - val expect = verbs::checkException - val fluent = assert(text) - - val (containsDefaultTranslationOf, containsDefaultTranslationOfFunArr) = containsDefaultTranslationOfPair - val (containsNotDefaultTranslationOf, containsNotDefaultTranslationOfFunArr) = containsNotDefaultTranslationOfPair - val (isEmpty, isEmptyFun) = isEmptyPair - val (isNotEmpty, isNotEmptyFun) = isNotEmptyPair - val (isNotBlank, isNotBlankFun) = isNotBlankPair - val (startsWith, startsWithFun) = startsWithPair - val (startsNotWith, startsNotWithFun) = startsNotWithPair - val (endsWith, endsWithFun) = endsWithPair - val (endsNotWith, endsNotWithFun) = endsNotWithPair - - fun Assert.containsDefaultTranslationOfFun(t: Translatable, vararg tX: Translatable) - = containsDefaultTranslationOfFunArr(t, tX) - - fun Assert.containsNotDefaultTranslationOfFun(t: Translatable, vararg tX: Translatable) - = containsNotDefaultTranslationOfFunArr(t, tX) - - val containsNot = DescriptionCharSequenceAssertion.CONTAINS_NOT.getDefault() - val hello = TestTranslatable.HELLO.getDefault() - val welcome = TestTranslatable.WELCOME.getDefault() - - val indentRootBulletPoint = " ".repeat(rootBulletPoint.length) - val valueWithIndent = "$indentRootBulletPoint$listBulletPoint$value" - - describeFun(containsDefaultTranslationOf, containsNotDefaultTranslationOf) { - - context("text '$text' and translatables ${TestTranslatable.HELLO} ($hello) and ${TestTranslatable.WELCOME} ($welcome)") { - test("$containsDefaultTranslationOf ${TestTranslatable.HELLO} does not throw") { - fluent.containsDefaultTranslationOfFun(TestTranslatable.HELLO) - } - - test("$containsNotDefaultTranslationOf ${TestTranslatable.HELLO} throws AssertionError") { - expect { - fluent.containsNotDefaultTranslationOfFun(TestTranslatable.HELLO) - }.toThrow{} - } - - test("$containsDefaultTranslationOf ${TestTranslatable.WELCOME} throws AssertionError") { - expect { - fluent.containsDefaultTranslationOfFun(TestTranslatable.WELCOME) - }.toThrow{} - } - - test("$containsNotDefaultTranslationOf ${TestTranslatable.WELCOME} does not throw") { - fluent.containsNotDefaultTranslationOfFun(TestTranslatable.WELCOME) - } - - test("$containsDefaultTranslationOf ${TestTranslatable.HELLO} and ${TestTranslatable.WELCOME}, throws AssertionError") { - expect { - fluent.containsDefaultTranslationOfFun(TestTranslatable.HELLO, TestTranslatable.WELCOME) - }.toThrow { - message { - contains("$rootBulletPoint$containsDescr: $separator" + - "$valueWithIndent: \"$welcome\"") - containsNot("$valueWithIndent: \"$hello\"") - } - } - } - - test("$containsNotDefaultTranslationOf ${TestTranslatable.HELLO} and ${TestTranslatable.WELCOME}, throws AssertionError") { - expect { - fluent.containsNotDefaultTranslationOfFun(TestTranslatable.HELLO, TestTranslatable.WELCOME) - }.toThrow { - message { - contains("$rootBulletPoint$containsNot: $separator" + - "$valueWithIndent: \"$hello\"") - containsNot("$valueWithIndent: \"$welcome\"") - } - } - } - } - } - - - val isNot = DescriptionBasic.IS_NOT.getDefault() - val itIs = DescriptionBasic.IS.getDefault() - describeFun(isEmpty, isNotEmpty) { - context("string is empty") { - test("$isEmpty does not throw") { - assert("").isEmptyFun() - assert(StringBuilder()).isEmptyFun() - assert(StringBuffer()).isEmptyFun() - } - test("$isNotEmpty throws an AssertionError") { - expect { - assert("").isNotEmptyFun() - }.toThrow { message { endsWith("$isNot: empty") } } - expect { - assert(StringBuilder()).isNotEmptyFun() - }.toThrow { message { endsWith("$isNot: empty") } } - expect { - assert(StringBuffer()).isNotEmptyFun() - }.toThrow { message { endsWith("$isNot: empty") } } - } - } - context("string is not empty") { - val notEmptyString = "not empty string" - test("$isEmpty throws an AssertionError") { - expect { - assert(notEmptyString).isEmptyFun() - }.toThrow { message { endsWith("$itIs: empty") } } - expect { - assert(StringBuilder(notEmptyString)).isEmptyFun() - }.toThrow { message { endsWith("$itIs: empty") } } - expect { - assert(StringBuffer(notEmptyString)).isEmptyFun() - }.toThrow { message { endsWith("$itIs: empty") } } - } - test("$isNotEmpty does not throw") { - assert(notEmptyString).isNotEmptyFun() - assert(StringBuilder(notEmptyString)).isNotEmptyFun() - assert(StringBuffer(notEmptyString)).isNotEmptyFun() - } - } - } - - describeFun(isNotBlank) { - context("string is blank") { - test("$isNotBlank throws an AssertionError") { - val blankString = " " - expect { - assert(blankString).isNotBlankFun() - }.toThrow { message { endsWith("$isNot: blank") } } - expect { - assert(StringBuilder(blankString)).isNotBlankFun() - }.toThrow { message { endsWith("$isNot: blank") } } - expect { - assert(StringBuffer(blankString)).isNotBlankFun() - }.toThrow { message { endsWith("$isNot: blank") } } - } - } - context("string is not blank") { - val notBlankString = "not blank string" - test("$isNotBlank does not throw") { - assert(notBlankString).isNotBlankFun() - assert(StringBuilder(notBlankString)).isNotBlankFun() - assert(StringBuffer(notBlankString)).isNotBlankFun() - } - } - } - - describeFun(startsWith, startsNotWith) { - context("text '$text'") { - test("$startsWith 'Hello' does not throw") { - fluent.startsWithFun("Hello") - } - test("$startsNotWith 'Hello' throws an AssertionError") { - expect { - fluent.startsNotWithFun("Hello") - }.toThrow { messageContains(STARTS_NOT_WITH.getDefault()) } - } - - test("$startsWith 'Robert' throws an AssertionError") { - expect { - fluent.startsWithFun("goodbye") - }.toThrow { messageContains(STARTS_WITH.getDefault()) } - } - test("$startsNotWith 'Robert' does not throw") { - fluent.startsNotWithFun("goodbye") - } - } - } - - describeFun(endsWith, endsNotWith) { - context("text '$text'") { - test("$endsWith 'Hello' throws an AssertionError") { - expect { - fluent.endsWithFun("Hello") - }.toThrow { messageContains(ENDS_WITH.getDefault()) } - } - test("$endsNotWith 'Hello' does not throw") { - fluent.endsNotWithFun("Hello") - } - - test("$endsWith 'Robert' does not throw") { - fluent.endsWithFun("Robert") - } - test("$endsNotWith 'Robert' throws an AssertionError") { - expect { - fluent.endsNotWithFun("Robert") - }.toThrow { messageContains(ENDS_NOT_WITH.getDefault()) } - } - } - } -}) { - private enum class TestTranslatable(override val value: String) : StringBasedTranslatable { - HELLO("Hello"), - WELCOME("Welcome") - } -} diff --git a/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/CharSequenceContainsAtLeastAssertionsSpec.kt b/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/CharSequenceContainsAtLeastAssertionsSpec.kt deleted file mode 100644 index be5316663..000000000 --- a/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/CharSequenceContainsAtLeastAssertionsSpec.kt +++ /dev/null @@ -1,326 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") - -package ch.tutteli.atrium.spec.integration - -import ch.tutteli.atrium.api.cc.en_GB.* -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.spec.AssertionVerbFactory -import ch.tutteli.atrium.spec.describeFun -import org.jetbrains.spek.api.dsl.SpecBody -import org.jetbrains.spek.api.dsl.context -import org.jetbrains.spek.api.dsl.given -import org.jetbrains.spek.api.include - -@Deprecated("Switch from Assert to Expect and use Spec from atrium-specs-common; will be removed with 1.0.0") -abstract class CharSequenceContainsAtLeastAssertionsSpec( - verbs: AssertionVerbFactory, - containsAtLeastTriple: Triple String, Assert.(Int, Any, Array) -> Assert>, - containsAtLeastIgnoringCaseTriple: Triple String, Assert.(Int, Any, Array) -> Assert>, - containsAtLeastButAtMostTriple: Triple String, Assert.(Int, Int, Any, Array) -> Assert>, - containsAtLeastButAtMostIgnoringCaseTriple: Triple String, Assert.(Int, Int, Any, Array) -> Assert>, - containsNotPair: Pair String>, - exactlyPair: Pair String>, - errorMsgAtLeastButAtMost: (Int, Int) -> String, - rootBulletPoint: String, - listBulletPoint: String, - describePrefix: String = "[Atrium] " -) : CharSequenceContainsSpecBase({ - - include(@Suppress("DEPRECATION") object : SubjectLessAssertionSpec(describePrefix, - containsAtLeastTriple.first to mapToCreateAssertion { containsAtLeastTriple.third(this, 1, "2.3", arrayOf()) }, - containsAtLeastIgnoringCaseTriple.first to mapToCreateAssertion { containsAtLeastIgnoringCaseTriple.third(this, 1, 'a', arrayOf()) }, - containsAtLeastButAtMostTriple.first to mapToCreateAssertion { containsAtLeastButAtMostTriple.third(this, 1, 2, "aA", arrayOf()) }, - containsAtLeastButAtMostIgnoringCaseTriple.first to mapToCreateAssertion { containsAtLeastButAtMostIgnoringCaseTriple.third(this, 1, 2, 2.3, arrayOf()) } - ) {}) - - include(@Suppress("DEPRECATION") object : CheckingAssertionSpec(verbs, describePrefix, - checkingTriple(containsAtLeastTriple.first, { containsAtLeastTriple.third(this, 1, "2.3", arrayOf()) }, "string with 2.3", "string with 0.0"), - checkingTriple(containsAtLeastIgnoringCaseTriple.first, { containsAtLeastIgnoringCaseTriple.third(this, 1, 'a', arrayOf()) }, "a", "bbb"), - checkingTriple(containsAtLeastButAtMostTriple.first, { containsAtLeastButAtMostTriple.third(this, 1, 2, "aa", arrayOf()) }, "aaa", "aaaa"), - checkingTriple(containsAtLeastButAtMostIgnoringCaseTriple.first, { containsAtLeastButAtMostIgnoringCaseTriple.third(this, 1, 2, "aA", arrayOf()) }, "aaa", "aaaa") - ) {}) - - fun describeFun(vararg funName: String, body: SpecBody.() -> Unit) - = describeFun(describePrefix, funName, body = body) - - val assert: (CharSequence) -> Assert = verbs::checkImmediately - val expect = verbs::checkException - val fluent = assert(text) - val fluentHelloWorld = assert(helloWorld) - - val (containsAtLeast, containsAtLeastTest, containsAtLeastFunArr) = containsAtLeastTriple - fun Assert.containsAtLeastFun(atLeast: Int, a: Any, vararg aX: Any) - = containsAtLeastFunArr(atLeast, a, aX) - - val (_, containsAtLeastIgnoringCase, containsAtLeastIgnoringCaseFunArr) = containsAtLeastIgnoringCaseTriple - fun Assert.containsAtLeastIgnoringCaseFun(atLeast: Int, a: Any, vararg aX: Any) - = containsAtLeastIgnoringCaseFunArr(atLeast, a, aX) - - val (containsAtLeastButAtMost, containsAtLeastButAtMostTest, containsAtLeastButAtMostFunArr) = containsAtLeastButAtMostTriple - fun Assert.containsAtLeastButAtMostFun(atLeast: Int, atMost: Int, a: Any, vararg aX: Any) - = containsAtLeastButAtMostFunArr(atLeast, atMost, a, aX) - - val (_, containsAtLeastButAtMostIgnoringCase, containsAtLeastButAtMostIgnoringCaseFunArr) = containsAtLeastButAtMostIgnoringCaseTriple - fun Assert.containsAtLeastButAtMostIgnoringCaseFun(atLeast: Int, atMost: Int, a: Any, vararg aX: Any) - = containsAtLeastButAtMostIgnoringCaseFunArr(atLeast, atMost, a, aX) - - val (containsNot, errorMsgContainsNot) = containsNotPair - val (exactly, errorMsgExactly) = exactlyPair - - val indentRootBulletPoint = " ".repeat(rootBulletPoint.length) - val valueWithIndent = "$indentRootBulletPoint$listBulletPoint$value" - - describeFun(containsAtLeast, containsAtLeastButAtMost) { - - context("throws an $illegalArgumentException") { - test("for at least -1 -- only positive numbers") { - expect { - fluent.containsAtLeastFun(-1, "") - }.toThrow { messageContains("positive number", -1) } - } - test("for at least 0 -- points to $containsNot") { - expect { - fluent.containsAtLeastFun(0, "") - }.toThrow { message { toBe(errorMsgContainsNot(0)) } } - } - test("if an object is passed as first expected") { - expect { - fluent.containsAtLeastFun(1, fluent) - }.toThrow { messageContains("CharSequence", "Number", "Char") } - } - test("if an object is passed as second expected") { - expect { - fluent.containsAtLeastFun(1, "that's fine", fluent) - }.toThrow { messageContains("CharSequence", "Number", "Char") } - } - - group("using $containsAtLeastButAtMost") { - test("for at least 1 but at most -1 -- since -1 is smaller than 1") { - expect { - fluent.containsAtLeastButAtMostFun(1, -1, "") - }.toThrow { message { toBe(errorMsgAtLeastButAtMost(1, -1)) } } - } - test("for at least 1 but at most 0 -- since 0 is smaller than 1") { - expect { - fluent.containsAtLeastButAtMostFun(1, 0, "") - }.toThrow { message { toBe(errorMsgAtLeastButAtMost(1, 0)) } } - } - test("for at least 2 but at most 1 -- since 1 is smaller than 2") { - expect { - fluent.containsAtLeastButAtMostFun(2, 1, "") - }.toThrow { message { toBe(errorMsgAtLeastButAtMost(2, 1)) } } - } - test("for at least 1 but at most 1 -- points to $exactly") { - expect { - fluent.containsAtLeastButAtMostFun(1, 1, "") - }.toThrow { message { toBe(errorMsgExactly(1)) } } - } - test("if an object is passed as first expected") { - expect { - fluent.containsAtLeastButAtMostFun(1, 2, fluent) - }.toThrow { messageContains("CharSequence", "Number", "Char") } - } - test("if an object is passed as second expected") { - expect { - fluent.containsAtLeastButAtMostFun(1, 2, "that's fine", fluent) - }.toThrow { messageContains("CharSequence", "Number", "Char") } - } - } - - test("searching for an empty String - warns the user that the assertion is useless") { - expect{ - fluent.containsAtLeastFun(1, "that's fine", "" /* <- that's not */) - }.toThrow { messageContains("empty string", "forgot") } - } - test("searching for an empty CharSequence - warns the user that the assertion is useless") { - expect{ - fluent.containsAtLeastFun(1, "that's fine", StringBuilder() /* <- that's not */) - }.toThrow { messageContains("empty CharSequence", "forgot") } - } - } - - context("text '$helloWorld'") { - - group("happy case with $containsAtLeast once") { - test("${containsAtLeastTest("'H'", "once")} does not throw") { - fluentHelloWorld.containsAtLeastFun(1, 'H') - } - test("${containsAtLeastTest("'H' and 'e' and 'W'", "once")} does not throw") { - fluentHelloWorld.containsAtLeastFun(1, 'H', 'e', 'W') - } - test("${containsAtLeastTest("'W' and 'H' and 'e'", "once")} does not throw") { - fluentHelloWorld.containsAtLeastFun(1, 'W', 'H', 'e') - } - } - - group("failing cases; search string at different positions with $containsAtLeast once") { - test("${containsAtLeastTest("'h'", "once")} throws AssertionError") { - expect { - fluentHelloWorld.containsAtLeastFun(1, 'h') - }.toThrow { messageContains("$atLeast: 1", "$valueWithIndent: 'h'") } - } - test("${containsAtLeastIgnoringCase("'h'", "once")} does not throw") { - fluentHelloWorld.containsAtLeastIgnoringCaseFun(1, 'h') - } - - test("${containsAtLeastTest("'H', 'E'", "once")} throws AssertionError") { - expect { - fluentHelloWorld.containsAtLeastFun(1, 'H', 'E') - }.toThrow { messageContains(atLeast, 'E') } - } - test("${containsAtLeastIgnoringCase("'H', 'E'", "once")} does not throw") { - fluentHelloWorld.containsAtLeastIgnoringCaseFun(1, 'H', 'E') - } - - test("${containsAtLeastTest("'E', 'H'", "once")} throws AssertionError mentioning only 'E'") { - expect { - fluentHelloWorld.containsAtLeastFun(1, 'E', 'H') - }.toThrow { - message { - contains("$atLeast: 1", "$valueWithIndent: 'E'") - containsNot("$valueWithIndent: 'H'") - } - } - } - test("${containsAtLeastIgnoringCase("'E', 'H'", "once")} does not throw") { - fluentHelloWorld.containsAtLeastIgnoringCaseFun(1, 'E', 'H') - } - - test("${containsAtLeastTest("'H', 'E', 'w' and 'r'", "once")} throws AssertionError mentioning 'E' and 'w'") { - expect { - fluentHelloWorld.containsAtLeastFun(1, 'H', 'E', 'w', 'r') - }.toThrow { - message { - contains("$atLeast: 1", "$valueWithIndent: 'E'", "$valueWithIndent: 'w'") - containsNot("$valueWithIndent: 'H'", "$valueWithIndent: 'r'") - } - } - } - test("${containsAtLeastIgnoringCase("'H', 'E', 'w' and 'r'", "once")} does not throw") { - fluentHelloWorld.containsAtLeastIgnoringCaseFun(1, 'H', 'E', 'w', 'r') - } - } - - group("multiple occurrences of the search string") { - test("${containsAtLeastTest("'o'", "once")} does not throw") { - fluentHelloWorld.containsAtLeastFun(1, 'o') - } - test("${containsAtLeastTest("'o'", "twice")} does not throw") { - fluentHelloWorld.containsAtLeastFun(2, 'o') - } - - test("${containsAtLeastTest("'o'", "3 times")} throws AssertionError and message contains both, how many times we expected (3) and how many times it actually contained 'o' (2)") { - expect { - fluentHelloWorld.containsAtLeastFun(3, 'o') - }.toThrow { - message { - contains( - "$rootBulletPoint$containsDescr: $separator" + - "$valueWithIndent: 'o'", - "$numberOfOccurrences: 2$separator" - ) - endsWith("$atLeast: 3") - } - } - } - test("${containsAtLeastIgnoringCase("'o'", "3 times")} does not throw") { - fluentHelloWorld.containsAtLeastIgnoringCaseFun(3, 'o') - } - - test("${containsAtLeastTest("'o' and 'l'", "twice")} does not throw") { - fluentHelloWorld.containsAtLeastFun(2, 'o', 'l') - } - test("${containsAtLeastTest("'l'", "3 times")} does not throw") { - fluentHelloWorld.containsAtLeastFun(3, 'l') - } - - test("${containsAtLeastTest("'o' and 'l'", "3 times")} throws AssertionError and message contains both, at least: 3 and how many times it actually contained 'o' (2)") { - expect { - fluentHelloWorld.containsAtLeastFun(3, 'o', 'l') - }.toThrow { - message { - contains( - "$rootBulletPoint$containsDescr: $separator" + - "$valueWithIndent: 'o'", - "$numberOfOccurrences: 2$separator" - ) - endsWith("$atLeast: 3") - containsNot("$valueWithIndent: 'l'") - } - } - } - test("${containsAtLeastIgnoringCase("'o' and 'l'", "3 times")} does not throw") { - fluentHelloWorld.containsAtLeastIgnoringCaseFun(3, 'o', 'l') - } - } - - group("using $containsAtLeastButAtMost") { - test("${containsAtLeastButAtMostTest("'o'", "once", "twice")} does not throw") { - fluentHelloWorld.containsAtLeastButAtMostFun(1, 2, 'o') - } - test("${containsAtLeastButAtMostTest("'o' and 'l'", "once", "twice")} throws AssertionError and message contains both, at most: 2 and how many times it actually contained 'l' (3)") { - expect { - fluentHelloWorld.containsAtLeastButAtMostFun(1, 2, 'o', 'l') - }.toThrow { - message { - contains( - "$rootBulletPoint$containsDescr: $separator" + - "$valueWithIndent: 'l'", - "$numberOfOccurrences: 3$separator" - ) - endsWith("$atMost: 2") - containsNot(atLeast, "$valueWithIndent: 'o'") - } - } - } - test("${containsAtLeastButAtMostTest("'o' and 'l'", "twice", "3 times")} does not throw") { - fluentHelloWorld.containsAtLeastButAtMostFun(2, 3, 'o', 'l') - } - test("${containsAtLeastButAtMostIgnoringCase("'o' and 'l'", "twice", "3 times")} does not throw") { - fluentHelloWorld.containsAtLeastButAtMostIgnoringCaseFun(2, 3, 'o', 'l') - } - - test("${containsAtLeastButAtMostTest("'o' and 'l'", "3 times", "4 times")} throws AssertionError and message contains both, at least: 3 and how many times it actually contained 'o' (2)") { - expect { - fluentHelloWorld.containsAtLeastButAtMostFun(3, 4, 'o', 'l') - }.toThrow { - message { - contains( - "$rootBulletPoint$containsDescr: $separator" + - "$valueWithIndent: 'o'", - "$numberOfOccurrences: 2$separator" - ) - endsWith("$atLeast: 3") - containsNot(atMost, "$valueWithIndent: 'l'") - } - } - } - test("${containsAtLeastIgnoringCase("'o' and 'l'", " 3 times")} does not throw") { - fluentHelloWorld.containsAtLeastButAtMostIgnoringCaseFun(3, 4, 'o', 'l') - } - } - } - - group("special cases") { - given("string: \"\\0 hello\"") { - test("${containsAtLeastTest("\"hello\" and '\\0'", "once")} does not throw") { - verbs.checkImmediately('\u0000' + " hello").containsAtLeastFun(1, "hello", 0.toChar()) - } - } - - val aaaa = "aaaa" - val aaaaFluent = verbs.checkImmediately(aaaa) - given("string \"$aaaa\""){ - test("${containsAtLeastTest("'a'", "4 times")} does not throw") { - aaaaFluent.containsAtLeastFun(4, 'a') - } - test("${containsAtLeastTest("'a'", "5 times")} throws AssertionError") { - expect { - aaaaFluent.containsAtLeastFun(5, 'a') - }.toThrow { messageContains("$atLeast: 5", "$valueWithIndent: 'a'") } - } - } - } - } -}) diff --git a/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/CharSequenceContainsAtMostAssertionsSpec.kt b/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/CharSequenceContainsAtMostAssertionsSpec.kt deleted file mode 100644 index f4457eeb9..000000000 --- a/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/CharSequenceContainsAtMostAssertionsSpec.kt +++ /dev/null @@ -1,225 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") - -package ch.tutteli.atrium.spec.integration - -import ch.tutteli.atrium.api.cc.en_GB.* -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.spec.AssertionVerbFactory -import ch.tutteli.atrium.spec.describeFun -import ch.tutteli.atrium.translations.DescriptionCharSequenceAssertion.AT_MOST -import org.jetbrains.spek.api.dsl.SpecBody -import org.jetbrains.spek.api.dsl.context -import org.jetbrains.spek.api.dsl.given -import org.jetbrains.spek.api.include - -@Deprecated("Switch from Assert to Expect and use Spec from atrium-specs-common; will be removed with 1.0.0") -abstract class CharSequenceContainsAtMostAssertionsSpec( - verbs: AssertionVerbFactory, - containsAtMostTriple: Triple String, Assert.(Int, Any, Array) -> Assert>, - containsAtMostIgnoringCaseTriple: Triple String, Assert.(Int, Any, Array) -> Assert>, - containsNotPair: Pair String>, - exactlyPair: Pair String>, - rootBulletPoint: String, - listBulletPoint: String, - describePrefix: String = "[Atrium] " -) : CharSequenceContainsSpecBase({ - - include(@Suppress("DEPRECATION") object : SubjectLessAssertionSpec(describePrefix, - containsAtMostTriple.first to mapToCreateAssertion { containsAtMostTriple.third(this, 2, 2.3, arrayOf()) }, - containsAtMostIgnoringCaseTriple.first to mapToCreateAssertion { containsAtMostIgnoringCaseTriple.third(this, 2, 2.3, arrayOf()) } - ) {}) - - include(@Suppress("DEPRECATION") object : CheckingAssertionSpec(verbs, describePrefix, - checkingTriple(containsAtMostTriple.first, { containsAtMostTriple.third(this, 2, 2.3, arrayOf()) }, "2.3 / 2.3", "2.3 / 2.3 / 2.3"), - checkingTriple(containsAtMostIgnoringCaseTriple.first, { containsAtMostIgnoringCaseTriple.third(this, 2, 2.3, arrayOf()) }, "2.3 / 2.3", "2.3 / 2.3 / 2.3") - ) {}) - - fun describeFun(vararg funName: String, body: SpecBody.() -> Unit) - = describeFun(describePrefix, funName, body = body) - - val assert: (CharSequence) -> Assert = verbs::checkImmediately - val expect = verbs::checkException - val fluent = assert(text) - val fluentHelloWorld = assert(helloWorld) - - val (containsAtMost, containsAtMostTest, containsAtMostFunArr) = containsAtMostTriple - fun Assert.containsAtMostFun(atLeast: Int, a: Any, vararg aX: Any) - = containsAtMostFunArr(atLeast, a, aX) - - val (_, containsAtMostIgnoringCase, containsAtMostIgnoringCaseFunArr) = containsAtMostIgnoringCaseTriple - fun Assert.containsAtMostIgnoringCaseFun(atLeast: Int, a: Any, vararg aX: Any) - = containsAtMostIgnoringCaseFunArr(atLeast, a, aX) - - val (containsNot, errorMsgContainsNot) = containsNotPair - val (exactly, errorMsgExactly) = exactlyPair - - val indentRootBulletPoint = " ".repeat(rootBulletPoint.length) - val valueWithIndent = "$indentRootBulletPoint$listBulletPoint$value" - - describeFun(containsAtMost) { - - context("throws an $illegalArgumentException") { - test("for at most -1 -- only positive numbers") { - expect { - fluent.containsAtMostFun(-1, "") - }.toThrow { messageContains("positive number", -1) } - } - test("for at most 0 -- points to $containsNot") { - expect { - fluent.containsAtMostFun(0, "") - }.toThrow { message { toBe(errorMsgContainsNot(0)) } } - } - test("for at most 1 -- points to $exactly") { - expect { - fluent.containsAtMostFun(1, "") - }.toThrow { message { toBe(errorMsgExactly(1)) } } - } - test("if an object is passed as first expected") { - expect { - fluent.containsAtMostFun(2, fluent) - }.toThrow { messageContains("CharSequence", "Number", "Char") } - } - test("if an object is passed as second expected") { - expect { - fluent.containsAtMostFun(2, "that's fine", fluent) - }.toThrow { messageContains("CharSequence", "Number", "Char") } - } - } - - context("text '$helloWorld'") { - group("happy case with $containsAtMost twice") { - test("${containsAtMostTest("'H'", "twice")} does not throw") { - fluentHelloWorld.containsAtMostFun(2, 'H') - } - test("${containsAtMostTest("'H' and 'e' and 'W'", "twice")} does not throw") { - fluentHelloWorld.containsAtMostFun(2, 'H', 'e', 'W') - } - test("${containsAtMostTest("'W' and 'H' and 'e'", "twice")} does not throw") { - fluentHelloWorld.containsAtMostFun(2, 'W', 'H', 'e') - } - } - - group("failing cases; search string at different positions") { - test("${containsAtMostTest("'l'", "twice")} throws AssertionError") { - expect { - fluentHelloWorld.containsAtMostFun(2, 'l') - }.toThrow { messageContains("$atMost: 2", "$valueWithIndent: 'l'") } - } - test("${containsAtMostTest("'H', 'l'", "twice")} throws AssertionError mentioning only 'l'") { - expect { - fluentHelloWorld.containsAtMostFun(2, 'H', 'l') - }.toThrow { - message { - contains("$atMost: 2", "$valueWithIndent: 'l'") - containsNot(atLeast, "$valueWithIndent: 'H'") - } - } - } - test("${containsAtMostTest("'l', 'H'", "twice")} once throws AssertionError mentioning only 'l'") { - expect { - fluentHelloWorld.containsAtMostFun(2, 'l', 'H') - }.toThrow { - message { - contains("$atMost: 2", "$valueWithIndent: 'l'") - containsNot(atLeast, "$valueWithIndent: 'H'") - } - } - } - test("${containsAtMostTest("'o', 'E', 'W', 'l'", "twice")} throws AssertionError mentioning 'l' and 'o'") { - expect { - fluentHelloWorld.containsAtMostIgnoringCaseFun(2, 'o', 'E', 'W', 'l') - }.toThrow { - message { - contains("$atMost: 2", "$valueWithIndent: 'l'", "$valueWithIndent: 'o'") - containsNot(atLeast, "$valueWithIndent: 'E'", "$valueWithIndent: 'W'") - } - } - } - test("${containsAtMostTest("'x' and 'y' and 'z'", "twice")} throws AssertionError") { - expect { - fluentHelloWorld.containsAtMostFun(2, 'x', 'y', 'z') - }.toThrow { - message { - contains("$atLeast: 1", "$valueWithIndent: 'x'", "$valueWithIndent: 'y'", "$valueWithIndent: 'z'") - containsNot(atMost) - } - } - } - } - - group("multiple occurrences of the search string") { - - test("${containsAtMostTest("'o'", "twice")} does not throw") { - fluentHelloWorld.containsAtMostFun(2, 'o') - } - test("${containsAtMostIgnoringCase("'o'", "twice")} throws AssertionError and message contains both, how many times we expected (2) and how many times it actually contained 'o' ignoring case (3)") { - expect { - fluentHelloWorld.containsAtMostIgnoringCaseFun(2, 'o') - }.toThrow { - message { - contains( - "$rootBulletPoint$containsIgnoringCase: $separator" + - "$valueWithIndent: 'o'", - "$numberOfOccurrences: 3$separator" - ) - endsWith("$atMost: 2") - } - } - } - - test("${containsAtMostTest("'o'", "3 times")} does not throw") { - fluentHelloWorld.containsAtMostFun(3, 'o') - } - test("${containsAtMostTest("'o' and 'l'", "twice")} throws AssertionError and message contains both, how many times we expected (2) and how many times it actually contained 'l' (3)") { - expect { - fluentHelloWorld.containsAtMostFun(2, 'o', 'l') - }.toThrow { - message { - contains( - "$rootBulletPoint$containsDescr: $separator" + - "$valueWithIndent: 'l'", - "$numberOfOccurrences: 3$separator" - ) - endsWith("$atMost: 2") - containsNot("$valueWithIndent: 'o'") - } - } - } - test("${containsAtMostTest("'l'", "3 times")} does not throw") { - fluentHelloWorld.containsAtMostFun(3, 'l') - } - test("${containsAtMostTest("'o' and 'l'", "3 times")} does not throw") { - fluentHelloWorld.containsAtMostFun(3, 'o', 'l') - } - - } - } - - group("special cases") { - given("string: \"\\0 hello\"") { - test("${containsAtMostTest("\"hello\" and '\\0'", "twice")} does not throw") { - verbs.checkImmediately('\u0000' + " hello").containsAtMostFun(2, "hello", 0.toChar()) - } - } - - val aaaa = "aaaa" - val aaaaFluent = verbs.checkImmediately(aaaa) - given("string \"$aaaa\""){ - test("${containsAtMostTest("'a'", "4 times")} does not throw") { - aaaaFluent.containsAtMostFun(4, 'a') - } - test("${containsAtMostTest("'a'", "3 times")} throws AssertionError") { - expect { - aaaaFluent.containsAtMostFun(3, 'a') - }.toThrow { - message { - contains("$valueWithIndent: 'a'", "$numberOfOccurrences: 4", "$atMost: 3") - containsNot(atLeast) - } - } - } - } - } - } -}) diff --git a/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/CharSequenceContainsContainsNotAssertionsSpec.kt b/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/CharSequenceContainsContainsNotAssertionsSpec.kt deleted file mode 100644 index 96f847bce..000000000 --- a/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/CharSequenceContainsContainsNotAssertionsSpec.kt +++ /dev/null @@ -1,205 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") - -package ch.tutteli.atrium.spec.integration - -import ch.tutteli.atrium.api.cc.en_GB.* -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.spec.AssertionVerbFactory -import ch.tutteli.atrium.spec.describeFun -import ch.tutteli.atrium.translations.DescriptionCharSequenceAssertion.CONTAINS -import ch.tutteli.atrium.translations.DescriptionCharSequenceAssertion.CONTAINS_NOT -import org.jetbrains.spek.api.dsl.SpecBody -import org.jetbrains.spek.api.dsl.context -import org.jetbrains.spek.api.include - -@Deprecated("Switch from Assert to Expect and use Spec from atrium-specs-common; will be removed with 1.0.0") -abstract class CharSequenceContainsContainsNotAssertionsSpec( - verbs: AssertionVerbFactory, - containsPair: Pair.(String, Array) -> Assert>, - containsNotPair: Pair.(String, Array) -> Assert>, - rootBulletPoint: String, - listBulletPoint: String, - featureArrow: String, - describePrefix: String = "[Atrium] " -) : CharSequenceContainsSpecBase({ - - include(@Suppress("DEPRECATION") object : SubjectLessAssertionSpec(describePrefix, - containsPair.first to mapToCreateAssertion { containsPair.second(this, "hello", arrayOf()) }, - containsNotPair.first to mapToCreateAssertion { containsNotPair.second(this, "hello", arrayOf()) } - ) {}) - - include(@Suppress("DEPRECATION") object : CheckingAssertionSpec(verbs, describePrefix, - checkingTriple(containsPair.first, { containsPair.second(this, "hello", arrayOf()) }, "hello robert", "by robert"), - checkingTriple(containsNotPair.first, { containsNotPair.second(this, "hello", arrayOf()) }, "by robert", "hello robert") - ) {}) - - fun describeFun(vararg funName: String, body: SpecBody.() -> Unit) - = describeFun(describePrefix, funName, body = body) - - val assert: (CharSequence) -> Assert = verbs::checkImmediately - val expect = verbs::checkException - val fluent = assert(text) - - val (containsFunName, containsFunArr) = containsPair - fun Assert.containsFun(t: String, vararg tX: String) - = containsFunArr(t, tX) - - val (containsNot, containsNotFunArr) = containsNotPair - fun Assert.containsNotFun(t: String, vararg tX: String) - = containsNotFunArr(t, tX) - - val indentRootBulletPoint = " ".repeat(rootBulletPoint.length) - val valueWithIndent = "$indentRootBulletPoint$listBulletPoint$value" - val containsNotDescr = CONTAINS_NOT.getDefault() - - describeFun(containsFunName, containsNot) { - context("empty string") { - val fluentEmptyString = assert("") - test("$containsFunName 'Hello' throws AssertionError") { - expect { - fluentEmptyString.containsFun("Hello") - }.toThrow { - messageContains( - "$rootBulletPoint$containsDescr: $separator" + - "$valueWithIndent: \"Hello\"", - "$numberOfOccurrences: 0", - "$atLeast: 1" - ) - } - } - test("$containsNot 'Hello' does not throw") { - fluentEmptyString.containsNotFun("Hello") - } - } - - context("text '$text'") { - - context("search for 'Hello' and 'Robert'") { - test("$containsFunName 'Hello' does not throw") { - fluent.containsFun("Hello") - } - test("$containsNot 'Hello' throws AssertionError") { - expect { - fluent.containsNotFun("Hello") - }.toThrow { messageContains(containsNotDescr, "$valueWithIndent: \"Hello\"") } - } - - test("$containsFunName 'Hello' and 'Robert' does not throw") { - fluent.containsFun("Hello", "Robert") - } - test("$containsNot 'Hello' and 'Robert' throws AssertionError") { - expect { - fluent.containsNotFun("Hello", "Robert") - }.toThrow { - messageContains(containsNotDescr, "$valueWithIndent: \"Hello\"", "$valueWithIndent: \"Robert\"") - } - } - } - - context("search for 'notInThere' and 'neitherInThere'") { - test("$containsFunName 'notInThere' and 'neitherInThere' throws AssertionError") { - expect { - fluent.containsFun("notInThere", "neitherInThere") - }.toThrow { - messageContains(containsDescr, "$valueWithIndent: \"notInThere\"", "$valueWithIndent: \"neitherInThere\"") - } - } - test("$containsNot 'notInThere' and 'neitherInThere' does not throw") { - fluent.containsNotFun("notInThere", "neitherInThere") - } - } - - context("search for 'hello' and 'robert'") { - test("$containsFunName 'hello' and 'robert' throws AssertionError") { - expect { - fluent.containsFun("hello", "robert") - }.toThrow { - message { - contains.exactly(2).values( - "$numberOfOccurrences: 0", - "$atLeast: 1" - ) - contains.exactly(1).values( - "$rootBulletPoint$containsDescr: $separator", - "$valueWithIndent: \"hello\"", - "$valueWithIndent: \"robert\"" - ) - } - } - } - test("$containsNot 'hello' and 'robert' does not throw") { - fluent.containsNotFun("hello", "robert") - } - } - - context("search for 'Hello' and 'notInThere'") { - test("$containsFunName 'notInThere' throws AssertionError") { - expect { - fluent.containsFun("notInThere") - }.toThrow { messageContains(containsDescr, "$valueWithIndent: \"notInThere\"") } - } - test("$containsNot 'notInThere' does not throw") { - fluent.containsNotFun("notInThere") - } - - test("$containsFunName 'Hello' and 'notInThere' throws AssertionError mentioning only 'Hello'") { - expect { - fluent.containsFun("Hello", "notInThere") - }.toThrow { - message { - contains(containsDescr, "$valueWithIndent: \"notInThere\"") - containsNot("$valueWithIndent: \"Hello\"") - } - } - } - test("$containsNot 'Hello' and 'notInThere' throws AssertionError mentioning only 'notInThere'") { - expect { - fluent.containsNotFun("Hello", "notInThere") - }.toThrow { - message { - contains(containsNotDescr, "$valueWithIndent: \"Hello\"") - containsNot("$valueWithIndent: \"notInThere\"") - } - } - } - } - - test("$containsFunName 'Hello' and 'Hello' (searching twice in the same assertion) does not throw") { - fluent.containsFun("Hello", "Hello") - } - - test("$containsNot 'notInThere' and 'notInThere' does not throw") { - fluent.containsNotFun("notInThere", "notInThere") - } - } - - context("error message") { - context("feature assertion about a Person's name 'Robert Stoll'") { - data class Person(val name: String) - - val person = Person("Robert Stoll") - - val nameWithArrow = "${featureArrow}name" - test("$containsFunName 'treboR' and 'llotS' - error message contains '$nameWithArrow' exactly once") { - expect { - verbs.checkLazily(person) { - property(Person::name).containsFun("treboR", "llotS") - } - }.toThrow { - message { contains.exactly(1).value(nameWithArrow) } - } - } - test("$containsNot 'Robert' and 'Stoll' - error message contains '$nameWithArrow' exactly once") { - expect { - verbs.checkLazily(person) { - property(Person::name).containsNotFun("Robert", "Stoll") - } - }.toThrow { - message { contains.exactly(1).value(nameWithArrow) } - } - } - } - } - } -}) diff --git a/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/CharSequenceContainsDefaultTranslationAssertionsSpec.kt b/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/CharSequenceContainsDefaultTranslationAssertionsSpec.kt deleted file mode 100644 index 3ed8af198..000000000 --- a/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/CharSequenceContainsDefaultTranslationAssertionsSpec.kt +++ /dev/null @@ -1,100 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") - -package ch.tutteli.atrium.spec.integration - -import ch.tutteli.atrium.api.cc.en_GB.messageContains -import ch.tutteli.atrium.api.cc.en_GB.toThrow -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.reporting.translating.Translatable -import ch.tutteli.atrium.reporting.translating.Untranslatable -import ch.tutteli.atrium.spec.AssertionVerb -import ch.tutteli.atrium.spec.AssertionVerbFactory -import ch.tutteli.atrium.spec.describeFun -import ch.tutteli.atrium.translations.DescriptionCharSequenceAssertion.AT_MOST -import org.jetbrains.spek.api.Spek -import org.jetbrains.spek.api.dsl.SpecBody -import org.jetbrains.spek.api.dsl.context -import org.jetbrains.spek.api.include - -//TODO remove with 1.0.0 -@Deprecated("Will be removed with 1.0.0") -abstract class CharSequenceContainsDefaultTranslationAssertionsSpec( - verbs: AssertionVerbFactory, - containsDefaultTranslationOf: String, - containsAtLeastTriple: Triple String, Assert.(Int, Translatable, Array) -> Assert>, - containsAtMostTriple: Triple String, Assert.(Int, Translatable, Array) -> Assert>, - containsAtMostIgnoringCaseTriple: Triple String, Assert.(Int, Translatable, Array) -> Assert>, - describePrefix: String = "[Atrium] " -) : Spek({ - - include(@Suppress("DEPRECATION") object : SubjectLessAssertionSpec(describePrefix, - containsAtLeastTriple.first to mapToCreateAssertion { containsAtLeastTriple.third(this, 2, AssertionVerb.ASSERT, arrayOf()) }, - containsAtMostTriple.first to mapToCreateAssertion { containsAtMostTriple.third(this, 2, AssertionVerb.ASSERT, arrayOf()) }, - containsAtMostIgnoringCaseTriple.first to mapToCreateAssertion { containsAtMostIgnoringCaseTriple.third(this, 2, AssertionVerb.ASSERT, arrayOf()) } - ) {}) - - include(@Suppress("DEPRECATION") object : CheckingAssertionSpec(verbs, describePrefix, - checkingTriple(containsAtLeastTriple.first, { containsAtLeastTriple.third(this, 2, AssertionVerb.ASSERT, arrayOf()) }, "assert a, assert b", "a"), - checkingTriple(containsAtMostTriple.first, { containsAtMostTriple.third(this, 2, AssertionVerb.ASSERT, arrayOf()) }, "assert", "assert, assert and assert"), - checkingTriple(containsAtMostIgnoringCaseTriple.first, { containsAtMostIgnoringCaseTriple.third(this, 2, AssertionVerb.ASSERT, arrayOf()) }, "Assert aSSert", "assert Assert AsSert") - ) {}) - - fun describeFun(vararg funName: String, body: SpecBody.() -> Unit) - = describeFun(describePrefix, funName, body = body) - - val assert: (CharSequence) -> Assert = verbs::checkImmediately - val expect = verbs::checkException - - val text = "Assert - assert, assert, assert - ASSERT; expect the thrown exception" - val fluent = assert(text) - - val (_, containsAtLeastTest, containsAtLeastFunArr) = containsAtLeastTriple - fun Assert.containsAtLeastFun(atLeast: Int, a: Translatable, vararg aX: Translatable) - = containsAtLeastFunArr(atLeast, a, aX) - - val (_, containsAtMostTest, containsAtMostFunArr) = containsAtMostTriple - fun Assert.containsAtMostFun(atLeast: Int, a: Translatable, vararg aX: Translatable) - = containsAtMostFunArr(atLeast, a, aX) - - val (_, containsAtMostIgnoringCase, containsAtMostIgnoringCaseFunArr) = containsAtMostIgnoringCaseTriple - fun Assert.containsAtMostIgnoringCaseFun(atLeast: Int, a: Translatable, vararg aX: Translatable) - = containsAtMostIgnoringCaseFunArr(atLeast, a, aX) - - describeFun(containsDefaultTranslationOf) { - - context("text $text") { - test("${containsAtLeastTest("${AssertionVerb.ASSERT}", "once")} does not throw") { - fluent.containsAtLeastFun(1, AssertionVerb.ASSERT) - } - test("${containsAtLeastTest("${AssertionVerb.ASSERT}, ${AssertionVerb.ASSERT} and ${AssertionVerb.ASSERT}", "once")} does not throw") { - fluent.containsAtLeastFun(1, AssertionVerb.ASSERT, AssertionVerb.ASSERT, AssertionVerb.ASSERT) - } - - test("${containsAtLeastTest("'${AssertionVerb.ASSERT}' and ${AssertionVerb.EXPECT_THROWN}", "once")} does not throw") { - fluent.containsAtLeastFun(1, AssertionVerb.ASSERT, AssertionVerb.EXPECT_THROWN) - } - - test("${containsAtMostTest(AssertionVerb.ASSERT.toString(), "3 times")} does not throw") { - fluent.containsAtMostFun(3, AssertionVerb.ASSERT) - } - test("${containsAtMostIgnoringCase(AssertionVerb.ASSERT.toString(), "5 times")} does not throw") { - fluent.containsAtMostIgnoringCaseFun(5, AssertionVerb.ASSERT) - } - test("${containsAtMostIgnoringCase("${AssertionVerb.ASSERT} and ${Untranslatable("Assert")}", "4 times")} does not throw") { - fluent.containsAtMostIgnoringCaseFun(5, AssertionVerb.ASSERT, Untranslatable("Assert")) - } - - test("${containsAtMostTest(AssertionVerb.ASSERT.toString(), "twice")} throws AssertionError") { - expect { - fluent.containsAtMostFun(2, AssertionVerb.ASSERT) - }.toThrow { messageContains(AT_MOST.getDefault()) } - } - test("${containsAtMostIgnoringCase(AssertionVerb.ASSERT.toString(), "4 times")} throws AssertionError") { - expect { - fluent.containsAtMostIgnoringCaseFun(4, AssertionVerb.ASSERT) - }.toThrow { messageContains(AT_MOST.getDefault()) } - } - } - } -}) diff --git a/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/CharSequenceContainsExactlyAssertionsSpec.kt b/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/CharSequenceContainsExactlyAssertionsSpec.kt deleted file mode 100644 index 10198c57b..000000000 --- a/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/CharSequenceContainsExactlyAssertionsSpec.kt +++ /dev/null @@ -1,225 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") - -package ch.tutteli.atrium.spec.integration - -import ch.tutteli.atrium.api.cc.en_GB.* -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.spec.AssertionVerbFactory -import ch.tutteli.atrium.spec.describeFun -import ch.tutteli.atrium.translations.DescriptionCharSequenceAssertion.EXACTLY -import org.jetbrains.spek.api.dsl.SpecBody -import org.jetbrains.spek.api.dsl.context -import org.jetbrains.spek.api.include - -@Deprecated("Switch from Assert to Expect and use Spec from atrium-specs-common; will be removed with 1.0.0") -abstract class CharSequenceContainsExactlyAssertionsSpec( - verbs: AssertionVerbFactory, - containsExactlyTriple: Triple String, Assert.(Int, Any, Array) -> Assert>, - containsExactlyIgnoringCaseTriple: Triple String, Assert.(Int, Any, Array) -> Assert>, - containsNotPair: Pair String>, - rootBulletPoint: String, - listBulletPoint: String, - describePrefix: String = "[Atrium] " -) : CharSequenceContainsSpecBase({ - - include(@Suppress("DEPRECATION") object : SubjectLessAssertionSpec(describePrefix, - containsExactlyTriple.first to mapToCreateAssertion { containsExactlyTriple.third(this, 2, 2.3, arrayOf()) }, - containsExactlyIgnoringCaseTriple.first to mapToCreateAssertion { containsExactlyIgnoringCaseTriple.third(this, 2, 2.3, arrayOf()) } - ) {}) - - include(@Suppress("DEPRECATION") object : CheckingAssertionSpec(verbs, describePrefix, - checkingTriple(containsExactlyTriple.first, { containsExactlyTriple.third(this, 2, 2.3, arrayOf()) }, "2.3 / 2.3", "2.3"), - checkingTriple(containsExactlyIgnoringCaseTriple.first, { containsExactlyIgnoringCaseTriple.third(this, 2, 2.3, arrayOf()) }, "2.3 / 2.3", "2.3") - ) {}) - - fun describeFun(vararg funName: String, body: SpecBody.() -> Unit) - = describeFun(describePrefix, funName, body = body) - - val assert: (CharSequence) -> Assert = verbs::checkImmediately - val expect = verbs::checkException - val fluent = assert(text) - val fluentHelloWorld = assert(helloWorld) - - val (containsExactly, containsExactlyTest, containsExactlyFunArr) = containsExactlyTriple - fun Assert.containsExactlyFun(atLeast: Int, a: Any, vararg aX: Any) - = containsExactlyFunArr(atLeast, a, aX) - - val (_, containsExactlyIgnoringCase, containsExactlyIgnoringCaseFunArr) = containsExactlyIgnoringCaseTriple - fun Assert.containsExactlyIgnoringCaseFun(atLeast: Int, a: Any, vararg aX: Any) - = containsExactlyIgnoringCaseFunArr(atLeast, a, aX) - - val (containsNot, errorMsgContainsNot) = containsNotPair - - val exactly = EXACTLY.getDefault() - val indentRootBulletPoint = " ".repeat(rootBulletPoint.length) - val valueWithIndent = "$indentRootBulletPoint$listBulletPoint$value" - - describeFun(containsExactly) { - context("throws an $illegalArgumentException") { - test("for exactly -1 -- only positive numbers") { - expect { - fluent.containsExactlyFun(-1, "") - }.toThrow { messageContains("positive number", -1) } - } - test("for exactly 0 -- points to $containsNot") { - expect { - fluent.containsExactlyFun(0, "") - }.toThrow { message { toBe(errorMsgContainsNot(0)) } } - } - test("if an object is passed as first expected") { - expect { - fluent.containsExactlyFun(1, fluent) - }.toThrow { messageContains("CharSequence", "Number", "Char") } - } - test("if an object is passed as second expected") { - expect { - fluent.containsExactlyFun(1, "that's fine", fluent) - }.toThrow { messageContains("CharSequence", "Number", "Char") } - } - } - - context("text '$helloWorld'") { - - group("happy case with $containsExactly once") { - test("${containsExactlyTest("'H'", "once")} does not throw") { - fluentHelloWorld.containsExactlyFun(1, 'H') - } - test("${containsExactlyTest("'H' and 'e' and 'W'", "once")} does not throw") { - fluentHelloWorld.containsExactlyFun(1, 'H', 'e', 'W') - } - test("${containsExactlyTest("'W' and 'H' and 'e'", "once")} does not throw") { - fluentHelloWorld.containsExactlyFun(1, 'W', 'H', 'e') - } - } - - group("failing cases; search string at different positions with $containsExactly once") { - test("${containsExactlyTest("'h'", "once")} throws AssertionError") { - expect { - fluentHelloWorld.containsExactlyFun(1, 'h') - }.toThrow { messageContains("$exactly: 1", "$valueWithIndent: 'h'") } - } - test("${containsExactlyIgnoringCase("'h'", "once")} throws AssertionError") { - fluentHelloWorld.containsExactlyIgnoringCaseFun(1, 'h') - } - - test("${containsExactlyTest("'H', 'E'", "once")} throws AssertionError mentioning only 'E'") { - expect { - fluentHelloWorld.containsExactlyFun(1, 'H', 'E') - }.toThrow { - message { - contains("$exactly: 1", "$valueWithIndent: 'E'") - containsNot("$valueWithIndent: 'H'") - } - } - } - test("${containsExactlyIgnoringCase("'H', 'E'", "once")} throws AssertionError") { - fluentHelloWorld.containsExactlyIgnoringCaseFun(1, 'H', 'E') - } - - test("${containsExactlyTest("'E', 'H'", "once")} throws AssertionError mentioning only 'E'") { - expect { - fluentHelloWorld.containsExactlyFun(1, 'E', 'H') - }.toThrow { - message { - contains("$exactly: 1", "$valueWithIndent: 'E'") - containsNot("$valueWithIndent: 'H'") - } - } - } - test("${containsExactlyIgnoringCase("'E', 'H'", "once")} throws AssertionError") { - fluentHelloWorld.containsExactlyIgnoringCaseFun(1, 'E', 'H') - } - - test("${containsExactlyTest("'H' and 'E' and 'w'", "once")} throws AssertionError") { - expect { - fluentHelloWorld.containsExactlyFun(1, 'H', 'E', 'w') - }.toThrow { messageContains(exactly, 'E', 'w') } - } - test("${containsExactlyIgnoringCase("'H' and 'E' and 'w'", "once")} throws AssertionError") { - fluentHelloWorld.containsExactlyIgnoringCaseFun(1, 'H', 'E', 'w') - } - } - - group("multiple occurrences of the search string") { - test("${containsExactlyTest("'o'", "once")} throws AssertionError") { - expect { - fluentHelloWorld.containsExactlyFun(1, 'o') - }.toThrow { messageContains("$exactly: 1", "$valueWithIndent: 'o'") } - } - test("${containsExactlyTest("'o'", "twice")} does not throw") { - fluentHelloWorld.containsExactlyFun(2, 'o') - } - test("${containsExactlyIgnoringCase("'o'", "twice")} throws") { - expect { - fluentHelloWorld.containsExactlyIgnoringCaseFun(2, 'o') - }.toThrow { - message { - contains( - "$rootBulletPoint$containsIgnoringCase: $separator" + - "$valueWithIndent: 'o'", - "$numberOfOccurrences: 3$separator" - ) - endsWith("$exactly: 2") - } - } - } - - test("${containsExactlyTest("'o'", "3 times")} throws AssertionError and message contains both, how many times we expected (3) and how many times it actually contained 'o' (2)") { - expect { - fluentHelloWorld.containsExactlyFun(3, 'o') - }.toThrow { - message { - contains( - "$rootBulletPoint$containsDescr: $separator" + - "$valueWithIndent: 'o'", - "$numberOfOccurrences: 2$separator" - ) - endsWith("$exactly: 3") - } - } - } - test("${containsExactlyIgnoringCase("'o'", "3 times")} does not throw") { - fluentHelloWorld.containsExactlyIgnoringCaseFun(3, 'o') - } - test("${containsExactlyIgnoringCase("'o' and 'o'", "3 times")} does not throw") { - fluentHelloWorld.containsExactlyIgnoringCaseFun(3, 'o', 'o') - } - - test("${containsExactlyTest("'o' and 'l'", "twice")} throws AssertionError") { - expect { - fluentHelloWorld.containsExactlyFun(2, 'o', 'l') - }.toThrow { - message { - contains( - "$rootBulletPoint$containsDescr: $separator" + - "$valueWithIndent: 'l'", - "$numberOfOccurrences: 3$separator" - ) - endsWith("$exactly: 2") - containsNot("$valueWithIndent: 'o'") - } - } - } - test("${containsExactlyTest("'l'", "3 times")} does not throw") { - fluentHelloWorld.containsExactlyFun(3, 'l') - } - test("${containsExactlyTest("'o' and 'l'", "3 times")} throws AssertionError and message contains both, how many times we expected (3) and how many times it actually contained 'o' (2)") { - expect { - fluentHelloWorld.containsExactlyFun(3, 'o', 'l') - }.toThrow { - message { - contains( - "$rootBulletPoint$containsDescr: $separator" + - "$valueWithIndent: 'o'", - "$numberOfOccurrences: 2$separator" - ) - endsWith("$exactly: 3") - containsNot("$valueWithIndent: 'l'") - } - } - } - } - } - } -}) diff --git a/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/CharSequenceContainsNotAssertionsSpec.kt b/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/CharSequenceContainsNotAssertionsSpec.kt deleted file mode 100644 index db69d3685..000000000 --- a/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/CharSequenceContainsNotAssertionsSpec.kt +++ /dev/null @@ -1,153 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") - -package ch.tutteli.atrium.spec.integration - -import ch.tutteli.atrium.api.cc.en_GB.messageContains -import ch.tutteli.atrium.api.cc.en_GB.toThrow -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.spec.AssertionVerbFactory -import ch.tutteli.atrium.spec.describeFun -import ch.tutteli.atrium.translations.DescriptionBasic -import ch.tutteli.atrium.translations.DescriptionCharSequenceAssertion -import org.jetbrains.spek.api.dsl.SpecBody -import org.jetbrains.spek.api.dsl.context -import org.jetbrains.spek.api.include - -@Deprecated("Switch from Assert to Expect and use Spec from atrium-specs-common; will be removed with 1.0.0") -abstract class CharSequenceContainsNotAssertionsSpec( - verbs: AssertionVerbFactory, - containsNotTriple: Triple String, Assert.(Any, Array) -> Assert>, - containsNotIgnoringCaseTriple: Triple String, Assert.(Any, Array) -> Assert>, - rootBulletPoint: String, - listBulletPoint: String, - describePrefix: String = "[Atrium] " -) : CharSequenceContainsSpecBase({ - - include(@Suppress("DEPRECATION") object : SubjectLessAssertionSpec(describePrefix, - containsNotTriple.first to mapToCreateAssertion { containsNotTriple.third(this, 2.3, arrayOf()) }, - containsNotIgnoringCaseTriple.first to mapToCreateAssertion { containsNotIgnoringCaseTriple.third(this, 2.3, arrayOf()) } - ) {}) - - include(@Suppress("DEPRECATION") object : CheckingAssertionSpec(verbs, describePrefix, - checkingTriple(containsNotTriple.first, { containsNotTriple.third(this, 2.3, arrayOf()) }, "not in there", "2.3,2.3,2.3"), - checkingTriple(containsNotIgnoringCaseTriple.first, { containsNotIgnoringCaseTriple.third(this, 2.3, arrayOf()) }, "not in there", "2.3,2.3,2.3") - ) {}) - - fun describeFun(vararg funName: String, body: SpecBody.() -> Unit) - = describeFun(describePrefix, funName, body = body) - - val assert: (CharSequence) -> Assert = verbs::checkImmediately - val expect = verbs::checkException - val fluent = assert(text) - val fluentHelloWorld = assert(helloWorld) - - val (containsNot, containsNotTest, containsNotFunArr) = containsNotTriple - fun Assert.containsNotFun(a: Any, vararg aX: Any) - = containsNotFunArr(a, aX) - - val (_, containsNotIgnoringCaseTest, containsNotIgnoringCaseFunArr) = containsNotIgnoringCaseTriple - fun Assert.containsNotIgnoringCaseFun(a: Any, vararg aX: Any) - = containsNotIgnoringCaseFunArr(a, aX) - - val containsNotDescr = DescriptionCharSequenceAssertion.CONTAINS_NOT.getDefault() - val containsNotIgnoringCaseDescr = String.format(DescriptionCharSequenceAssertion.IGNORING_CASE.getDefault(), containsNotDescr) - - val indentRootBulletPoint = " ".repeat(rootBulletPoint.length) - val valueWithIndent = "$indentRootBulletPoint$listBulletPoint$value" - - describeFun(containsNot) { - - context("throws an $illegalArgumentException") { - - test("if an object is passed to $containsNotTest as first expected") { - expect { - fluent.containsNotFun(fluent) - }.toThrow { messageContains("CharSequence", "Number", "Char") } - } - test("if an object is passed to $containsNotTest as second expected") { - expect { - fluent.containsNotFun("that's fine", fluent) - }.toThrow { messageContains("CharSequence", "Number", "Char") } - } - test("if an object is passed to $containsNotIgnoringCaseTest as first expected") { - expect { - fluent.containsNotIgnoringCaseFun(fluent) - }.toThrow { messageContains("CharSequence", "Number", "Char") } - } - test("if an object is passed to $containsNotIgnoringCaseTest as second expected") { - expect { - fluent.containsNotIgnoringCaseFun("that's fine", fluent) - }.toThrow { messageContains("CharSequence", "Number", "Char") } - } - } - - context("text '$helloWorld'") { - group("happy case with $containsNot once") { - test("${containsNotTest("'h'")} does not throw") { - fluentHelloWorld.containsNotFun('h') - } - test("${containsNotTest("'h' and 'E' and 'w'")} does not throw") { - fluentHelloWorld.containsNotFun('h', 'E', 'w') - } - test("${containsNotTest("'w' and 'h' and 'E'")} does not throw") { - fluentHelloWorld.containsNotFun('w', 'h', 'E') - } - test("${containsNotIgnoringCaseTest("'x' and 'y' and 'z'")} does not throw") { - fluentHelloWorld.containsNotIgnoringCaseFun('x', 'y', 'z') - } - } - - group("failing cases; search string at different positions") { - test("${containsNotTest("'l'")} throws AssertionError") { - expect { - fluentHelloWorld.containsNotFun('l') - }.toThrow { - messageContains( - "$rootBulletPoint$containsNotDescr: $separator" + - "$valueWithIndent: 'l'", - "$numberOfOccurrences: 3", - "${DescriptionBasic.IS.getDefault()}: 0" - ) - } - } - test("${containsNotTest("'H', 'l'")} throws AssertionError") { - expect { - fluentHelloWorld.containsNotFun('H', 'l') - }.toThrow { messageContains("$valueWithIndent: 'l'") } - } - test("${containsNotTest("'l', 'H'")} once throws AssertionError") { - expect { - fluentHelloWorld.containsNotFun('l', 'H') - }.toThrow { messageContains("$valueWithIndent: 'l'") } - } - test("${containsNotIgnoringCaseTest("'H', 'l'")} throws AssertionError") { - expect { - fluentHelloWorld.containsNotIgnoringCaseFun('H', 'l') - }.toThrow { - messageContains( - "$rootBulletPoint$containsNotIgnoringCaseDescr: $separator" + - "$valueWithIndent: 'H'", - "$valueWithIndent: 'l'" - ) - } - } - test("${containsNotIgnoringCaseTest("'L', 'H'")} throws AssertionError") { - expect { - fluentHelloWorld.containsNotIgnoringCaseFun('L', 'H') - }.toThrow { messageContains('H', 'L') } - } - test("${containsNotTest("'o', 'E', 'w', 'l'")} throws AssertionError") { - expect { - fluentHelloWorld.containsNotFun('o', 'E', 'w', 'l') - }.toThrow { messageContains('o', 'l') } - } - test("${containsNotIgnoringCaseTest("'o', 'E', 'w', 'l'")} throws AssertionError") { - expect { - fluentHelloWorld.containsNotIgnoringCaseFun('o', 'E', 'w', 'l') - }.toThrow { messageContains('o', 'E', "w", 'l') } - } - } - } - } -}) diff --git a/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/CharSequenceContainsNotOrAtMostAssertionsSpec.kt b/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/CharSequenceContainsNotOrAtMostAssertionsSpec.kt deleted file mode 100644 index 5b5a7a2bc..000000000 --- a/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/CharSequenceContainsNotOrAtMostAssertionsSpec.kt +++ /dev/null @@ -1,192 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") - -package ch.tutteli.atrium.spec.integration - -import ch.tutteli.atrium.api.cc.en_GB.* -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.spec.AssertionVerbFactory -import ch.tutteli.atrium.spec.describeFun -import ch.tutteli.atrium.translations.DescriptionCharSequenceAssertion.AT_MOST -import org.jetbrains.spek.api.dsl.SpecBody -import org.jetbrains.spek.api.dsl.context -import org.jetbrains.spek.api.include - -@Deprecated("Switch from Assert to Expect and use Spec from atrium-specs-common; will be removed with 1.0.0") -abstract class CharSequenceContainsNotOrAtMostAssertionsSpec( - verbs: AssertionVerbFactory, - containsNotOrAtMostTriple: Triple String, Assert.(Int, Any, Array) -> Assert>, - containsNotOrAtMostIgnoringCaseTriple: Triple String, Assert.(Int, Any, Array) -> Assert>, - containsNotPair: Pair String>, - rootBulletPoint: String, - listBulletPoint: String, - describePrefix: String = "[Atrium] " -) : CharSequenceContainsSpecBase({ - - include(@Suppress("DEPRECATION") object : SubjectLessAssertionSpec(describePrefix, - containsNotOrAtMostTriple.first to mapToCreateAssertion { containsNotOrAtMostTriple.third(this, 2, 2.3, arrayOf()) }, - containsNotOrAtMostIgnoringCaseTriple.first to mapToCreateAssertion { containsNotOrAtMostIgnoringCaseTriple.third(this, 2, 2.3, arrayOf()) } - ) {}) - - include(@Suppress("DEPRECATION") object : CheckingAssertionSpec(verbs, describePrefix, - checkingTriple(containsNotOrAtMostTriple.first, { containsNotOrAtMostTriple.third(this, 2, 2.3, arrayOf()) }, "not in there", "2.3,2.3,2.3"), - checkingTriple(containsNotOrAtMostIgnoringCaseTriple.first, { containsNotOrAtMostIgnoringCaseTriple.third(this, 2, 2.3, arrayOf()) }, "not in there", "2.3,2.3,2.3") - ) {}) - - fun describeFun(vararg funName: String, body: SpecBody.() -> Unit) - = describeFun(describePrefix, funName, body = body) - - val assert: (CharSequence) -> Assert = verbs::checkImmediately - val expect = verbs::checkException - val fluent = assert(text) - val fluentHelloWorld = assert(helloWorld) - - val (containsNotOrAtMost, containsNotOrAtMostTest, containsNotOrAtMostFunArr) = containsNotOrAtMostTriple - fun Assert.containsNotOrAtMostFun(atLeast: Int, a: Any, vararg aX: Any) - = containsNotOrAtMostFunArr(atLeast, a, aX) - - val (_, containsNotOrAtMostIgnoringCase, containsNotOrAtMostIgnoringCaseFunArr) = containsNotOrAtMostIgnoringCaseTriple - fun Assert.containsNotOrAtMostIgnoringCaseFun(atLeast: Int, a: Any, vararg aX: Any) - = containsNotOrAtMostIgnoringCaseFunArr(atLeast, a, aX) - - val (containsNot, errorMsgContainsNot) = containsNotPair - - val indentRootBulletPoint = " ".repeat(rootBulletPoint.length) - val valueWithIndent = "$indentRootBulletPoint$listBulletPoint$value" - - describeFun(containsNotOrAtMost) { - - context("throws an $illegalArgumentException") { - test("for not at all or at most -1 -- only positive numbers") { - expect { - fluent.containsNotOrAtMostFun(-1, "") - }.toThrow { messageContains("positive number", -1) } - } - test("for not at all or at most 0 -- points to $containsNot") { - expect { - fluent.containsNotOrAtMostFun(0, "") - }.toThrow { message { toBe(errorMsgContainsNot(0)) } } - } - test("if an object is passed as first expected") { - expect { - fluent.containsNotOrAtMostFun(1, fluent) - }.toThrow { messageContains("CharSequence", "Number", "Char") } - } - test("if an object is passed as second expected") { - expect { - fluent.containsNotOrAtMostFun(1, "that's fine", fluent) - }.toThrow { messageContains("CharSequence", "Number", "Char") } - } - } - - context("text '$helloWorld'") { - group("happy case with $containsNotOrAtMost once") { - test("${containsNotOrAtMostTest("'H'", "once")} does not throw") { - fluentHelloWorld.containsNotOrAtMostFun(1, 'H') - } - test("${containsNotOrAtMostTest("'H' and 'e' and 'W'", "once")} does not throw") { - fluentHelloWorld.containsNotOrAtMostFun(1, 'H', 'e', 'W') - } - test("${containsNotOrAtMostTest("'W' and 'H' and 'e'", "once")} does not throw") { - fluentHelloWorld.containsNotOrAtMostFun(1, 'W', 'H', 'e') - } - test("${containsNotOrAtMostTest("'x' and 'y' and 'z'", "twice")} does not throw") { - fluentHelloWorld.containsNotOrAtMostFun(2, 'x', 'y', 'z') - } - test("${containsNotOrAtMostIgnoringCase("'x' and 'y' and 'z'", "twice")} does not throw") { - fluentHelloWorld.containsNotOrAtMostIgnoringCaseFun(2, 'x', 'y', 'z') - } - } - - group("failing cases; search string at different positions") { - test("${containsNotOrAtMostTest("'l'", "once")} throws AssertionError") { - expect { - fluentHelloWorld.containsNotOrAtMostFun(1, 'l') - }.toThrow { messageContains("$atMost: 1", "$valueWithIndent: 'l'") } - } - test("${containsNotOrAtMostTest("'H', 'l'", "once")} throws AssertionError mentioning only 'l'") { - expect { - fluentHelloWorld.containsNotOrAtMostFun(1, 'H', 'l') - }.toThrow { - message { - contains("$atMost: 1", "$valueWithIndent: 'l'") - containsNot(atLeast, "$valueWithIndent: 'H'") - } - } - } - test("${containsNotOrAtMostTest("'l', 'H'", "once")} once throws AssertionError mentioning only 'l'") { - expect { - fluentHelloWorld.containsNotOrAtMostFun(1, 'l', 'H') - }.toThrow { - message { - contains("$atMost: 1", "$valueWithIndent: 'l'") - containsNot(atLeast, "$valueWithIndent: 'H'") - } - } - } - test("${containsNotOrAtMostTest("'o', 'E', 'W', 'l'", "once")} throws AssertionError mentioning 'l' and 'o'") { - expect { - fluentHelloWorld.containsNotOrAtMostIgnoringCaseFun(1, 'o', 'E', 'W', 'l') - }.toThrow { - message { - contains("$atMost: 1", "$valueWithIndent: 'l'", "$valueWithIndent: 'o'") - containsNot(atLeast, "$valueWithIndent: 'E'", "$valueWithIndent: 'W'") - } - } - } - } - - group("multiple occurrences of the search string") { - test("${containsNotOrAtMostTest("'o'", "once")} throws AssertionError and message contains both, how many times we expected (1) and how many times it actually contained 'o' (2)") { - expect { - fluentHelloWorld.containsNotOrAtMostFun(1, 'o') - }.toThrow { - message { - contains( - "$rootBulletPoint$containsDescr: $separator" + - "$valueWithIndent: 'o'", - "$numberOfOccurrences: 2$separator" - ) - endsWith("$atMost: 1") - } - } - } - - test("${containsNotOrAtMostTest("'o'", "twice")} does not throw") { - fluentHelloWorld.containsNotOrAtMostFun(2, 'o') - } - test("${containsNotOrAtMostIgnoringCase("'o'", "twice")} throws AssertionError") { - expect { - fluentHelloWorld.containsNotOrAtMostIgnoringCaseFun(2, 'o') - }.toThrow { messageContains(AT_MOST.getDefault()) } - } - - test("${containsNotOrAtMostTest("'o'", "3 times")} does not throw") { - fluentHelloWorld.containsNotOrAtMostFun(3, 'o') - } - test("${containsNotOrAtMostTest("'o' and 'l'", "twice")} throws AssertionError and message contains both, how many times we expected (2) and how many times it actually contained 'l' (3)") { - expect { - fluentHelloWorld.containsNotOrAtMostFun(2, 'o', 'l') - }.toThrow { - message { - contains( - "$rootBulletPoint$containsDescr: $separator" + - "$valueWithIndent: 'l'", - "$numberOfOccurrences: 3$separator" - ) - endsWith("$atMost: 2") - containsNot("$valueWithIndent: 'o'") - } - } - } - test("${containsNotOrAtMostTest("'l'", "3 times")} does not throw") { - fluentHelloWorld.containsNotOrAtMostFun(3, 'l') - } - test("${containsNotOrAtMostTest("'o' and 'l'", "3 times")} does not throw") { - fluentHelloWorld.containsNotOrAtMostFun(3, 'o', 'l') - } - - } - } - } -}) diff --git a/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/CharSequenceContainsRegexAssertionsSpec.kt b/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/CharSequenceContainsRegexAssertionsSpec.kt deleted file mode 100644 index b8307ef77..000000000 --- a/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/CharSequenceContainsRegexAssertionsSpec.kt +++ /dev/null @@ -1,218 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") - -package ch.tutteli.atrium.spec.integration - -import ch.tutteli.atrium.api.cc.en_GB.contains -import ch.tutteli.atrium.api.cc.en_GB.message -import ch.tutteli.atrium.api.cc.en_GB.toThrow -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.spec.AssertionVerbFactory -import ch.tutteli.atrium.spec.describeFun -import org.jetbrains.spek.api.dsl.SpecBody -import org.jetbrains.spek.api.dsl.context -import org.jetbrains.spek.api.include -import java.util.regex.PatternSyntaxException - -@Deprecated("Switch from Assert to Expect and use Spec from atrium-specs-common; will be removed with 1.0.0") -abstract class CharSequenceContainsRegexAssertionsSpec( - verbs: AssertionVerbFactory, - containsRegex: String, - containsAtLeastTriple: Triple String, Assert.(Int, String, Array) -> Assert>, - containsAtLeastIgnoringCaseTriple: Triple String, Assert.(Int, String, Array) -> Assert>, - //Usually the shortcut is tested individually on a level lower and not expected as we did it here (search for ShortcutSpec or similar) - containsShortcutTriple: Triple String, Assert.(String, Array) -> Assert>, - containsAtMostTriple: Triple String, Assert.(Int, String, Array) -> Assert>, - containsAtMostIgnoringCaseTriple: Triple String, Assert.(Int, String, Array) -> Assert>, - rootBulletPoint: String, - listBulletPoint: String, - describePrefix: String = "[Atrium] " -) : CharSequenceContainsSpecBase({ - - include(@Suppress("DEPRECATION") object : SubjectLessAssertionSpec(describePrefix, - containsAtLeastTriple.first to mapToCreateAssertion { containsAtLeastTriple.third(this, 2, "a|b", arrayOf()) }, - containsAtLeastIgnoringCaseTriple.first to mapToCreateAssertion { containsAtLeastIgnoringCaseTriple.third(this, 2, "a|b", arrayOf()) }, - containsShortcutTriple.first to mapToCreateAssertion { containsShortcutTriple.third(this, "a|b", arrayOf()) }, - containsAtMostTriple.first to mapToCreateAssertion { containsAtMostTriple.third(this, 2, "a|b", arrayOf()) }, - containsAtMostIgnoringCaseTriple.first to mapToCreateAssertion { containsAtMostIgnoringCaseTriple.third(this, 2, "a|b", arrayOf()) } - ) {}) - - include(@Suppress("DEPRECATION") object : CheckingAssertionSpec(verbs, describePrefix, - checkingTriple(containsAtLeastTriple.first, { containsAtLeastTriple.third(this, 2, "a|b", arrayOf()) }, "a, b", "a"), - checkingTriple(containsAtLeastIgnoringCaseTriple.first, { containsAtLeastIgnoringCaseTriple.third(this, 2, "a|b", arrayOf()) }, "A, B", "a"), - checkingTriple(containsShortcutTriple.first, { containsShortcutTriple.third(this, "a|b", arrayOf()) }, "a, b", "c"), - checkingTriple(containsAtMostTriple.first, { containsAtMostTriple.third(this, 2, "a|b", arrayOf()) }, "a", "a,ba"), - checkingTriple(containsAtMostIgnoringCaseTriple.first, { containsAtMostIgnoringCaseTriple.third(this, 2, "a|b", arrayOf()) }, "A", "bbb") - ) {}) - - fun describeFun(vararg funName: String, body: SpecBody.() -> Unit) - = describeFun(describePrefix, funName, body = body) - - val assert: (CharSequence) -> Assert = verbs::checkImmediately - val expect = verbs::checkException - - val text = "Hello my name is Robert" - val hello = "[hH][ea]llo" - val roberto = "Roberto?" - val fluent = assert(text) - - val (containsAtLeast, containsAtLeastTest, containsAtLeastFunArr) = containsAtLeastTriple - fun Assert.containsAtLeastFun(atLeast: Int, a: String, vararg aX: String) - = containsAtLeastFunArr(atLeast, a, aX) - - val (containsAtLeastIgnoringCase, containsAtLeastIgnoringCaseTest, containsAtLeastIgnoringCaseFunArr) = containsAtLeastIgnoringCaseTriple - fun Assert.containsAtLeastIgnoringCaseFun(atLeast: Int, a: String, vararg aX: String) - = containsAtLeastIgnoringCaseFunArr(atLeast, a, aX) - - - val (containsShortcut, containsShortcutTest, containsShortcutLeastFunArr) = containsShortcutTriple - fun Assert.containsShortcutFun(a: String, vararg aX: String) - = containsShortcutLeastFunArr(a, aX) - - val (containsAtMost, containsAtMostTest, containsAtMostFunArr) = containsAtMostTriple - fun Assert.containsAtMostFun(atLeast: Int, a: String, vararg aX: String) - = containsAtMostFunArr(atLeast, a, aX) - - val (containsAtMostIgnoringCase, containsAtMostIgnoringCaseTest, containsAtMostIgnoringCaseFunArr) = containsAtMostIgnoringCaseTriple - fun Assert.containsAtMostIgnoringCaseFun(atLeast: Int, a: String, vararg aX: String) - = containsAtMostIgnoringCaseFunArr(atLeast, a, aX) - - val indentRootBulletPoint = " ".repeat(rootBulletPoint.length) - val regexWithIndent = "$indentRootBulletPoint$listBulletPoint$stringMatchingRegex" - - describeFun(containsRegex) { - context("throws an ${PatternSyntaxException::class.simpleName}") { - test("if an erroneous pattern is passed to `$containsAtLeast` as first argument") { - expect { - assert("a").containsAtLeastFun(1, "notA(validPattern") - }.toThrow{} - } - test("if an erroneous pattern is passed to `$containsAtLeast` as second argument") { - expect { - assert("a").containsAtLeastFun(1, "h(a|e)llo", "notA(validPattern") - }.toThrow{} - } - test("if an erroneous pattern is passed to `$containsAtLeastIgnoringCase` as first argument") { - expect { - assert("a").containsAtLeastIgnoringCaseFun(1, "notA(validPattern") - }.toThrow{} - } - test("if an erroneous pattern is passed to `$containsAtLeastIgnoringCase` as second argument") { - expect { - assert("a").containsAtLeastIgnoringCaseFun(1, "h(a|e)llo", "notA(validPattern") - }.toThrow{} - } - - test("if an erroneous pattern is passed to `$containsShortcut` as first argument") { - expect { - assert("a").containsShortcutFun("notA(validPattern") - }.toThrow{} - } - test("if an erroneous pattern is passed to `$containsShortcut` as second argument") { - expect { - assert("a").containsShortcutFun("h(a|e)llo", "notA(validPattern") - }.toThrow{} - } - - test("if an erroneous pattern is passed to `$containsAtMost` as first argument") { - expect { - assert("a").containsAtMostFun(2, "notA(validPattern") - }.toThrow{} - } - test("if an erroneous pattern is passed to `$containsAtMost` as second argument") { - expect { - assert("a").containsAtMostFun(2, "h(a|e)llo", "notA(validPattern") - }.toThrow{} - } - - test("if an erroneous pattern is passed to `$containsAtMostIgnoringCase` as first argument") { - expect { - assert("a").containsAtMostIgnoringCaseFun(2, "notA(validPattern") - }.toThrow{} - } - test("if an erroneous pattern is passed to `$containsAtMostIgnoringCase` as second argument") { - expect { - assert("a").containsAtMostIgnoringCaseFun(2, "h(a|e)llo", "notA(validPattern") - }.toThrow{} - } - } - - context("text $text") { - test("${containsAtLeastTest("'$hello'", "once")} does not throw") { - fluent.containsAtLeastFun(1, hello) - } - test("${containsAtLeastTest("'$hello', '$hello' and '$hello'", "once")} does not throw") { - fluent.containsAtLeastFun(1, hello, hello, hello) - } - test("${containsAtLeastTest("'$hello' and '$roberto'", "once")} does not throw") { - fluent.containsAtLeastFun(1, hello, roberto) - } - test("${containsAtLeastTest("'${roberto.toLowerCase()}'", "once")} throws AssertionError") { - expect { - fluent.containsAtLeastFun(1, roberto.toLowerCase()) - }.toThrow { - message { - contains( - "$rootBulletPoint$containsDescr: $separator" + - "$regexWithIndent: ${roberto.toLowerCase()}", - "$numberOfOccurrences: 0", - "$atLeast: 1" - ) - } - } - } - test("${containsAtLeastIgnoringCaseTest("'${roberto.toLowerCase()}'", "once")} does not throw") { - fluent.containsAtLeastIgnoringCaseFun(1, roberto.toLowerCase()) - } - - test("${containsShortcutTest("'$hello'", "once")} does not throw") { - fluent.containsShortcutFun(hello) - } - test("${containsShortcutTest("'$hello', '$hello' and '$hello'", "once")} does not throw") { - fluent.containsShortcutFun(hello, hello, hello) - } - test("${containsShortcutTest("'$hello' and '$roberto'", "once")} does not throw") { - fluent.containsShortcutFun(hello, roberto) - } - - test("${containsAtMostTest("'[a-z]'", "17 times")} does not throw") { - fluent.containsAtMostFun(17, "[a-z]") - } - test("${containsAtMostIgnoringCaseTest("'[a-z]'", "19 times")} does not throw") { - fluent.containsAtMostIgnoringCaseFun(19, "[a-z]") - } - test("${containsAtMostIgnoringCaseTest("'[a-z]' and '[A-Z]'", "19 times")} does not throw") { - fluent.containsAtMostIgnoringCaseFun(19, "[a-z]", "[A-Z]") - } - - test("${containsAtMostTest("'[a-z]'", "16 times")} throws AssertionError") { - expect { - fluent.containsAtMostFun(16, "[a-z]") - }.toThrow { - message { - contains( - "$rootBulletPoint$containsDescr: $separator" + - "$regexWithIndent: [a-z]", - "$numberOfOccurrences: 17", - "$atMost: 16" - ) - } - } - } - test("${containsAtMostIgnoringCaseTest("'[a-z]'", "18 times")} throws AssertionError") { - expect { - fluent.containsAtMostIgnoringCaseFun(18, "[a-z]") - }.toThrow { - message { - contains( - "$rootBulletPoint$containsIgnoringCase: $separator" + - "$regexWithIndent: \"[a-z]\"", - "$numberOfOccurrences: 19", - "$atMost: 18" - ) - } - } - } - } - } -}) diff --git a/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/CharSequenceContainsSpecBase.kt b/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/CharSequenceContainsSpecBase.kt deleted file mode 100644 index 573e5aebc..000000000 --- a/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/CharSequenceContainsSpecBase.kt +++ /dev/null @@ -1,29 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") - -package ch.tutteli.atrium.spec.integration - -import ch.tutteli.atrium.translations.DescriptionCharSequenceAssertion -import org.jetbrains.spek.api.Spek -import org.jetbrains.spek.api.dsl.Spec - -@Deprecated("Switch from Assert to Expect and use Spec from atrium-specs-common; will be removed with 1.0.0") -abstract class CharSequenceContainsSpecBase(spec: Spec.() -> Unit) : Spek(spec) { - - companion object { - const val text = "Hello my name is Robert" - const val helloWorld = "Hello World, I am Oskar" - - val containsDescr = DescriptionCharSequenceAssertion.CONTAINS.getDefault() - val containsIgnoringCase = String.format(DescriptionCharSequenceAssertion.IGNORING_CASE.getDefault(), DescriptionCharSequenceAssertion.CONTAINS.getDefault()) - val numberOfOccurrences = DescriptionCharSequenceAssertion.NUMBER_OF_OCCURRENCES.getDefault() - val value = DescriptionCharSequenceAssertion.VALUE.getDefault() - val stringMatchingRegex = DescriptionCharSequenceAssertion.STRING_MATCHING_REGEX.getDefault() - - val atLeast = DescriptionCharSequenceAssertion.AT_LEAST.getDefault() - val atMost = DescriptionCharSequenceAssertion.AT_MOST.getDefault() - - val illegalArgumentException = IllegalArgumentException::class.simpleName - val separator = System.getProperty("line.separator")!! - } -} diff --git a/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/CheckingAssertionSpec.kt b/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/CheckingAssertionSpec.kt deleted file mode 100644 index 821bcd1bc..000000000 --- a/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/CheckingAssertionSpec.kt +++ /dev/null @@ -1,44 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") -package ch.tutteli.atrium.spec.integration - -import ch.tutteli.atrium.api.cc.en_GB.toBe -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.CheckingAssertionPlant -import ch.tutteli.atrium.domain.builders.AssertImpl -import ch.tutteli.atrium.spec.AssertionVerbFactory -import org.jetbrains.spek.api.Spek - -@Deprecated("Switch from Assert to Expect and use Spec from atrium-specs-common; will be removed with 1.0.0") -abstract class CheckingAssertionSpec( - verbs: AssertionVerbFactory, - groupPrefix: String, - vararg assertionCreator: Triple.() -> Unit, Pair> -) : Spek({ - - group("${groupPrefix}assertion function can be added to ${CheckingAssertionPlant::class.simpleName}") { - - assertionCreator.forEach { (name, createAssertion, holdingAndFailingSubject) -> - val (holdingSubject, failingSubject) = holdingAndFailingSubject - group("fun `$name`") { - test("assertion which holds -- does not throw, returns `true`") { - @Suppress("DEPRECATION") - val checkingPlant = AssertImpl.coreFactory.newCheckingPlant { holdingSubject } - checkingPlant.createAssertion() - verbs.checkImmediately(checkingPlant.allAssertionsHold()).toBe(true) - } - - test("assertion which does not hold -- does not throw, returns `false`") { - @Suppress("DEPRECATION") - val checkingPlant = AssertImpl.coreFactory.newCheckingPlant { failingSubject } - checkingPlant.createAssertion() - verbs.checkImmediately(checkingPlant.allAssertionsHold()).toBe(false) - } - } - } - } -}) - -@Deprecated("Switch from Assert to Expect and use checkingTriple from atrium-specs-common; will be removed with 1.0.0") -fun checkingTriple(name: String, createAssertion: Assert.() -> Unit, holdingSubject: T, failingSubject: T) - = Triple(name, createAssertion, holdingSubject to failingSubject) diff --git a/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/CollectionAssertionsSpec.kt b/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/CollectionAssertionsSpec.kt deleted file mode 100644 index 58884c509..000000000 --- a/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/CollectionAssertionsSpec.kt +++ /dev/null @@ -1,100 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") - - -package ch.tutteli.atrium.spec.integration - -import ch.tutteli.atrium.api.cc.en_GB.messageContains -import ch.tutteli.atrium.api.cc.en_GB.toThrow -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.spec.AssertionVerbFactory -import ch.tutteli.atrium.spec.describeFun -import ch.tutteli.atrium.translations.DescriptionBasic.* -import ch.tutteli.atrium.translations.DescriptionCollectionAssertion -import org.jetbrains.spek.api.Spek -import org.jetbrains.spek.api.dsl.SpecBody -import org.jetbrains.spek.api.dsl.context -import org.jetbrains.spek.api.dsl.it -import org.jetbrains.spek.api.include - -@Deprecated("Switch from Assert to Expect and use Spec from atrium-specs-common; will be removed with 1.0.0") -abstract class CollectionAssertionsSpec( - verbs: AssertionVerbFactory, - hasSizePair: Pair>.(Int) -> Assert>>, - isEmptyPair: Pair>.() -> Assert>>, - isNotEmptyPair: Pair>.() -> Assert>>, - describePrefix: String = "[Atrium] " -) : Spek({ - - include(@Suppress("DEPRECATION") object : SubjectLessAssertionSpec>(describePrefix, - hasSizePair.first to mapToCreateAssertion { hasSizePair.second(this, 2) }, - isEmptyPair.first to mapToCreateAssertion { isEmptyPair.second(this) }, - isNotEmptyPair.first to mapToCreateAssertion { isNotEmptyPair.second(this) } - ) {}) - - include(@Suppress("DEPRECATION") object : CheckingAssertionSpec>(verbs, describePrefix, - checkingTriple(hasSizePair.first, { hasSizePair.second(this, 1) }, listOf(1) as Collection, listOf(1, 2)), - checkingTriple(isEmptyPair.first, { isEmptyPair.second(this) }, listOf() as Collection, listOf(1, 2)), - checkingTriple(isNotEmptyPair.first, { isNotEmptyPair.second(this) }, listOf(2) as Collection, listOf()) - ) {}) - - fun describeFun(vararg funName: String, body: SpecBody.() -> Unit) = describeFun(describePrefix, funName, body = body) - - val assert: (List) -> Assert> = verbs::checkImmediately - val expect = verbs::checkException - val fluent = assert(listOf(1, 2)) - - val (hasSize, hasSizeFun) = hasSizePair - val (isEmpty, isEmptyFun) = isEmptyPair - val (isNotEmpty, isNotEmptyFun) = isNotEmptyPair - - val isDescr = IS.getDefault() - val isNotDescr = IS_NOT.getDefault() - val empty = DescriptionCollectionAssertion.EMPTY.getDefault() - - describeFun(hasSize) { - context("collection with two entries") { - test("expect 2 does not throw") { - fluent.hasSizeFun(2) - } - test("expect 1 throws an AssertionError") { - expect { - fluent.hasSizeFun(1) - }.toThrow { - messageContains("size: 2", TO_BE.getDefault() + ": 1") - } - } - test("expect 3 throws an AssertionError") { - expect { - fluent.hasSizeFun(3) - }.toThrow { - messageContains("size: 2", TO_BE.getDefault() + ": 3") - } - } - } - } - - describeFun(isEmpty) { - it("does not throw if a collection is empty") { - assert(listOf()).isEmptyFun() - } - - it("throws an AssertionError if a collection is not empty") { - expect { - assert(listOf(1, 2)).isEmptyFun() - }.toThrow { messageContains("$isDescr: $empty") } - } - } - - describeFun(isNotEmpty) { - it("does not throw if a collection is not empty") { - assert(listOf(1)).isNotEmptyFun() - } - - it("throws an AssertionError if a collection is empty") { - expect { - assert(listOf()).isNotEmptyFun() - }.toThrow { messageContains("$isNotDescr: $empty") } - } - } -}) diff --git a/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/CollectionFeatureAssertionsSpec.kt b/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/CollectionFeatureAssertionsSpec.kt deleted file mode 100644 index 9fc9ccef2..000000000 --- a/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/CollectionFeatureAssertionsSpec.kt +++ /dev/null @@ -1,80 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") - -package ch.tutteli.atrium.spec.integration - -import ch.tutteli.atrium.api.cc.en_GB.* -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.spec.AssertionVerbFactory -import ch.tutteli.atrium.spec.describeFun -import org.jetbrains.spek.api.Spek -import org.jetbrains.spek.api.dsl.SpecBody -import org.jetbrains.spek.api.dsl.context -import org.jetbrains.spek.api.include - -@Deprecated("Switch from Assert to Expect and use Spec from atrium-specs-common; will be removed with 1.0.0") -abstract class CollectionFeatureAssertionsSpec( - verbs: AssertionVerbFactory, - sizeValPair: Pair>.() -> Assert>, - sizeFunPair: Pair>.(assertionCreator: Assert.() -> Unit) -> Assert>>, - describePrefix: String = "[Atrium] " -) : Spek({ - - //@formatter:off - include(@Suppress("DEPRECATION") object : SubjectLessAssertionSpec>(describePrefix, - "val ${sizeValPair.first}" to mapToCreateAssertion { sizeValPair.second(this).toBe(1) }, - "fun ${sizeFunPair.first}" to mapToCreateAssertion { sizeFunPair.second(this) { isGreaterThan(2) } } - ){}) - - include(@Suppress("DEPRECATION") object : CheckingAssertionSpec>(verbs, describePrefix, - checkingTriple("val ${sizeValPair.first}", { sizeValPair.second(this).toBe(1) }, listOf("a") as Collection, listOf("a", "B")), - checkingTriple("fun ${sizeFunPair.first}", { sizeFunPair.second(this) { isLessThan(2) } }, listOf("a")as Collection, listOf("a", "B")) - ) {}) - //@formatter:on - - fun describeFun(vararg funName: String, body: SpecBody.() -> Unit) = - describeFun(describePrefix, funName, body = body) - - val assert: (Collection) -> Assert> = verbs::checkImmediately - val expect = verbs::checkException - val fluent = assert(listOf("a", "b")) - - val (sizeValName, sizeVal) = sizeValPair - val (sizeFunName, sizeFun) = sizeFunPair - - describeFun("val $sizeValName") { - context("list with two entries") { - test("toBe(2) holds") { - fluent.sizeVal().toBe(2) - } - test("toBe(1) fails") { - expect { - fluent.sizeVal().toBe(1) - }.toThrow { - messageContains("size: 2") - } - } - } - } - - describeFun("fun $sizeFunName") { - context("map with two entries") { - test("is greater than 1 holds") { - fluent.sizeFun { isGreaterThan(1) } - } - test("is less than 1 fails") { - expect { - fluent.sizeFun { isLessThan(1) } - }.toThrow { - messageContains("size: 2") - } - } - //TODO should fail but does not since it has a feature assertion which itself is empty -// test("throws if no assertion is made") { -// expect { -// fluent.sizeFun { } -// }.toThrow { messageContains("There was not any assertion created") } -// } - } - } -}) diff --git a/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/ComparableAssertionsSpec.kt b/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/ComparableAssertionsSpec.kt deleted file mode 100644 index 41c78d790..000000000 --- a/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/ComparableAssertionsSpec.kt +++ /dev/null @@ -1,112 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") - -package ch.tutteli.atrium.spec.integration - -import ch.tutteli.atrium.api.cc.en_GB.* -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.spec.AssertionVerbFactory -import ch.tutteli.atrium.translations.DescriptionComparableAssertion -import org.jetbrains.spek.api.Spek -import org.jetbrains.spek.api.dsl.describe -import org.jetbrains.spek.api.include - -@Deprecated("Switch from Assert to Expect and use Spec from atrium-specs-common; will be removed with 1.0.0") -abstract class ComparableAssertionsSpec( - verbs: AssertionVerbFactory, - isLessThanPair: Pair.(Int) -> Assert>, - isLessOrEqualsPair: Pair.(Int) -> Assert>, - isGreaterThanPair: Pair.(Int) -> Assert>, - isGreaterOrEqualsPair: Pair.(Int) -> Assert>, - describePrefix: String = "[Atrium] " -) : Spek({ - - include(@Suppress("DEPRECATION") object : SubjectLessAssertionSpec(describePrefix, - isLessThanPair.first to mapToCreateAssertion { isLessThanPair.second(this, 1) }, - isLessOrEqualsPair.first to mapToCreateAssertion { isLessOrEqualsPair.second(this, 1) }, - isGreaterThanPair.first to mapToCreateAssertion { isGreaterThanPair.second(this, 1) }, - isGreaterOrEqualsPair.first to mapToCreateAssertion { isGreaterOrEqualsPair.second(this, 1) } - ) {}) - - include(@Suppress("DEPRECATION") object : CheckingAssertionSpec(verbs, describePrefix, - checkingTriple(isLessThanPair.first, { isLessThanPair.second(this, 1) }, 0, 1), - checkingTriple(isLessOrEqualsPair.first, { isLessOrEqualsPair.second(this, 1) }, 1, 2), - checkingTriple(isGreaterThanPair.first, { isGreaterThanPair.second(this, 1) }, 2, 1), - checkingTriple(isGreaterOrEqualsPair.first, { isGreaterOrEqualsPair.second(this, 1) }, 1, 0) - ) {}) - - val expect = verbs::checkException - val (isLessThan, isLessThanFun) = isLessThanPair - val (isLessOrEquals, isLessOrEqualsFun) = isLessOrEqualsPair - val (isGreaterThan, isGreaterThanFun) = isGreaterThanPair - val (isGreaterOrEquals, isGreaterOrEqualsFun) = isGreaterOrEqualsPair - - val isLessThanDescr = DescriptionComparableAssertion.IS_LESS_THAN.getDefault() - val isLessOrEqualsDescr = DescriptionComparableAssertion.IS_LESS_THAN_OR_EQUAL.getDefault() - val isGreaterThanDescr = DescriptionComparableAssertion.IS_GREATER_THAN.getDefault() - val isGreaterOrEqualsDescr = DescriptionComparableAssertion.IS_GREATER_THAN_OR_EQUAL.getDefault() - - val fluent = verbs.checkImmediately(10) - group("$describePrefix context subject is 10") { - describe("$isLessThan ...") { - test("... 11 does not throw") { - fluent.isLessThanFun(11) - } - test("... 10 throws an AssertionError containing ${DescriptionComparableAssertion::class.simpleName}.${DescriptionComparableAssertion.IS_LESS_THAN} and `: 10`") { - expect { - fluent.isLessThanFun(10) - }.toThrow { messageContains("$isLessThanDescr: 10") } - } - test("... 9 throws an AssertionError containing ${DescriptionComparableAssertion::class.simpleName}.${DescriptionComparableAssertion.IS_LESS_THAN} and `: 10`") { - expect { - fluent.isLessThanFun(9) - }.toThrow { messageContains("$isLessThanDescr: 9") } - } - } - - describe("$isLessOrEquals ...") { - test("... 11 does not throw") { - fluent.isLessOrEqualsFun(11) - } - test("... 10 does not throw") { - fluent.isLessOrEqualsFun(10) - } - test("... 9 throws an AssertionError containing ${DescriptionComparableAssertion::class.simpleName}.${DescriptionComparableAssertion.IS_LESS_THAN_OR_EQUAL} and `: 10`") { - expect { - fluent.isLessOrEqualsFun(9) - }.toThrow { messageContains("$isLessOrEqualsDescr: 9") } - } - } - - describe("$isGreaterThan ...") { - test("... 11 throws an AssertionError containing ${DescriptionComparableAssertion::class.simpleName}.${DescriptionComparableAssertion.IS_GREATER_THAN} and `: 11`") { - expect { - fluent.isGreaterThanFun(11) - }.toThrow { messageContains("$isGreaterThanDescr: 11") } - } - test("... 10 throws an AssertionError containing ${DescriptionComparableAssertion::class.simpleName}.${DescriptionComparableAssertion.IS_GREATER_THAN} and `: 10`") { - expect { - fluent.isGreaterThanFun(10) - }.toThrow { messageContains("$isGreaterThanDescr: 10") } - } - test("... 9 does not throw") { - fluent.isGreaterThanFun(9) - } - } - - describe("$isGreaterOrEquals ...") { - test("... 11 throws an AssertionError containing ${DescriptionComparableAssertion::class.simpleName}.${DescriptionComparableAssertion.IS_GREATER_THAN_OR_EQUAL} and `: 11`") { - expect { - fluent.isGreaterOrEqualsFun(11) - }.toThrow { messageContains("$isGreaterOrEqualsDescr: 11") } - } - test("... 10 does not throw") { - fluent.isGreaterOrEqualsFun(10) - } - test("... 9 does not throw") { - fluent.isGreaterOrEqualsFun(9) - } - } - } - -}) diff --git a/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/FeatureAssertionsBoundedReferenceWhenCollectingPlantSpec.kt b/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/FeatureAssertionsBoundedReferenceWhenCollectingPlantSpec.kt deleted file mode 100644 index 36fddb88a..000000000 --- a/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/FeatureAssertionsBoundedReferenceWhenCollectingPlantSpec.kt +++ /dev/null @@ -1,78 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") - -package ch.tutteli.atrium.spec.integration - -import ch.tutteli.atrium.api.cc.en_GB.toThrow -import ch.tutteli.atrium.core.coreFactory -import ch.tutteli.atrium.creating.CollectingAssertionPlant -import ch.tutteli.atrium.domain.builders.creating.PleaseUseReplacementException -import ch.tutteli.atrium.spec.AssertionVerbFactory -import org.jetbrains.spek.api.Spek - -@Deprecated("Switch from Assert to Expect and use Spec from atrium-specs-common; will be removed with 1.0.0") -abstract class FeatureAssertionsBoundedReferenceWhenCollectingPlantSpec( - verbs: AssertionVerbFactory, - - propertyImmediate: CollectingAssertionPlant.() -> Unit, - propertyLazy: CollectingAssertionPlant.() -> Unit, - return0ValueImmediate: CollectingAssertionPlant.() -> Unit, - return1ValueImmediate: CollectingAssertionPlant.() -> Unit, - return2ValueImmediate: CollectingAssertionPlant.() -> Unit, - return3ValueImmediate: CollectingAssertionPlant.() -> Unit, - return4ValueImmediate: CollectingAssertionPlant.() -> Unit, - return5ValueImmediate: CollectingAssertionPlant.() -> Unit, - return0ValueLazy: CollectingAssertionPlant.() -> Unit, - return1ValueLazy: CollectingAssertionPlant.() -> Unit, - return2ValueLazy: CollectingAssertionPlant.() -> Unit, - return3ValueLazy: CollectingAssertionPlant.() -> Unit, - return4ValueLazy: CollectingAssertionPlant.() -> Unit, - return5ValueLazy: CollectingAssertionPlant.() -> Unit, - - propertyNullableHolds: CollectingAssertionPlant.() -> Unit, - return0ValueNullableHolds: CollectingAssertionPlant.() -> Unit, - return1ValueNullableHolds: CollectingAssertionPlant.() -> Unit, - return2ValueNullableHolds: CollectingAssertionPlant.() -> Unit, - return3ValueNullableHolds: CollectingAssertionPlant.() -> Unit, - return4ValueNullableHolds: CollectingAssertionPlant.() -> Unit, - return5ValueNullableHolds: CollectingAssertionPlant.() -> Unit, - - describePrefix: String = "[Atrium] " -) : Spek({ - - action("$describePrefix feature assertion should throw a ${PleaseUseReplacementException::class.simpleName}") { - @Suppress("DEPRECATION") - val plant = coreFactory.newCollectingPlant { TestData("hello robert", 1) } - mapOf( - "`property` immediate" to propertyImmediate, - "`property` lazy" to propertyLazy, - "`returnValueOf` without arguments and immediate" to return0ValueImmediate, - "`returnValueOf` with 1 argument and immediate" to return1ValueImmediate, - "`returnValueOf` with 2 arguments and immediate" to return2ValueImmediate, - "`returnValueOf` with 3 arguments and immediate" to return3ValueImmediate, - "`returnValueOf` with 4 arguments and immediate" to return4ValueImmediate, - "`returnValueOf` with 5 arguments and immediate" to return5ValueImmediate, - "`returnValueOf` without arguments arguments and lazy" to return0ValueLazy, - "`returnValueOf` with 1 argument and lazy" to return1ValueLazy, - "`returnValueOf` with 2 arguments and lazy" to return2ValueLazy, - "`returnValueOf` with 3 arguments and lazy" to return3ValueLazy, - "`returnValueOf` with 4 arguments and lazy" to return4ValueLazy, - "`returnValueOf` with 5 arguments and lazy" to return5ValueLazy, - - "`property` toBe(null)" to propertyNullableHolds, - "`returnValueOf` without argument and toBe(null)" to return0ValueNullableHolds, - "`returnValueOf` with 1 argument and toBe(null)" to return1ValueNullableHolds, - "`returnValueOf` with 2 arguments and toBe(null)" to return2ValueNullableHolds, - "`returnValueOf` with 3 arguments and toBe(null)" to return3ValueNullableHolds, - "`returnValueOf` with 4 arguments and toBe(null)" to return4ValueNullableHolds, - "`returnValueOf` with 5 arguments and toBe(null)" to return5ValueNullableHolds - - ).forEach { (description, featureFun) -> - test(description) { - verbs.checkException { - plant.featureFun() - }.toThrow { } - } - } - } -}) diff --git a/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/FeatureAssertionsSpec.kt b/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/FeatureAssertionsSpec.kt deleted file mode 100644 index 2d28accae..000000000 --- a/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/FeatureAssertionsSpec.kt +++ /dev/null @@ -1,167 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") - -package ch.tutteli.atrium.spec.integration - -import ch.tutteli.atrium.api.cc.en_GB.messageContains -import ch.tutteli.atrium.api.cc.en_GB.toThrow -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.spec.AssertionVerbFactory -import ch.tutteli.atrium.spec.checkGenericNarrowingAssertion -import ch.tutteli.atrium.spec.prefixedDescribe -import org.jetbrains.spek.api.Spek -import org.jetbrains.spek.api.dsl.SpecBody -import org.jetbrains.spek.api.include - -@Suppress("UNUSED_PARAMETER") -data class TestData(val description: String, val nullableValue: Int?) { - fun return0() = description - fun return1(arg1: String) = description - fun return2(arg1: String, arg2: Int?) = description - fun return3(arg1: String, arg2: Int?, arg3: Boolean) = description - fun return4(arg1: String, arg2: Int?, arg3: Boolean, arg4: Double) = description - fun return5(arg1: String, arg2: Int?, arg3: Boolean, arg4: Double, arg5: Char) = description - fun returnNullable0() = nullableValue - fun returnNullable1(arg1: String) = nullableValue - fun returnNullable2(arg1: String, arg2: Int?) = nullableValue - fun returnNullable3(arg1: String, arg2: Int?, arg3: Boolean) = nullableValue - fun returnNullable4(arg1: String, arg2: Int?, arg3: Boolean, arg4: Double) = nullableValue - fun returnNullable5(arg1: String, arg2: Int?, arg3: Boolean, arg4: Double, arg5: Char) = nullableValue -} -typealias F = Assert.() -> Unit - -@Deprecated("Switch from Assert to Expect and use Spec from atrium-specs-common; will be removed with 1.0.0") -abstract class FeatureAssertionsSpec( - verbs: AssertionVerbFactory, - - propertyImmediate: F, - propertyLazy: F, - return0ValueImmediate: F, - return1ValueImmediate: F, - return2ValueImmediate: F, - return3ValueImmediate: F, - return4ValueImmediate: F, - return5ValueImmediate: F, - return0ValueLazy: F, - return1ValueLazy: F, - return2ValueLazy: F, - return3ValueLazy: F, - return4ValueLazy: F, - return5ValueLazy: F, - - propertyNullableDoesNotHold: F, - return0ValueNullableDoesNotHold: F, - return1ValueNullableDoesNotHold: F, - return2ValueNullableDoesNotHold: F, - return3ValueNullableDoesNotHold: F, - return4ValueNullableDoesNotHold: F, - return5ValueNullableDoesNotHold: F, - - propertyNullableHolds: F, - return0ValueNullableHolds: F, - return1ValueNullableHolds: F, - return2ValueNullableHolds: F, - return3ValueNullableHolds: F, - return4ValueNullableHolds: F, - return5ValueNullableHolds: F, - - itsLazyWithNestedImmediate: F, - itsLazyWithNestedLazy: F, - additionalContentInException: String? = null, - describePrefix: String = "[Atrium] " -) : Spek({ - - fun prefixedDescribe(description: String, body: SpecBody.() -> Unit) - = prefixedDescribe(describePrefix, description, body) - - val assert: (TestData) -> Assert = verbs::checkImmediately - val expect = verbs::checkException - - val functions = arrayOf( - Triple("`property` immediate", propertyImmediate, TestData::description.name), - Triple("`property` lazy", propertyLazy, TestData::description.name), - Triple("`returnValueOf` without arguments and immediate", return0ValueImmediate, "${TestData::return0.name}()"), - Triple("`returnValueOf` with 1 argument and immediate", return1ValueImmediate, "${TestData::return1.name}(\"a\")"), - Triple("`returnValueOf` with 2 arguments and immediate", return2ValueImmediate, "${TestData::return2.name}(\"a\", 1)"), - Triple("`returnValueOf` with 3 arguments and immediate", return3ValueImmediate, "${TestData::return3.name}(\"a\", 1, true)"), - Triple("`returnValueOf` with 4 arguments and immediate", return4ValueImmediate, "${TestData::return4.name}(\"a\", 1, true, 1.2)"), - Triple("`returnValueOf` with 5 arguments and immediate", return5ValueImmediate, "${TestData::return5.name}(\"a\", 1, true, 1.2, 'b')"), - Triple("`returnValueOf` without arguments and lazy", return0ValueLazy, "${TestData::return0.name}()"), - Triple("`returnValueOf` with 1 argument and lazy", return1ValueLazy, "${TestData::return1.name}(\"a\")"), - Triple("`returnValueOf` with 2 arguments and lazy", return2ValueLazy, "${TestData::return2.name}(\"a\", 1)"), - Triple("`returnValueOf` with 3 arguments and lazy", return3ValueLazy, "${TestData::return3.name}(\"a\", 1, true)"), - Triple("`returnValueOf` with 4 arguments and lazy", return4ValueLazy, "${TestData::return4.name}(\"a\", 1, true, 1.2)"), - Triple("`returnValueOf` with 5 arguments and lazy", return5ValueLazy, "${TestData::return5.name}(\"a\", 1, true, 1.2, 'b')") - ) - val nullableFailingFunctions = arrayOf( - Triple("`property` toBe(null)", propertyNullableDoesNotHold, TestData::nullableValue.name), - Triple("`returnValueOf` without argument and toBe(null)", return0ValueNullableDoesNotHold, "${TestData::returnNullable0.name}()"), - Triple("`returnValueOf` with 1 argument and toBe(null)", return1ValueNullableDoesNotHold, "${TestData::returnNullable1.name}(\"a\")"), - Triple("`returnValueOf` with 2 arguments and toBe(null)", return2ValueNullableDoesNotHold, "${TestData::returnNullable2.name}(\"a\", 1)"), - Triple("`returnValueOf` with 3 arguments and toBe(null)", return3ValueNullableDoesNotHold, "${TestData::returnNullable3.name}(\"a\", 1, true)"), - Triple("`returnValueOf` with 4 arguments and toBe(null)", return4ValueNullableDoesNotHold, "${TestData::returnNullable4.name}(\"a\", 1, true, 1.2)"), - Triple("`returnValueOf` with 5 arguments and toBe(null)", return5ValueNullableDoesNotHold, "${TestData::returnNullable5.name}(\"a\", 1, true, 1.2, 'b')") - ) - val nullableHoldsFunctions = arrayOf( - "`property` notToBeNull" to propertyNullableHolds, - "`returnValueOf` with 1 argument and notToBeNull" to return1ValueNullableHolds, - "`returnValueOf` without argument and notToBeNull" to return0ValueNullableHolds, - "`returnValueOf` with 2 arguments and notToBeNull" to return2ValueNullableHolds, - "`returnValueOf` with 3 arguments and notToBeNull" to return3ValueNullableHolds, - "`returnValueOf` with 4 arguments and notToBeNull" to return4ValueNullableHolds, - "`returnValueOf` with 5 arguments and notToBeNull" to return5ValueNullableHolds - ) - - val holdingTestData = TestData("hello robert", 1) - val failingTestData = TestData("by robert", null) - include(@Suppress("DEPRECATION") object : CheckingAssertionSpec(verbs, describePrefix, - *(functions.map { (description, lambda, _) -> checkingTriple(description, lambda, holdingTestData, failingTestData) }.toTypedArray()), - *(nullableFailingFunctions.map { (description, lambda, _) -> checkingTriple(description, lambda, failingTestData, holdingTestData) }.toTypedArray()), - *(nullableHoldsFunctions.map { (description, lambda) -> checkingTriple(description, lambda, holdingTestData, failingTestData) }.toTypedArray()), - checkingTriple("propertyLazy with nested immediate", itsLazyWithNestedImmediate, holdingTestData, TestData("by robert", 1)) - ) {}) - - fun SpecBody.checkGenericNarrowingAssertionWithExceptionMessage( - description: String, act: (T.() -> Unit) -> Unit, vararg methods: Triple Unit), String> - ) { - group(description) { - methods.forEach { (checkMethod, assertion, stringInExceptionMessage) -> - test("in case of $checkMethod evaluation") { - expect { - act(assertion) - }.toThrow { - messageContains(stringInExceptionMessage) - if(additionalContentInException != null){ - messageContains(additionalContentInException) - } - } - } - } - } - } - - prefixedDescribe("different feature assertion functions") { - - checkGenericNarrowingAssertionWithExceptionMessage("it throws an AssertionError if the assertion does not hold", { andWithCheck -> - - assert(TestData("what ever", 1)).andWithCheck() - - }, *functions, *nullableFailingFunctions) - - checkGenericNarrowingAssertion("it does not throw an exception if the assertion holds", { andWithCheck -> - - assert(TestData("hello robert", 1)).andWithCheck() - - }, *functions.map { it.first to it.second }.toTypedArray(), *nullableHoldsFunctions) - } - - prefixedDescribe("assertion plant which checks immediately; use lazy property which has nested...") { - test("... immediate feature property") { - assert(TestData("hello robert", 1)).itsLazyWithNestedImmediate() - } - test("... lazy feature property") { - assert(TestData("hello robert", 1)).itsLazyWithNestedLazy() - } - } - -}) diff --git a/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/FloatingPointWithErrorToleranceAssertionsSpec.kt b/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/FloatingPointWithErrorToleranceAssertionsSpec.kt deleted file mode 100644 index af47b77d6..000000000 --- a/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/FloatingPointWithErrorToleranceAssertionsSpec.kt +++ /dev/null @@ -1,118 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") - -package ch.tutteli.atrium.spec.integration - -import ch.tutteli.atrium.api.cc.en_GB.contains -import ch.tutteli.atrium.api.cc.en_GB.containsNot -import ch.tutteli.atrium.api.cc.en_GB.message -import ch.tutteli.atrium.api.cc.en_GB.toThrow -import ch.tutteli.atrium.core.polyfills.fullName -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.spec.AssertionVerbFactory -import ch.tutteli.atrium.translations.DescriptionFloatingPointAssertion -import org.jetbrains.spek.api.Spek -import org.jetbrains.spek.api.dsl.SpecBody -import org.jetbrains.spek.api.dsl.context -import org.jetbrains.spek.api.include -import java.math.BigDecimal -import java.text.DecimalFormat -import kotlin.math.absoluteValue - -@Deprecated("Switch from Assert to Expect and use Spec from atrium-specs-common; will be removed with 1.0.0") -abstract class FloatingPointWithErrorToleranceAssertionsSpec( - verbs: AssertionVerbFactory, - toBeWithErrorToleranceFloatPair: Pair.(Float, Float) -> Assert>, - toBeWithErrorToleranceDoublePair: Pair.(Double, Double) -> Assert>, - toBeWithErrorToleranceBigDecimalPair: Pair.(BigDecimal, BigDecimal) -> Assert>, - describePrefix: String = "[Atrium] " -) : Spek({ - - include(@Suppress("DEPRECATION") object : SubjectLessAssertionSpec("$describePrefix[Float] ", - toBeWithErrorToleranceFloatPair.first to mapToCreateAssertion { toBeWithErrorToleranceFloatPair.second(this, 1.0f, 0.01f) }) {}) - include(@Suppress("DEPRECATION") object : SubjectLessAssertionSpec("$describePrefix[Double] ", - toBeWithErrorToleranceDoublePair.first to mapToCreateAssertion { toBeWithErrorToleranceDoublePair.second(this, 1.0, 0.01) }) {}) - include(@Suppress("DEPRECATION") object : SubjectLessAssertionSpec("$describePrefix[BigDecimal] ", - toBeWithErrorToleranceBigDecimalPair.first to mapToCreateAssertion { toBeWithErrorToleranceBigDecimalPair.second(this, BigDecimal.TEN, BigDecimal("0.00001")) } - ) {}) - - include(@Suppress("DEPRECATION") object : CheckingAssertionSpec(verbs, "$describePrefix[Float] ", - checkingTriple(toBeWithErrorToleranceFloatPair.first, { toBeWithErrorToleranceFloatPair.second(this, 1.0f, 0.01f) }, 0.99f, 0.98f)) {}) - include(@Suppress("DEPRECATION") object : CheckingAssertionSpec(verbs, "$describePrefix[Double] ", - checkingTriple(toBeWithErrorToleranceDoublePair.first, { toBeWithErrorToleranceDoublePair.second(this, 1.0, 0.5) }, 1.5, 1.6)) {}) - include(@Suppress("DEPRECATION") object : CheckingAssertionSpec(verbs, "$describePrefix[BigDecimal] ", - checkingTriple(toBeWithErrorToleranceBigDecimalPair.first, { toBeWithErrorToleranceBigDecimalPair.second(this, BigDecimal.TEN, BigDecimal("0.00001")) }, BigDecimal("9.99999999"), BigDecimal("9.999")) - ) {}) - - val expect = verbs::checkException - - data class TestData(val subject: T, val tolerance: T, val holding: List, val failing: List) - - val df = DecimalFormat("###,##0.0") - df.maximumFractionDigits = 340 - - fun SpecBody.describeFun(pair: Pair.(T, T) -> Assert>, withFailureNotice: Boolean, absDiff: (T, T) -> T, testData: List>) { - val (name, toBeWithErrorTolerance) = pair - group("$describePrefix $name") { - testData.forEach { (subject, tolerance, holding, failing) -> - context("tolerance is $tolerance and subject is $subject ...") { - test("... compare to $subject does not throw") { - verbs.checkImmediately(subject).toBeWithErrorTolerance(subject, tolerance) - } - - holding.forEach { num -> - test("... compare to $num does not throw") { - verbs.checkImmediately(subject).toBeWithErrorTolerance(num, tolerance) - } - } - - val toBeInclErrorTolerance = String.format(DescriptionFloatingPointAssertion.TO_BE_WITH_ERROR_TOLERANCE.getDefault(), tolerance) - val failureNotice = String.format(DescriptionFloatingPointAssertion.FAILURE_DUE_TO_FLOATING_POINT_NUMBER.getDefault(), subject::class.fullName) - failing.forEach { num -> - test("... compare to $num throws AssertionError") { - expect { - verbs.checkImmediately(subject).toBeWithErrorTolerance(num, tolerance) - }.toThrow { - message { - val exactCheck = String.format(DescriptionFloatingPointAssertion.TO_BE_WITH_ERROR_TOLERANCE_EXPLAINED.getDefault(), df.format(subject), df.format(num), df.format(absDiff(subject, num)), df.format(tolerance)) - contains(subject, - "$toBeInclErrorTolerance: $num", - exactCheck) - if (withFailureNotice) { - contains(failureNotice) - } else { - containsNot(failureNotice) - } - } - } - - } - } - } - } - } - } - - describeFun(toBeWithErrorToleranceFloatPair, true, { a, b -> (a - b).absoluteValue }, listOf( - TestData(0.001f, 0.001f, listOf(0.002f, 0.0f, -0.0f, 0.00001f), listOf(0.0021f, -0.0000001f)), - TestData(9.999f, 0.001f, listOf(9.998f, 9.9989f, 9.9988f), listOf(1.1f, 1.001f, 1.001f, 9.997f, /* due to precision */ 10.0f)), - //should give out scientific notation - TestData(0.000_000_01f, 0.000_000_002f, listOf(0.000_000_011f, 0.000_000_009f), listOf(0.000_000_013f, 0.000_000_007f, /* due to precision */ 0.000_000_012f, 0.000_000_008f)) - )) - describeFun(toBeWithErrorToleranceDoublePair, true, { a, b -> (a - b).absoluteValue }, listOf( - TestData(1.0, 0.01, listOf(1.009), listOf(0.98, 1.02, 1.011, /* due to precision */ 1.01, 0.99)), - TestData(0.001, 0.001, listOf(0.002, 0.0, -0.0, 0.00001), listOf(0.0021, -0.0000001)), - TestData(9.99999, 0.00001, listOf(10.0, 9.99998), listOf(1.1, 1.001, 1.001, 9.99997)), - //should give out scientific notation - TestData(0.000_000_01, 0.000_000_002, listOf(0.000_000_011, 0.000_000_012, 0.000_000_009, 0.000_000_008), listOf(0.000_000_013, 0.000_000_007)) - )) - describeFun(toBeWithErrorToleranceBigDecimalPair, false, { a, b -> (a - b).abs() }, listOf( - TestData(BigDecimal("9.99999999999999"), BigDecimal("0.00000000000001"), - listOf(BigDecimal.TEN, BigDecimal("9.999999999999999999999999"), BigDecimal("9.99999999999998")), - listOf(BigDecimal("10.0000000000000000001"), BigDecimal("9.99999999999997"), BigDecimal("9.9999999999999799999999999999999999"))), - TestData(BigDecimal("10.0"), BigDecimal("0.001"), - listOf(BigDecimal.TEN, BigDecimal("10"), BigDecimal("10.000"), BigDecimal("10.001"), BigDecimal("10.0000000000000000001")), - listOf(BigDecimal("10.001000000001"), BigDecimal("9.99899999"))) - )) -}) - diff --git a/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/IterableAllAssertionsSpec.kt b/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/IterableAllAssertionsSpec.kt deleted file mode 100644 index eaccb2031..000000000 --- a/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/IterableAllAssertionsSpec.kt +++ /dev/null @@ -1,145 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") - -package ch.tutteli.atrium.spec.integration - -import ch.tutteli.atrium.api.cc.en_GB.* -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.spec.AssertionVerbFactory -import ch.tutteli.atrium.translations.DescriptionIterableAssertion -import org.jetbrains.spek.api.dsl.context -import org.jetbrains.spek.api.dsl.it -import org.jetbrains.spek.api.include - -@Deprecated("Switch from Assert to Expect and use Spec from atrium-specs-common; will be removed with 1.0.0") -abstract class IterableAllAssertionsSpec( - verbs: AssertionVerbFactory, - allPair: Pair>.(Assert.() -> Unit) -> Assert>>, - allNullablePair: Pair>.((Assert.() -> Unit)?) -> Assert>>, - rootBulletPoint: String, - warningBulletPoint: String, - listBulletPoint: String, - explanatoryBulletPoint: String, - featureArrow: String, - featureBulletPoint: String, - describePrefix: String = "[Atrium] " -) : IterablePredicateSpecBase(verbs, { - - include(@Suppress("DEPRECATION") object : SubjectLessAssertionSpec>(describePrefix, - allPair.first to mapToCreateAssertion { allPair.second(this) { toBe(2.5) } }, - "${allNullablePair.first} for nullable" to mapToCreateAssertion { allNullablePair.second(this, null) } - ) {}) - - include(@Suppress("DEPRECATION") object : CheckingAssertionSpec>(verbs, describePrefix, - checkingTriple(allPair.first, { allPair.second(this) { isGreaterThan(2.5) } }, listOf(2.6, 3.0, 4.0).asIterable(), listOf(1.0, 2.5, 3.0)), - checkingTriple("${allNullablePair.first} for nullable", { allNullablePair.second(this) { isGreaterThan(2.5) } }, listOf(2.6, 3.0, 4.0).asIterable(), listOf(1.0, 2.5, 3.0)) - ) {}) - - val assert: (Iterable) -> Assert> = verbs::checkImmediately - val expect = verbs::checkException - - val (allOfNullable, allOfNullableFun) = allNullablePair - - val all = DescriptionIterableAssertion.ALL.getDefault() - val hasElement = DescriptionIterableAssertion.HAS_ELEMENT.getDefault() - val indentRootBulletPoint = " ".repeat(rootBulletPoint.length) - val indentFeatureArrow = " ".repeat(featureArrow.length) - val indentListBulletPoint = " ".repeat(listBulletPoint.length) - - - val explanatoryPointWithIndent = "$indentRootBulletPoint$indentListBulletPoint$explanatoryBulletPoint" - - fun index(index: Int) - = listBulletPoint + String.format(DescriptionIterableAssertion.INDEX.getDefault(), index) - - nonNullableCases( - describePrefix, - allPair, - allNullablePair - ) { containsEntriesFun -> - - context("empty collection") { - val fluentEmpty = assert(setOf()) - test("$isLessThanFun(1.0) throws AssertionError") { - expect { - fluentEmpty.containsEntriesFun { isLessThan(1.0) } - }.toThrow { - messageContains( - "$rootBulletPoint$featureArrow$hasElement: false$separator"+ - "$indentRootBulletPoint$indentFeatureArrow$featureBulletPoint$isDescr: true" - ) - } - } - } - - val fluent = assert(oneToSeven) - context("iterable $oneToSeven") { - context("all are $isGreaterThanFun(2.5) and $isLessThanFun(7.0)") { - it("throws AssertionError containing both assumptions in one assertion") { - expect { - fluent.containsEntriesFun { isGreaterThan(2.5); isLessThan(7.0) } - }.toThrow { - message { - contains.exactly(1).values( - "$rootBulletPoint$all: $separator", - "$explanatoryPointWithIndent$isGreaterThanDescr: 2.5", - "$explanatoryPointWithIndent$isLessThanDescr: 7.0", - "$warningBulletPoint$mismatches:", - "${index(0)}: 1.0", - "${index(1)}: 2.0", - "${index(9)}: 7.0" - ) - } - } - } - } - - context("all are $isGreaterThanFun(0.5) and $isLessThanFun(7.5)") { - it("does not throw an exception") { - fluent.containsEntriesFun { isGreaterThan(0.5); isLessThan(7.5) } - } - } - } - - // the new infix throws now an AssertionError instead - not going to test it any more (is covered by bc-tests) -// context("search for entry where the lambda does not specify any assertion") { -// it("throws an ${IllegalArgumentException::class.simpleName}") { -// expect { -// fluent.containsEntriesFun({}) -// }.toThrow { messageContains("not any assertion created") } -// } -// } - } - - nullableCases(describePrefix) { - - describeFun("$allOfNullable for nullable") { - - val listOfNulls = listOf(null, null) - context("iterable $listOfNulls") { - test("all are `null` (does not throw)") { - verbs.checkImmediately(listOfNulls).allOfNullableFun(null) - } - } - - val list = listOf(null, 1.0, null, 3.0) - context("iterable $list") { - test("$isGreaterThanDescr(0.5)") { - expect { - verbs.checkImmediately(list).allOfNullableFun { isGreaterThan(0.5) } - }.toThrow { - message { - contains.exactly(1).values( - "$rootBulletPoint$all: $separator", - "$explanatoryPointWithIndent$isGreaterThanDescr: 0.5", - "$warningBulletPoint$mismatches:", - "${index(0)}: null", - "${index(2)}: null" - ) - } - } - } - } - } - } -}) diff --git a/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/IterableAnyAssertionsSpec.kt b/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/IterableAnyAssertionsSpec.kt deleted file mode 100644 index 3480854c6..000000000 --- a/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/IterableAnyAssertionsSpec.kt +++ /dev/null @@ -1,161 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") - -package ch.tutteli.atrium.spec.integration - -import ch.tutteli.atrium.api.cc.en_GB.* -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.spec.AssertionVerbFactory -import ch.tutteli.atrium.translations.DescriptionIterableAssertion -import org.jetbrains.spek.api.dsl.SpecBody -import org.jetbrains.spek.api.dsl.context -import org.jetbrains.spek.api.dsl.it -import org.jetbrains.spek.api.include - -@Deprecated("Switch from Assert to Expect and use Spec from atrium-specs-common; will be removed with 1.0.0") -abstract class IterableAnyAssertionsSpec( - verbs: AssertionVerbFactory, - anyPair: Pair>.(Assert.() -> Unit) -> Assert>>, - anyNullablePair: Pair>.((Assert.() -> Unit)?) -> Assert>>, - rootBulletPoint: String, - describePrefix: String = "[Atrium] " -) : IterablePredicateSpecBase(verbs, { - - include(@Suppress("DEPRECATION") object : SubjectLessAssertionSpec>(describePrefix, - anyPair.first to mapToCreateAssertion { anyPair.second(this) { toBe(2.5) } }, - "${anyNullablePair.first} for nullable" to mapToCreateAssertion { anyNullablePair.second(this, null) } - ) {}) - - include(@Suppress("DEPRECATION") object : CheckingAssertionSpec>(verbs, describePrefix, - checkingTriple(anyPair.first, { anyPair.second(this) { toBe(2.5) } }, listOf(2.5).asIterable(), listOf()), - checkingTriple("${anyNullablePair.first} for nullable", { anyNullablePair.second(this) { toBe(2.5) } }, listOf(2.5).asIterable(), listOf()) - ) {}) - - val assert: (Iterable) -> Assert> = verbs::checkImmediately - val expect = verbs::checkException - - val (anyOfNullable, anyOfNullableFun) = anyNullablePair - - nonNullableCases( - describePrefix, - anyPair, - anyNullablePair - ) { containsEntriesFun -> - - context("empty collection") { - val fluentEmpty = assert(setOf()) - test("$isLessThanFun(1.0) throws AssertionError") { - expect { - fluentEmpty.containsEntriesFun { isLessThan(1.0) } - }.toThrow { - messageContains( - "$rootBulletPoint$containsInAnyOrder: $separator", - "$anEntryWhich: $separator", - "$isLessThanDescr: 1.0", - "$numberOfOccurrences: 0", - "$atLeast: 1" - ) - } - } - // message changed in new infix-API, not going to test it any more (is covered by bc-tests) -// test("$returnValueOfFun(...) states warning that subject is not set") { -// expect { -// fluentEmpty.containsEntriesFun { -// @Suppress("DEPRECATION") -// returnValueOf(subject::dec).toBe(1.0) -// } -// }.toThrow { messageContains(DescriptionIterableAssertion.CANNOT_EVALUATE_SUBJECT_EMPTY_ITERABLE.getDefault()) } -// } - } - - val fluent = assert(oneToSeven) - context("iterable $oneToSeven") { - context("search for entry which $isGreaterThanFun(1.0) and $isLessThanFun(2.0)") { - it("throws AssertionError containing both assumptions in one assertion") { - expect { - fluent.containsEntriesFun { isGreaterThan(1.0); isLessThan(2.0) } - }.toThrow { - messageContains( - "$rootBulletPoint$containsInAnyOrder: $separator", - "$anEntryWhich: $separator", - "$isGreaterThanDescr: 1.0", - "$isLessThanDescr: 2.0", - "$numberOfOccurrences: 0", - "$atLeast: 1" - ) - } - } - } - - context("search for entry which $isGreaterThanFun(1.0) and $isLessThanFun(2.1)") { - it("does not throw an exception") { - fluent.containsEntriesFun { isGreaterThan(1.0); isLessThan(2.1) } - } - } - } - - // the new infix throws now an AssertionError instead - not going to test it any more (is covered by bc-tests) -// context("search for entry where the lambda does not specify any assertion") { -// it("throws an ${IllegalArgumentException::class.simpleName}") { -// expect { -// fluent.containsEntriesFun {} -// }.toThrow { messageContains("not any assertion created") } -// } -// } - } - - nullableCases(describePrefix) { - - describeFun("$anyOfNullable for nullable") { - - val list = listOf(null, 1.0, null, 3.0) - val fluent = verbs.checkImmediately(list) - context("iterable $list") { - context("happy cases (do not throw)") { - test("$toBeFun(1.0)") { - fluent.anyOfNullableFun { toBe(1.0) } - } - test("null") { - fluent.anyOfNullableFun(null) - } - } - - context("failing cases") { - test("$toBeFun(2.0)") { - expect { - fluent.anyOfNullableFun { toBe(2.0) } - }.toThrow { - message { - contains.exactly(1).values( - "$rootBulletPoint$containsInAnyOrder: $separator", - "$anEntryWhich: $separator", - "$toBeDescr: 2.0", - "$numberOfOccurrences: 0", - "$atLeast: 1" - ) - } - } - } - } - } - - context("iterable $oneToSeven") { - test("null, throws an AssertionError") { - expect { - assert(oneToSeven).anyOfNullableFun(null) - }.toThrow { - message { - contains.exactly(1).values( - "$rootBulletPoint$containsInAnyOrder: $separator", - "$anEntryWhich: $separator", - "$isDescr: null", - "$numberOfOccurrences: 0", - "$atLeast: 1" - ) - } - } - } - } - } - } -}) diff --git a/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/IterableContainsEntriesSpecBase.kt b/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/IterableContainsEntriesSpecBase.kt deleted file mode 100644 index bbe1de77b..000000000 --- a/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/IterableContainsEntriesSpecBase.kt +++ /dev/null @@ -1,62 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") - -package ch.tutteli.atrium.spec.integration - -import ch.tutteli.atrium.api.cc.en_GB.isGreaterThan -import ch.tutteli.atrium.api.cc.en_GB.isLessThan -import ch.tutteli.atrium.api.cc.en_GB.returnValueOf -import ch.tutteli.atrium.api.cc.en_GB.toBe -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.spec.AssertionVerbFactory -import ch.tutteli.atrium.translations.DescriptionBasic.IS -import ch.tutteli.atrium.translations.DescriptionBasic.TO_BE -import ch.tutteli.atrium.translations.DescriptionComparableAssertion -import ch.tutteli.atrium.translations.DescriptionIterableAssertion -import org.jetbrains.spek.api.dsl.Spec -import org.jetbrains.spek.api.dsl.SpecBody -import kotlin.reflect.KFunction -import kotlin.reflect.KFunction0 - -@Deprecated("Switch from Assert to Expect and use Spec from atrium-specs-common; will be removed with 1.0.0") -abstract class IterableContainsEntriesSpecBase(verbs: AssertionVerbFactory, spec: Spec.() -> Unit) : IterableContainsSpecBase(spec) { - init { - val plant: Assert = verbs.checkImmediately(1.0) - isLessThanFun = plant::isLessThan.name - isGreaterThanFun = plant::isGreaterThan.name - toBeFun = plant::toBe.name - //TODO make simpler once https://youtrack.jetbrains.com/issue/KT-12963 is fixed - val f: (KFunction0) -> Assert = plant::returnValueOf - returnValueOfFun = (f as KFunction<*>).name - } - - companion object { - var isLessThanFun = "" - var isGreaterThanFun = "" - var toBeFun = "" - var returnValueOfFun = "" - val anEntryWhich = DescriptionIterableAssertion.AN_ENTRY_WHICH.getDefault() - val isLessThanDescr = DescriptionComparableAssertion.IS_LESS_THAN.getDefault() - val isGreaterThanDescr = DescriptionComparableAssertion.IS_GREATER_THAN.getDefault() - val toBeDescr = TO_BE.getDefault() - val isDescr = IS.getDefault() - - fun SpecBody.nonNullableCases( - describePrefix: String, - containsPair: Pair>.(Assert.() -> Unit, Array.() -> Unit>) -> Assert>>, - containsNullablePair: Pair>.((Assert.() -> Unit)?, Array.() -> Unit)?>) -> Assert>>, - action: SpecBody.(Assert>.(Assert.() -> Unit, Array.() -> Unit>) -> Any) -> Unit - ) { - group("$describePrefix describe non-nullable cases") { - mapOf>.(Assert.() -> Unit, Array.() -> Unit>) -> Any>( - containsPair.first to { a, aX -> containsPair.second(this, a, aX) }, - containsNullablePair.first to { a, aX -> containsNullablePair.second(this, a, aX) } - ).forEach { (describe, containsEntriesFunArr) -> - describeFun(describe) { - action(containsEntriesFunArr) - } - } - } - } - } -} diff --git a/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/IterableContainsInAnyOrderAtLeast1EntriesAssertionsSpec.kt b/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/IterableContainsInAnyOrderAtLeast1EntriesAssertionsSpec.kt deleted file mode 100644 index 79389db12..000000000 --- a/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/IterableContainsInAnyOrderAtLeast1EntriesAssertionsSpec.kt +++ /dev/null @@ -1,230 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") - -package ch.tutteli.atrium.spec.integration - -import ch.tutteli.atrium.api.cc.en_GB.* -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.spec.AssertionVerbFactory -import ch.tutteli.atrium.translations.DescriptionIterableAssertion -import org.jetbrains.spek.api.dsl.context -import org.jetbrains.spek.api.dsl.it -import org.jetbrains.spek.api.include - -@Deprecated("Switch from Assert to Expect and use Spec from atrium-specs-common; will be removed with 1.0.0") -abstract class IterableContainsInAnyOrderAtLeast1EntriesAssertionsSpec( - verbs: AssertionVerbFactory, - containsInAnyOrderEntriesPair: Pair>.(Assert.() -> Unit, Array.() -> Unit>) -> Assert>>, - containsInAnyOrderNullableEntriesPair: Pair>.((Assert.() -> Unit)?, Array.() -> Unit)?>) -> Assert>>, - rootBulletPoint: String, - describePrefix: String = "[Atrium] " -) : IterableContainsEntriesSpecBase(verbs, { - - include(@Suppress("DEPRECATION") object : SubjectLessAssertionSpec>(describePrefix, - containsInAnyOrderEntriesPair.first to mapToCreateAssertion { containsInAnyOrderEntriesPair.second(this, { toBe(2.5) }, arrayOf()) }, - "${containsInAnyOrderNullableEntriesPair.first} for nullable" to mapToCreateAssertion { containsInAnyOrderNullableEntriesPair.second(this, null, arrayOf()) } - ) {}) - - include(@Suppress("DEPRECATION") object : CheckingAssertionSpec>(verbs, describePrefix, - checkingTriple(containsInAnyOrderEntriesPair.first, { containsInAnyOrderEntriesPair.second(this, { toBe(2.5) }, arrayOf()) }, listOf(2.5).asIterable(), listOf()), - checkingTriple("${containsInAnyOrderNullableEntriesPair.first} for nullable", { containsInAnyOrderNullableEntriesPair.second(this, { toBe(2.5) }, arrayOf()) }, listOf(2.5).asIterable(), listOf()) - ) {}) - - val assert: (Iterable) -> Assert> = verbs::checkImmediately - val expect = verbs::checkException - - val (containsInAnyOrderNullableEntries, containsInAnyOrderNullableEntriesFunArr) = containsInAnyOrderNullableEntriesPair - fun Assert>.containsInAnyOrderNullableEntriesFun(t: (Assert.() -> Unit)?, vararg tX: (Assert.() -> Unit)?) - = containsInAnyOrderNullableEntriesFunArr(t, tX) - - nonNullableCases( - describePrefix, - containsInAnyOrderEntriesPair, - containsInAnyOrderNullableEntriesPair - ) { containsEntriesFunArr -> - - fun Assert>.containsEntriesFun(t: Assert.() -> Unit, vararg tX: Assert.() -> Unit) - = containsEntriesFunArr(t, tX) - - context("empty collection") { - val fluentEmpty = assert(setOf()) - test("$isLessThanFun(1.0) throws AssertionError") { - expect { - fluentEmpty.containsEntriesFun({ isLessThan(1.0) }) - }.toThrow { - message { - contains.exactly(1).values( - "$rootBulletPoint$containsInAnyOrder: $separator", - "$anEntryWhich: $separator", - "$isLessThanDescr: 1.0", - "$numberOfOccurrences: 0", - "$atLeast: 1" - ) - } - } - } - test("$isLessThanFun(1.0) and $isGreaterThanFun(2.0) throws AssertionError") { - expect { - fluentEmpty.containsEntriesFun({ isLessThan(1.0) }, { isGreaterThan(2.0) }) - }.toThrow { - message { - contains.exactly(2).values( - "$anEntryWhich: $separator", - "$numberOfOccurrences: 0", - "$atLeast: 1" - ) - contains.exactly(1).values( - "$rootBulletPoint$containsInAnyOrder: $separator", - "$isLessThanDescr: 1.0", - "$isGreaterThanDescr: 2.0" - ) - } - } - } - // message changed in new infix-API, not going to test it any more (is covered by bc-tests) -// test("$returnValueOfFun(...) states warning that subject is not set") { -// expect { -// fluentEmpty.containsEntriesFun({ -// @Suppress("DEPRECATION") -// returnValueOf(subject::dec).toBe(1.0) -// }) -// }.toThrow { messageContains(DescriptionIterableAssertion.CANNOT_EVALUATE_SUBJECT_EMPTY_ITERABLE.getDefault()) } -// } - } - - val fluent = assert(oneToSeven) - context("iterable $oneToSeven") { - context("search for entry which $isGreaterThanFun(1.0) and $isLessThanFun(2.0)") { - it("throws AssertionError containing both assumptions in one assertion") { - expect { - fluent.containsEntriesFun({ isGreaterThan(1.0); isLessThan(2.0) }) - }.toThrow { - message { - contains.exactly(1).values( - "$rootBulletPoint$containsInAnyOrder: $separator", - "$anEntryWhich: $separator", - "$isGreaterThanDescr: 1.0", - "$isLessThanDescr: 2.0", - "$numberOfOccurrences: 0", - "$atLeast: 1" - ) - } - } - } - } - - context("search for entry which $isGreaterThanFun(1.0) and $isLessThanFun(2.1)") { - it("does not throw an exception") { - fluent.containsEntriesFun({ isGreaterThan(1.0); isLessThan(2.1) }) - } - } - - context("search for entry which $isGreaterThanFun(1.0) and $isLessThanFun(2.1) and another entry which is $isLessThanFun(2.0)") { - it("does not throw an exception") { - //finds twice the entry 1.0 but that is fine since we do not search for unique entries in this case - fluent.containsEntriesFun({ isGreaterThan(1.0); isLessThan(2.1) }, { isLessThan(2.0) }) - } - } - - } - - // the new infix throws now an AssertionError instead - not going to test it any more (is covered by bc-tests) -// context("search for entry where the lambda does not specify any assertion") { -// it("throws an ${IllegalArgumentException::class.simpleName}") { -// expect { -// fluent.containsEntriesFun({}) -// }.toThrow { messageContains("not any assertion created") } -// } -// } - } - - nullableCases(describePrefix) { - - describeFun("$containsInAnyOrderNullableEntries for nullable") { - absentSubjectTests(verbs, Assert>::containsInAnyOrderNullableEntriesFun) - - val list = listOf(null, 1.0, null, 3.0) - val fluent = verbs.checkImmediately(list) - context("iterable $list") { - context("happy cases (do not throw)") { - test("$toBeFun(1.0)") { - fluent.containsInAnyOrderNullableEntriesFun({ toBe(1.0) }) - } - test("null") { - fluent.containsInAnyOrderNullableEntriesFun(null) - } - test("$toBeFun(1.0) and null") { - fluent.containsInAnyOrderNullableEntriesFun({ toBe(1.0) }, null) - } - test("$toBeFun(3.0), null and $toBeFun(1.0)") { - fluent.containsInAnyOrderNullableEntriesFun({ toBe(3.0) }, null, { toBe(1.0) }) - } - test("null, null, null") { - //finds twice the same entry with null but that is fine since we do not search for unique entries in this case - fluent.containsInAnyOrderNullableEntriesFun(null, null, null) - } - } - - context("failing cases") { - test("$toBeFun(2.0)") { - expect { - fluent.containsInAnyOrderNullableEntriesFun({ toBe(2.0) }) - }.toThrow { - messageContains( - "$rootBulletPoint$containsInAnyOrder: $separator", - "$anEntryWhich: $separator", - "$toBeDescr: 2.0", - "$numberOfOccurrences: 0", - "$atLeast: 1" - ) - } - } - - test("$isLessThanFun(1.0) and $isLessThanFun(3.0)") { - expect { - fluent.containsInAnyOrderNullableEntriesFun({ isLessThan(1.0) }, { isGreaterThan(3.0) }) - }.toThrow { - message { - contains.exactly(2).values( - "$anEntryWhich: $separator", - "$numberOfOccurrences: 0", - "$atLeast: 1" - ) - contains.exactly(1).values( - "$rootBulletPoint$containsInAnyOrder: $separator", - "$isLessThanDescr: 1.0", - "$isGreaterThanDescr: 3.0" - ) - } - } - } - } - } - - context("iterable $oneToSeven") { - test("null, throws an AssertionError") { - expect { - assert(oneToSeven).containsInAnyOrderNullableEntriesFun(null) - }.toThrow { - messageContains( - "$rootBulletPoint$containsInAnyOrder: $separator", - "$anEntryWhich: $separator", - "$isDescr: null", - "$numberOfOccurrences: 0", - "$atLeast: 1" - ) - } - } - } - - // the new infix throws now an AssertionError instead - not going to test it any more (is covered by bc-tests) -// context("search for entry where the lambda does not specify any assertion") { -// it("throws an ${IllegalArgumentException::class.simpleName}") { -// expect { -// fluent.containsInAnyOrderNullableEntriesFun({}) -// }.toThrow { messageContains("not any assertion created") } -// } -// } - } - } -}) diff --git a/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/IterableContainsInAnyOrderAtLeast1ValuesAssertionsSpec.kt b/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/IterableContainsInAnyOrderAtLeast1ValuesAssertionsSpec.kt deleted file mode 100644 index 11de3807b..000000000 --- a/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/IterableContainsInAnyOrderAtLeast1ValuesAssertionsSpec.kt +++ /dev/null @@ -1,164 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") - -package ch.tutteli.atrium.spec.integration - -import ch.tutteli.atrium.api.cc.en_GB.* -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.spec.AssertionVerbFactory -import ch.tutteli.atrium.translations.DescriptionIterableAssertion -import org.jetbrains.spek.api.dsl.context -import org.jetbrains.spek.api.dsl.describe -import org.jetbrains.spek.api.include - -@Deprecated("Switch from Assert to Expect and use Spec from atrium-specs-common; will be removed with 1.0.0") -abstract class IterableContainsInAnyOrderAtLeast1ValuesAssertionsSpec( - verbs: AssertionVerbFactory, - containsInAnyOrderValuesPair: Pair>.(Double, Array) -> Assert>>, - containsInAnyOrderNullableValuesPair: Pair>.(Double?, Array) -> Assert>>, - rootBulletPoint: String, - describePrefix: String = "[Atrium] " -) : IterableContainsSpecBase({ - - include(@Suppress("DEPRECATION") object : SubjectLessAssertionSpec>(describePrefix, - containsInAnyOrderValuesPair.first to mapToCreateAssertion { containsInAnyOrderValuesPair.second(this, 1.2, arrayOf()) }, - "${containsInAnyOrderNullableValuesPair.first} for nullable" to mapToCreateAssertion { containsInAnyOrderNullableValuesPair.second(this, null, arrayOf()) } - ) {}) - - include(@Suppress("DEPRECATION") object : CheckingAssertionSpec>(verbs, describePrefix, - checkingTriple(containsInAnyOrderValuesPair.first, { containsInAnyOrderValuesPair.second(this, 1.2, arrayOf()) }, listOf(1.2).asIterable(), listOf()), - checkingTriple("${containsInAnyOrderNullableValuesPair.first} for nullable", { containsInAnyOrderNullableValuesPair.second(this, 1.2, arrayOf()) }, listOf(1.2).asIterable(), listOf()) - ) {}) - - val assert: (Iterable) -> Assert> = verbs::checkImmediately - val expect = verbs::checkException - - val (containsInAnyOrderNullableValues, containsInAnyOrderNullableValuesFunArr) = containsInAnyOrderNullableValuesPair - fun Assert>.containsInAnyOrderNullableValuesFun(t: Double?, vararg tX: Double?) - = containsInAnyOrderNullableValuesFunArr(t, tX) - - nonNullableCases( - describePrefix, - containsInAnyOrderValuesPair, - containsInAnyOrderNullableValuesPair - ) { containsValuesFunArr -> - fun Assert>.containsFun(t: Double, vararg tX: Double) = - containsValuesFunArr(t, tX.toTypedArray()) - - - context("empty collection") { - val fluentEmptyString = assert(setOf()) - test("1.0 throws AssertionError") { - expect { - fluentEmptyString.containsFun(1.0) - }.toThrow { - messageContains( - "$rootBulletPoint$containsInAnyOrder: $separator", - "$anEntryWhichIs: 1.0", - "$numberOfOccurrences: 0", - "$atLeast: 1" - ) - } - } - } - - val fluent = assert(oneToSeven) - context("iterable '$oneToSeven'") { - - describe("happy cases") { - (1..7).forEach { - val d = it.toDouble() - test("$d does not throw") { - fluent.containsFun(d) - } - } - test("1.0 and 4.0 does not throw") { - fluent.containsFun(1.0, 4.0) - } - test("1.0 and 1.0 (searching twice in the same assertion) does not throw") { - fluent.containsFun(1.0, 1.0) - } - } - - describe("error cases") { - test("9.5 throws AssertionError") { - expect { - fluent.containsFun(9.5) - }.toThrow { - messageContains( - "$rootBulletPoint$containsInAnyOrder: $separator", - "$anEntryWhichIs: 9.5", - "$numberOfOccurrences: 0", - "$atLeast: 1" - ) - } - } - test("9.5 and 7.1 throws AssertionError") { - expect { - fluent.containsFun(9.5, 7.1) - }.toThrow { - message { - contains.exactly(2).values( - "$numberOfOccurrences: 0", - "$atLeast: 1" - ) - contains.exactly(1).values( - "$rootBulletPoint$containsInAnyOrder: $separator", - "$anEntryWhichIs: 9.5", - "$anEntryWhichIs: 7.1" - ) - } - } - } - test("1.0 and 9.5 throws AssertionError") { - expect { - fluent.containsFun(1.0, 9.5) - }.toThrow { - message { - containsRegex("$containsInAnyOrder: $separator.*$anEntryWhichIs: 9.5") - containsNot.regex("$containsInAnyOrder: $separator.*$anEntryWhichIs: 1.0") - } - } - } - - } - } - } - - nullableCases(describePrefix){ - - describeFun("$containsInAnyOrderNullableValues for nullable") { - - val list = listOf(null, 1.0, null, 3.0) - val fluent = verbs.checkImmediately(list) - - context("iterable $list") { - listOf( - 1.0 to arrayOf(), - 3.0 to arrayOf(), - null to arrayOf(), - null to arrayOf(3.0, null), - null to arrayOf(1.0), - 1.0 to arrayOf(3.0, null) - ).forEach { (first, rest) -> - val restText = if (rest.isEmpty()) "" else ", ${rest.joinToString()}" - - context("search for $first$restText") { - test("$first$restText does not throw") { - fluent.containsInAnyOrderNullableValuesFun(first, *rest) - } - } - - } - - context("search for 2.5") { - test("2.5 throws AssertionError") { - expect { - fluent.containsInAnyOrderNullableValuesFun(2.5) - }.toThrow { messageContains(DescriptionIterableAssertion.CONTAINS.getDefault()) } - } - } - } - } - } -}) diff --git a/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/IterableContainsInAnyOrderAtLeastValuesAssertionSpec.kt b/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/IterableContainsInAnyOrderAtLeastValuesAssertionSpec.kt deleted file mode 100644 index 97ce3d84d..000000000 --- a/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/IterableContainsInAnyOrderAtLeastValuesAssertionSpec.kt +++ /dev/null @@ -1,240 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") - -package ch.tutteli.atrium.spec.integration - -import ch.tutteli.atrium.api.cc.en_GB.* -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.spec.AssertionVerbFactory -import ch.tutteli.atrium.spec.describeFun -import ch.tutteli.atrium.translations.DescriptionIterableAssertion -import ch.tutteli.atrium.translations.DescriptionIterableAssertion.AT_LEAST -import org.jetbrains.spek.api.dsl.SpecBody -import org.jetbrains.spek.api.dsl.context -import org.jetbrains.spek.api.include - -@Deprecated("Switch from Assert to Expect and use Spec from atrium-specs-common; will be removed with 1.0.0") -abstract class IterableContainsInAnyOrderAtLeastValuesAssertionSpec( - verbs: AssertionVerbFactory, - containsAtLeastTriple: Triple String, Assert>.(Int, Double, Array) -> Assert>>, - containsAtLeastButAtMostTriple: Triple String, Assert>.(Int, Int, Double, Array) -> Assert>>, - containsNotPair: Pair String>, - exactlyPair: Pair String>, - errorMsgAtLeastButAtMost: (Int, Int) -> String, - rootBulletPoint: String, - describePrefix: String = "[Atrium] " -) : IterableContainsSpecBase({ - - include(@Suppress("DEPRECATION") object : SubjectLessAssertionSpec>(describePrefix, - containsAtLeastTriple.first to mapToCreateAssertion { containsAtLeastTriple.third(this, 1, 2.3, arrayOf()) }, - containsAtLeastButAtMostTriple.first to mapToCreateAssertion { containsAtLeastButAtMostTriple.third(this, 1, 2, 2.3, arrayOf()) } - ) {}) - - include(@Suppress("DEPRECATION") object : CheckingAssertionSpec>(verbs, describePrefix, - checkingTriple(containsAtLeastTriple.first, { containsAtLeastTriple.third(this, 1, 2.3, arrayOf()) }, listOf(2.3, 2.3).asIterable(), listOf()), - checkingTriple(containsAtLeastButAtMostTriple.first, { containsAtLeastButAtMostTriple.third(this, 1, 2, 2.3, arrayOf()) }, listOf(2.3).asIterable(), listOf()) - ) {}) - - fun describeFun(vararg funName: String, body: SpecBody.() -> Unit) - = describeFun(describePrefix, funName, body = body) - - val assert: (Iterable) -> Assert> = verbs::checkImmediately - val expect = verbs::checkException - val fluent = assert(oneToSeven) - - val (containsAtLeast, containsAtLeastTest, containsAtLeastFunArr) = containsAtLeastTriple - fun Assert>.containsAtLeastFun(atLeast: Int, a: Double, vararg aX: Double) - = containsAtLeastFunArr(atLeast, a, aX.toTypedArray()) - - val (containsAtLeastButAtMost, containsAtLeastButAtMostTest, containsAtLeastButAtMostFunArr) = containsAtLeastButAtMostTriple - fun Assert>.containsAtLeastButAtMostFun(atLeast: Int, atMost: Int, a: Double, vararg aX: Double) - = containsAtLeastButAtMostFunArr(atLeast, atMost, a, aX.toTypedArray()) - - val (containsNot, errorMsgContainsNot) = containsNotPair - val (exactly, errorMsgExactly) = exactlyPair - - describeFun(containsAtLeast, containsAtLeastButAtMost) { - context("throws an $illegalArgumentException") { - test("for at least -1 -- only positive numbers") { - expect { - fluent.containsAtLeastFun(-1, 9.0) - }.toThrow { messageContains("positive number", -1) } - } - test("for at least 0 -- points to $containsNot") { - expect { - fluent.containsAtLeastFun(0, 9.0) - }.toThrow { message { toBe(errorMsgContainsNot(0)) } } - } - group("using $containsAtLeastButAtMost") { - test("for at least 1 but at most -1 -- since -1 is smaller than 1") { - expect { - fluent.containsAtLeastButAtMostFun(1, -1, 9.0) - }.toThrow { message { toBe(errorMsgAtLeastButAtMost(1, -1)) } } - } - test("for at least 1 but at most 0 -- since 0 is smaller than 1") { - expect { - fluent.containsAtLeastButAtMostFun(1, 0, 9.0) - }.toThrow { message { toBe(errorMsgAtLeastButAtMost(1, 0)) } } - } - test("for at least 2 but at most 1 -- since 1 is smaller than 2") { - expect { - fluent.containsAtLeastButAtMostFun(2, 1, 9.0) - }.toThrow { message { toBe(errorMsgAtLeastButAtMost(2, 1)) } } - } - test("for at least 1 but at most 1 -- points to $exactly") { - expect { - fluent.containsAtLeastButAtMostFun(1, 1, 9.0) - }.toThrow { message { toBe(errorMsgExactly(1)) } } - } - } - } - - context("iterable $oneToSeven") { - - group("happy case with $containsAtLeast once") { - test("${containsAtLeastTest("1.0", "once")} does not throw") { - fluent.containsAtLeastFun(1, 1.0) - } - test("${containsAtLeastTest("1.0 and 2.0 and 3.0", "once")} does not throw") { - fluent.containsAtLeastFun(1, 1.0, 2.0, 3.0) - } - test("${containsAtLeastTest("3.0 and 1.0 and 2.0", "once")} does not throw") { - fluent.containsAtLeastFun(1, 3.0, 1.0, 2.0) - } - } - - group("failing cases; search wrong number at different positions with $containsAtLeast once") { - test("${containsAtLeastTest("1.1", "once")} throws AssertionError") { - expect { - fluent.containsAtLeastFun(1, 1.1) - }.toThrow { messageContains("$atLeast: 1", "$anEntryWhichIs: 1.1") } - } - test("${containsAtLeastTest("1.0, 2.3", "once")} throws AssertionError mentioning only 2.3") { - expect { - fluent.containsAtLeastFun(1, 1.0, 2.3) - }.toThrow { - message { - contains("$atLeast: 1", "$anEntryWhichIs: 2.3") - containsNot("$anEntryWhichIs: 1.0") - } - } - } - test("${containsAtLeastTest("2.3, 1.0", "once")} throws AssertionError mentioning only 2.3") { - expect { - fluent.containsAtLeastFun(1, 2.3, 1.0) - }.toThrow { - message { - contains("$atLeast: 1", "$anEntryWhichIs: 2.3") - containsNot("$anEntryWhichIs: 1.0") - } - } - } - test("${containsAtLeastTest("1.0, 2.3, 3.1 and 6.0", "once")} throws AssertionError") { - expect { - fluent.containsAtLeastFun(1, 1.0, 2.3, 3.1, 6.0) - }.toThrow { - message { - contains.exactly(2).values( - "$numberOfOccurrences: 0", - "$atLeast: 1" - ) - contains.exactly(1).values( - "$rootBulletPoint$containsInAnyOrder: $separator", - "$anEntryWhichIs: 2.3", - "$anEntryWhichIs: 3.1" - ) - } - } - } - } - - group("multiple occurrences of the search string") { - test("${containsAtLeastTest("5.0", "once")} does not throw") { - fluent.containsAtLeastFun(1, 5.0) - } - test("${containsAtLeastTest("5.0", "twice")} does not throw") { - fluent.containsAtLeastFun(2, 5.0) - } - - test("${containsAtLeastTest("5.0", "3 times")} throws AssertionError and message contains both, how many times we expected (3) and how many times it actually contained 5.0 (2)") { - expect { - fluent.containsAtLeastFun(3, 5.0) - }.toThrow { - message { - contains( - "$rootBulletPoint$containsInAnyOrder: $separator", - "$anEntryWhichIs: 5.0", - "$numberOfOccurrences: 2$separator" - ) - endsWith("$atLeast: 3") - } - } - } - - test("${containsAtLeastTest("5.0 and 4.0", "twice")} does not throw") { - fluent.containsAtLeastFun(2, 5.0, 4.0) - } - test("${containsAtLeastTest("4.0", "3 times")} does not throw") { - fluent.containsAtLeastFun(3, 4.0) - } - - test("${containsAtLeastTest("5.0 and 4.0", "3 times")} throws AssertionError and message contains both, at least: 3 and how many times it actually contained 5.0 (2)") { - expect { - fluent.containsAtLeastFun(3, 5.0, 4.0) - }.toThrow { - message { - contains( - "$rootBulletPoint$containsInAnyOrder: $separator", - "$anEntryWhichIs: 5.0", - "$numberOfOccurrences: 2$separator" - ) - endsWith("$atLeast: 3") - containsNot("$anEntryWhichIs: 4.0") - } - } - } - } - - group("using $containsAtLeastButAtMost") { - test("${containsAtLeastButAtMostTest("5.0", "once", "twice")} does not throw") { - fluent.containsAtLeastButAtMostFun(1, 2, 5.0) - } - test("${containsAtLeastButAtMostTest("5.0 and 4.0", "once", "twice")} throws AssertionError and message contains both, at most: 2 and how many times it actually contained 4.0 (3)") { - expect { - fluent.containsAtLeastButAtMostFun(1, 2, 5.0, 4.0) - }.toThrow { - message { - contains( - "$rootBulletPoint$containsInAnyOrder: $separator", - "$anEntryWhichIs: 4.0", - "$numberOfOccurrences: 3$separator" - ) - endsWith("$atMost: 2") - containsNot(atLeast, "$anEntryWhichIs: 5.0") - } - } - } - test("${containsAtLeastButAtMostTest("5.0 and 4.0", "twice", "3 times")} does not throw") { - - fluent.containsAtLeastButAtMostFun(2, 3, 5.0, 4.0) - } - - test("${containsAtLeastButAtMostTest("5.0 and 4.0", "3 times", "4 times")} throws AssertionError and message contains both, at least: 3 and how many times it actually contained 5.0 (2)") { - expect { - fluent.containsAtLeastButAtMostFun(3, 4, 5.0, 4.0) - }.toThrow { - message { - contains( - "$rootBulletPoint$containsInAnyOrder: $separator", - "$anEntryWhichIs: 5.0", - "$numberOfOccurrences: 2$separator" - ) - endsWith("$atLeast: 3") - containsNot(atMost, "$anEntryWhichIs: 4.0") - } - } - } - } - } - } -}) diff --git a/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/IterableContainsInAnyOrderAtMostValuesAssertionSpec.kt b/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/IterableContainsInAnyOrderAtMostValuesAssertionSpec.kt deleted file mode 100644 index 540126c28..000000000 --- a/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/IterableContainsInAnyOrderAtMostValuesAssertionSpec.kt +++ /dev/null @@ -1,176 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") - -package ch.tutteli.atrium.spec.integration - -import ch.tutteli.atrium.api.cc.en_GB.* -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.spec.AssertionVerbFactory -import ch.tutteli.atrium.spec.describeFun -import org.jetbrains.spek.api.dsl.SpecBody -import org.jetbrains.spek.api.dsl.context -import org.jetbrains.spek.api.include - -@Deprecated("Switch from Assert to Expect and use Spec from atrium-specs-common; will be removed with 1.0.0") -abstract class IterableContainsInAnyOrderAtMostValuesAssertionSpec( - verbs: AssertionVerbFactory, - containsAtMostTriple: Triple String, Assert>.(Int, Double, Array) -> Assert>>, - containsNotPair: Pair String>, - exactlyPair: Pair String>, - rootBulletPoint: String, - describePrefix: String = "[Atrium] " -) : IterableContainsSpecBase({ - - include(@Suppress("DEPRECATION") object : SubjectLessAssertionSpec>(describePrefix, - containsAtMostTriple.first to mapToCreateAssertion { containsAtMostTriple.third(this, 2, 2.3, arrayOf()) } - ) {}) - - include(@Suppress("DEPRECATION") object : CheckingAssertionSpec>(verbs, describePrefix, - checkingTriple(containsAtMostTriple.first, { containsAtMostTriple.third(this, 2, 2.3, arrayOf()) }, listOf(2.3, 2.3).asIterable(), listOf(2.3, 2.3, 2.3)) - ) {}) - - fun describeFun(vararg funName: String, body: SpecBody.() -> Unit) - = describeFun(describePrefix, funName, body = body) - - val assert: (Iterable) -> Assert> = verbs::checkImmediately - val expect = verbs::checkException - val fluent = assert(oneToSeven) - - val (containsAtMost, containsAtMostTest, containsAtMostFunArr) = containsAtMostTriple - fun Assert>.containsAtMostFun(atLeast: Int, a: Double, vararg aX: Double) - = containsAtMostFunArr(atLeast, a, aX.toTypedArray()) - - val (containsNot, errorMsgContainsNot) = containsNotPair - val (exactly, errorMsgExactly) = exactlyPair - - describeFun(containsAtMost) { - - context("throws an $illegalArgumentException") { - test("for at most -1 -- only positive numbers") { - expect { - fluent.containsAtMostFun(-1, 0.0) - }.toThrow { messageContains("positive number", -1) } - } - test("for at most 0 -- points to $containsNot") { - expect { - fluent.containsAtMostFun(0, 0.0) - }.toThrow { message { toBe(errorMsgContainsNot(0)) } } - } - test("for at most 1 -- points to $exactly") { - expect { - fluent.containsAtMostFun(1, 0.0) - }.toThrow { message { toBe(errorMsgExactly(1)) } } - } - } - - context("iterable $oneToSeven") { - group("happy case with $containsAtMost twice") { - test("${containsAtMostTest("1.0", "once")} does not throw") { - fluent.containsAtMostFun(2, 1.0) - } - test("${containsAtMostTest("1.0 and 2.0 and 3.0", "once")} does not throw") { - fluent.containsAtMostFun(2, 1.0, 2.0, 3.0) - } - test("${containsAtMostTest("3.0 and 1.0 and 2.0", "once")} does not throw") { - fluent.containsAtMostFun(2, 3.0, 1.0, 2.0) - } - } - - group("failing cases; search string at different positions") { - test("${containsAtMostTest("4.0", "twice")} throws AssertionError") { - expect { - fluent.containsAtMostFun(2, 4.0) - }.toThrow { messageContains("$atMost: 2", "$anEntryWhichIs: 4.0") } - } - test("${containsAtMostTest("1.0, 4.0", "twice")} throws AssertionError mentioning only 4.0") { - expect { - fluent.containsAtMostFun(2, 1.0, 4.0) - }.toThrow { - message { - contains("$atMost: 2", "$anEntryWhichIs: 4.0") - containsNot("$anEntryWhichIs: 1.0") - } - } - } - test("${containsAtMostTest("4.0, 1.0", "twice")} once throws AssertionError mentioning only 4.0") { - expect { - fluent.containsAtMostFun(2, 4.0, 1.0) - }.toThrow { - message { - contains("$atMost: 2", "$anEntryWhichIs: 4.0") - containsNot("$anEntryWhichIs: 1.0") - } - } - } - test("${containsAtMostTest("5.0, 3.1, 3.0, 4.0", "twice")} throws AssertionError") { - expect { - fluent.containsAtMostFun(2, 5.0, 3.1, 3.0, 4.0) - }.toThrow { - message { - contains.exactly(1).values( - "$rootBulletPoint$containsInAnyOrder: $separator", - "$anEntryWhichIs: 3.1", - "$numberOfOccurrences: 0", - "$atLeast: 1", - "$anEntryWhichIs: 4.0", - "$numberOfOccurrences: 3", - "$atMost: 2" - ) - } - } - } - test("${containsAtMostTest("21.1 and 34.0 and 11.23", "twice")} throws AssertionError") { - expect { - fluent.containsAtMostFun(2, 21.1, 34.0, 11.23) - }.toThrow { - message { - contains.exactly(3).values( - "$numberOfOccurrences: 0", - "$atLeast: 1" - ) - contains.exactly(1).values( - "$rootBulletPoint$containsInAnyOrder: $separator", - "$anEntryWhichIs: 21.1", - "$anEntryWhichIs: 34.0", - "$anEntryWhichIs: 11.23" - ) - } - } - } - } - - group("multiple occurrences of the search string") { - - test("${containsAtMostTest("5.0", "twice")} does not throw") { - fluent.containsAtMostFun(2, 5.0) - } - - test("${containsAtMostTest("5.0", "3 times")} does not throw") { - fluent.containsAtMostFun(3, 5.0) - } - test("${containsAtMostTest("5.0 and 4.0", "twice")} throws AssertionError and message contains both, how many times we expected (2) and how many times it actually contained 4.0 (3)") { - expect { - fluent.containsAtMostFun(2, 5.0, 4.0) - }.toThrow { - message { - contains( - "$rootBulletPoint$containsInAnyOrder: $separator", - "$anEntryWhichIs: 4.0", - "$numberOfOccurrences: 3$separator" - ) - endsWith("$atMost: 2") - containsNot("$anEntryWhichIs: 5.0") - } - } - } - test("${containsAtMostTest("4.0", "3 times")} does not throw") { - fluent.containsAtMostFun(3, 4.0) - } - test("${containsAtMostTest("5.0 and 4.0", "3 times")} does not throw") { - fluent.containsAtMostFun(3, 5.0, 4.0) - } - - } - } - } -}) diff --git a/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/IterableContainsInAnyOrderExactlyValuesAssertionsSpec.kt b/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/IterableContainsInAnyOrderExactlyValuesAssertionsSpec.kt deleted file mode 100644 index b9520fcf1..000000000 --- a/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/IterableContainsInAnyOrderExactlyValuesAssertionsSpec.kt +++ /dev/null @@ -1,186 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") - -package ch.tutteli.atrium.spec.integration - -import ch.tutteli.atrium.api.cc.en_GB.* -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.spec.AssertionVerbFactory -import ch.tutteli.atrium.spec.describeFun -import ch.tutteli.atrium.translations.DescriptionIterableAssertion -import ch.tutteli.atrium.translations.DescriptionIterableAssertion.EXACTLY -import org.jetbrains.spek.api.dsl.SpecBody -import org.jetbrains.spek.api.dsl.context -import org.jetbrains.spek.api.include - -@Deprecated("Switch from Assert to Expect and use Spec from atrium-specs-common; will be removed with 1.0.0") -abstract class IterableContainsInAnyOrderExactlyValuesAssertionsSpec( - verbs: AssertionVerbFactory, - containsExactlyTriple: Triple String, Assert>.(Int, Double, Array) -> Assert>>, - containsNotPair: Pair String>, - rootBulletPoint: String, - describePrefix: String = "[Atrium] " -) : IterableContainsSpecBase({ - - include(@Suppress("DEPRECATION") object : SubjectLessAssertionSpec>(describePrefix, - containsExactlyTriple.first to mapToCreateAssertion { containsExactlyTriple.third(this, 2, 2.3, arrayOf()) } - ) {}) - - include(@Suppress("DEPRECATION") object : CheckingAssertionSpec>(verbs, describePrefix, - checkingTriple(containsExactlyTriple.first, { containsExactlyTriple.third(this, 2, 2.3, arrayOf()) }, listOf(2.3, 2.3).asIterable(), listOf(2.3)) - ) {}) - - fun describeFun(vararg funName: String, body: SpecBody.() -> Unit) - = describeFun(describePrefix, funName, body = body) - - val assert: (Iterable) -> Assert> = verbs::checkImmediately - val expect = verbs::checkException - val fluent = assert(oneToSeven) - - val (containsExactly, containsExactlyTest, containsExactlyFunArr) = containsExactlyTriple - fun Assert>.containsExactlyFun(atLeast: Int, a: Double, vararg aX: Double) - = containsExactlyFunArr(atLeast, a, aX.toTypedArray()) - - val (containsNot, errorMsgContainsNot) = containsNotPair - - val exactly = EXACTLY.getDefault() - - describeFun(containsExactly) { - context("throws an $illegalArgumentException") { - test("for exactly -1 -- only positive numbers") { - expect { - fluent.containsExactlyFun(-1, 0.0) - }.toThrow { messageContains("positive number", -1) } - } - test("for exactly 0 -- points to $containsNot") { - expect { - fluent.containsExactlyFun(0, 0.0) - }.toThrow { message { toBe(errorMsgContainsNot(0)) } } - } - } - - context("iterable $oneToSeven") { - - group("happy case with $containsExactly once") { - test("${containsExactlyTest("1.0", "once")} does not throw") { - fluent.containsExactlyFun(1, 1.0) - } - test("${containsExactlyTest("1.0 and 2.0 and 3.0", "once")} does not throw") { - fluent.containsExactlyFun(1, 1.0, 2.0, 3.0) - } - test("${containsExactlyTest("3.0 and 1.0 and 2.0", "once")} does not throw") { - fluent.containsExactlyFun(1, 3.0, 1.0, 2.0) - } - } - - group("failing cases; search string at different positions with $containsExactly once") { - test("${containsExactlyTest("4.0", "once")} throws AssertionError") { - expect { - fluent.containsExactlyFun(1, 4.0) - }.toThrow { messageContains("$exactly: 1", "$anEntryWhichIs: 4.0") } - } - - test("${containsExactlyTest("1.0, 2.3", "once")} throws AssertionError mentioning only 2.3") { - expect { - fluent.containsExactlyFun(1, 1.0, 2.3) - }.toThrow { - message { - contains("$exactly: 1", "$anEntryWhichIs: 2.3") - containsNot("$anEntryWhichIs: 1.0") - } - } - } - - test("${containsExactlyTest("2.3, 1.0", "once")} throws AssertionError mentioning only 2.3") { - expect { - fluent.containsExactlyFun(1, 2.3, 1.0) - }.toThrow { - message { - contains("$exactly: 1", "$anEntryWhichIs: 2.3") - containsNot("$anEntryWhichIs: 1.0") - } - } - } - - test("${containsExactlyTest("1.0 and 2.3 and 3.1", "once")} throws AssertionError") { - expect { - fluent.containsExactlyFun(1, 1.0, 2.3, 3.1) - }.toThrow { - message { - contains(exactly, 2.3, 3.1) - contains.exactly(2).values( - "$numberOfOccurrences: 0", - "$exactly: 1" - ) - contains.exactly(1).values( - "$rootBulletPoint$containsInAnyOrder: $separator", - "$anEntryWhichIs: 2.3", - "$anEntryWhichIs: 3.1" - ) - } - } - } - } - - group("multiple occurrences of the search string") { - test("${containsExactlyTest("5.0", "once")} throws AssertionError") { - expect { - fluent.containsExactlyFun(1, 5.0) - }.toThrow { messageContains(EXACTLY.getDefault()) } - } - test("${containsExactlyTest("5.0", "twice")} does not throw") { - fluent.containsExactlyFun(2, 5.0) - } - - test("${containsExactlyTest("5.0", "3 times")} throws AssertionError and message contains both, how many times we expected (3) and how many times it actually contained 5.0 (2)") { - expect { - fluent.containsExactlyFun(3, 5.0) - }.toThrow { - message { - contains( - "$rootBulletPoint$containsInAnyOrder: $separator", - "$anEntryWhichIs: 5.0", - "$numberOfOccurrences: 2$separator" - ) - endsWith("$exactly: 3") - } - } - } - - test("${containsExactlyTest("5.0 and 4.0", "twice")} throws AssertionError") { - expect { - fluent.containsExactlyFun(2, 5.0, 4.0) - }.toThrow { - message { - contains( - "$rootBulletPoint$containsInAnyOrder: $separator", - "$anEntryWhichIs: 4.0", - "$numberOfOccurrences: 3$separator" - ) - endsWith("$exactly: 2") - containsNot("$anEntryWhichIs: 5.0") - } - } - } - test("${containsExactlyTest("4.0", "3 times")} does not throw") { - fluent.containsExactlyFun(3, 4.0) - } - test("${containsExactlyTest("5.0 and 4.0", "3 times")} throws AssertionError and message contains both, how many times we expected (3) and how many times it actually contained 5.0 (2)") { - expect { - fluent.containsExactlyFun(3, 5.0, 4.0) - }.toThrow { - message { - contains( - "$rootBulletPoint$containsInAnyOrder: $separator", - "$anEntryWhichIs: 5.0", - "$numberOfOccurrences: 2$separator" - ) - endsWith("$exactly: 3") - containsNot("$anEntryWhichIs: 4.0") - } - } - } - } - } - } -}) diff --git a/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/IterableContainsInAnyOrderNotOrAtMostValuesAssertionsSpec.kt b/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/IterableContainsInAnyOrderNotOrAtMostValuesAssertionsSpec.kt deleted file mode 100644 index fbd9e281e..000000000 --- a/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/IterableContainsInAnyOrderNotOrAtMostValuesAssertionsSpec.kt +++ /dev/null @@ -1,172 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") - -package ch.tutteli.atrium.spec.integration - - -import ch.tutteli.atrium.api.cc.en_GB.* -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.spec.AssertionVerbFactory -import ch.tutteli.atrium.spec.describeFun -import ch.tutteli.atrium.translations.DescriptionIterableAssertion -import ch.tutteli.atrium.translations.DescriptionIterableAssertion.AT_MOST -import org.jetbrains.spek.api.dsl.SpecBody -import org.jetbrains.spek.api.dsl.context -import org.jetbrains.spek.api.include - -@Deprecated("Switch from Assert to Expect and use Spec from atrium-specs-common; will be removed with 1.0.0") -abstract class IterableContainsInAnyOrderNotOrAtMostValuesAssertionsSpec( - verbs: AssertionVerbFactory, - containsNotOrAtMostTriple: Triple String, Assert>.(Int, Double, Array) -> Assert>>, - containsNotPair: Pair String>, - rootBulletPoint: String, - describePrefix: String = "[Atrium] " -) : IterableContainsSpecBase({ - - include(@Suppress("DEPRECATION") object : SubjectLessAssertionSpec>(describePrefix, - containsNotOrAtMostTriple.first to mapToCreateAssertion { containsNotOrAtMostTriple.third(this, 2, 2.3, arrayOf()) } - ) {}) - - include(@Suppress("DEPRECATION") object : CheckingAssertionSpec>(verbs, describePrefix, - checkingTriple(containsNotOrAtMostTriple.first, { containsNotOrAtMostTriple.third(this, 2, 2.3, arrayOf()) }, listOf().asIterable(), listOf(2.3, 2.3, 2.3)) - ) {}) - - fun describeFun(vararg funName: String, body: SpecBody.() -> Unit) - = describeFun(describePrefix, funName, body = body) - - val assert: (Iterable) -> Assert> = verbs::checkImmediately - val expect = verbs::checkException - val fluent = assert(oneToSeven) - - val (containsNotOrAtMost, containsNotOrAtMostTest, containsNotOrAtMostFunArr) = containsNotOrAtMostTriple - fun Assert>.containsNotOrAtMostFun(atLeast: Int, a: Double, vararg aX: Double) - = containsNotOrAtMostFunArr(atLeast, a, aX.toTypedArray()) - val (containsNot, errorMsgContainsNot) = containsNotPair - - describeFun(containsNotOrAtMost) { - - context("throws an $illegalArgumentException") { - test("for not at all or at most -1 -- only positive numbers") { - expect { - fluent.containsNotOrAtMostFun(-1, 0.0) - }.toThrow { messageContains("positive number", -1) } - } - test("for not at all or at most 0 -- points to $containsNot") { - expect { - fluent.containsNotOrAtMostFun(0, 0.0) - }.toThrow { message { toBe(errorMsgContainsNot(0)) } } - } - } - - context("iterable $oneToSeven") { - group("happy case with $containsNotOrAtMost once") { - test("${containsNotOrAtMostTest("1.0", "once")} does not throw") { - fluent.containsNotOrAtMostFun(1, 1.0) - } - test("${containsNotOrAtMostTest("1.0 and 2.0 and 3.0", "once")} does not throw") { - fluent.containsNotOrAtMostFun(1, 1.0, 2.0, 3.0) - } - test("${containsNotOrAtMostTest("3.0 and 1.0 and 2.0", "once")} does not throw") { - fluent.containsNotOrAtMostFun(1, 3.0, 1.0, 2.0) - } - test("${containsNotOrAtMostTest("21.1 and 34.0 and 11.23", "twice")} does not throw") { - fluent.containsNotOrAtMostFun(2, 21.1, 34.0, 11.23) - } - } - - group("failing cases; search string at different positions") { - test("${containsNotOrAtMostTest("4.0", "once")} throws AssertionError") { - expect { - fluent.containsNotOrAtMostFun(1, 4.0) - }.toThrow { messageContains("$atMost: 1", "$anEntryWhichIs: 4.0") } - } - test("${containsNotOrAtMostTest("1.0, 4.0", "once")} throws AssertionError mentioning only 4.0") { - expect { - fluent.containsNotOrAtMostFun(1, 1.0, 4.0) - }.toThrow { - message { - contains("$atMost: 1", "$anEntryWhichIs: 4.0") - containsNot("$anEntryWhichIs: 1.0") - } - } - } - test("${containsNotOrAtMostTest("4.0, 1.0", "once")} once throws AssertionError mentioning only 4.0") { - expect { - fluent.containsNotOrAtMostFun(1, 4.0, 1.0) - }.toThrow { - message { - contains("$atMost: 1", "$anEntryWhichIs: 4.0") - containsNot("$anEntryWhichIs: 1.0") - } - } - } - test("${containsNotOrAtMostTest("5.0, 3.1, 3.0, 4.0", "once")} throws AssertionError") { - expect { - fluent.containsNotOrAtMostFun(1, 5.0, 3.1, 3.0, 4.0) - }.toThrow { - message { - contains.exactly(2).values( - "$atMost: 1" - ) - contains.exactly(1).values( - "$rootBulletPoint$containsInAnyOrder: $separator", - "$anEntryWhichIs: 5.0", - "$numberOfOccurrences: 2", - "$anEntryWhichIs: 4.0", - "$numberOfOccurrences: 3" - ) - } - } - } - } - - group("multiple occurrences of the search string") { - test("${containsNotOrAtMostTest("5.0", "once")} throws AssertionError and message contains both, how many times we expected (1) and how many times it actually contained 5.0 (2)") { - expect { - fluent.containsNotOrAtMostFun(1, 5.0) - }.toThrow { - message { - contains( - "$rootBulletPoint$containsInAnyOrder: $separator", - "$anEntryWhichIs: 5.0", - "$numberOfOccurrences: 2$separator" - ) - endsWith("$atMost: 1") - } - } - } - - test("${containsNotOrAtMostTest("5.0", "twice")} does not throw") { - fluent.containsNotOrAtMostFun(2, 5.0) - } - - - test("${containsNotOrAtMostTest("5.0", "3 times")} does not throw") { - fluent.containsNotOrAtMostFun(3, 5.0) - } - test("${containsNotOrAtMostTest("5.0 and 4.0", "twice")} throws AssertionError and message contains both, how many times we expected (2) and how many times it actually contained 4.0 (3)") { - expect { - fluent.containsNotOrAtMostFun(2, 5.0, 4.0) - }.toThrow { - message { - contains( - "$rootBulletPoint$containsInAnyOrder: $separator", - "$anEntryWhichIs: 4.0", - "$numberOfOccurrences: 3$separator" - ) - endsWith("$atMost: 2") - containsNot("$anEntryWhichIs: 5.0") - } - } - } - test("${containsNotOrAtMostTest("4.0", "3 times")} does not throw") { - fluent.containsNotOrAtMostFun(3, 4.0) - } - test("${containsNotOrAtMostTest("5.0 and 4.0", "3 times")} does not throw") { - fluent.containsNotOrAtMostFun(3, 5.0, 4.0) - } - - } - } - } -}) diff --git a/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/IterableContainsInAnyOrderOnlyEntriesAssertionsSpec.kt b/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/IterableContainsInAnyOrderOnlyEntriesAssertionsSpec.kt deleted file mode 100644 index 6f2404095..000000000 --- a/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/IterableContainsInAnyOrderOnlyEntriesAssertionsSpec.kt +++ /dev/null @@ -1,368 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") - -package ch.tutteli.atrium.spec.integration - - -import ch.tutteli.atrium.api.cc.en_GB.* -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.spec.AssertionVerbFactory -import ch.tutteli.atrium.translations.DescriptionIterableAssertion -import org.jetbrains.spek.api.dsl.context -import org.jetbrains.spek.api.dsl.describe -import org.jetbrains.spek.api.dsl.it -import org.jetbrains.spek.api.include - -@Deprecated("Switch from Assert to Expect and use Spec from atrium-specs-common; will be removed with 1.0.0") -abstract class IterableContainsInAnyOrderOnlyEntriesAssertionsSpec( - verbs: AssertionVerbFactory, - containsInAnyOrderOnlyEntriesPair: Pair>.(Assert.() -> Unit, Array.() -> Unit>) -> Assert>>, - containsInAnyOrderOnlyNullableEntriesPair: Pair>.((Assert.() -> Unit)?, Array.() -> Unit)?>) -> Assert>>, - rootBulletPoint: String, - successfulBulletPoint: String, - failingBulletPoint: String, - warningBulletPoint: String, - listBulletPoint: String, - explanatoryBulletPoint: String, - describePrefix: String = "[Atrium] " -) : IterableContainsEntriesSpecBase(verbs, { - - include(@Suppress("DEPRECATION") object : SubjectLessAssertionSpec>(describePrefix, - containsInAnyOrderOnlyEntriesPair.first to mapToCreateAssertion { containsInAnyOrderOnlyEntriesPair.second(this, { toBe(2.5) }, arrayOf()) }, - "${containsInAnyOrderOnlyNullableEntriesPair.first} for nullable" to mapToCreateAssertion { containsInAnyOrderOnlyNullableEntriesPair.second(this, null, arrayOf()) } - ) {}) - - include(@Suppress("DEPRECATION") object : CheckingAssertionSpec>(verbs, describePrefix, - checkingTriple(containsInAnyOrderOnlyEntriesPair.first, { containsInAnyOrderOnlyEntriesPair.second(this, { toBe(2.5) }, arrayOf()) }, listOf(2.5).asIterable(), listOf()), - checkingTriple("${containsInAnyOrderOnlyNullableEntriesPair.first} for nullable", { containsInAnyOrderOnlyNullableEntriesPair.second(this, { toBe(1.0) }, arrayOf()) }, listOf(1.0).asIterable(), listOf(1.2)) - ) {}) - - val assert: (Iterable) -> Assert> = verbs::checkImmediately - val expect = verbs::checkException - - val (containsInAnyOrderOnlyNullableEntries, containsInAnyOrderOnlyNullableEntriesArr) = containsInAnyOrderOnlyNullableEntriesPair - fun Assert>.containsInAnyOrderOnlyNullableEntriesFun(t: (Assert.() -> Unit)?, vararg tX: (Assert.() -> Unit)?) - = containsInAnyOrderOnlyNullableEntriesArr(t, tX) - - val indentRootBulletPoint = " ".repeat(rootBulletPoint.length) - val indentSuccessfulBulletPoint = " ".repeat(successfulBulletPoint.length) - val indentFailingBulletPoint = " ".repeat(failingBulletPoint.length) - val indentListBulletPoint = " ".repeat(listBulletPoint.length) - - val anEntryAfterSuccess = "$anEntryWhich: $separator$indentRootBulletPoint$indentSuccessfulBulletPoint$indentListBulletPoint$explanatoryBulletPoint" - val anEntryAfterFailing = "$anEntryWhich: $separator$indentRootBulletPoint$indentFailingBulletPoint$indentListBulletPoint$explanatoryBulletPoint" - - nonNullableCases(describePrefix, - containsInAnyOrderOnlyEntriesPair, - containsInAnyOrderOnlyNullableEntriesPair - ) { containsEntriesFunArr -> - fun Assert>.containsEntriesFun(t: Assert.() -> Unit, vararg tX: Assert.() -> Unit) - = containsEntriesFunArr(t, tX) - - context("empty collection") { - val fluentEmpty = assert(setOf()) - test("$isLessThanFun(1.0) throws AssertionError") { - expect { - fluentEmpty.containsEntriesFun({ isLessThan(1.0) }) - }.toThrow { - message { - contains( - "$rootBulletPoint$containsInAnyOrderOnly:", - "$failingBulletPoint$anEntryAfterFailing$isLessThanDescr: 1.0" - ) - containsNot(additionalEntries) - containsSize(0, 1) - } - } - } - test("$isLessThanFun(1.0) and $isGreaterThanFun(4.0) throws AssertionError") { - expect { - fluentEmpty.containsEntriesFun({ isLessThan(1.0) }, { isGreaterThan(4.0) }) - }.toThrow { - message { - contains.exactly(1).values( - "$rootBulletPoint$containsInAnyOrderOnly:", - "$failingBulletPoint$anEntryAfterFailing$isLessThanDescr: 1.0", - "$failingBulletPoint$anEntryAfterFailing$isGreaterThanDescr: 4.0" - ) - containsNot(additionalEntries) - containsSize(0, 2) - } - } - } - // message changed in new infix-API, not going to test it any more (is covered by bc-tests) -// test("$returnValueOfFun(...) states warning that subject is not set") { -// expect { -// fluentEmpty.containsEntriesFun({ -// @Suppress("DEPRECATION") -// returnValueOf(subject::dec).toBe(1.0) -// }) -// }.toThrow { messageContains(DescriptionIterableAssertion.CANNOT_EVALUATE_SUBJECT_EMPTY_ITERABLE.getDefault()) } -// } - } - - val fluent = assert(oneToFour) - context("iterable $oneToFour") { - - describe("happy cases") { - - listOf( - arrayOf(1.0, 2.0, 3.0, 4.0, 4.0), - arrayOf(1.0, 3.0, 2.0, 4.0, 4.0), - arrayOf(3.0, 4.0, 2.0, 1.0, 4.0), - arrayOf(2.0, 4.0, 4.0, 1.0, 3.0), - arrayOf(2.0, 4.0, 1.0, 4.0, 3.0), - arrayOf(4.0, 4.0, 3.0, 2.0, 1.0) - ).forEach { - test("${it.joinToString()} with matcher $toBeFun") { - fluent.containsEntriesFun( - { toBe(it.first()) }, - *(it.drop(1).map { val f: Assert.() -> Unit = { toBe(it) }; f }).toTypedArray() - ) - } - } - - test("1.0, 2.0, 3.0, 4.0 and $isGreaterThanFun(0.0)") { - fluent.containsEntriesFun( - { toBe(1.0) }, - { toBe(2.0) }, - { toBe(3.0) }, - { toBe(4.0) }, - { isGreaterThan(0.0) }) - } - test(" $isLessThanFun(3.0), 2.0, 3.0, 4.0 and 4.0") { - fluent.containsEntriesFun( - { isLessThan(3.0) }, - { toBe(2.0) }, - { toBe(3.0) }, - { toBe(4.0) }, - { toBe(4.0) }) - } - test("2.0, $isLessThanFun(5.0), 3.0, 4.0 and 4.0") { - fluent.containsEntriesFun( - { toBe(2.0) }, - { isLessThan(5.0) }, - { toBe(3.0) }, - { toBe(4.0) }, - { toBe(4.0) }) - } - } - - describe("error cases (throws AssertionError)") { - - context("additional entries") { - test("1.0, 2.0, 3.0, 4.0 -- 4.0 was missing") { - expect { - fluent.containsEntriesFun( - { toBe(1.0) }, - { toBe(2.0) }, - { toBe(3.0) }, - { toBe(4.0) }) - }.toThrow { - message { - contains.exactly(1).values( - "$rootBulletPoint$containsInAnyOrderOnly:", - "$successfulBulletPoint$anEntryAfterSuccess$toBeDescr: 1.0", - "$successfulBulletPoint$anEntryAfterSuccess$toBeDescr: 2.0", - "$successfulBulletPoint$anEntryAfterSuccess$toBeDescr: 3.0", - "$successfulBulletPoint$anEntryAfterSuccess$toBeDescr: 4.0", - "$warningBulletPoint$additionalEntries:", - "${listBulletPoint}4.0" - ) - containsSize(5, 4) - } - } - } - - test("$isLessThanFun(3.0), isGreaterThan(3.0) -- 2.0, 3.0 and 4.0 was missing") { - expect { - fluent.containsEntriesFun({ isLessThan(3.0) }, { isGreaterThan(3.0) }) - }.toThrow { - message { - contains.exactly(1).values( - "$rootBulletPoint$containsInAnyOrderOnly:", - "$successfulBulletPoint$anEntryAfterSuccess$isLessThanDescr: 3.0", - "$successfulBulletPoint$anEntryAfterSuccess$isGreaterThanDescr: 3.0", - "$warningBulletPoint$additionalEntries:", - "${listBulletPoint}2.0", - "${listBulletPoint}3.0", - "${listBulletPoint}4.0" - ) - containsSize(5, 2) - } - } - } - } - - context("mismatches") { - test("first wins: $isLessThanFun(5.0), 1.0, 2.0, 3.0, 4.0") { - expect { - fluent.containsEntriesFun( - { isLessThan(5.0) }, - { toBe(1.0) }, - { toBe(2.0) }, - { toBe(3.0) }, - { toBe(4.0) }) - }.toThrow { - message { - contains.exactly(1).values( - "$rootBulletPoint$containsInAnyOrderOnly:", - "$successfulBulletPoint$anEntryAfterSuccess$isLessThanDescr: 5.0", - "$failingBulletPoint$anEntryAfterFailing$toBeDescr: 1.0", - "$successfulBulletPoint$anEntryAfterSuccess$toBeDescr: 2.0", - "$successfulBulletPoint$anEntryAfterSuccess$toBeDescr: 3.0", - "$successfulBulletPoint$anEntryAfterSuccess$toBeDescr: 4.0", - "$warningBulletPoint$mismatches:", - "${listBulletPoint}4.0" - ) - containsSize(5, 5) - } - } - } - } - - context("mismatches and additional entries") { - test("1.0, $isGreaterThanFun(3.0), $isGreaterThanFun(4.0) -- $isGreaterThanFun(4.0) is wrong and 2.0, 3.0 and 4.0 are missing") { - expect { - fluent.containsEntriesFun( - { toBe(1.0) }, - { isGreaterThan(3.0) }, - { isGreaterThan(4.0) }) - }.toThrow { - message { - contains.exactly(1).values( - "$rootBulletPoint$containsInAnyOrderOnly:", - "$successfulBulletPoint$anEntryAfterSuccess$toBeDescr: 1.0", - "$successfulBulletPoint$anEntryAfterSuccess$isGreaterThanDescr: 3.0", - "$failingBulletPoint$anEntryAfterFailing$isGreaterThanDescr: 4.0", - "$warningBulletPoint$mismatchesAdditionalEntries:", - "${listBulletPoint}2.0", - "${listBulletPoint}3.0", - "${listBulletPoint}4.0" - ) - containsSize(5, 3) - } - } - } - } - - context("too many matcher") { - test("1.0, 2.0, 3.0, 4.0, 4.0, 5.0 -- 5.0 was too much") { - expect { - fluent.containsEntriesFun( - { toBe(1.0) }, - { toBe(2.0) }, - { toBe(3.0) }, - { toBe(4.0) }, - { toBe(4.0) }, - { toBe(5.0) }) - }.toThrow { - message { - contains.exactly(1).values( - "$rootBulletPoint$containsInAnyOrderOnly:", - "$successfulBulletPoint$anEntryAfterSuccess$toBeDescr: 1.0", - "$successfulBulletPoint$anEntryAfterSuccess$toBeDescr: 2.0", - "$successfulBulletPoint$anEntryAfterSuccess$toBeDescr: 3.0", - "$failingBulletPoint$anEntryAfterSuccess$toBeDescr: 5.0" - ) - contains.exactly(2) - .value("$successfulBulletPoint$anEntryAfterSuccess$toBeDescr: 4.0") - containsSize(5, 6) - containsNot(additionalEntries, mismatches, mismatchesAdditionalEntries) - } - } - } - } - } - } - - // the new infix throws now an AssertionError instead - not going to test it any more (is covered by bc-tests) -// context("search for entry where the lambda does not specify any assertion") { -// it("throws an ${IllegalArgumentException::class.simpleName}") { -// expect { -// fluent.containsEntriesFun({}) -// }.toThrow { messageContains("not any assertion created") } -// } -// } - } - - nullableCases(describePrefix) { - - describeFun("$containsInAnyOrderOnlyNullableEntries for nullable") { - val list = listOf(null, 1.0, null, 3.0) - val fluent = verbs.checkImmediately(list) - absentSubjectTests(verbs, Assert>::containsInAnyOrderOnlyNullableEntriesFun) - - context("iterable $list") { - context("happy cases (do not throw)") { - test("null, $toBeFun(1.0), null, $toBeFun(3.0)") { - fluent.containsInAnyOrderOnlyNullableEntriesFun(null, { toBe(1.0) }, null, { toBe(3.0) }) - } - test("$toBeFun(1.0), null, null, $toBeFun(3.0)") { - fluent.containsInAnyOrderOnlyNullableEntriesFun({ toBe(1.0) }, null, null, { toBe(3.0) }) - } - test("$toBeFun(1.0), null, $toBeFun(3.0), null") { - fluent.containsInAnyOrderOnlyNullableEntriesFun({ toBe(1.0) }, null, { toBe(3.0) }, null) - } - test("$toBeFun(1.0), $toBeFun(3.0), null, null") { - fluent.containsInAnyOrderOnlyNullableEntriesFun({ toBe(1.0) }, { toBe(3.0) }, null, null) - } - } - - context("failing cases") { - test("null, $toBeFun(1.0), $toBeFun(3.0) -- null was missing") { - expect { - fluent.containsInAnyOrderOnlyNullableEntriesFun(null, { toBe(1.0) }, { toBe(3.0) }) - }.toThrow { - message { - contains.exactly(1).values( - "$rootBulletPoint$containsInAnyOrderOnly:", - "$successfulBulletPoint$anEntryAfterSuccess$isDescr: null", - "$successfulBulletPoint$anEntryAfterSuccess$toBeDescr: 1.0", - "$successfulBulletPoint$anEntryAfterSuccess$toBeDescr: 3.0", - "$warningBulletPoint$additionalEntries:", - "${listBulletPoint}null" - ) - containsSize(4, 3) - } - } - } - - test("first wins: $isLessThanFun(5.0), 1.0, 2.0, 3.0, 4.0") { - expect { - fluent.containsInAnyOrderOnlyNullableEntriesFun( - { isLessThan(4.0) }, - null, - null, - { toBe(1.0) }) - }.toThrow { - message { - contains.exactly(2).values( - "$successfulBulletPoint$anEntryAfterSuccess$isDescr: null", - "$successfulBulletPoint$anEntryAfterSuccess$isDescr: null" - ) - contains.exactly(1).values( - "$rootBulletPoint$containsInAnyOrderOnly:", - "$successfulBulletPoint$anEntryAfterSuccess$isLessThanDescr: 4.0", - "$failingBulletPoint$anEntryAfterFailing$toBeDescr: 1.0", - "$warningBulletPoint$mismatches:", - "${listBulletPoint}3.0" - ) - containsSize(4, 4) - } - } - } - } - } - - // the new infix throws now an AssertionError instead - not going to test it any more (is covered by bc-tests) -// context("search for entry where the lambda does not specify any assertion") { -// it("throws an ${IllegalArgumentException::class.simpleName}") { -// expect { -// fluent.containsInAnyOrderOnlyNullableEntriesFun({}) -// }.toThrow { messageContains("not any assertion created") } -// } -// } - } - } -}) diff --git a/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/IterableContainsInAnyOrderOnlyValuesAssertionsSpec.kt b/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/IterableContainsInAnyOrderOnlyValuesAssertionsSpec.kt deleted file mode 100644 index 26163bd93..000000000 --- a/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/IterableContainsInAnyOrderOnlyValuesAssertionsSpec.kt +++ /dev/null @@ -1,256 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") - -package ch.tutteli.atrium.spec.integration - -import ch.tutteli.atrium.api.cc.en_GB.* -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.spec.AssertionVerbFactory -import ch.tutteli.atrium.translations.DescriptionIterableAssertion -import org.jetbrains.spek.api.dsl.context -import org.jetbrains.spek.api.dsl.describe -import org.jetbrains.spek.api.include - -@Deprecated("Switch from Assert to Expect and use Spec from atrium-specs-common; will be removed with 1.0.0") -abstract class IterableContainsInAnyOrderOnlyValuesAssertionsSpec( - verbs: AssertionVerbFactory, - containsInAnyOrderOnlyValuesPair: Pair>.(Double, Array) -> Assert>>, - containsInAnyOrderOnlyNullableValuesPair: Pair>.(Double?, Array) -> Assert>>, - rootBulletPoint: String, - successfulBulletPoint: String, - failingBulletPoint: String, - warningBulletPoint: String, - listBulletPoint: String, - describePrefix: String = "[Atrium] " -) : IterableContainsSpecBase({ - - include(@Suppress("DEPRECATION") object : SubjectLessAssertionSpec>(describePrefix, - containsInAnyOrderOnlyValuesPair.first to mapToCreateAssertion { containsInAnyOrderOnlyValuesPair.second(this, 2.5, arrayOf()) }, - "${containsInAnyOrderOnlyNullableValuesPair.first} for nullable" to mapToCreateAssertion { containsInAnyOrderOnlyNullableValuesPair.second(this, 2.5, arrayOf()) } - ) {}) - - include(@Suppress("DEPRECATION") object : CheckingAssertionSpec>(verbs, describePrefix, - checkingTriple(containsInAnyOrderOnlyValuesPair.first, { containsInAnyOrderOnlyValuesPair.second(this, 2.5, arrayOf()) }, listOf(2.5).asIterable(), listOf(2.5, 2.2)), - checkingTriple("${containsInAnyOrderOnlyNullableValuesPair.first} for nullable", { containsInAnyOrderOnlyNullableValuesPair.second(this, 2.5, arrayOf()) }, listOf(2.5).asIterable(), listOf(2.5, 2.2)) - ) {}) - - val assert: (Iterable) -> Assert> = verbs::checkImmediately - val expect = verbs::checkException - - val (containsInOrderNullableValues, containsInOrderNullableValuesFunArr) = containsInAnyOrderOnlyNullableValuesPair - fun Assert>.containsInOrderNullableValuesFun(t: Double?, vararg tX: Double?) - = containsInOrderNullableValuesFunArr(t, tX) - - nonNullableCases(describePrefix, - containsInAnyOrderOnlyValuesPair, - containsInAnyOrderOnlyNullableValuesPair - ){ containsValuesFunArr -> - - fun Assert>.containsFun(t: Double, vararg tX: Double) = - containsValuesFunArr(t, tX.toTypedArray()) - - context("empty collection") { - val fluentEmpty = assert(setOf()) - test("1.0 throws AssertionError") { - expect { - fluentEmpty.containsFun(1.0) - }.toThrow { - message { - contains( - "$rootBulletPoint$containsInAnyOrderOnly:", - "$failingBulletPoint$anEntryWhichIs: 1.0" - ) - containsNot(additionalEntries) - containsSize(0, 1) - } - } - } - test("1.0 and 4.0 throws AssertionError") { - expect { - fluentEmpty.containsFun(1.0, 4.0) - }.toThrow { - message { - contains.exactly(1).values( - "$rootBulletPoint$containsInAnyOrderOnly:", - "$failingBulletPoint$anEntryWhichIs: 1.0", - "$failingBulletPoint$anEntryWhichIs: 4.0" - ) - containsNot(additionalEntries) - containsSize(0, 2) - } - } - } - } - - context("iterable $oneToFour") { - val fluent = assert(oneToFour) - - describe("happy cases") { - listOf( - arrayOf(1.0, 2.0, 3.0, 4.0, 4.0), - arrayOf(1.0, 3.0, 2.0, 4.0, 4.0), - arrayOf(3.0, 4.0, 2.0, 1.0, 4.0), - arrayOf(2.0, 4.0, 4.0, 1.0, 3.0), - arrayOf(2.0, 4.0, 1.0, 4.0, 3.0), - arrayOf(4.0, 4.0, 3.0, 2.0, 1.0) - ).forEach { - test(it.joinToString()) { - fluent.containsFun(it.first(), *it.drop(1).toDoubleArray()) - } - } - } - - describe("error cases (throws AssertionError)") { - - context("additional entries") { - test("1.0, 2.0, 3.0, 4.0 -- 4.0 was missing") { - expect { - fluent.containsFun(1.0, 2.0, 3.0, 4.0) - }.toThrow { - message { - contains.exactly(1).values( - "$rootBulletPoint$containsInAnyOrderOnly:", - "$successfulBulletPoint$anEntryWhichIs: 1.0", - "$successfulBulletPoint$anEntryWhichIs: 2.0", - "$successfulBulletPoint$anEntryWhichIs: 3.0", - "$successfulBulletPoint$anEntryWhichIs: 4.0", - "$warningBulletPoint$additionalEntries:", - "${listBulletPoint}4.0" - ) - containsSize(5, 4) - } - } - } - - test("1.0, 4.0 -- 2.0, 3.0 and 4.0 was missing") { - expect { - fluent.containsFun(1.0, 4.0) - }.toThrow { - message { - contains.exactly(1).values( - "$rootBulletPoint$containsInAnyOrderOnly:", - "$successfulBulletPoint$anEntryWhichIs: 1.0", - "$successfulBulletPoint$anEntryWhichIs: 4.0", - "$warningBulletPoint$additionalEntries:", - "${listBulletPoint}2.0", - "${listBulletPoint}3.0", - "${listBulletPoint}4.0" - ) - containsSize(5, 2) - } - } - } - } - - context("mismatches") { - test("1.0, 2.0, 3.0, 4.0, 5.0") { - expect { - fluent.containsFun(1.0, 2.0, 3.0, 4.0, 5.0) - }.toThrow { - message { - contains.exactly(1).values( - "$rootBulletPoint$containsInAnyOrderOnly:", - "$successfulBulletPoint$anEntryWhichIs: 1.0", - "$successfulBulletPoint$anEntryWhichIs: 2.0", - "$successfulBulletPoint$anEntryWhichIs: 3.0", - "$failingBulletPoint$anEntryWhichIs: 5.0", - "$warningBulletPoint$mismatches:", - "${listBulletPoint}4.0" - ) - containsSize(5, 5) - } - } - } - } - - context("mismatches and additional entries") { - test("1.0, 3.0, 5.0 -- 5.0 is wrong and 2.0, 4.0 and 4.0 are missing") { - expect { - fluent.containsFun(1.0, 3.0, 5.0) - }.toThrow { - message { - contains.exactly(1).values( - "$rootBulletPoint$containsInAnyOrderOnly:", - "$successfulBulletPoint$anEntryWhichIs: 1.0", - "$successfulBulletPoint$anEntryWhichIs: 3.0", - "$failingBulletPoint$anEntryWhichIs: 5.0", - "$warningBulletPoint$mismatchesAdditionalEntries:", - "${listBulletPoint}2.0" - ) - contains.exactly(2).value("${listBulletPoint}4.0") - containsSize(5, 3) - } - } - } - } - - context("too many matcher") { - test("1.0, 2.0, 3.0, 4.0, 4.0, 5.0 -- 5.0 was too much") { - expect { - fluent.containsFun(1.0, 2.0, 3.0, 4.0, 4.0, 5.0) - }.toThrow { - message { - contains.exactly(1).values( - "$rootBulletPoint$containsInAnyOrderOnly:", - "$successfulBulletPoint$anEntryWhichIs: 1.0", - "$successfulBulletPoint$anEntryWhichIs: 2.0", - "$successfulBulletPoint$anEntryWhichIs: 3.0", - "$failingBulletPoint$anEntryWhichIs: 5.0" - ) - contains.exactly(2).value("$successfulBulletPoint$anEntryWhichIs: 4.0") - containsSize(5, 6) - containsNot(additionalEntries, mismatches, mismatchesAdditionalEntries) - } - } - } - } - } - } - } - - - nullableCases(describePrefix) { - describeFun("$containsInOrderNullableValues for nullable") { - - val list = listOf(null, 1.0, null, 3.0) - val fluent = verbs.checkImmediately(list) - - context("iterable $list") { - context("happy cases (do not throw)") { - test("null, 1.0, null, 3.0") { - fluent.containsInOrderNullableValuesFun(null, 1.0, null, 3.0) - } - test("1.0, null, null, 3.0") { - fluent.containsInOrderNullableValuesFun(1.0, null, null, 3.0) - } - test("1.0, null, 3.0, null") { - fluent.containsInOrderNullableValuesFun(1.0, null, 3.0, null) - } - test("1.0, 3.0, null, null") { - fluent.containsInOrderNullableValuesFun(1.0, 3.0, null, null) - } - } - - context("failing cases") { - test("null, 1.0, 3.0 -- null was missing") { - expect { - fluent.containsInOrderNullableValuesFun(null, 1.0, 3.0) - }.toThrow { - message { - contains.exactly(1).values( - "$rootBulletPoint$containsInAnyOrderOnly:", - "$successfulBulletPoint$anEntryWhichIs: null", - "$successfulBulletPoint$anEntryWhichIs: 1.0", - "$successfulBulletPoint$anEntryWhichIs: 3.0", - "$warningBulletPoint$additionalEntries:", - "${listBulletPoint}null" - ) - containsSize(4, 3) - } - } - } - } - } - } - } -}) diff --git a/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/IterableContainsInOrderOnlyEntriesAssertionsSpec.kt b/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/IterableContainsInOrderOnlyEntriesAssertionsSpec.kt deleted file mode 100644 index aea27cc20..000000000 --- a/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/IterableContainsInOrderOnlyEntriesAssertionsSpec.kt +++ /dev/null @@ -1,337 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") - -package ch.tutteli.atrium.spec.integration - -import ch.tutteli.atrium.api.cc.en_GB.* -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.spec.AssertionVerbFactory -import ch.tutteli.atrium.translations.DescriptionIterableAssertion -import org.jetbrains.spek.api.dsl.SpecBody -import org.jetbrains.spek.api.dsl.context -import org.jetbrains.spek.api.dsl.describe -import org.jetbrains.spek.api.dsl.it -import org.jetbrains.spek.api.include - -@Deprecated("Switch from Assert to Expect and use Spec from atrium-specs-common; will be removed with 1.0.0") -abstract class IterableContainsInOrderOnlyEntriesAssertionsSpec( - verbs: AssertionVerbFactory, - containsInOrderOnlyEntriesPair: Pair>.(Assert.() -> Unit, Array.() -> Unit>) -> Assert>>, - containsInOrderOnlyNullableEntriesPair: Pair>.((Assert.() -> Unit)?, Array.() -> Unit)?>) -> Assert>>, - rootBulletPoint: String, - successfulBulletPoint: String, - failingBulletPoint: String, - warningBulletPoint: String, - listBulletPoint: String, - explanatoryBulletPoint: String, - featureArrow: String, - featureBulletPoint: String, - describePrefix: String = "[Atrium] " -) : IterableContainsEntriesSpecBase(verbs, { - - include(@Suppress("DEPRECATION") object : SubjectLessAssertionSpec>(describePrefix, - containsInOrderOnlyEntriesPair.first to mapToCreateAssertion { containsInOrderOnlyEntriesPair.second(this, { toBe(2.5) }, arrayOf()) }, - "${containsInOrderOnlyNullableEntriesPair.first} for nullable" to mapToCreateAssertion { containsInOrderOnlyNullableEntriesPair.second(this, null, arrayOf()) } - ) {}) - - include(@Suppress("DEPRECATION") object : CheckingAssertionSpec>(verbs, describePrefix, - checkingTriple(containsInOrderOnlyEntriesPair.first, { containsInOrderOnlyEntriesPair.second(this, { toBe(2.5) }, arrayOf()) }, listOf(2.5).asIterable(), listOf()), - checkingTriple("${containsInOrderOnlyNullableEntriesPair.first} for nullable", { containsInOrderOnlyNullableEntriesPair.second(this, { toBe(2.5) }, arrayOf()) }, listOf(2.5).asIterable(), listOf()) - ) {}) - - fun SpecBody.describeFun(funName: String, body: SpecBody.() -> Unit) - = group("fun `$funName`", body = body) - - val assert: (Iterable) -> Assert> = verbs::checkImmediately - val expect = verbs::checkException - - val (containsInOrderOnlyNullableEntries, containsInOrderOnlyNullableEntriesArr) = containsInOrderOnlyNullableEntriesPair - fun Assert>.containsInOrderOnlyNullableEntriesFun(t: (Assert.() -> Unit)?, vararg tX: (Assert.() -> Unit)?) - = containsInOrderOnlyNullableEntriesArr(t, tX) - - val indentRootBulletPoint = " ".repeat(rootBulletPoint.length) - val indentSuccessfulBulletPoint = " ".repeat(successfulBulletPoint.length) - val indentFailingBulletPoint = " ".repeat(failingBulletPoint.length) - val indentListBulletPoint = " ".repeat(listBulletPoint.length) - val indentFeatureArrow = " ".repeat(featureArrow.length) - val indentFeatureBulletPoint = " ".repeat(featureBulletPoint.length) - - val explanatoryPointWithIndent = "$indentFeatureArrow$indentFeatureBulletPoint$indentListBulletPoint$explanatoryBulletPoint" - - val entryWhichWithFeature = "$indentFeatureArrow$featureBulletPoint$anEntryWhich" - val anEntryAfterSuccess = "$entryWhichWithFeature: $separator$indentRootBulletPoint$indentSuccessfulBulletPoint$explanatoryPointWithIndent" - val anEntryAfterFailing = "$entryWhichWithFeature: $separator$indentRootBulletPoint$indentFailingBulletPoint$explanatoryPointWithIndent" - - fun entry(index: Int) - = String.format(entryWithIndex, index) - - fun Assert.entrySuccess(index: Int, actual: Any, expected: String): Assert { - return this.contains.exactly(1).regex( - "\\Q$successfulBulletPoint$featureArrow${entry(index)}: $actual\\E.*$separator" + - "$indentRootBulletPoint$indentSuccessfulBulletPoint$anEntryAfterSuccess$expected") - } - - fun Assert.entryFailing(index: Int, actual: Any, expected: String): Assert { - return this.contains.exactly(1).regex( - "\\Q$failingBulletPoint$featureArrow${entry(index)}: $actual\\E.*$separator" + - "$indentRootBulletPoint$indentFailingBulletPoint$anEntryAfterFailing$expected") - } - - nonNullableCases(describePrefix, - containsInOrderOnlyEntriesPair, - containsInOrderOnlyNullableEntriesPair - ) { containsEntriesFunArr -> - - fun Assert>.containsEntriesFun(t: Assert.() -> Unit, vararg tX: Assert.() -> Unit) - = containsEntriesFunArr(t, tX) - - context("empty collection") { - val fluentEmpty = assert(setOf()) - test("$isLessThanFun(1.0) throws AssertionError") { - expect { - fluentEmpty.containsEntriesFun({ isLessThan(1.0) }) - }.toThrow { - message { - contains("$rootBulletPoint$containsInOrderOnly:") - entryFailing(0, sizeExceeded, "$isLessThanDescr: 1.0") - containsNot(additionalEntries) - containsSize(0, 1) - } - } - } - test("$isLessThanFun(1.0) and $isGreaterThanFun(4.0) throws AssertionError") { - expect { - fluentEmpty.containsEntriesFun({ isLessThan(1.0) }, { isGreaterThan(4.0) }) - }.toThrow { - message { - contains.exactly(1).value("$rootBulletPoint$containsInOrderOnly:") - entryFailing(0, sizeExceeded, "$isLessThanDescr: 1.0") - entryFailing(1, sizeExceeded, "$isGreaterThanDescr: 4.0") - containsNot(additionalEntries) - containsSize(0, 2) - } - } - } - // message changed in new infix-API, not going to test it any more (is covered by bc-tests) -// test("$returnValueOfFun(...) states warning that subject is not set") { -// expect { -// fluentEmpty.containsEntriesFun({ -// @Suppress("DEPRECATION") -// returnValueOf(subject::dec).toBe(1.0) -// }) -// }.toThrow { -// messageContains(DescriptionIterableAssertion.CANNOT_EVALUATE_SUBJECT_EMPTY_ITERABLE.getDefault()) -// } -// } - } - - val fluent = assert(oneToFour) - context("iterable $oneToFour") { - - describe("happy case") { - test("1.0, 2.0, 3.0, 4.0, 4.0") { - fluent.containsEntriesFun( - { toBe(1.0) }, - { toBe(2.0) }, - { toBe(3.0) }, - { toBe(4.0) }, - { toBe(4.0) }) - } - test("$isLessThanFun(5.0), $isLessThanFun(5.0), $isLessThanFun(5.0), $isLessThanFun(5.0), $isLessThanFun(5.0)") { - fluent.containsEntriesFun( - { isLessThan(5.0) }, - { isLessThan(5.0) }, - { isLessThan(5.0) }, - { isLessThan(5.0) }, - { isLessThan(5.0) }) - } - } - - describe("error cases ... throws AssertionError") { - - test("$isLessThanFun(5.0), 1.0, 2.0, $isGreaterThanFun(2.0), 4.0 -- wrong order") { - expect { - fluent.containsEntriesFun( - { isLessThan(5.0) }, - { toBe(1.0) }, - { toBe(2.0) }, - { isGreaterThan(2.0) }, - { toBe(4.0) }) - }.toThrow { - message { - contains.exactly(1).value("$rootBulletPoint$containsInOrderOnly:") - entrySuccess(0, 1.0, "$isLessThanDescr: 5.0") - entryFailing(1, 2.0, "$toBeDescr: 1.0") - entryFailing(2, 3.0, "$toBeDescr: 2.0") - entrySuccess(3, 4.0, "$isGreaterThanDescr: 2.0") - entrySuccess(4, 4.0, "$toBeDescr: 4.0") - containsSize(5, 5) - } - } - } - - test("1.0, 2.0, 3.0, 4.0 -- 4.0 was missing") { - expect { - fluent.containsEntriesFun({ toBe(1.0) }, { toBe(2.0) }, { toBe(3.0) }, { toBe(4.0) }) - }.toThrow { - message { - contains.exactly(1).value("$rootBulletPoint$containsInOrderOnly:") - entrySuccess(0, 1.0, "$toBeDescr: 1.0") - entrySuccess(1, 2.0, "$toBeDescr: 2.0") - entrySuccess(2, 3.0, "$toBeDescr: 3.0") - entrySuccess(3, 4.0, "$toBeDescr: 4.0") - contains( - "$warningBulletPoint$additionalEntries:", - "$listBulletPoint${entry(4)}: 4.0" - ) - containsSize(5, 4) - } - } - } - - test("1.0, 4.0 -- 2.0, 3.0 and 4.0 was missing") { - expect { - fluent.containsEntriesFun({ toBe(1.0) }, { toBe(4.0) }) - }.toThrow { - message { - contains.exactly(1).value("$rootBulletPoint$containsInOrderOnly:") - entrySuccess(0, 1.0, "$toBeDescr: 1.0") - entryFailing(1, 2.0, "$toBeDescr: 4.0") - contains( - "$warningBulletPoint$additionalEntries:", - "$listBulletPoint${entry(2)}: 3.0", - "$listBulletPoint${entry(3)}: 4.0", - "$listBulletPoint${entry(4)}: 4.0" - ) - containsSize(5, 2) - } - } - } - test("1.0, 3.0, $isGreaterThanFun(4.0) -- $isGreaterThanFun(4.0) is wrong and 4.0 and 4.0 are missing") { - expect { - fluent.containsEntriesFun({ toBe(1.0) }, { toBe(3.0) }, { isGreaterThan(4.0) }) - }.toThrow { - message { - contains.exactly(1).value("$rootBulletPoint$containsInOrderOnly:") - entrySuccess(0, 1.0, "$toBeDescr: 1.0") - entryFailing(1, 2.0, "$toBeDescr: 3.0") - entryFailing(2, 3.0, "$isGreaterThanDescr: 4.0") - contains( - "$warningBulletPoint$additionalEntries:", - "$listBulletPoint${entry(3)}: 4.0", - "$listBulletPoint${entry(4)}: 4.0" - ) - containsSize(5, 3) - } - } - } - test("1.0, 2.0, 3.0, 4.0, 4.0, 5.0 -- 5.0 too much") { - expect { - fluent.containsEntriesFun( - { toBe(1.0) }, - { toBe(2.0) }, - { toBe(3.0) }, - { toBe(4.0) }, - { toBe(4.0) }, - { toBe(5.0) }) - }.toThrow { - message { - contains.exactly(1).value("$rootBulletPoint$containsInOrderOnly:") - entrySuccess(0, 1.0, "$toBeDescr: 1.0") - entrySuccess(1, 2.0, "$toBeDescr: 2.0") - entrySuccess(2, 3.0, "$toBeDescr: 3.0") - entrySuccess(3, 4.0, "$toBeDescr: 4.0") - entrySuccess(4, 4.0, "$toBeDescr: 4.0") - entryFailing(5, sizeExceeded, "$toBeDescr: 5.0") - containsSize(5, 6) - } - } - } - } - } - - // the new infix throws now an AssertionError instead - not going to test it any more (is covered by bc-tests) -// context("search for entry where the lambda does not specify any assertion") { -// it("throws an ${IllegalArgumentException::class.simpleName}") { -// expect { -// fluent.containsEntriesFun({}) -// }.toThrow { messageContains("not any assertion created") } -// } -// } - } - - nullableCases(describePrefix) { - - describeFun("$containsInOrderOnlyNullableEntries for nullable") { - absentSubjectTests(verbs, Assert>::containsInOrderOnlyNullableEntriesFun) - - val list = listOf(null, 1.0, null, 3.0) - val fluent = verbs.checkImmediately(list) - context("iterable $list") { - - describe("happy case") { - test("null, 1.0, null, 3.0") { - fluent.containsInOrderOnlyNullableEntriesFun(null, { toBe(1.0) }, null, { toBe(3.0) }) - } - test("null, $isLessThanFun(5.0), null, $isLessThanFun(5.0)") { - fluent.containsInOrderOnlyNullableEntriesFun( - null, - { isLessThan(5.0) }, - null, - { isLessThan(5.0) } - ) - } - } - - describe("error cases (throws AssertionError)") { - - test("null, null, $isLessThanFun(5.0), $isGreaterThanFun(2.0) -- wrong order") { - expect { - fluent.containsInOrderOnlyNullableEntriesFun( - null, - null, - { isLessThan(5.0) }, - { isGreaterThan(2.0) } - ) - }.toThrow { - message { - contains.exactly(1).value("$rootBulletPoint$containsInOrderOnly:") - entrySuccess(0, "null", "$isDescr: null") - entryFailing(1, 1.0, "$isDescr: null") - entryFailing(2, "null", "$isLessThanDescr: 5.0") - entrySuccess(3, 3.0, "$isGreaterThanDescr: 2.0") - containsSize(4, 4) - } - } - } - - test("null, 1.0, null, 3.0, null -- null too much") { - expect { - fluent.containsInOrderOnlyNullableEntriesFun(null, { toBe(1.0) }, null, { toBe(3.0) }, null) - }.toThrow { - message { - contains.exactly(1).value("$rootBulletPoint$containsInOrderOnly:") - entrySuccess(0, "null", "$isDescr: null") - entrySuccess(1, 1.0, "$toBeDescr: 1.0") - entrySuccess(2, "null", "$isDescr: null") - entrySuccess(3, 3.0, "$toBeDescr: 3.0") - entryFailing(4, sizeExceeded, "$isDescr: null") - containsSize(4, 5) - } - } - } - } - } - - // the new infix throws now an AssertionError instead - not going to test it any more (is covered by bc-tests) -// context("search for entry where the lambda does not specify any assertion") { -// it("throws an ${IllegalArgumentException::class.simpleName}") { -// expect { -// fluent.containsInOrderOnlyNullableEntriesFun({}) -// }.toThrow { messageContains("not any assertion created") } -// } -// } - } - } -}) - diff --git a/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/IterableContainsInOrderOnlyGroupedEntriesAssertionsSpec.kt b/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/IterableContainsInOrderOnlyGroupedEntriesAssertionsSpec.kt deleted file mode 100644 index 23fc19bed..000000000 --- a/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/IterableContainsInOrderOnlyGroupedEntriesAssertionsSpec.kt +++ /dev/null @@ -1,468 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") - -package ch.tutteli.atrium.spec.integration - -import ch.tutteli.atrium.api.cc.en_GB.* -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.domain.builders.utils.Group -import ch.tutteli.atrium.spec.AssertionVerbFactory -import ch.tutteli.atrium.translations.DescriptionIterableAssertion -import org.jetbrains.spek.api.dsl.context -import org.jetbrains.spek.api.dsl.describe -import org.jetbrains.spek.api.include - -@Deprecated("Switch from Assert to Expect and use Spec from atrium-specs-common; will be removed with 1.0.0") -abstract class IterableContainsInOrderOnlyGroupedEntriesAssertionsSpec( - verbs: AssertionVerbFactory, - containsInOrderOnlyGroupedEntriesPair: Pair>.(Group<(Assert.() -> Unit)?>, Group<(Assert.() -> Unit)?>, Array.() -> Unit)?>>) -> Assert>>, - groupFactory: (Array.() -> Unit)?>) -> Group<(Assert.() -> Unit)?>, - rootBulletPoint: String, - successfulBulletPoint: String, - failingBulletPoint: String, - warningBulletPoint: String, - listBulletPoint: String, - explanatoryBulletPoint: String, - featureArrow: String, - featureBulletPoint: String, - describePrefix: String = "[Atrium] " -) : IterableContainsEntriesSpecBase(verbs, { - - fun group(vararg assertionCreators: (Assert.() -> Unit)?) = groupFactory(assertionCreators) - - include(@Suppress("DEPRECATION") object : SubjectLessAssertionSpec>(describePrefix, - containsInOrderOnlyGroupedEntriesPair.first to mapToCreateAssertion { containsInOrderOnlyGroupedEntriesPair.second(this, group({ toBe(2.5) }), group({ toBe(4.1) }), arrayOf()) } - ) {}) - - include(@Suppress("DEPRECATION") object : CheckingAssertionSpec>(verbs, describePrefix, - checkingTriple(containsInOrderOnlyGroupedEntriesPair.first, { containsInOrderOnlyGroupedEntriesPair.second(this, group({ toBe(2.5) }), group({ toBe(1.2) }, { toBe(2.2) }), arrayOf()) }, listOf(2.5, 2.2, 1.2).asIterable(), listOf(2.2, 1.2, 2.5)) - ) {}) - - val assert: (Iterable) -> Assert> = verbs::checkImmediately - val expect = verbs::checkException - - val (containsInOrderOnlyGroupedEntries, containsInOrderOnlyGroupedEntriesFunArr) = containsInOrderOnlyGroupedEntriesPair - fun Assert>.containsInOrderOnlyGroupedEntriesFun(t1: Group<(Assert.() -> Unit)?>, t2: Group<(Assert.() -> Unit)?>, vararg tX: Group<(Assert.() -> Unit)?>) - = containsInOrderOnlyGroupedEntriesFunArr(t1, t2, tX) - - val indentRootBulletPoint = " ".repeat(rootBulletPoint.length) - val indentSuccessfulBulletPoint = " ".repeat(successfulBulletPoint.length) - val indentFailingBulletPoint = " ".repeat(failingBulletPoint.length) - val indentListBulletPoint = " ".repeat(listBulletPoint.length) - val indentFeatureArrow = " ".repeat(featureArrow.length) - val indentFeatureBulletPoint = " ".repeat(featureBulletPoint.length) - val indentWarningBulletPoint = " ".repeat(warningBulletPoint.length) - - fun index(index: Int) - = String.format(DescriptionIterableAssertion.INDEX.getDefault(), index) - - fun entryWithIndex(index: Int) - = String.format(entryWithIndex, index) - - fun index(fromIndex: Int, toIndex: Int) - = String.format(DescriptionIterableAssertion.INDEX_FROM_TO.getDefault(), fromIndex, toIndex) - - fun entry(prefix: String, bulletPoint: String, indentRootBulletPoint: String, expected: Array) - = expected.joinToString(".*$separator") { - "$prefix\\Q$bulletPoint$anEntryWhich: \\E$separator" + - "$prefix$indentRootBulletPoint$indentListBulletPoint$explanatoryBulletPoint$it" - } - - fun size(prefix: String, bulletPoint: String, actual: Int, expected: Int) - = "$prefix\\Q$bulletPoint\\E${featureArrow}size: $actual[^:]+: $expected" - - - val afterFail = "$indentRootBulletPoint$indentFailingBulletPoint$indentFeatureArrow$indentFeatureBulletPoint" - fun failAfterFail(vararg expected: String) - = entry(afterFail, failingBulletPoint, indentFailingBulletPoint, expected) - - fun successAfterFail(vararg expected: String) - = entry(afterFail, successfulBulletPoint, indentSuccessfulBulletPoint, expected) - - fun failSizeAfterFail(actual: Int, expected: Int) - = size(afterFail, failingBulletPoint, actual, expected) - - fun successSizeAfterFail(size: Int) - = size(afterFail, successfulBulletPoint, size, size) - - fun warning(msg: String, values: Array, act: (T) -> String) - = "$afterFail\\Q$warningBulletPoint$msg\\E: $separator" + - values.joinToString(".*$separator") { "$afterFail$indentWarningBulletPoint$listBulletPoint${act(it)}" } - - fun mismatchesAfterFail(vararg mismatched: Double) - = warning(mismatches, mismatched.toTypedArray()){ "$it" } - - fun additional(vararg entryWithValue: Pair) - = warning(additionalEntries, entryWithValue) { "${entryWithIndex(it.first)}: ${it.second}" } - - - val afterSuccess = "$indentRootBulletPoint$indentSuccessfulBulletPoint$indentFeatureArrow$indentFeatureBulletPoint" - fun successAfterSuccess(vararg expected: String) - = entry(afterSuccess, successfulBulletPoint, indentSuccessfulBulletPoint, expected) - - fun successSizeAfterSuccess(size: Int) - = size(afterSuccess, successfulBulletPoint, size, size) - - - fun Assert.indexSuccess(index: Int, actual: Any, expected: String): Assert { - return this.contains.exactly(1).regex( - "\\Q$successfulBulletPoint$featureArrow${index(index)}: $actual\\E.*$separator" + - "$indentRootBulletPoint$indentSuccessfulBulletPoint$indentFeatureArrow$featureBulletPoint$anEntryWhich: $separator" + - "$afterSuccess$indentListBulletPoint$explanatoryBulletPoint$expected") - } - - fun Assert.indexSuccess(fromIndex: Int, toIndex: Int, actual: List, vararg expected: String): Assert { - return this.contains.exactly(1).regex( - "\\Q$successfulBulletPoint$featureArrow${index(fromIndex, toIndex)}: $actual\\E.*$separator" + - "$indentRootBulletPoint$indentFailingBulletPoint$indentFeatureArrow$featureBulletPoint$containsInAnyOrderOnly: $separator" + - expected.joinToString(".*$separator") - - ) - } - - fun Assert.indexFail(index: Int, actual: Any, expected: String): Assert { - return this.contains.exactly(1).regex( - "\\Q$failingBulletPoint$featureArrow${index(index)}: $actual\\E.*$separator" + - "$indentRootBulletPoint$indentFailingBulletPoint$indentFeatureArrow$featureBulletPoint$anEntryWhich: $separator" + - "$afterFail$indentListBulletPoint$explanatoryBulletPoint$expected") - } - - fun Assert.indexFail(fromIndex: Int, toIndex: Int, actual: List, vararg expected: String): Assert { - return this.contains.exactly(1).regex( - "\\Q$failingBulletPoint$featureArrow${index(fromIndex, toIndex)}: $actual\\E.*$separator" + - "$indentRootBulletPoint$indentFailingBulletPoint$indentFeatureArrow$featureBulletPoint$containsInAnyOrderOnly: $separator" + - expected.joinToString(".*$separator") - ) - } - - - - - describeFun(containsInOrderOnlyGroupedEntries) { - group("$describePrefix describe non-nullable cases") { - - val fluent = assert(oneToFour) - context("throws an $illegalArgumentException") { - test("if an empty group is given as first parameter") { - expect { - fluent.containsInOrderOnlyGroupedEntriesFun(group(), group({ toBe(-1.2) })) - }.toThrow { messageContains("a group of values cannot be empty") } - } - test("if an empty group is given as second parameter") { - expect { - fluent.containsInOrderOnlyGroupedEntriesFun(group({ toBe(1.2) }), group()) - }.toThrow { messageContains("a group of values cannot be empty") } - } - test("if an empty group is given as third parameter") { - expect { - fluent.containsInOrderOnlyGroupedEntriesFun(group({ toBe(1.2) }), group({ toBe(4.3) }), group()) - }.toThrow { messageContains("a group of values cannot be empty") } - } - test("if an empty group is given as fourth parameter") { - expect { - fluent.containsInOrderOnlyGroupedEntriesFun( - group({ toBe(1.2) }), - group({ toBe(4.3) }), - group({ toBe(5.7) }), - group() - ) - }.toThrow { messageContains("a group of values cannot be empty") } - } - } - - context("empty collection") { - val fluentEmpty = assert(setOf()) - test("(1.0), (1.2) throws AssertionError") { - expect { - fluentEmpty.containsInOrderOnlyGroupedEntriesFun(group({ toBe(1.0) }), group({ toBe(1.2) })) - }.toThrow { - message { - contains.exactly(1).value("$rootBulletPoint$containsInOrderOnlyGrouped:") - indexFail(0, sizeExceeded, "$toBeDescr: 1.0") - indexFail(1, sizeExceeded, "$toBeDescr: 1.2") - containsNot(additionalEntries) - containsSize(0, 2) - } - } - } - } - - context("iterable $oneToFour") { - - describe("happy case") { - test("(1.0), (2.0, 3.0), (4.0, 4.0)") { - fluent.containsInOrderOnlyGroupedEntriesFun( - group({ toBe(1.0) }), - group({ toBe(2.0) }, { toBe(3.0) }), - group({ toBe(4.0) }, { toBe(4.0) }) - ) - } - test("(2.0, 1.0), (4.0, 3.0), (4.0)") { - fluent.containsInOrderOnlyGroupedEntriesFun( - group({ toBe(2.0) }, { toBe(1.0) }), - group({ toBe(4.0) }, { toBe(3.0) }), - group({ toBe(4.0) }) - ) - } - test("(2.0, 3.0, 1.0), (4.0), (4.0)") { - fluent.containsInOrderOnlyGroupedEntriesFun( - group({ toBe(2.0) }, { toBe(3.0) }, { toBe(1.0) }), - group({ toBe(4.0) }), - group({ toBe(4.0) }) - ) - } - test("(1.0, 2.0), (4.0, 3.0, 4.0)") { - fluent.containsInOrderOnlyGroupedEntriesFun( - group({ toBe(1.0) }, { toBe(2.0) }), - group({ toBe(4.0) }, { toBe(3.0) }, { toBe(4.0) }) - ) - } - test("[$isLessThanFun(2.1) && $isGreaterThanFun(1.0), $isLessThanFun(2.0)], [$isGreaterThanFun(3.0), $isGreaterThanFun(2.0), $isGreaterThanFun(1.0) && $isLessThanFun(5.0)]") { - fluent.containsInOrderOnlyGroupedEntriesFun( - group({ isLessThan(2.1).and.isGreaterThan(1.0) }, { isLessThan(2.0) }), - group({ isGreaterThan(3.0) }, - { isGreaterThan(2.0) }, - { isGreaterThan(1.0); isLessThan(5.0) }) - ) - } - } - - describe("error cases (throws AssertionError)") { - - test("(4.0, 1.0), (2.0, 3.0, 4.0) -- wrong order") { - expect { - fluent.containsInOrderOnlyGroupedEntriesFun( - group({ toBe(4.0) }, { toBe(1.0) }), - group({ toBe(2.0) }, { toBe(3.0) }, { toBe(4.0) }) - ) - }.toThrow { - message { - contains.exactly(1).value("$rootBulletPoint$containsInOrderOnlyGrouped:") - indexFail( - 0, 1, listOf(1.0, 2.0), - failAfterFail("$toBeDescr: 4.0"), - successAfterFail("$toBeDescr: 1.0"), - successSizeAfterFail(2), - mismatchesAfterFail(2.0) - ) - indexFail( - 2, 4, listOf(3.0, 4.0, 4.0), - failAfterFail("$toBeDescr: 2.0"), - successAfterFail("$toBeDescr: 3.0"), - successAfterFail("$toBeDescr: 4.0"), - successSizeAfterFail(3), - mismatchesAfterFail(4.0) - ) - containsRegex(size(indentRootBulletPoint, successfulBulletPoint, 5, 5)) - } - } - } - - test("[$isLessThanFun(2.1), $isLessThanFun(2.0)], (4.0, 3.0, 4.0) -- first win also applies here, $isLessThanFun(2.1) matches 1.0 and not 2.0") { - expect { - fluent.containsInOrderOnlyGroupedEntriesFun( - group({ isLessThan(2.1) }, { isLessThan(2.0) }), - group({ toBe(4.0) }, { toBe(3.0) }, { toBe(4.0) }) - ) - }.toThrow { - message { - contains.exactly(1).value("$rootBulletPoint$containsInOrderOnlyGrouped:") - indexFail( - 0, 1, listOf(1.0, 2.0), - successAfterFail("$isLessThanDescr: 2.1"), - failAfterFail("$isLessThanDescr: 2.0"), - successSizeAfterFail(2), - mismatchesAfterFail(2.0) - ) - indexSuccess( - 2, 4, listOf(3.0, 4.0, 4.0), - successAfterSuccess("$toBeDescr: 4.0"), - successAfterSuccess("$toBeDescr: 3.0"), - successAfterSuccess("$toBeDescr: 4.0"), - successSizeAfterFail(3) - ) - containsRegex(size(indentRootBulletPoint, successfulBulletPoint, 5, 5)) - } - } - } - - test("(1.0), (4.0, 3.0, 2.0) -- 4.0 was missing") { - expect { - fluent.containsInOrderOnlyGroupedEntriesFun( - group({ toBe(1.0) }), - group({ toBe(4.0) }, { toBe(2.0) }, { toBe(3.0) }) - ) - }.toThrow { - message { - contains.exactly(1).value("$rootBulletPoint$containsInOrderOnlyGrouped:") - indexSuccess(0, 1.0, "$toBeDescr: 1.0") - indexSuccess( - 1, 3, listOf(2.0, 3.0, 4.0), - successAfterSuccess("$toBeDescr: 4.0", "$toBeDescr: 2.0", "$toBeDescr: 3.0"), - successSizeAfterSuccess(3) - ) - containsRegex(size(indentRootBulletPoint, failingBulletPoint, 5, 4)) - containsRegex(additional(4 to 4.0)) - } - } - } - - test("(1.0), (4.0) -- 2.0, 3.0 and 4.0 was missing") { - expect { - fluent.containsInOrderOnlyGroupedEntriesFun(group({ toBe(1.0) }), group({ toBe(4.0) })) - }.toThrow { - message { - contains.exactly(1).value("$rootBulletPoint$containsInOrderOnlyGrouped:") - indexSuccess(0, 1.0, "$toBeDescr: 1.0") - indexFail(1, 2.0, "$toBeDescr: 4.0") - containsRegex(size(indentRootBulletPoint, failingBulletPoint, 5, 2)) - containsRegex(additional(2 to 3.0, 3 to 4.0, 4 to 4.0)) - } - } - } - test("(1.0, 3.0), (5.0) -- 5.0 is wrong and 4.0 and 4.0 are missing") { - expect { - fluent.containsInOrderOnlyGroupedEntriesFun( - group({ toBe(1.0) }, { toBe(3.0) }), - group({ toBe(5.0) }) - ) - }.toThrow { - message { - contains.exactly(1).value("$rootBulletPoint$containsInOrderOnlyGrouped:") - indexFail( - 0, 1, listOf(1.0, 2.0), - successAfterFail("$toBeDescr: 1.0"), - failAfterFail("$toBeDescr: 3.0"), - successSizeAfterFail(2), - mismatchesAfterFail(2.0) - ) - indexFail(2, 3.0, "$toBeDescr: 5.0") - containsRegex(size(indentRootBulletPoint, failingBulletPoint, 5, 3)) - containsRegex(additional(3 to 4.0, 4 to 4.0)) - } - } - } - test("(4.0, 1.0, 3.0, 2.0), (5.0, 4.0) -- 5.0 too much") { - expect { - fluent.containsInOrderOnlyGroupedEntriesFun( - group({ toBe(4.0) }, { toBe(1.0) }, { toBe(3.0) }, { toBe(2.0) }), - group({ toBe(5.0) }, { toBe(4.0) }) - ) - }.toThrow { - message { - contains.exactly(1).value("$rootBulletPoint$containsInOrderOnlyGrouped:") - indexSuccess( - 0, 3, listOf(1.0, 2.0, 3.0, 4.0), - successAfterSuccess( - "$toBeDescr: 4.0", - "$toBeDescr: 1.0", - "$toBeDescr: 3.0", - "$toBeDescr: 2.0" - ), - successSizeAfterSuccess(4) - ) - indexFail( - 4, 5, listOf(4.0), - failAfterFail("$toBeDescr: 5.0"), - successAfterFail("$toBeDescr: 4.0"), - failSizeAfterFail(1, 2) - ) - containsRegex(size(indentRootBulletPoint, failingBulletPoint, 5, 6)) - } - } - } - } - } - } - - - nullableCases(describePrefix) { - describeFun("$containsInOrderOnlyGroupedEntries for nullable") { - val list = listOf(null, 1.0, null, 3.0) - val fluent = verbs.checkImmediately(list) - - absentSubjectTests(verbs) { t, tX -> - if (tX.isEmpty()) { - containsInOrderOnlyGroupedEntriesFun(group(t), group(null)) - } else { - containsInOrderOnlyGroupedEntriesFun(group(t), group(*tX)) - } - } - - context("iterable $list") { - - describe("happy case") { - test("[$toBeFun(1.0), null], [null, $toBeFun(3.0)]") { - fluent.containsInOrderOnlyGroupedEntriesFun( - group({ toBe(1.0) }, null), - group(null, { toBe(3.0) }) - ) - } - test("[null], [null, $isGreaterThanFun(2.0), $isLessThanFun(5.0)]") { - fluent.containsInOrderOnlyGroupedEntriesFun( - group(null), - group(null, { isGreaterThan(2.0) }, { isLessThan(5.0) }) - ) - } - } - - describe("error cases (throws AssertionError)") { - - test("[null, null], [$isLessThanFun(5.0), $isGreaterThanFun(2.0)] -- wrong order") { - expect { - fluent.containsInOrderOnlyGroupedEntriesFun( - group(null, null), - group({ isLessThan(5.0) }, { isGreaterThan(2.0) }) - ) - }.toThrow { - message { - contains.exactly(1).value("$rootBulletPoint$containsInOrderOnlyGrouped:") - indexFail( - 0, 1, listOf(null, 1.0), - successAfterFail("$isDescr: null"), - failAfterFail("$isDescr: null"), - successSizeAfterFail(2) - ) - indexFail( - 2, 3, listOf(null, 3.0), - successAfterFail("$isLessThanDescr: 5.0"), - failAfterFail("$isGreaterThanDescr: 2.0"), - successSizeAfterFail(2) - ) - containsSize(4, 4) - } - } - } - - test("[null, $toBeFun(1.0)], [$toBeFun(3.0), null, null] -- null too much") { - expect { - fluent.containsInOrderOnlyGroupedEntriesFun( - group(null, { toBe(1.0) }), - group({ toBe(3.0) }, null, null) - ) - }.toThrow { - message { - contains.exactly(1).value("$rootBulletPoint$containsInOrderOnlyGrouped:") - indexSuccess( - 0, 1, listOf(null, 1.0), - successAfterSuccess("$isDescr: null"), - successAfterSuccess("$toBeDescr: 1.0"), - successSizeAfterSuccess(2) - ) - indexFail( - 2, 4, listOf(null, 3.0), - successAfterFail("$toBeDescr: 3.0"), - successAfterFail("$isDescr: null"), - failAfterFail("$isDescr: null"), - failSizeAfterFail(2, 3) - ) - containsSize(4, 5) - } - } - } - } - } - } - } - } -}) diff --git a/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/IterableContainsInOrderOnlyGroupedValuesAssertionsSpec.kt b/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/IterableContainsInOrderOnlyGroupedValuesAssertionsSpec.kt deleted file mode 100644 index 788484384..000000000 --- a/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/IterableContainsInOrderOnlyGroupedValuesAssertionsSpec.kt +++ /dev/null @@ -1,388 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") - -package ch.tutteli.atrium.spec.integration - -import ch.tutteli.atrium.api.cc.en_GB.* -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.domain.builders.utils.Group -import ch.tutteli.atrium.spec.AssertionVerbFactory -import ch.tutteli.atrium.translations.DescriptionBasic.TO_BE -import ch.tutteli.atrium.translations.DescriptionIterableAssertion -import org.jetbrains.spek.api.dsl.context -import org.jetbrains.spek.api.dsl.describe -import org.jetbrains.spek.api.include - -@Deprecated("Switch from Assert to Expect and use Spec from atrium-specs-common; will be removed with 1.0.0") -abstract class IterableContainsInOrderOnlyGroupedValuesAssertionsSpec( - verbs: AssertionVerbFactory, - containsInOrderOnlyGroupedValuesPair: Pair>.(Group, Group, Array>) -> Assert>>, - groupFactory: (Array) -> Group, - containsInOrderOnlyGroupedNullableValuesPair: Pair>.(Group, Group, Array>) -> Assert>>, - nullableGroupFactory: (Array) -> Group, - rootBulletPoint: String, - successfulBulletPoint: String, - failingBulletPoint: String, - warningBulletPoint: String, - listBulletPoint: String, - featureArrow: String, - featureBulletPoint: String, - describePrefix: String = "[Atrium] " -) : IterableContainsSpecBase({ - - fun group(vararg doubles: Double) = groupFactory(doubles.toTypedArray()) - fun nullableGroup(vararg assertionCreators: Double?) = nullableGroupFactory(assertionCreators) - - include(@Suppress("DEPRECATION") object : SubjectLessAssertionSpec>(describePrefix, - containsInOrderOnlyGroupedValuesPair.first to mapToCreateAssertion { containsInOrderOnlyGroupedValuesPair.second(this, group(2.5), group(4.1), arrayOf()) }, - "${containsInOrderOnlyGroupedNullableValuesPair.first} for nullable" to mapToCreateAssertion { containsInOrderOnlyGroupedNullableValuesPair.second(this, nullableGroup(2.5), nullableGroup(4.1), arrayOf()) } - ) {}) - - include(@Suppress("DEPRECATION") object : CheckingAssertionSpec>(verbs, describePrefix, - checkingTriple(containsInOrderOnlyGroupedValuesPair.first, { containsInOrderOnlyGroupedValuesPair.second(this, group(2.5), group(1.2, 2.2), arrayOf()) }, listOf(2.5, 2.2, 1.2).asIterable(), listOf(2.2, 1.2, 2.5)), - checkingTriple("${containsInOrderOnlyGroupedNullableValuesPair.first} for nullable", { containsInOrderOnlyGroupedNullableValuesPair.second(this, nullableGroup(2.5), nullableGroup(1.2, 2.2), arrayOf()) }, listOf(2.5, 2.2, 1.2).asIterable(), listOf(2.2, 1.2, 2.5)) - ) {}) - - val assert: (Iterable) -> Assert> = verbs::checkImmediately - val expect = verbs::checkException - - val (containsInOrderOnlyGroupedValues, containsInOrderOnlyGroupedValuesFunArr) = containsInOrderOnlyGroupedValuesPair - - val (containsInOrderOnlyGroupedNullableValues, containsInOrderOnlyGroupedNullableValuesFunArr) = containsInOrderOnlyGroupedNullableValuesPair - fun Assert>.containsInOrderOnlyGroupedNullableValuesFun(t1: Group, t2: Group, vararg tX: Group) - = containsInOrderOnlyGroupedNullableValuesFunArr(t1,t2, tX) - - val indentRootBulletPoint = " ".repeat(rootBulletPoint.length) - val indentSuccessfulBulletPoint = " ".repeat(successfulBulletPoint.length) - val indentFailingBulletPoint = " ".repeat(failingBulletPoint.length) - val indentFeatureArrow = " ".repeat(featureArrow.length) - val indentFeatureBulletPoint = " ".repeat(featureBulletPoint.length) - val indentWarningBulletPoint = " ".repeat(warningBulletPoint.length) - - val toBeWithFeature = "$indentFeatureArrow$featureBulletPoint${TO_BE.getDefault()}" - val toBeAfterSuccess = "$indentRootBulletPoint$indentSuccessfulBulletPoint$toBeWithFeature" - val toBeAfterFailing = "$indentRootBulletPoint$indentFailingBulletPoint$toBeWithFeature" - - fun index(index: Int) - = String.format(DescriptionIterableAssertion.INDEX.getDefault(), index) - - fun entryWithIndex(index: Int) - = String.format(entryWithIndex, index) - - fun index(fromIndex: Int, toIndex: Int) - = String.format(DescriptionIterableAssertion.INDEX_FROM_TO.getDefault(), fromIndex, toIndex) - - fun entry(prefix: String, bulletPoint: String, expected: Array) - = expected.joinToString(".*$separator") { "$prefix\\Q$bulletPoint$anEntryWhichIs: $it\\E" } - - fun size(prefix: String, bulletPoint: String, actual: Int, expected: Int) - = "$prefix\\Q$bulletPoint\\E${featureArrow}size: $actual[^:]+: $expected" - - - val afterFail = "$indentRootBulletPoint$indentFailingBulletPoint$indentFeatureArrow$indentFeatureBulletPoint" - fun failAfterFail(vararg expected: Double?) - = entry(afterFail, failingBulletPoint, expected) - - fun successAfterFail(vararg expected: Double?) - = entry(afterFail, successfulBulletPoint, expected) - - fun failSizeAfterFail(actual: Int, expected: Int) - = size(afterFail, failingBulletPoint, actual, expected) - - fun successSizeAfterFail(size: Int) - = size(afterFail, successfulBulletPoint, size, size) - - fun warning(msg: String, values: Array, act: (T) -> String) - = "$afterFail\\Q$warningBulletPoint$msg\\E: $separator" + - values.joinToString(".*$separator") { "$afterFail$indentWarningBulletPoint$listBulletPoint${act(it)}" } - - fun mismatchesAfterFail(vararg mismatched: Double) - = warning(mismatches, mismatched.toTypedArray()){ "$it" } - - fun additional(vararg entryWithValue: Pair) - = warning(additionalEntries, entryWithValue) { "${entryWithIndex(it.first)}: ${it.second}" } - - - val afterSuccess = "$indentRootBulletPoint$indentSuccessfulBulletPoint$indentFeatureArrow$indentFeatureBulletPoint" - fun successAfterSuccess(vararg expected: Double?) - = entry(afterSuccess, successfulBulletPoint, expected) - - fun successSizeAfterSuccess(size: Int) - = size(afterSuccess, successfulBulletPoint, size, size) - - - fun Assert.indexSuccess(index: Int, expected: Double): Assert { - return this.contains.exactly(1).regex( - "\\Q$successfulBulletPoint$featureArrow${index(index)}: $expected\\E.*$separator" + - "$toBeAfterSuccess: $expected") - } - - fun Assert.indexSuccess(fromIndex: Int, toIndex: Int, actual: List, vararg expected: String): Assert { - return this.contains.exactly(1).regex( - "\\Q$successfulBulletPoint$featureArrow${index(fromIndex, toIndex)}: $actual\\E.*$separator" + - "$indentRootBulletPoint$indentFailingBulletPoint$indentFeatureArrow$featureBulletPoint$containsInAnyOrderOnly: $separator" + - expected.joinToString(".*$separator") - - ) - } - - fun Assert.indexFail(index: Int, actual: Any, expected: Double): Assert { - return this.contains.exactly(1).regex( - "\\Q$failingBulletPoint$featureArrow${index(index)}: $actual\\E.*$separator" + - "$toBeAfterFailing: $expected") - } - - fun Assert.indexFail(fromIndex: Int, toIndex: Int, actual: List, vararg expected: String): Assert { - return this.contains.exactly(1).regex( - "\\Q$failingBulletPoint$featureArrow${index(fromIndex, toIndex)}: $actual\\E.*$separator" + - "$indentRootBulletPoint$indentFailingBulletPoint$indentFeatureArrow$featureBulletPoint$containsInAnyOrderOnly: $separator" + - expected.joinToString(".*$separator") - ) - } - - fun groupToNullableGroup(group: Group) = nullableGroup(*group.toList().toTypedArray()) - - group("$describePrefix describe non-nullable cases") { - mapOf>.(Group, Group, Array>) -> Any>( - containsInOrderOnlyGroupedValues to { g1, g2, gX -> containsInOrderOnlyGroupedValuesFunArr(this, g1, g2, gX) }, - "$containsInOrderOnlyGroupedNullableValues for nullable" to { g1, g2, gX -> containsInOrderOnlyGroupedNullableValuesFunArr(this, groupToNullableGroup(g1), groupToNullableGroup(g2), gX.map { groupToNullableGroup(it)}.toTypedArray()) } - ).forEach { (describe, containsFunArr) -> - - fun Assert>.containsFun(t1: Group, t2: Group, vararg tX: Group) - = containsFunArr(t1, t2, tX) - - describeFun(describe) { - val fluent = assert(oneToFour) - context("throws an $illegalArgumentException") { - test("if an empty group is given as first parameter") { - expect { - fluent.containsFun(group(), group(-1.2)) - }.toThrow { messageContains("a group of values cannot be empty") } - } - test("if an empty group is given as second parameter") { - expect { - fluent.containsFun(group(1.2), group()) - }.toThrow { messageContains("a group of values cannot be empty") } - } - test("if an empty group is given as third parameter") { - expect { - fluent.containsFun(group(1.2), group(4.3), group()) - }.toThrow { messageContains("a group of values cannot be empty") } - } - test("if an empty group is given as fourth parameter") { - expect { - fluent.containsFun(group(1.2), group(4.3), group(5.7), group()) - }.toThrow { messageContains("a group of values cannot be empty") } - } - } - - context("empty collection") { - val fluentEmpty = assert(setOf()) - test("(1.0), (1.2) throws AssertionError") { - expect { - fluentEmpty.containsFun(group(1.0), group(1.2)) - }.toThrow { - message { - contains.exactly(1).value("$rootBulletPoint$containsInOrderOnlyGrouped:") - indexFail(0, sizeExceeded, 1.0) - indexFail(1, sizeExceeded, 1.2) - containsNot(additionalEntries) - containsSize(0, 2) - } - } - } - } - - context("iterable $oneToFour") { - - describe("happy case") { - test("(1.0), (2.0, 3.0), (4.0, 4.0)") { - fluent.containsFun(group(1.0), group(2.0, 3.0), group(4.0, 4.0)) - } - test("(2.0, 1.0), (4.0, 3.0), (4.0)") { - fluent.containsFun(group(2.0, 1.0), group(4.0, 3.0), group(4.0)) - } - test("(2.0, 3.0, 1.0), (4.0), (4.0)") { - fluent.containsFun(group(2.0, 3.0, 1.0), group(4.0), group(4.0)) - } - test("(1.0, 2.0), (4.0, 3.0, 4.0)") { - fluent.containsFun(group(1.0, 2.0), group(4.0, 3.0, 4.0)) - } - } - - describe("error cases (throws AssertionError)") { - - test("(4.0, 1.0), (2.0, 3.0, 4.0) -- wrong order") { - expect { - fluent.containsFun(group(4.0, 1.0), group(2.0, 3.0, 4.0)) - }.toThrow { - message { - contains.exactly(1).value("$rootBulletPoint$containsInOrderOnlyGrouped:") - indexFail(0, 1, listOf(1.0, 2.0), - failAfterFail(4.0), - successAfterFail(1.0), - successSizeAfterFail(2), - mismatchesAfterFail(2.0) - ) - indexFail(2, 4, listOf(3.0, 4.0, 4.0), - failAfterFail(2.0), - successAfterFail(3.0), - successAfterFail(4.0), - successSizeAfterFail(3), - mismatchesAfterFail(4.0) - ) - containsRegex(size(indentRootBulletPoint, successfulBulletPoint, 5, 5)) - } - } - } - - test("(1.0), (4.0, 3.0, 2.0) -- 4.0 was missing") { - expect { - fluent.containsFun(group(1.0), group(4.0, 2.0, 3.0)) - }.toThrow { - message { - contains.exactly(1).value("$rootBulletPoint$containsInOrderOnlyGrouped:") - indexSuccess(0, 1.0) - indexSuccess(1, 3, listOf(2.0, 3.0, 4.0), - successAfterSuccess(4.0, 2.0, 3.0), - successSizeAfterSuccess(3) - ) - containsRegex(size(indentRootBulletPoint, failingBulletPoint, 5, 4)) - containsRegex(additional(4 to 4.0)) - } - } - } - - test("(1.0), (4.0) -- 2.0, 3.0 and 4.0 was missing") { - expect { - fluent.containsFun(group(1.0), group(4.0)) - }.toThrow { - message { - contains.exactly(1).value("$rootBulletPoint$containsInOrderOnlyGrouped:") - indexSuccess(0, 1.0) - indexFail(1, 2.0, 4.0) - containsRegex(size(indentRootBulletPoint, failingBulletPoint, 5, 2)) - containsRegex(additional(2 to 3.0, 3 to 4.0, 4 to 4.0)) - } - } - } - test("(1.0, 3.0), (5.0) -- 5.0 is wrong and 4.0 and 4.0 are missing") { - expect { - fluent.containsFun(group(1.0, 3.0), group(5.0)) - }.toThrow { - message { - contains.exactly(1).value("$rootBulletPoint$containsInOrderOnlyGrouped:") - indexFail(0, 1, listOf(1.0, 2.0), - successAfterFail(1.0), - failAfterFail(3.0), - successSizeAfterFail(2), - mismatchesAfterFail(2.0) - ) - indexFail(2, 3.0, 5.0) - containsRegex(size(indentRootBulletPoint, failingBulletPoint, 5, 3)) - containsRegex(additional(3 to 4.0, 4 to 4.0)) - } - } - } - test("( 4.0, 1.0, 3.0, 2.0), (5.0, 4.0) -- 5.0 too much") { - expect { - fluent.containsFun(group(4.0, 1.0, 3.0, 2.0), group(5.0, 4.0)) - }.toThrow { - message { - contains.exactly(1).value("$rootBulletPoint$containsInOrderOnlyGrouped:") - indexSuccess(0, 3, listOf(1.0, 2.0, 3.0, 4.0), - successAfterSuccess(4.0, 1.0, 3.0, 2.0), - successSizeAfterSuccess(4) - ) - indexFail(4, 5, listOf(4.0), - failAfterFail(5.0), - successAfterFail(4.0), - failSizeAfterFail(1, 2) - ) - containsRegex(size(indentRootBulletPoint, failingBulletPoint, 5, 6)) - } - } - } - } - } - } - } - } - - nullableCases(describePrefix){ - - describeFun("$containsInOrderOnlyGroupedNullableValues for nullable"){ - val list = listOf(null, 1.0, null, 3.0) - val fluent = verbs.checkImmediately(list) - - context("iterable $list") { - - describe("happy case") { - test("[1.0, null], [null, 3.0]") { - fluent.containsInOrderOnlyGroupedNullableValuesFun( - nullableGroup(1.0, null), - nullableGroup(null, 3.0) - ) - } - test("[null], [null, 3.0, 1.0]") { - fluent.containsInOrderOnlyGroupedNullableValuesFun( - nullableGroup(null), - nullableGroup(null, 3.0, 1.0) - ) - } - } - - describe("error cases (throws AssertionError)") { - - test("[null, null], [3.0, 1.0] -- wrong order") { - expect { - fluent.containsInOrderOnlyGroupedNullableValuesFun( - nullableGroup(null, null), - nullableGroup(3.0, 1.0)) - }.toThrow { - message { - contains.exactly(1).value("$rootBulletPoint$containsInOrderOnlyGrouped:") - indexFail(0, 1, listOf(null, 1.0), - successAfterFail(null), - failAfterFail(null), - successSizeAfterFail(2) - ) - indexFail(2, 3, listOf(null, 3.0), - successAfterFail(3.0), - failAfterFail(1.0), - successSizeAfterFail(2) - ) - containsRegex(size(indentRootBulletPoint, successfulBulletPoint, 4, 4)) - } - } - } - - test("[null, 1.0], [3.0, null, null] -- null too much") { - expect { - fluent.containsInOrderOnlyGroupedNullableValuesFun( - nullableGroup(null, 1.0), - nullableGroup(3.0, null, null) - ) - }.toThrow { - message { - contains.exactly(1).value("$rootBulletPoint$containsInOrderOnlyGrouped:") - indexSuccess(0, 1, listOf(null, 1.0), - successAfterSuccess(null), - successAfterSuccess(1.0), - successSizeAfterSuccess(2) - ) - indexFail(2, 4, listOf(null, 3.0), - successAfterFail(3.0), - successAfterFail(null), - failAfterFail(null), - failSizeAfterFail(2, 3) - ) - containsSize(4, 5) - } - } - } - } - } - } - } -}) diff --git a/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/IterableContainsInOrderOnlyValuesAssertionsSpec.kt b/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/IterableContainsInOrderOnlyValuesAssertionsSpec.kt deleted file mode 100644 index 8b94f2fb1..000000000 --- a/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/IterableContainsInOrderOnlyValuesAssertionsSpec.kt +++ /dev/null @@ -1,247 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") - -package ch.tutteli.atrium.spec.integration - -import ch.tutteli.atrium.api.cc.en_GB.* -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.reporting.Text -import ch.tutteli.atrium.spec.AssertionVerbFactory -import ch.tutteli.atrium.translations.DescriptionBasic.TO_BE -import org.jetbrains.spek.api.dsl.context -import org.jetbrains.spek.api.dsl.describe -import org.jetbrains.spek.api.include - -@Deprecated("Switch from Assert to Expect and use Spec from atrium-specs-common; will be removed with 1.0.0") -abstract class IterableContainsInOrderOnlyValuesAssertionsSpec( - verbs: AssertionVerbFactory, - containsInOrderOnlyValuesPair: Pair>.(Double, Array) -> Assert>>, - containsInOrderOnlyNullableValuesPair: Pair>.(Double?, Array) -> Assert>>, - rootBulletPoint: String, - successfulBulletPoint: String, - failingBulletPoint: String, - warningBulletPoint: String, - listBulletPoint: String, - featureArrow: String, - featureBulletPoint: String, - describePrefix: String = "[Atrium] " -) : IterableContainsSpecBase({ - - include(@Suppress("DEPRECATION") object : SubjectLessAssertionSpec>(describePrefix, - containsInOrderOnlyValuesPair.first to mapToCreateAssertion { containsInOrderOnlyValuesPair.second(this, 2.5, arrayOf()) }, - "${containsInOrderOnlyNullableValuesPair.first} for nullable" to mapToCreateAssertion { containsInOrderOnlyNullableValuesPair.second(this, 2.5, arrayOf()) } - ) {}) - - include(@Suppress("DEPRECATION") object : CheckingAssertionSpec>(verbs, describePrefix, - checkingTriple(containsInOrderOnlyValuesPair.first, { containsInOrderOnlyValuesPair.second(this, 2.5, arrayOf(1.2)) }, listOf(2.5, 1.2).asIterable(), listOf(2.5, 2.2)), - checkingTriple("${containsInOrderOnlyNullableValuesPair.first} for nullable", { containsInOrderOnlyNullableValuesPair.second(this, 2.5, arrayOf(1.2)) }, listOf(2.5, 1.2).asIterable(), listOf(2.5, 2.2)) - ) {}) - - val assert: (Iterable) -> Assert> = verbs::checkImmediately - val expect = verbs::checkException - - val (containsInOrderOnlyNullableValues, containsInOrderOnlyNullableValuesFunArr) = containsInOrderOnlyNullableValuesPair - fun Assert>.containsInOrderOnlyNullableValuesFun(t: Double?, vararg tX: Double?) - = containsInOrderOnlyNullableValuesFunArr(t, tX) - - val indentRootBulletPoint = " ".repeat(rootBulletPoint.length) - val indentSuccessfulBulletPoint = " ".repeat(successfulBulletPoint.length) - val indentFailingBulletPoint = " ".repeat(failingBulletPoint.length) - val indentFeatureArrow = " ".repeat(featureArrow.length) - - val toBeWithFeature = "$indentFeatureArrow$featureBulletPoint${TO_BE.getDefault()}" - val toBeAfterSuccess = "$indentRootBulletPoint$indentSuccessfulBulletPoint$toBeWithFeature" - val toBeAfterFailing = "$indentRootBulletPoint$indentFailingBulletPoint$toBeWithFeature" - - fun entry(index: Int) - = String.format(entryWithIndex, index) - - fun Assert.entrySuccess(index: Int, expected: String): Assert { - return this.contains.exactly(1).regex( - "\\Q$successfulBulletPoint$featureArrow${entry(index)}: $expected\\E.*$separator" + - "$toBeAfterSuccess: $expected") - } - - fun Assert.entrySuccess(index: Int, expected: Double)= entrySuccess(index, expected.toString()) - - fun Assert.entryFailing(index: Int, actual: Any, expected: Double): Assert { - return this.contains.exactly(1).regex( - "\\Q$failingBulletPoint$featureArrow${entry(index)}: $actual\\E.*$separator" + - "$toBeAfterFailing: $expected") - } - - nonNullableCases(describePrefix, - containsInOrderOnlyValuesPair, - containsInOrderOnlyNullableValuesPair - ) { containsValuesFunArr -> - - fun Assert>.containsFun(t: Double, vararg tX: Double) = - containsValuesFunArr(t, tX.toTypedArray()) - - context("empty collection") { - val fluentEmpty = assert(setOf()) - test("1.0 throws AssertionError") { - expect { - fluentEmpty.containsFun(1.0) - }.toThrow { - message { - contains("$rootBulletPoint$containsInOrderOnly:") - entryFailing(0, sizeExceeded, 1.0) - containsNot(additionalEntries) - containsSize(0, 1) - } - } - } - test("1.0 and 4.0 throws AssertionError") { - expect { - fluentEmpty.containsFun(1.0, 4.0) - }.toThrow { - message { - contains("$rootBulletPoint$containsInOrderOnly:") - entryFailing(0, sizeExceeded, 1.0) - entryFailing(1, sizeExceeded, 4.0) - containsNot(additionalEntries) - containsSize(0, 2) - } - } - } - } - - context("iterable $oneToFour") { - val fluent = assert(oneToFour) - - describe("happy case") { - test("1.0, 2.0, 3.0, 4.0, 4.0") { - fluent.containsFun(1.0, 2.0, 3.0, 4.0, 4.0) - } - } - - describe("error cases (throws AssertionError)") { - - test("4.0, 1.0, 2.0, 3.0, 4.0 -- wrong order") { - expect { - fluent.containsFun(4.0, 1.0, 2.0, 3.0, 4.0) - }.toThrow { - message { - contains.exactly(1).value("$rootBulletPoint$containsInOrderOnly:") - entryFailing(0, 1.0, 4.0) - entryFailing(1, 2.0, 1.0) - entryFailing(2, 3.0, 2.0) - entryFailing(3, 4.0, 3.0) - entrySuccess(4, 4.0) - containsSize(5, 5) - } - } - } - - test("1.0, 2.0, 3.0, 4.0 -- 4.0 was missing") { - expect { - fluent.containsFun(1.0, 2.0, 3.0, 4.0) - }.toThrow { - message { - contains.exactly(1).value("$rootBulletPoint$containsInOrderOnly:") - entrySuccess(0, 1.0) - entrySuccess(1, 2.0) - entrySuccess(2, 3.0) - entrySuccess(3, 4.0) - contains( - "$warningBulletPoint$additionalEntries:", - "$listBulletPoint${entry(4)}: 4.0" - ) - containsSize(5, 4) - } - } - } - - test("1.0, 4.0 -- 2.0, 3.0 and 4.0 was missing") { - expect { - fluent.containsFun(1.0, 4.0) - }.toThrow { - message { - contains.exactly(1).value("$rootBulletPoint$containsInOrderOnly:") - entrySuccess(0, 1.0) - entryFailing(1, 2.0, 4.0) - contains( - "$warningBulletPoint$additionalEntries:", - "$listBulletPoint${entry(2)}: 3.0", - "$listBulletPoint${entry(3)}: 4.0", - "$listBulletPoint${entry(4)}: 4.0" - ) - containsSize(5, 2) - } - } - } - test("1.0, 3.0, 5.0 -- 5.0 is wrong and 4.0 and 4.0 are missing") { - expect { - fluent.containsFun(1.0, 3.0, 5.0) - }.toThrow { - message { - contains.exactly(1).value("$rootBulletPoint$containsInOrderOnly:") - entrySuccess(0, 1.0) - entryFailing(1, 2.0, 3.0) - entryFailing(2, 3.0, 5.0) - contains( - "$warningBulletPoint$additionalEntries:", - "$listBulletPoint${entry(3)}: 4.0", - "$listBulletPoint${entry(4)}: 4.0" - ) - containsSize(5, 3) - } - } - } - test("1.0, 2.0, 3.0, 4.0, 4.0, 5.0 -- 5.0 too much") { - expect { - fluent.containsFun(1.0, 2.0, 3.0, 4.0, 4.0, 5.0) - }.toThrow { - message { - contains.exactly(1).value("$rootBulletPoint$containsInOrderOnly:") - entrySuccess(0, 1.0) - entrySuccess(1, 2.0) - entrySuccess(2, 3.0) - entrySuccess(3, 4.0) - entrySuccess(4, 4.0) - entryFailing(5, sizeExceeded, 5.0) - containsSize(5, 6) - } - } - } - } - } - } - - nullableCases(describePrefix) { - - describeFun("$containsInOrderOnlyNullableValues for nullable") { - val list = listOf(null, 1.0, null, 3.0) - val fluent = verbs.checkImmediately(list) - - context("iterable $list") { - context("happy cases (do not throw)") { - test("null, 1.0, null, 3.0") { - fluent.containsInOrderOnlyNullableValuesFun(null, 1.0, null, 3.0) - } - } - - context("failing cases") { - test("null, 1.0, 3.0 -- null was missing") { - expect { - fluent.containsInOrderOnlyNullableValuesFun(null, 1.0, 3.0) - }.toThrow { - message { - contains.exactly(1).value("$rootBulletPoint$containsInOrderOnly:") - entrySuccess(0, Text.NULL.string) - entrySuccess(1, 1.0) - entryFailing(2, Text.NULL.string, 3.0) - contains( - "$warningBulletPoint$additionalEntries:", - "$listBulletPoint${entry(3)}: 3.0" - ) - containsSize(4, 3) - } - } - } - } - } - } - } -}) diff --git a/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/IterableContainsNotEntriesAssertionsSpec.kt b/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/IterableContainsNotEntriesAssertionsSpec.kt deleted file mode 100644 index 5cda456d9..000000000 --- a/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/IterableContainsNotEntriesAssertionsSpec.kt +++ /dev/null @@ -1,213 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") - -package ch.tutteli.atrium.spec.integration - -import ch.tutteli.atrium.api.cc.en_GB.* -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.spec.AssertionVerbFactory -import ch.tutteli.atrium.translations.DescriptionBasic -import ch.tutteli.atrium.translations.DescriptionIterableAssertion -import org.jetbrains.spek.api.dsl.SpecBody -import org.jetbrains.spek.api.dsl.context -import org.jetbrains.spek.api.include - -@Deprecated("Switch from Assert to Expect and use Spec from atrium-specs-common; will be removed with 1.0.0") -abstract class IterableContainsNotEntriesAssertionsSpec( - verbs: AssertionVerbFactory, - containsNotValuesPair: Pair>.(Assert.() -> Unit, Array.() -> Unit>) -> Assert>>, - containsNotNullableValuesPair: Pair>.((Assert.() -> Unit)?, Array.() -> Unit)?>) -> Assert>>, - rootBulletPoint: String, - successfulBulletPoint: String, - failingBulletPoint: String, - listBulletPoint: String, - explanatoryBulletPoint: String, - featureArrow: String, - featureBulletPoint: String, - describePrefix: String = "[Atrium] " -) : IterableContainsEntriesSpecBase(verbs, { - - include(@Suppress("DEPRECATION") object : SubjectLessAssertionSpec>(describePrefix, - containsNotValuesPair.first to mapToCreateAssertion { containsNotValuesPair.second(this, { toBe(2.3) }, arrayOf()) }, - "${containsNotNullableValuesPair.first} for nullable" to mapToCreateAssertion { containsNotNullableValuesPair.second(this, { toBe(2.3) }, arrayOf()) } - ) {}) - - include(@Suppress("DEPRECATION") object : CheckingAssertionSpec>(verbs, describePrefix, - checkingTriple(containsNotValuesPair.first, { containsNotValuesPair.second(this, { toBe(2.3) }, arrayOf()) }, listOf(2.1).asIterable(), listOf(2.1, 2.3)), - checkingTriple("${containsNotNullableValuesPair.first} for nullable", { containsNotNullableValuesPair.second(this, { toBe(2.3) }, arrayOf()) }, listOf(2.1).asIterable(), listOf(2.1, 2.3)) - ) {}) - - fun SpecBody.describeFun(funName: String, body: SpecBody.() -> Unit) - = group("fun `$funName`", body = body) - - val expect = verbs::checkException - - val (containsNotNullable, containsNotNullableFunArr) = containsNotNullableValuesPair - fun Assert>.containsNotNullableFun(a: (Assert.() -> Unit)?, vararg aX: (Assert.() -> Unit)?) - = containsNotNullableFunArr(a, aX) - - val containsNotDescr = DescriptionIterableAssertion.CONTAINS_NOT.getDefault() - val hasElement = DescriptionIterableAssertion.HAS_ELEMENT.getDefault() - - val indentRootBulletPoint = " ".repeat(rootBulletPoint.length) - val indentSuccessfulBulletPoint = " ".repeat(successfulBulletPoint.length) - val indentFailingBulletPoint = " ".repeat(failingBulletPoint.length) - val indentListBulletPoint = " ".repeat(listBulletPoint.length) - val indentFeatureArrow = " ".repeat(featureArrow.length) - - val featureSuccess = "$indentRootBulletPoint$indentListBulletPoint\\Q$successfulBulletPoint$featureArrow\\E" - val featureFailing = "$indentRootBulletPoint$indentListBulletPoint\\Q$failingBulletPoint$featureArrow\\E" - val isAfterFailing = "$indentRootBulletPoint$indentListBulletPoint$indentFailingBulletPoint$indentFeatureArrow\\Q$featureBulletPoint\\E$isDescr" - val isAfterSuccess = "$indentRootBulletPoint$indentListBulletPoint$indentSuccessfulBulletPoint$indentFeatureArrow\\Q$featureBulletPoint\\E$isDescr" - val afterExplanatory = "$indentRootBulletPoint$indentListBulletPoint$indentSuccessfulBulletPoint\\Q$explanatoryBulletPoint\\E" - - nonNullableCases( - describePrefix, - containsNotValuesPair, - containsNotNullableValuesPair - ) {containsNotFunArr -> - - fun Assert>.containsNotFun(a: Assert.() -> Unit, vararg aX: Assert.() -> Unit) - = containsNotFunArr(a, aX) - - context("empty collection") { - val fluent = verbs.checkImmediately(setOf()) - - test("$toBeFun(4.0) throws AssertionError") { - expect { - fluent.containsNotFun({ toBe(4.0) }) - }.toThrow { - message { - containsRegex( - "\\Q$rootBulletPoint\\E$containsNotDescr: $separator" + - "$indentRootBulletPoint\\Q$listBulletPoint\\E$anEntryWhich: $separator"+ - "$afterExplanatory$toBeDescr: 4.0.*$separator" + - "$featureSuccess$numberOfOccurrences: 0$separator"+ - "$isAfterSuccess: 0.*$separator"+ - "$featureFailing$hasElement: false$separator" + - "$isAfterFailing: true" - ) - } - } - } - } - - context("iterable $oneToSeven") { - val fluent = verbs.checkImmediately(oneToSeven) - - group("happy case") { - test("$isGreaterThanFun(1.0) and $isLessThanFun(2.0) does not throw") { - fluent.containsNotFun({ isGreaterThan(1.0); isLessThan(2.0) }) - } - test("$toBeFun(1.1), $toBeFun(2.2), $toBeFun(3.3) does not throw") { - fluent.containsNotFun({ toBe(1.1) }, { toBe(2.2) }, { toBe(3.3) }) - } - test("$toBeFun(3.3), $toBeFun(1.1), $toBeFun(2.2) does not throw") { - fluent.containsNotFun({ toBe(3.3) }, { toBe(1.1) }, { toBe(2.2) }) - } - } - - group("failing cases; search string at different positions") { - test("$isLessThanFun(4.0) throws AssertionError") { - expect { - fluent.containsNotFun({ isLessThan(4.0) }) - }.toThrow { - message { - containsRegex( - "\\Q$rootBulletPoint\\E$containsNotDescr: $separator" + - "$indentRootBulletPoint\\Q$listBulletPoint\\E$anEntryWhich: $separator"+ - "$afterExplanatory$isLessThanDescr: 4.0.*$separator" + - "$featureFailing$numberOfOccurrences: 3$separator"+ - "$isAfterFailing: 0.*$separator"+ - "$featureSuccess$hasElement: true$separator" + - "$isAfterSuccess: true" - ) - } - } - } - test("$toBeFun(1.0), $toBeFun(4.0) throws AssertionError") { - expect { - fluent.containsNotFun({ toBe(1.0) }, { toBe(4.0) }) - }.toThrow { - message { - containsRegex( - "\\Q$rootBulletPoint\\E$containsNotDescr: $separator" + - "$indentRootBulletPoint\\Q$listBulletPoint\\E$anEntryWhich: $separator"+ - "$afterExplanatory$toBeDescr: 1.0.*$separator" + - "$featureFailing$numberOfOccurrences: 1$separator"+ - "$isAfterFailing: 0.*$separator"+ - "$featureSuccess$hasElement: true$separator" + - "$isAfterSuccess: true$separator"+ - "$indentRootBulletPoint\\Q$listBulletPoint\\E$anEntryWhich: $separator"+ - "$afterExplanatory$toBeDescr: 4.0.*$separator" + - "$featureFailing$numberOfOccurrences: 3$separator"+ - "$isAfterFailing: 0.*$separator"+ - "$featureSuccess$hasElement: true$separator" + - "$isAfterSuccess: true" - ) - } - } - } - test("$toBeFun(4.0), $toBeFun(1.1) throws AssertionError mentioning only 4.0") { - expect { - fluent.containsNotFun({ toBe(4.0) }, { toBe(1.0) }) - }.toThrow { - message { - containsRegex("$anEntryWhich: $separator.*$toBeDescr: 4.0") - containsNot.regex("$anEntryWhich: $separator.*$toBeDescr: 1.1") - } - } - } - } - - } - } - - nullableCases(describePrefix) { - describeFun("$containsNotNullable for nullable") { - context("iterable $oneToSeven") { - test("null does not throw") { - verbs.checkImmediately(oneToSeven).containsNotNullableFun(null) - } - } - context("iterable $oneToSevenNullable"){ - test("null throws AssertionError") { - expect { - verbs.checkImmediately(oneToSevenNullable).containsNotNullableFun(null) - }.toThrow { - message { - containsRegex( - "\\Q$rootBulletPoint\\E$containsNotDescr: $separator" + - "$indentRootBulletPoint\\Q$listBulletPoint\\E$anEntryWhich: $separator"+ - "$afterExplanatory$isDescr: null$separator" + - "$featureFailing$numberOfOccurrences: 2$separator" + - "$isAfterFailing: 0.*$separator" + - "$featureSuccess$hasElement: true$separator" + - "$isAfterSuccess: true" - ) - } - } - } - - test("1.1, null throws AssertionError mentioning only null") { - expect { - verbs.checkImmediately(oneToSevenNullable).containsNotNullableFun({ toBe(1.1) }, null) - }.toThrow { - message { - containsRegex( - "\\Q$rootBulletPoint\\E$containsNotDescr: $separator" + - "$indentRootBulletPoint\\Q$listBulletPoint\\E$anEntryWhich: $separator"+ - "$afterExplanatory$isDescr: null$separator" + - "$featureFailing$numberOfOccurrences: 2$separator" + - "$isAfterFailing: 0.*$separator" + - "$featureSuccess$hasElement: true$separator" + - "$isAfterSuccess: true" - ) - this.containsNot("$containsNotDescr: 1.1") - } - } - } - } - } - } -}) diff --git a/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/IterableContainsNotValuesAssertionsSpec.kt b/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/IterableContainsNotValuesAssertionsSpec.kt deleted file mode 100644 index 017d8fa4f..000000000 --- a/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/IterableContainsNotValuesAssertionsSpec.kt +++ /dev/null @@ -1,220 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") - -package ch.tutteli.atrium.spec.integration - -import ch.tutteli.atrium.api.cc.en_GB.containsNot -import ch.tutteli.atrium.api.cc.en_GB.containsRegex -import ch.tutteli.atrium.api.cc.en_GB.message -import ch.tutteli.atrium.api.cc.en_GB.toThrow -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.spec.AssertionVerbFactory -import ch.tutteli.atrium.translations.DescriptionIterableAssertion -import org.jetbrains.spek.api.dsl.SpecBody -import org.jetbrains.spek.api.dsl.context -import org.jetbrains.spek.api.include - -@Deprecated("Switch from Assert to Expect and use Spec from atrium-specs-common; will be removed with 1.0.0") -abstract class IterableContainsNotValuesAssertionsSpec( - verbs: AssertionVerbFactory, - containsNotValuesPair: Pair>.(Double, Array) -> Assert>>, - containsNotNullableValuesPair: Pair>.(Double?, Array) -> Assert>>, - rootBulletPoint: String, - successfulBulletPoint: String, - failingBulletPoint: String, - listBulletPoint: String, - featureArrow: String, - featureBulletPoint: String, - describePrefix: String = "[Atrium] " -) : IterableContainsEntriesSpecBase(verbs, { - - include(@Suppress("DEPRECATION") object : SubjectLessAssertionSpec>(describePrefix, - containsNotValuesPair.first to mapToCreateAssertion { containsNotValuesPair.second(this, 2.3, arrayOf()) }, - "${containsNotNullableValuesPair.first} for nullable" to mapToCreateAssertion { containsNotNullableValuesPair.second(this, 2.3, arrayOf()) } - ) {}) - - include(@Suppress("DEPRECATION") object : CheckingAssertionSpec>(verbs, describePrefix, - checkingTriple(containsNotValuesPair.first, { containsNotValuesPair.second(this, 2.3, arrayOf()) }, listOf(2.1).asIterable(), listOf(2.1, 2.3)), - checkingTriple("${containsNotNullableValuesPair.first} for nullable", { containsNotNullableValuesPair.second(this, 2.3, arrayOf()) }, listOf(2.1).asIterable(), listOf(2.1, 2.3)) - ) {}) - - fun SpecBody.describeFun(funName: String, body: SpecBody.() -> Unit) - = group("fun `$funName`", body = body) - - val expect = verbs::checkException - - val (containsNotNullable, containsNotNullableFunArr) = containsNotNullableValuesPair - fun Assert>.containsNotNullableFun(a: Double?, vararg aX: Double?) = - containsNotNullableFunArr(a, aX) - - val containsNotDescr = DescriptionIterableAssertion.CONTAINS_NOT.getDefault() - val hasElement = DescriptionIterableAssertion.HAS_ELEMENT.getDefault() - - val indentRootBulletPoint = " ".repeat(rootBulletPoint.length) - val indentSuccessfulBulletPoint = " ".repeat(successfulBulletPoint.length) - val indentFailingBulletPoint = " ".repeat(failingBulletPoint.length) - val indentListBulletPoint = " ".repeat(listBulletPoint.length) - val indentFeatureArrow = " ".repeat(featureArrow.length) - - val featureSuccess = "$indentRootBulletPoint$indentListBulletPoint\\Q$successfulBulletPoint$featureArrow\\E" - val featureFailing = "$indentRootBulletPoint$indentListBulletPoint\\Q$failingBulletPoint$featureArrow\\E" - val isAfterFailing = "$indentRootBulletPoint$indentListBulletPoint$indentFailingBulletPoint$indentFeatureArrow\\Q$featureBulletPoint\\E$isDescr" - val isAfterSuccess = "$indentRootBulletPoint$indentListBulletPoint$indentSuccessfulBulletPoint$indentFeatureArrow\\Q$featureBulletPoint\\E$isDescr" - - val anEntryWhichIsWithIndent = "$indentRootBulletPoint$listBulletPoint$anEntryWhichIs" - - nonNullableCases( - describePrefix, - containsNotValuesPair, - containsNotNullableValuesPair - ) {containsNotFunArr -> - - fun Assert>.containsNotFun(a: Double, vararg aX: Double) - = containsNotFunArr(a, aX.toTypedArray()) - - context("empty collection") { - val fluent = verbs.checkImmediately(setOf()) - - test("4.0 throws AssertionError") { - expect { - fluent.containsNotFun(4.0) - }.toThrow { - message { - containsRegex( - "\\Q$rootBulletPoint\\E$containsNotDescr: $separator" + - "$anEntryWhichIsWithIndent: 4.0.*$separator" + - "$featureSuccess$numberOfOccurrences: 0$separator"+ - "$isAfterSuccess: 0.*$separator"+ - "$featureFailing$hasElement: false$separator" + - "$isAfterFailing: true" - ) - } - } - } - } - - context("iterable $oneToSeven") { - val fluent = verbs.checkImmediately(oneToSeven) - - group("happy case") { - test("1.1 does not throw") { - fluent.containsNotFun(1.1) - } - test("1.1, 2.2, 3.3 does not throw") { - fluent.containsNotFun(1.1, 2.2, 3.3) - } - test("3.3, 1.1, 2.2 does not throw") { - fluent.containsNotFun(3.3, 1.1, 2.2) - } - } - - group("failing cases; search string at different positions") { - test("4.0 throws AssertionError") { - expect { - fluent.containsNotFun(4.0) - }.toThrow { - message { - containsRegex( - "\\Q$rootBulletPoint\\E$containsNotDescr: $separator" + - "$anEntryWhichIsWithIndent: 4.0.*$separator" + - "$featureFailing$numberOfOccurrences: 3$separator"+ - "$isAfterFailing: 0.*$separator"+ - "$featureSuccess$hasElement: true$separator" + - "$isAfterSuccess: true" - ) - } - } - } - test("1.0, 4.0 throws AssertionError") { - expect { - fluent.containsNotFun(1.0, 4.0) - }.toThrow { - message { - containsRegex( - "\\Q$rootBulletPoint\\E$containsNotDescr: $separator" + - "$anEntryWhichIsWithIndent: 1.0.*$separator" + - "$featureFailing$numberOfOccurrences: 1$separator"+ - "$isAfterFailing: 0.*$separator"+ - "$featureSuccess$hasElement: true$separator" + - "$isAfterSuccess: true$separator"+ - "$anEntryWhichIsWithIndent: 4.0.*$separator" + - "$featureFailing$numberOfOccurrences: 3$separator"+ - "$isAfterFailing: 0.*$separator"+ - "$featureSuccess$hasElement: true$separator" + - "$isAfterSuccess: true" - ) - } - } - } - test("4.0, 1.1 throws AssertionError") { - expect { - fluent.containsNotFun(4.0, 1.0) - }.toThrow { - message { - containsRegex( - "\\Q$rootBulletPoint\\E$containsNotDescr: $separator" + - "$anEntryWhichIsWithIndent: 4.0.*$separator" + - "$featureFailing$numberOfOccurrences: 3$separator" + - "$isAfterFailing: 0.*$separator" + - "$featureSuccess$hasElement: true$separator" + - "$isAfterSuccess: true$separator" + - "$anEntryWhichIsWithIndent: 1.0.*$separator" + - "$featureFailing$numberOfOccurrences: 1$separator" + - "$isAfterFailing: 0.*$separator" + - "$featureSuccess$hasElement: true$separator" + - "$isAfterSuccess: true" - ) - } - } - } - } - - } - } - - nullableCases(describePrefix) { - describeFun("$containsNotNullable for nullable") { - context("iterable $oneToSeven") { - test("null does not throw") { - verbs.checkImmediately(oneToSeven).containsNotNullableFun(null) - } - } - context("iterable $oneToSevenNullable"){ - test("null throws AssertionError") { - expect { - verbs.checkImmediately(oneToSevenNullable).containsNotNullableFun(null) - }.toThrow { - message { - containsRegex( - "\\Q$rootBulletPoint\\E$containsNotDescr: $separator" + - "$anEntryWhichIsWithIndent: null$separator" + - "$featureFailing$numberOfOccurrences: 2$separator" + - "$isAfterFailing: 0.*$separator" + - "$featureSuccess$hasElement: true$separator" + - "$isAfterSuccess: true" - ) - } - } - } - - test("1.1, null throws AssertionError mentioning only null") { - expect { - verbs.checkImmediately(oneToSevenNullable).containsNotNullableFun(1.1, null) - }.toThrow { - message { - containsRegex( - "\\Q$rootBulletPoint\\E$containsNotDescr: $separator" + - "$anEntryWhichIsWithIndent: null$separator" + - "$featureFailing$numberOfOccurrences: 2$separator" + - "$isAfterFailing: 0.*$separator" + - "$featureSuccess$hasElement: true$separator" + - "$isAfterSuccess: true" - ) - containsNot("$containsNotDescr: 1.1") - } - } - } - } - } - } -}) diff --git a/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/IterableContainsSpecBase.kt b/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/IterableContainsSpecBase.kt deleted file mode 100644 index 0c0bbd786..000000000 --- a/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/IterableContainsSpecBase.kt +++ /dev/null @@ -1,69 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") - -package ch.tutteli.atrium.spec.integration - -import ch.tutteli.atrium.api.cc.en_GB.contains -import ch.tutteli.atrium.api.cc.en_GB.exactly -import ch.tutteli.atrium.api.cc.en_GB.regex -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.translations.DescriptionIterableAssertion -import org.jetbrains.spek.api.Spek -import org.jetbrains.spek.api.dsl.Spec -import org.jetbrains.spek.api.dsl.SpecBody - -@Deprecated("Switch from Assert to Expect and use Spec from atrium-specs-common; will be removed with 1.0.0") -abstract class IterableContainsSpecBase(spec: Spec.() -> Unit) : Spek(spec) { - - companion object { - val oneToFour = listOf(1.0, 2.0, 3.0, 4.0, 4.0) - val oneToSeven = listOf(1.0, 2.0, 4.0, 4.0, 5.0, 3.0, 5.0, 6.0, 4.0, 7.0) - val oneToSevenNullable = listOf(1.0, null, 4.0, 4.0, 5.0, null, 5.0, 6.0, 4.0, 7.0) - - val containsInAnyOrder = String.format(DescriptionIterableAssertion.IN_ANY_ORDER.getDefault(), DescriptionIterableAssertion.CONTAINS.getDefault()) - val containsInAnyOrderOnly = String.format(DescriptionIterableAssertion.IN_ANY_ORDER_ONLY.getDefault(), DescriptionIterableAssertion.CONTAINS.getDefault()) - val containsInOrderOnly = String.format(DescriptionIterableAssertion.IN_ORDER_ONLY.getDefault(), DescriptionIterableAssertion.CONTAINS.getDefault()) - val containsInOrderOnlyGrouped = String.format(DescriptionIterableAssertion.IN_ORDER_ONLY_GROUPED.getDefault(), DescriptionIterableAssertion.CONTAINS.getDefault()) - val numberOfOccurrences = DescriptionIterableAssertion.NUMBER_OF_OCCURRENCES.getDefault() - val additionalEntries = DescriptionIterableAssertion.WARNING_ADDITIONAL_ENTRIES.getDefault() - val mismatches = DescriptionIterableAssertion.WARNING_MISMATCHES.getDefault() - val mismatchesAdditionalEntries = DescriptionIterableAssertion.WARNING_MISMATCHES_ADDITIONAL_ENTRIES.getDefault() - val sizeExceeded = DescriptionIterableAssertion.SIZE_EXCEEDED.getDefault() - val entryWithIndex = DescriptionIterableAssertion.ENTRY_WITH_INDEX.getDefault() - val anEntryWhichIs = DescriptionIterableAssertion.AN_ENTRY_WHICH_IS.getDefault() - - val atLeast = DescriptionIterableAssertion.AT_LEAST.getDefault() - val atMost = DescriptionIterableAssertion.AT_MOST.getDefault() - - val illegalArgumentException = IllegalArgumentException::class.simpleName - val separator = System.getProperty("line.separator")!! - - fun Assert.containsSize(actual: Int, expected: Int) - = contains.exactly(1).regex("size: $actual[^:]+: $expected") - - fun SpecBody.describeFun(funName: String, body: SpecBody.() -> Unit) - = group("fun `$funName`", body = body) - - fun SpecBody.nullableCases(describePrefix: String, body: SpecBody.() -> Unit) { - group("$describePrefix describe nullable cases", body = body) - } - - fun SpecBody.nonNullableCases( - describePrefix: String, - containsPair: Pair>.(Double, Array) -> Assert>>, - containsNullablePair: Pair>.(Double?, Array) -> Assert>>, - action: SpecBody.(Assert>.(Double, Array) -> Any) -> Unit - ) { - group("$describePrefix describe non-nullable cases") { - mapOf>.(Double, Array) -> Any>( - containsPair.first to { a, aX -> containsPair.second(this, a, aX) }, - containsNullablePair.first to { a, aX -> containsNullablePair.second(this, a, aX) } - ).forEach { (describe, containsEntriesFunArr) -> - describeFun(describe) { - action(containsEntriesFunArr) - } - } - } - } - } -} diff --git a/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/IterableNoneAssertionsSpec.kt b/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/IterableNoneAssertionsSpec.kt deleted file mode 100644 index dc946afa8..000000000 --- a/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/IterableNoneAssertionsSpec.kt +++ /dev/null @@ -1,146 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") - -package ch.tutteli.atrium.spec.integration - -import ch.tutteli.atrium.api.cc.en_GB.* -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.spec.AssertionVerbFactory -import ch.tutteli.atrium.translations.DescriptionIterableAssertion -import org.jetbrains.spek.api.dsl.SpecBody -import org.jetbrains.spek.api.dsl.context -import org.jetbrains.spek.api.include - -@Deprecated("Switch from Assert to Expect and use Spec from atrium-specs-common; will be removed with 1.0.0") -abstract class IterableNoneAssertionsSpec( - verbs: AssertionVerbFactory, - nonePair: Pair>.(Assert.() -> Unit) -> Assert>>, - noneNullablePair: Pair>.((Assert.() -> Unit)?) -> Assert>>, - rootBulletPoint: String, - successfulBulletPoint: String, - failingBulletPoint: String, - listBulletPoint: String, - explanatoryBulletPoint: String, - featureArrow: String, - featureBulletPoint: String, - describePrefix: String = "[Atrium] " -) : IterablePredicateSpecBase(verbs, { - - include(@Suppress("DEPRECATION") object : SubjectLessAssertionSpec>(describePrefix, - nonePair.first to mapToCreateAssertion { nonePair.second(this) { toBe(2.3) } }, - "${noneNullablePair.first} for nullable" to mapToCreateAssertion { noneNullablePair.second(this) { toBe(2.3) } } - ) {}) - - include(@Suppress("DEPRECATION") object : CheckingAssertionSpec>(verbs, describePrefix, - checkingTriple(nonePair.first, { nonePair.second(this) { toBe(2.3) } }, listOf(2.1).asIterable(), listOf(2.1, 2.3)), - checkingTriple("${noneNullablePair.first} for nullable", { noneNullablePair.second(this) { toBe(2.3) } }, listOf(2.1).asIterable(), listOf(2.1, 2.3)) - ) {}) - - fun SpecBody.describeFun(funName: String, body: SpecBody.() -> Unit) - = group("fun `$funName`", body = body) - - val expect = verbs::checkException - - val (containsNotNullable, containsNotNullableFun) = noneNullablePair - - val containsNotDescr = DescriptionIterableAssertion.CONTAINS_NOT.getDefault() - val hasElement = DescriptionIterableAssertion.HAS_ELEMENT.getDefault() - - val indentRootBulletPoint = " ".repeat(rootBulletPoint.length) - val indentSuccessfulBulletPoint = " ".repeat(successfulBulletPoint.length) - val indentFailingBulletPoint = " ".repeat(failingBulletPoint.length) - val indentListBulletPoint = " ".repeat(listBulletPoint.length) - val indentFeatureArrow = " ".repeat(featureArrow.length) - - val featureSuccess = "$indentRootBulletPoint$indentListBulletPoint\\Q$successfulBulletPoint$featureArrow\\E" - val featureFailing = "$indentRootBulletPoint$indentListBulletPoint\\Q$failingBulletPoint$featureArrow\\E" - val isAfterFailing = "$indentRootBulletPoint$indentListBulletPoint$indentFailingBulletPoint$indentFeatureArrow\\Q$featureBulletPoint\\E$isDescr" - val isAfterSuccess = "$indentRootBulletPoint$indentListBulletPoint$indentSuccessfulBulletPoint$indentFeatureArrow\\Q$featureBulletPoint\\E$isDescr" - val afterExplanatory = "$indentRootBulletPoint$indentListBulletPoint$indentSuccessfulBulletPoint\\Q$explanatoryBulletPoint\\E" - - nonNullableCases( - describePrefix, - nonePair, - noneNullablePair - ){ containsNotFun -> - - val fluent = verbs.checkImmediately(oneToSeven) - - context("iterable $oneToSeven") { - group("happy case") { - listOf(1.1, 2.2, 3.3).forEach { - test("$toBeDescr($it) does not throw") { - fluent.containsNotFun { toBe(1.1) } - } - } - } - - group("failing cases; search string at different positions") { - test("$toBeDescr(4.0) throws AssertionError") { - expect { - fluent.containsNotFun { toBe(4.0) } - }.toThrow { - message { - containsRegex( - "\\Q$rootBulletPoint\\E$containsNotDescr: $separator" + - "$indentRootBulletPoint\\Q$listBulletPoint\\E$anEntryWhich: $separator"+ - "$afterExplanatory$toBeDescr: 4.0.*$separator" + - "$featureFailing$numberOfOccurrences: 3$separator"+ - "$isAfterFailing: 0.*$separator"+ - "$featureSuccess$hasElement: true$separator" + - "$isAfterSuccess: true" - ) - } - } - } - } - } - } - - nullableCases(describePrefix) { - describeFun("$containsNotNullable for nullable") { - context("iterable $oneToSeven") { - test("null does not throw") { - verbs.checkImmediately(oneToSeven).containsNotNullableFun(null) - } - } - context("iterable $oneToSevenNullable"){ - test("null throws AssertionError") { - expect { - verbs.checkImmediately(oneToSevenNullable).containsNotNullableFun(null) - }.toThrow { - message { - containsRegex( - "\\Q$rootBulletPoint\\E$containsNotDescr: $separator" + - "$indentRootBulletPoint\\Q$listBulletPoint\\E$anEntryWhich: $separator"+ - "$afterExplanatory$isDescr: null$separator" + - "$featureFailing$numberOfOccurrences: 2$separator"+ - "$isAfterFailing: 0.*$separator"+ - "$featureSuccess$hasElement: true$separator" + - "$isAfterSuccess: true" - ) - } - } - } - - test("1.0 throws AssertionError") { - expect { - verbs.checkImmediately(oneToSevenNullable).containsNotNullableFun { toBe(1.0) } - }.toThrow { - message { - containsRegex( - "\\Q$rootBulletPoint\\E$containsNotDescr: $separator" + - "$indentRootBulletPoint\\Q$listBulletPoint\\E$anEntryWhich: $separator"+ - "$afterExplanatory$toBeDescr: 1.0.*$separator" + - "$featureFailing$numberOfOccurrences: 1$separator"+ - "$isAfterFailing: 0.*$separator"+ - "$featureSuccess$hasElement: true$separator" + - "$isAfterSuccess: true" - ) - } - } - } - } - } - } -}) diff --git a/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/IterablePredicateSpecBase.kt b/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/IterablePredicateSpecBase.kt deleted file mode 100644 index 3d946a8c4..000000000 --- a/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/IterablePredicateSpecBase.kt +++ /dev/null @@ -1,33 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") - -package ch.tutteli.atrium.spec.integration - -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.spec.AssertionVerbFactory -import org.jetbrains.spek.api.dsl.Spec -import org.jetbrains.spek.api.dsl.SpecBody - -@Deprecated("Switch from Assert to Expect and use Spec from atrium-specs-common; will be removed with 1.0.0") -abstract class IterablePredicateSpecBase(verbs: AssertionVerbFactory, spec: Spec.() -> Unit) : IterableContainsEntriesSpecBase(verbs, spec) { - companion object { - - fun SpecBody.nonNullableCases( - describePrefix: String, - containsPair: Pair>.(Assert.() -> Unit) -> Assert>>, - containsNullablePair: Pair>.((Assert.() -> Unit)?) -> Assert>>, - action: SpecBody.(Assert>.(Assert.() -> Unit) -> Any) -> Unit - ) { - group("$describePrefix describe non-nullable cases") { - mapOf>.(Assert.() -> Unit) -> Any>( - containsPair.first to { a -> containsPair.second(this, a) }, - "${containsNullablePair.first} for nullable" to { a -> containsNullablePair.second(this, a) } - ).forEach { (describe, containsEntriesFunArr) -> - describeFun(describe) { - action(containsEntriesFunArr) - } - } - } - } - } -} diff --git a/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/KeyValueLikeFeatureAssertionsSpec.kt b/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/KeyValueLikeFeatureAssertionsSpec.kt deleted file mode 100644 index 0b482264c..000000000 --- a/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/KeyValueLikeFeatureAssertionsSpec.kt +++ /dev/null @@ -1,209 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") - -package ch.tutteli.atrium.spec.integration - -import ch.tutteli.atrium.api.cc.en_GB.* -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.AssertionPlantNullable -import ch.tutteli.atrium.spec.AssertionVerbFactory -import ch.tutteli.atrium.spec.describeFun -import org.jetbrains.spek.api.Spek -import org.jetbrains.spek.api.dsl.SpecBody -import org.jetbrains.spek.api.dsl.context -import org.jetbrains.spek.api.include - -@Deprecated("Switch from Assert to Expect and use Spec from atrium-specs-common; will be removed with 1.0.0") -abstract class KeyValueLikeFeatureAssertionsSpec( - verbs: AssertionVerbFactory, - creator: (String, Int) -> T, - creatorNullable: (String?, Int?) -> TNullable, - keyName: String, - valueName: String, - keyValPair: Pair.() -> Assert>, - keyFunPair: Pair.(assertionCreator: Assert.() -> Unit) -> Assert>, - valueValPair: Pair.() -> Assert>, - valueFunPair: Pair.(assertionCreator: Assert.() -> Unit) -> Assert>, - nullableKeyValPair: Pair.() -> AssertionPlantNullable>, - nullableValueValPair: Pair.() -> AssertionPlantNullable>, - describePrefix: String = "[Atrium] " -) : Spek({ - - - //@formatter:off - include(@Suppress("DEPRECATION") object : SubjectLessAssertionSpec(describePrefix, - "val ${keyValPair.first}" to mapToCreateAssertion { keyValPair.second(this).startsWith("a") }, - "fun ${keyFunPair.first}" to mapToCreateAssertion { keyFunPair.second(this) { endsWith("a") } }, - "val ${valueValPair.first}" to mapToCreateAssertion { valueValPair.second(this).isGreaterThan(1) } , - "fun ${valueFunPair.first}" to mapToCreateAssertion { valueFunPair.second(this) { isGreaterThan(2) } } - ){}) - include(@Suppress("DEPRECATION") object : SubjectLessAssertionSpec("$describePrefix[nullable] ", - "val ${nullableKeyValPair.first}" to mapToCreateAssertion { nullableKeyValPair.second(this).toBe(null) }, - "val ${nullableValueValPair.first}" to mapToCreateAssertion { nullableValueValPair.second(this).toBe(null) } - //TODO should also be possible, notToBeNull is not subjectLess -// "fun ${nullableKeyFunPair.first}" to mapToCreateAssertion { nullableKeyFunPair.second(this) { toBe("a") } }, -// "val ${nullableValueValPair.first}" to mapToCreateAssertion { nullableValueValPair.second(this).notToBeNull { isGreaterThan(1) } } , - ){}) - - - include(@Suppress("DEPRECATION") object : CheckingAssertionSpec(verbs, describePrefix, - checkingTriple("val ${keyValPair.first}", { keyValPair.second(this).startsWith("a") }, creator("a", 1), creator("ba", 2)), - checkingTriple("fun ${keyFunPair.first}", { keyFunPair.second(this) { contains("a") } }, creator("ba", 1), creator("bc", 1)), - checkingTriple("val ${valueValPair.first}", { valueValPair.second(this).toBe(1) }, creator("a", 1), creator("a", 2)), - checkingTriple("fun ${valueFunPair.first}", { valueFunPair.second(this) { isGreaterThan(1) } }, creator("a", 2), creator("a", 1)) - ){}) - - include(@Suppress("DEPRECATION") object : CheckingAssertionSpec(verbs, "$describePrefix[nullable] ", - checkingTriple("val ${nullableKeyValPair.first}", { nullableKeyValPair.second(this).toBe(null) }, creatorNullable(null, 1), creatorNullable("ba", 2)), - checkingTriple("val ${nullableValueValPair.first}", { nullableValueValPair.second(this).notToBeNull { isGreaterThan(1) } }, creatorNullable("a", 2), creatorNullable("a", 1)) - ){}) - //@formatter:on - - fun describeFun(vararg funName: String, body: SpecBody.() -> Unit) = - describeFun(describePrefix, funName, body = body) - - val assert: (T) -> Assert = verbs::checkImmediately - val expect = verbs::checkException - val mapEntry = creator("hello", 1) - val nullableMapEntry = creatorNullable("hello", 1) - val nullMapEntry = creatorNullable(null, null) - val fluent = assert(mapEntry) - val nullableFluent = verbs.checkImmediately(nullableMapEntry) - val nullFluent = verbs.checkImmediately(nullMapEntry) - - - val (keyValName, keyVal) = keyValPair - val (keyFunName, keyFun) = keyFunPair - val (valueValName, valueVal) = valueValPair - val (valueFunName, valueFun) = valueFunPair - - val (nullableKeyValName, nullableKeyVal) = nullableKeyValPair - val (nullableValueValName, nullableValueVal) = nullableValueValPair - - describeFun("val $keyValName") { - context("$mapEntry") { - test("startsWith(h) holds") { - fluent.keyVal().startsWith("h") - } - test("endsWith(h) fails") { - expect { - fluent.keyVal().endsWith("h") - }.toThrow { - messageContains("$keyName: \"hello\"") - } - } - } - } - - describeFun("fun $keyFunName") { - context("$mapEntry") { - test("startsWith(h) holds") { - fluent.keyFun { startsWith("h") } - } - test("endsWith(h) fails") { - expect { - fluent.keyFun {endsWith("h") } - }.toThrow { - messageContains("$keyName: \"hello\"") - } - } - } - //TODO should fail but does not since it has a feature assertion which itself is empty -// test("throws if no assertion is made") { -// expect { -// fluent.keyFun { } -// }.toThrow { messageContains("There was not any assertion created") } -// } - } - - - describeFun("val $valueValName") { - context("$mapEntry") { - test("isGreaterThan(0) holds") { - fluent.valueVal().isGreaterThan(0) - } - test("isGreaterThan(1) fails") { - expect { - fluent.valueVal().isGreaterThan(1) - }.toThrow { - messageContains("$valueName: 1") - } - } - } - } - - describeFun("fun $valueFunName") { - context("$mapEntry") { - test("isGreaterThan(0) holds") { - fluent.valueFun{ isGreaterThan(0) } - } - test("isGreaterThan(1) fails") { - expect { - fluent.valueFun { isGreaterThan(1) } - }.toThrow { - messageContains("$valueName: 1") - } - } - //TODO should fail but does not since it has a feature assertion which itself is empty -// test("throws if no assertion is made") { -// expect { -// fluent.valueFun { } -// }.toThrow { messageContains("There was not any assertion created") } -// } - } - } - - describeFun("val $nullableKeyValName for nullable") { - context("$nullableMapEntry") { - test("toBe(hello)") { - nullableFluent.nullableKeyVal().toBe("hello") - } - test("toBe(null) fails") { - expect { - nullableFluent.nullableKeyVal().toBe(null) - }.toThrow { - messageContains("$keyName: \"hello\"") - } - } - } - context("$nullMapEntry") { - test("toBe(null)") { - nullFluent.nullableKeyVal().toBe(null) - } - test("toBe(hello) fails") { - expect { - nullFluent.nullableKeyVal().toBe("hello") - }.toThrow { - messageContains("$keyName: null") - } - } - } - } - - describeFun("val $nullableValueValName for nullable") { - context("$nullableMapEntry") { - test("isGreaterThan(0) holds") { - nullableFluent.nullableValueVal().notToBeNull { isGreaterThan(0) } - } - test("toBe(null) fails") { - expect { - nullableFluent.nullableValueVal().toBe(null) - }.toThrow { - messageContains("$valueName: 1") - } - } - } - context("$nullMapEntry") { - test("toBe(null)") { - nullFluent.nullableValueVal().toBe(null) - } - test("toBe(1) fails") { - expect { - nullFluent.nullableValueVal().toBe(1) - }.toThrow { - messageContains("$valueName: null") - } - } - } - } -}) diff --git a/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/ListFeatureAssertionsSpec.kt b/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/ListFeatureAssertionsSpec.kt deleted file mode 100644 index 0bd0440f9..000000000 --- a/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/ListFeatureAssertionsSpec.kt +++ /dev/null @@ -1,143 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") - - -package ch.tutteli.atrium.spec.integration - -import ch.tutteli.atrium.api.cc.en_GB.isGreaterThan -import ch.tutteli.atrium.api.cc.en_GB.messageContains -import ch.tutteli.atrium.api.cc.en_GB.toBe -import ch.tutteli.atrium.api.cc.en_GB.toThrow -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.AssertionPlantNullable -import ch.tutteli.atrium.spec.AssertionVerbFactory -import ch.tutteli.atrium.spec.describeFun -import ch.tutteli.atrium.translations.DescriptionBasic.TO_BE -import ch.tutteli.atrium.translations.DescriptionListAssertion -import org.jetbrains.spek.api.Spek -import org.jetbrains.spek.api.dsl.SpecBody -import org.jetbrains.spek.api.dsl.context -import org.jetbrains.spek.api.include - -@Deprecated("Switch from Assert to Expect and use Spec from atrium-specs-common; will be removed with 1.0.0") -abstract class ListFeatureAssertionsSpec( - verbs: AssertionVerbFactory, - getPlantPair: Pair>.(Int) -> Assert>, - getPair: Pair>.(Int, assertionCreator: Assert.() -> Unit) -> Assert>>, - getNullablePlantPair: Pair>.(Int) -> AssertionPlantNullable>, - getNullablePair: Pair>.(Int, assertionCreator: AssertionPlantNullable.() -> Unit) -> Assert>>, - describePrefix: String = "[Atrium] " -) : Spek({ - - //@formatter:off - include(@Suppress("DEPRECATION") object : SubjectLessAssertionSpec>(describePrefix, - "${getPlantPair.first} returns plant" to mapToCreateAssertion { getPlantPair.second(this, 1 ).isGreaterThan(1) }, - getPair.first to mapToCreateAssertion { getPair.second(this, 1 ){ isGreaterThan(1) } } - ){}) - include(@Suppress("DEPRECATION") object : SubjectLessAssertionSpec>("$describePrefix[nullable Element] ", - "${getNullablePlantPair.first} returns plant" to mapToCreateAssertion { getNullablePlantPair.second(this, 1 ).toBe(null) }, - getNullablePair.first to mapToCreateAssertion { getNullablePair.second(this, 1 ){ toBe(null) } } - ) {}) - - include(@Suppress("DEPRECATION") object : CheckingAssertionSpec>(verbs, describePrefix, - checkingTriple("${getPlantPair.first} returns plant" , { getPlantPair.second(this, 0).isGreaterThan(1) }, listOf(2, 1), listOf(1, 2)), - checkingTriple(getPair.first, { getPair.second(this, 0) { isGreaterThan(1) } }, listOf(2, 1), listOf(1, 2)) - ){}) - include(@Suppress("DEPRECATION") object : CheckingAssertionSpec>(verbs, "$describePrefix[nullable Element] ", - checkingTriple("${getNullablePlantPair.first} returns plant", { getNullablePlantPair.second(this, 0).toBe(1) }, listOf(1, null), listOf(2, 1)), - checkingTriple(getNullablePair.first, { getNullablePair.second(this, 0) { toBe(1) } }, listOf(1, null), listOf(2, 1)) - ) {}) - //@formatter:on - - fun describeFun(vararg funName: String, body: SpecBody.() -> Unit) = - describeFun(describePrefix, funName, body = body) - - val expect = verbs::checkException - val list = listOf(1, 2, 3, 4) - val fluent = verbs.checkImmediately(list) - val listNullable = listOf(1, null, 3, 4) - val fluentNullable = verbs.checkImmediately(listNullable) - - val (getPlant, getPlantFun) = getPlantPair - val (get, getFun) = getPair - val (getNullablePlant, getNullablePlantFun) = getNullablePlantPair - val (getNullable, getNullableFun) = getNullablePair - - val toBeDescr = TO_BE.getDefault() - val indexOutOfBounds = DescriptionListAssertion.INDEX_OUT_OF_BOUNDS.getDefault() - - describeFun("$getPlant returns plant") { - context("list $list") { - test("can perform sub-assertion on existing index") { - fluent.getPlantFun(0).toBe(1) - } - test("non-existing index throws") { - expect { - fluent.getPlantFun(4).toBe(1) - }.toThrow { - messageContains("get(4): $indexOutOfBounds") - } - } - } - } - - describeFun(get) { - context("list $list") { - test("can perform sub-assertion on existing index") { - fluent.getFun(0) { toBe(1) } - } - test("non-existing index throws but shows intended sub-assertion") { - expect { - fluent.getFun(4) { toBe(3) } - }.toThrow { - messageContains("get(4): $indexOutOfBounds", "$toBeDescr: 3") - } - } - // the new infix throws now an AssertionError instead - not going to test it any more (is covered by bc-tests) -// test("throws if no assertion is made") { -// expect { -// fluent.getFun(1) { } -// }.toThrow { messageContains("There was not any assertion created") } -// } - } - } - - describeFun("$getNullable for nullable returns plant") { - context("list $listNullable") { - test("can perform sub-assertion on existing key") { - fluentNullable.getNullablePlantFun(0).toBe(1) - } - test("can perform sub-assertion on existing key with value null") { - fluentNullable.getNullablePlantFun(1).toBe(null) - } - - test("non-existing key throws") { - expect { - fluentNullable.getNullablePlantFun(4).toBe(null) - }.toThrow { - messageContains("get(4): $indexOutOfBounds") - } - } - } - } - - describeFun("$getNullablePlant for nullable") { - context("list $listNullable") { - test("can perform sub-assertion on existing key") { - fluentNullable.getNullableFun(0) { toBe(1) } - } - test("can perform sub-assertion on existing key with value null") { - fluentNullable.getNullableFun(1) { toBe(null) } - } - - //TODO problem with down-cast which is not subject-less -// test("non-existing key throws but shows intended sub-assertion") { -// expect { -// fluentNullable.getNullableFun(4) { toBe(null) } -// }.toThrow { -// messageContains("get(4): $indexOutOfBounds", "$toBeDescr: null") -// } -// } - } - } -}) diff --git a/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/MapAsEntriesAssertionsSpec.kt b/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/MapAsEntriesAssertionsSpec.kt deleted file mode 100644 index 0ad303498..000000000 --- a/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/MapAsEntriesAssertionsSpec.kt +++ /dev/null @@ -1,48 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") - -package ch.tutteli.atrium.spec.integration - -import ch.tutteli.atrium.api.cc.en_GB.* -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.spec.AssertionVerbFactory -import ch.tutteli.atrium.spec.describeFun -import org.jetbrains.spek.api.Spek -import org.jetbrains.spek.api.dsl.SpecBody -import org.jetbrains.spek.api.include - -@Deprecated("Switch from Assert to Expect and use Spec from atrium-specs-common; will be removed with 1.0.0") -abstract class MapAsEntriesAssertionsSpec( - verbs: AssertionVerbFactory, - asEntriesFunName: String, - asEntries: Assert>.() -> Assert>>, - asEntriesWithCreator: Assert>.(Assert>>.() -> Unit) -> Assert>>, - describePrefix: String = "[Atrium] " -) : Spek({ - - val asEntriesWithCreatorFun = "$asEntriesFunName with Creator" - include(@Suppress("DEPRECATION") object : SubjectLessAssertionSpec>("$describePrefix[$asEntriesFunName] ", - asEntriesFunName to mapToCreateAssertion { asEntries(this) } , - asEntriesWithCreatorFun to mapToCreateAssertion { asEntriesWithCreator(this){ contains("a" to 1)} } - ) {}) - - val holdingSubject: Map = mapOf("a" to 1, "c" to 3, "e" to 5, "g" to 7) - val failingSubject: Map = mapOf("b" to 2, "d" to 4, "f" to 6, "h" to 8) - - include(@Suppress("DEPRECATION") object : CheckingAssertionSpec>(verbs, "$describePrefix[$asEntriesFunName] ", - checkingTriple(asEntriesFunName, { asEntries(this).contains { isKeyValue("g", 7) } }, holdingSubject, failingSubject), - checkingTriple(asEntriesWithCreatorFun, { asEntriesWithCreator(this){ contains { isKeyValue("g", 7) } } }, holdingSubject, failingSubject) - ) {}) - - fun describeFun(vararg funName: String, body: SpecBody.() -> Unit) = - describeFun(describePrefix, funName, body = body) - - describeFun(asEntriesFunName) { - test("transformation can be applied and an assertion made") { - verbs.checkImmediately(mapOf(1 to "a", 2 to "b")).asEntries().contains.inAnyOrder.only.entries( - { isKeyValue(2, "b") }, - { key{ isGreaterThan(0)}.and.value.startsWith("a") } - ) - } - } -}) diff --git a/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/MapAssertionsSpec.kt b/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/MapAssertionsSpec.kt deleted file mode 100644 index e5ee121f1..000000000 --- a/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/MapAssertionsSpec.kt +++ /dev/null @@ -1,391 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") - -package ch.tutteli.atrium.spec.integration - -import ch.tutteli.atrium.api.cc.en_GB.* -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.spec.AssertionVerbFactory -import ch.tutteli.atrium.spec.describeFun -import ch.tutteli.atrium.translations.DescriptionBasic.* -import ch.tutteli.atrium.translations.DescriptionCollectionAssertion -import ch.tutteli.atrium.translations.DescriptionComparableAssertion -import ch.tutteli.atrium.translations.DescriptionMapAssertion -import org.jetbrains.spek.api.Spek -import org.jetbrains.spek.api.dsl.SpecBody -import org.jetbrains.spek.api.dsl.context -import org.jetbrains.spek.api.dsl.it -import org.jetbrains.spek.api.include - - -@Deprecated("Switch from Assert to Expect and use Spec from atrium-specs-common; will be removed with 1.0.0") -abstract class MapAssertionsSpec( - verbs: AssertionVerbFactory, - containsPair: Pair>.(Pair, Array>) -> Assert>>, - containsNullablePair: Pair>.(Pair, Array>) -> Assert>>, - containsKeyWithValueAssertionsPair: Pair>.(Pair.() -> Unit>, Array.() -> Unit>>) -> Assert>>, - containsKeyWithNullableValueAssertionsPair: Pair>.(Pair.() -> Unit)?>, Array.() -> Unit)?>>) -> Assert>>, - containsKeyPair: Pair>.(String) -> Assert>>, - containsNullableKeyPair: Pair>.(String?) -> Assert>>, - containsNotKeyPair: Pair>.(String) -> Assert>>, - containsNotNullableKeyPair: Pair>.(String?) -> Assert>>, - hasSizePair: Pair>.(Int) -> Assert>>, - isEmptyPair: Pair>.() -> Assert>>, - isNotEmptyPair: Pair>.() -> Assert>>, - describePrefix: String = "[Atrium] " -) : Spek({ - - fun keyValue(key: String, assertionCreator: Assert.() -> Unit): Pair.() -> Unit> - = key to assertionCreator - - fun keyNullableValue(key: String?, assertionCreator: (Assert.() -> Unit)?): Pair.() -> Unit)?> - = key to assertionCreator - - include(@Suppress("DEPRECATION") object : SubjectLessAssertionSpec>(describePrefix, - containsPair.first to mapToCreateAssertion { containsPair.second(this, "key" to 1, arrayOf()) }, - containsKeyWithValueAssertionsPair.first to mapToCreateAssertion { containsKeyWithValueAssertionsPair.second(this, keyValue("a") { toBe(1) }, arrayOf(keyValue("a") { isLessOrEquals(2) })) }, - containsKeyPair.first to mapToCreateAssertion{ containsKeyPair.second(this, "a") }, - containsNotKeyPair.first to mapToCreateAssertion{ containsKeyPair.second(this, "a") }, - hasSizePair.first to mapToCreateAssertion { hasSizePair.second(this, 2) }, - isEmptyPair.first to mapToCreateAssertion { isEmptyPair.second(this) }, - isNotEmptyPair.first to mapToCreateAssertion { isNotEmptyPair.second(this) } - ) {}) - include(@Suppress("DEPRECATION") object : SubjectLessAssertionSpec>("$describePrefix[nullable Key] ", - containsNullablePair.first to mapToCreateAssertion{ containsNullablePair.second(this, null to 1, arrayOf("a" to null)) }, - containsKeyWithNullableValueAssertionsPair.first to mapToCreateAssertion { containsKeyWithNullableValueAssertionsPair.second(this, keyNullableValue(null) { toBe(1) }, arrayOf(keyNullableValue("a", null))) }, - containsNullableKeyPair.first to mapToCreateAssertion{ containsNullableKeyPair.second(this, null) }, - containsNotNullableKeyPair.first to mapToCreateAssertion{ containsNotNullableKeyPair.second(this, null) } - ) {}) - - include(@Suppress("DEPRECATION") object : CheckingAssertionSpec>(verbs, describePrefix, - checkingTriple(containsPair.first, { containsPair.second(this, "a" to 1, arrayOf("b" to 2)) }, mapOf("a" to 1, "b" to 2), mapOf("a" to 1, "b" to 3)), - checkingTriple(containsKeyWithValueAssertionsPair.first, - { containsKeyWithValueAssertionsPair.second(this, keyValue("a"){ isLessThan(2) }, arrayOf(keyValue("b") { isGreaterOrEquals(2) })) }, - mapOf("a" to 1, "b" to 2), mapOf("a" to 2, "b" to 3) - ), - checkingTriple(containsKeyPair.first, {containsKeyPair.second(this, "a")}, mapOf("a" to 1), mapOf("b" to 1)), - checkingTriple(containsNotKeyPair.first, {containsNotKeyPair.second(this, "b")}, mapOf("a" to 1), mapOf("b" to 1)), - checkingTriple(hasSizePair.first, { hasSizePair.second(this, 1) }, mapOf("a" to 1), mapOf("a" to 1, "b" to 2)), - checkingTriple(isEmptyPair.first, { isEmptyPair.second(this) }, mapOf(), mapOf("a" to 1, "b" to 2)), - checkingTriple(isNotEmptyPair.first, { isNotEmptyPair.second(this) }, mapOf("b" to 2), mapOf()) - ) {}) - include(@Suppress("DEPRECATION") object : CheckingAssertionSpec>(verbs, "$describePrefix[nullable Key] ", - checkingTriple(containsNullablePair.first, - { containsNullablePair.second(this, null to 1, arrayOf("a" to null))}, - mapOf("a" to null, null to 1), mapOf("b" to 1, null to 1) - ), - checkingTriple(containsKeyWithNullableValueAssertionsPair.first, - { containsKeyWithNullableValueAssertionsPair.second(this, keyNullableValue(null){ isLessThan(2) }, arrayOf(keyNullableValue("a", null))) }, - mapOf("a" to null, null to 1), mapOf("a" to null, "b" to 1, null to 3) - ), - checkingTriple(containsNullableKeyPair.first, - { containsNullableKeyPair.second(this, null)}, - mapOf("a" to 1, null to 1), mapOf("b" to 1) - ), - checkingTriple(containsNotNullableKeyPair.first, - { containsNotNullableKeyPair.second(this, null)}, - mapOf("a" to 1, "b" to 1), mapOf(null to 1) - ) - ) {}) - - fun describeFun(vararg funName: String, body: SpecBody.() -> Unit) - = describeFun(describePrefix, funName, body = body) - - val assert: (Map) -> Assert> = verbs::checkImmediately - val expect = verbs::checkException - val map = mapOf("a" to 1, "b" to 2) - val fluent = assert(map) - val nullableMap = mapOf("a" to null, null to 1, "b" to 2) - val nullableFluent = verbs.checkImmediately(nullableMap) - - val (contains, containsFun) = containsPair - val (containsNullable, containsNullableFun) = containsNullablePair - val (containsKeyWithValueAssertions, containsKeyWithValueAssertionsFun) = containsKeyWithValueAssertionsPair - val (containsKeyWithNullableValueAssertions, containsKeyWithNullableValueAssertionsFun) = containsKeyWithNullableValueAssertionsPair - val (containsKey, containsKeyFun) = containsKeyPair - val (containsNullableKey, containsNullableKeyFun) = containsNullableKeyPair - val (containsNotKey, containsNotKeyFun) = containsNotKeyPair - val (containsNotNullableKey, containsNotNullableKeyFun) = containsNotNullableKeyPair - val (hasSize, hasSizeFun) = hasSizePair - val (isEmpty, isEmptyFun) = isEmptyPair - val (isNotEmpty, isNotEmptyFun) = isNotEmptyPair - - val isDescr = IS.getDefault() - val isNotDescr = IS_NOT.getDefault() - val empty = DescriptionCollectionAssertion.EMPTY.getDefault() - val containsKeyDescr = DescriptionMapAssertion.CONTAINS_KEY.getDefault() - val containsNotKeyDescr = DescriptionMapAssertion.CONTAINS_NOT_KEY.getDefault() - val toBeDescr = TO_BE.getDefault() - val keyDoesNotExist = DescriptionMapAssertion.KEY_DOES_NOT_EXIST.getDefault() - val lessThanDescr = DescriptionComparableAssertion.IS_LESS_THAN.getDefault() - - fun entry(key: String): String - = String.format(DescriptionMapAssertion.ENTRY_WITH_KEY.getDefault(), "\"$key\"") - - fun entry(key: String, value: Any): String - = entry(key) + ": " + value - - describeFun(contains) { - context("map $map") { - listOf( - listOf("a" to 1), - listOf("b" to 2), - listOf("a" to 1, "b" to 2), - listOf("b" to 2, "a" to 1) - ).forEach { - test("$it does not throw") { - fluent.containsFun(it.first(), it.drop(1).toTypedArray()) - } - } - - test("a to 1 and a to 1 does not throw (no unique match)") { - fluent.containsFun("a" to 1, arrayOf("a" to 1)) - } - - test("{a to 1, b to 3, c to 4} throws AssertionError, reports b and c") { - expect { - fluent.containsFun("a" to 1, arrayOf("b" to 3, "c" to 4)) - }.toThrow{ - message { - contains( - entry("b", 2), - "$toBeDescr: 3", - entry("c", keyDoesNotExist), - "$toBeDescr: 4" - ) - containsNot(entry("a")) - } - } - } - } - } - - describeFun("$containsNullable for nullable") { - context("map $nullableMap") { - listOf( - listOf("a" to null), - listOf(null to 1), - listOf("b" to 2), - listOf("a" to null, "b" to 2), - listOf(null to 1, "b" to 2), - listOf(null to 1, "a" to null), - listOf(null to 1, "a" to null, "b" to 2), - listOf("b" to 2, null to 1, "a" to null) - ).forEach { - test("$it does not throw") { - nullableFluent.containsNullableFun(it.first(), it.drop(1).toTypedArray()) - } - } - - test("a to null and a to null does not throw (no unique match)") { - nullableFluent.containsNullableFun("a" to null, arrayOf("a" to null)) - } - - test("{a to null, null to 2, b to 3, c to 4} throws AssertionError, reports a, null, b and c") { - expect { - nullableFluent.containsNullableFun("a" to null, arrayOf(null to 2, "b" to 3, "c" to 4)) - }.toThrow{ - message { - contains( - entry("b", 2), - "$toBeDescr: 3", - entry("c", keyDoesNotExist) - //TODO seems like notToBeNull is not subjectLess - //"$toBeDescr: 4" - ) - containsNot(entry("a")) - } - } - } - } - } - - describeFun(containsKeyWithValueAssertions) { - context("map $map") { - listOf( - "a{ toBe(1) }" to listOf(keyValue("a") { toBe(1) } ), - "b{ toBe(2) }" to listOf(keyValue("b") { toBe(2) } ), - "a{ toBe(1) }, b{ toBe(2) }" to listOf(keyValue("a") { toBe(1) }, keyValue("b"){ toBe(2) }) , - "b{ toBe(2) }, a{ toBe(1) }" to listOf(keyValue("b") { toBe(2) }, keyValue("a"){ toBe(1) }) - ).forEach { (description, keyValues) -> - test("$description does not throw") { - fluent.containsKeyWithValueAssertionsFun(keyValues.first(), keyValues.drop(1).toTypedArray()) - } - } - - test("a{ isLessThan(2) } and a{ isGreaterThan(0) } does not throw (no unique match)") { - fluent.containsKeyWithValueAssertionsFun(keyValue("a") { isLessThan(2) }, arrayOf(keyValue("a"){ isGreaterThan(0) })) - } - - test("a{ isLessThan(3) }, b { isLessThan(2) }, c { isLessThan(1) }} throws AssertionError, reports b and c") { - expect { - fluent.containsKeyWithValueAssertionsFun(keyValue("a") { isLessThan(3) }, arrayOf(keyValue("b"){ isLessThan(2) }, keyValue("c") { isLessThan(1) })) - }.toThrow{ - message { - contains( - entry("b", 2), - "$lessThanDescr: 2", - entry("c", keyDoesNotExist), - "$lessThanDescr: 1" - ) - containsNot(entry("a")) - } - } - } - } - } - - describeFun("$containsKeyWithNullableValueAssertions for nullable") { - context("map $nullableMap") { - listOf( - "(a, null)" to - listOf(keyNullableValue("a" , null)), - "a{ toBe(1) }" to - listOf(keyNullableValue(null){ toBe(1) }), - "b{ toBe(2) }" to - listOf(keyNullableValue("b"){ toBe(2) }), - "(a, null), b{ toBe(2) }" to - listOf(keyNullableValue("a", null), keyNullableValue("b"){ toBe(2) }), - "null{ toBe(1) }, b{ toBe(2) }" to - listOf(keyNullableValue(null){ toBe(1) }, keyNullableValue("b"){ toBe(2)}), - "null{ toBe(1) }, (a, null)" to - listOf(keyNullableValue(null){ toBe(1) }, keyNullableValue("a", null)), - "null{ toBe(1) }, (a, null), b{ toBe(2) }" to - listOf(keyNullableValue(null ){ toBe(1) }, keyNullableValue("a", null), keyNullableValue("b") { toBe(2) }), - "b{ toBe(2) }, null{ toBe(1) }, (a, null)" to - listOf(keyNullableValue("b"){ toBe(2) }, keyNullableValue(null){ toBe(1)}, keyNullableValue("a", null)) - ).forEach { (description, keyValues) -> - test("$description does not throw") { - nullableFluent.containsKeyWithNullableValueAssertionsFun(keyValues.first(), keyValues.drop(1).toTypedArray()) - } - } - - test("b{ isLessThan(3) } and b{ isGreaterThan(0) } does not throw (no unique match)") { - nullableFluent.containsKeyWithNullableValueAssertionsFun( - keyNullableValue("b") { isLessThan(3) }, - arrayOf(keyNullableValue("b"){ isGreaterThan(0) }) - ) - } - - test("(a, null), b { isLessThan(2) }, c { isLessThan(1) }} throws AssertionError, reports b and c") { - expect { - nullableFluent.containsKeyWithNullableValueAssertionsFun( - keyNullableValue("a", null), arrayOf( - keyNullableValue("b"){ isLessThan(2) }, - keyNullableValue("c") { isLessThan(1) } - ) - ) - }.toThrow{ - message { - contains( - entry("b", 2), - "$lessThanDescr: 2", - entry("c", keyDoesNotExist) - //TODO seems like notToBeNull is not subjectLess - //"$lessThanDescr: 1" - ) - containsNot(entry("a")) - } - } - } - } - } - - describeFun(containsKey) { - it("does not throw if the map contains the key") { - fluent.containsKeyFun("a") - } - - it("throws an AssertionError if the map does not contain the key") { - expect { - fluent.containsKeyFun("c") - }.toThrow { messageContains("$containsKeyDescr: \"c\"")} - } - } - - describeFun("$containsNullableKey for nullable key type") { - it("does not throw if the map contains the key") { - verbs.checkImmediately(mapOf("a" to 1, null to 2)).containsNullableKeyFun(null) - } - - it("throws an AssertionError if the map does not contain the key") { - expect { - verbs.checkImmediately(mapOf("a" to 1, "b" to 2)).containsNullableKeyFun(null) - }.toThrow { messageContains("$containsKeyDescr: null")} - } - } - - it("does not throw if null is passed and the map contains null as key") { - fluent.containsKeyFun("a") - } - - describeFun(containsNotKey) { - it("does not throw if the map does not contain the key") { - fluent.containsNotKeyFun("c") - } - - it("throws an AssertionError if the map contains the key") { - expect { - fluent.containsNotKeyFun("a") - }.toThrow { messageContains("$containsNotKeyDescr: \"a\"")} - } - } - - describeFun("$containsNotNullableKey for nullable key type") { - it("does not throw if the map does not contain the key") { - verbs.checkImmediately(mapOf("a" to 1, "b" to 2)).containsNotNullableKeyFun(null) - } - - it("throws an AssertionError if the map contains the key") { - expect { - verbs.checkImmediately(mapOf("a" to 1, null to 2)).containsNotNullableKeyFun(null) - }.toThrow { messageContains("$containsNotKeyDescr: null")} - } - } - - describeFun(hasSize) { - context("map with two entries") { - test("expect 2 does not throw") { - fluent.hasSizeFun(2) - } - test("expect 1 throws an AssertionError") { - expect { - fluent.hasSizeFun(1) - }.toThrow { - messageContains("size: 2", TO_BE.getDefault() + ": 1") - } - } - test("expect 3 throws an AssertionError") { - expect { - fluent.hasSizeFun(3) - }.toThrow { - messageContains("size: 2", TO_BE.getDefault() + ": 3") - } - } - } - } - - describeFun(isEmpty) { - it("does not throw if a map is empty") { - assert(mapOf()).isEmptyFun() - } - - it("throws an AssertionError if a map is not empty") { - expect { - fluent.isEmptyFun() - }.toThrow { messageContains("$isDescr: $empty") } - } - } - - describeFun(isNotEmpty) { - it("does not throw if a map is not empty") { - fluent.isNotEmptyFun() - } - - it("throws an AssertionError if a map is empty") { - expect { - assert(mapOf()).isNotEmptyFun() - }.toThrow { messageContains("$isNotDescr: $empty") } - } - } -}) diff --git a/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/MapEntryAssertionsSpec.kt b/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/MapEntryAssertionsSpec.kt deleted file mode 100644 index e288cc619..000000000 --- a/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/MapEntryAssertionsSpec.kt +++ /dev/null @@ -1,74 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") - -package ch.tutteli.atrium.spec.integration - -import ch.tutteli.atrium.api.cc.en_GB.contains -import ch.tutteli.atrium.api.cc.en_GB.containsNot -import ch.tutteli.atrium.api.cc.en_GB.message -import ch.tutteli.atrium.api.cc.en_GB.toThrow -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.spec.AssertionVerbFactory -import ch.tutteli.atrium.spec.describeFun -import ch.tutteli.atrium.translations.DescriptionBasic.TO_BE -import org.jetbrains.spek.api.Spek -import org.jetbrains.spek.api.dsl.SpecBody -import org.jetbrains.spek.api.dsl.context -import org.jetbrains.spek.api.include - -@Deprecated("Switch from Assert to Expect and use Spec from atrium-specs-common; will be removed with 1.0.0") -abstract class MapEntryAssertionsSpec( - verbs: AssertionVerbFactory, - isKeyValuePair: Pair>.(String, Int) -> Assert>>, - describePrefix: String = "[Atrium] " -) : Spek({ - - include(@Suppress("DEPRECATION") object : SubjectLessAssertionSpec>(describePrefix, - isKeyValuePair.first to mapToCreateAssertion { isKeyValuePair.second(this, "key", 1) } - ) {}) - - include(@Suppress("DEPRECATION") object : CheckingAssertionSpec>(verbs, describePrefix, - checkingTriple(isKeyValuePair.first, { isKeyValuePair.second(this, "a", 1) }, mapEntry("a", 1), mapEntry("b", 1)) - ) {}) - - fun describeFun(vararg funName: String, body: SpecBody.() -> Unit) = - describeFun(describePrefix, funName, body = body) - - val assert: (Map.Entry) -> Assert> = verbs::checkImmediately - val expect = verbs::checkException - val mapEntry = mapEntry("a", 1) - val fluent = assert(mapEntry) - - val (isKeyValue, isKeyValueFun) = isKeyValuePair - - val toBeDescr = TO_BE.getDefault() - - describeFun(isKeyValue) { - context("map $mapEntry") { - test("a to 1 does not throw") { - fluent.isKeyValueFun("a", 1) - } - - test("a to 2 throws AssertionError") { - expect { - fluent.isKeyValueFun("a", 2) - }.toThrow { - message { - contains("value: 1", "$toBeDescr: 2") - containsNot("key") - } - } - } - test("b to 1 throws AssertionError") { - expect { - fluent.isKeyValueFun("b", 1) - }.toThrow { - message { - contains("key: \"a\"", "$toBeDescr: \"b\"") - containsNot("value") - } - } - } - } - } -}) diff --git a/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/MapEntryFeatureAssertionsSpec.kt b/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/MapEntryFeatureAssertionsSpec.kt deleted file mode 100644 index 6cf843f0e..000000000 --- a/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/MapEntryFeatureAssertionsSpec.kt +++ /dev/null @@ -1,33 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") - -package ch.tutteli.atrium.spec.integration - -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.AssertionPlantNullable -import ch.tutteli.atrium.spec.AssertionVerbFactory - -@Deprecated("Switch from Assert to Expect and use Spec from atrium-specs-common; will be removed with 1.0.0") -abstract class MapEntryFeatureAssertionsSpec( - verbs: AssertionVerbFactory, - keyValPair: Pair>.() -> Assert>, - keyFunPair: Pair>.(assertionCreator: Assert.() -> Unit) -> Assert>>, - valueValPair: Pair>.() -> Assert>, - valueFunPair: Pair>.(assertionCreator: Assert.() -> Unit) -> Assert>>, - nullableKeyValPair: Pair>.() -> AssertionPlantNullable>, - nullableValueValPair: Pair>.() -> AssertionPlantNullable>, - describePrefix: String = "[Atrium] " -) : KeyValueLikeFeatureAssertionsSpec, Map.Entry>( - verbs, - ::mapEntry, - ::mapEntry, - "key", - "value", - keyValPair, - keyFunPair, - valueValPair, - valueFunPair, - nullableKeyValPair, - nullableValueValPair, - describePrefix -) diff --git a/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/MapFeatureAssertionsSpec.kt b/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/MapFeatureAssertionsSpec.kt deleted file mode 100644 index 43f73c28e..000000000 --- a/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/MapFeatureAssertionsSpec.kt +++ /dev/null @@ -1,228 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") - -package ch.tutteli.atrium.spec.integration - -import ch.tutteli.atrium.api.cc.en_GB.* -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.AssertionPlantNullable -import ch.tutteli.atrium.spec.AssertionVerbFactory -import ch.tutteli.atrium.spec.describeFun -import ch.tutteli.atrium.translations.DescriptionBasic.TO_BE -import ch.tutteli.atrium.translations.DescriptionMapAssertion -import org.jetbrains.spek.api.Spek -import org.jetbrains.spek.api.dsl.SpecBody -import org.jetbrains.spek.api.dsl.context -import org.jetbrains.spek.api.include - -@Deprecated("Switch from Assert to Expect and use Spec from atrium-specs-common; will be removed with 1.0.0") -abstract class MapFeatureAssertionsSpec( - verbs: AssertionVerbFactory, - keysValPair: Pair>.() -> Assert>>, - keysFunPair: Pair>.(assertionCreator: Assert>.() -> Unit) -> Assert>>, - valuesValPair: Pair>.() -> Assert>>, - valuesFunPair: Pair>.(assertionCreator: Assert>.() -> Unit) -> Assert>>, - getExistingPlantPair: Pair>.(String) -> Assert>, - getExistingPair: Pair>.(String, assertionCreator: Assert.() -> Unit) -> Assert>>, - getExistingNullablePlantPair: Pair>.(String) -> AssertionPlantNullable>, - getExistingNullablePair: Pair>.(String, assertionCreator: AssertionPlantNullable.() -> Unit) -> Assert>>, - describePrefix: String = "[Atrium] " -) : Spek({ - - //@formatter:off - include(@Suppress("DEPRECATION") object : SubjectLessAssertionSpec>(describePrefix, - "val ${keysValPair.first}" to mapToCreateAssertion { keysValPair.second(this).isEmpty() }, - "fun ${keysFunPair.first}" to mapToCreateAssertion { keysFunPair.second(this) { isEmpty() } }, - "val ${valuesValPair.first}" to mapToCreateAssertion { valuesValPair.second(this).isEmpty() }, - "fun ${valuesFunPair.first}" to mapToCreateAssertion { valuesFunPair.second(this) { isEmpty() } }, - "${getExistingPlantPair.first} returns plant" to mapToCreateAssertion { getExistingPlantPair.second(this, "a" ).isGreaterThan(1) }, - getExistingPair.first to mapToCreateAssertion { getExistingPair.second(this, "a" ){ isGreaterThan(1) } } - ){}) - include(@Suppress("DEPRECATION") object : SubjectLessAssertionSpec>("$describePrefix[nullable Key] ", - "${getExistingNullablePlantPair.first} returns plant" to mapToCreateAssertion { getExistingNullablePlantPair.second(this, "a" ).toBe(null) }, - getExistingNullablePair.first to mapToCreateAssertion { getExistingNullablePair.second(this, "a" ){ toBe(null) } } - ) {}) - - include(@Suppress("DEPRECATION") object : CheckingAssertionSpec>(verbs, describePrefix, - checkingTriple("val ${keysValPair.first}", { keysValPair.second(this).containsExactly("a") }, mapOf("a" to 1), mapOf("a" to 1, "b" to 2)), - checkingTriple("fun ${keysFunPair.first}", { keysFunPair.second(this) { contains("a").and.hasSize(1) } }, mapOf("a" to 1), mapOf("a" to 1, "b" to 2)), - checkingTriple("val ${valuesValPair.first}", { valuesValPair.second(this).containsExactly(1) }, mapOf("a" to 1), mapOf("a" to 1, "b" to 2)), - checkingTriple("fun ${valuesFunPair.first}", { valuesFunPair.second(this) { contains(1).hasSize(1) } }, mapOf("a" to 1), mapOf("a" to 1, "b" to 2)), - checkingTriple("${getExistingPlantPair.first} returns plant", { getExistingPlantPair.second(this, "a").isGreaterThan(1) }, mapOf("a" to 2), mapOf("a" to 1, "b" to 2)), - checkingTriple(getExistingPair.first, { getExistingPair.second(this, "a") { isGreaterThan(1) } }, mapOf("a" to 2), mapOf("a" to 1, "b" to 2)) - ){}) - include(@Suppress("DEPRECATION") object : CheckingAssertionSpec>(verbs, "$describePrefix[nullable Key] ", - checkingTriple("${getExistingNullablePlantPair.first} plant", { getExistingNullablePlantPair.second(this, "a").toBe(1) }, mapOf("a" to 1), mapOf("a" to null, "b" to 2)), - checkingTriple(getExistingNullablePair.first, { getExistingNullablePair.second(this, "a") { toBe(1) } }, mapOf("a" to 1), mapOf("a" to null, "b" to 2)) - ) {}) - //@formatter:on - - fun describeFun(vararg funName: String, body: SpecBody.() -> Unit) = - describeFun(describePrefix, funName, body = body) - - val assert: (Map) -> Assert> = verbs::checkImmediately - val expect = verbs::checkException - val map = mapOf("a" to 1, "b" to 2) - val fluent = assert(map) - val mapNullable = mapOf("a" to 1, "b" to null) - val fluentNullable = verbs.checkImmediately(mapNullable) - - val (keysValName, keysVal) = keysValPair - val (keysFunName, keysFun) = keysFunPair - val (valuesValName, valuesVal) = valuesValPair - val (valuesFunName, valuesFun) = valuesFunPair - val (getExistingPlant, getExistingPlantFun) = getExistingPlantPair - val (getExisting, getExistingFun) = getExistingPair - val (getExistingNullablePlant, getExistingNullablePlantFun) = getExistingNullablePlantPair - val (getExistingNullable, getExistingNullableFun) = getExistingNullablePair - - val toBeDescr = TO_BE.getDefault() - val keyDoesNotExist = DescriptionMapAssertion.KEY_DOES_NOT_EXIST.getDefault() - - describeFun("val $keysValName") { - context("map with two entries") { - test("hasSize(2) holds") { - fluent.keysVal().hasSize(2) - } - test("hasSize(1) fails") { - expect { - fluent.keysVal().hasSize(1) - }.toThrow { - messageContains("keys: [a, b]") - } - } - } - } - - describeFun("fun $keysFunName") { - context("map with two entries") { - test("hasSize(2) holds") { - fluent.keysFun { hasSize(2) } - } - test("hasSize(1) fails") { - expect { - fluent.keysFun { hasSize(1) } - }.toThrow { - messageContains("keys: [a, b]") - } - } - //TODO should fail but does not since it has a feature assertion which itself is empty -// test("throws if no assertion is made") { -// expect { -// fluent.keysFun { } -// }.toThrow { messageContains("There was not any assertion created") } -// } - } - } - - - describeFun("val $valuesValName") { - context("map with two entries") { - test("hasSize(2) holds") { - fluent.valuesVal().hasSize(2) - } - test("hasSize(1) fails") { - expect { - fluent.valuesVal().hasSize(1) - }.toThrow { - messageContains("values: [1, 2]") - } - } - } - } - - describeFun("fun $valuesFunName") { - context("map with two entries") { - test("hasSize(2) holds") { - fluent.valuesFun { hasSize(2) } - } - test("hasSize(1) fails") { - expect { - fluent.valuesFun { hasSize(1) } - }.toThrow { - messageContains("values: [1, 2]") - } - } - //TODO should fail but does not since it has a feature assertion which itself is empty -// test("throws if no assertion is made") { -// expect { -// fluent.valuesFun { } -// }.toThrow { messageContains("There was not any assertion created") } -// } - } - } - - describeFun("$getExistingPlant returns plant") { - context("map $map") { - test("can perform sub-assertion on existing key") { - fluent.getExistingPlantFun("a").toBe(1) - } - test("non-existing key throws") { - expect { - fluent.getExistingPlantFun("c").toBe(1) - }.toThrow { - messageContains("get(\"c\"): $keyDoesNotExist") - } - } - } - } - - describeFun(getExisting) { - context("map $map") { - test("can perform sub-assertion on existing key") { - fluent.getExistingFun("a") { toBe(1) } - } - test("non-existing key throws but shows intended sub-assertion") { - expect { - fluent.getExistingFun("c") { toBe(3) } - }.toThrow { - messageContains("get(\"c\"): $keyDoesNotExist", "$toBeDescr: 3") - } - } - // the new infix throws now an AssertionError instead - not going to test it any more (is covered by bc-tests) -// test("throws if no assertion is made") { -// expect { -// fluent.getExistingFun("a") { } -// }.toThrow { messageContains("There was not any assertion created") } -// } - } - } - - describeFun("$getExistingNullablePlant for nullable returns plant") { - context("map $mapNullable") { - test("can perform sub-assertion on existing key") { - fluentNullable.getExistingNullablePlantFun("a").toBe(1) - } - test("can perform sub-assertion on existing key with null as value") { - fluentNullable.getExistingNullablePlantFun("b").toBe(null) - } - test("non-existing key throws") { - expect { - fluent.getExistingNullablePlantFun("c").toBe(null) - }.toThrow { - messageContains("get(\"c\"): $keyDoesNotExist") - } - } - } - } - - describeFun("$getExistingNullable for nullable") { - context("map $mapNullable") { - test("can perform sub-assertion on existing key") { - fluentNullable.getExistingNullableFun("a") { toBe(1) } - } - test("can perform sub-assertion on existing key with value null") { - fluentNullable.getExistingNullableFun("b") { toBe(null) } - } - - //TODO problem with down-cast which is not subject-less -// test("non-existing key throws but shows intended sub-assertion") { -// expect { -// fluentNullable.getExistingNullableFun("c") { toBe(null) } -// }.toThrow { -// messageContains("get(\"c\"): $keyDoesNotExist", "$toBeDescr: null") -// } -// } - } - } -}) diff --git a/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/PairFeatureAssertionsSpec.kt b/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/PairFeatureAssertionsSpec.kt deleted file mode 100644 index abdfef711..000000000 --- a/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/PairFeatureAssertionsSpec.kt +++ /dev/null @@ -1,33 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") - -package ch.tutteli.atrium.spec.integration - -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.AssertionPlantNullable -import ch.tutteli.atrium.spec.AssertionVerbFactory - -@Deprecated("Switch from Assert to Expect and use Spec from atrium-specs-common; will be removed with 1.0.0") -abstract class PairFeatureAssertionsSpec( - verbs: AssertionVerbFactory, - firstValPair: Pair>.() -> Assert>, - firstFunPair: Pair>.(assertionCreator: Assert.() -> Unit) -> Assert>>, - secondValPair: Pair>.() -> Assert>, - secondFunPair: Pair>.(assertionCreator: Assert.() -> Unit) -> Assert>>, - nullableFirstValPair: Pair>.() -> AssertionPlantNullable>, - nullableSecondValPair: Pair>.() -> AssertionPlantNullable>, - describePrefix: String = "[Atrium] " -) : KeyValueLikeFeatureAssertionsSpec, Pair>( - verbs, - ::Pair, - ::Pair, - "first", - "second", - firstValPair, - firstFunPair, - secondValPair, - secondFunPair, - nullableFirstValPair, - nullableSecondValPair, - describePrefix -) diff --git a/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/SimpleMapEntry.kt b/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/SimpleMapEntry.kt deleted file mode 100644 index 1b53d387f..000000000 --- a/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/SimpleMapEntry.kt +++ /dev/null @@ -1,13 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") - -package ch.tutteli.atrium.spec.integration - -@Deprecated("Switch from Assert to Expect and use data class from atrium-specs-common; will be removed with 1.0.0") -internal data class SimpleMapEntry(override val key: K, override val value: V) : Map.Entry { - override fun toString(): String = "Map.Entry($key, $value)" -} - -@Suppress("DeprecatedCallableAddReplaceWith") -@Deprecated("Switch from Assert to Expect and use mapEntry from atrium-specs-common; will be removed with 1.0.0") -fun mapEntry(key: K, value: V): Map.Entry = SimpleMapEntry(key, value) diff --git a/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/SubjectLessAssertionSpec.kt b/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/SubjectLessAssertionSpec.kt deleted file mode 100644 index 9b2be9586..000000000 --- a/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/SubjectLessAssertionSpec.kt +++ /dev/null @@ -1,52 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") - -package ch.tutteli.atrium.spec.integration - -import ch.tutteli.atrium.assertions.AssertionGroup -import ch.tutteli.atrium.assertions.ExplanatoryAssertionGroupType -import ch.tutteli.atrium.core.coreFactory -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.domain.builders.AssertImpl -import ch.tutteli.atrium.spec.AssertionVerb -import org.jetbrains.spek.api.Spek - - -@Deprecated("Switch from Assert to Expect and use Spec from atrium-specs-common; will be removed with 1.0.0") -abstract class SubjectLessAssertionSpec( - groupPrefix: String, - vararg assertionCreator: Pair.() -> Unit> -) : Spek({ - - group("${groupPrefix}assertion function can be used in an ${AssertionGroup::class.simpleName} with an ${ExplanatoryAssertionGroupType::class.simpleName} and reported without failure") { - assertionCreator.forEach { (name, createAssertion) -> - test("fun `$name`") { - @Suppress("DEPRECATION") - val assertions = coreFactory.newCollectingPlant { throw ch.tutteli.atrium.creating.PlantHasNoSubjectException() } - .addAssertionsCreatedBy(createAssertion) - .getAssertions() - @Suppress("DEPRECATION") - val plant = coreFactory.newReportingPlant( - AssertionVerb.ASSERT, { 1.0 }, - coreFactory.newOnlyFailureReporter( - coreFactory.newAssertionFormatterFacade(coreFactory.newAssertionFormatterController()), - coreFactory.newNoOpAtriumErrorAdjuster() - ) - ) - val explanatoryGroup = AssertImpl.builder.explanatoryGroup - .withDefaultType - .withAssertions(assertions) - .build() - plant.addAssertion(explanatoryGroup) - } - } - } -}) - -/** - * Helper function to map an arbitrary `Assert.(...) -> Unit` function to a parameter-less one. - */ - -@Suppress("DeprecatedCallableAddReplaceWith") -@Deprecated("Switch from Assert to Expect and use expectLambda from atrium-specs-common; will be removed with 1.0.0") -fun mapToCreateAssertion(createAssertion: Assert.() -> Unit): Assert.() -> Unit = createAssertion diff --git a/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/ThrowableAssertionsSpec.kt b/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/ThrowableAssertionsSpec.kt deleted file mode 100644 index 0e498c143..000000000 --- a/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/ThrowableAssertionsSpec.kt +++ /dev/null @@ -1,283 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") - -package ch.tutteli.atrium.spec.integration - -import ch.tutteli.atrium.api.cc.en_GB.* -import ch.tutteli.atrium.core.polyfills.fullName -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.domain.creating.throwable.thrown.ThrowableThrown -import ch.tutteli.atrium.spec.* -import ch.tutteli.atrium.translations.DescriptionThrowableAssertion -import ch.tutteli.atrium.translations.DescriptionTypeTransformationAssertion -import org.jetbrains.spek.api.Spek -import org.jetbrains.spek.api.dsl.SpecBody -import org.jetbrains.spek.api.dsl.context -import org.jetbrains.spek.api.dsl.it -import java.io.IOException - -@Deprecated("Switch from Assert to Expect and use Spec from atrium-specs-common; will be removed with 1.0.0") -abstract class ThrowableAssertionsSpec( - verbs: AssertionVerbFactory, - toThrowTriple: Triple Unit, - ThrowableThrown.Builder.(assertionCreator: Assert.() -> Unit) -> Unit - >, - notToThrowPair: PairUnit>, - messagePair: Pair.(assertionCreator: Assert.() -> Unit) -> Unit>, - messageWithContainsFun: Assert.(String) -> Unit, - messageContainsPair: Pair.(Any, Array) -> Unit>, - listBulletPoint: String, - explanationBulletPoint: String, - describePrefix: String = "[Atrium] " -) : Spek({ - - fun describeFun(vararg funName: String, body: SpecBody.() -> Unit) - = describeFun(describePrefix, funName, body = body) - - fun describeProperty(vararg funName: String, body: SpecBody.() -> Unit) - = describeProperty(describePrefix, funName, body = body) - - val expect = verbs::checkException - val assert: (IllegalArgumentException) -> Assert = verbs::checkImmediately - - val (toThrow, toThrowFun, toThrowFunLazy) = toThrowTriple - val (notToThrow, notThrowFun) = notToThrowPair - val (message, messageFun) = messagePair - val (messageContains, messageContainsFun) = messageContainsPair - - fun SpecBody.checkToThrow( - description: String, - act: (ThrowableThrown.Builder.() -> Unit) -> Unit, - lazy: (ThrowableThrown.Builder.() -> Unit), - immediate: (ThrowableThrown.Builder.() -> Unit) - ) { - checkGenericNarrowingAssertion(description, act, lazy, "immediate" to immediate) - } - fun SpecBody.expectThrowsAndMessageContainsRegex( - toThrowFun: ThrowableThrown.Builder.() -> Unit, - act: () -> Unit, - pattern: String, vararg otherPatterns: String - ){ - expect { - expect { act() }.toThrowFun() - }.toThrow { - message { containsRegex(pattern, *otherPatterns) } - } - } - fun SpecBody.expectThrowsAssertionErrorAndMessageContainsRegex( - toThrowFun: ThrowableThrown.Builder.() -> Unit, - throwable: Throwable, - pattern: String, vararg otherPatterns: String - ) = expectThrowsAndMessageContainsRegex(toThrowFun, {throw throwable}, pattern, *otherPatterns) - - val isADescr = DescriptionThrowableAssertion.IS_A.getDefault() - val messageDescr = DescriptionThrowableAssertion.OCCURRED_EXCEPTION_MESSAGE.getDefault() - val stackTraceDescr = DescriptionThrowableAssertion.OCCURRED_EXCEPTION_STACKTRACE.getDefault() - val causeDescr = DescriptionThrowableAssertion.OCCURRED_EXCEPTION_CAUSE.getDefault() - val supressedDescr = DescriptionThrowableAssertion.OCCURRED_EXCEPTION_SUPPRESSED.getDefault() - val separator = System.getProperty("line.separator")!! - - val errMessage = "oho... error occurred" - - fun messageAndStackTrace(message: String) = "\\s+\\Q$explanationBulletPoint\\E$messageDescr: \"$message\".*$separator" + - "\\s+\\Q$explanationBulletPoint\\E$stackTraceDescr: $separator" + - "\\s+\\Q$listBulletPoint\\E${ThrowableAssertionsSpec::class.fullName}" - - - - describeFun(toThrow) { - checkToThrow("it throws an AssertionError when no exception occurs", { doToThrow -> - expectThrowsAndMessageContainsRegex(doToThrow, - { /* no exception occurs */ }, - DescriptionThrowableAssertion.NO_EXCEPTION_OCCURRED.getDefault(), - "$isADescr: ${IllegalArgumentException::class.simpleName}" - ) - }, { toThrowFunLazy {} }, { toThrowFun() }) - - - checkToThrow("it allows to define assertions for the Throwable if the correct exception is thrown", { toThrowWithCheck -> - expect { - throw IllegalArgumentException("hello") - }.toThrowWithCheck() - }, { toThrowFunLazy { message { toBe("hello") } } }, {}) - - context("wrong exception"){ - - - checkToThrow("it throws an AssertionError and shows message and stacktrace as extra hint", { doToThrow -> - expectThrowsAssertionErrorAndMessageContainsRegex(doToThrow, - UnsupportedOperationException(errMessage), - "$isADescr:.+" + IllegalArgumentException::class.fullName, - UnsupportedOperationException::class.simpleName + separator + messageAndStackTrace(errMessage) - ) - }, { toThrowFunLazy {} }, { toThrowFun() }) - - context("with a cause") { - - checkToThrow("shows cause as extra hint", { doToThrow -> - expectThrowsAssertionErrorAndMessageContainsRegex(doToThrow, - UnsupportedOperationException("not supported", IllegalStateException(errMessage)), - UnsupportedOperationException::class.simpleName + separator + messageAndStackTrace("not supported"), - "\\s+\\Q$explanationBulletPoint\\E$causeDescr: ${IllegalStateException::class.fullName}" + messageAndStackTrace(errMessage) - ) - }, { toThrowFunLazy {} }, { toThrowFun() }) - - checkToThrow("with nested cause, shows both causes as extra hint", { doToThrow -> - expectThrowsAssertionErrorAndMessageContainsRegex(doToThrow, - UnsupportedOperationException("not supported", IOException("io", IllegalStateException(errMessage))), - UnsupportedOperationException::class.simpleName + separator + messageAndStackTrace("not supported"), - "\\s+\\Q$explanationBulletPoint\\E$causeDescr: ${IOException::class.fullName}" + messageAndStackTrace("io"), - "\\s+\\Q$explanationBulletPoint\\E$causeDescr: ${IllegalStateException::class.fullName}" + messageAndStackTrace(errMessage) - ) - }, { toThrowFunLazy {} }, { toThrowFun() }) - } - - context("with suppressed") { - - checkToThrow("shows all suppressed as extra hint", { doToThrow -> - val ex = UnsupportedOperationException("not supported") - ex.addSuppressed(IllegalStateException("not good")) - ex.addSuppressed(IllegalArgumentException(errMessage)) - expectThrowsAssertionErrorAndMessageContainsRegex(doToThrow, - ex, - UnsupportedOperationException::class.simpleName + separator + messageAndStackTrace("not supported"), - "\\s+\\Q$explanationBulletPoint\\E$supressedDescr: ${IllegalStateException::class.fullName}" + messageAndStackTrace("not good"), - "\\s+\\Q$explanationBulletPoint\\E$supressedDescr: ${IllegalArgumentException::class.fullName}" + messageAndStackTrace(errMessage) - ) - }, { toThrowFunLazy {} }, { toThrowFun() }) - } - } - } - - describeProperty(message) { - checkNarrowingAssertion("it throws an AssertionError if the ${Throwable::message.name} is null", { message -> - val throwable = IllegalArgumentException() - expect { - assert(throwable).message() - }.toThrow { - @Suppress("DEPRECATION") - messageContains( - DescriptionTypeTransformationAssertion.IS_A.getDefault(), - String::class.java.name - ) - } - }, { messageFun {} }) - - context("it allows to define an assertion for the ${Throwable::message.name} if it is not null") { - val throwable = IllegalArgumentException("oh no") - checkNarrowingAssertion("it throws an AssertionError if the assertion does not hold", { messageWithCheck -> - expect { - assert(throwable).messageWithCheck() - }.toThrow{} - }, { messageWithContainsFun("hello") }) - - checkNarrowingAssertion("it does not throw an exception if the assertion holds", { messageWithCheck -> - assert(throwable).messageWithCheck() - }, { messageWithContainsFun("oh") }) - } - } - - describeFun(messageContains) { - checkNarrowingAssertion("it throws an AssertionError if the ${Throwable::message.name} is null", { messageContains -> - val throwable = IllegalArgumentException() - expect { - assert(throwable).messageContains() - }.toThrow { - @Suppress("DEPRECATION") - messageContains( - DescriptionTypeTransformationAssertion.IS_A.getDefault(), - String::class.java.name - ) - } - }, { messageContainsFun(1, arrayOf(2.3, 'z', "hello")) }) - - context("it allows to define an assertion for the ${Throwable::message.name} if it is not null") { - val throwable = IllegalArgumentException("1 2.3 z hello") - checkNarrowingAssertion("it throws an AssertionError if the assertion does not hold", { messageContains -> - expect { - assert(throwable).messageContains() - }.toThrow{} - }, { messageContainsFun("nada", arrayOf()) }) - - checkNarrowingAssertion("it does not throw an exception if the assertion holds", { messageWithCheck -> - assert(throwable).messageWithCheck() - }, { messageContainsFun(1, arrayOf(2.3, 'z', "hello")) }) - - - checkNarrowingAssertion("it throws an IllegalArgumentException if an object is passed", { messageContains -> - expect { - assert(throwable).messageContains() - }.toThrow{} - }, { messageContainsFun(Object(), arrayOf()) }) - } - - } - - describeFun(notToThrow) { - context("no exception occurs") { - it("does not throw"){ - expect{}.notThrowFun() - } - } - context("exception is thrown") { - val notThrown : ThrowableThrown.Builder.() -> Unit = { notThrowFun() } - - it("throws an AssertionError and shows message and stackTrace") { - expectThrowsAssertionErrorAndMessageContainsRegex(notThrown, - UnsupportedOperationException(errMessage), - UnsupportedOperationException::class.simpleName + separator + messageAndStackTrace(errMessage), - "..." - ) - } - - context("with a cause") { - it("shows cause as extra hint") { - expectThrowsAssertionErrorAndMessageContainsRegex(notThrown, - UnsupportedOperationException("not supported", IllegalStateException(errMessage)), - UnsupportedOperationException::class.simpleName + separator + messageAndStackTrace("not supported"), - "\\s+\\Q$explanationBulletPoint\\E$causeDescr: ${IllegalStateException::class.fullName}" + messageAndStackTrace(errMessage) - ) - } - - test("with nested cause, shows both causes as extra hint") { - expectThrowsAssertionErrorAndMessageContainsRegex(notThrown, - UnsupportedOperationException( - "not supported", - IOException("io", IllegalStateException(errMessage)) - ), - UnsupportedOperationException::class.simpleName + separator + messageAndStackTrace("not supported"), - "\\s+\\Q$explanationBulletPoint\\E$causeDescr: ${IOException::class.fullName}" + messageAndStackTrace("io"), - "\\s+\\Q$explanationBulletPoint\\E$causeDescr: ${IllegalStateException::class.fullName}" + messageAndStackTrace(errMessage) - ) - } - } - - context("with suppressed") { - - it("shows all suppressed as extra hint") { - val ex = UnsupportedOperationException("not supported") - ex.addSuppressed(IllegalStateException("not good")) - ex.addSuppressed(IllegalArgumentException(errMessage)) - expectThrowsAssertionErrorAndMessageContainsRegex( - notThrown, - ex, - UnsupportedOperationException::class.simpleName + separator + messageAndStackTrace("not supported"), - "\\s+\\Q$explanationBulletPoint\\E$supressedDescr: ${IllegalStateException::class.fullName}" + messageAndStackTrace("not good"), - "\\s+\\Q$explanationBulletPoint\\E$supressedDescr: ${IllegalArgumentException::class.fullName}" + messageAndStackTrace(errMessage) - ) - } - test("with nested cause, shows both causes as extra hint") { - val ex = UnsupportedOperationException("not supported") - ex.addSuppressed(IOException("io", IllegalStateException(errMessage))) - expectThrowsAssertionErrorAndMessageContainsRegex(notThrown, - ex, - UnsupportedOperationException::class.simpleName + separator + messageAndStackTrace("not supported"), - "\\s+\\Q$explanationBulletPoint\\E$supressedDescr: ${IOException::class.fullName}" + messageAndStackTrace("io"), - "\\s+\\Q$explanationBulletPoint\\E$causeDescr: ${IllegalStateException::class.fullName}" + messageAndStackTrace(errMessage) - ) - } - } - } - } -}) diff --git a/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/TypeTransformationAssertionsSpec.kt b/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/TypeTransformationAssertionsSpec.kt deleted file mode 100644 index 9e35708ff..000000000 --- a/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/TypeTransformationAssertionsSpec.kt +++ /dev/null @@ -1,286 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") - - -package ch.tutteli.atrium.spec.integration - -import ch.tutteli.atrium.api.cc.en_GB.* -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.AssertionPlantNullable -import ch.tutteli.atrium.spec.AssertionVerbFactory -import ch.tutteli.atrium.spec.describeFun -import ch.tutteli.atrium.translations.DescriptionBasic.TO_BE -import ch.tutteli.atrium.translations.DescriptionComparableAssertion -import ch.tutteli.atrium.translations.DescriptionTypeTransformationAssertion -import org.jetbrains.spek.api.Spek -import org.jetbrains.spek.api.dsl.SpecBody -import org.jetbrains.spek.api.dsl.context -import org.jetbrains.spek.api.dsl.it -import org.jetbrains.spek.api.include - -@Deprecated("Switch from Assert to Expect and use Spec from atrium-specs-common; will be removed with 1.0.0") -abstract class TypeTransformationAssertionsSpec( - verbs: AssertionVerbFactory, - notToBeNullPair: Pair.(assertionCreator: Assert.() -> Unit) -> Unit>, - notToBeNullLessFun: AssertionPlantNullable.(Int) -> Unit, - notToBeNullGreaterAndLessFun: AssertionPlantNullable.(Int, Int) -> Unit, - notToBeButPair: Pair.(Int) -> Unit>, - isA: String, - isAIntFun: Assert.(assertionCreator: Assert.() -> Unit) -> Unit, - isAStringFun: Assert.(assertionCreator: Assert.() -> Unit) -> Unit, - isACharSequenceFun: Assert.(assertionCreator: Assert.() -> Unit) -> Unit, - isASubTypeFun: Assert.(assertionCreator: Assert.() -> Unit) -> Unit, - isAIntLessFun: Assert.(Int) -> Unit, - describePrefix: String = "[Atrium] " -) : Spek({ - - include(@Suppress("DEPRECATION") object : CheckingAssertionSpec(verbs, describePrefix, - checkingTriple(isA, { isASubTypeFun(this, {}) }, SubType(), SuperType()) - ) {}) - - fun describeFun(vararg funName: String, body: SpecBody.() -> Unit) = describeFun(describePrefix, funName, body = body) - - val expect = verbs::checkException - val (notToBeNull, notToBeNullFun) = notToBeNullPair - val (notToBeBut, notToBeNullButFun) = notToBeButPair - - describeFun(notToBeNull) { - - val assert: (Int?) -> AssertionPlantNullable = verbs::checkNullable - - context("subject is null") { - it("throws an AssertionError") { - expect { - val i: Int? = null - assert(i).notToBeNullFun {} - }.toThrow { - @Suppress("DEPRECATION") - messageContains( - DescriptionTypeTransformationAssertion.IS_A.getDefault(), - Integer::class.java.name - ) - } - } - - context("it still allows to define assertion on the subject even if it is null") { - it("throws an AssertionError and contains the additional assertion as explanation") { - expect { - val i: Int? = null - assert(i).notToBeNullLessFun(2) - }.toThrow { - @Suppress("DEPRECATION") - messageContains( - DescriptionTypeTransformationAssertion.IS_A.getDefault(), - Integer::class.java.name, - DescriptionComparableAssertion.IS_LESS_THAN.getDefault() - ) - } - } - } - } - - context("subject is not null") { - - it("does not throw") { - val i: Int? = 1 - assert(i).notToBeNullFun {} - } - - context("it allows to define an assertion for the subject") { - it("does not throw if the assertion holds") { - val i: Int? = 1 - assert(i).notToBeNullLessFun(2) - } - - it("throws an AssertionError if the assertion does not hold") { - expect { - val i: Int? = 1 - assert(i).notToBeNullLessFun(0) - }.toThrow {} - } - } - context("it allows to define multiple assertions for the subject") { - it("does not throw if the assertions hold") { - val i: Int? = 1 - assert(i).notToBeNullGreaterAndLessFun(0, 2) - } - - it("throws an AssertionError if one assertion does not hold") { - expect { - val i: Int? = 1 - assert(i).notToBeNullGreaterAndLessFun(2, 5) - }.toThrow { - message { - contains(DescriptionComparableAssertion.IS_GREATER_THAN.getDefault()) - containsNot(DescriptionComparableAssertion.IS_LESS_THAN.getDefault()) - } - } - } - - it("throws an AssertionError if both assertions do not hold and contains both messages") { - expect { - val i: Int? = 1 - assert(i).notToBeNullGreaterAndLessFun(2, 0) - }.toThrow { - message { - contains( - DescriptionComparableAssertion.IS_GREATER_THAN.getDefault(), - DescriptionComparableAssertion.IS_LESS_THAN.getDefault() - ) - } - } - } - } - } - - context("in a feature assertion and subject is null") { - it("throws an AssertionError") { - class A(val i: Int? = null) - expect { - verbs.checkLazily(A()) { property(A::i).notToBeNull {} } - }.toThrow { - @Suppress("DEPRECATION") - messageContains( - A::class.simpleName!!, - DescriptionTypeTransformationAssertion.IS_A.getDefault(), - Integer::class.java.name - ) - } - } - - it("throws an AssertionError which contains subsequent assertions") { - class A(val i: Int? = null) - expect { - verbs.checkLazily(A()) { property(A::i).notToBeNullLessFun(1) } - }.toThrow { - @Suppress("DEPRECATION") - messageContains( - A::class.simpleName!!, - DescriptionTypeTransformationAssertion.IS_A.getDefault(), - DescriptionComparableAssertion.IS_LESS_THAN.getDefault(), - Integer::class.java.name - ) - } - } - } - } - - describeFun(isA) { - - val assert: (String) -> Assert = verbs::checkImmediately - - context("subject is not in type hierarchy") { - it("throws an AssertionError") { - expect { - assert("hello").isAIntFun {} - }.toThrow { - @Suppress("DEPRECATION") - messageContains( - DescriptionTypeTransformationAssertion.IS_A.getDefault(), - Integer::class.java.name - ) - } - } - } - context("subject is the same type") { - it("does not throw an AssertionError") { - assert("hello").isAStringFun {} - } - - group("it allows to perform an assertion specific for the subtype...") { - - test("... which holds -- does not throw") { - verbs.checkImmediately(1).isAIntLessFun(2) - } - - val expectedLessThan = 2 - val actualValue = 5 - test("... which fails -- throws an AssertionError") { - expect { - verbs.checkImmediately(actualValue).isAIntLessFun(expectedLessThan) - }.toThrow { - messageContains(actualValue, DescriptionComparableAssertion.IS_LESS_THAN.getDefault(), expectedLessThan) - } - } - } - } - - context("subject is a subtype") { - it("does not throw an AssertionError if the subject is a subtype") { - assert("hello").isACharSequenceFun {} - } - - group("it allows to perform an assertion specific for the subtype...") { - - test("... which holds -- does not throw") { - verbs.checkImmediately(1).isAIntLessFun(2) - } - - val expectedLessThan = 2 - val actualValue = 5 - test("... which fails -- throws an AssertionError") { - expect { - verbs.checkImmediately(actualValue).isAIntLessFun(expectedLessThan) - }.toThrow { - messageContains(actualValue, DescriptionComparableAssertion.IS_LESS_THAN.getDefault(), expectedLessThan) - } - } - } - } - - context("subject is a supertype") { - it("throws an AssertionError") { - expect { - verbs.checkImmediately(SuperType()).isASubTypeFun {} - }.toThrow { - @Suppress("DEPRECATION") - messageContains( - SuperType::class.java.name, - DescriptionTypeTransformationAssertion.IS_A.getDefault(), - SubType::class.java.name - ) - } - } - } - } - - describeFun(notToBeBut) { - val assert: (Int?) -> AssertionPlantNullable = verbs::checkNullable - - context("subject is null") { - it("throws an AssertionError") { - expect { - val i: Int? = null - assert(i).notToBeNullButFun(1) - }.toThrow { - @Suppress("DEPRECATION") - messageContains( - DescriptionTypeTransformationAssertion.IS_A.getDefault(), - Integer::class.java.name, - "${TO_BE.getDefault()}: 1" - ) - } - } - } - - context("subject is 2") { - val i: Int? = 2 - test("2 does not throw") { - assert(i).notToBeNullButFun(2) - } - - test("3 throws an AssertionError") { - expect { - assert(i).notToBeNullButFun(3) - }.toThrow { - messageContains( - "${TO_BE.getDefault()}: 3" - ) - } - } - } - } -}) { - open class SuperType - class SubType : SuperType() -} diff --git a/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/iterableAbsentSubjectTest.kt b/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/iterableAbsentSubjectTest.kt deleted file mode 100644 index 5ff7ac21a..000000000 --- a/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/integration/iterableAbsentSubjectTest.kt +++ /dev/null @@ -1,69 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") - -package ch.tutteli.atrium.spec.integration - -import ch.tutteli.atrium.api.cc.en_GB.messageContains -import ch.tutteli.atrium.api.cc.en_GB.returnValueOf -import ch.tutteli.atrium.api.cc.en_GB.toBe -import ch.tutteli.atrium.api.cc.en_GB.toThrow -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.domain.builders.AssertImpl -import ch.tutteli.atrium.spec.AssertionVerbFactory -import ch.tutteli.atrium.translations.DescriptionBasic.TO_BE -import ch.tutteli.atrium.translations.DescriptionIterableAssertion -import org.jetbrains.spek.api.dsl.SpecBody -import org.jetbrains.spek.api.dsl.context -import kotlin.reflect.KFunction1 - -//TODO remove with 1.0.0 -fun SpecBody.absentSubjectTests( - verbs: AssertionVerbFactory, - testeeFun: Assert>.((Assert.() -> Unit)?, Array.() -> Unit)?>) -> Assert> -) { - val assert: (Iterable) -> Assert> = verbs::checkImmediately - val expect = verbs::checkException - context("${IterableContainsEntriesSpecBase.returnValueOfFun}(...), absent subject and explanation required") { - // the new infix is based on maybeSubject where this does not occur - not going to test it any more (is covered by bc-tests) -// test("empty iterable, states that iterable was empty") { -// expect { -// assert(setOf()).testeeFun({ -// AssertImpl.feature.returnValueOf1( -// this, -// subject::compareTo, -// 2.0, -// "compareTo" -// ).toBe(0) -// }, arrayOf()) -// }.toThrow { messageContains(DescriptionIterableAssertion.CANNOT_EVALUATE_SUBJECT_EMPTY_ITERABLE.getDefault()) } -// } -// test("only null, states that iterable only returned null") { -// expect { -// assert(listOf(null, null)).testeeFun({ -// val f: KFunction1 = subject::compareTo -// returnValueOf(f, 2.0) -// }, arrayOf()) -// }.toThrow { messageContains(DescriptionIterableAssertion.CANNOT_EVALUATE_SUBJECT_ONLY_NULL.getDefault()) } -// } - - val list = listOf(null, 1.0, null, 3.0) - test("$list, it outputs explanation (since we have a non-null entry)") { - expect { - assert(list).testeeFun({ - AssertImpl.feature.returnValueOf1( - this, - subject::compareTo, - 2.0, - "compareTo" - ).toBe(0) - }, arrayOf()) - }.toThrow { - messageContains( - "${IterableContainsEntriesSpecBase.anEntryWhich}: ${IterableContainsSpecBase.separator}", - "compareTo(2.0):", - "${TO_BE.getDefault()}: 0" - ) - } - } - } -} diff --git a/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/verbs/VerbSpec.kt b/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/verbs/VerbSpec.kt deleted file mode 100644 index daec5ea07..000000000 --- a/misc/deprecated/atrium-spec/src/main/kotlin/ch/tutteli/atrium/spec/verbs/VerbSpec.kt +++ /dev/null @@ -1,196 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") - - -package ch.tutteli.atrium.spec.verbs - -import ch.tutteli.atrium.api.cc.en_GB.* -import ch.tutteli.atrium.core.coreFactory -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.creating.AssertionPlantNullable -import ch.tutteli.atrium.domain.builders.AssertImpl -import ch.tutteli.atrium.domain.builders.reporting.ReporterBuilder -import ch.tutteli.atrium.domain.creating.throwable.thrown.ThrowableThrown -import ch.tutteli.atrium.spec.AssertionVerb.ASSERT -import ch.tutteli.atrium.spec.AssertionVerb.EXPECT_THROWN -import ch.tutteli.atrium.spec.inCaseOf -import ch.tutteli.atrium.spec.prefixedDescribe -import ch.tutteli.atrium.translations.DescriptionComparableAssertion.* -import ch.tutteli.atrium.translations.DescriptionThrowableAssertion -import ch.tutteli.atrium.translations.DescriptionTypeTransformationAssertion -import org.jetbrains.spek.api.Spek -import org.jetbrains.spek.api.dsl.SpecBody -import org.jetbrains.spek.api.dsl.context -import org.jetbrains.spek.api.dsl.it - -// does not make sense to test the verbs with the verbs themselves. Thus we create our own assertion verbs here -@Suppress("DEPRECATION") -private fun assert(subject: T): AssertionPlant - = coreFactory.newReportingPlant(ASSERT, { subject }, AtriumReporterSupplier.REPORTER) - -@Suppress("DEPRECATION") -private fun assert(subject: T, assertionCreator: Assert.() -> Unit) - = coreFactory.newReportingPlantAndAddAssertionsCreatedBy(ASSERT, { subject }, AtriumReporterSupplier.REPORTER, assertionCreator) - -@Suppress("DEPRECATION") -private fun assert(subject: T) - = coreFactory.newReportingPlantNullable(ASSERT, { subject }, AtriumReporterSupplier.REPORTER) - -private fun expect(act: () -> Unit) - = AssertImpl.throwable.thrownBuilder(EXPECT_THROWN, act, AtriumReporterSupplier.REPORTER) - -private object AtriumReporterSupplier { - val REPORTER by lazy { - ReporterBuilder.create() - .withoutTranslationsUseDefaultLocale() - .withDetailedObjectFormatter() - .withDefaultAssertionFormatterController() - .withDefaultAssertionFormatterFacade() - .withTextSameLineAssertionPairFormatter() - .withTextCapabilities() - .withDefaultAtriumErrorAdjusters() - .withOnlyFailureReporter() - .build() - } -} - - -//TODO remove with 1.0.0 -- no need to migrate to Spek2 -@Deprecated("Switch from Assert to Expect and use Spec from atrium-specs-common; will be removed with 1.0.0") -abstract class VerbSpec( - plantCheckImmediately: Pair AssertionPlant>, - plantCheckLazily: Pair.() -> Unit) -> AssertionPlant>, - plantNullable: Pair AssertionPlantNullable>, - plantExpect: Pair Unit) -> ThrowableThrown.Builder>, - describePrefix: String = "[Atrium] " -) : Spek({ - - fun prefixedDescribe(description: String, body: SpecBody.() -> Unit) { - prefixedDescribe(describePrefix, description, body) - } - - prefixedDescribe("assertion verb '${plantCheckImmediately.first}' which immediately evaluates assertions") { - val (_, assertionVerb) = plantCheckImmediately - - it("does not throw an exception in case the assertion holds") { - assertionVerb(1).toBe(1) - } - it("throws an AssertionError as soon as one assertion fails") { - expect { - assertionVerb(1).isLessOrEquals(10).and.isLessOrEquals(0).and.isGreaterOrEquals(2) - }.toThrow { - message { - contains(": 1") - contains("${IS_LESS_THAN_OR_EQUAL.getDefault()}: 0") - containsNot("${IS_GREATER_THAN_OR_EQUAL.getDefault()}: 2") - } - } - } - } - - prefixedDescribe("assertion verb '${plantCheckImmediately.first}' which lazily evaluates assertions") { - val (_, assertionVerb) = plantCheckLazily - - context("the assertions hold") { - it("does not throw an exception") { - assertionVerb(1) { toBe(1) } - } - context("a subsequent assertion holds") { - it("does not throw an exception") { - assertionVerb(1) { toBe(1) }.isLessThan(2) - } - } - context("a subsequent group of assertions hold") { - it("does not throw an exception") { - assertionVerb(1) { toBe(1) }.and { isLessThan(2) } - } - } - context("a subsequent assertion fails") { - it("throws an AssertionError") { - expect { - assertionVerb(1) { toBe(1) }.isLessThan(1) - }.toThrow { - messageContains("${IS_LESS_THAN.getDefault()}: 1") - } - } - } - - context("multiple assertions of a subsequent group of assertion fails") { - it("evaluates all assertions and then throws an AssertionError") { - expect { - assertionVerb(1) { toBe(1) }.and { isLessThan(0); isGreaterThan(2) } - }.toThrow { - messageContains( - ": 1", - "${IS_LESS_THAN.getDefault()}: 0", - "${IS_GREATER_THAN.getDefault()}: 2" - ) - } - } - } - } - - context("one assertion fails") { - it("evaluates all assertions and then throws an AssertionError") { - expect { - assertionVerb(1) { - isLessThan(0) - isGreaterThan(2) - } - }.toThrow { - message { - contains(": 1") - contains("${IS_LESS_THAN.getDefault()}: 0") - contains("${IS_GREATER_THAN.getDefault()}: 2") - } - } - } - } - } - - prefixedDescribe("assertion verb '${plantNullable.first}' which supports nullable subjects") { - inCaseOf("a nullable subject") { - val (_, assertionVerb) = plantNullable - it("does not throw an exception when calling toBe(`null`)") { - assertionVerb(null).toBe(null) - } - it("throws an AssertionError when calling notToBeNull") { - expect { - assertionVerb(null).notToBeNull {} - }.toThrow { - @Suppress("DEPRECATION") - messageContains( - DescriptionTypeTransformationAssertion.IS_A.getDefault(), - Integer::class.java.name - ) - } - } - } - } - - prefixedDescribe("assertion verb '${plantExpect.first}' which deals with exceptions") { - inCaseOf("an IllegalArgumentException occurs") { - val (_, assertionVerb) = plantExpect - it("does not throw an exception expecting an IllegalArgumentException") { - assertionVerb { - throw IllegalArgumentException() - }.toThrow{} - } - it("throws an AssertionError when expecting an UnsupportedOperationException") { - expect { - assertionVerb { - throw IllegalArgumentException() - }.toThrow{} - }.toThrow { - messageContains( - DescriptionThrowableAssertion.IS_A.getDefault(), - IllegalArgumentException::class.java.name, - UnsupportedOperationException::class.java.name - ) - } - } - } - } - -}) diff --git a/misc/deprecated/bundles/atrium-cc-en_UK-robstoll/build.gradle b/misc/deprecated/bundles/atrium-cc-en_UK-robstoll/build.gradle deleted file mode 100644 index 0f4b18644..000000000 --- a/misc/deprecated/bundles/atrium-cc-en_UK-robstoll/build.gradle +++ /dev/null @@ -1,22 +0,0 @@ -description = 'Represents a deprecated convenience module which merely bundles dependencies. ' + - 'Use atrium-cc-en_GB-robstoll once you have migrated all deprecated entities, this module will be removed with 1.0.0' - -dependencies { - api prefixedProject('verbs-jvm') - api prefixedProject('api-fluent-en_GB-jvm') - api prefixedProject('translations-en_GB-jvm') - api prefixedProject('domain-builders-jvm') - api prefixedProject('domain-api-jvm') - api prefixedProject('core-api-jvm') - - runtimeOnly prefixedProject('domain-robstoll-jvm') - runtimeOnly prefixedProject('core-robstoll-jvm') - - //TODO remove with 1.0.0 - api prefixedProject('api-cc-en_GB-jvm') - api prefixedProject('api-cc-en_UK') - implementation prefixedProject('assertions') - api prefixedProject('core-api-deprecated') - api prefixedProject('core-robstoll-deprecated') - implementation prefixedProject('translations-en_UK-deprecated') -} diff --git a/misc/deprecated/bundles/atrium-cc-en_UK-robstoll/src/test/kotlin/SmokeSpec.kt b/misc/deprecated/bundles/atrium-cc-en_UK-robstoll/src/test/kotlin/SmokeSpec.kt deleted file mode 100644 index 44c1f35de..000000000 --- a/misc/deprecated/bundles/atrium-cc-en_UK-robstoll/src/test/kotlin/SmokeSpec.kt +++ /dev/null @@ -1,42 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") - -import ch.tutteli.atrium.api.cc.en_UK.toBe -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.domain.builders.AssertImpl -import ch.tutteli.atrium.reporting.Text -import ch.tutteli.atrium.reporting.translating.StringBasedTranslatable -import ch.tutteli.atrium.translations.DescriptionBasic -import ch.tutteli.atrium.verbs.assertThat -import org.jetbrains.spek.api.Spek - -//TODO remove with 1.0.0, no need to migrate to Spek 2 -object SmokeSpec : Spek({ - test("see if `toBe` can be used") { - @Suppress("DEPRECATION") - assertThat(1).toBe(1) - } - - test("see if own assertion function without i18n can be used") { - assertThat(2).isEven() - } - - test("see if own assertion function with i18n can be used") { - assertThat(4).isMultipleOf(2) - } -}) - -@Suppress("DEPRECATION") -fun Assert.isEven() = - createAndAddAssertion(DescriptionBasic.IS, Text("an even number")) { subject % 2 == 0 } - -fun Assert.isMultipleOf(base: Int) = addAssertion(_isMultipleOf(this, base)) - -fun _isMultipleOf(plant: AssertionPlant, base: Int): Assertion = - AssertImpl.builder.createDescriptive(plant, DescriptionIntAssertions.IS_MULTIPLE_OF, base) { it % base == 0 } - -enum class DescriptionIntAssertions(override val value: String) : StringBasedTranslatable { - IS_MULTIPLE_OF("is multiple of") -} diff --git a/misc/deprecated/bundles/atrium-cc-infix-en_UK-robstoll/build.gradle b/misc/deprecated/bundles/atrium-cc-infix-en_UK-robstoll/build.gradle deleted file mode 100644 index 19cda7c04..000000000 --- a/misc/deprecated/bundles/atrium-cc-infix-en_UK-robstoll/build.gradle +++ /dev/null @@ -1,22 +0,0 @@ -description = 'Represents a deprecated convenience module which merely bundles dependencies. ' + - 'Use atrium-cc-infix-en_GB-robstoll once you have migrated all deprecated entities, this module will be removed with 1.0.0' - -dependencies { - api prefixedProject('verbs-jvm') - api prefixedProject('api-infix-en_GB-jvm') - api prefixedProject('translations-en_GB-jvm') - api prefixedProject('domain-builders-jvm') - api prefixedProject('domain-api-jvm') - api prefixedProject('core-api-jvm') - - runtimeOnly prefixedProject('domain-robstoll-jvm') - runtimeOnly prefixedProject('core-robstoll-jvm') - - //TODO remove with 1.0.0 - api prefixedProject('api-cc-infix-en_GB-jvm') - api prefixedProject('api-cc-infix-en_UK') - implementation prefixedProject('assertions') - api prefixedProject('core-api-deprecated') - api prefixedProject('core-robstoll-deprecated') - api prefixedProject('translations-en_UK-deprecated') -} diff --git a/misc/deprecated/bundles/atrium-cc-infix-en_UK-robstoll/src/test/kotlin/SmokeSpec.kt b/misc/deprecated/bundles/atrium-cc-infix-en_UK-robstoll/src/test/kotlin/SmokeSpec.kt deleted file mode 100644 index 221fc726c..000000000 --- a/misc/deprecated/bundles/atrium-cc-infix-en_UK-robstoll/src/test/kotlin/SmokeSpec.kt +++ /dev/null @@ -1,45 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") - -import ch.tutteli.atrium.api.cc.infix.en_UK.toBe -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.domain.builders.AssertImpl -import ch.tutteli.atrium.reporting.Text -import ch.tutteli.atrium.reporting.translating.StringBasedTranslatable -import ch.tutteli.atrium.translations.DescriptionBasic -import ch.tutteli.atrium.verbs.expect -import org.jetbrains.spek.api.Spek - -//TODO remove with 1.0.0, no need to migrate to Spek 2 -object SmokeSpec : Spek({ - test("see if `toBe` can be used") { - @Suppress("DEPRECATION") - expect(1) toBe 1 - } - - test("see if own assertion function without i18n can be used") { - expect(2) tobe even - } - - test("see if own assertion function with i18n can be used") { - expect(4) isMultipleOf 2 - } -}) - -@Suppress("ClassName") -object even - -@Suppress("DEPRECATION") -infix fun Assert.tobe(@Suppress("UNUSED_PARAMETER") even: even) = - createAndAddAssertion(DescriptionBasic.IS, Text("an even number")) { subject % 2 == 0 } - -infix fun Assert.isMultipleOf(base: Int) = addAssertion(_isMultipleOf(this, base)) - -fun _isMultipleOf(plant: AssertionPlant, base: Int): Assertion = - AssertImpl.builder.createDescriptive(plant, DescriptionIntAssertions.IS_MULTIPLE_OF, base) { it % base == 0 } - -enum class DescriptionIntAssertions(override val value: String) : StringBasedTranslatable { - IS_MULTIPLE_OF("is multiple of") -} diff --git a/misc/deprecated/bundles/cc-de_CH-robstoll/atrium-cc-de_CH-robstoll-common/build.gradle b/misc/deprecated/bundles/cc-de_CH-robstoll/atrium-cc-de_CH-robstoll-common/build.gradle deleted file mode 100644 index f3461311c..000000000 --- a/misc/deprecated/bundles/cc-de_CH-robstoll/atrium-cc-de_CH-robstoll-common/build.gradle +++ /dev/null @@ -1,14 +0,0 @@ -description = 'Represents a convenience module which merely bundles dependencies as common module.' - -dependencies { - api prefixedProject('api-fluent-en_GB-common') - api prefixedProject('verbs-common') - api prefixedProject('api-cc-de_CH-common') - api prefixedProject('translations-de_CH-common') - api prefixedProject('domain-builders-common') - api prefixedProject('domain-api-common') - api prefixedProject('core-api-common') - - runtimeOnly prefixedProject('domain-robstoll-common') - runtimeOnly prefixedProject('core-robstoll-common') -} diff --git a/misc/deprecated/bundles/cc-de_CH-robstoll/atrium-cc-de_CH-robstoll-common/src/test/kotlin/SmokeTest.kt b/misc/deprecated/bundles/cc-de_CH-robstoll/atrium-cc-de_CH-robstoll-common/src/test/kotlin/SmokeTest.kt deleted file mode 100644 index cb35ddc1b..000000000 --- a/misc/deprecated/bundles/cc-de_CH-robstoll/atrium-cc-de_CH-robstoll-common/src/test/kotlin/SmokeTest.kt +++ /dev/null @@ -1,78 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") - -import ch.tutteli.atrium.api.cc.de_CH.ist -import ch.tutteli.atrium.api.cc.de_CH.messageEnthaelt -import ch.tutteli.atrium.api.cc.de_CH.wirft -import ch.tutteli.atrium.api.cc.de_CH.wirftNichts -import ch.tutteli.atrium.api.fluent.en_GB.toBe -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.domain.builders.AssertImpl -import ch.tutteli.atrium.domain.builders.migration.asExpect -import ch.tutteli.atrium.reporting.Text -import ch.tutteli.atrium.reporting.translating.StringBasedTranslatable -import ch.tutteli.atrium.translations.DescriptionBasic -import ch.tutteli.atrium.verbs.expect -import kotlin.test.Test - -class SmokeTest { - @Test - fun toBe_canBeUsed() { - expect(1).ist(1) - expect { - expect(1).asExpect().toBe(2) - }.wirft { - //check that correct translation is used - messageEnthaelt("ist: 2") - } - } - - @Test - fun assertionFunctionWithoutI18nCanBeUsed() { - expect(2).isEven() - } - - @Test - fun assertionFunctionWithI18nCanBeUsed() { - expect(4).isMultipleOf(2) - } - - - @Test - fun assertAnExceptionOccurred() { - expect { - throw IllegalArgumentException() - }.wirft{} - } - - @Test - fun assertAnExceptionWithAMessageOccurred() { - expect { - throw IllegalArgumentException("oho... hello btw") - }.wirft { - messageEnthaelt("hello") - } - } - - @Test - fun assertNotToThrow() { - expect { - - }.wirftNichts() - } -} - -@Suppress("DEPRECATION") -fun Assert.isEven() = - createAndAddAssertion(DescriptionBasic.IS, Text("an even number")) { subject % 2 == 0 } - -fun Assert.isMultipleOf(base: Int) = addAssertion(_isMultipleOf(this, base)) - -fun _isMultipleOf(plant: AssertionPlant, base: Int): Assertion = - AssertImpl.builder.createDescriptive(plant, DescriptionIntAssertions.IS_MULTIPLE_OF, base) { it % base == 0 } - -enum class DescriptionIntAssertions(override val value: String) : StringBasedTranslatable { - IS_MULTIPLE_OF("is multiple of") -} diff --git a/misc/deprecated/bundles/cc-de_CH-robstoll/atrium-cc-de_CH-robstoll-js/build.gradle b/misc/deprecated/bundles/cc-de_CH-robstoll/atrium-cc-de_CH-robstoll-js/build.gradle deleted file mode 100644 index eba7b168e..000000000 --- a/misc/deprecated/bundles/cc-de_CH-robstoll/atrium-cc-de_CH-robstoll-js/build.gradle +++ /dev/null @@ -1,15 +0,0 @@ -description = 'Represents a convenience module which merely bundles dependencies for the JS platform.' - -dependencies { - api prefixedProject('api-fluent-en_GB-js') - api prefixedProject('verbs-js') - api prefixedProject('api-cc-de_CH-js') - api prefixedProject('translations-de_CH-js') - api prefixedProject('domain-builders-js') - api prefixedProject('domain-api-js') - api prefixedProject('core-api-js') - - //TODO should be runtimeOnly but due to https://youtrack.jetbrains.com/issue/KT-27797 it cannot be - implementation prefixedProject('domain-robstoll-js') - implementation prefixedProject('core-robstoll-js') -} diff --git a/misc/deprecated/bundles/cc-de_CH-robstoll/atrium-cc-de_CH-robstoll-js/src/main/kotlin/ch/tutteli/atrium/cc/de_CH/robstoll/dependOnMe.kt b/misc/deprecated/bundles/cc-de_CH-robstoll/atrium-cc-de_CH-robstoll-js/src/main/kotlin/ch/tutteli/atrium/cc/de_CH/robstoll/dependOnMe.kt deleted file mode 100644 index f1a460751..000000000 --- a/misc/deprecated/bundles/cc-de_CH-robstoll/atrium-cc-de_CH-robstoll-js/src/main/kotlin/ch/tutteli/atrium/cc/de_CH/robstoll/dependOnMe.kt +++ /dev/null @@ -1,17 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION") -package ch.tutteli.atrium.cc.de_CH.robstoll - -import ch.tutteli.atrium.core.robstoll.dependOn_atrium_core_robstoll -import ch.tutteli.atrium.domain.robstoll.dependOn_atrium_domain_robstoll - -/** - * Dummy function in order that other modules can define a dependency on atrium-cc-de_CH-robstoll-js - * - * Moreover it has the side effect that a dependency on core-robstoll and domain-robstoll is established. - * This is necessary, as it has only a loosely coupled dependency (via serviceLoader). - */ -fun dependOnAtrium() { - dependOn_atrium_core_robstoll() - dependOn_atrium_domain_robstoll() -} diff --git a/misc/deprecated/bundles/cc-de_CH-robstoll/atrium-cc-de_CH-robstoll-js/src/test/kotlin/testSetup.kt b/misc/deprecated/bundles/cc-de_CH-robstoll/atrium-cc-de_CH-robstoll-js/src/test/kotlin/testSetup.kt deleted file mode 100644 index af04841e3..000000000 --- a/misc/deprecated/bundles/cc-de_CH-robstoll/atrium-cc-de_CH-robstoll-js/src/test/kotlin/testSetup.kt +++ /dev/null @@ -1,4 +0,0 @@ -import ch.tutteli.atrium.cc.de_CH.robstoll.dependOnAtrium - -@Suppress("unused") -private val establishDependencyToAtrium = dependOnAtrium() diff --git a/misc/deprecated/bundles/cc-de_CH-robstoll/atrium-cc-de_CH-robstoll-jvm/build.gradle b/misc/deprecated/bundles/cc-de_CH-robstoll/atrium-cc-de_CH-robstoll-jvm/build.gradle deleted file mode 100644 index ca35ab487..000000000 --- a/misc/deprecated/bundles/cc-de_CH-robstoll/atrium-cc-de_CH-robstoll-jvm/build.gradle +++ /dev/null @@ -1,26 +0,0 @@ -description = 'Represents a convenience module which merely bundles dependencies for the JVM platform.' - -dependencies { - api prefixedProject('api-fluent-en_GB-jvm') - api prefixedProject('verbs-jvm') - api prefixedProject('api-cc-de_CH-jvm') - api prefixedProject('translations-de_CH-jvm') - api prefixedProject('domain-builders-jvm') - api prefixedProject('domain-api-jvm') - api prefixedProject('core-api-jvm') - - runtimeOnly prefixedProject('domain-robstoll-jvm') - runtimeOnly prefixedProject('core-robstoll-jvm') - - //TODO remove with 1.0.0 - implementation prefixedProject('assertions') - api prefixedProject('core-api-deprecated') - api prefixedProject('core-robstoll-deprecated') - api prefixedProject('translations-de_CH-deprecated') -} - -//TODO should not be necessary https://youtrack.jetbrains.com/issue/KT-28124 -compileKotlin.dependsOn( - prefixedProject('domain-robstoll-jvm').jar, - prefixedProject('core-robstoll-jvm').jar -) diff --git a/misc/deprecated/bundles/cc-en_GB-robstoll/atrium-cc-en_GB-robstoll-common/build.gradle b/misc/deprecated/bundles/cc-en_GB-robstoll/atrium-cc-en_GB-robstoll-common/build.gradle deleted file mode 100644 index fe9d4415c..000000000 --- a/misc/deprecated/bundles/cc-en_GB-robstoll/atrium-cc-en_GB-robstoll-common/build.gradle +++ /dev/null @@ -1,16 +0,0 @@ -description = 'Represents a convenience module which merely bundles dependencies as common module.' - -dependencies { - api prefixedProject('verbs-common') - api prefixedProject('api-cc-en_GB-common') - api prefixedProject('translations-en_GB-common') - api prefixedProject('domain-builders-common') - api prefixedProject('domain-api-common') - api prefixedProject('core-api-common') - - runtimeOnly prefixedProject('domain-robstoll-common') - runtimeOnly prefixedProject('core-robstoll-common') - - // here to ease migration; so that ReplaceWith of @Deprecated works - api prefixedProject('api-fluent-en_GB-common') -} diff --git a/misc/deprecated/bundles/cc-en_GB-robstoll/atrium-cc-en_GB-robstoll-common/src/test/kotlin/SmokeTest.kt b/misc/deprecated/bundles/cc-en_GB-robstoll/atrium-cc-en_GB-robstoll-common/src/test/kotlin/SmokeTest.kt deleted file mode 100644 index e557b487e..000000000 --- a/misc/deprecated/bundles/cc-en_GB-robstoll/atrium-cc-en_GB-robstoll-common/src/test/kotlin/SmokeTest.kt +++ /dev/null @@ -1,118 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") - -import ch.tutteli.atrium.api.cc.en_GB.messageContains -import ch.tutteli.atrium.api.cc.en_GB.notToThrow -import ch.tutteli.atrium.api.cc.en_GB.toBe -import ch.tutteli.atrium.api.cc.en_GB.toThrow -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.domain.builders.AssertImpl -import ch.tutteli.atrium.reporting.Text -import ch.tutteli.atrium.reporting.translating.StringBasedTranslatable -import ch.tutteli.atrium.translations.DescriptionBasic.IS -import ch.tutteli.atrium.translations.DescriptionBasic.TO_BE -import ch.tutteli.atrium.verbs.AssertionVerb -import ch.tutteli.atrium.verbs.assert -import ch.tutteli.atrium.verbs.assertThat -import ch.tutteli.atrium.verbs.expect -import kotlin.test.Test - -class SmokeTest { - @Test - fun toBe_canBeUsed() { - assertThat(1).toBe(1) - } - - @Test - fun assertionFunctionWithoutI18nCanBeUsed() { - assertThat(2).isEven() - } - - @Test - fun assertionFunctionWithI18nCanBeUsed() { - assertThat(4).isMultipleOf(2) - } - - @Test - fun assertWithinAssert() { - expect { - assert(1) { - assert(2).toBe(1) - } - }.toThrow { - messageContains( - "${AssertionVerb.ASSERT.getDefault()}: 1", - "${AssertionVerb.ASSERT.getDefault()}: 2", - "${TO_BE.getDefault()}: 1" - ) - } - } - - @Test - fun assertThatWithinAssertThat() { - expect { - assertThat(1) { - assertThat(2).toBe(1) - } - }.toThrow { - messageContains( - "${AssertionVerb.ASSERT_THAT.getDefault()}: 1", - "${AssertionVerb.ASSERT_THAT.getDefault()}: 2", - "${TO_BE.getDefault()}: 1" - ) - } - } - - @Test - fun expectWithinExpect() { - expect { - expect(1) { - expect(2).toBe(1) - } - }.toThrow { - messageContains( - "${AssertionVerb.EXPECT.getDefault()}: 1", - "${AssertionVerb.EXPECT.getDefault()}: 2", - "${TO_BE.getDefault()}: 1" - ) - } - } - - @Test - fun assertAnExceptionOccurred() { - assertThat { - throw IllegalArgumentException() - }.toThrow {} - } - - @Test - fun assertAnExceptionWithAMessageOccurred() { - assertThat { - throw IllegalArgumentException("oho... hello btw") - }.toThrow { - messageContains("hello") - } - } - - @Test - fun assertNotToThrow() { - assertThat { - - }.notToThrow() - } -} - - -@Suppress("DEPRECATION") -fun Assert.isEven() = createAndAddAssertion(IS, Text("an even number")) { subject % 2 == 0 } - -fun Assert.isMultipleOf(base: Int) = addAssertion(_isMultipleOf(this, base)) - -fun _isMultipleOf(plant: AssertionPlant, base: Int): Assertion = - AssertImpl.builder.createDescriptive(plant, DescriptionIntAssertions.IS_MULTIPLE_OF, base) { it % base == 0 } - -enum class DescriptionIntAssertions(override val value: String) : StringBasedTranslatable { - IS_MULTIPLE_OF("is multiple of") -} diff --git a/misc/deprecated/bundles/cc-en_GB-robstoll/atrium-cc-en_GB-robstoll-js/build.gradle b/misc/deprecated/bundles/cc-en_GB-robstoll/atrium-cc-en_GB-robstoll-js/build.gradle deleted file mode 100644 index f7b0489ad..000000000 --- a/misc/deprecated/bundles/cc-en_GB-robstoll/atrium-cc-en_GB-robstoll-js/build.gradle +++ /dev/null @@ -1,17 +0,0 @@ -description = 'Represents a convenience module which merely bundles dependencies for the JS platform.' - -dependencies { - api prefixedProject('verbs-js') - api prefixedProject('api-cc-en_GB-js') - api prefixedProject('translations-en_GB-js') - api prefixedProject('domain-builders-js') - api prefixedProject('domain-api-js') - api prefixedProject('core-api-js') - - //TODO should be runtimeOnly but due to https://youtrack.jetbrains.com/issue/KT-27797 it cannot be - implementation prefixedProject('domain-robstoll-js') - implementation prefixedProject('core-robstoll-js') - - // here to ease migration; so that ReplaceWith of @Deprecated works - api prefixedProject('api-fluent-en_GB-js') -} diff --git a/misc/deprecated/bundles/cc-en_GB-robstoll/atrium-cc-en_GB-robstoll-js/src/main/kotlin/ch/tutteli/atrium/cc/en_GB/robstoll/dependOnMe.kt b/misc/deprecated/bundles/cc-en_GB-robstoll/atrium-cc-en_GB-robstoll-js/src/main/kotlin/ch/tutteli/atrium/cc/en_GB/robstoll/dependOnMe.kt deleted file mode 100644 index 7adb4e161..000000000 --- a/misc/deprecated/bundles/cc-en_GB-robstoll/atrium-cc-en_GB-robstoll-js/src/main/kotlin/ch/tutteli/atrium/cc/en_GB/robstoll/dependOnMe.kt +++ /dev/null @@ -1,17 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION") -package ch.tutteli.atrium.cc.en_GB.robstoll - -import ch.tutteli.atrium.core.robstoll.dependOn_atrium_core_robstoll -import ch.tutteli.atrium.domain.robstoll.dependOn_atrium_domain_robstoll - -/** - * Dummy function in order that other modules can define a dependency on atrium-cc-en_GB-robstoll-js - * - * Moreover it has the side effect that a dependency on core-robstoll and domain-robstoll is established. - * This is necessary, as it has only a loosely coupled dependency (via serviceLoader). - */ -fun dependOnAtrium() { - dependOn_atrium_core_robstoll() - dependOn_atrium_domain_robstoll() -} diff --git a/misc/deprecated/bundles/cc-en_GB-robstoll/atrium-cc-en_GB-robstoll-js/src/test/kotlin/testSetup.kt b/misc/deprecated/bundles/cc-en_GB-robstoll/atrium-cc-en_GB-robstoll-js/src/test/kotlin/testSetup.kt deleted file mode 100644 index 3d861a1e7..000000000 --- a/misc/deprecated/bundles/cc-en_GB-robstoll/atrium-cc-en_GB-robstoll-js/src/test/kotlin/testSetup.kt +++ /dev/null @@ -1,4 +0,0 @@ -import ch.tutteli.atrium.cc.en_GB.robstoll.dependOnAtrium - -@Suppress("unused") -private val establishDependencyToAtrium = dependOnAtrium() diff --git a/misc/deprecated/bundles/cc-en_GB-robstoll/atrium-cc-en_GB-robstoll-jvm/build.gradle b/misc/deprecated/bundles/cc-en_GB-robstoll/atrium-cc-en_GB-robstoll-jvm/build.gradle deleted file mode 100644 index 6d13e86d2..000000000 --- a/misc/deprecated/bundles/cc-en_GB-robstoll/atrium-cc-en_GB-robstoll-jvm/build.gradle +++ /dev/null @@ -1,21 +0,0 @@ -description = 'Represents a convenience module which merely bundles dependencies for the JVM platform.' - -dependencies { - api prefixedProject('verbs-jvm') - api prefixedProject('api-cc-en_GB-jvm') - api prefixedProject('translations-en_GB-jvm') - api prefixedProject('domain-builders-jvm') - api prefixedProject('domain-api-jvm') - api prefixedProject('core-api-jvm') - - runtimeOnly prefixedProject('domain-robstoll-jvm') - runtimeOnly prefixedProject('core-robstoll-jvm') - - // here to ease migration; so that ReplaceWith of @Deprecated works - api prefixedProject('api-fluent-en_GB-jvm') -} - -//TODO should not be necessary https://youtrack.jetbrains.com/issue/KT-28124 -compileKotlin.dependsOn( - prefixedProject('domain-robstoll-jvm').jar -) diff --git a/misc/deprecated/bundles/cc-en_GB-robstoll/atrium-cc-en_GB-robstoll-jvm/src/module/module-info.java b/misc/deprecated/bundles/cc-en_GB-robstoll/atrium-cc-en_GB-robstoll-jvm/src/module/module-info.java deleted file mode 100644 index 975108a7b..000000000 --- a/misc/deprecated/bundles/cc-en_GB-robstoll/atrium-cc-en_GB-robstoll-jvm/src/module/module-info.java +++ /dev/null @@ -1,7 +0,0 @@ -module ch.tutteli.atrium.bundle.cc.en_GB.robstoll { - requires transitive ch.tutteli.atrium.verbs; - requires transitive ch.tutteli.atrium.api.cc.en_GB; - requires transitive ch.tutteli.atrium.domain.builders; - requires transitive ch.tutteli.atrium.translations.en_GB; - requires kotlin.stdlib; -} diff --git a/misc/deprecated/bundles/cc-en_GB-robstoll/atrium-cc-en_GB-robstoll-jvm/src/test/kotlin/custom/SmokeSpec.kt b/misc/deprecated/bundles/cc-en_GB-robstoll/atrium-cc-en_GB-robstoll-jvm/src/test/kotlin/custom/SmokeSpec.kt deleted file mode 100644 index 8301ecd26..000000000 --- a/misc/deprecated/bundles/cc-en_GB-robstoll/atrium-cc-en_GB-robstoll-jvm/src/test/kotlin/custom/SmokeSpec.kt +++ /dev/null @@ -1,44 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") -package custom - -import ch.tutteli.atrium.api.cc.en_GB.toBe -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.domain.builders.AssertImpl -import ch.tutteli.atrium.reporting.Text -import ch.tutteli.atrium.reporting.translating.StringBasedTranslatable -import ch.tutteli.atrium.translations.DescriptionBasic -import ch.tutteli.atrium.verbs.assertThat -import org.jetbrains.spek.api.Spek - -//TODO remove with 1.0.0 - no need to migrate to Spek2 -@Suppress("DEPRECATION") -object SmokeSpec : Spek({ - test("see if `toBe` can be used") { - assertThat(1).toBe(1) - } - - test("see if own assertion function without i18n can be used"){ - assertThat(2).isEven() - } - - test("see if own assertion function with i18n can be used") { - assertThat(4).isMultipleOf(2) - } -}) - -@Suppress("DEPRECATION") -fun Assert.isEven() - = createAndAddAssertion(DescriptionBasic.IS, Text("an even number")) { subject % 2 == 0 } - -fun Assert.isMultipleOf(base: Int) - = addAssertion(_isMultipleOf(this, base)) - -fun _isMultipleOf(plant: AssertionPlant, base: Int): Assertion - = AssertImpl.builder.createDescriptive(plant, DescriptionIntAssertions.IS_MULTIPLE_OF, base) { it % base == 0 } - -enum class DescriptionIntAssertions(override val value: String) : StringBasedTranslatable { - IS_MULTIPLE_OF("is multiple of") -} diff --git a/misc/deprecated/bundles/cc-en_GB-robstoll/atrium-cc-en_GB-robstoll-smoke-test/src/test/kotlin/module-info.java b/misc/deprecated/bundles/cc-en_GB-robstoll/atrium-cc-en_GB-robstoll-smoke-test/src/test/kotlin/module-info.java deleted file mode 100644 index 1e8c09408..000000000 --- a/misc/deprecated/bundles/cc-en_GB-robstoll/atrium-cc-en_GB-robstoll-smoke-test/src/test/kotlin/module-info.java +++ /dev/null @@ -1,9 +0,0 @@ -module ch.tutteli.atrium.bundle.cc.en_GB.smoke { - // test dependencies are usually defined in build.gradle via --patch-module but that's quite cumbersome and I did - // not get it running in 10 minutes so I am using this, the effect should be the same, the kotlin compiler checks if - // I am using symbols from packages I do not require etc. - - requires ch.tutteli.atrium.bundle.cc.en_GB.robstoll; - requires kotlin.stdlib; - requires spek.api; -} diff --git a/misc/deprecated/bundles/cc-infix-en_GB-robstoll/atrium-cc-infix-en_GB-robstoll-common/build.gradle b/misc/deprecated/bundles/cc-infix-en_GB-robstoll/atrium-cc-infix-en_GB-robstoll-common/build.gradle deleted file mode 100644 index aede0df06..000000000 --- a/misc/deprecated/bundles/cc-infix-en_GB-robstoll/atrium-cc-infix-en_GB-robstoll-common/build.gradle +++ /dev/null @@ -1,16 +0,0 @@ -description = 'Represents a convenience module which merely bundles dependencies as common module.' - -dependencies { - api prefixedProject('verbs-common') - api prefixedProject('api-cc-infix-en_GB-common') - api prefixedProject('translations-en_GB-common') - api prefixedProject('domain-builders-common') - api prefixedProject('domain-api-common') - api prefixedProject('core-api-common') - - runtimeOnly prefixedProject('domain-robstoll-common') - runtimeOnly prefixedProject('core-robstoll-common') - - // here to ease migration; so that ReplaceWith of @Deprecated works - api prefixedProject('api-infix-en_GB-common') -} diff --git a/misc/deprecated/bundles/cc-infix-en_GB-robstoll/atrium-cc-infix-en_GB-robstoll-common/src/test/kotlin/SmokeTest.kt b/misc/deprecated/bundles/cc-infix-en_GB-robstoll/atrium-cc-infix-en_GB-robstoll-common/src/test/kotlin/SmokeTest.kt deleted file mode 100644 index e71b16387..000000000 --- a/misc/deprecated/bundles/cc-infix-en_GB-robstoll/atrium-cc-infix-en_GB-robstoll-common/src/test/kotlin/SmokeTest.kt +++ /dev/null @@ -1,69 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") - -import ch.tutteli.atrium.api.cc.infix.en_GB.* -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.domain.builders.AssertImpl -import ch.tutteli.atrium.reporting.Text -import ch.tutteli.atrium.reporting.translating.StringBasedTranslatable -import ch.tutteli.atrium.translations.DescriptionBasic -import ch.tutteli.atrium.verbs.assert -import kotlin.test.Test - -class SmokeTest { - @Test - fun toBe_canBeUsed() { - assert(1) toBe 1 - } - - @Test - fun assertionFunctionWithoutI18nCanBeUsed() { - assert(2) tobe even - } - - @Test - fun assertionFunctionWithI18nCanBeUsed() { - assert(4) isMultipleOf 2 - } - - @Test - fun assertAnExceptionOccurred() { - assert { - throw IllegalArgumentException() - }.toThrow {} - } - - @Test - fun assertAnExceptionWithAMessageOccurred() { - assert { - throw IllegalArgumentException("oho... hello btw") - }.toThrow { - o messageContains "hello" - } - } - - @Test - fun assertNotToThrow() { - assert { - - }.notToThrow() - } -} - -@Suppress("ClassName") -object even - -@Suppress("DEPRECATION") -infix fun Assert.tobe(@Suppress("UNUSED_PARAMETER") even: even) = - createAndAddAssertion(DescriptionBasic.IS, Text("an even number")) { subject % 2 == 0 } - -infix fun Assert.isMultipleOf(base: Int) = addAssertion(_isMultipleOf(this, base)) - -fun _isMultipleOf(plant: AssertionPlant, base: Int): Assertion = - AssertImpl.builder.createDescriptive(plant, DescriptionIntAssertions.IS_MULTIPLE_OF, base) { it % base == 0 } - -enum class DescriptionIntAssertions(override val value: String) : StringBasedTranslatable { - IS_MULTIPLE_OF("is multiple of") -} diff --git a/misc/deprecated/bundles/cc-infix-en_GB-robstoll/atrium-cc-infix-en_GB-robstoll-js/build.gradle b/misc/deprecated/bundles/cc-infix-en_GB-robstoll/atrium-cc-infix-en_GB-robstoll-js/build.gradle deleted file mode 100644 index 6097aa6f1..000000000 --- a/misc/deprecated/bundles/cc-infix-en_GB-robstoll/atrium-cc-infix-en_GB-robstoll-js/build.gradle +++ /dev/null @@ -1,17 +0,0 @@ -description = 'Represents a convenience module which merely bundles dependencies for the JS platform.' - -dependencies { - api prefixedProject('verbs-js') - api prefixedProject('api-cc-infix-en_GB-js') - api prefixedProject('translations-en_GB-js') - api prefixedProject('domain-builders-js') - api prefixedProject('domain-api-js') - api prefixedProject('core-api-js') - - //TODO should be runtimeOnly but due to https://youtrack.jetbrains.com/issue/KT-27797 it cannot be - implementation prefixedProject('domain-robstoll-js') - implementation prefixedProject('core-robstoll-js') - - // here to ease migration; so that ReplaceWith of @Deprecated works - api prefixedProject('api-infix-en_GB-js') -} diff --git a/misc/deprecated/bundles/cc-infix-en_GB-robstoll/atrium-cc-infix-en_GB-robstoll-js/src/main/kotlin/ch/tutteli/atrium/cc/infix/en_GB/robstoll/dependOnMe.kt b/misc/deprecated/bundles/cc-infix-en_GB-robstoll/atrium-cc-infix-en_GB-robstoll-js/src/main/kotlin/ch/tutteli/atrium/cc/infix/en_GB/robstoll/dependOnMe.kt deleted file mode 100644 index c82a36ca4..000000000 --- a/misc/deprecated/bundles/cc-infix-en_GB-robstoll/atrium-cc-infix-en_GB-robstoll-js/src/main/kotlin/ch/tutteli/atrium/cc/infix/en_GB/robstoll/dependOnMe.kt +++ /dev/null @@ -1,17 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION") -package ch.tutteli.atrium.cc.infix.en_GB.robstoll - -import ch.tutteli.atrium.core.robstoll.dependOn_atrium_core_robstoll -import ch.tutteli.atrium.domain.robstoll.dependOn_atrium_domain_robstoll - -/** - * dummy function in order that other modules can define a dependency on atrium-cc-infix-en_GB-robstoll-js - * - * Moreover it has the side effect that a dependency on core-robstoll and domain-robstoll is established. - * This is necessary, as it has only a loosely coupled dependency (via serviceLoader). - */ -fun dependOnAtrium() { - dependOn_atrium_core_robstoll() - dependOn_atrium_domain_robstoll() -} diff --git a/misc/deprecated/bundles/cc-infix-en_GB-robstoll/atrium-cc-infix-en_GB-robstoll-js/src/test/kotlin/testSetup.kt b/misc/deprecated/bundles/cc-infix-en_GB-robstoll/atrium-cc-infix-en_GB-robstoll-js/src/test/kotlin/testSetup.kt deleted file mode 100644 index d6f47fc70..000000000 --- a/misc/deprecated/bundles/cc-infix-en_GB-robstoll/atrium-cc-infix-en_GB-robstoll-js/src/test/kotlin/testSetup.kt +++ /dev/null @@ -1,4 +0,0 @@ -import ch.tutteli.atrium.cc.infix.en_GB.robstoll.dependOnAtrium - -@Suppress("unused") -private val establishDependencyToAtrium = dependOnAtrium() diff --git a/misc/deprecated/bundles/cc-infix-en_GB-robstoll/atrium-cc-infix-en_GB-robstoll-jvm/build.gradle b/misc/deprecated/bundles/cc-infix-en_GB-robstoll/atrium-cc-infix-en_GB-robstoll-jvm/build.gradle deleted file mode 100644 index 101533801..000000000 --- a/misc/deprecated/bundles/cc-infix-en_GB-robstoll/atrium-cc-infix-en_GB-robstoll-jvm/build.gradle +++ /dev/null @@ -1,21 +0,0 @@ -description = 'Represents a convenience module which merely bundles dependencies for the JVM platform.' - -dependencies { - api prefixedProject('verbs-jvm') - api prefixedProject('api-cc-infix-en_GB-jvm') - api prefixedProject('translations-en_GB-jvm') - api prefixedProject('domain-builders-jvm') - api prefixedProject('domain-api-jvm') - api prefixedProject('core-api-jvm') - - runtimeOnly prefixedProject('domain-robstoll-jvm') - runtimeOnly prefixedProject('core-robstoll-jvm') - - // here to ease migration; so that ReplaceWith of @Deprecated works - api prefixedProject('api-infix-en_GB-jvm') -} - -//TODO should not be necessary https://youtrack.jetbrains.com/issue/KT-28124 -compileKotlin.dependsOn( - prefixedProject('domain-robstoll-jvm').compileKotlin -) diff --git a/misc/deprecated/bundles/cc-infix-en_GB-robstoll/atrium-cc-infix-en_GB-robstoll-jvm/src/module/module-info.java b/misc/deprecated/bundles/cc-infix-en_GB-robstoll/atrium-cc-infix-en_GB-robstoll-jvm/src/module/module-info.java deleted file mode 100644 index 6d50a3d47..000000000 --- a/misc/deprecated/bundles/cc-infix-en_GB-robstoll/atrium-cc-infix-en_GB-robstoll-jvm/src/module/module-info.java +++ /dev/null @@ -1,7 +0,0 @@ -module ch.tutteli.atrium.bundle.cc.infix.en_GB.robstoll { - requires transitive ch.tutteli.atrium.verbs; - requires transitive ch.tutteli.atrium.api.cc.infix.en_GB; - requires transitive ch.tutteli.atrium.domain.builders; - requires transitive ch.tutteli.atrium.translations.en_GB; - requires kotlin.stdlib; -} diff --git a/misc/deprecated/bundles/cc-infix-en_GB-robstoll/atrium-cc-infix-en_GB-robstoll-jvm/src/test/kotlin/custom/SmokeSpec.kt b/misc/deprecated/bundles/cc-infix-en_GB-robstoll/atrium-cc-infix-en_GB-robstoll-jvm/src/test/kotlin/custom/SmokeSpec.kt deleted file mode 100644 index 65f4866c4..000000000 --- a/misc/deprecated/bundles/cc-infix-en_GB-robstoll/atrium-cc-infix-en_GB-robstoll-jvm/src/test/kotlin/custom/SmokeSpec.kt +++ /dev/null @@ -1,46 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") - -package custom - -import ch.tutteli.atrium.api.cc.infix.en_GB.toBe -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.domain.builders.AssertImpl -import ch.tutteli.atrium.reporting.Text -import ch.tutteli.atrium.reporting.translating.StringBasedTranslatable -import ch.tutteli.atrium.translations.DescriptionBasic -import ch.tutteli.atrium.verbs.expect -import org.jetbrains.spek.api.Spek - -//TODO remove with 1.0.0 - no need to migrate to Spek2 -object SmokeSpec : Spek({ - test("see if `toBe` can be used") { - expect(1) toBe 1 - } - - test("see if own assertion function without i18n can be used") { - expect(2) tobe even - } - - test("see if own assertion function with i18n can be used") { - expect(4) isMultipleOf 2 - } -}) - -@Suppress("ClassName") -object even - -@Suppress("DEPRECATION") -infix fun Assert.tobe(@Suppress("UNUSED_PARAMETER") even: even) = - createAndAddAssertion(DescriptionBasic.IS, Text("an even number")) { subject % 2 == 0 } - -infix fun Assert.isMultipleOf(base: Int) = addAssertion(_isMultipleOf(this, base)) - -fun _isMultipleOf(plant: AssertionPlant, base: Int): Assertion = - AssertImpl.builder.createDescriptive(plant, DescriptionIntAssertions.IS_MULTIPLE_OF, base) { it % base == 0 } - -enum class DescriptionIntAssertions(override val value: String) : StringBasedTranslatable { - IS_MULTIPLE_OF("is multiple of") -} diff --git a/misc/deprecated/bundles/cc-infix-en_GB-robstoll/atrium-cc-infix-en_GB-robstoll-smoke-test/src/test/kotlin/module-info.java b/misc/deprecated/bundles/cc-infix-en_GB-robstoll/atrium-cc-infix-en_GB-robstoll-smoke-test/src/test/kotlin/module-info.java deleted file mode 100644 index a35ffc7c3..000000000 --- a/misc/deprecated/bundles/cc-infix-en_GB-robstoll/atrium-cc-infix-en_GB-robstoll-smoke-test/src/test/kotlin/module-info.java +++ /dev/null @@ -1,9 +0,0 @@ -module ch.tutteli.atrium.bundle.cc.infix.en_GB.smoke { - // test dependencies are usually defined in build.gradle via --patch-module but that's quite cumbersome and I did - // not get it running in 10 minutes so I am using this, the effect should be the same, the kotlin compiler checks if - // I am using symbols from packages I do not require etc. - - requires ch.tutteli.atrium.bundle.cc.infix.en_GB.robstoll; - requires kotlin.stdlib; - requires spek.api; -} diff --git a/misc/deprecated/core/atrium-core-api-deprecated/build.gradle b/misc/deprecated/core/atrium-core-api-deprecated/build.gradle deleted file mode 100644 index 209927341..000000000 --- a/misc/deprecated/core/atrium-core-api-deprecated/build.gradle +++ /dev/null @@ -1,5 +0,0 @@ -description = 'Contains the deprecated IAtriumFactory' - -dependencies { - api prefixedProject('core-api-jvm') -} diff --git a/misc/deprecated/core/atrium-core-api-deprecated/src/main/kotlin/ch/tutteli/atrium/IAtriumFactory.kt b/misc/deprecated/core/atrium-core-api-deprecated/src/main/kotlin/ch/tutteli/atrium/IAtriumFactory.kt deleted file mode 100644 index 73d325f26..000000000 --- a/misc/deprecated/core/atrium-core-api-deprecated/src/main/kotlin/ch/tutteli/atrium/IAtriumFactory.kt +++ /dev/null @@ -1,573 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0 */) -package ch.tutteli.atrium - -import ch.tutteli.atrium.assertions.* -import ch.tutteli.atrium.checking.AssertionChecker -import ch.tutteli.atrium.core.CoreFactory -import ch.tutteli.atrium.creating.* -import ch.tutteli.atrium.reporting.* -import ch.tutteli.atrium.reporting.translating.LocaleOrderDecider -import ch.tutteli.atrium.reporting.translating.Translatable -import ch.tutteli.atrium.reporting.translating.TranslationSupplier -import ch.tutteli.atrium.reporting.translating.Translator -import java.util.* - -/** - * Deprecated, use `AssertImpl.coreFactory` instead which delegates to an implementation of [CoreFactory]; will be removed with 1.0.0 - */ -@Deprecated( - "Use AssertImpl.coreFactory instead; will be removed with 1.0.0", - ReplaceWith("AssertImpl.coreFactory", "ch.tutteli.atrium.domain.builders.AssertImpl") -) -interface IAtriumFactory { - - /** - * Creates a [ReportingAssertionPlant] which checks and reports added [Assertion]s. - * - * It creates a [newThrowingAssertionChecker] based on the given [reporter] for assertion checking. - * - * @param assertionVerb The assertion verb which will be used inter alia in reporting - * (see [AssertionPlantWithCommonFields.CommonFields.assertionVerb]). - * @param subject The subject for which this plant will create/check [Assertion]s. - * (see [BaseAssertionPlant.subject]). - * @param reporter The reporter which will be used for a [newThrowingAssertionChecker]. - * - * @return The newly created assertion plant. - */ - @Deprecated( - "Use AssertImpl.coreFactory instead; will be removed with 1.0.0", - ReplaceWith( - "AssertImpl.coreFactory.newReportingPlant(assertionVerb, { subject }, reporter)", - "ch.tutteli.atrium.domain.builders.AssertImpl" - ) - ) - fun newReportingPlant(assertionVerb: Translatable, subject: T, reporter: Reporter): ReportingAssertionPlant - = newReportingPlant(assertionVerb, subject, newThrowingAssertionChecker(reporter)) - - /** - * Creates a [ReportingAssertionPlant] which checks and reports added [Assertion]s. - * - * It uses the given [assertionChecker] for assertion checking. - * - * @param assertionVerb The assertion verb which will be used inter alia in reporting - * (see [AssertionPlantWithCommonFields.CommonFields.assertionVerb]). - * @param subject The subject for which this plant will create/check [Assertion]s. - * (see [BaseAssertionPlant.subject]). - * @param assertionChecker The checker which will be used to check [Assertion]s. - * (see [AssertionPlantWithCommonFields.CommonFields.assertionChecker]). - * - * @return The newly created assertion plant. - */ - @Deprecated( - "Use AssertImpl.coreFactory instead; will be removed with 1.0.0", - ReplaceWith( - "AssertImpl.coreFactory.newReportingPlant(assertionVerb, { subject }, assertionChecker)", - "ch.tutteli.atrium.domain.builders.AssertImpl" - ) - ) - fun newReportingPlant(assertionVerb: Translatable, subject: T, assertionChecker: AssertionChecker): ReportingAssertionPlant - = newReportingPlant(AssertionPlantWithCommonFields.CommonFields(assertionVerb, subject, assertionChecker, RawString.NULL)) - - /** - * Creates a [ReportingAssertionPlant] which checks and reports added [Assertion]s. - * - * It uses the [AssertionPlantWithCommonFields.CommonFields.assertionChecker] of the given [commonFields] for - * assertion checking. - * - * @param commonFields The commonFields for the new assertion plant. - * - * @return The newly created assertion plant. - */ - @Deprecated( - "Use AssertImpl.coreFactory instead; will be removed with 1.0.0", - ReplaceWith( - "AssertImpl.coreFactory.newReportingPlant(commonFields)", - "ch.tutteli.atrium.domain.builders.AssertImpl" - ) - ) - fun newReportingPlant(commonFields: AssertionPlantWithCommonFields.CommonFields): ReportingAssertionPlant - - - /** - * Creates a [ReportingAssertionPlant] which [AssertionPlant.addAssertionsCreatedBy] the - * given [assertionCreator] lambda where the created [Assertion]s are added as a group and usually (depending on - * the configured [Reporter]) reported as a whole. - * - * It creates a [IAtriumFactory.newThrowingAssertionChecker] based on the given [reporter] for assertion checking. - * - * @param assertionVerb The assertion verb which will be used inter alia in reporting - * (see [AssertionPlantWithCommonFields.CommonFields.assertionVerb]). - * @param subject The subject for which this plant will create/check [Assertion]s. - * (see [BaseAssertionPlant.subject]). - * @param reporter The reporter which will be used for a [newThrowingAssertionChecker]. - * @param assertionCreator The - * - * @return The newly created [AssertionPlant] which can be used to postulate further assertions. - * - * @throws AssertionError The newly created [AssertionPlant] might throw an [AssertionError] in case a - * created [Assertion] does not hold. - */ - @Deprecated( - "Use AssertImpl.coreFactory instead; will be removed with 1.0.0", - ReplaceWith( - "AssertImpl.coreFactory.newReportingPlantAndAddAssertionsCreatedBy(assertionVerb, { subject }, reporter, assertionCreator)", - "ch.tutteli.atrium.domain.builders.AssertImpl" - ) - ) - fun newReportingPlantAndAddAssertionsCreatedBy(assertionVerb: Translatable, subject: T, reporter: Reporter, assertionCreator: AssertionPlant.() -> Unit) - = newReportingPlant(assertionVerb, subject, reporter) - .addAssertionsCreatedBy(assertionCreator) - - - /** - * Creates a [ReportingAssertionPlantNullable] which is the entry point for assertions about nullable types. - * - * It creates a [newThrowingAssertionChecker] based on the given [reporter] for assertion checking. - * - * @param assertionVerb The assertion verb which will be used inter alia in reporting - * (see [AssertionPlantWithCommonFields.CommonFields.assertionVerb]). - * @param subject The subject for which this plant will create/check [Assertion]s. - * (see [BaseAssertionPlant.subject]). - * @param reporter The reporter which will be used for a [newThrowingAssertionChecker]. - * - * @return The newly created assertion plant. - */ - @Deprecated( - "Use AssertImpl.coreFactory instead; will be removed with 1.0.0", - ReplaceWith( - "AssertImpl.coreFactory.newReportingPlantNullable(assertionVerb, { subject }, reporter, nullRepresentation)", - "ch.tutteli.atrium.domain.builders.AssertImpl" - ) - ) - fun newReportingPlantNullable(assertionVerb: Translatable, subject: T, reporter: Reporter, nullRepresentation: Any = RawString.NULL): ReportingAssertionPlantNullable - = newReportingPlantNullable(assertionVerb, subject, newThrowingAssertionChecker(reporter), nullRepresentation) - - /** - * Creates a [ReportingAssertionPlantNullable] which is the entry point for assertions about nullable types. - * - * It uses the given [assertionChecker] for assertion checking. - * - * @param assertionVerb The assertion verb which will be used inter alia in reporting - * (see [AssertionPlantWithCommonFields.CommonFields.assertionVerb]). - * @param subject The subject for which this plant will create/check [Assertion]s. - * (see [BaseAssertionPlant.subject]). - * @param assertionChecker The checker which will be used to check [Assertion]s. - * (see [AssertionPlantWithCommonFields.CommonFields.assertionChecker]). - * - * @return The newly created assertion plant. - */ - @Deprecated( - "Use AssertImpl.coreFactory instead; will be removed with 1.0.0", - ReplaceWith( - "AssertImpl.coreFactory.newReportingPlantNullable(assertionVerb, { subject }, assertionChecker, nullRepresentation)", - "ch.tutteli.atrium.domain.builders.AssertImpl" - ) - ) - fun newReportingPlantNullable(assertionVerb: Translatable, subject: T, assertionChecker: AssertionChecker, nullRepresentation: Any): ReportingAssertionPlantNullable - = newReportingPlantNullable(AssertionPlantWithCommonFields.CommonFields(assertionVerb, subject, assertionChecker, nullRepresentation)) - - /** - * Creates a [ReportingAssertionPlantNullable] which is the entry point for assertions about nullable types. - * - * It uses the [AssertionPlantWithCommonFields.CommonFields.assertionChecker] of the given [commonFields] for - * assertion checking. - * - * @param commonFields The commonFields for the new assertion plant. - * - * @return The newly created assertion plant. - */ - @Deprecated( - "Use AssertImpl.coreFactory instead; will be removed with 1.0.0", - ReplaceWith( - "AssertImpl.coreFactory.newReportingPlantNullable(commonFields)", - "ch.tutteli.atrium.domain.builders.AssertImpl" - ) - ) - fun newReportingPlantNullable(commonFields: AssertionPlantWithCommonFields.CommonFields): ReportingAssertionPlantNullable - - /** - * Creates a [CheckingAssertionPlant] which provides a method to check whether - * [allAssertionsHold][CheckingAssertionPlant.allAssertionsHold]. - * - * @param subject The subject for which this plant will create [Assertion]s. - * - * @return The newly created assertion plant. - */ - @Deprecated( - "Use AssertImpl.coreFactory instead; will be removed with 1.0.0", - ReplaceWith( - "AssertImpl.coreFactory.newCheckingPlant({ subject })", - "ch.tutteli.atrium.domain.builders.AssertImpl" - ) - ) - fun newCheckingPlant(subject: T): CheckingAssertionPlant - - /** - * Creates a [CollectingAssertionPlant] which is intended to be used as receiver object in lambdas to collect - * created [Assertion]s inside the lambda. - * - * Notice, that this [AssertionPlant] might not even provide a [AssertionPlant.subject][SubjectProvider.subject] in which case it - * throws a [PlantHasNoSubjectException] if [subject][SubjectProvider.subject] is accessed. - * Use [newCheckingPlant] instead if you want to know whether the assertions hold. - * - * @param subjectProvider The function which will either provide the subject for this plant or throw an - * [PlantHasNoSubjectException] in case it cannot be provided. - * - * @return The newly created assertion plant. - */ - @Deprecated( - "Use AssertImpl.coreFactory instead; will be removed with 1.0.0", - ReplaceWith( - "AssertImpl.coreFactory.newCollectingPlant(subjectProvider)", - "ch.tutteli.atrium.domain.builders.AssertImpl" - ) - ) - fun newCollectingPlant(subjectProvider: () -> T): CollectingAssertionPlant - - /** - * Creates an [AssertionChecker] which throws [AssertionError]s in case an assertion fails - * and uses the given [reporter] for reporting. - * - * @param reporter The reporter which is used to report [Assertion]s. - * - * @return The newly created assertion checker. - */ - @Deprecated( - "Use AssertImpl.coreFactory instead; will be removed with 1.0.0", - ReplaceWith( - "AssertImpl.coreFactory.newThrowingAssertionChecker(reporter)", - "ch.tutteli.atrium.domain.builders.AssertImpl" - ) - ) - fun newThrowingAssertionChecker(reporter: Reporter): AssertionChecker - - /** - * Creates an [AssertionChecker] which creates an [AssertionGroup] of [type][AssertionGroup.type] - * [FeatureAssertionGroupType] instead of checking assertions and delegates this task to the given - * [subjectPlant] by adding (see [AssertionPlant.addAssertion]) the created assertion group to it. - * - * @param subjectPlant The assertion plant to which the created [AssertionGroup] of [type][AssertionGroup.type] - * [FeatureAssertionGroupType] will be [added][AssertionPlant.addAssertion]. - * - * @return The newly created assertion checker. - */ - @Deprecated( - "Use AssertImpl.coreFactory instead; will be removed with 1.0.0", - ReplaceWith( - "AssertImpl.coreFactory.newFeatureAssertionChecker(subjectPlant)", - "ch.tutteli.atrium.domain.builders.AssertImpl" - ) - ) - fun newFeatureAssertionChecker(subjectPlant: AssertionPlant): AssertionChecker - - - /** - * Creates an [AssertionChecker] which delegates the checking of [Assertion]s to the given [subjectPlant] - * by adding (see [AssertionPlant.addAssertion]) the assertions to the given [subjectPlant]. - * - * @param subjectPlant The assertion plant to which the [Assertion]s will be [added][AssertionPlant.addAssertion]. - * - * @return The newly created assertion checker. - */ - @Deprecated( - "Use AssertImpl.coreFactory instead; will be removed with 1.0.0", - ReplaceWith( - "AssertImpl.coreFactory.newDelegatingAssertionChecker(subjectPlant)", - "ch.tutteli.atrium.domain.builders.AssertImpl" - ) - ) - fun newDelegatingAssertionChecker(subjectPlant: BaseAssertionPlant): AssertionChecker - - - /** - * Creates a [MethodCallFormatter] which represents arguments of a method call by using their [Object.toString] - * representation with the exception of: - * - [CharSequence], is wrapped in quotes (`"`) and line breaks (CR or/and LF) are escaped so that the - * whole representation remains on one line. - * - [Char] is wrapped in apostrophes (`'`) - * - * @return The newly created method call formatter. - */ - @Deprecated( - "Use AssertImpl.coreFactory instead; will be removed with 1.0.0", - ReplaceWith( - "AssertImpl.coreFactory.newMethodCallFormatter()", - "ch.tutteli.atrium.domain.builders.AssertImpl" - ) - ) - fun newMethodCallFormatter(): MethodCallFormatter - - - /** - * Creates a [Translator] which translates [Translatable]s to [primaryLocale] and falls back - * to [fallbackLocales] (in the given order) in case no translation exists for [primaryLocale]. - * - * It uses the given [translationSupplier] to retrieve all available translations. - * In case no translation exists for a given property (neither for the [primaryLocale] nor for - * any [fallbackLocales]) then it uses [Translatable]'s [getDefault][Translatable.getDefault]. - * As consequence a [Translator] does not or rather should not support [Locale.ROOT] -- users are discouraged - * to define properties files for Locale.ROOT. - * An implementation based on [ResourceBundle] would still take Locale.ROOT into account but apply it before the - * defined [fallbackLocales] have been considered. - * - * Please refer to the documentation of [Translator] to see to which extend a translator has to be compatible - * with [ResourceBundle]. - * - * @param translationSupplier Provides the translations for a desired [Locale]. - * @param localeOrderDecider Decides in which order [Locale]s are processed to find a translation for a - * given [Translatable]. - * @param primaryLocale The [Locale] to which the translator translates per default. - * @param fallbackLocales Used in case a translation for a given [Translatable] is not defined for [primaryLocale] - * or one of its secondary alternatives -- the fallback [Locale]s are used in the given order. - * - * @return The newly created translator. - * - * @throws IllegalArgumentException in case [primaryLocale] or [fallbackLocales] have as language `no` or if they - * have: as language `zh`, country is not set and script is either `Hant` or `Hans`. - */ - @Deprecated( - "Use AssertImpl.coreFactory instead; will be removed with 1.0.0", - ReplaceWith( - "AssertImpl.coreFactory.newTranslator(translationSupplier, localeOrderDecider, primaryLocale, *fallbackLocales)", - "ch.tutteli.atrium.domain.builders.AssertImpl" - ) - ) - fun newTranslator(translationSupplier: TranslationSupplier, localeOrderDecider: LocaleOrderDecider, primaryLocale: Locale, vararg fallbackLocales: Locale): Translator - - /** - * Creates a [TranslationSupplier] which is based on properties and is compatible with [ResourceBundle] concerning - * the structure of the properties files. - * - * For instance, the translations for `ch.tutteli.atrium.DescriptionAnyAssertion` and the [Locale] `de_CH` are - * stored in a properties file named `DescriptionAnyAssertion_de_CH.properties` in the folder `/ch/tutteli/atrium/`. - * Moreover the files need to be encoded in ISO-8859-1 (restriction to be compatible with [ResourceBundle]). - * - * An entry in such a file would look like as follows: - * `TO_BE = a translation for TO_BE` - * - * @return The newly created translation supplier. - */ - @Deprecated( - "Use AssertImpl.coreFactory instead; will be removed with 1.0.0", - ReplaceWith( - "AssertImpl.coreFactory.newPropertiesBasedTranslationSupplier()", - "ch.tutteli.atrium.domain.builders.AssertImpl" - ) - ) - fun newPropertiesBasedTranslationSupplier(): TranslationSupplier - - /** - * Creates a [LocaleOrderDecider] which decides in which order [Locale]s are processed to find a translation for a - * given [Translatable]. - * - * Please refer to the documentation of [LocaleOrderDecider] to see to which extend a translator has to be - * compatible with [ResourceBundle]. - * - * @return The newly created [Locale] order decider. - */ - @Deprecated( - "Use AssertImpl.coreFactory instead; will be removed with 1.0.0", - ReplaceWith( - "AssertImpl.coreFactory.newLocaleOrderDecider()", - "ch.tutteli.atrium.domain.builders.AssertImpl" - ) - ) - fun newLocaleOrderDecider(): LocaleOrderDecider - - - /** - * Creates an [ObjectFormatter] which represents objects by using their [Object.toString] representation - * including [Class.name] and their [System.identityHashCode]. - * - * @return The newly created object formatter. - */ - @Deprecated( - "Use AssertImpl.coreFactory instead; will be removed with 1.0.0", - ReplaceWith( - "AssertImpl.coreFactory.newDetailedObjectFormatter(translator)", - "ch.tutteli.atrium.domain.builders.AssertImpl" - ) - ) - fun newDetailedObjectFormatter(translator: Translator): ObjectFormatter - - /** - * Creates an [AssertionFormatterController] which all be used per default for [newAssertionFormatterFacade]. - * - * @return The newly created assertion formatter controller. - */ - @Deprecated( - "Use AssertImpl.coreFactory instead; will be removed with 1.0.0", - ReplaceWith( - "AssertImpl.coreFactory.newAssertionFormatterController()", - "ch.tutteli.atrium.domain.builders.AssertImpl" - ) - ) - fun newAssertionFormatterController(): AssertionFormatterController - - /** - * Creates an [AssertionFormatterFacade] which shall be used per default for [newOnlyFailureReporter]. - * - * @param assertionFormatterController The [AssertionFormatterController] which shall be used for formatting. - * - * @return The newly created assertion formatter facade. - */ - @Deprecated( - "Use AssertImpl.coreFactory instead; will be removed with 1.0.0", - ReplaceWith( - "AssertImpl.coreFactory.newAssertionFormatterFacade(assertionFormatterController)", - "ch.tutteli.atrium.domain.builders.AssertImpl" - ) - ) - fun newAssertionFormatterFacade(assertionFormatterController: AssertionFormatterController): AssertionFormatterFacade - - /** - * Creates an [AssertionPairFormatter] which is intended for text output (e.g. for the console) and puts assertion - * pairs on the same line. - * - * @param objectFormatter The formatter which is used to format objects other than [Assertion]s. - * @param translator The translator which is used to translate [Translatable] such as [DescriptiveAssertion.description]. - * - * @return The newly created assertion formatter. - */ - @Deprecated( - "Use AssertImpl.coreFactory instead; will be removed with 1.0.0", - ReplaceWith( - "AssertImpl.coreFactory.newTextSameLineAssertionPairFormatter(objectFormatter, translator)", - "ch.tutteli.atrium.domain.builders.AssertImpl" - ) - ) - fun newTextSameLineAssertionPairFormatter(objectFormatter: ObjectFormatter, translator: Translator): AssertionPairFormatter - - /** - * Creates an [AssertionFormatter] which is intended for text output (e.g. for the console) and serves as - * fallback if no other formatter is able to format a given [Assertion]. - * - * Typically this includes the formatting of the [AssertionGroup] with a [RootAssertionGroupType]. - * - * @param bulletPoints The bullet points used in reporting; will typically use the bullet point registered - * for [RootAssertionGroupType] as prefix for each [Assertion] in [AssertionGroup.assertions]. - * @param assertionFormatterController The controller used to steer the flow of the reporting. - * @param objectFormatter The formatter which is used to format objects other than [Assertion]s. - * @param translator The translator which is used to translate [Translatable] such as [DescriptiveAssertion.description]. - * - * @return The newly created assertion formatter. - */ - @Deprecated( - "Use AssertImpl.coreFactory instead; will be removed with 1.0.0", - ReplaceWith( - "AssertImpl.coreFactory.newTextFallbackAssertionFormatter(bulletPoints, assertionFormatterController, objectFormatter, translator)", - "ch.tutteli.atrium.domain.builders.AssertImpl" - ) - ) - fun newTextFallbackAssertionFormatter(bulletPoints: Map, String>, assertionFormatterController: AssertionFormatterController, objectFormatter: ObjectFormatter, translator: Translator): AssertionFormatter - - /** - * Creates an [AssertionFormatter] which is intended for text output (e.g. for the console) and - * formats [AssertionGroup]s of type [FeatureAssertionGroupType]. - * - * @param bulletPoints The bullet points used in reporting; will typically use the bullet point registered - * for [PrefixFeatureAssertionGroupHeader] as prefix of the group header and [FeatureAssertionGroupType] as prefix - * for each [Assertion] in [AssertionGroup.assertions]. - * @param assertionFormatterController The controller used to steer the flow of the reporting. - * @param objectFormatter The formatter which is used to format objects other than [Assertion]s. - * @param translator The translator which is used to translate [Translatable] such as [DescriptiveAssertion.description]. - * - * @return The newly created assertion formatter. - */ - @Deprecated( - "Use AssertImpl.coreFactory instead; will be removed with 1.0.0", - ReplaceWith( - "AssertImpl.coreFactory.newTextFeatureAssertionGroupFormatter(bulletPoints, assertionFormatterController, objectFormatter, translator)", - "ch.tutteli.atrium.domain.builders.AssertImpl" - ) - ) - fun newTextFeatureAssertionGroupFormatter(bulletPoints: Map, String>, assertionFormatterController: AssertionFormatterController, objectFormatter: ObjectFormatter, translator: Translator): AssertionFormatter - - /** - * Creates an [AssertionFormatter] which is intended for text output (e.g. for the console) and - * formats [AssertionGroup]s of type [ListAssertionGroupType]. - * - * @param bulletPoints The bullet points used in reporting; will typically use the bullet point registered - * for [ListAssertionGroupType] as prefix for each [Assertion] in [AssertionGroup.assertions]. - * @param assertionFormatterController The controller used to steer the flow of the reporting. - * @param objectFormatter The formatter which is used to format objects other than [Assertion]s. - * @param translator The translator which is used to translate [Translatable] such as [DescriptiveAssertion.description]. - * - * @return The newly created assertion formatter. - */ - @Deprecated( - "Use AssertImpl.coreFactory instead; will be removed with 1.0.0", - ReplaceWith( - "AssertImpl.coreFactory.newTextListAssertionGroupFormatter(bulletPoints, assertionFormatterController, objectFormatter, translator)", - "ch.tutteli.atrium.domain.builders.AssertImpl" - ) - ) - fun newTextListAssertionGroupFormatter(bulletPoints: Map, String>, assertionFormatterController: AssertionFormatterController, objectFormatter: ObjectFormatter, translator: Translator): AssertionFormatter - - /** - * Creates an [AssertionFormatter] which is intended for text output (e.g. for the console) and - * formats [AssertionGroup]s of type [ExplanatoryAssertionGroupType] by creating an - * [AssertionFormatterParameterObject] which indicates that formatting its [AssertionGroup.assertions] happens within - * an explanatory assertion group. - * - * @param bulletPoints The bullet points used in reporting; will typically use the bullet point registered - * for [ExplanatoryAssertionGroupType] as prefix for each [Assertion] in [AssertionGroup.assertions]. - * @param assertionFormatterController The controller used to steer the flow of the reporting. - * - * @return The newly created assertion formatter. - */ - @Deprecated( - "Use AssertImpl.coreFactory instead; will be removed with 1.0.0", - ReplaceWith( - "AssertImpl.coreFactory.newTextExplanatoryAssertionGroupFormatter(bulletPoints, assertionFormatterController)", - "ch.tutteli.atrium.domain.builders.AssertImpl" - ) - ) - fun newTextExplanatoryAssertionGroupFormatter(bulletPoints: Map, String>, assertionFormatterController: AssertionFormatterController): AssertionFormatter - - /** - * Registers all available [AssertionFormatter]s -- which are intended for text format (e.g. for the console) - * -- to the given [assertionFormatterFacade] using the given [textAssertionPairFormatter]. - * - * Should at least support [RootAssertionGroupType], [FeatureAssertionGroupType], [ListAssertionGroupType], - * [SummaryAssertionGroupType] and [ExplanatoryAssertionGroupType] (see [AssertionGroupBuilder]). - * - * @param bulletPoints The bullet points used in reporting to prefix each [Assertion] in - * [AssertionGroup.assertions]. - * @param assertionFormatterFacade The [AssertionFormatterFacade] to which all [AssertionFormatter]s with text - * reporting capabilities should be registered. - * @param textAssertionPairFormatter An [AssertionPairFormatter] which is intended for text format. - * @param objectFormatter The formatter which is used to format objects other than [Assertion]s. - * @param translator The translator which is used to translate [Translatable] such as [DescriptiveAssertion.description]. - */ - @Deprecated( - "Use AssertImpl.coreFactory instead; will be removed with 1.0.0", - ReplaceWith( - "AssertImpl.coreFactory.registerTextAssertionFormatterCapabilities(bulletPoints, assertionFormatterController, textAssertionPairFormatter, objectFormatter, translator)", - "ch.tutteli.atrium.domain.builders.AssertImpl" - ) - ) - fun registerTextAssertionFormatterCapabilities( - bulletPoints: Map, String>, - assertionFormatterFacade: AssertionFormatterFacade, - textAssertionPairFormatter: AssertionPairFormatter, - objectFormatter: ObjectFormatter, - translator: Translator) - - /** - * Creates a [Reporter] which reports only failing assertions - * and uses the given [assertionFormatterFacade] to format assertions and messages. - * - * @param assertionFormatterFacade The formatter which is used to format [Assertion]s. - * - * @return The newly created reporter. - */ - @Deprecated( - "Use AssertImpl.coreFactory instead; will be removed with 1.0.0", - ReplaceWith( - "AssertImpl.coreFactory.newOnlyFailureReporter(assertionFormatterFacade)", - "ch.tutteli.atrium.domain.builders.AssertImpl" - ) - ) - fun newOnlyFailureReporter(assertionFormatterFacade: AssertionFormatterFacade): Reporter -} diff --git a/misc/deprecated/core/atrium-core-robstoll-deprecated/build.gradle b/misc/deprecated/core/atrium-core-robstoll-deprecated/build.gradle deleted file mode 100644 index 67e53cc7d..000000000 --- a/misc/deprecated/core/atrium-core-robstoll-deprecated/build.gradle +++ /dev/null @@ -1,7 +0,0 @@ -description = 'Contains the deprecated AtriumFactory' - -dependencies { - api prefixedProject('core-api-deprecated') - api prefixedProject('core-api-jvm') - implementation prefixedProject('core-robstoll-lib-jvm') -} diff --git a/misc/deprecated/core/atrium-core-robstoll-deprecated/src/main/kotlin/ch/tutteli/atrium/AtriumFactory.kt b/misc/deprecated/core/atrium-core-robstoll-deprecated/src/main/kotlin/ch/tutteli/atrium/AtriumFactory.kt deleted file mode 100644 index ad3a25ad1..000000000 --- a/misc/deprecated/core/atrium-core-robstoll-deprecated/src/main/kotlin/ch/tutteli/atrium/AtriumFactory.kt +++ /dev/null @@ -1,161 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0 */) -package ch.tutteli.atrium - -import ch.tutteli.atrium.assertions.BulletPointIdentifier -import ch.tutteli.atrium.checking.AssertionChecker -import ch.tutteli.atrium.core.coreFactory -import ch.tutteli.atrium.core.migration.toAtriumLocale -import ch.tutteli.atrium.core.robstoll.lib.checking.DelegatingAssertionChecker -import ch.tutteli.atrium.core.robstoll.lib.checking.FeatureAssertionChecker -import ch.tutteli.atrium.core.robstoll.lib.checking.ThrowingAssertionChecker -import ch.tutteli.atrium.core.robstoll.lib.creating.CheckingAssertionPlantImpl -import ch.tutteli.atrium.core.robstoll.lib.creating.CollectingAssertionPlantImpl -import ch.tutteli.atrium.core.robstoll.lib.creating.ReportingAssertionPlantImpl -import ch.tutteli.atrium.core.robstoll.lib.creating.ReportingAssertionPlantNullableImpl -import ch.tutteli.atrium.core.robstoll.lib.reporting.* -import ch.tutteli.atrium.core.robstoll.lib.reporting.translating.CoroutineBasedLocaleOrderDecider -import ch.tutteli.atrium.core.robstoll.lib.reporting.translating.PropertiesPerEntityAndLocaleTranslationSupplier -import ch.tutteli.atrium.core.robstoll.lib.reporting.translating.TranslationSupplierBasedTranslator -import ch.tutteli.atrium.creating.* -import ch.tutteli.atrium.reporting.* -import ch.tutteli.atrium.reporting.translating.LocaleOrderDecider -import ch.tutteli.atrium.reporting.translating.TranslationSupplier -import ch.tutteli.atrium.reporting.translating.Translator -import java.util.* - -/** - * Deprecated, use [coreFactory] instead (uses [ServiceLoader]); will be removed with 1.0.0 - */ -@Deprecated("Use coreFactory instead; will be removed with 1.0.0", ReplaceWith("coreFactory", "ch.tutteli.atrium.core.coreFactory")) -object AtriumFactory : IAtriumFactory { - - @Deprecated("Use coreFactory; will be removed with 1.0.0", ReplaceWith("coreFactory.newReportingPlant(commonFields)")) - override fun newReportingPlant(commonFields: AssertionPlantWithCommonFields.CommonFields): ReportingAssertionPlant - = ReportingAssertionPlantImpl(commonFields) - - @Deprecated("Use coreFactory; will be removed with 1.0.0", ReplaceWith("coreFactory.newReportingPlantNullable(commonFields)")) - override fun newReportingPlantNullable(commonFields: AssertionPlantWithCommonFields.CommonFields): ReportingAssertionPlantNullable - = ReportingAssertionPlantNullableImpl(commonFields) - - @Deprecated("Use coreFactory; will be removed with 1.0.0", ReplaceWith("coreFactory.newCheckingPlant(subject)")) - override fun newCheckingPlant(subject: T): CheckingAssertionPlant - = CheckingAssertionPlantImpl { subject } - - @Deprecated("Use coreFactory; will be removed with 1.0.0", ReplaceWith("coreFactory.newCollectingPlant(subjectProvider)")) - override fun newCollectingPlant(subjectProvider: () -> T): CollectingAssertionPlant - = CollectingAssertionPlantImpl(subjectProvider) - - @Deprecated("Use coreFactory; will be removed with 1.0.0", ReplaceWith("coreFactory.newThrowingAssertionChecker(reporter)")) - override fun newThrowingAssertionChecker(reporter: Reporter): AssertionChecker - = ThrowingAssertionChecker(reporter) - - @Deprecated("Use coreFactory; will be removed with 1.0.0", ReplaceWith("coreFactory.newFeatureAssertionChecker(subjectPlant)")) - override fun newFeatureAssertionChecker(subjectPlant: AssertionPlant): AssertionChecker - = FeatureAssertionChecker(subjectPlant) - - @Deprecated("Use coreFactory; will be removed with 1.0.0", ReplaceWith("coreFactory.newDelegatingAssertionChecker(subjectPlant)")) - override fun newDelegatingAssertionChecker(subjectPlant: BaseAssertionPlant): AssertionChecker - = DelegatingAssertionChecker(subjectPlant) - - @Deprecated("Use coreFactory; will be removed with 1.0.0", ReplaceWith("coreFactory.newMethodCallFormatter()")) - override fun newMethodCallFormatter(): MethodCallFormatter - = TextMethodCallFormatter - - @Deprecated("Use coreFactory; will be removed with 1.0.0", ReplaceWith("coreFactory.newTranslator(translationSupplier, localeOrderDecider, primaryLocale, *fallbackLocales)")) - override fun newTranslator(translationSupplier: TranslationSupplier, localeOrderDecider: LocaleOrderDecider, primaryLocale: Locale, vararg fallbackLocales: Locale): Translator - = TranslationSupplierBasedTranslator(translationSupplier, localeOrderDecider, primaryLocale.toAtriumLocale(), fallbackLocales.map { it.toAtriumLocale() }) - - @Deprecated("Use coreFactory; will be removed with 1.0.0", ReplaceWith("coreFactory.newPropertiesBasedTranslationSupplier()")) - override fun newPropertiesBasedTranslationSupplier(): TranslationSupplier - = PropertiesPerEntityAndLocaleTranslationSupplier() - - @Deprecated("Use coreFactory; will be removed with 1.0.0", ReplaceWith("coreFactory.newLocaleOrderDecider()")) - override fun newLocaleOrderDecider(): LocaleOrderDecider - = CoroutineBasedLocaleOrderDecider() - - @Deprecated("Use coreFactory; will be removed with 1.0.0", ReplaceWith("coreFactory.newDetailedObjectFormatter(translator)")) - override fun newDetailedObjectFormatter(translator: Translator): ObjectFormatter - = DetailedObjectFormatter(translator) - - @Deprecated("Use coreFactory; will be removed with 1.0.0", ReplaceWith("coreFactory.newAssertionFormatterController()")) - override fun newAssertionFormatterController(): AssertionFormatterController - = AssertionFormatterControllerImpl() - - @Deprecated("Use coreFactory; will be removed with 1.0.0", ReplaceWith("coreFactory.newAssertionFormatterFacade(assertionFormatterController)")) - override fun newAssertionFormatterFacade(assertionFormatterController: AssertionFormatterController): AssertionFormatterFacade - = AssertionFormatterControllerBasedFacade(assertionFormatterController) - - @Deprecated("Use coreFactory; will be removed with 1.0.0", ReplaceWith("coreFactory.newTextSameLineAssertionPairFormatter(objectFormatter, translator)")) - override fun newTextSameLineAssertionPairFormatter(objectFormatter: ObjectFormatter, translator: Translator) - = TextSameLineAssertionPairFormatter(objectFormatter, translator) - - @Deprecated("Use coreFactory; will be removed with 1.0.0", ReplaceWith("coreFactory.newTextFallbackAssertionFormatter(bulletPoints.asSequence().map { it.key.kotlin to it.value }.toMap(), assertionFormatterController, objectFormatter, translator)")) - override fun newTextFallbackAssertionFormatter(bulletPoints: Map, String>, assertionFormatterController: AssertionFormatterController, objectFormatter: ObjectFormatter, translator: Translator): AssertionFormatter - = TextFallbackAssertionFormatter( - toKClassBasedMap(bulletPoints), - assertionFormatterController, - newTextSameLineAssertionPairFormatter(objectFormatter, translator), - objectFormatter - ) - - @Deprecated("Use coreFactory; will be removed with 1.0.0", ReplaceWith("coreFactory.newTextFeatureAssertionGroupFormatter(bulletPoints.asSequence().map { it.key.kotlin to it.value }.toMap(), assertionFormatterController, objectFormatter, translator)")) - override fun newTextFeatureAssertionGroupFormatter(bulletPoints: Map, String>, assertionFormatterController: AssertionFormatterController, objectFormatter: ObjectFormatter, translator: Translator): AssertionFormatter - = TextFeatureAssertionGroupFormatter( - toKClassBasedMap(bulletPoints), - assertionFormatterController, - newTextSameLineAssertionPairFormatter(objectFormatter, translator) - ) - - @Deprecated("Use coreFactory; will be removed with 1.0.0", ReplaceWith("coreFactory.newTextListAssertionGroupFormatter(bulletPoints.asSequence().map { it.key.kotlin to it.value }.toMap(), assertionFormatterController, objectFormatter, translator)")) - override fun newTextListAssertionGroupFormatter(bulletPoints: Map, String>, assertionFormatterController: AssertionFormatterController, objectFormatter: ObjectFormatter, translator: Translator): AssertionFormatter - = TextListAssertionGroupFormatter( - toKClassBasedMap(bulletPoints), - assertionFormatterController, - newTextSameLineAssertionPairFormatter(objectFormatter, translator) - ) - - @Deprecated("Use coreFactory; will be removed with 1.0.0", ReplaceWith("coreFactory.newTextExplanatoryAssertionGroupFormatter(bulletPoints.asSequence().map { it.key.kotlin to it.value }.toMap(), assertionFormatterController)")) - override fun newTextExplanatoryAssertionGroupFormatter(bulletPoints: Map, String>, assertionFormatterController: AssertionFormatterController): AssertionFormatter - = TextExplanatoryAssertionGroupFormatter(toKClassBasedMap(bulletPoints), assertionFormatterController) - - @Deprecated("Use coreFactory; will be removed with 1.0.0", ReplaceWith("coreFactory.registerTextAssertionFormatterCapabilities(bulletPoints.asSequence().map { it.key.kotlin to it.value }.toMap(), assertionFormatterFacade, textAssertionPairFormatter, objectFormatter, translator)")) - override fun registerTextAssertionFormatterCapabilities( - bulletPoints: Map, String>, - assertionFormatterFacade: AssertionFormatterFacade, - textAssertionPairFormatter: AssertionPairFormatter, - objectFormatter: ObjectFormatter, - translator: Translator - ) { - assertionFormatterFacade.register { - TextListAssertionGroupFormatter(toKClassBasedMap(bulletPoints), it, textAssertionPairFormatter) - } - assertionFormatterFacade.register { - TextFeatureAssertionGroupFormatter(toKClassBasedMap(bulletPoints), it, textAssertionPairFormatter) - } - assertionFormatterFacade.register { - TextExplanatoryAssertionGroupFormatter(toKClassBasedMap(bulletPoints), it) - } - assertionFormatterFacade.register { - TextIndentAssertionGroupFormatter(toKClassBasedMap(bulletPoints), it) - } - assertionFormatterFacade.register { - TextSummaryAssertionGroupFormatter(toKClassBasedMap(bulletPoints), it, textAssertionPairFormatter) - } - assertionFormatterFacade.register { - TextFallbackAssertionFormatter(toKClassBasedMap(bulletPoints), it, textAssertionPairFormatter, objectFormatter) - } - } - - private fun toKClassBasedMap(bulletPoints: Map, String>) - = bulletPoints.asSequence().map { it.key.kotlin to it.value }.toMap() - - @Deprecated("Use coreFactory; will be removed with 1.0.0", ReplaceWith("coreFactory.newOnlyFailureReporter(assertionFormatterFacade)")) - override fun newOnlyFailureReporter(assertionFormatterFacade: AssertionFormatterFacade): Reporter - = OnlyFailureReporter( - assertionFormatterFacade, coreFactory.newMultiAtriumErrorAdjuster( - coreFactory.newRemoveRunnerAtriumErrorAdjuster(), - coreFactory.newRemoveRunnerAtriumErrorAdjuster(), - listOf() - ) - ) -} diff --git a/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/assertions/composers/AssertionComposer.kt b/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/assertions/composers/AssertionComposer.kt deleted file mode 100644 index 9397dcec5..000000000 --- a/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/assertions/composers/AssertionComposer.kt +++ /dev/null @@ -1,45 +0,0 @@ -package ch.tutteli.atrium.domain.assertions.composers - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.assertions.AssertionGroup -import ch.tutteli.atrium.assertions.DescriptiveAssertion -import ch.tutteli.atrium.assertions.builders.AssertionBuilder -import ch.tutteli.atrium.core.polyfills.loadSingleService -import ch.tutteli.atrium.reporting.translating.Translatable - -/** - * The access point to an implementation of [AssertionComposer]. - * - * It loads the implementation lazily via [loadSingleService]. - */ -@Deprecated("Use ExpectImpl.builder.descriptive.withFailureHint instead; will be removed with 1.0.0") -@Suppress("DEPRECATION") -val assertionComposer by lazy { loadSingleService(AssertionComposer::class) } - -/** - * Responsible to compose [Assertion]s based on the [AssertionBuilder]. - */ -@Deprecated("Use ExpectImpl.builder.descriptive.withFailureHint instead; will be removed with 1.0.0") -interface AssertionComposer { - /** - * Shall create kind of a [DescriptiveAssertion] if [test] holds or an [AssertionGroup] which includes additionally - * a failure hint created by the given [failureHintFactory] in case [showHint] evaluates to `true`. - * - * Notice, it is up to the implementation if a really a [DescriptiveAssertion] is created if [test] holds or if - * another kind of [Assertion] is used. However, the implementation should treat the given [description] and - * [representation] as it would be treated if it is part of a [DescriptiveAssertion]. - * - * @param description The [DescriptiveAssertion.description]. - * @param representation The [DescriptiveAssertion.representation]. - * @param test The test which should be used for [DescriptiveAssertion.holds]. - * @param showHint Indicates whether the failure hint shall be shown in case [test] fails. - * @param failureHintFactory A factory method used to create the failure hint. - */ - fun createDescriptiveWithFailureHint( - description: Translatable, - representation: Any, - test: () -> Boolean, - showHint: () -> Boolean, - failureHintFactory: () -> Assertion - ): Assertion -} diff --git a/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/AnyAssertions.kt b/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/AnyAssertions.kt deleted file mode 100644 index 8c6e9c5ed..000000000 --- a/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/AnyAssertions.kt +++ /dev/null @@ -1,88 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.domain.creating - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.core.polyfills.loadSingleService -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.creating.AssertionPlantNullable -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.domain.creating.changers.ChangedSubjectPostStep -import kotlin.reflect.KClass - -/** - * The access point to an implementation of [AnyAssertions]. - * - * It loads the implementation lazily via [loadSingleService]. - */ -@Deprecated("Use _logic from ch.tutteli.atrium.logic instead; will be removed with 1.0.0") -val anyAssertions by lazy { loadSingleService(AnyAssertions::class) } - - -/** - * Defines the minimum set of assertion functions and builders applicable to [Any] type, - * which an implementation of the domain of Atrium has to provide. - */ -@Deprecated( - "Use AnyAssertions from atrium-logic; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.logic.AnyAssertions") -) -interface AnyAssertions { - - fun toBe(subjectProvider: SubjectProvider, expected: T): Assertion - fun notToBe(subjectProvider: SubjectProvider, expected: T): Assertion - fun isSame(subjectProvider: SubjectProvider, expected: T): Assertion - fun isNotSame(subjectProvider: SubjectProvider, expected: T): Assertion - - fun toBeNull(subjectProvider: SubjectProvider): Assertion - - fun toBeNullIfNullGivenElse( - expect: Expect, - type: KClass, - assertionCreatorOrNull: (Expect.() -> Unit)? - ): Assertion - - /** - * Convenience method for nullable-types which delegates to [isA]. - */ - @Suppress("DeprecatedCallableAddReplaceWith") - @Deprecated("Use AnyAssertions from atrium-logic and the method notToBeNullBut; will be removed with 1.0.0") - fun notToBeNull(expect: Expect, subType: KClass) = - isA(expect, subType) - - //TODO restrict TSub with T once type parameter for upper bounds are supported: - // https://youtrack.jetbrains.com/issue/KT-33262 is implemented - fun isA(expect: Expect, subType: KClass): ChangedSubjectPostStep - - - @Deprecated("Switch from Assert to Expect and use toBeNullable; will be removed with 1.0.0") - fun isNullable( - plant: AssertionPlantNullable, - type: KClass, - expectedOrNull: T? - ): Assertion - - @Deprecated("Switch from Assert to Expect and use notTobeNull; will be removed with 1.0.0") - fun isNotNull( - plant: AssertionPlantNullable, - type: KClass, - assertionCreator: AssertionPlant.() -> Unit - ): Assertion - - @Deprecated("Switch from Assert to Expect and use toBe; will be removed with 1.0.0") - fun isNotNullBut( - plant: AssertionPlantNullable, - type: KClass, - expected: T - ): Assertion - - @Deprecated("Switch from Assert to Expect and use toBeNullIfNullGivenElse; will be removed with 1.0.0") - fun isNullIfNullGivenElse( - plant: AssertionPlantNullable, - type: KClass, - assertionCreatorOrNull: (AssertionPlant.() -> Unit)? - ): Assertion -} - diff --git a/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/CharSequenceAssertions.kt b/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/CharSequenceAssertions.kt deleted file mode 100644 index 4e27ccfbe..000000000 --- a/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/CharSequenceAssertions.kt +++ /dev/null @@ -1,45 +0,0 @@ -//TODO remove with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.domain.creating - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.core.polyfills.loadSingleService -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains -import ch.tutteli.atrium.domain.creating.charsequence.contains.searchbehaviours.NoOpSearchBehaviour -import ch.tutteli.atrium.domain.creating.charsequence.contains.searchbehaviours.NotSearchBehaviour - -/** - * The access point to an implementation of [CharSequenceAssertions]. - * - * It loads the implementation lazily via [loadSingleService]. - */ -@Deprecated("Use _logic from ch.tutteli.atrium.logic instead; will be removed with 1.0.0") -val charSequenceAssertions by lazy { loadSingleService(CharSequenceAssertions::class) } - - -/** - * Defines the minimum set of assertion functions and builders applicable to [CharSequence], - * which an implementation of the domain of Atrium has to provide. - */ -@Deprecated( - "Use CharSequenceAssertions from atrium-logic; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.logic.CharSequenceAssertions") -) -interface CharSequenceAssertions { - fun containsBuilder(subjectProvider: SubjectProvider): CharSequenceContains.Builder - fun containsNotBuilder(subjectProvider: SubjectProvider): CharSequenceContains.Builder - - fun startsWith(subjectProvider: SubjectProvider, expected: CharSequence): Assertion - fun startsNotWith(subjectProvider: SubjectProvider, expected: CharSequence): Assertion - fun endsWith(subjectProvider: SubjectProvider, expected: CharSequence): Assertion - fun endsNotWith(subjectProvider: SubjectProvider, expected: CharSequence): Assertion - fun isEmpty(subjectProvider: SubjectProvider): Assertion - fun isNotEmpty(subjectProvider: SubjectProvider): Assertion - fun isNotBlank(subjectProvider: SubjectProvider): Assertion - - fun matches(expect: Expect, expected: Regex): Assertion - fun mismatches(expect: Expect, expected: Regex): Assertion -} diff --git a/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/CollectionAssertions.kt b/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/CollectionAssertions.kt deleted file mode 100644 index 8dc02ffa2..000000000 --- a/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/CollectionAssertions.kt +++ /dev/null @@ -1,44 +0,0 @@ -@file:Suppress( -/* TODO remove annotation with 1.0.0 */ "DEPRECATION", -/* TODO remove annotation with 1.0.0 */ "TYPEALIAS_EXPANSION_DEPRECATION" -) - -package ch.tutteli.atrium.domain.creating - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.core.polyfills.loadSingleService -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.domain.creating.changers.ExtractedFeaturePostStep - -/** - * The access point to an implementation of [CollectionAssertions]. - * - * It loads the implementation lazily via [loadSingleService]. - */ -@Deprecated("Use _logic from ch.tutteli.atrium.logic instead; will be removed with 1.0.0") -val collectionAssertions by lazy { loadSingleService(CollectionAssertions::class) } - - -/** - * Defines the minimum set of assertion functions and builders applicable to [Collection], - * which an implementation of the domain of Atrium has to provide. - */ -@Deprecated( - "Use CollectionAssertions from atrium-logic; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.logic.AnyAssertions") -) -interface CollectionAssertions { - fun isEmpty(subjectProvider: SubjectProvider>): Assertion - fun isNotEmpty(subjectProvider: SubjectProvider>): Assertion - - fun > size(expect: Expect): ExtractedFeaturePostStep - - @Deprecated("Switch from Assert to Expect; will be removed with 1.0.0") - fun hasSize(plant: AssertionPlant>, size: Int): Assertion - - @Deprecated("Switch from Assert to Expect; will be removed with 1.0.0") - fun size(plant: AssertionPlant>, assertionCreator: Assert.() -> Unit): Assertion -} diff --git a/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/ComparableAssertions.kt b/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/ComparableAssertions.kt deleted file mode 100644 index 64023499e..000000000 --- a/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/ComparableAssertions.kt +++ /dev/null @@ -1,46 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.domain.creating - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.core.polyfills.loadSingleService -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.creating.SubjectProvider - -/** - * The access point to an implementation of [ComparableAssertions]. - * - * It loads the implementation lazily via [loadSingleService]. - */ -@Deprecated("Use _logic from ch.tutteli.atrium.logic instead; will be removed with 1.0.0") -val comparableAssertions by lazy { loadSingleService(ComparableAssertions::class) } - - -/** - * Defines the minimum set of assertion functions and builders applicable to [Comparable], - * which an implementation of the domain of Atrium has to provide. - */ -@Deprecated( - "Use ComparableAssertions from atrium-logic; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.logic.ComparableAssertions") -) -interface ComparableAssertions { - fun , T2 : Any?> isLessThan(subjectProvider: SubjectProvider, expected: T2): Assertion - - //TODO rename to isLessThanOrEqual with 1.0.0 - fun , T2 : Any?> isLessOrEquals(subjectProvider: SubjectProvider, expected: T2): Assertion - - fun , T2 : Any?> isGreaterThan(subjectProvider: SubjectProvider, expected: T2): Assertion - - //TODO rename to isGreaterThanOrEqual with 1.0.0 - fun , T2 : Any?> isGreaterOrEquals( - subjectProvider: SubjectProvider, - expected: T2 - ): Assertion - - fun , T2 : Any?> isEqualComparingTo( - expect: Expect, - expected: T2 - ): Assertion -} diff --git a/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/FeatureAssertions.kt b/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/FeatureAssertions.kt deleted file mode 100644 index 415f88139..000000000 --- a/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/FeatureAssertions.kt +++ /dev/null @@ -1,66 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove annotation with 1.0.0 */) - -package ch.tutteli.atrium.domain.creating - -import ch.tutteli.atrium.core.polyfills.loadSingleService -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.creating.AssertionPlantNullable -import ch.tutteli.atrium.reporting.translating.Translatable - -/** - * The access point to an implementation of [FeatureAssertions]. - * - * It loads the implementation lazily via [loadSingleService]. - */ -@Suppress("DEPRECATION") -@Deprecated("Switch from `Assert` to `Expect` and use newFeatureAssertions; will be removed with 1.0.0") -val featureAssertions by lazy { loadSingleService(FeatureAssertions::class) } - -/** - * Defines the minimum set of assertion functions -- used to create feature assertions -- - * which an implementation of the domain of Atrium has to provide. - */ -@Deprecated("Switch from `Assert` to `Expect` and use then ExpectImpl.feature, NewFeatureAssertionsBuilder respectively; will be removed with 1.0.0") -interface FeatureAssertions { - - fun property(plant: AssertionPlant, subjectProvider: () -> TProperty, name: Translatable): AssertionPlant - fun property(plant: AssertionPlant, subjectProvider: () -> TProperty, representationProvider: () -> Any?, name: Translatable): AssertionPlant - fun property(plant: AssertionPlant, subjectProvider: () -> TProperty, name: Translatable): AssertionPlantNullable - fun property(plant: AssertionPlant, subjectProvider: () -> TProperty, representationProvider: () -> Any?, name: Translatable): AssertionPlantNullable - - //Arg0 - fun returnValueOf0(plant: AssertionPlant, method: () -> R, name: String): AssertionPlant - fun returnValueOf0(plant: AssertionPlant, method: () -> R, representationProvider: () -> Any?, name: String): AssertionPlant - fun returnValueOf0(plant: AssertionPlant, method: () -> R, name: String): AssertionPlantNullable - fun returnValueOf0(plant: AssertionPlant, method: () -> R, representationProvider: () -> Any?, name: String): AssertionPlantNullable - - //Arg1 - fun returnValueOf1(plant: AssertionPlant, method: (T1) -> R, arg1: T1, name: String): AssertionPlant - fun returnValueOf1(plant: AssertionPlant, method: (T1) -> R, arg1: T1, representationProvider: () -> Any?, name: String): AssertionPlant - fun returnValueOf1(plant: AssertionPlant, method: (T1) -> R, arg1: T1, name: String): AssertionPlantNullable - fun returnValueOf1(plant: AssertionPlant, method: (T1) -> R, arg1: T1, representationProvider: () -> Any?, name: String): AssertionPlantNullable - - //Arg2 - fun returnValueOf2(plant: AssertionPlant, method: (T1, T2) -> R, arg1: T1, arg2: T2, name: String): AssertionPlant - fun returnValueOf2(plant: AssertionPlant, method: (T1, T2) -> R, arg1: T1, arg2: T2, representationProvider: () -> Any?, name: String): AssertionPlant - fun returnValueOf2(plant: AssertionPlant, method: (T1, T2) -> R, arg1: T1, arg2: T2, name: String): AssertionPlantNullable - fun returnValueOf2(plant: AssertionPlant, method: (T1, T2) -> R, arg1: T1, arg2: T2, representationProvider: () -> Any?, name: String): AssertionPlantNullable - - //Arg3 - fun returnValueOf3(plant: AssertionPlant, method: (T1, T2, T3) -> R, arg1: T1, arg2: T2, arg3: T3, name: String): AssertionPlant - fun returnValueOf3(plant: AssertionPlant, method: (T1, T2, T3) -> R, arg1: T1, arg2: T2, arg3: T3, representationProvider: () -> Any?, name: String): AssertionPlant - fun returnValueOf3(plant: AssertionPlant, method: (T1, T2, T3) -> R, arg1: T1, arg2: T2, arg3: T3, name: String): AssertionPlantNullable - fun returnValueOf3(plant: AssertionPlant, method: (T1, T2, T3) -> R, arg1: T1, arg2: T2, arg3: T3, representationProvider: () -> Any?, name: String): AssertionPlantNullable - - //Arg4 - fun returnValueOf4(plant: AssertionPlant, method: (T1, T2, T3, T4) -> R, arg1: T1, arg2: T2, arg3: T3, arg4: T4, name: String): AssertionPlant - fun returnValueOf4(plant: AssertionPlant, method: (T1, T2, T3, T4) -> R, arg1: T1, arg2: T2, arg3: T3, arg4: T4, representationProvider: () -> Any?, name: String): AssertionPlant - fun returnValueOf4(plant: AssertionPlant, method: (T1, T2, T3, T4) -> R, arg1: T1, arg2: T2, arg3: T3, arg4: T4, name: String): AssertionPlantNullable - fun returnValueOf4(plant: AssertionPlant, method: (T1, T2, T3, T4) -> R, arg1: T1, arg2: T2, arg3: T3, arg4: T4, representationProvider: () -> Any?, name: String): AssertionPlantNullable - - //Arg5 - fun returnValueOf5(plant: AssertionPlant, method: (T1, T2, T3, T4, T5) -> R, arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, name: String): AssertionPlant - fun returnValueOf5(plant: AssertionPlant, method: (T1, T2, T3, T4, T5) -> R, arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, representationProvider: () -> Any?, name: String): AssertionPlant - fun returnValueOf5(plant: AssertionPlant, method: (T1, T2, T3, T4, T5) -> R, arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, name: String): AssertionPlantNullable - fun returnValueOf5(plant: AssertionPlant, method: (T1, T2, T3, T4, T5) -> R, arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, representationProvider: () -> Any?, name: String): AssertionPlantNullable -} diff --git a/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/FloatingPointAssertions.kt b/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/FloatingPointAssertions.kt deleted file mode 100644 index 3a7ca2626..000000000 --- a/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/FloatingPointAssertions.kt +++ /dev/null @@ -1,37 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION") -package ch.tutteli.atrium.domain.creating - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.core.polyfills.loadSingleService -import ch.tutteli.atrium.creating.SubjectProvider - -/** - * The access point to an implementation of [FloatingPointAssertions]. - * - * It loads the implementation lazily via [loadSingleService]. - */ -@Deprecated("Use _logic from ch.tutteli.atrium.logic instead; will be removed with 1.0.0") -val floatingPointAssertions by lazy { loadSingleService(FloatingPointAssertions::class) } - - -/** - * Defines the minimum set of assertion functions and builders applicable to floating points, - * which an implementation of the domain of Atrium has to provide. - * - * An `actual` or in other words platform specific interface might add further methods. - */ -@Deprecated( - "Use FloatingPointAssertions from atrium-logic; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.logic.FloatingPointAssertions") -) -expect interface FloatingPointAssertions : FloatingPointAssertionsCommon - -/** - * Defines the minimum set of assertion functions and builders applicable to floating points ([Float], [Double]), - * which an implementation of the domain of Atrium has to provide for any platform. - */ -interface FloatingPointAssertionsCommon { - fun toBeWithErrorTolerance(subjectProvider: SubjectProvider, expected: Float, tolerance: Float): Assertion - fun toBeWithErrorTolerance(subjectProvider: SubjectProvider, expected: Double, tolerance: Double): Assertion -} diff --git a/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/Fun0Assertions.kt b/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/Fun0Assertions.kt deleted file mode 100644 index 423995161..000000000 --- a/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/Fun0Assertions.kt +++ /dev/null @@ -1,36 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION") -package ch.tutteli.atrium.domain.creating - -import ch.tutteli.atrium.core.polyfills.loadSingleService -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.domain.creating.changers.ChangedSubjectPostStep -import kotlin.reflect.KClass - -/** - * The access point to an implementation of [Fun0Assertions]. - * - * It loads the implementation lazily via [loadSingleService]. - */ -@Deprecated("Use _logic from ch.tutteli.atrium.logic instead; will be removed with 1.0.0") -val fun0Assertions by lazy { loadSingleService(Fun0Assertions::class) } - - -/** - * Defines the minimum set of assertion functions and builders applicable to lambdas with arity 0 - * (i.e. a lambda with 0 arguments or in other words `() -> R`), - * which an implementation of the domain of Atrium has to provide. - */ -@Deprecated( - "Use Fun0Assertions from atrium-logic; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.logic.Fun0Assertions") -) -interface Fun0Assertions { - - fun isThrowing( - expect: Expect Any?>, - expectedType: KClass - ): ChangedSubjectPostStep<*, TExpected> - - fun R> isNotThrowing(expect: Expect): ChangedSubjectPostStep<*, R> -} diff --git a/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/IterableAssertions.kt b/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/IterableAssertions.kt deleted file mode 100644 index fb560ad99..000000000 --- a/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/IterableAssertions.kt +++ /dev/null @@ -1,50 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.domain.creating - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.core.polyfills.loadSingleService -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.domain.creating.changers.ExtractedFeaturePostStep -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.NoOpSearchBehaviour -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.NotSearchBehaviour - -/** - * The access point to an implementation of [IterableAssertions]. - * - * It loads the implementation lazily via [loadSingleService]. - */ -@Deprecated("Use _logic from ch.tutteli.atrium.logic instead; will be removed with 1.0.0") -val iterableAssertions by lazy { loadSingleService(IterableAssertions::class) } - - -/** - * Defines the minimum set of assertion functions and builders applicable to [Iterable], - * which an implementation of the domain of Atrium has to provide. - */ -@Deprecated( - "Use IterableLikeAssertions from atrium-logic; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.logic.IteratorAssertions") -) -interface IterableAssertions { - fun > containsBuilder(subjectProvider: SubjectProvider): IterableContains.Builder - fun > containsNotBuilder(subjectProvider: SubjectProvider): IterableContains.Builder - - fun > all( - expect: Expect, - assertionCreator: (Expect.() -> Unit)? - ): Assertion - - fun > hasNext(expect: Expect): Assertion - fun > hasNotNext(expect: Expect): Assertion - - fun , T : Iterable> min(expect: Expect): ExtractedFeaturePostStep - fun , T : Iterable> max(expect: Expect): ExtractedFeaturePostStep - - @Deprecated("Switch from Assert to Expect; will be removed with 1.0.0") - fun all(plant: AssertionPlant>, assertionCreator: (AssertionPlant.() -> Unit)?): Assertion -} diff --git a/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/IteratorAssertions.kt b/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/IteratorAssertions.kt deleted file mode 100644 index 7ecfbe50f..000000000 --- a/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/IteratorAssertions.kt +++ /dev/null @@ -1,29 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION") -package ch.tutteli.atrium.domain.creating - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.core.polyfills.loadSingleService -import ch.tutteli.atrium.creating.Expect - -/** - * The access point to an implementation of [IteratorAssertions]. - * - * It loads the implementation lazily via [loadSingleService]. - */ -@Deprecated("Use _logic from ch.tutteli.atrium.logic instead; will be removed with 1.0.0") -val iteratorAssertions by lazy { loadSingleService(IteratorAssertions::class) } - - -/** - * Defines the minimum set of assertion functions and builders applicable to [Iterator], - * which an implementation of the domain of Atrium has to provide. - */ -@Deprecated( - "Use IteratorAssertions from atrium-logic; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.logic.IteratorAssertions") -) -interface IteratorAssertions { - fun > hasNext(expect: Expect): Assertion - fun > hasNotNext(expect: Expect): Assertion -} diff --git a/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/ListAssertions.kt b/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/ListAssertions.kt deleted file mode 100644 index b42fb9826..000000000 --- a/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/ListAssertions.kt +++ /dev/null @@ -1,57 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.domain.creating - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.core.polyfills.loadSingleService -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.creating.AssertionPlantNullable -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.domain.creating.changers.ExtractedFeaturePostStep - -/** - * The access point to an implementation of [ListAssertions]. - * - * It loads the implementation lazily via [loadSingleService]. - */ -@Deprecated("Use _logic from ch.tutteli.atrium.logic instead; will be removed with 1.0.0") -val listAssertions by lazy { loadSingleService(ListAssertions::class) } - -/** - * Defines the minimum set of assertion functions and builders applicable to [List], - * which an implementation of the domain of Atrium has to provide. - */ -@Deprecated( - "Use ListAssertions from atrium-logic; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.logic.ListAssertions") -) -interface ListAssertions { - - fun > get( - expect: Expect, - index: Int - ): ExtractedFeaturePostStep - - - @Deprecated("Switch from Assert to Expect; will be removed with 1.0.0") - fun get(plant: AssertionPlant>, index: Int): AssertionPlant - - @Deprecated("Switch from Assert to Expect; will be removed with 1.0.0") - fun get( - plant: AssertionPlant>, - index: Int, - assertionCreator: AssertionPlant.() -> Unit - ): Assertion - - @Deprecated("Switch from Assert to Expect and use `get` instead; will be removed with 1.0.0") - fun getNullable(plant: AssertionPlant>, index: Int): AssertionPlantNullable - - @Deprecated("Switch from Assert to Expect and use `get` instead; will be removed with 1.0.0") - fun getNullable( - plant: AssertionPlant>, - index: Int, - assertionCreator: AssertionPlantNullable.() -> Unit - ): Assertion -} - diff --git a/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/MapAssertions.kt b/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/MapAssertions.kt deleted file mode 100644 index b3b2663e2..000000000 --- a/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/MapAssertions.kt +++ /dev/null @@ -1,91 +0,0 @@ -@file:Suppress(/* TODO remove annotation with 1.0.0 */ "DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION" ) - -package ch.tutteli.atrium.domain.creating - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.core.polyfills.loadSingleService -import ch.tutteli.atrium.creating.* -import ch.tutteli.atrium.domain.creating.changers.ExtractedFeaturePostStep -import kotlin.reflect.KClass - -/** - * The access point to an implementation of [MapAssertions]. - * - * It loads the implementation lazily via [loadSingleService]. - */ -@Deprecated("Use _logic from ch.tutteli.atrium.logic instead; will be removed with 1.0.0") -val mapAssertions by lazy { loadSingleService(MapAssertions::class) } - - -/** - * Defines the minimum set of assertion functions and builders applicable to [Map], - * which an implementation of the domain of Atrium has to provide. - */ -@Deprecated( - "Use MapAssertions from atrium-logic; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.logic.MapAssertions") -) -interface MapAssertions { - fun > contains( - expect: Expect, - keyValuePairs: List> - ): Assertion - - fun > containsKeyWithValueAssertions( - expect: Expect, - valueType: KClass, - keyValues: List.() -> Unit)?>> - ): Assertion - - fun containsKey(subjectProvider: SubjectProvider>, key: K): Assertion - fun containsNotKey(subjectProvider: SubjectProvider>, key: K): Assertion - - fun isEmpty(subjectProvider: SubjectProvider>): Assertion - fun isNotEmpty(subjectProvider: SubjectProvider>): Assertion - - fun > getExisting(expect: Expect, key: K): ExtractedFeaturePostStep - - fun > size(expect: Expect): ExtractedFeaturePostStep - - - @Deprecated("Switch from Assert to Expect; will be removed with 1.0.0") - fun contains(plant: AssertionPlant>, keyValuePairs: List>): Assertion - - @Deprecated("Switch from Assert to Expect; will be removed with 1.0.0") - fun containsKeyWithValueAssertions( - plant: AssertionPlant>, - keyValues: List.() -> Unit)?>> - ): Assertion - - @Deprecated("Switch from Assert to Expect; will be removed with 1.0.0") - fun getExisting(plant: AssertionPlant>, key: K): AssertionPlant - - @Deprecated("Switch from Assert to Expect; will be removed with 1.0.0") - fun getExisting( - plant: AssertionPlant>, - key: K, - assertionCreator: AssertionPlant.() -> Unit - ): Assertion - - @Deprecated("Switch from Assert to Expect and use getExisting instead; will be removed with 1.0.0") - fun getExistingNullable(plant: AssertionPlant>, key: K): AssertionPlantNullable - - @Deprecated("Switch from Assert to Expect and use getExisting instead; will be removed with 1.0.0") - fun getExistingNullable( - plant: AssertionPlant>, - key: K, - assertionCreator: AssertionPlantNullable.() -> Unit - ): Assertion - - @Deprecated("Switch from Assert to Expect; will be removed with 1.0.0") - fun hasSize(plant: AssertionPlant>, size: Int): Assertion - - @Deprecated("Switch from Assert to Expect; will be removed with 1.0.0") - fun keys(plant: AssertionPlant>, assertionCreator: AssertionPlant>.() -> Unit): Assertion - - @Deprecated("Switch from Assert to Expect; will be removed with 1.0.0") - fun values( - plant: AssertionPlant>, - assertionCreator: AssertionPlant>.() -> Unit - ): Assertion -} diff --git a/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/MapEntryAssertions.kt b/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/MapEntryAssertions.kt deleted file mode 100644 index 3b760c278..000000000 --- a/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/MapEntryAssertions.kt +++ /dev/null @@ -1,60 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.domain.creating - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.core.polyfills.loadSingleService -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.creating.AssertionPlantNullable -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.domain.creating.changers.ExtractedFeaturePostStep -import kotlin.reflect.KClass - -/** - * The access point to an implementation of [MapAssertions]. - * - * It loads the implementation lazily via [loadSingleService]. - */ -@Deprecated("Use _logic from ch.tutteli.atrium.logic instead; will be removed with 1.0.0") -val mapEntryAssertions by lazy { loadSingleService(MapEntryAssertions::class) } - - -/** - * Defines the minimum set of assertion functions and builders applicable to [Map], - * which an implementation of the domain of Atrium has to provide. - */ -@Deprecated( - "Use MapEntryAssertions from atrium-logic; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.logic.MapEntryAssertions") -) -interface MapEntryAssertions { - fun > isKeyValue(expect: Expect, key: K, value: V): Assertion - fun > key(expect: Expect): ExtractedFeaturePostStep - fun > value(expect: Expect): ExtractedFeaturePostStep - - - @Deprecated("Switch from Assert to Expect; will be removed with 1.0.0") - fun isKeyValue(plant: AssertionPlant>, key: K, value: V): Assertion - - @Deprecated("Switch from Assert to Expect; will be removed with 1.0.0") - fun key(plant: AssertionPlant>, assertionCreator: AssertionPlant.() -> Unit): Assertion - - @Deprecated("Switch from Assert to Expect; will be removed with 1.0.0") - fun value( - plant: AssertionPlant>, - assertionCreator: AssertionPlant.() -> Unit - ): Assertion - - @Deprecated("Switch from Assert to Expect and use key; will be removed with 1.0.0") - fun nullableKey( - plant: AssertionPlant>, - assertionCreator: AssertionPlantNullable.() -> Unit - ): Assertion - - @Deprecated("Switch from Assert to Expect and use value; will be removed with 1.0.0") - fun nullableValue( - plant: AssertionPlant>, - assertionCreator: AssertionPlantNullable.() -> Unit - ): Assertion -} diff --git a/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/NewFeatureAssertions.kt b/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/NewFeatureAssertions.kt index 86a9c2039..02dba2052 100644 --- a/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/NewFeatureAssertions.kt +++ b/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/NewFeatureAssertions.kt @@ -5,46 +5,9 @@ package ch.tutteli.atrium.domain.creating import ch.tutteli.atrium.core.None import ch.tutteli.atrium.core.Option import ch.tutteli.atrium.core.Some -import ch.tutteli.atrium.core.polyfills.loadSingleService -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.domain.creating.changers.ExtractedFeaturePostStep import ch.tutteli.atrium.reporting.translating.Translatable import ch.tutteli.atrium.reporting.translating.Untranslatable -/** - * The access point to an implementation of [FeatureAssertions]. - * - * It loads the implementation lazily via [loadSingleService]. - * - * Will be renamed to featureAssertions with 1.0.0 - */ -@Deprecated("Use _logic from ch.tutteli.atrium.logic instead; will be removed with 1.0.0") -val newFeatureAssertions by lazy { loadSingleService(NewFeatureAssertions::class) } - -/** - * Defines the minimum set of assertion functions -- used to create feature assertions -- - * which an implementation of the domain of Atrium has to provide. - * - * Will be renamed to FeatureAssertions with 1.0.0 - */ -@Deprecated( - "Use NewFeatureAssertions from atrium-logic; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.logic.NewFeatureAssertions") -) -interface NewFeatureAssertions { - - /** - * Extracts a feature from [expect] based on the given [MetaFeature] and creates a - * [ExtractedFeaturePostStep] based on it. - * - * @return The newly created [ExtractedFeaturePostStep]. - */ - fun genericFeature( - expect: Expect, - metaFeature: MetaFeature - ): ExtractedFeaturePostStep -} - /** * Represents an extracted feature of type [T] defined by the given [maybeSubject] including a [description] * and a [representation] diff --git a/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/PairAssertions.kt b/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/PairAssertions.kt deleted file mode 100644 index b07409d14..000000000 --- a/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/PairAssertions.kt +++ /dev/null @@ -1,52 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.domain.creating - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.core.polyfills.loadSingleService -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.creating.AssertionPlantNullable -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.domain.creating.changers.ExtractedFeaturePostStep - -/** - * The access point to an implementation of [PairAssertions]. - * - * It loads the implementation lazily via [loadSingleService]. - */ -@Deprecated("Use _logic from ch.tutteli.atrium.logic instead; will be removed with 1.0.0") -val pairAssertions by lazy { loadSingleService(PairAssertions::class) } - - -/** - * Defines the minimum set of assertion functions and builders applicable to [Map], - * which an implementation of the domain of Atrium has to provide. - */ -@Deprecated( - "Use PairAssertions from atrium-logic; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.logic.PairAssertions") -) -interface PairAssertions { - fun > first(expect: Expect): ExtractedFeaturePostStep - fun > second(expect: Expect): ExtractedFeaturePostStep - - - @Deprecated("Switch from Assert to Expect; will be removed with 1.0.0") - fun first(plant: AssertionPlant>, assertionCreator: AssertionPlant.() -> Unit): Assertion - - @Deprecated("Switch from Assert to Expect; will be removed with 1.0.0") - fun second(plant: AssertionPlant>, assertionCreator: AssertionPlant.() -> Unit): Assertion - - @Deprecated("Switch from Assert to Expect; will be removed with 1.0.0") - fun nullableFirst( - plant: AssertionPlant>, - assertionCreator: AssertionPlantNullable.() -> Unit - ): Assertion - - @Deprecated("Switch from Assert to Expect; will be removed with 1.0.0") - fun nullableSecond( - plant: AssertionPlant>, - assertionCreator: AssertionPlantNullable.() -> Unit - ): Assertion -} diff --git a/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/ThrowableAssertions.kt b/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/ThrowableAssertions.kt deleted file mode 100644 index 44812d40f..000000000 --- a/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/ThrowableAssertions.kt +++ /dev/null @@ -1,70 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION") -package ch.tutteli.atrium.domain.creating - -import ch.tutteli.atrium.core.polyfills.loadSingleService -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.domain.creating.changers.ChangedSubjectPostStep -import ch.tutteli.atrium.reporting.Reporter -import ch.tutteli.atrium.reporting.translating.Translatable -import ch.tutteli.atrium.reporting.translating.Untranslatable -import kotlin.reflect.KClass - -/** - * The access point to an implementation of [ThrowableAssertions]. - * - * It loads the implementation lazily via [loadSingleService]. - */ -@Deprecated("Use _logic from ch.tutteli.atrium.logic instead; will be removed with 1.0.0") -val throwableAssertions by lazy { loadSingleService(ThrowableAssertions::class) } - -/** - * Defines the minimum set of assertion functions and builders applicable to [Throwable], - * which an implementation of the domain of Atrium has to provide. - */ -@Deprecated( - "Use ThrowableAssertions from atrium-logic; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.logic.ThrowableAssertions") -) -interface ThrowableAssertions { - - fun cause( - expect: Expect, - expectedType: KClass - ): ChangedSubjectPostStep - - /** - * Turns the given [assertionVerb] into an [Untranslatable] and delegates to the other overload. - */ - @Suppress("DEPRECATION", "DeprecatedCallableAddReplaceWith") - @Deprecated( - "Use Expect instead; will be removed with 1.0.0", - ReplaceWith( - "this.thrownBuilder(\n" + - "// !!!! in case you define an assertion verb function, remove it entirely, this is no longer required !!!!\n" + - ")" - ) - ) - fun thrownBuilder( - assertionVerb: String, - act: () -> Unit, - reporter: Reporter - ): ch.tutteli.atrium.domain.creating.throwable.thrown.ThrowableThrown.Builder = - thrownBuilder(Untranslatable(assertionVerb), act, reporter) - - @Suppress("DEPRECATION") - @Deprecated( - "Use Expect instead; will be removed with 1.0.0", - ReplaceWith( - "this.thrownBuilder(\n" + - "// !!!! in case you define an assertion verb function, remove it entirely, this is no longer required !!!!\n" + - ")" - ) - ) - fun thrownBuilder( - assertionVerb: Translatable, - act: () -> Unit, - reporter: Reporter - ): ch.tutteli.atrium.domain.creating.throwable.thrown.ThrowableThrown.Builder -} - diff --git a/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/any/typetransformation/AnyTypeTransformation.kt b/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/any/typetransformation/AnyTypeTransformation.kt deleted file mode 100644 index 2ecaf0a00..000000000 --- a/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/any/typetransformation/AnyTypeTransformation.kt +++ /dev/null @@ -1,101 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0 */) - -package ch.tutteli.atrium.domain.creating.any.typetransformation - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.creating.BaseAssertionPlant -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.reporting.translating.Translatable - -/** - * Defines the contract for sophisticated `type transformation` assertion builders. - * - * The assertion is created by a [AnyTypeTransformation.Creator] which itself uses a - * [AnyTypeTransformation.FailureHandler] to report a failing transformation. - */ -@Deprecated("Switch from `Assert` to `Expect` use `SubjectChanger` instead; will be removed with 1.0.0") -interface AnyTypeTransformation { - - /** - * Represents the final step of a sophisticated `type transformation` assertion builder which creates the - * [Assertion] as such. - * - * @param S The type of [AssertionPlant.subject][SubjectProvider.subject]. - * @param T The target type to which [AssertionPlant.subject][SubjectProvider.subject] should have been transformed to. - */ - @Deprecated("Switch from `Assert` to `Expect` use `SubjectChanger` instead; will be removed with 1.0.0") - interface Creator { - /** - * Creates the type transformation [Assertion] and ads it to the given [ParameterObject.subjectPlant] and - * delegates to the given [failureHandler] if the transformation fails. - * - * @param parameterObject The [ParameterObject] containing inter alia [ParameterObject.assertionCreator] to - * create subsequent assertions. - * @param canBeTransformed Defines whether the subject of the given [ParameterObject.subjectPlant] - * (with type [S]) can be transformed to the target type [T]. - * @param transform The transformation function as such. - * @param failureHandler The failure handler which is called if the transformation cannot be executed - */ - fun create( - parameterObject: ParameterObject, - canBeTransformed: (S) -> Boolean, - transform: (S) -> T, - failureHandler: FailureHandler - ) - } - - /** - * A handler which is responsible to create the [Assertion] of a failed type transformation. - * - * It is also responsible to decide how the lambda -- which could have created subsequent assertions for the - * transformed [AssertionPlant.subject][SubjectProvider.subject] if the transformation of the [AssertionPlant.subject][SubjectProvider.subject] to type [T] - * did not fail -- should be used in reporting. - * - * @param S The type of [AssertionPlant.subject][SubjectProvider.subject]. - * @param T The target type to which [AssertionPlant.subject][SubjectProvider.subject] should have been transformed to. - */ - @Deprecated("Switch from `Assert` to `Expect` use `SubjectChanger` instead; will be removed with 1.0.0") - interface FailureHandler { - - /** - * Creates the failing assertion and adds it to the [ParameterObject.subjectPlant]. - * - * Typically it uses [createFailingAssertion] to create the failing assertion and augments it with - * collected assertions or such. - * - * @param parameterObject The [ParameterObject] containing inter alia [ParameterObject.assertionCreator], the - * lambda which could have created subsequent assertions for the transformed [AssertionPlant.subject][SubjectProvider.subject]. - * - * @throws AssertionError Might throw an [AssertionError] depending on the [ParameterObject.subjectPlant]. - */ - fun createAndAddAssertionToPlant(parameterObject: ParameterObject) - - /** - * Creates the failing [Assertion] based on the given [description] and [representation] - */ - fun createFailingAssertion(description: Translatable, representation: Any): Assertion - } - - /** - * A parameter object which contains all necessary information to report a failure - * - * @param description Describes what assertion the type transformation represents, e.g. `is a` in case of a down cast. - * @param representation The representation of the expected result, e.g. `Int::class` in case of a down cast - * from [Number] to [Int]. - * @param subjectPlant The plant to which the assertion (including additional assertions created by - * [assertionCreator]) should be added. - * @param assertionCreator The lambda which can create subsequent assertions for the transformed - * [AssertionPlant.subject][SubjectProvider.subject] in case the type transformation succeeds - * @param warningTransformationFailed Explains why the [subjectPlant]'s [subject][SubjectProvider.subject] - * could not be transformed to the desired type. - */ - @Deprecated("Switch from `Assert` to `Expect` use `SubjectChanger` instead; will be removed with 1.0.0") - data class ParameterObject( - val description: Translatable, - val representation: Any, - val subjectPlant: BaseAssertionPlant, - val assertionCreator: AssertionPlant.() -> Unit, - val warningTransformationFailed: Translatable - ) -} diff --git a/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/any/typetransformation/creators/AnyTypeTransformationAssertions.kt b/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/any/typetransformation/creators/AnyTypeTransformationAssertions.kt deleted file mode 100644 index 80615a25e..000000000 --- a/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/any/typetransformation/creators/AnyTypeTransformationAssertions.kt +++ /dev/null @@ -1,62 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0 */) - -package ch.tutteli.atrium.domain.creating.any.typetransformation.creators - -import ch.tutteli.atrium.core.polyfills.loadSingleService -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.creating.AssertionPlantNullable -import ch.tutteli.atrium.creating.BaseAssertionPlant -import ch.tutteli.atrium.domain.creating.any.typetransformation.AnyTypeTransformation -import ch.tutteli.atrium.reporting.translating.Translatable -import kotlin.reflect.KClass - -/** - * The access point to an implementation of [AnyTypeTransformationAssertions]. - * - * It loads the implementation lazily via [loadSingleService]. - */ -@Deprecated("Switch from `Assert` to `Expect` and use anyAssertions or subjectChanger instead; will be removed with 1.0.0") -val anyTypeTransformationAssertions by lazy { loadSingleService(AnyTypeTransformationAssertions::class) } - - -/** - * Defines the minimum set of assertion functions representing a type transformation, - * which an implementation of the domain of Atrium has to provide. - */ -@Deprecated("Switch from `Assert` to `Expect` and use AnyAssertions instead; will be removed with 1.0.0") -interface AnyTypeTransformationAssertions { - - - @Deprecated( - "This function will be removed in v.1.0.0 in favour of AssertImpl.any.isNotNull", ReplaceWith( - "plant.addAssertion(AssertImpl.any.isNotNull(plant, type, assertionCreator))", - "ch.tutteli.atrium.domain.builders.AssertImpl" - ) - ) - fun isNotNull( - plant: AssertionPlantNullable, - type: KClass, - assertionCreator: AssertionPlant.() -> Unit - ) - - fun isA( - plant: AssertionPlant, - subType: KClass, - assertionCreator: AssertionPlant.() -> Unit - ) - - fun downCast( - description: Translatable, - subType: KClass, - subjectPlant: BaseAssertionPlant, - assertionCreator: AssertionPlant.() -> Unit, - failureHandler: AnyTypeTransformation.FailureHandler - ) - - fun transform( - parameterObject: AnyTypeTransformation.ParameterObject, - canBeTransformed: (S) -> Boolean, - transform: (S) -> T, - failureHandler: AnyTypeTransformation.FailureHandler - ) -} diff --git a/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/any/typetransformation/failurehandlers/FailureHandlerFactory.kt b/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/any/typetransformation/failurehandlers/FailureHandlerFactory.kt deleted file mode 100644 index 356c16a15..000000000 --- a/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/any/typetransformation/failurehandlers/FailureHandlerFactory.kt +++ /dev/null @@ -1,50 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0 */) - -package ch.tutteli.atrium.domain.creating.any.typetransformation.failurehandlers - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.assertions.AssertionGroup -import ch.tutteli.atrium.assertions.ExplanatoryAssertionGroupType -import ch.tutteli.atrium.core.polyfills.loadSingleService -import ch.tutteli.atrium.domain.creating.any.typetransformation.AnyTypeTransformation - -/** - * The access point to an implementation of [FailureHandlerFactory]. - * - * It loads the implementation lazily via [loadSingleService]. - */ -@Suppress("DEPRECATION") -@Deprecated("Use subjectChanger instead; will be removed with 1.0.0") -val failureHandlerFactory by lazy { loadSingleService(FailureHandlerFactory::class) } - -/** - * Defines the minimum set of [AnyTypeTransformation.FailureHandler]s an implementation of the domain of Atrium - * has to provide. - */ -@Deprecated("Use subjectChanger instead; will be removed with 1.0.0") -interface FailureHandlerFactory { - - /** - * Creates a [AnyTypeTransformation.FailureHandler] which wraps subsequent assertions into an - * [AssertionGroup] with an [ExplanatoryAssertionGroupType] so that the user of Atrium can see in reporting - * what one wanted to assert additionally. - */ - fun newExplanatory(): AnyTypeTransformation.FailureHandler - - /** - * Creates a [AnyTypeTransformation.FailureHandler] which wraps subsequent assertions into an - * [AssertionGroup] with an [ExplanatoryAssertionGroupType] so that the user of Atrium can see in reporting - * what one wanted to assert additionally -- moreover it includes a hint about the subject which shall only be shown - * if [showHint] evaluates to `true` in which case the given [failureHintFactory] should be used to create the hint. - * - * As an example, Atrium uses this failure handler internally to show the message of a thrown [Throwable] in case - * it is of a different type than the expected one. - * - * @param showHint Indicates whether the failure hint shall be included or not - * @param failureHintFactory Creates the failure hint. - */ - fun newExplanatoryWithHint( - showHint: () -> Boolean, - failureHintFactory: () -> Assertion - ): AnyTypeTransformation.FailureHandler -} diff --git a/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/basic/contains/Contains.kt b/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/basic/contains/Contains.kt deleted file mode 100644 index c3b796e6c..000000000 --- a/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/basic/contains/Contains.kt +++ /dev/null @@ -1,115 +0,0 @@ -package ch.tutteli.atrium.domain.creating.basic.contains - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.assertions.AssertionGroup -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.domain.creating.basic.contains.Contains.* -import ch.tutteli.atrium.reporting.translating.Translatable - -/** - * Defines the basic contract for sophisticated `contains` assertion builders. - * - * The entry point for the contract constitutes a [Contains.Builder]. - * A builder typically allows a user to choose a desired [SearchBehaviour], one or more [Checker]s and uses an - * [Creator] to finish the building process. - */ -interface Contains { - - /** - * The entry point of the contract, containing the [subjectProvider] -- i.e. the subject of the assertion - * for which the sophisticated `contain` assertion should be created -- as well as the chosen [searchBehaviour]. - * - * The [searchBehaviour] might me modified in which case it is recommended that a new [Builder] is created (retain - * immutability). - */ - interface Builder { - /** - * The [SubjectProvider] from which this building process started and to which the resulting [Assertion] - * should be added. - */ - val subjectProvider: SubjectProvider - - /** - * The chosen [SearchBehaviour]. - */ - val searchBehaviour: S - } - - /** - * The step of choosing/defining [Checker]s. - */ - interface CheckerOption> { - /** - * The previously chosen [Builder], containing inter alia the [SubjectProvider] to which the resulting - * [Assertion] shall be added. - */ - val containsBuilder: B - - /** - * Contains all [Checker]s which should be applied to the search result. - * - * It typically contains the [Checker] this builder created and might contain other [Checker]s which builders, - * precedent to this builder within the fluent API, created already. - */ - val checkers: List - } - - /** - * Represents a search behaviour but leaves it up to the [Creator] how this behaviour is implemented -- yet, it - * provides a method to decorate a description (a [Translatable]) in order that it reflects the search behaviour. - */ - interface SearchBehaviour { - /** - * Decorates the given [description] so that it represents the search behaviour and returns the result. - * - * @return The decorated [description]. - */ - fun decorateDescription(description: Translatable): Translatable - } - - /** - * 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. - */ - interface Checker { - /** - * Creates an [Assertion] representing this check based on the given [foundNumberOfTimes] which is the result - * of the search. - * - * @return The newly created [Assertion]. - */ - fun createAssertion(foundNumberOfTimes: Int): Assertion - } - - /** - * Represents the final step of a sophisticated `contains` assertion builder which creates the [AssertionGroup] - * as such. - * - * @param T The type of the subject of the assertion. - * @param SC The type of the search criteria. - */ - interface Creator { - /** - * Creates an [AssertionGroup] representing the sophisticated `contains` assertion for the - * subject the given [subjectProvider] provides, based on the given [searchCriteria]. - * - * The search process as such is usually influenced by a [SearchBehaviour] which defines the search behaviour - * and [Checker]s are used to create [Assertion]s based on a determined search result which are grouped - * together into an [AssertionGroup]. - * This resulting [AssertionGroup] represents the sophisticated `contains` assertion as a whole. - * - * @param subjectProvider Provides the subject for which the [AssertionGroup] is created. - * @param searchCriteria The search criteria - typically not empty. - * - * @return The newly created [AssertionGroup]. - * - * @throws IllegalArgumentException Might throw an [IllegalArgumentException] in case [searchCriteria] is empty - * and an empty value is not allowed. - */ - fun createAssertionGroup( - subjectProvider: SubjectProvider, - searchCriteria: List - ): AssertionGroup - } -} diff --git a/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/changers/ChangedSubjectPostStep.kt b/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/changers/ChangedSubjectPostStep.kt deleted file mode 100644 index 7cca875e6..000000000 --- a/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/changers/ChangedSubjectPostStep.kt +++ /dev/null @@ -1,32 +0,0 @@ -//TODO remove with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.domain.creating.changers - -import ch.tutteli.atrium.creating.Expect - -/** - * Option step which allows to decide what should be done with the transformed subject of type [R]. - * - * Notice, this class does not add any functionality to [PostFinalStep] and is more like a marker. - * The purpose of the marker is extensibility, this way you can write a post-final-step which only applies to - * [ChangedSubjectPostStep] and not to all kind of [PostFinalStep]. - * - * @param expect The [Expect] which was involved in the building process - * and holds assertion for the initial subject. - * @param transform The subject transformation which creates and returns a new [Expect] of type [R]. - * @param transformAndApply The subject transformation which not only creates and - * returns a new [Expect] of type [R] but also applies a given assertionCreator lambda. - */ -@Deprecated( - "Use SubjectChangerBuilder.ExecutionStep from atrium-logic; will be removed with 1.0.0", - ReplaceWith( - "ch.tutteli.atrium.logic.creating.transformers.SubjectChangerBuilder.ExecutionStep(expect._logic, transform, transformAndApply)", - "ch.tutteli.atrium.logic._logic" - ) -) -class ChangedSubjectPostStep( - expect: Expect, - transform: Expect.() -> Expect, - transformAndApply: Expect.(Expect.() -> Unit) -> Expect -) : PostFinalStep>(expect, transform, transformAndApply) diff --git a/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/changers/ExtractedFeaturePostStep.kt b/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/changers/ExtractedFeaturePostStep.kt deleted file mode 100644 index 86e3bebe2..000000000 --- a/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/changers/ExtractedFeaturePostStep.kt +++ /dev/null @@ -1,33 +0,0 @@ -//TODO remove with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.domain.creating.changers - -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.creating.FeatureExpect - -/** - * Option step which allows to decide what should be done with the extracted feature of type [R]. - * - * Notice, this class does not add any functionality to [PostFinalStep] and is more like a marker. - * The purpose of the marker is extensibility, this way you can write a post-final-step which only applies to - * [ExtractedFeaturePostStep] and not to all kind of [PostFinalStep]. - * - * @param expect The [Expect] which was involved in the building process - * and holds assertion for the initial subject. - * @param extract The extraction of the feature which creates and returns a new [Expect] of type [R]. - * @param extractAndApply The extraction of the feature which not only creates and - * returns a new [Expect] of type [R] but also applies a given assertionCreator lambda. - */ -@Deprecated( - "Use FeatureExtractorBuilder.ExecutionStep from atrium-logic; will be removed with 1.0.0", - ReplaceWith( - "ch.tutteli.atrium.logic.creating.transformers.FeatureExtractorBuilder.ExecutionStep(expect._logic, extract, extractAndApply)", - "ch.tutteli.atrium.logic._logic" - ) -) -class ExtractedFeaturePostStep( - expect: Expect, - extract: Expect.() -> FeatureExpect, - extractAndApply: Expect.(Expect.() -> Unit) -> Expect -) : PostFinalStep>(expect, extract, extractAndApply) diff --git a/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/changers/FeatureExtractor.kt b/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/changers/FeatureExtractor.kt deleted file mode 100644 index 1f067cf29..000000000 --- a/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/changers/FeatureExtractor.kt +++ /dev/null @@ -1,69 +0,0 @@ -//TODO remove with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.domain.creating.changers - -import ch.tutteli.atrium.core.None -import ch.tutteli.atrium.core.Option -import ch.tutteli.atrium.core.Some -import ch.tutteli.atrium.core.polyfills.loadSingleService -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.creating.FeatureExpect -import ch.tutteli.atrium.domain.creating.NewFeatureAssertions -import ch.tutteli.atrium.reporting.translating.Translatable - -/** - * The access point to an implementation of [FeatureExtractor]. - * - * It loads the implementation lazily via [loadSingleService]. - */ -@Deprecated("Use _logic.featureExtractor from atrium-logic; will be removed with 1.0.0") -val featureExtractor by lazy { loadSingleService(FeatureExtractor::class) } - -/** - * Defines the contract for sophisticated `safe feature extractions` including assertion creation for the feature. - * - * It is similar to [NewFeatureAssertions] but differs in the intended usage. - * [NewFeatureAssertions] are intended to make assertions about a return value of a method call or a property, - * assuming that the call as such always succeeds (no exception is thrown). - * The [FeatureExtractor] on the other hand should be used if it is already known, - * that the call/access fails depending on given arguments. - * For instance, [List.get] is a good example where it fails if the given index is out of bounds. - */ -@Deprecated( - "Use FeatureExtractor from atrium-logic; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.logic.creating.transformers.FeatureExtractor") -) -interface FeatureExtractor { - - /** - * Extracts a feature according to the given [featureExtraction], creates an [Expect] for the - * new subject and applies [maybeSubAssertions] in case they are specified. - * - * - * @param originalAssertionContainer the assertion container with the current subject (before the change) -- - * if you use `ExpectImpl.changeSubject.reported(...)` within an assertion function (an extension function of - * [Expect]) then you usually pass `this` (so the instance of [Expect]) for this parameter. - * @param description Describes the feature - * @param representationForFailure Representation in case the extraction cannot be carried out. - * @param featureExtraction Extracts the feature where it returns the feature wrapped into a [Some] if the - * extraction as such can be carried out, otherwise [None]. - * @param maybeSubAssertions Optionally, subsequent assertions for the feature (the new subject). - * This is especially useful if the extraction cannot be carried out, because this way we can then already - * show to you (in error reporting) what you wanted to assert about the feature (which gives you more context to - * the error). - * @param representationInsteadOfFeature Per default the feature as such is used to represent itself. However, - * if you want a different representation, then use this parameter where passing `null` still means use the - * feature. - * - * @return The newly created [Expect] for the extracted feature. - */ - fun extract( - originalAssertionContainer: Expect, - description: Translatable, - representationForFailure: Any, - featureExtraction: (T) -> Option, - maybeSubAssertions: Option.() -> Unit>, - representationInsteadOfFeature: ((R) -> Any)? = null - ): FeatureExpect -} diff --git a/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/changers/PostFinalStep.kt b/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/changers/PostFinalStep.kt deleted file mode 100644 index 30a450850..000000000 --- a/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/changers/PostFinalStep.kt +++ /dev/null @@ -1,68 +0,0 @@ -package ch.tutteli.atrium.domain.creating.changers - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.domain.creating.collectors.assertionCollector - -/** - * Step which kind of holds the state of a previous final step related to a subject change/feature extraction etc. - * and now allows to decide what should happen with it. - * - * @param T The type of the current [Expect], the current subject of the assertion respectively. - * @param R The type of the new [Expect], the new subject of the assertion respectively. - * - * @property expect [Expect] which was involved in the building process - * and holds assertion for the initial subject. - * @property action An action such as transform, extract etc. which creates and returns a new [Expect] of type [R]. - * @property actionAndApply An action such as transform, extract etc. which not only creates and - * returns a new [Expect] of type [R] but also applies a given assertionCreator lambda. - */ -@Deprecated("Use TransformationExecutionStep from atrium-logic; will be removed with 1.0.0") -abstract class PostFinalStep>( - protected val expect: Expect, - protected val action: Expect.() -> E, - protected val actionAndApply: Expect.(Expect.() -> Unit) -> Expect -) { - - /** - * Returns the newly created [Expect] for the feature. - */ - fun getExpectOfFeature(): E = action(expect) - - /** - * Collects the assertions the given [assertionCreator] might create for the new [Expect] of the feature - * and returns them as a single [Assertion] - * - * @returns An assertion consisting of all assertions the given [assertionCreator] might create - * for the new [Expect] of the feature. - */ - fun collect(assertionCreator: Expect.() -> Unit): Assertion = assertionCollector.collect(expect) { - actionAndApply(this, assertionCreator) - } - - - /** - * Creates a new [Expect] for the feature, adds all assertions the given [assertionCreator] creates for it - * and returns the new [Expect]. - * @returns An assertion consisting of all assertions the given [assertionCreator] might create - * for the new [Expect] of the feature. - */ - fun addToFeature(assertionCreator: Expect.() -> Unit): Expect { - return actionAndApply(expect) { - // collect also checks that the user specified at least one assertion in the assertionCreator lambda - addAssertion(assertionCollector.collect(this, assertionCreator)) - } - } - - /** - * Creates a new [Expect] for the feature, adds all assertions the given [assertionCreator] creates for it - * and returns the initial [Expect]. - * - * @returns An assertion consisting of all assertions the given [assertionCreator] might create - * for the new [Expect] of the feature. - */ - fun addToInitial(assertionCreator: Expect.() -> Unit): Expect { - // collect also checks that the user specified at least one assertion in the assertionCreator lambda - return expect.addAssertion(collect(assertionCreator)) - } -} diff --git a/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/changers/SubjectChanger.kt b/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/changers/SubjectChanger.kt deleted file mode 100644 index ef6ad8467..000000000 --- a/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/changers/SubjectChanger.kt +++ /dev/null @@ -1,178 +0,0 @@ -@file:Suppress( -/* TODO remove annotation with 1.0.0 */ "DEPRECATION", -/* TODO remove annotation with 1.0.0 */ "TYPEALIAS_EXPANSION_DEPRECATION" -) - -package ch.tutteli.atrium.domain.creating.changers - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.core.None -import ch.tutteli.atrium.core.Option -import ch.tutteli.atrium.core.Some -import ch.tutteli.atrium.core.polyfills.loadSingleService -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.AssertionPlantNullable -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.reporting.translating.Translatable - -/** - * The access point to an implementation of [SubjectChanger]. - * - * It loads the implementation lazily via [loadSingleService]. - */ -@Deprecated("Use _logic.subjectChanger from atrium-logic; will be removed with 1.0.0") -val subjectChanger by lazy { loadSingleService(SubjectChanger::class) } - -/** - * Defines the contract to change the subject of an assertion container (e.g. the subject of [Expect]) by creating - * a new [Expect] whereas the new [Expect] delegates assertion checking to a given original assertion container. - */ -@Deprecated( - "Use SubjectChanger from atrium-logic; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.logic.creating.transformers.SubjectChanger") -) -interface SubjectChanger { - - /** - * Changes to a new subject according to the given [transformation] without showing it - * in reporting and returns a new [Expect] for the new subject. - * - * Explained a bit more in depth: it creates a new [Expect] incorporating the given [transformation] - * whereas the new [Expect] delegates assertion checking to the given [originalAssertionContainer] - - * the change as such will not be reflected in reporting. - * - * This method is useful if you want to make feature assertion(s) but you do not want that the feature is shown up - * in reporting. For instance, if a class can behave as another class (e.g. `Sequence::asIterable`) or you want to - * hide a conversion (e.g. `Int::toChar`) then you can use this function. - * - * Notice, in case the change to the new subject is not always safe (you assert so but it does not have to be), - * then you should use [reported] so that the assertion is reflected in reporting. - * - * @param originalAssertionContainer the assertion container with the current subject (before the change) -- - * if you use `ExpectImpl.changeSubject(...).unreported` within an assertion function (an extension function of - * [Expect]) then you usually pass `this` (so the instance of [Expect]) for this parameter. - * @param transformation Provides the subject. - * - * @return The newly created [Expect] for the extracted feature. - */ - fun unreported( - originalAssertionContainer: Expect, - transformation: (T) -> R - ): Expect - - - /** - * Changes to a new subject according to the given [transformation] -- - * the change as such is reflected in reporting by the given [description] and [representation]. - * - * Explained a bit more in depth: it creates a new [Expect] incorporating the given [transformation] - * whereas the new [Expect] delegates assertion checking to the given [originalAssertionContainer]. - * The [transformation] as such can either return the new subject wrapped in a [Some] or [None] in case - * the transformation cannot be carried out. - * - * This method is useful if you want to change the subject whereas the change as such is assertion like as well, so - * that it should be reported as well. For instance, say you want to change the subject of type `Int?` to `Int`. - * Since the subject could also be `null` it makes sense to report this assertion instead of failing - * with an exception. - * - * @param originalAssertionContainer the assertion container with the current subject (before the change) -- - * if you use `ExpectImpl.changeSubject.reported(...)` within an assertion function (an extension function of - * [Expect]) then you usually pass `this` (so the instance of [Expect]) for this parameter. - * @param description Describes the kind of subject change (e.g. in case of a type change `is a`). - * @param representation Representation of the change (e.g. in case of a type transformation the KClass). - * @param transformation Provides the subject wrapped into a [Some] if the extraction as such can be carried out - * otherwise [None]. - * @param failureHandler The [FailureHandler] which shall be used in case the subject cannot be transformed. - * A failure has the chance to augment the failing assertion representing the failed transformation with further - * information. - * @param maybeSubAssertions Optionally, subsequent assertions for the new subject. This is especially useful if the - * change fails since we can then already show to you (in error reporting) what you wanted to assert about - * the new subject (which gives you more context to the error). - * - * @return The newly created [Expect] for the extracted feature. - */ - fun reported( - originalAssertionContainer: Expect, - description: Translatable, - representation: Any, - transformation: (T) -> Option, - failureHandler: FailureHandler, - maybeSubAssertions: Option.() -> Unit> - ): Expect - - /** - * Represents a handler which is responsible to create the assertion resulting from a failed subject change. - * - * A handler should augment the failing assertion with explanatory assertions in case the user supplied an - * assertionCreator lambda. Yet, a failure handler might also add additional information -- e.g. regarding the - * current subject. - * - * @param T The type of the subject - * @param R The type of the subject after the subject change (if it were possible). - */ - @Deprecated( - "Use SubjectChanger.FailureHandler from atrium-logic; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.logic.creating.transformers.SubjectChanger.FailureHandler") - ) - interface FailureHandler { - /** - * Creates the failing assertion most likely based on the given [descriptiveAssertion] -- which in turn - * is based on the previously specified description, representation etc. -- and should incorporate - * the assertions [maybeAssertionCreator] would have created for the new subject as explanatory assertions. - * - * @return A failing assertion. - */ - fun createAssertion( - originalAssertionContainer: Expect, - descriptiveAssertion: Assertion, - maybeAssertionCreator: Option.() -> Unit> - ): Assertion - } - - @Suppress("DEPRECATION") - @Deprecated("Do no longer use Assert, use Expect instead - this method was introduced in 0.9.0 to ease the migration from Assert to Expect; will be removed with 1.0.0") - fun unreportedToAssert( - originalPlant: SubjectProvider, - transformation: (T) -> R - ): Assert - - @Suppress("DEPRECATION") - @Deprecated("Do no longer use Assert, use Expect instead - this method was introduced in 0.9.0 to ease the migration from Assert to Expect; will be removed with 1.0.0") - fun unreportedNullableToAssert( - originalPlant: SubjectProvider, - transformation: (T) -> R - ): AssertionPlantNullable -} - -/** - * Represents a [SubjectChanger.FailureHandler] which as an adapter for another failure handler by mapping first - * the given subject to another type [R1] which is understood as input of the other failure handler. - * - * Effectively turning a `FailureHandler` into a `FailureHandler` with the help of a mapping - * function `(T) -> R1` - * - * @param T The type of the subject - * @param R1 The type of the mapped subject - * @param R The type of the subject after the subject change (if it were possible). - */ -@Deprecated( - "Use FailureHandlerAdapter from atrium-logic; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.logic.creating.transformers.FailureHandlerAdapter") -) -class FailureHandlerAdapter( - val failureHandler: SubjectChanger.FailureHandler, - val map: (T) -> R1 -) : SubjectChanger.FailureHandler { - - override fun createAssertion( - originalAssertionContainer: Expect, - descriptiveAssertion: Assertion, - maybeAssertionCreator: Option.() -> Unit> - ): Assertion { - return subjectChanger.unreported(originalAssertionContainer, map) - .let { - failureHandler.createAssertion(it, descriptiveAssertion, maybeAssertionCreator) - } - } -} diff --git a/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/charsequence/contains/CharSequenceContains.kt b/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/charsequence/contains/CharSequenceContains.kt deleted file mode 100644 index 576dcd2dd..000000000 --- a/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/charsequence/contains/CharSequenceContains.kt +++ /dev/null @@ -1,86 +0,0 @@ -//TODO remove with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.domain.creating.charsequence.contains - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.assertions.AssertionGroup -import ch.tutteli.atrium.domain.creating.basic.contains.Contains -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains.* -import ch.tutteli.atrium.domain.creating.charsequence.contains.creators.CharSequenceContainsAssertions -import ch.tutteli.atrium.reporting.translating.Translatable - -/** - * Defines the contract for sophisticated [CharSequence] `contains` [Assertion] builders. - * - * The building process is typically started by the creation of a [Builder], - * goes on by specifying a desired [SearchBehaviour], - * defines which [Checker]s should be applied and - * is finalized by one of the [CharSequenceContainsAssertions] - * which usually use a [Creator] which in turn use a [Searcher]. - */ -@Deprecated("Use the CharSequenceContains from atrium-logic; will be removed with 1.0.0") -interface CharSequenceContains { - - /** - * The entry point of the contract, containing the [subjectProvider] -- i.e. the subject of the assertion - * for which the sophisticated `contain` assertion should be created -- as well as the chosen [searchBehaviour]. - * - * The [searchBehaviour] might me modified in which case it is recommended that a new [Builder] is created (retain - * immutability). - */ - interface Builder : Contains.Builder - - /** - * The step of choosing/defining [Checker]s. - */ - interface CheckerOption - : Contains.CheckerOption> - - /** - * Represents a search behaviour but leaves it up to the [Searcher] how this behaviour is implemented -- yet, it - * provides a method to decorate a description (a [Translatable]) in order that it reflects the search behaviour. - */ - interface SearchBehaviour : Contains.SearchBehaviour - - /** - * Represents the final step of a sophisticated `contains` assertion builder which creates the [AssertionGroup] - * as such. - * - * @param T The type of the suject of the assertion. - * @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. - */ - interface Checker : Contains.Checker - - /** - * Represents a searcher which supports the search behaviour [S] for a given input [CharSequence] of the search. - * - * @param S The search behaviour which should be applied to the input [CharSequence] in which the [Searcher] - * will look for something -- the actual implementation of the search behaviour happens in the - * [Searcher]; [SearchBehaviour] only decorates the [Translatable] for reporting. - * @param SC The search criterion - */ - interface Searcher { - /** - * Searches in the given [searchIn] for the given [searchFor], using its [toString][Any.toString] - * implementation, and returns the number of occurrences. - * - * Whether searches are disjoint or non-disjoint is up to the implementation. - * - * @param searchIn The input [CharSequence] in which this [Searcher] shall search - * @param searchFor The object which shall be found - * - * @return The number of occurrences of [searchFor] in [searchIn]. - */ - fun search(searchIn: CharSequence, searchFor: SC): Int - } -} - diff --git a/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/charsequence/contains/checkers/CheckerFactory.kt b/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/charsequence/contains/checkers/CheckerFactory.kt deleted file mode 100644 index 8fed754df..000000000 --- a/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/charsequence/contains/checkers/CheckerFactory.kt +++ /dev/null @@ -1,80 +0,0 @@ -//TODO remove with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.domain.creating.charsequence.contains.checkers - -import ch.tutteli.atrium.core.polyfills.loadSingleService -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains - -/** - * The access point to an implementation of [CheckerFactory]. - * - * It loads the implementation lazily via [loadSingleService]. - */ -@Deprecated("Use the CharSequence.Contains.Checker's from atrium-logic; will be removed with 1.0.0") -val checkerFactory by lazy { loadSingleService(CheckerFactory::class) } - - -/** - * Defines the minimum set of [CharSequenceContains.Checker]s an implementation of the domain of Atrium - * has to provide. - */ -@Deprecated("Use the `CharSequence.Contains.Checker`s from atrium-logic; will be removed with 1.0.0") -interface CheckerFactory { - /** - * Creates an [CharSequenceContains.Checker] which verifies that an expected object is contained at least [times] - * in the search input. - * - * @param times The number which the check uses to compare against the actual number of times an expected object is - * found in the input of the search. - * @param nameContainsNotFun The function which should be used instead of `atLeastCall` when [times] equals to zero. - * @param atLeastCall The function which was used and should not be used if [times] equals to zero. - * - * @throws IllegalArgumentException In case [times] is smaller than 1. - */ - fun newAtLeastChecker( - times: Int, - nameContainsNotFun: String, - atLeastCall: (Int) -> String - ): CharSequenceContains.Checker - - /** - * Creates an [CharSequenceContains.Checker] which verifies that an expected object is contained at most [times] - * in the search input. - * - * @param times The number which the check uses to compare against the actual number of times an expected object is - * found in the input of the search. - * @param nameContainsNotFun The function which should be used instead of `atMostCall` when [times] equals to zero. - * @param atMostCall The function which was used and should not be used if [times] equals to zero. - * - * @throws IllegalArgumentException In case [times] is smaller than 1. - */ - fun newAtMostChecker( - times: Int, - nameContainsNotFun: String, - atMostCall: (Int) -> String - ): CharSequenceContains.Checker - - /** - * Creates an [CharSequenceContains.Checker] which verifies that an expected object is contained exactly [times] - * in the search input. - * - * @param times The number which the check uses to compare against the actual number of times an expected object is - * found in the input of the search. - * @param nameContainsNotFun The function which should be used instead of `exactlyCall` when [times] equals to zero. - * @param exactlyCall The function call which was used and should not be used if [times] equals to zero. - * - * @throws IllegalArgumentException In case [times] is smaller than 1. - */ - fun newExactlyChecker( - times: Int, - nameContainsNotFun: String, - exactlyCall: (Int) -> String - ): CharSequenceContains.Checker - - /** - * Creates an [CharSequenceContains.Checker] which verifies that an expected object is not contained - * in the search input. - */ - fun newNotChecker(): CharSequenceContains.Checker -} diff --git a/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/charsequence/contains/creators/CharSequenceContainsAssertions.kt b/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/charsequence/contains/creators/CharSequenceContainsAssertions.kt deleted file mode 100644 index d23dfd1f1..000000000 --- a/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/charsequence/contains/creators/CharSequenceContainsAssertions.kt +++ /dev/null @@ -1,63 +0,0 @@ -//TODO remove with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.domain.creating.charsequence.contains.creators - -import ch.tutteli.atrium.assertions.AssertionGroup -import ch.tutteli.atrium.core.polyfills.loadSingleService -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains -import ch.tutteli.atrium.domain.creating.charsequence.contains.searchbehaviours.IgnoringCaseSearchBehaviour -import ch.tutteli.atrium.domain.creating.charsequence.contains.searchbehaviours.NoOpSearchBehaviour -import ch.tutteli.atrium.domain.creating.typeutils.CharSequenceOrNumberOrChar -import ch.tutteli.atrium.reporting.translating.Translatable - -/** - * The access point to an implementation of [CharSequenceContainsAssertions]. - * - * It loads the implementation lazily via [loadSingleService]. - */ -@Deprecated("Use the CharSequenceContainsAssertions from atrium-logic; will be removed with 1.0.0") -val charSequenceContainsAssertions by lazy { loadSingleService(CharSequenceContainsAssertions::class) } - - -/** - * Defines the minimum set of `contains` assertion functions for [CharSequence], - * which an implementation of the domain of Atrium has to provide. - */ -@Deprecated("Use the CharSequenceContainsAssertions from atrium-logic; will be removed with 1.0.0") -interface CharSequenceContainsAssertions { - - fun values( - checkerOption: CharSequenceContains.CheckerOption, - expected: List - ): AssertionGroup - - fun valuesIgnoringCase( - checkerOption: CharSequenceContains.CheckerOption, - expected: List - ): AssertionGroup - - //TODO remove with 1.0.0 - @Deprecated("Will be removed with 1.0.0") - fun defaultTranslationOf( - checkerOption: CharSequenceContains.CheckerOption, - expected: List - ): AssertionGroup - - //TODO remove with 1.0.0 - @Deprecated("Will be removed with 1.0.0") - fun defaultTranslationOfIgnoringCase( - checkerOption: CharSequenceContains.CheckerOption, - expected: List - ): AssertionGroup - - fun regex( - checkerOption: CharSequenceContains.CheckerOption, - expected: List - ): AssertionGroup - - fun regexIgnoringCase( - checkerOption: CharSequenceContains.CheckerOption, - expected: List - ): AssertionGroup -} diff --git a/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/charsequence/contains/searchbehaviours/IgnoringCaseSearchBehaviour.kt b/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/charsequence/contains/searchbehaviours/IgnoringCaseSearchBehaviour.kt deleted file mode 100644 index 29a318d3e..000000000 --- a/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/charsequence/contains/searchbehaviours/IgnoringCaseSearchBehaviour.kt +++ /dev/null @@ -1,13 +0,0 @@ -//TODO remove with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.domain.creating.charsequence.contains.searchbehaviours - -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains - -/** - * Represents the search behaviour that a [CharSequenceContains.Searcher] should ignore case - * when searching for an expected object. - */ -@Deprecated("Use the IgnoringCaseSearchBehaviour from atrium-logic; will be removed with 1.0.0") -interface IgnoringCaseSearchBehaviour : CharSequenceContains.SearchBehaviour diff --git a/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/charsequence/contains/searchbehaviours/NoOpSearchBehaviour.kt b/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/charsequence/contains/searchbehaviours/NoOpSearchBehaviour.kt deleted file mode 100644 index 14621701d..000000000 --- a/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/charsequence/contains/searchbehaviours/NoOpSearchBehaviour.kt +++ /dev/null @@ -1,22 +0,0 @@ -//TODO remove with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.domain.creating.charsequence.contains.searchbehaviours - -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains -import ch.tutteli.atrium.reporting.translating.Translatable - -/** - * Represents the default search behaviour or rather does not define a search behaviour at all. - * - * It furthermore implements a no operation for [decorateDescription], meaning it passes back the description which - * is passed in (identity function). - */ -@Deprecated("Use the NoOpSearchBehaviour from atrium-logic; will be removed with 1.0.0") -interface NoOpSearchBehaviour : CharSequenceContains.SearchBehaviour { - /** - * Returns the given [description]. - * @return The given [description]. - */ - override fun decorateDescription(description: Translatable) = description -} diff --git a/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/charsequence/contains/searchbehaviours/NotSearchBehaviour.kt b/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/charsequence/contains/searchbehaviours/NotSearchBehaviour.kt deleted file mode 100644 index fad4e1136..000000000 --- a/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/charsequence/contains/searchbehaviours/NotSearchBehaviour.kt +++ /dev/null @@ -1,13 +0,0 @@ -//TODO remove with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.domain.creating.charsequence.contains.searchbehaviours - -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains - -/** - * Represents still the default search behaviour but a [CharSequenceContains.Checker] should be used which verifies - * that the [CharSequenceContains.Searcher] could not find the expected object. - */ -@Deprecated("Use the NotSearchBehaviour from atrium-logic; will be removed with 1.0.0") -interface NotSearchBehaviour : NoOpSearchBehaviour diff --git a/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/charsequence/contains/searchbehaviours/SearchBehaviourFactory.kt b/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/charsequence/contains/searchbehaviours/SearchBehaviourFactory.kt deleted file mode 100644 index 42a06bf56..000000000 --- a/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/charsequence/contains/searchbehaviours/SearchBehaviourFactory.kt +++ /dev/null @@ -1,28 +0,0 @@ -//TODO remove with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.domain.creating.charsequence.contains.searchbehaviours - -import ch.tutteli.atrium.core.polyfills.loadSingleService -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains - -/** - * The access point to an implementation of [SearchBehaviourFactory]. - * - * It loads the implementation lazily via [loadSingleService]. - */ -@Deprecated("Use search behaviours from atrium-logic; will be removed with 1.0.0") -val searchBehaviourFactory by lazy { loadSingleService(SearchBehaviourFactory::class) } - - -/** - * Defines the minimum set of [CharSequenceContains.SearchBehaviour]s an implementation of the domain of Atrium - * has to provide. - */ -@Deprecated("Use search behaviours from atrium-logic; will be removed with 1.0.0") -interface SearchBehaviourFactory { - - fun ignoringCase( - containsBuilder: CharSequenceContains.Builder - ): CharSequenceContains.Builder -} diff --git a/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/collectors/AssertionCollector.kt b/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/collectors/AssertionCollector.kt index 288d07ca3..cef24bba6 100644 --- a/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/collectors/AssertionCollector.kt +++ b/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/collectors/AssertionCollector.kt @@ -69,282 +69,4 @@ interface AssertionCollector { * assertion. */ fun collectForComposition(maybeSubject: Option, assertionCreator: Expect.() -> Unit): List - - /** - * Use this function if you want to make [Assertion](s) about a feature or you perform a type transformation or any - * other action which results in a sub-[AssertionPlant] being created and you do not require this resulting plant. - * - * Or in other words, you do not want to make further assertions about the resulting subject in the resulting sub - * assertion plant. - * - * This function can be useful in several cases. For instance: - * - You are writing an assertion about a feature often enough so that it deserves an own assertion function - * (see e.g. [ch.tutteli.atrium.domain.creating.MapAssertions.hasSize]) - * - You want the collected assertion to be part of an [AssertionGroup] - * - * @param plant The plant from which the [AssertionPlant.subject][SubjectProvider.subject] will be used as subject of the - * [CollectingAssertionPlant]. - * @param assertionCreator A lambda which typically creates a sub [AssertionPlant] and adds assertions - * to it. For instance, if you create a feature assertion or a type transformation assertion, you will typically - * end up creating a sub assertion plant which delegates created [Assertion]s to the [CollectingAssertionPlant]. - * - * @return The collected assertions as an [AssertionGroup] with an [InvisibleAssertionGroupType]. - * - * @throws IllegalArgumentException in case the given [assertionCreator] did not create a single - * assertion, did not pass it to the [CollectingAssertionPlant] respectively. - */ - @Suppress("DeprecatedCallableAddReplaceWith", "DEPRECATION") - @Deprecated("Switch from Assert to Expect and use the other overload; will be removed with 1.0.0") - fun collect( - plant: AssertionPlant, - assertionCreator: CollectingAssertionPlant.() -> Unit - ): AssertionGroup = collect(plant.subjectProvider, assertionCreator) - - /** - * Use this function if you want to make [Assertion](s) about a feature or you perform a type transformation or any - * other action which results in a sub-[AssertionPlant] being created and you do not require this resulting plant. - * - * Or in other words, you do not want to make further assertions about the resulting subject in the resulting sub - * assertion plant. - * - * This function can be useful in several cases. For instance: - * - You are writing an assertion about a feature often enough so that it deserves an own assertion function - * (see e.g. [MapAssertions.hasSize]) - * - You want the collected assertion to be part of an [AssertionGroup] - * - * @param subjectProvider Provides the subject which is used as [CollectingAssertionPlant.subject]. - * @param assertionCreator A lambda which typically creates a sub [AssertionPlant] and adds assertions - * to it. For instance, if you create a feature assertion or a type transformation assertion, you will typically - * end up creating a sub assertion plant which delegates created [Assertion]s to the [CollectingAssertionPlant]. - * - * @return The collected assertions as an [AssertionGroup] with an [InvisibleAssertionGroupType]. - * - * @throws IllegalArgumentException in case the given [assertionCreator] did not create a single - * assertion, did not pass it to the [CollectingAssertionPlant] respectively. - */ - @Suppress("DeprecatedCallableAddReplaceWith", "DEPRECATION") - @Deprecated("Switch from Assert to Expect and use the other overload; will be removed with 1.0.0") - fun collect( - subjectProvider: () -> T, - assertionCreator: CollectingAssertionPlant.() -> Unit - ): AssertionGroup = collect(subjectProvider, coreFactory::newCollectingPlant, assertionCreator) - - /** - * Use this function if you want to make [Assertion](s) about a feature or you perform a type transformation or any - * other action which results in a sub-[AssertionPlantNullable] being created and you do not require this resulting - * plant. - * - * Or in other words, you do not want to make further assertions about the resulting subject in the resulting sub - * assertion plant. - * - * This function can be useful in several cases. For instance: - * - You are writing an assertion about a feature often enough so that it deserves an own assertion function - * (see e.g. [MapAssertions.hasSize]) - * - You want the collected assertion to be part of an [AssertionGroup] - * - * @param plant The plant from which the [AssertionPlantNullable.subject][SubjectProvider.subject] will be used as subject of the - * [CollectingAssertionPlantNullable]. - * @param assertionCreator A lambda which typically creates a sub [AssertionPlantNullable] and adds - * assertions to it. For instance, if you create a feature assertion or a type transformation assertion, you will - * typically end up creating a sub assertion plant which delegates created [Assertion]s to the - * [CollectingAssertionPlantNullable]. - * - * @return The collected assertions as an [AssertionGroup] with an [InvisibleAssertionGroupType]. - * - * @throws IllegalArgumentException in case the given [assertionCreator] did not create a single - * assertion, did not pass it to the [CollectingAssertionPlantNullable] respectively. - */ - @Suppress("DeprecatedCallableAddReplaceWith", "DEPRECATION") - @Deprecated("Switch from Assert to Expect and use the other overload; will be removed with 1.0.0") - fun collectNullable( - plant: AssertionPlantNullable, - assertionCreator: CollectingAssertionPlantNullable.() -> Unit - ): AssertionGroup = collectNullable(plant.subjectProvider, assertionCreator) - - /** - * Use this function if you want to make [Assertion](s) about a feature or you perform a type transformation or any - * other action which results in a sub-[AssertionPlantNullable] being created and you do not require this resulting - * plant. - * - * Or in other words, you do not want to make further assertions about the resulting subject in the resulting sub - * assertion plant. - * - * This function can be useful in several cases. For instance: - * - You are writing an assertion about a feature often enough so that it deserves an own assertion function - * (see e.g. [MapAssertions.hasSize]) - * - You want the collected assertion to be part of an [AssertionGroup] - * - * @param subjectProvider Provides the subject which is used as [CollectingAssertionPlantNullable.subject]. - * @param assertionCreator A lambda which typically creates a sub [AssertionPlantNullable] and adds - * assertions to it. For instance, if you create a feature assertion or a type transformation assertion, you will - * typically end up creating a sub assertion plant which delegates created [Assertion]s to the - * [CollectingAssertionPlantNullable]. - * - * @return The collected assertions as an [AssertionGroup] with an [InvisibleAssertionGroupType]. - * - * @throws IllegalArgumentException in case the given [assertionCreator] did not create a single - * assertion, did not pass it to the [CollectingAssertionPlantNullable] respectively. - */ - @Suppress("DeprecatedCallableAddReplaceWith", "DEPRECATION") - @Deprecated("Switch from Assert to Expect and use the other overload; will be removed with 1.0.0") - fun collectNullable( - subjectProvider: () -> T, - assertionCreator: CollectingAssertionPlantNullable.() -> Unit - ): AssertionGroup = collect(subjectProvider, coreFactory::newCollectingPlantNullable, assertionCreator) - - - /** - * Use this function if you want to make [Assertion](s) about a feature or you perform a type transformation or any - * other action which results in a sub-[BaseAssertionPlant] being created and - * you do not require this resulting plant. - * - * Or in other words, you do not want to make further assertions about the resulting subject in the resulting sub - * assertion plant. - * - * This function can be useful in several cases. For instance: - * - You are writing an assertion about a feature often enough so that it deserves an own assertion function - * (see e.g. [MapAssertions.hasSize]) - * - You want the collected assertion to be part of an [AssertionGroup] - * - * @param subjectProvider Provides the subject which is used as [CollectingAssertionPlantNullable.subject]. - * @param collectingPlantFactory The factory method which creates the appropriate collecting plant which is suitable - * for the given [assertionCreator]. - * @param assertionCreator A lambda which typically creates a sub [AssertionPlant] and adds assertions - * to it. For instance, if you create a feature assertion or a type transformation assertion, you will typically - * end up creating a sub assertion plant which delegates created [Assertion]s to the [CollectingAssertionPlant]. - * - * @return The collected assertions as an [AssertionGroup] with an [InvisibleAssertionGroupType]. - * - * @throws IllegalArgumentException in case the given [assertionCreator] did not create a single - * assertion, did not pass it to the [BaseCollectingAssertionPlant] respectively. - */ - @Suppress("DeprecatedCallableAddReplaceWith", "DEPRECATION") - @Deprecated("Switch from Assert to Expect and use the other overload; will be removed with 1.0.0") - fun , C : BaseCollectingAssertionPlant> collect( - subjectProvider: () -> T, - collectingPlantFactory: (() -> T) -> C, - assertionCreator: C.() -> Unit - ): AssertionGroup - - /** - * Depending on the given [safeToCollect] it either [AssertionCollector.collect]s the assertions the given - * [assertionCreator] might create or it uses it to create an [AssertionGroup] with an - * [ExplanatoryAssertionGroupType]. - * - * @param safeToCollect Indicates whether it is safe to use the [AssertionPlant.subjectProvider] (means it does - * not throw a [PlantHasNoSubjectException] if called) - * @param warningCannotEvaluate The translatable used to explain why the assertions could not be evaluated. - * @param plant The plant from which the [AssertionPlant.subject][SubjectProvider.subject] will be used as subject of the - * [CollectingAssertionPlant]. - * @param assertionCreator A lambda which typically creates a sub [AssertionPlant] and adds assertions - * to it. For instance, if you create a feature assertion or a type transformation assertion, you will typically - * end up creating a sub assertion plant which delegates created [Assertion]s to the [CollectingAssertionPlant]. - */ - @Suppress("DeprecatedCallableAddReplaceWith", "DEPRECATION") - @Deprecated("Switch from Assert to Expect and use the other overload; will be removed with 1.0.0") - fun collectOrExplain( - safeToCollect: Boolean, - warningCannotEvaluate: Translatable, - plant: AssertionPlant, - assertionCreator: CollectingAssertionPlant.() -> Unit - ): AssertionGroup = collectOrExplain(safeToCollect, warningCannotEvaluate, plant.subjectProvider, assertionCreator) - - /** - * Depending on the given [safeToCollect] it either [AssertionCollector.collect]s the assertions the given - * [assertionCreator] might create or it uses it to create an [AssertionGroup] with an - * [ExplanatoryAssertionGroupType]. - * - * @param safeToCollect Indicates whether it is safe to use the [subjectProvider] (means it does - * not throw a [PlantHasNoSubjectException] if called) - * @param warningCannotEvaluate The translatable used to explain why the assertions could not be evaluated. - * @param subjectProvider Provides the subject which is used as [CollectingAssertionPlant.subject]. - * @param assertionCreator A lambda which typically creates a sub [AssertionPlant] and adds assertions - * to it. For instance, if you create a feature assertion or a type transformation assertion, you will typically - * end up creating a sub assertion plant which delegates created [Assertion]s to the [CollectingAssertionPlant]. - */ - @Suppress("DeprecatedCallableAddReplaceWith", "DEPRECATION") - @Deprecated("Switch from Assert to Expect and use the other overload; will be removed with 1.0.0") - fun collectOrExplain( - safeToCollect: Boolean, - warningCannotEvaluate: Translatable, - subjectProvider: () -> T, - assertionCreator: CollectingAssertionPlant.() -> Unit - ): AssertionGroup = collectOrExplain( - safeToCollect, warningCannotEvaluate, subjectProvider, coreFactory::newCollectingPlant, assertionCreator - ) - - /** - * Depending on the given [safeToCollect] it either [AssertionCollector.collect]s the assertions the given - * [assertionCreator] might create or it uses it to create an [AssertionGroup] with an - * [ExplanatoryAssertionGroupType]. - * - * @param safeToCollect Indicates whether it is safe to use the [AssertionPlantNullable.subjectProvider] (means - * it does not throw a [PlantHasNoSubjectException] if called) - * @param warningCannotEvaluate The translatable used to explain why the assertions could not be evaluated. - * @param plant The plant from which the [AssertionPlantNullable.subject][SubjectProvider.subject] will be used as subject of the - * [CollectingAssertionPlantNullable]. - * @param assertionCreator A lambda which typically creates a sub [AssertionPlant] and adds assertions - * to it. For instance, if you create a feature assertion or a type transformation assertion, you will typically - * end up creating a sub assertion plant which delegates created [Assertion]s to the - * [CollectingAssertionPlantNullable]. - */ - @Suppress("DeprecatedCallableAddReplaceWith", "DEPRECATION") - @Deprecated("Switch from Assert to Expect and use the other overload; will be removed with 1.0.0") - fun collectNullableOrExplain( - safeToCollect: Boolean, - warningCannotEvaluate: Translatable, - plant: AssertionPlantNullable, - assertionCreator: CollectingAssertionPlantNullable.() -> Unit - ): AssertionGroup = collectNullableOrExplain( - safeToCollect, warningCannotEvaluate, plant.subjectProvider, assertionCreator - ) - - /** - * Depending on the given [safeToCollect] it either [AssertionCollector.collect]s the assertions the given - * [assertionCreator] might create or it uses it to create an [AssertionGroup] with an - * [ExplanatoryAssertionGroupType]. - * - * @param safeToCollect Indicates whether it is safe to use the [subjectProvider] (means it does - * not throw a [PlantHasNoSubjectException] if called) - * @param warningCannotEvaluate The translatable used to explain why the assertions could not be evaluated. - * @param subjectProvider Provides the subject which is used as [CollectingAssertionPlantNullable.subject]. - * @param assertionCreator A lambda which typically creates a sub [AssertionPlant] and adds assertions - * to it. For instance, if you create a feature assertion or a type transformation assertion, you will typically - * end up creating a sub assertion plant which delegates created [Assertion]s to the - * [CollectingAssertionPlantNullable]. - */ - @Suppress("DeprecatedCallableAddReplaceWith", "DEPRECATION") - @Deprecated("Switch from Assert to Expect and use the other overload; will be removed with 1.0.0") - fun collectNullableOrExplain( - safeToCollect: Boolean, - warningCannotEvaluate: Translatable, - subjectProvider: () -> T, - assertionCreator: CollectingAssertionPlantNullable.() -> Unit - ): AssertionGroup = collectOrExplain( - safeToCollect, warningCannotEvaluate, subjectProvider, coreFactory::newCollectingPlantNullable, assertionCreator - ) - - /** - * Depending on the given [safeToCollect] it either [AssertionCollector.collect]s the assertions the given - * [assertionCreator] might create or it uses it to create an [AssertionGroup] with an [ExplanatoryAssertionGroupType]. - * - * @param safeToCollect Indicates whether it is safe to use the [subjectProvider] (means it does - * not throw a [PlantHasNoSubjectException]) - * @param warningCannotEvaluate The [Translatable] used to explain why the assertions could not be evaluated. - * @param subjectProvider Provides the subject which is used as [BaseCollectingAssertionPlant.subject]. - * @param collectingPlantFactory The factory method which creates the appropriate collecting plant which is suitable - * for the given [assertionCreator]. - * @param assertionCreator A lambda which typically creates a sub [AssertionPlant] and adds assertions - * to it. For instance, if you create a feature assertion or a type transformation assertion, you will typically - * end up creating a sub assertion plant which delegates created [Assertion]s to the [BaseCollectingAssertionPlant]. - */ - @Suppress("DeprecatedCallableAddReplaceWith", "DEPRECATION") - @Deprecated("Switch from Assert to Expect and use the other overload; will be removed with 1.0.0") - fun , C : BaseCollectingAssertionPlant> collectOrExplain( - safeToCollect: Boolean, - warningCannotEvaluate: Translatable, - subjectProvider: () -> T, - collectingPlantFactory: (() -> T) -> C, - assertionCreator: C.() -> Unit - ): AssertionGroup } diff --git a/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/collectors/AssertionCollectorForExplanation.kt b/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/collectors/AssertionCollectorForExplanation.kt deleted file mode 100644 index 59b008178..000000000 --- a/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/collectors/AssertionCollectorForExplanation.kt +++ /dev/null @@ -1,137 +0,0 @@ -package ch.tutteli.atrium.domain.creating.collectors - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.assertions.AssertionGroup -import ch.tutteli.atrium.assertions.ExplanatoryAssertionGroupType -import ch.tutteli.atrium.core.coreFactory -import ch.tutteli.atrium.core.polyfills.loadSingleService -import ch.tutteli.atrium.creating.* -import ch.tutteli.atrium.reporting.translating.Translatable - -/** - * Responsible to collect assertions made in a sub-[AssertionPlant] and intended for explanation. - */ -@Deprecated("Switch from Assert to Expect and use AssertionCollector.collectForComposition instead; will be removed with 1.0.0") -interface AssertionCollectorForExplanation { - - /** - * Collects the [Assertion] created by [assertionCreator] and uses the given [maybeSubject] as - * [CollectingAssertionPlant.subject] if it is [MaybeSubject.Present]. - * - * In case [maybeSubject] is [MaybeSubject.Absent] and [assertionCreator] is accessed, then a - * [PlantHasNoSubjectException] is thrown and caught in which case a single [AssertionGroup] with an - * [ExplanatoryAssertionGroupType] is returned containing the given [warningCannotEvaluate]. - * - * @param warningCannotEvaluate The translatable used to explain why the assertions could not be evaluated. - * @param assertionCreator The function which should at least create one assertion. - * @param maybeSubject The subject which will be used for the [CollectingAssertionPlant]. - * - * @return A list with the collected assertion or an [AssertionGroup] with an [ExplanatoryAssertionGroupType] - * containing a warning if [maybeSubject] is [MaybeSubject.Absent] and an assertion function tries to access it. - * @throws IllegalArgumentException Might throw it in case not a single [Assertion] was collected - * (e.g. ThrowingAssertionCollectorForExplanation does). - */ - @Suppress("DeprecatedCallableAddReplaceWith", "DEPRECATION") - @Deprecated("Switch from Assert to Expect and use the other overload; will be removed with 1.0.0") - fun collect( - warningCannotEvaluate: Translatable, - maybeSubject: MaybeSubject, - assertionCreator: (CollectingAssertionPlant.() -> Unit)? - ): List = collect(warningCannotEvaluate, maybeSubject, coreFactory::newCollectingPlant, assertionCreator) - - /** - * Collects the [Assertion] created by [assertionCreator] and uses the given [maybeSubject] as - * [CollectingAssertionPlantNullable.subject] if it is [MaybeSubject.Present]. - * - * In case [maybeSubject] is [MaybeSubject.Absent] and [assertionCreator] is accessed, then a - * [PlantHasNoSubjectException] is thrown and caught in which case a single [AssertionGroup] with an - * [ExplanatoryAssertionGroupType] is returned containing the given [warningCannotEvaluate]. - * - * @param warningCannotEvaluate The translatable used to explain why the assertions could not be evaluated. - * @param assertionCreator The function which should at least create one assertion. - * @param maybeSubject The subject which will be used for the [CollectingAssertionPlantNullable]. - * - * @return A list with the collected assertion or an [AssertionGroup] with an [ExplanatoryAssertionGroupType] - * containing a warning if [maybeSubject] is `null` and an assertion function tries to access it. - * @throws IllegalArgumentException Might throw it in case not a single [Assertion] was collected - * (e.g. ThrowingAssertionCollectorForExplanation does). - */ - @Suppress("DeprecatedCallableAddReplaceWith", "DEPRECATION") - @Deprecated("Switch from Assert to Expect and use the other overload; will be removed with 1.0.0") - fun collectNullable( - warningCannotEvaluate: Translatable, - maybeSubject: MaybeSubject, - assertionCreator: (CollectingAssertionPlantNullable.() -> Unit)? - ): List = collect( - warningCannotEvaluate, maybeSubject, coreFactory::newCollectingPlantNullable, assertionCreator - ) - - /** - * Collects the [Assertion] created by [assertionCreator] with the collecting assertion plant created by the given - * [collectingPlantFactory] and uses the given [maybeSubject] as [BaseCollectingAssertionPlant.subject] if it is - * [MaybeSubject.Present]. - * - * In case [maybeSubject] is [MaybeSubject.Absent] and [assertionCreator] is accessed, then a - * [PlantHasNoSubjectException] is thrown and caught in which case a single [AssertionGroup] with an - * [ExplanatoryAssertionGroupType] is returned containing the given [warningCannotEvaluate]. - * - * @param warningCannotEvaluate The translatable used to explain why the assertions could not be evaluated. - * @param maybeSubject The subject which will be used for the [AssertionPlant]. - * @param collectingPlantFactory The factory method which creates the appropriate collecting plant which is suitable - * for the given [assertionCreator]. - * @param assertionCreator The function which should at least create one assertion. - - * - * @return A list with the collected assertion or an [AssertionGroup] with an [ExplanatoryAssertionGroupType] - * containing a warning if [maybeSubject] is `null` and an assertion function tries to access it. - * @throws IllegalArgumentException Might throw it in case not a single [Assertion] was collected - * (e.g. ThrowingAssertionCollectorForExplanation does). - */ - @Suppress("DeprecatedCallableAddReplaceWith", "DEPRECATION") - @Deprecated("Switch from Assert to Expect and use the other overload; will be removed with 1.0.0") - fun , C : BaseCollectingAssertionPlant> collect( - warningCannotEvaluate: Translatable, - maybeSubject: MaybeSubject, - collectingPlantFactory: (() -> T) -> C, - assertionCreator: (C.() -> Unit)? - ): List -} - - -/** - * The access point to an implementation of [NonThrowingAssertionCollectorForExplanation]. - * - * It loads the implementation lazily via [loadSingleService]. - */ -@Deprecated("Switch from Assert to Expect and use AssertionCollector.collectForComposition instead -- adds a failing assertion instead of throwing; this interface will be removed with 1.0.0") -@Suppress("DEPRECATION") -val nonThrowingAssertionCollectorForExplanation: NonThrowingAssertionCollectorForExplanation by lazy { - loadSingleService(NonThrowingAssertionCollectorForExplanation::class) -} - -/** - * Represents an assertion collector meant for explanation which does *not* throw in case not a single [Assertion] - * was collected. - */ -@Deprecated("Switch from Assert to Expect and use AssertionCollector.collectForComposition instead -- adds a failing assertion instead of throwing; this interface will be removed with 1.0.0") -@Suppress("DEPRECATION") -interface NonThrowingAssertionCollectorForExplanation : AssertionCollectorForExplanation - - -/** - * The access point to an implementation of [ThrowingAssertionCollectorForExplanation]. - * - * It loads the implementation lazily via [loadSingleService]. - */ -@Deprecated("Switch from Assert to Expect and use AssertionCollector.collectForComposition instead -- adds a failing assertion instead of throwing; this interface will be removed with 1.0.0") -@Suppress("DEPRECATION") -val throwingAssertionCollectorForExplanation: ThrowingAssertionCollectorForExplanation by lazy { - loadSingleService(ThrowingAssertionCollectorForExplanation::class) -} - -/** - * Represents an assertion collector meant for explanation which throws in case not a single [Assertion] was collected. - */ -@Deprecated("Switch from Assert to Expect and use AssertionCollector.collectForComposition instead -- adds a failing assertion instead of throwing; this interface will be removed with 1.0.0") -@Suppress("DEPRECATION") -interface ThrowingAssertionCollectorForExplanation : AssertionCollectorForExplanation diff --git a/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/feature/extract/FeatureExtractor.kt b/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/feature/extract/FeatureExtractor.kt deleted file mode 100644 index 6f39e5b1e..000000000 --- a/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/feature/extract/FeatureExtractor.kt +++ /dev/null @@ -1,174 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0 */) - -package ch.tutteli.atrium.domain.creating.feature.extract - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.assertions.AssertionGroup -import ch.tutteli.atrium.assertions.FeatureAssertionGroupType -import ch.tutteli.atrium.core.CoreFactory -import ch.tutteli.atrium.core.coreFactory -import ch.tutteli.atrium.creating.* -import ch.tutteli.atrium.domain.creating.FeatureAssertions -import ch.tutteli.atrium.domain.creating.feature.extract.creators.featureExtractorCreatorFactory -import ch.tutteli.atrium.domain.creating.feature.extract.impl.DescriptionOptionImpl -import ch.tutteli.atrium.reporting.translating.Translatable -import ch.tutteli.atrium.reporting.translating.Untranslatable - -/** - * Defines the contract for sophisticated `safe feature extractions` including assertion creation for the feature. - * - * It is similar to [FeatureAssertions] but differs in the intended usage. [FeatureAssertions] are intended to make - * assertions about a return value of a method call or a property, regardless if this call/access fails or not. - * The [FeatureExtractor] on the other hand should be used if it is already known, that the call/access fails depending - * on given arguments. For instance, [List.get] is a good example where it fails if the given index is out of bounds. - */ -@Deprecated("Switch from `Assert` to `Expect` and use then FeatureExtractor from package ch.tutteli.atrium.domain.creating.changers instead; will be removed with 1.0.0") -interface FeatureExtractor { - - companion object { - /** - * Entry point to use the feature extractor. - */ - val builder: DescriptionOption = DescriptionOptionImpl() - } - - /** - * Option step which allows to specify the description which will be used to describe the feature. - */ - @Deprecated("Switch from `Assert` to `Expect` and use then FeatureExtractor from package ch.tutteli.atrium.domain.creating.changers instead; will be removed with 1.0.0") - interface DescriptionOption { - /** - * Uses [coreFactory].[newMethodCallFormatter][CoreFactory.newMethodCallFormatter] to create a description - * of a method call with the given [methodName] and the given [arguments]. - */ - fun methodCall(methodName: String, vararg arguments: Any?): ParameterObjectOption = - feature(coreFactory.newMethodCallFormatter().format(methodName, arguments)) - - /** - * Uses the given [featureRepresentation] as description. - */ - fun feature(featureRepresentation: () -> String): ParameterObjectOption = - withDescription(Untranslatable(featureRepresentation)) - - /** - * Uses the given [translatable] as description of the feature. - */ - fun withDescription(translatable: Translatable): ParameterObjectOption - } - - /** - * Option step to define the [ParameterObject]. - */ - @Deprecated("Switch from `Assert` to `Expect` and use then FeatureExtractor from package ch.tutteli.atrium.domain.creating.changers instead; will be removed with 1.0.0") - interface ParameterObjectOption { - /** - * The previously chosen feature description. - */ - val featureDescription: Translatable - - /** - * Uses the given [parameterObject] where a non-nullable feature is extracted by - * [ParameterObject.featureExtraction]. - */ - fun withParameterObject( - parameterObject: ParameterObject - ): Creator = featureExtractorCreatorFactory.create(featureDescription, parameterObject) - - /** - * Uses the given [parameterObject] where a nullable feature is extracted by - * [ParameterObject.featureExtraction]. - */ - fun withParameterObjectNullable( - parameterObject: ParameterObject - ): CreatorNullable = - featureExtractorCreatorFactory.createNullable(featureDescription, parameterObject) - } - - /** - * Final step of the sophisticated `safe feature extraction` where one can define [extractAndAssertIt] - * for the extracted feature or use [extract] to get the assertion plant. - */ - @Deprecated("Switch from `Assert` to `Expect` and use then FeatureExtractor from package ch.tutteli.atrium.domain.creating.changers instead; will be removed with 1.0.0") - interface CreatorLike, C : BaseCollectingAssertionPlant> { - /** - * The previously chosen feature representation. - */ - val featureRepresentation: Translatable - - /** - * The previously created [ParameterObject]. - */ - val parameterObject: ParameterObject - - /** - * Extracts a feature with the help of the specified - * [parameterObject].[featureExtraction][ParameterObject.featureExtraction] if it - * [parameterObject].[canBeExtracted][ParameterObject.canBeExtracted] and returns an assertion plant for it. - * - * @returns The newly created feature assertion plant. - */ - fun extract(): A - - /** - * Extracts a feature with the help of the specified - * [parameterObject].[featureExtraction][ParameterObject.featureExtraction] if it - * [parameterObject].[canBeExtracted][ParameterObject.canBeExtracted] and uses the given [assertionCreator] - * to create feature assertions. - * - * In detail, it creates an [AssertionGroup] of type [FeatureAssertionGroupType] and either uses the given - * [assertionCreator] to create assertions about the feature if - * [parameterObject].[canBeExtracted][ParameterObject.canBeExtracted] evaluates to `true` or - * [assertionCreator] is used to create explanatory assertions - * (in case [parameterObject].[canBeExtracted][ParameterObject.canBeExtracted] evaluates to `false`). - * - * Notice, if [PlantHasNoSubjectException] is thrown during the evaluation of - * [parameterObject].[canBeExtracted][ParameterObject.canBeExtracted], - * then it is assumed reporting is taken place and it is already in the process of collecting assertions for - * explanation. In such a case [assertionCreator] is used to create assertions (not explanatory - * assertions within explanatory assertions). - * - * @param assertionCreator A lambda which creates the [Assertion]s for the extracted feature. - * - * @returns The assertion representing the feature extraction. - */ - fun extractAndAssertIt(assertionCreator: C.() -> Unit): Assertion - } - - /** - * Final step of the sophisticated `safe feature extraction` where one can define [extractAndAssertIt] - * for the extracted feature or use [extract] to get a feature [AssertionPlant]. - */ - @Deprecated("Switch from `Assert` to `Expect` and use then FeatureExtractor from package ch.tutteli.atrium.domain.creating.changers instead; will be removed with 1.0.0") - interface Creator : - CreatorLike, CollectingAssertionPlant> - - /** - * Final step of the sophisticated `safe feature extraction` where one can define [extractAndAssertIt] - * for the extracted feature or use [extract] to get a feature [AssertionPlantNullable]. - */ - @Deprecated("Switch from `Assert` to `Expect` and use then FeatureExtractor from package ch.tutteli.atrium.domain.creating.changers instead; will be removed with 1.0.0") - interface CreatorNullable : - CreatorLike, CollectingAssertionPlantNullable> - - /** - * A parameter object which contains all necessary information to extract a feature -- however, not to create - * assertions. - * - * @param subjectPlant The [AssertionPlant] which contains the subject from which the subject is extracted. - * @param extractionNotSuccessful Used as [AssertionGroup.representation] in case [canBeExtracted] - * evaluates to false. - * @param warningCannotEvaluate The [Translatable] used to explain why the extraction could not be carried out. - - * @param canBeExtracted Indicates whether it is safe to extract the feature or not (e.g. [Map.containsKey] as - * counter part to [Map.get]) - * @param featureExtraction The feature extraction as such (e.g. [Map.get], [List.get] etc.) - */ - @Deprecated("Switch from `Assert` to `Expect` and use then FeatureExtractor from package ch.tutteli.atrium.domain.creating.changers instead; will be removed with 1.0.0") - data class ParameterObject( - val subjectPlant: BaseAssertionPlant, - val extractionNotSuccessful: Translatable, - val warningCannotEvaluate: Translatable, - val canBeExtracted: (TSubject) -> Boolean, - val featureExtraction: (TSubject) -> T - ) -} diff --git a/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/feature/extract/creators/FeatureExtractorCreatorFactory.kt b/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/feature/extract/creators/FeatureExtractorCreatorFactory.kt deleted file mode 100644 index bbf24e582..000000000 --- a/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/feature/extract/creators/FeatureExtractorCreatorFactory.kt +++ /dev/null @@ -1,53 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0 */) - -package ch.tutteli.atrium.domain.creating.feature.extract.creators - -import ch.tutteli.atrium.assertions.AssertionGroup -import ch.tutteli.atrium.core.polyfills.loadSingleService -import ch.tutteli.atrium.domain.creating.feature.extract.FeatureExtractor -import ch.tutteli.atrium.reporting.translating.Translatable - -/** - * The access point to an implementation of [FeatureExtractorCreatorFactory]. - * - * It loads the implementation lazily via [loadSingleService]. - */ -@Deprecated("Switch from `Assert` to `Expect` and use ch.tutteli.atrium.domain.creating.changers.featureExtractor instead; will be removed with 1.0.0") -val featureExtractorCreatorFactory by lazy { loadSingleService(FeatureExtractorCreatorFactory::class) } - -/** - * Responsible to create a [FeatureExtractor.Creator]. - */ -@Deprecated("Switch from `Assert` to `Expect` and use ch.tutteli.atrium.domain.creating.changers.FeatureExtractor instead; will be removed with 1.0.0") -interface FeatureExtractorCreatorFactory { - - /** - * Creates a [FeatureExtractor.Creator] based on the given [featureRepresentation] and [parameterObject] - * - * @param featureRepresentation used as [AssertionGroup.description]. - * @param parameterObject Parameter object which contains inter alia the - * [FeatureExtractor.ParameterObject.canBeExtracted] and [FeatureExtractor.ParameterObject.featureExtraction] - * functions. - * - * @return The newly created feature extractor creator. - */ - fun create( - featureRepresentation: Translatable, - parameterObject: FeatureExtractor.ParameterObject - ): FeatureExtractor.Creator - - /** - * Creates a [FeatureExtractor.CreatorNullable] based on the given [featureRepresentation] and [parameterObject] - * - * @param featureRepresentation used as [AssertionGroup.description]. - * @param parameterObject Parameter object which contains inter alia the - * [FeatureExtractor.ParameterObject.canBeExtracted] and [FeatureExtractor.ParameterObject.featureExtraction] - * functions. - * - * @return The newly created feature extractor creator. - */ - fun createNullable( - featureRepresentation: Translatable, - parameterObject: FeatureExtractor.ParameterObject - ): FeatureExtractor.CreatorNullable -} diff --git a/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/feature/extract/impl/deprecatedImpl.kt b/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/feature/extract/impl/deprecatedImpl.kt deleted file mode 100644 index b83022fb3..000000000 --- a/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/feature/extract/impl/deprecatedImpl.kt +++ /dev/null @@ -1,17 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0 */) - -package ch.tutteli.atrium.domain.creating.feature.extract.impl - -import ch.tutteli.atrium.domain.creating.feature.extract.FeatureExtractor -import ch.tutteli.atrium.reporting.translating.Translatable - -@Deprecated("Will be removed with 1.0.0") -internal class DescriptionOptionImpl : FeatureExtractor.DescriptionOption { - override fun withDescription(translatable: Translatable): FeatureExtractor.ParameterObjectOption = - ParameterObjectOptionImpl(translatable) -} - -@Deprecated("Will be removed with 1.0.0") -internal class ParameterObjectOptionImpl( - override val featureDescription: Translatable -) : FeatureExtractor.ParameterObjectOption diff --git a/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/iterable/contains/IterableContains.kt b/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/iterable/contains/IterableContains.kt deleted file mode 100644 index 724e341ef..000000000 --- a/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/iterable/contains/IterableContains.kt +++ /dev/null @@ -1,58 +0,0 @@ -package ch.tutteli.atrium.domain.creating.iterable.contains - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.assertions.AssertionGroup -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.domain.creating.basic.contains.Contains -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains.* -import ch.tutteli.atrium.domain.creating.iterable.contains.creators.IterableContainsAssertions -import ch.tutteli.atrium.reporting.translating.Translatable - -/** - * Defines the contract for sophisticated [Iterable] `contains` [Assertion] builders. - * - * The building process is typically started by the creation of a [Builder], - * goes on by specifying a desired [SearchBehaviour], - * defines which [Checker]s should be applied and - * is finalized by one of the [IterableContainsAssertions] which usually use a [Creator]. - */ -interface IterableContains { - - /** - * The entry point of the contract, containing the [subjectProvider] -- i.e. the subject of the assertion - * for which the sophisticated `contain` assertion should be created -- as well as the chosen [searchBehaviour]. - * - * The [searchBehaviour] might me modified in which case it is recommended that a new [Builder] is created (retain - * immutability). - */ - interface Builder, out S : SearchBehaviour> : Contains.Builder - - /** - * The step of choosing/defining [Checker]s. - */ - interface CheckerOption, out S : SearchBehaviour> - : Contains.CheckerOption> - - /** - * Represents a search behaviour but leaves it up to the [Creator] how this behaviour is implemented -- yet, it - * provides a method to decorate a description (a [Translatable]) in order that it reflects the search behaviour. - */ - interface SearchBehaviour : Contains.SearchBehaviour - - /** - * Represents the final step of a sophisticated `contains` assertion builder which creates the [AssertionGroup] - * as such. - * - * @param T The type of the [AssertionPlant.subject][SubjectProvider.subject]. - * @param SC The type of the search criteria. - */ - interface Creator, in SC> : 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. - */ - interface Checker : Contains.Checker -} diff --git a/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/iterable/contains/checkers/CheckerFactory.kt b/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/iterable/contains/checkers/CheckerFactory.kt deleted file mode 100644 index d747f452b..000000000 --- a/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/iterable/contains/checkers/CheckerFactory.kt +++ /dev/null @@ -1,74 +0,0 @@ -package ch.tutteli.atrium.domain.creating.iterable.contains.checkers - -import ch.tutteli.atrium.core.polyfills.loadSingleService -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains - -/** - * The access point to an implementation of [CheckerFactory]. - * - * It loads the implementation lazily via [loadSingleService]. - */ -val checkerFactory by lazy { loadSingleService(CheckerFactory::class) } - - -/** - * Defines the minimum set of [IterableContains.Checker]s an implementation of the domain of Atrium - * has to provide. - */ -interface CheckerFactory { - /** - * Creates an [IterableContains.Checker] which verifies 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 entry is - * found in the [Iterable]. - * @param nameContainsNotFun The function which should be used instead of [atLeastCall] when [times] equals to zero. - * @param atLeastCall The function which was used and should not be used if [times] equals to zero. - * - * @throws IllegalArgumentException In case [times] is smaller than 1. - */ - fun newAtLeastChecker( - times: Int, - nameContainsNotFun: String, - atLeastCall: (Int) -> String - ): IterableContains.Checker - - /** - * Creates an [IterableContains.Checker] which verifies 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] equals to zero. - * @param atMostCall The function which was used and should not be used if [times] equals to zero. - * - * @throws IllegalArgumentException In case [times] is smaller than 1. - */ - fun newAtMostChecker( - times: Int, - nameContainsNotFun: String, - atMostCall: (Int) -> String - ): IterableContains.Checker - - /** - * Creates a [IterableContains.Checker] which verifies 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] equals to zero. - * @param exactlyCall The function call which was used and should not be used if [times] equals to zero. - * - * @throws IllegalArgumentException In case [times] is smaller than 1. - */ - fun newExactlyChecker( - times: Int, - nameContainsNotFun: String, - exactlyCall: (Int) -> String - ): IterableContains.Checker - - /** - * Creates a [IterableContains.Checker] which verifies that an expected entry is not contained in the [Iterable]. - */ - fun newNotChecker(): IterableContains.Checker -} diff --git a/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/iterable/contains/creators/IterableContainsAssertions.kt b/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/iterable/contains/creators/IterableContainsAssertions.kt deleted file mode 100644 index d7d934d32..000000000 --- a/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/iterable/contains/creators/IterableContainsAssertions.kt +++ /dev/null @@ -1,96 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove annotation with 1.0.0 */) - -package ch.tutteli.atrium.domain.creating.iterable.contains.creators - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.core.polyfills.loadSingleService -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InAnyOrderOnlySearchBehaviour -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InAnyOrderSearchBehaviour -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InOrderOnlyGroupedSearchBehaviour -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InOrderOnlySearchBehaviour - -/** - * The access point to an implementation of [IterableContainsAssertions]. - * - * It loads the implementation lazily via [loadSingleService]. - */ -val iterableContainsAssertions by lazy { loadSingleService(IterableContainsAssertions::class) } - - -/** - * Defines the minimum set of `contains` assertion functions for [Iterable], - * which an implementation of the domain of Atrium has to provide. - */ -interface IterableContainsAssertions { - - fun > valuesInAnyOrder( - checkerOption: IterableContains.CheckerOption, - expected: List - ): Assertion - - fun > entriesInAnyOrder( - checkerOption: IterableContains.CheckerOption, - assertionCreators: List<(Expect.() -> Unit)?> - ): Assertion - - - fun > valuesInAnyOrderOnly( - builder: IterableContains.Builder, - expected: List - ): Assertion - - fun > entriesInAnyOrderOnly( - builder: IterableContains.Builder, - assertionCreators: List<(Expect.() -> Unit)?> - ): Assertion - - - fun > valuesInOrderOnly( - builder: IterableContains.Builder, - expected: List - ): Assertion - - fun > entriesInOrderOnly( - builder: IterableContains.Builder, - assertionCreators: List<(Expect.() -> Unit)?> - ): Assertion - - - fun > valuesInOrderOnlyGrouped( - builder: IterableContains.Builder, - groups: List> - ): Assertion - - fun > entriesInOrderOnlyGrouped( - builder: IterableContains.Builder, - groups: List.() -> Unit)?>> - ): Assertion - - - @Deprecated("Switch from Assert to Expect and use entriesInAnyOrderWithAssert; will be removed with 1.0.0") - fun > entriesInAnyOrderWithAssert( - checkerOption: IterableContains.CheckerOption, - assertionCreators: List<(AssertionPlant.() -> Unit)?> - ): Assertion - - @Deprecated("Switch from Assert to Expect and use entriesInAnyOrderOnlyWithAssert; will be removed with 1.0.0") - fun > entriesInAnyOrderOnlyWithAssert( - builder: IterableContains.Builder, - assertionCreators: List<(AssertionPlant.() -> Unit)?> - ): Assertion - - @Deprecated("Switch from Assert to Expect and use entriesInOrderOnlyWithAssert; will be removed with 1.0.0") - fun > entriesInOrderOnlyWithAssert( - builder: IterableContains.Builder, - assertionCreators: List<(AssertionPlant.() -> Unit)?> - ): Assertion - - @Deprecated("Switch from Assert to Expect and use entriesInOrderOnlyGroupedWithAssert; will be removed with 1.0.0") - fun > entriesInOrderOnlyGroupedWithAssert( - builder: IterableContains.Builder, - groups: List.() -> Unit)?>> - ): Assertion -} diff --git a/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/iterable/contains/searchbehaviours/InAnyOrderOnlySearchBehaviour.kt b/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/iterable/contains/searchbehaviours/InAnyOrderOnlySearchBehaviour.kt deleted file mode 100644 index 2054a1876..000000000 --- a/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/iterable/contains/searchbehaviours/InAnyOrderOnlySearchBehaviour.kt +++ /dev/null @@ -1,9 +0,0 @@ -package ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours - -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains - -/** - * Represents the search behaviour that expected entries might appear in any order within the [Iterable] but that - * the resulting assertion should not hold if there are less or more entries than expected. - */ -interface InAnyOrderOnlySearchBehaviour : IterableContains.SearchBehaviour diff --git a/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/iterable/contains/searchbehaviours/InAnyOrderSearchBehaviour.kt b/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/iterable/contains/searchbehaviours/InAnyOrderSearchBehaviour.kt deleted file mode 100644 index b1ab5e6d9..000000000 --- a/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/iterable/contains/searchbehaviours/InAnyOrderSearchBehaviour.kt +++ /dev/null @@ -1,8 +0,0 @@ -package ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours - -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains - -/** - * Represents the search behaviour that expected entries might appear in any order within the [Iterable]. - */ -interface InAnyOrderSearchBehaviour : IterableContains.SearchBehaviour diff --git a/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/iterable/contains/searchbehaviours/InOrderOnlyGroupedSearchBehaviour.kt b/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/iterable/contains/searchbehaviours/InOrderOnlyGroupedSearchBehaviour.kt deleted file mode 100644 index 68733cefa..000000000 --- a/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/iterable/contains/searchbehaviours/InOrderOnlyGroupedSearchBehaviour.kt +++ /dev/null @@ -1,10 +0,0 @@ -package ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours - -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains - -/** - * Represents the search behaviour that expected entries have to appear in the given order in terms of groups within the - * [Iterable] whereas the entries can be in any order within the group and that the resulting assertion should not hold - * if there are less or more entries than expected. - */ -interface InOrderOnlyGroupedSearchBehaviour : IterableContains.SearchBehaviour diff --git a/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/iterable/contains/searchbehaviours/InOrderOnlyGroupedWithinSearchBehaviour.kt b/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/iterable/contains/searchbehaviours/InOrderOnlyGroupedWithinSearchBehaviour.kt deleted file mode 100644 index 800769e82..000000000 --- a/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/iterable/contains/searchbehaviours/InOrderOnlyGroupedWithinSearchBehaviour.kt +++ /dev/null @@ -1,7 +0,0 @@ -package ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours - -/** - * Represents a filler step to emphasise that the next step defines the order within a group of a - * [InOrderOnlyGroupedSearchBehaviour]. - */ -interface InOrderOnlyGroupedWithinSearchBehaviour : InOrderOnlyGroupedSearchBehaviour diff --git a/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/iterable/contains/searchbehaviours/InOrderOnlySearchBehaviour.kt b/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/iterable/contains/searchbehaviours/InOrderOnlySearchBehaviour.kt deleted file mode 100644 index 7ec8f6808..000000000 --- a/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/iterable/contains/searchbehaviours/InOrderOnlySearchBehaviour.kt +++ /dev/null @@ -1,9 +0,0 @@ -package ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours - -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains - -/** - * Represents the search behaviour that expected entries have to appear in the given order within the [Iterable] and - * that the resulting assertion should not hold if there are less or more entries than expected. - */ -interface InOrderOnlySearchBehaviour : IterableContains.SearchBehaviour diff --git a/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/iterable/contains/searchbehaviours/InOrderSearchBehaviour.kt b/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/iterable/contains/searchbehaviours/InOrderSearchBehaviour.kt deleted file mode 100644 index 1583adba4..000000000 --- a/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/iterable/contains/searchbehaviours/InOrderSearchBehaviour.kt +++ /dev/null @@ -1,8 +0,0 @@ -package ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours - -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains - -/** - * Represents the search behaviour that expected entries have to appear in the given order within the [Iterable]. - */ -interface InOrderSearchBehaviour : IterableContains.SearchBehaviour diff --git a/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/iterable/contains/searchbehaviours/NoOpSearchBehaviour.kt b/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/iterable/contains/searchbehaviours/NoOpSearchBehaviour.kt deleted file mode 100644 index 0cce3550f..000000000 --- a/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/iterable/contains/searchbehaviours/NoOpSearchBehaviour.kt +++ /dev/null @@ -1,18 +0,0 @@ -package ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours - -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.reporting.translating.Translatable - -/** - * Represents the default search behaviour or rather does not define a search behaviour at all. - * - * It furthermore implements a no operation for [decorateDescription], meaning it passes back the description which - * is passed in (identity function). - */ -interface NoOpSearchBehaviour : IterableContains.SearchBehaviour { - /** - * Returns the given [description]. - * @return The given [description]. - */ - override fun decorateDescription(description: Translatable) = description -} diff --git a/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/iterable/contains/searchbehaviours/NotSearchBehaviour.kt b/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/iterable/contains/searchbehaviours/NotSearchBehaviour.kt deleted file mode 100644 index 390771417..000000000 --- a/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/iterable/contains/searchbehaviours/NotSearchBehaviour.kt +++ /dev/null @@ -1,6 +0,0 @@ -package ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours - -/** - * Represents the search behaviour that expected entries might appear in any order within the [Iterable]. - */ -interface NotSearchBehaviour : InAnyOrderSearchBehaviour diff --git a/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/iterable/contains/searchbehaviours/SearchBehaviourFactory.kt b/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/iterable/contains/searchbehaviours/SearchBehaviourFactory.kt deleted file mode 100644 index e569d13b6..000000000 --- a/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/iterable/contains/searchbehaviours/SearchBehaviourFactory.kt +++ /dev/null @@ -1,43 +0,0 @@ -package ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours - -import ch.tutteli.atrium.core.polyfills.loadSingleService -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains - -/** - * The access point to an implementation of [SearchBehaviourFactory]. - * - * It loads the implementation lazily via [loadSingleService]. - */ -val searchBehaviourFactory by lazy { loadSingleService(SearchBehaviourFactory::class) } - - -/** - * Defines the minimum set of [IterableContains.SearchBehaviour]s an implementation of the domain of Atrium - * has to provide. - */ -interface SearchBehaviourFactory { - - fun > inAnyOrder( - builder: IterableContains.Builder - ): IterableContains.Builder - - fun > inAnyOrderOnly( - builder: IterableContains.Builder - ): IterableContains.Builder - - fun > inOrder( - builder: IterableContains.Builder - ): IterableContains.Builder - - fun > inOrderOnly( - builder: IterableContains.Builder - ): IterableContains.Builder - - fun > inOrderOnlyGrouped( - builder: IterableContains.Builder - ): IterableContains.Builder - - fun > inOrderOnlyGroupedWithin( - builder: IterableContains.Builder - ): IterableContains.Builder -} diff --git a/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/throwable/thrown/ThrowableThrown.kt b/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/throwable/thrown/ThrowableThrown.kt deleted file mode 100644 index 8d9503074..000000000 --- a/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/throwable/thrown/ThrowableThrown.kt +++ /dev/null @@ -1,88 +0,0 @@ -@file:Suppress("DEPRECATION" /* will be removed with 1.0.0 */) -package ch.tutteli.atrium.domain.creating.throwable.thrown - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.assertions.AssertionGroup -import ch.tutteli.atrium.assertions.DescriptiveAssertion -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.domain.creating.throwable.thrown.ThrowableThrown.* -import ch.tutteli.atrium.domain.creating.throwable.thrown.creators.ThrowableThrownAssertions -import ch.tutteli.atrium.reporting.RawString -import ch.tutteli.atrium.reporting.Reporter -import ch.tutteli.atrium.reporting.translating.Translatable -import kotlin.reflect.KClass - -/** - * Defines the contract for sophisticated a [Throwable] was thrown [Assertion] builders. - * as well as the minimum set of assertions an implementation of the domain of Atrium has to provide. - * - * The building process is typically started by the creation of a [Builder], - * would allow to define an [AbsentThrowableMessageProvider] as well as an - * [ch.tutteli.atrium.domain.creating.any.typetransformation.AnyTypeTransformation.FailureHandler] - * (currently all [ThrowableThrownAssertions] specify it implicitly) and - * is finalized by one of the [ThrowableThrownAssertions] which usually use a [Creator]. - */ -@Deprecated("Use Expect instead; will be removed with 1.0.0") -interface ThrowableThrown { - /** - * The entry point of the [Throwable] `thrown` contract. - */ - @Deprecated("Use Expect instead; will be removed with 1.0.0") - interface Builder { - val assertionVerb: Translatable - val act: () -> Unit - val reporter: Reporter - } - - /** - * Provides a message which can be used in reporting to represent the case that no [Throwable] at all was thrown. - */ - @Deprecated("Will be removed with 1.0.0") - interface AbsentThrowableMessageProvider { - /** - * The message can be used in reporting to represent the case that no [Throwable] was thrown at all. - */ - val message: RawString - } - - /** - * Represents the final step of a sophisticated a [Throwable] was thrown assertion builder which creates - * the [AssertionGroup] as such. - * - * @param TExpected The type of the [Throwable] which is expected to be thrown. - */ - @Deprecated("Will be removed with 1.0.0") - interface Creator { - - /** - * Executes the [act][ThrowableThrown.Builder.act] lambda of the given [throwableThrownBuilder] and catches - * thrown [Throwable]s (if there are any) and correspondingly creates an assertion where it is expected that - * nothing is thrown.. - * - * @param throwableThrownBuilder The [ThrowableThrown.Builder] containing inter alia the - * [act][ThrowableThrown.Builder.act] lambda. - */ - @Deprecated("Will be removed with 1.0.0") - fun executeActAssertNothingThrown(throwableThrownBuilder: Builder) - - /** - * Executes the [act][ThrowableThrown.Builder.act] lambda of the given [throwableThrownBuilder], catches any - * thrown [Throwable], creates based on it a corresponding [Assertion] representing the sophisticated - * assertion and also checks whether it holds or not. - * - * @param throwableThrownBuilder The [ThrowableThrown.Builder] containing inter alia the - * [act][ThrowableThrown.Builder.act] lambda. - * @param description The [description][DescriptiveAssertion.description] of the resulting [DescriptiveAssertion]. - * @param expectedType The expected type of the [Throwable] used for casting and probably in reporting. - * @param assertionCreator The assertion creator which defines subsequent assertions for the [Throwable] in - * case it was thrown as expected and is of the expected type [TExpected]. - */ - @Deprecated("Will be removed with 1.0.0") - fun executeActAndCreateAssertion( - throwableThrownBuilder: Builder, - description: Translatable, - expectedType: KClass, - assertionCreator: AssertionPlant.() -> Unit - ) - } -} diff --git a/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/throwable/thrown/creators/ThrowableThrownAssertions.kt b/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/throwable/thrown/creators/ThrowableThrownAssertions.kt deleted file mode 100644 index 14b7b2c38..000000000 --- a/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/throwable/thrown/creators/ThrowableThrownAssertions.kt +++ /dev/null @@ -1,35 +0,0 @@ -@file:Suppress("DEPRECATION" /* will be removed with 1.0.0 */) - -package ch.tutteli.atrium.domain.creating.throwable.thrown.creators - -import ch.tutteli.atrium.core.polyfills.loadSingleService -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.domain.creating.throwable.thrown.ThrowableThrown -import kotlin.reflect.KClass - -/** - * The access point to an implementation of [ThrowableThrownAssertions]. - * - * It loads the implementation lazily via [loadSingleService]. - */ -@Deprecated("Use fun0Assertions instead; will be removed with 1.0.0") -val throwableThrownAssertions by lazy { loadSingleService(ThrowableThrownAssertions::class) } - - -/** - * Defines the minimum set of "a [Throwable] was `thrown`"-assertion functions, - * which an implementation of the domain of Atrium has to provide. - */ -@Deprecated("Use Fun0Assertions instead; will be removed with 1.0.0") -interface ThrowableThrownAssertions { - - @Deprecated("Switch from Assert to Expect and use Fun0Assertions instead; will be removed with 1.0.0") - fun toBe( - throwableThrownBuilder: ThrowableThrown.Builder, - expectedType: KClass, - assertionCreator: AssertionPlant.() -> Unit - ) - - @Deprecated("Switch from Assert to Expect and use Fun0Assertions instead; will be removed with 1.0.0") - fun nothingThrown(throwableThrownBuilder: ThrowableThrown.Builder) -} diff --git a/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/throwable/thrown/providers/AbsentThrowableMessageProviderFactory.kt b/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/throwable/thrown/providers/AbsentThrowableMessageProviderFactory.kt deleted file mode 100644 index 51e15bfd1..000000000 --- a/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/throwable/thrown/providers/AbsentThrowableMessageProviderFactory.kt +++ /dev/null @@ -1,27 +0,0 @@ -@file:Suppress("DEPRECATION" /* will be removed with 1.0.0 */) -package ch.tutteli.atrium.domain.creating.throwable.thrown.providers - -import ch.tutteli.atrium.core.polyfills.loadSingleService -import ch.tutteli.atrium.domain.creating.throwable.thrown.ThrowableThrown -import ch.tutteli.atrium.reporting.translating.Translatable - -/** - * The access point to an implementation of [AbsentThrowableMessageProviderFactory]. - * - * It loads the implementation lazily via [loadSingleService]. - */ -@Suppress("DEPRECATION") -@Deprecated("Will be removed with 1.0.0") -val absentThrowableMessageProviderFactory by lazy { loadSingleService(AbsentThrowableMessageProviderFactory::class) } - - -/** - * Defines the minimum set of [ThrowableThrown.AbsentThrowableMessageProvider]s, - * which an implementation of the domain of Atrium has to provide. - */ -@Deprecated("Will be removed with 1.0.0") -interface AbsentThrowableMessageProviderFactory { - - @Suppress("DEPRECATION") - fun translatableBased(translatable: Translatable): ThrowableThrown.AbsentThrowableMessageProvider -} diff --git a/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/typeutils/CharSequenceOrNumberOrChar.kt b/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/typeutils/CharSequenceOrNumberOrChar.kt deleted file mode 100644 index 62aaee7c5..000000000 --- a/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/typeutils/CharSequenceOrNumberOrChar.kt +++ /dev/null @@ -1,11 +0,0 @@ -package ch.tutteli.atrium.domain.creating.typeutils - -/** - * Type alias for [Any] but with a better description what is expected at runtime, - * i.e. either a [CharSequence], a [Number] or a [Char]. - */ -@Deprecated( - "Use the typealias from atrium-logic; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.logic.creating.typeutils.CharSequenceOrNumberOrChar") -) -typealias CharSequenceOrNumberOrChar = Any diff --git a/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/typeutils/IterableLike.kt b/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/typeutils/IterableLike.kt deleted file mode 100644 index dc87be377..000000000 --- a/misc/deprecated/domain/api/atrium-domain-api-common/src/main/kotlin/ch/tutteli/atrium/domain/creating/typeutils/IterableLike.kt +++ /dev/null @@ -1,11 +0,0 @@ -package ch.tutteli.atrium.domain.creating.typeutils - -/** - * Type alias for [Any] but with a better description what is expected at runtime, - * i.e. such as Iterable, Sequence or one of the other Array types. - */ -@Deprecated( - "Use the typealias from atrium-logic; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.logic.creating.typeutils.IterableLike") -) -typealias IterableLike = Any diff --git a/misc/deprecated/domain/api/atrium-domain-api-js/src/main/kotlin/ch/tutteli/atrium/domain/creating/FloatingPointAssertions.kt b/misc/deprecated/domain/api/atrium-domain-api-js/src/main/kotlin/ch/tutteli/atrium/domain/creating/FloatingPointAssertions.kt deleted file mode 100644 index cc60220b1..000000000 --- a/misc/deprecated/domain/api/atrium-domain-api-js/src/main/kotlin/ch/tutteli/atrium/domain/creating/FloatingPointAssertions.kt +++ /dev/null @@ -1,11 +0,0 @@ -package ch.tutteli.atrium.domain.creating - -/** - * Defines the minimum set of assertion functions and builders applicable to floating points ([Float], [Double]), - * which an implementation of the domain of Atrium has to provide. - */ -@Deprecated( - "Use FloatingPointAssertions from atrium-logic; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.logic.FloatingPointAssertions") -) -actual interface FloatingPointAssertions : FloatingPointAssertionsCommon diff --git a/misc/deprecated/domain/api/atrium-domain-api-jvm/src/main/kotlin/ch/tutteli/atrium/domain/creating/BigDecimalAssertions.kt b/misc/deprecated/domain/api/atrium-domain-api-jvm/src/main/kotlin/ch/tutteli/atrium/domain/creating/BigDecimalAssertions.kt deleted file mode 100644 index b89f005ed..000000000 --- a/misc/deprecated/domain/api/atrium-domain-api-jvm/src/main/kotlin/ch/tutteli/atrium/domain/creating/BigDecimalAssertions.kt +++ /dev/null @@ -1,41 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress( - "DEPRECATION", - /* TODO remove once https://youtrack.jetbrains.com/issue/KT-35343 is fixed */ - "JAVA_MODULE_DOES_NOT_READ_UNNAMED_MODULE" -) - -package ch.tutteli.atrium.domain.creating - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.core.polyfills.loadSingleService -import ch.tutteli.atrium.creating.SubjectProvider -import java.math.BigDecimal - -/** - * The access point to an implementation of [BigDecimalAssertions]. - * - * It loads the implementation lazily via [loadSingleService]. - */ -val bigDecimalAssertions by lazy { loadSingleService(BigDecimalAssertions::class) } - - -/** - * Defines the minimum set of assertion functions and builders applicable to [BigDecimal], - * which an implementation of the domain of Atrium has to provide. - */ -@Deprecated( - "Use BigDecimalAssertions from atrium-logic; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.logic.BigDecimalAssertions") -) -interface BigDecimalAssertions { - fun isNumericallyEqualTo(subjectProvider: SubjectProvider, expected: T): Assertion - fun isNotNumericallyEqualTo(subjectProvider: SubjectProvider, expected: T): Assertion - fun isEqualIncludingScale( - subjectProvider: SubjectProvider, - expected: T, - nameOfIsNumericallyEqualTo: String - ): Assertion - - fun isNotEqualIncludingScale(subjectProvider: SubjectProvider, expected: T): Assertion -} diff --git a/misc/deprecated/domain/api/atrium-domain-api-jvm/src/main/kotlin/ch/tutteli/atrium/domain/creating/ChronoLocalDateAssertions.kt b/misc/deprecated/domain/api/atrium-domain-api-jvm/src/main/kotlin/ch/tutteli/atrium/domain/creating/ChronoLocalDateAssertions.kt deleted file mode 100644 index 915504bfd..000000000 --- a/misc/deprecated/domain/api/atrium-domain-api-jvm/src/main/kotlin/ch/tutteli/atrium/domain/creating/ChronoLocalDateAssertions.kt +++ /dev/null @@ -1,35 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress( - "DEPRECATION", - /* TODO remove once https://youtrack.jetbrains.com/issue/KT-35343 is fixed */ - "JAVA_MODULE_DOES_NOT_READ_UNNAMED_MODULE" -) -package ch.tutteli.atrium.domain.creating - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.core.polyfills.loadSingleService -import ch.tutteli.atrium.creating.Expect -import java.time.chrono.ChronoLocalDate - -/** - * The access point to an implementation of [ChronoLocalDateAssertions]. - * - * It loads the implementation lazily via [loadSingleService]. - */ -val chronoLocalDateAssertions by lazy { loadSingleService(ChronoLocalDateAssertions::class) } - -/** - * Defines the minimum set of assertion functions and builders applicable to [ChronoLocalDate], - * which an implementation of the domain of Atrium has to provide. - */ -@Deprecated( - "Use ChronoLocalDateAssertions from atrium-logic; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.logic.ChronoLocalDateAssertions") -) -interface ChronoLocalDateAssertions { - fun isBefore(expect: Expect, expected: ChronoLocalDate): Assertion - fun isAfter(expect: Expect, expected: ChronoLocalDate): Assertion - fun isBeforeOrEquals(expect: Expect, expected: ChronoLocalDate): Assertion - fun isAfterOrEquals(expect: Expect, expected: ChronoLocalDate): Assertion - fun isEqual(expect: Expect, expected: ChronoLocalDate): Assertion -} diff --git a/misc/deprecated/domain/api/atrium-domain-api-jvm/src/main/kotlin/ch/tutteli/atrium/domain/creating/ChronoLocalDateTimeAssertions.kt b/misc/deprecated/domain/api/atrium-domain-api-jvm/src/main/kotlin/ch/tutteli/atrium/domain/creating/ChronoLocalDateTimeAssertions.kt deleted file mode 100644 index da33c896b..000000000 --- a/misc/deprecated/domain/api/atrium-domain-api-jvm/src/main/kotlin/ch/tutteli/atrium/domain/creating/ChronoLocalDateTimeAssertions.kt +++ /dev/null @@ -1,55 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress( - "DEPRECATION", - /* TODO remove once https://youtrack.jetbrains.com/issue/KT-35343 is fixed */ - "JAVA_MODULE_DOES_NOT_READ_UNNAMED_MODULE" -) -package ch.tutteli.atrium.domain.creating - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.core.polyfills.loadSingleService -import ch.tutteli.atrium.creating.Expect -import java.time.chrono.ChronoLocalDate -import java.time.chrono.ChronoLocalDateTime - -/** - * The access point to an implementation of [ChronoLocalDateTimeAssertions]. - * - * It loads the implementation lazily via [loadSingleService]. - */ -val chronoLocalDateTimeAssertions by lazy { loadSingleService(ChronoLocalDateTimeAssertions::class) } - -/** - * Defines the minimum set of assertion functions and builders applicable to [ChronoLocalDateTime], - * which an implementation of the domain of Atrium has to provide. - */ -@Deprecated( - "Use ChronoLocalDateTimeAssertions from atrium-logic; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.logic.ChronoLocalDateTimeAssertions") -) -interface ChronoLocalDateTimeAssertions { - fun > isBefore( - expect: Expect, - expected: ChronoLocalDateTime<*> - ): Assertion - - fun > isBeforeOrEquals( - expect: Expect, - expected: ChronoLocalDateTime<*> - ): Assertion - - fun > isAfter( - expect: Expect, - expected: ChronoLocalDateTime<*> - ): Assertion - - fun > isAfterOrEquals( - expect: Expect, - expected: ChronoLocalDateTime<*> - ): Assertion - - fun > isEqual( - expect: Expect, - expected: ChronoLocalDateTime<*> - ): Assertion -} diff --git a/misc/deprecated/domain/api/atrium-domain-api-jvm/src/main/kotlin/ch/tutteli/atrium/domain/creating/ChronoZonedDateTimeAssertions.kt b/misc/deprecated/domain/api/atrium-domain-api-jvm/src/main/kotlin/ch/tutteli/atrium/domain/creating/ChronoZonedDateTimeAssertions.kt deleted file mode 100644 index 409629c85..000000000 --- a/misc/deprecated/domain/api/atrium-domain-api-jvm/src/main/kotlin/ch/tutteli/atrium/domain/creating/ChronoZonedDateTimeAssertions.kt +++ /dev/null @@ -1,55 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress( - "DEPRECATION", - /* TODO remove once https://youtrack.jetbrains.com/issue/KT-35343 is fixed */ - "JAVA_MODULE_DOES_NOT_READ_UNNAMED_MODULE" -) -package ch.tutteli.atrium.domain.creating - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.core.polyfills.loadSingleService -import ch.tutteli.atrium.creating.Expect -import java.time.chrono.ChronoLocalDate -import java.time.chrono.ChronoZonedDateTime - -/** - * The access point to an implementation of [ChronoZonedDateTimeAssertions]. - * - * It loads the implementation lazily via [loadSingleService]. - */ -val chronoZonedDateTimeAssertions by lazy { loadSingleService(ChronoZonedDateTimeAssertions::class) } - -/** - * Defines the minimum set of assertion functions and builders applicable to [ChronoZonedDateTime], - * which an implementation of the domain of Atrium has to provide. - */ -@Deprecated( - "Use ChronoZonedDateTimeAssertions from atrium-logic; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.logic.ChronoZonedDateTimeAssertions") -) -interface ChronoZonedDateTimeAssertions { - fun > isBefore( - expect: Expect, - expected: ChronoZonedDateTime<*> - ): Assertion - - fun > isBeforeOrEqual( - expect: Expect, - expected: ChronoZonedDateTime<*> - ): Assertion - - fun > isAfter( - expect: Expect, - expected: ChronoZonedDateTime<*> - ): Assertion - - fun > isAfterOrEqual( - expect: Expect, - expected: ChronoZonedDateTime<*> - ): Assertion - - fun > isEqual( - expect: Expect, - expected: ChronoZonedDateTime<*> - ): Assertion -} diff --git a/misc/deprecated/domain/api/atrium-domain-api-jvm/src/main/kotlin/ch/tutteli/atrium/domain/creating/FloatingPointAssertions.kt b/misc/deprecated/domain/api/atrium-domain-api-jvm/src/main/kotlin/ch/tutteli/atrium/domain/creating/FloatingPointAssertions.kt deleted file mode 100644 index 2f2cf6b54..000000000 --- a/misc/deprecated/domain/api/atrium-domain-api-jvm/src/main/kotlin/ch/tutteli/atrium/domain/creating/FloatingPointAssertions.kt +++ /dev/null @@ -1,27 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress( - "DEPRECATION", - /* TODO remove once https://youtrack.jetbrains.com/issue/KT-35343 is fixed */ - "JAVA_MODULE_DOES_NOT_READ_UNNAMED_MODULE" -) -package ch.tutteli.atrium.domain.creating - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.creating.SubjectProvider -import java.math.BigDecimal - -/** - * Defines the minimum set of assertion functions and builders applicable to floating points ([Float], [Double], - * [BigDecimal]), which an implementation of the domain of Atrium has to provide. - */ -@Deprecated( - "Use FloatingPointAssertions from atrium-logic; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.logic.FloatingPointAssertions") -) -actual interface FloatingPointAssertions : FloatingPointAssertionsCommon { - fun toBeWithErrorTolerance( - subjectProvider: SubjectProvider, - expected: T, - tolerance: T - ): Assertion -} diff --git a/misc/deprecated/domain/api/atrium-domain-api-jvm/src/main/kotlin/ch/tutteli/atrium/domain/creating/LocalDateAssertions.kt b/misc/deprecated/domain/api/atrium-domain-api-jvm/src/main/kotlin/ch/tutteli/atrium/domain/creating/LocalDateAssertions.kt deleted file mode 100644 index a8a15b670..000000000 --- a/misc/deprecated/domain/api/atrium-domain-api-jvm/src/main/kotlin/ch/tutteli/atrium/domain/creating/LocalDateAssertions.kt +++ /dev/null @@ -1,41 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress( - "DEPRECATION", - /* TODO remove once https://youtrack.jetbrains.com/issue/KT-34257 is fixed */ - "FINAL_UPPER_BOUND", - /* TODO remove once https://youtrack.jetbrains.com/issue/KT-35343 is fixed */ - "JAVA_MODULE_DOES_NOT_READ_UNNAMED_MODULE" -) - -package ch.tutteli.atrium.domain.creating - -import ch.tutteli.atrium.core.polyfills.loadSingleService -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.domain.creating.changers.ExtractedFeaturePostStep -import java.time.DayOfWeek -import java.time.LocalDate - -/** - * The access point to an implementation of [LocalDateAssertions]. - * - * It loads the implementation lazily via [loadSingleService]. - */ -val localDateAssertions by lazy { loadSingleService(LocalDateAssertions::class) } - -/** - * Defines the minimum set of assertion functions and builders applicable to [LocalDate], - * which an implementation of the domain of Atrium has to provide. - */ -@Deprecated( - "Use LocalDateAssertions from atrium-logic; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.logic.LocalDateAssertions") -) -interface LocalDateAssertions { - fun year(expect: Expect): ExtractedFeaturePostStep - - fun month(expect: Expect): ExtractedFeaturePostStep - - fun day(expect: Expect): ExtractedFeaturePostStep - - fun dayOfWeek(expect: Expect): ExtractedFeaturePostStep -} diff --git a/misc/deprecated/domain/api/atrium-domain-api-jvm/src/main/kotlin/ch/tutteli/atrium/domain/creating/LocalDateTimeAssertions.kt b/misc/deprecated/domain/api/atrium-domain-api-jvm/src/main/kotlin/ch/tutteli/atrium/domain/creating/LocalDateTimeAssertions.kt deleted file mode 100644 index 5a0c9da9a..000000000 --- a/misc/deprecated/domain/api/atrium-domain-api-jvm/src/main/kotlin/ch/tutteli/atrium/domain/creating/LocalDateTimeAssertions.kt +++ /dev/null @@ -1,41 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress( - "DEPRECATION", - /* TODO remove once https://youtrack.jetbrains.com/issue/KT-34257 is fixed */ - "FINAL_UPPER_BOUND", - /* TODO remove once https://youtrack.jetbrains.com/issue/KT-35343 is fixed */ - "JAVA_MODULE_DOES_NOT_READ_UNNAMED_MODULE" -) - -package ch.tutteli.atrium.domain.creating - -import ch.tutteli.atrium.core.polyfills.loadSingleService -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.domain.creating.changers.ExtractedFeaturePostStep -import java.time.DayOfWeek -import java.time.LocalDateTime - -/** - * The access point to an implementation of [LocalDateTimeAssertions]. - * - * It loads the implementation lazily via [loadSingleService]. - */ -val localDateTimeAssertions by lazy { loadSingleService(LocalDateTimeAssertions::class) } - -/** - * Defines the minimum set of assertion functions and builders applicable to [LocalDateTime], - * which an implementation of the domain of Atrium has to provide. - */ -@Deprecated( - "Use LocalDateTimeAssertions from atrium-logic; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.logic.LocalDateTimeAssertions") -) -interface LocalDateTimeAssertions { - fun year(expect: Expect): ExtractedFeaturePostStep - - fun month(expect: Expect): ExtractedFeaturePostStep - - fun day(expect: Expect): ExtractedFeaturePostStep - - fun dayOfWeek(expect: Expect): ExtractedFeaturePostStep -} diff --git a/misc/deprecated/domain/api/atrium-domain-api-jvm/src/main/kotlin/ch/tutteli/atrium/domain/creating/OptionalAssertions.kt b/misc/deprecated/domain/api/atrium-domain-api-jvm/src/main/kotlin/ch/tutteli/atrium/domain/creating/OptionalAssertions.kt deleted file mode 100644 index ea2e43df5..000000000 --- a/misc/deprecated/domain/api/atrium-domain-api-jvm/src/main/kotlin/ch/tutteli/atrium/domain/creating/OptionalAssertions.kt +++ /dev/null @@ -1,33 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress( - "DEPRECATION", - /* TODO remove once https://youtrack.jetbrains.com/issue/KT-35343 is fixed */ - "JAVA_MODULE_DOES_NOT_READ_UNNAMED_MODULE" -) -package ch.tutteli.atrium.domain.creating - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.core.polyfills.loadSingleService -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.domain.creating.changers.ExtractedFeaturePostStep -import java.util.* - -/** - * The access point to an implementation of [OptionalAssertions]. - * - * It loads the implementation lazily via [loadSingleService]. - */ -val optionalAssertions by lazy { loadSingleService(OptionalAssertions::class) } - -/** - * Defines the minimum set of assertion functions and builders applicable to [Optional], - * which an implementation of the domain of Atrium has to provide. - */ -@Deprecated( - "Use OptionalAssertions from atrium-logic; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.logic.OptionalAssertions") -) -interface OptionalAssertions { - fun > isEmpty(expect: Expect): Assertion - fun > isPresent(expect: Expect): ExtractedFeaturePostStep -} diff --git a/misc/deprecated/domain/api/atrium-domain-api-jvm/src/main/kotlin/ch/tutteli/atrium/domain/creating/PathAssertions.kt b/misc/deprecated/domain/api/atrium-domain-api-jvm/src/main/kotlin/ch/tutteli/atrium/domain/creating/PathAssertions.kt deleted file mode 100644 index 024b09705..000000000 --- a/misc/deprecated/domain/api/atrium-domain-api-jvm/src/main/kotlin/ch/tutteli/atrium/domain/creating/PathAssertions.kt +++ /dev/null @@ -1,53 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress( - "DEPRECATION", - /* TODO remove once https://youtrack.jetbrains.com/issue/KT-35343 is fixed */ - "JAVA_MODULE_DOES_NOT_READ_UNNAMED_MODULE" -) -package ch.tutteli.atrium.domain.creating - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.core.polyfills.loadSingleService -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.domain.creating.changers.ExtractedFeaturePostStep -import java.nio.charset.Charset -import java.nio.file.Path - -/** - * The access point to an implementation of [PathAssertions]. - * - * It loads the implementation lazily via [loadSingleService]. - */ -val pathAssertions by lazy { loadSingleService(PathAssertions::class) } - -/** - * Defines the minimum set of assertion functions and builders applicable to [Path], - * which an implementation of the domain of Atrium has to provide. - */ -@Deprecated( - "Use PathAssertions from atrium-logic; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.logic.PathAssertions") -) -interface PathAssertions { - fun fileName(expect: Expect): ExtractedFeaturePostStep - fun extension(expect: Expect): ExtractedFeaturePostStep - fun fileNameWithoutExtension(expect: Expect): ExtractedFeaturePostStep - fun parent(expect: Expect): ExtractedFeaturePostStep - fun resolve(expect: Expect, other: String): ExtractedFeaturePostStep - - fun startsWith(expect: Expect, expected: Path): Assertion - fun startsNotWith(expect: Expect, expected: Path): Assertion - fun endsWith(expect: Expect, expected: Path): Assertion - fun endsNotWith(expect: Expect, expected: Path): Assertion - - fun exists(expect: Expect): Assertion - fun existsNot(expect: Expect): Assertion - - fun isReadable(expect: Expect): Assertion - fun isWritable(expect: Expect): Assertion - fun isRegularFile(expect: Expect): Assertion - fun isDirectory(expect: Expect): Assertion - - fun hasSameTextualContentAs(expect: Expect, targetPath: Path, sourceCharset: Charset, targetCharset: Charset): Assertion - fun hasSameBinaryContentAs(expect: Expect, targetPath: Path): Assertion -} diff --git a/misc/deprecated/domain/api/atrium-domain-api-jvm/src/main/kotlin/ch/tutteli/atrium/domain/creating/ZonedDateTimeAssertions.kt b/misc/deprecated/domain/api/atrium-domain-api-jvm/src/main/kotlin/ch/tutteli/atrium/domain/creating/ZonedDateTimeAssertions.kt deleted file mode 100644 index a9a3e0a25..000000000 --- a/misc/deprecated/domain/api/atrium-domain-api-jvm/src/main/kotlin/ch/tutteli/atrium/domain/creating/ZonedDateTimeAssertions.kt +++ /dev/null @@ -1,41 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress( - "DEPRECATION", - /* TODO remove once https://youtrack.jetbrains.com/issue/KT-34257 is fixed */ - "FINAL_UPPER_BOUND", - /* TODO remove once https://youtrack.jetbrains.com/issue/KT-35343 is fixed */ - "JAVA_MODULE_DOES_NOT_READ_UNNAMED_MODULE" -) - -package ch.tutteli.atrium.domain.creating - -import ch.tutteli.atrium.core.polyfills.loadSingleService -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.domain.creating.changers.ExtractedFeaturePostStep -import java.time.DayOfWeek -import java.time.ZonedDateTime - -/** - * The access point to an implementation of [ZonedDateTimeAssertions]. - * - * It loads the implementation lazily via [loadSingleService]. - */ -val zonedDateTimeAssertions by lazy { loadSingleService(ZonedDateTimeAssertions::class) } - -/** - * Defines the minimum set of assertion functions and builders applicable to [ZonedDateTime], - * which an implementation of the domain of Atrium has to provide. - */ -@Deprecated( - "Use ZonedDateTimeAssertions from atrium-logic; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.logic.ZonedDateTimeAssertions") -) -interface ZonedDateTimeAssertions { - fun year(expect: Expect): ExtractedFeaturePostStep - - fun month(expect: Expect): ExtractedFeaturePostStep - - fun day(expect: Expect): ExtractedFeaturePostStep - - fun dayOfWeek(expect: Expect): ExtractedFeaturePostStep -} diff --git a/misc/deprecated/domain/api/atrium-domain-api-jvm/src/module/module-info.java b/misc/deprecated/domain/api/atrium-domain-api-jvm/src/module/module-info.java index 67a31ed38..3432648a8 100644 --- a/misc/deprecated/domain/api/atrium-domain-api-jvm/src/module/module-info.java +++ b/misc/deprecated/domain/api/atrium-domain-api-jvm/src/module/module-info.java @@ -2,26 +2,6 @@ module ch.tutteli.atrium.domain.api { requires transitive ch.tutteli.atrium.core.api; requires kotlin.stdlib; - exports ch.tutteli.atrium.domain.assertions.composers; exports ch.tutteli.atrium.domain.creating; - exports ch.tutteli.atrium.domain.creating.any.typetransformation; - exports ch.tutteli.atrium.domain.creating.any.typetransformation.creators; - exports ch.tutteli.atrium.domain.creating.any.typetransformation.failurehandlers; - exports ch.tutteli.atrium.domain.creating.basic.contains; - exports ch.tutteli.atrium.domain.creating.changers; - exports ch.tutteli.atrium.domain.creating.charsequence.contains; - exports ch.tutteli.atrium.domain.creating.charsequence.contains.checkers; - exports ch.tutteli.atrium.domain.creating.charsequence.contains.creators; - exports ch.tutteli.atrium.domain.creating.charsequence.contains.searchbehaviours; exports ch.tutteli.atrium.domain.creating.collectors; - exports ch.tutteli.atrium.domain.creating.feature.extract; - exports ch.tutteli.atrium.domain.creating.feature.extract.creators; - exports ch.tutteli.atrium.domain.creating.iterable.contains; - exports ch.tutteli.atrium.domain.creating.iterable.contains.checkers; - exports ch.tutteli.atrium.domain.creating.iterable.contains.creators; - exports ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours; - exports ch.tutteli.atrium.domain.creating.throwable.thrown; - exports ch.tutteli.atrium.domain.creating.throwable.thrown.creators; - exports ch.tutteli.atrium.domain.creating.throwable.thrown.providers; - exports ch.tutteli.atrium.domain.creating.typeutils; } diff --git a/misc/deprecated/domain/api/extensions/kotlin_1_3/atrium-domain-api-kotlin_1_3-common/build.gradle b/misc/deprecated/domain/api/extensions/kotlin_1_3/atrium-domain-api-kotlin_1_3-common/build.gradle deleted file mode 100644 index c9b67d350..000000000 --- a/misc/deprecated/domain/api/extensions/kotlin_1_3/atrium-domain-api-kotlin_1_3-common/build.gradle +++ /dev/null @@ -1,9 +0,0 @@ -description = 'Kotlin 1.3 specific extension for domain-api-common -- will be merged into domain-api-common with 1.0.0' - -dependencies { - api prefixedProject('domain-api-common') - api prefixedProject('core-api-common') - - // it is up to the consumer of atrium-domain-api which atrium-translations module is used at runtime - compileOnly prefixedProject('translations-en_GB-common') -} diff --git a/misc/deprecated/domain/api/extensions/kotlin_1_3/atrium-domain-api-kotlin_1_3-common/src/main/kotlin/ch/tutteli/atrium/domain/kotlin_1_3/creating/ResultAssertions.kt b/misc/deprecated/domain/api/extensions/kotlin_1_3/atrium-domain-api-kotlin_1_3-common/src/main/kotlin/ch/tutteli/atrium/domain/kotlin_1_3/creating/ResultAssertions.kt deleted file mode 100644 index b75c43056..000000000 --- a/misc/deprecated/domain/api/extensions/kotlin_1_3/atrium-domain-api-kotlin_1_3-common/src/main/kotlin/ch/tutteli/atrium/domain/kotlin_1_3/creating/ResultAssertions.kt +++ /dev/null @@ -1,34 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION") -package ch.tutteli.atrium.domain.kotlin_1_3.creating - -import ch.tutteli.atrium.core.polyfills.loadSingleService -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.domain.creating.changers.ChangedSubjectPostStep -import ch.tutteli.atrium.domain.creating.changers.ExtractedFeaturePostStep -import kotlin.reflect.KClass - -/** - * The access point to an implementation of [ResultAssertions]. - * - * It loads the implementation lazily via [loadSingleService]. - */ -@Deprecated("Use _logic from ch.tutteli.atrium.logic instead; will be removed with 1.0.0") -val resultAssertions by lazy { loadSingleService(ResultAssertions::class) } - -/** - * Defines the minimum set of assertion functions and builders applicable to [Result], - * which an implementation of the domain of Atrium has to provide. - */ -@Deprecated( - "Use ResultAssertions from atrium-logic; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.logic.kotlin_1_3.ResultAssertions") -) -interface ResultAssertions { - fun > isSuccess(expect: Expect): ExtractedFeaturePostStep - - fun isFailure( - expect: Expect>, - expectedType: KClass - ): ChangedSubjectPostStep -} diff --git a/misc/deprecated/domain/api/extensions/kotlin_1_3/atrium-domain-api-kotlin_1_3-js/build.gradle b/misc/deprecated/domain/api/extensions/kotlin_1_3/atrium-domain-api-kotlin_1_3-js/build.gradle deleted file mode 100644 index de6011175..000000000 --- a/misc/deprecated/domain/api/extensions/kotlin_1_3/atrium-domain-api-kotlin_1_3-js/build.gradle +++ /dev/null @@ -1,9 +0,0 @@ -description = 'Kotlin 1.3 specific extension for domain-api-js -- will be merged into domain-api-js with 1.0.0' - -dependencies { - api prefixedProject('domain-api-js') - api prefixedProject('core-api-js') - - // it is up to the consumer of atrium-domain-api which atrium-translations module is used at runtime - compileOnly prefixedProject('translations-en_GB-js') -} diff --git a/misc/deprecated/domain/api/extensions/kotlin_1_3/atrium-domain-api-kotlin_1_3-jvm/build.gradle b/misc/deprecated/domain/api/extensions/kotlin_1_3/atrium-domain-api-kotlin_1_3-jvm/build.gradle deleted file mode 100644 index fd56d7870..000000000 --- a/misc/deprecated/domain/api/extensions/kotlin_1_3/atrium-domain-api-kotlin_1_3-jvm/build.gradle +++ /dev/null @@ -1,9 +0,0 @@ -description = 'Kotlin 1.3 specific extension for domain-api-jvm -- will be merged into domain-api-jvm with 1.0.0' - -dependencies { - api prefixedProject('domain-api-jvm') - api prefixedProject('core-api-jvm') - - // it is up to the consumer of atrium-domain-api which atrium-translations module is used at runtime - compileOnly prefixedProject('translations-en_GB-jvm') -} diff --git a/misc/deprecated/domain/api/extensions/kotlin_1_3/atrium-domain-api-kotlin_1_3-jvm/src/module/module-info.java b/misc/deprecated/domain/api/extensions/kotlin_1_3/atrium-domain-api-kotlin_1_3-jvm/src/module/module-info.java deleted file mode 100644 index bb1f845e1..000000000 --- a/misc/deprecated/domain/api/extensions/kotlin_1_3/atrium-domain-api-kotlin_1_3-jvm/src/module/module-info.java +++ /dev/null @@ -1,7 +0,0 @@ -module ch.tutteli.atrium.domain.api.kotlin_1_3 { - requires transitive ch.tutteli.atrium.domain.api; - requires transitive ch.tutteli.atrium.core.api; - requires kotlin.stdlib; - - exports ch.tutteli.atrium.domain.kotlin_1_3.creating; -} diff --git a/misc/deprecated/domain/atrium-domain-api-deprecated/build.gradle b/misc/deprecated/domain/atrium-domain-api-deprecated/build.gradle deleted file mode 100644 index a4a29ff8c..000000000 --- a/misc/deprecated/domain/atrium-domain-api-deprecated/build.gradle +++ /dev/null @@ -1,8 +0,0 @@ -description = 'Deprecated API of the domain of Atrium.' - -dependencies { - api prefixedProject('domain-api-jvm') - - // it is up to the consumer of atrium-domain-deprecated which atrium-translations module is used at runtime - compileOnly prefixedProject('translations-en_GB-jvm') -} diff --git a/misc/deprecated/domain/atrium-domain-api-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/basic/contains/Contains.kt b/misc/deprecated/domain/atrium-domain-api-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/basic/contains/Contains.kt deleted file mode 100644 index be191a060..000000000 --- a/misc/deprecated/domain/atrium-domain-api-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/basic/contains/Contains.kt +++ /dev/null @@ -1,35 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0 */) -package ch.tutteli.atrium.assertions.basic.contains - -import ch.tutteli.atrium.assertions.basic.contains.Contains.* - -/** - * Defines the *deprecated* basic contract for sophisticated `contains` assertion builders. - * - * A builder typically allows a user to choose a desired [SearchBehaviour], one or more [Checker]s and uses an - * [Creator] to finish the building process. - */ -@Deprecated( - "Use the interface from package domain.creating; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.domain.creating.basic.contains.Contains") -) -interface Contains { - - @Deprecated( - "Use the interface from package domain.creating; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.domain.creating.basic.contains.Contains.SearchBehaviour") - ) - interface SearchBehaviour : ch.tutteli.atrium.domain.creating.basic.contains.Contains.SearchBehaviour - - @Deprecated( - "Use the interface from package domain.creating; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.domain.creating.basic.contains.Contains.Checker") - ) - interface Checker : ch.tutteli.atrium.domain.creating.basic.contains.Contains.Checker - - @Deprecated( - "Use the interface from package domain.creating; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.domain.creating.basic.contains.Contains.Creator") - ) - interface Creator : ch.tutteli.atrium.domain.creating.basic.contains.Contains.Creator -} diff --git a/misc/deprecated/domain/atrium-domain-api-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/basic/contains/builders/ContainsBuilder.kt b/misc/deprecated/domain/atrium-domain-api-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/basic/contains/builders/ContainsBuilder.kt deleted file mode 100644 index 2b8576dd2..000000000 --- a/misc/deprecated/domain/atrium-domain-api-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/basic/contains/builders/ContainsBuilder.kt +++ /dev/null @@ -1,34 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove annotation with 1.0.0 */) - -package ch.tutteli.atrium.assertions.basic.contains.builders - -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.domain.creating.basic.contains.Contains - -/** - * Represents the *deprecated* base class for builders representing the entry point of the process of building a sophisticated - * `contains` assertion. - * - * @param T The type of the [AssertionPlant.subject][SubjectProvider.subject]. - * @param S The type of the current [Contains.SearchBehaviour]. - * - * @property plant The [AssertionPlant] for which the sophisticated `contains` assertions shall be built. - * @property searchBehaviour The search behaviour which shall be applied to the input of the search. - * - * @constructor Represents the base class for builders representing the entry point of the process of building a - * sophisticated `contains` assertion. - * @param plant The [AssertionPlant] for which the sophisticated `contains` assertions shall be built. - * @param searchBehaviour The search behaviour which shall be applied to the input of the search. - */ -@Deprecated( - "Use the interface Contains.Builder instead; will be removed with 1.0.0", - ReplaceWith( - "Contains.Builder", - "ch.tutteli.atrium.domain.creating.basic.contains.Contains" - ) -) -abstract class ContainsBuilder( - override val subjectProvider: AssertionPlant, - override val searchBehaviour: S -) : Contains.Builder diff --git a/misc/deprecated/domain/atrium-domain-api-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/basic/contains/builders/ContainsCheckerBuilder.kt b/misc/deprecated/domain/atrium-domain-api-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/basic/contains/builders/ContainsCheckerBuilder.kt deleted file mode 100644 index b40380c70..000000000 --- a/misc/deprecated/domain/atrium-domain-api-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/basic/contains/builders/ContainsCheckerBuilder.kt +++ /dev/null @@ -1,30 +0,0 @@ -package ch.tutteli.atrium.assertions.basic.contains.builders - -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.domain.creating.basic.contains.Contains - -/** - * Represents the *deprecated* base class for builders representing a checking step in the process of building a sophisticated - * `contains` assertion. - * - * @param T The type of the [AssertionPlant.subject][SubjectProvider.subject]. - * @param S The type of the current [Contains.SearchBehaviour]. - * @param C The type of the checkers in use (typically a sub interface of [Contains.Checker]). - * @param B The concrete type of the builder representing the entry point of the process of building a sophisticated - * `contains` assertion. - * - * @property containsBuilder The builder representing the entry point of the process of building a sophisticated - * `contains` assertion. - * - * @constructor Represents the base class for builders representing a checking step in the process of creating a - * sophisticated `contains` assertion. - */ -@Deprecated( - "Use the interface Contains.CheckerOption instead; will be removed with 1.0.0", - ReplaceWith( - "Contains.CheckerOption", - "ch.tutteli.atrium.domain.creating.basic.contains.Contains" - ) -) -interface ContainsCheckerBuilder> - : Contains.CheckerOption diff --git a/misc/deprecated/domain/atrium-domain-api-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/charsequence/contains/CharSequenceContains.kt b/misc/deprecated/domain/atrium-domain-api-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/charsequence/contains/CharSequenceContains.kt deleted file mode 100644 index 9649dc82b..000000000 --- a/misc/deprecated/domain/atrium-domain-api-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/charsequence/contains/CharSequenceContains.kt +++ /dev/null @@ -1,70 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0 */) -package ch.tutteli.atrium.assertions.charsequence.contains - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.assertions.AssertionGroup -import ch.tutteli.atrium.assertions.basic.contains.Contains -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.reporting.translating.Translatable - -/** - * Defines the *deprecated* contract for sophisticated [CharSequence] `contains` assertions. - */ -@Deprecated( - "Use the interface from package domain.creating; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains") -) -interface CharSequenceContains { - - /** - * Represents a *deprecated* search behaviour but leaves it up to the [Searcher] how this behaviour is implemented -- yet, it - * provides a method to decorate a description (a [Translatable]) in order that it reflects the search behaviour. - */ - @Deprecated( - "Use the interface from package domain.creating; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains.SearchBehaviour") - ) - interface SearchBehaviour : Contains.SearchBehaviour, - ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains.SearchBehaviour - - /** - * Represents the *deprecated* final step of a sophisticated `contains` assertion builder which creates the [AssertionGroup] - * as such. - * - * @param T The type of the [AssertionPlant.subject][SubjectProvider.subject]. - * @param SC The type of the search criteria. - */ - @Deprecated( - "Use the interface from package domain.creating; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains.Creator") - ) - interface Creator : Contains.Creator, - ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains.Creator - - /** - * Represents a *deprecated* 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( - "Use the interface from package domain.creating; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains.Checker") - ) - interface Checker : Contains.Checker, - ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains.Checker - - /** - * Represents a *deprecated* searcher which supports the search behaviour [S] for a given input [CharSequence] of the search. - * - * @param S The search behaviour which should be applied to the input [CharSequence] in which the [Searcher] - * will look for something -- the actual implementation of the search behaviour happens in the - * [Searcher]; [SearchBehaviour] only decorates the [Translatable] for reporting. - */ - @Deprecated( - "Use the interface from package domain.creating; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains.Searcher") - ) - interface Searcher : - ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains.Searcher -} diff --git a/misc/deprecated/domain/atrium-domain-api-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/charsequence/contains/builders/CharSequenceContainsBuilder.kt b/misc/deprecated/domain/atrium-domain-api-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/charsequence/contains/builders/CharSequenceContainsBuilder.kt deleted file mode 100644 index cacb3158c..000000000 --- a/misc/deprecated/domain/atrium-domain-api-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/charsequence/contains/builders/CharSequenceContainsBuilder.kt +++ /dev/null @@ -1,34 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0 */) -package ch.tutteli.atrium.assertions.charsequence.contains.builders - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.assertions.basic.contains.builders.ContainsBuilder -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains - -/** - * Represents the *deprecated* entry point of the fluent API of sophisticated `contains` assertions. - * It contains the [subjectProvider] for which the [Assertion] shall be build as well as the decoration behaviour which - * shall be applied to the [subjectProvider]'s [subject][SubjectProvider.subject]. - * - * @param T The input type of the search which is the same as the type of the [subject][SubjectProvider.subject] of the - * [subjectProvider]. - * @param S The search behaviour which should be applied for the input of the search. - * - * @constructor Represents the entry point of the fluent API of sophisticated `contains` assertions. - * @param plant The [AssertionPlant] for which the sophisticated `contains` assertions shall be built. - * @param searchBehaviour The search behaviour which shall be applied to the input of the search. - */ -@Deprecated( - "Use the interface CharSequenceContains.Builder instead; will be removed with 1.0.0", - ReplaceWith( - "CharSequenceContains.Builder", - "ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains" - ) -) -class CharSequenceContainsBuilder( - plant: AssertionPlant, searchBehaviour: S -) : ContainsBuilder(plant, searchBehaviour), - CharSequenceContains.Builder - diff --git a/misc/deprecated/domain/atrium-domain-api-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/charsequence/contains/builders/CharSequenceContainsCheckerBuilder.kt b/misc/deprecated/domain/atrium-domain-api-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/charsequence/contains/builders/CharSequenceContainsCheckerBuilder.kt deleted file mode 100644 index 07d173e50..000000000 --- a/misc/deprecated/domain/atrium-domain-api-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/charsequence/contains/builders/CharSequenceContainsCheckerBuilder.kt +++ /dev/null @@ -1,26 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0*/) -package ch.tutteli.atrium.assertions.charsequence.contains.builders - -import ch.tutteli.atrium.assertions.basic.contains.builders.ContainsCheckerBuilder -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains - -/** - * The *deprecated* base class for builders which create [CharSequenceContains.Checker]s within the fluent API of a sophisticated - * `contains` assertion which was started with the given [containsBuilder]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - * - * @constructor The base class for builders which create [CharSequenceContains.Checker]s within the fluent API of a sophisticated - * `contains` assertion which was started with the given [containsBuilder]. - */ -@Deprecated( - "Use the interface CharSequenceContains.CheckerOption instead; will be removed with 1.0.0", - ReplaceWith( - "CharSequenceContains.CheckerOption", - "ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains" - ) -) -interface CharSequenceContainsCheckerBuilder - : ContainsCheckerBuilder>, - CharSequenceContains.CheckerOption diff --git a/misc/deprecated/domain/atrium-domain-api-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/charsequence/contains/searchbehaviours/CharSequenceContainsIgnoringCaseSearchBehaviour.kt b/misc/deprecated/domain/atrium-domain-api-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/charsequence/contains/searchbehaviours/CharSequenceContainsIgnoringCaseSearchBehaviour.kt deleted file mode 100644 index 33d638c92..000000000 --- a/misc/deprecated/domain/atrium-domain-api-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/charsequence/contains/searchbehaviours/CharSequenceContainsIgnoringCaseSearchBehaviour.kt +++ /dev/null @@ -1,29 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0*/) -package ch.tutteli.atrium.assertions.charsequence.contains.searchbehaviours - -import ch.tutteli.atrium.assertions.charsequence.contains.CharSequenceContains -import ch.tutteli.atrium.reporting.translating.Translatable -import ch.tutteli.atrium.reporting.translating.TranslatableWithArgs -import ch.tutteli.atrium.translations.DescriptionCharSequenceAssertion - -/** - * Represents the *deprecated* search behaviour that a [CharSequenceContains.Searcher] should ignore case - * when searching for an expected object. - */ -@Deprecated( - "Use the interface IgnoringCaseSearchBehaviour instead; will be removed with 1.0.0", - ReplaceWith( - "IgnoringCaseSearchBehaviour", - "ch.tutteli.atrium.domain.creating.charsequence.contains.searchbehaviours.IgnoringCaseSearchBehaviour" - ) -) -open class CharSequenceContainsIgnoringCaseSearchBehaviour( - private val previousBehaviour: ch.tutteli.atrium.domain.creating.charsequence.contains.searchbehaviours.NoOpSearchBehaviour -) : CharSequenceContains.SearchBehaviour, - ch.tutteli.atrium.domain.creating.charsequence.contains.searchbehaviours.IgnoringCaseSearchBehaviour { - - override fun decorateDescription(description: Translatable): Translatable { - val previousDecorated = previousBehaviour.decorateDescription(description) - return TranslatableWithArgs(DescriptionCharSequenceAssertion.IGNORING_CASE, previousDecorated) - } -} diff --git a/misc/deprecated/domain/atrium-domain-api-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/charsequence/contains/searchbehaviours/CharSequenceContainsNoOpSearchBehaviour.kt b/misc/deprecated/domain/atrium-domain-api-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/charsequence/contains/searchbehaviours/CharSequenceContainsNoOpSearchBehaviour.kt deleted file mode 100644 index bb51e4aaf..000000000 --- a/misc/deprecated/domain/atrium-domain-api-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/charsequence/contains/searchbehaviours/CharSequenceContainsNoOpSearchBehaviour.kt +++ /dev/null @@ -1,20 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0*/) -package ch.tutteli.atrium.assertions.charsequence.contains.searchbehaviours - -import ch.tutteli.atrium.assertions.charsequence.contains.CharSequenceContains - -/** - * Represents the *deprecated* default search behaviour or rather does not define a search behaviour at all. - * - * It furthermore implements a no operation for [decorateDescription], meaning it passes back the description which - * is passed in (identity function). - */ -@Deprecated( - "Use the interface NoOpSearchBehaviour instead; will be removed with 1.0.0", - ReplaceWith( - "NoOpSearchBehaviour", - "ch.tutteli.atrium.domain.creating.charsequence.contains.searchbehaviours.NoOpSearchBehaviour" - ) -) -open class CharSequenceContainsNoOpSearchBehaviour : CharSequenceContains.SearchBehaviour, - ch.tutteli.atrium.domain.creating.charsequence.contains.searchbehaviours.NoOpSearchBehaviour diff --git a/misc/deprecated/domain/atrium-domain-api-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/charsequence/contains/searchbehaviours/CharSequenceContainsNotSearchBehaviour.kt b/misc/deprecated/domain/atrium-domain-api-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/charsequence/contains/searchbehaviours/CharSequenceContainsNotSearchBehaviour.kt deleted file mode 100644 index d8c191ec0..000000000 --- a/misc/deprecated/domain/atrium-domain-api-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/charsequence/contains/searchbehaviours/CharSequenceContainsNotSearchBehaviour.kt +++ /dev/null @@ -1,26 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0*/) -package ch.tutteli.atrium.assertions.charsequence.contains.searchbehaviours - -import ch.tutteli.atrium.reporting.translating.Translatable -import ch.tutteli.atrium.translations.DescriptionCharSequenceAssertion - -/** - * Represents the *deprecated* default search behaviour but uses [DescriptionCharSequenceAssertion.CONTAINS_NOT] for the description. - */ -@Deprecated( - "Use the interface NotSearchBehaviour instead; will be removed with 1.0.0", - ReplaceWith( - "NotSearchBehaviour", - "ch.tutteli.atrium.domain.creating.charsequence.contains.searchbehaviours.NotSearchBehaviour" - ) -) -open class CharSequenceContainsNotSearchBehaviour : CharSequenceContainsNoOpSearchBehaviour(), - ch.tutteli.atrium.domain.creating.charsequence.contains.searchbehaviours.NotSearchBehaviour -{ - /** - * Returns [DescriptionCharSequenceAssertion.CONTAINS_NOT]. - * @return [DescriptionCharSequenceAssertion.CONTAINS_NOT] - */ - override fun decorateDescription(description: Translatable) - = DescriptionCharSequenceAssertion.CONTAINS_NOT -} diff --git a/misc/deprecated/domain/atrium-domain-api-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/iterable/contains/IterableContains.kt b/misc/deprecated/domain/atrium-domain-api-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/iterable/contains/IterableContains.kt deleted file mode 100644 index 2a9b1d0c9..000000000 --- a/misc/deprecated/domain/atrium-domain-api-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/iterable/contains/IterableContains.kt +++ /dev/null @@ -1,53 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0*/) -package ch.tutteli.atrium.assertions.iterable.contains - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.assertions.AssertionGroup -import ch.tutteli.atrium.assertions.basic.contains.Contains -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.reporting.translating.Translatable - -/** - * Defines the *deprecated* contract for sophisticated [Iterable] `contains` assertions. - */ -@Deprecated( - "Use the interface from package domain.creating; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains") -) -interface IterableContains { - - /** - * Represents a search behaviour but leaves it up to the [Creator] how this behaviour is implemented -- yet, it - * provides a method to decorate a description (a [Translatable]) in order that it reflects the search behaviour. - */ - @Deprecated( - "Use the interface from package domain.creating; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains.SearchBehaviour") - ) - interface SearchBehaviour : Contains.SearchBehaviour, IterableContains.SearchBehaviour - - /** - * Represents the final step of a sophisticated `contains` assertion builder which creates the [AssertionGroup] - * as such. - * - * @param T The type of the [AssertionPlant.subject][SubjectProvider.subject]. - * @param S The type of the search criteria. - */ - @Deprecated( - "Use the interface from package domain.creating; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains.Creator") - ) - interface Creator, in S> : Contains.Creator, IterableContains.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( - "Use the interface from package domain.creating; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains.Checker") - ) - interface Checker : Contains.Checker, IterableContains.Checker -} diff --git a/misc/deprecated/domain/atrium-domain-api-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/iterable/contains/builders/IterableContainsBuilder.kt b/misc/deprecated/domain/atrium-domain-api-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/iterable/contains/builders/IterableContainsBuilder.kt deleted file mode 100644 index dd6d6d3fd..000000000 --- a/misc/deprecated/domain/atrium-domain-api-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/iterable/contains/builders/IterableContainsBuilder.kt +++ /dev/null @@ -1,33 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0*/) -package ch.tutteli.atrium.assertions.iterable.contains.builders - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.assertions.basic.contains.builders.ContainsBuilder -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains - -/** - * Represents the *deprecated* entry point of the fluent API of sophisticated `contains` assertions. - * It contains the [subjectProvider] for which the [Assertion] shall be build as well as the decoration behaviour which shall be - * applied to the [subjectProvider]'s [subject][SubjectProvider.subject]. - * - * @param T The input type of the search which is the same as the type of the [subject][SubjectProvider.subject] of the - * [subjectProvider]. - * @param S The search behaviour which should be applied for the input of the search. - * - * @constructor Represents the entry point of the fluent API of sophisticated `contains` assertions. - * @param plant The [AssertionPlant] for which the sophisticated `contains` assertions shall be built. - * @param searchBehaviour The search behaviour which shall be applied to the input of the search. - */ -@Deprecated( - "Use the interface IterableContains.Builder instead; will be removed with 1.0.0", - ReplaceWith( - "IterableContains.Builder", - "ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains" - ) -) -open class IterableContainsBuilder, out S : IterableContains.SearchBehaviour>( - plant: AssertionPlant, searchBehaviour: S -) : ContainsBuilder(plant, searchBehaviour), - IterableContains.Builder diff --git a/misc/deprecated/domain/atrium-domain-api-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/iterable/contains/builders/IterableContainsCheckerBuilder.kt b/misc/deprecated/domain/atrium-domain-api-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/iterable/contains/builders/IterableContainsCheckerBuilder.kt deleted file mode 100644 index ee11513c9..000000000 --- a/misc/deprecated/domain/atrium-domain-api-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/iterable/contains/builders/IterableContainsCheckerBuilder.kt +++ /dev/null @@ -1,26 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0*/) -package ch.tutteli.atrium.assertions.iterable.contains.builders - -import ch.tutteli.atrium.assertions.basic.contains.builders.ContainsCheckerBuilder -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains - -/** - * The *deprecated* base class for builders which create [IterableContains.Checker]s within the fluent API of a sophisticated - * `contains` assertion which was started with the given [containsBuilder]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - * - * @constructor The base class for builders which create [IterableContains.Checker]s within the fluent API of a sophisticated - * `contains` assertion which was started with the given [containsBuilder]. - */ -@Deprecated( - "Use the interface IterableContains.CheckerOption instead; will be removed with 1.0.0", - ReplaceWith( - "IterableContains.CheckerOption", - "ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains" - ) -) -interface IterableContainsCheckerBuilder, out S : IterableContains.SearchBehaviour> - : ContainsCheckerBuilder>, - IterableContains.CheckerOption diff --git a/misc/deprecated/domain/atrium-domain-api-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/iterable/contains/builders/IterableContainsNoOpCheckerBuilder.kt b/misc/deprecated/domain/atrium-domain-api-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/iterable/contains/builders/IterableContainsNoOpCheckerBuilder.kt deleted file mode 100644 index 5ce870f75..000000000 --- a/misc/deprecated/domain/atrium-domain-api-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/iterable/contains/builders/IterableContainsNoOpCheckerBuilder.kt +++ /dev/null @@ -1,25 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0*/) -package ch.tutteli.atrium.assertions.iterable.contains.builders - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.assertions.iterable.contains.IterableContains - -/** - * Represents the *deprecated* "no [IterableContains.Checker]" option, meaning no checker shall be applied to a search result. - * - * The checking as such is then usually carried out be the [IterableContains.Creator]. - */ -@Deprecated("Please open an issue if you used this class; will be removed with 1.0.0") -class IterableContainsNoOpCheckerBuilder, out S : IterableContains.SearchBehaviour>( - override val containsBuilder: IterableContainsBuilder -) : IterableContainsCheckerBuilder { - - override val checkers: List = listOf(NotIntendedForUseChecker) - - private object NotIntendedForUseChecker : IterableContains.Checker { - override fun createAssertion(foundNumberOfTimes: Int): Assertion = throw UnsupportedOperationException( - "You used ${IterableContainsNoOpCheckerBuilder::class.java} but are still using its" + - " ${IterableContainsNoOpCheckerBuilder, *>::checkers.name} which is a no go." - ) - } -} diff --git a/misc/deprecated/domain/atrium-domain-api-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/iterable/contains/searchbehaviours/IterableContainsInAnyOrderOnlySearchBehaviour.kt b/misc/deprecated/domain/atrium-domain-api-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/iterable/contains/searchbehaviours/IterableContainsInAnyOrderOnlySearchBehaviour.kt deleted file mode 100644 index 5a19d518f..000000000 --- a/misc/deprecated/domain/atrium-domain-api-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/iterable/contains/searchbehaviours/IterableContainsInAnyOrderOnlySearchBehaviour.kt +++ /dev/null @@ -1,25 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0*/) -package ch.tutteli.atrium.assertions.iterable.contains.searchbehaviours - -import ch.tutteli.atrium.assertions.iterable.contains.IterableContains -import ch.tutteli.atrium.reporting.translating.Translatable -import ch.tutteli.atrium.reporting.translating.TranslatableWithArgs -import ch.tutteli.atrium.translations.DescriptionIterableAssertion - -/** - * Represents the *deprecated* search behaviour that expected entries might appear in any order within the [Iterable] but that - * the resulting assertion should not hold if there are less entries than expected or more. - */ -@Deprecated( - "Use the interface InAnyOrderOnlySearchBehaviour instead; will be removed with 1.0.0", - ReplaceWith( - "InAnyOrderOnlySearchBehaviour", - "ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InAnyOrderOnlySearchBehaviour" - ) -) -open class IterableContainsInAnyOrderOnlySearchBehaviour : IterableContains.SearchBehaviour, - ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InAnyOrderOnlySearchBehaviour { - - override fun decorateDescription(description: Translatable): Translatable - = TranslatableWithArgs(DescriptionIterableAssertion.IN_ANY_ORDER_ONLY, description) -} diff --git a/misc/deprecated/domain/atrium-domain-api-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/iterable/contains/searchbehaviours/IterableContainsInAnyOrderSearchBehaviour.kt b/misc/deprecated/domain/atrium-domain-api-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/iterable/contains/searchbehaviours/IterableContainsInAnyOrderSearchBehaviour.kt deleted file mode 100644 index 892b0b7f3..000000000 --- a/misc/deprecated/domain/atrium-domain-api-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/iterable/contains/searchbehaviours/IterableContainsInAnyOrderSearchBehaviour.kt +++ /dev/null @@ -1,24 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0*/) -package ch.tutteli.atrium.assertions.iterable.contains.searchbehaviours - -import ch.tutteli.atrium.assertions.iterable.contains.IterableContains -import ch.tutteli.atrium.reporting.translating.Translatable -import ch.tutteli.atrium.reporting.translating.TranslatableWithArgs -import ch.tutteli.atrium.translations.DescriptionIterableAssertion - -/** - * Represents the *deprecated* search behaviour that expected entries might appear in any order within the [Iterable]. - */ -@Deprecated( - "Use the interface InAnyOrderSearchBehaviour instead; will be removed with 1.0.0", - ReplaceWith( - "InAnyOrderSearchBehaviour", - "ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InAnyOrderSearchBehaviour" - ) -) -open class IterableContainsInAnyOrderSearchBehaviour : IterableContains.SearchBehaviour, - ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InAnyOrderSearchBehaviour { - - override fun decorateDescription(description: Translatable): Translatable - = TranslatableWithArgs(DescriptionIterableAssertion.IN_ANY_ORDER, description) -} diff --git a/misc/deprecated/domain/atrium-domain-api-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/iterable/contains/searchbehaviours/IterableContainsInOrderOnlySearchBehaviour.kt b/misc/deprecated/domain/atrium-domain-api-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/iterable/contains/searchbehaviours/IterableContainsInOrderOnlySearchBehaviour.kt deleted file mode 100644 index f60da77b9..000000000 --- a/misc/deprecated/domain/atrium-domain-api-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/iterable/contains/searchbehaviours/IterableContainsInOrderOnlySearchBehaviour.kt +++ /dev/null @@ -1,25 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0*/) -package ch.tutteli.atrium.assertions.iterable.contains.searchbehaviours - -import ch.tutteli.atrium.assertions.iterable.contains.IterableContains -import ch.tutteli.atrium.reporting.translating.Translatable -import ch.tutteli.atrium.reporting.translating.TranslatableWithArgs -import ch.tutteli.atrium.translations.DescriptionIterableAssertion - -/** - * Represents the *deprecated* search behaviour that expected entries have to appear in the given order within the [Iterable] and - * that the resulting assertion should not hold if there are less entries than expected or more. - */ -@Deprecated( - "Use the interface InOrderOnlySearchBehaviour instead; will be removed with 1.0.0", - ReplaceWith( - "InOrderOnlySearchBehaviour", - "ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InOrderOnlySearchBehaviour" - ) -) -open class IterableContainsInOrderOnlySearchBehaviour : IterableContains.SearchBehaviour, - ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InOrderOnlySearchBehaviour { - - override fun decorateDescription(description: Translatable): Translatable - = TranslatableWithArgs(DescriptionIterableAssertion.IN_ORDER_ONLY, description) -} diff --git a/misc/deprecated/domain/atrium-domain-api-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/iterable/contains/searchbehaviours/IterableContainsInOrderSearchBehaviour.kt b/misc/deprecated/domain/atrium-domain-api-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/iterable/contains/searchbehaviours/IterableContainsInOrderSearchBehaviour.kt deleted file mode 100644 index 49ccda4e3..000000000 --- a/misc/deprecated/domain/atrium-domain-api-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/iterable/contains/searchbehaviours/IterableContainsInOrderSearchBehaviour.kt +++ /dev/null @@ -1,24 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0*/) -package ch.tutteli.atrium.assertions.iterable.contains.searchbehaviours - -import ch.tutteli.atrium.assertions.iterable.contains.IterableContains -import ch.tutteli.atrium.reporting.translating.Translatable -import ch.tutteli.atrium.reporting.translating.TranslatableWithArgs -import ch.tutteli.atrium.translations.DescriptionIterableAssertion - -/** - * Represents the *deprecated* search behaviour that expected entries have to appear in the given order within the [Iterable]. - */ -@Deprecated( - "Use the interface InOrderSearchBehaviour instead; will be removed with 1.0.0", - ReplaceWith( - "InOrderSearchBehaviour", - "ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InOrderSearchBehaviour" - ) -) -open class IterableContainsInOrderSearchBehaviour : IterableContains.SearchBehaviour, - ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InOrderSearchBehaviour { - - override fun decorateDescription(description: Translatable): Translatable - = TranslatableWithArgs(DescriptionIterableAssertion.IN_ORDER, description) -} diff --git a/misc/deprecated/domain/atrium-domain-api-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/iterable/contains/searchbehaviours/IterableContainsNoOpSearchBehaviour.kt b/misc/deprecated/domain/atrium-domain-api-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/iterable/contains/searchbehaviours/IterableContainsNoOpSearchBehaviour.kt deleted file mode 100644 index b97c41576..000000000 --- a/misc/deprecated/domain/atrium-domain-api-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/iterable/contains/searchbehaviours/IterableContainsNoOpSearchBehaviour.kt +++ /dev/null @@ -1,20 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0*/) -package ch.tutteli.atrium.assertions.iterable.contains.searchbehaviours - -import ch.tutteli.atrium.assertions.iterable.contains.IterableContains - -/** - * Represents the *deprecated* default search behaviour or rather does not define a search behaviour at all. - * - * It furthermore implements a no operation for [decorateDescription], meaning it passes back the description which - * is passed in (identity function). - */ -@Deprecated( - "Use the interface NoOpSearchBehaviour instead; will be removed with 1.0.0", - ReplaceWith( - "NoOpSearchBehaviour", - "ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.NoOpSearchBehaviour" - ) -) -open class IterableContainsNoOpSearchBehaviour : IterableContains.SearchBehaviour, - ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.NoOpSearchBehaviour diff --git a/misc/deprecated/domain/atrium-domain-api-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/iterable/contains/searchbehaviours/IterableContainsNotSearchBehaviour.kt b/misc/deprecated/domain/atrium-domain-api-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/iterable/contains/searchbehaviours/IterableContainsNotSearchBehaviour.kt deleted file mode 100644 index 1451f3a9d..000000000 --- a/misc/deprecated/domain/atrium-domain-api-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/iterable/contains/searchbehaviours/IterableContainsNotSearchBehaviour.kt +++ /dev/null @@ -1,22 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0*/) -package ch.tutteli.atrium.assertions.iterable.contains.searchbehaviours - -import ch.tutteli.atrium.reporting.translating.Translatable -import ch.tutteli.atrium.translations.DescriptionIterableAssertion - -/** - * Represents the *deprecated* search behaviour that expected entries might appear in any order within the [Iterable]. - */ -@Deprecated( - "Use the interface NotSearchBehaviour instead; will be removed with 1.0.0", - ReplaceWith( - "NotSearchBehaviour", - "ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.NotSearchBehaviour" - ) -) -open class IterableContainsNotSearchBehaviour : IterableContainsInAnyOrderSearchBehaviour(), - ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.NotSearchBehaviour -{ - override fun decorateDescription(description: Translatable): Translatable - = DescriptionIterableAssertion.CONTAINS_NOT -} diff --git a/misc/deprecated/domain/atrium-domain-api-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/throwable/thrown/ThrowableThrown.kt b/misc/deprecated/domain/atrium-domain-api-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/throwable/thrown/ThrowableThrown.kt deleted file mode 100644 index b76dd3ea1..000000000 --- a/misc/deprecated/domain/atrium-domain-api-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/throwable/thrown/ThrowableThrown.kt +++ /dev/null @@ -1,70 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0*/) -package ch.tutteli.atrium.assertions.throwable.thrown - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.assertions.AssertionGroup -import ch.tutteli.atrium.assertions.DescriptiveAssertion -import ch.tutteli.atrium.assertions.throwable.thrown.ThrowableThrown.AbsentThrowableMessageProvider -import ch.tutteli.atrium.assertions.throwable.thrown.ThrowableThrown.Creator -import ch.tutteli.atrium.assertions.throwable.thrown.builders.ThrowableThrownBuilder -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.reporting.RawString -import ch.tutteli.atrium.reporting.translating.Translatable -import kotlin.reflect.KClass - -/** - * Defines the *deprecated* contract for sophisticated a [Throwable] was thrown assertions. - * - * An assertion starts with a [ThrowableThrownBuilder] and is typically built up by an [AbsentThrowableMessageProvider] - * and a [Creator] which finally builds the assertion. - */ -@Deprecated( - "Use the interface from package domain.creating; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.domain.creating.throwable.thrown.ThrowableThrown") -) -interface ThrowableThrown { - /** - * Provides a message which can be used in reporting to represent the case that no [Throwable] at all was thrown. - */ - @Deprecated( - "Use the interface from package domain.creating; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.domain.creating.throwable.thrown.ThrowableThrown.AbsentThrowableMessageProvider") - ) - interface AbsentThrowableMessageProvider { - /** - * The message can be used in reporting to represent the case that no [Throwable] was thrown at all. - */ - val message: RawString - } - - /** - * Represents the final step of a sophisticated a [Throwable] was thrown assertion builder which creates - * the [AssertionGroup] as such. - * - * @param TExpected The type of the [Throwable] which is expected to be thrown. - */ - @Deprecated( - "Use the interface from package domain.creating; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.domain.creating.throwable.thrown.ThrowableThrown.Creator") - ) - interface Creator { - /** - * Executes the [act][ThrowableThrownBuilder.act] lambda of the given [throwableThrownBuilder], catches any - * thrown [Throwable], creates based on it a corresponding [Assertion] representing the sophisticated - * assertion and also checks whether it holds or not. - * - * @param throwableThrownBuilder The [ThrowableThrownBuilder] containing inter alia the - * [act][ThrowableThrownBuilder.act] lambda. - * @param description The [description][DescriptiveAssertion.description] of the resulting [DescriptiveAssertion]. - * @param expectedType The expected type of the [Throwable] used for casting and probably in reporting. - * @param assertionCreator The assertion creator which defines subsequent assertions for the [Throwable] in - * case it was thrown as expected and is of the expected type [TExpected]. - */ - fun executeActAndCreateAssertion( - throwableThrownBuilder: ThrowableThrownBuilder, - description: Translatable, - expectedType: KClass, - assertionCreator: AssertionPlant.() -> Unit - ) - } -} diff --git a/misc/deprecated/domain/atrium-domain-api-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/throwable/thrown/builders/ThrowableThrownBuilder.kt b/misc/deprecated/domain/atrium-domain-api-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/throwable/thrown/builders/ThrowableThrownBuilder.kt deleted file mode 100644 index be70f68f5..000000000 --- a/misc/deprecated/domain/atrium-domain-api-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/throwable/thrown/builders/ThrowableThrownBuilder.kt +++ /dev/null @@ -1,38 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") - -package ch.tutteli.atrium.assertions.throwable.thrown.builders - -import ch.tutteli.atrium.core.CoreFactory -import ch.tutteli.atrium.creating.AssertionPlantNullable -import ch.tutteli.atrium.reporting.Reporter -import ch.tutteli.atrium.reporting.translating.Translatable - -/** - * Represents the *deprecated* entry point of the fluent API of sophisticated a [Throwable] `was thrown` assertions. - * - * It contains the [assertionVerb] and [reporter] which will be used to create an [AssertionPlantNullable] as well as - * the [act] function which is expected to throw a [Throwable]. - * - * @property assertionVerb The assertion verb which will be used inter alia in reporting. - * @property act The function which is expected to throw a [Throwable]. - * @property reporter The reporter which will be used for a [CoreFactory.newThrowingAssertionChecker]. - * - * @constructor Represents the entry point of the fluent API of sophisticated a [Throwable] `was thrown` assertions. - * @param assertionVerb The assertion verb which will be used inter alia in reporting. - * @param act The function which is expected to throw a [Throwable]. - * @param reporter The reporter which will be used for a [CoreFactory.newThrowingAssertionChecker]. - */ -@Suppress("DEPRECATION") -@Deprecated( - "Use AssertImpl; will be removed with 1.0.0", - ReplaceWith( - "AssertImpl.throwable.thrownBuilder(assertionVerb, act, reporter)", - "ch.tutteli.atrium.domain.builders.AssertImpl" - ) -) -class ThrowableThrownBuilder( - override val assertionVerb: Translatable, - override val act: () -> Unit, - override val reporter: Reporter -) : ch.tutteli.atrium.domain.creating.throwable.thrown.ThrowableThrown.Builder diff --git a/misc/deprecated/domain/atrium-domain-api-deprecated/src/main/kotlin/ch/tutteli/atrium/reporting/ReporterBuilder.kt b/misc/deprecated/domain/atrium-domain-api-deprecated/src/main/kotlin/ch/tutteli/atrium/reporting/ReporterBuilder.kt deleted file mode 100644 index c90e8709c..000000000 --- a/misc/deprecated/domain/atrium-domain-api-deprecated/src/main/kotlin/ch/tutteli/atrium/reporting/ReporterBuilder.kt +++ /dev/null @@ -1,263 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0*/) -package ch.tutteli.atrium.reporting - -import ch.tutteli.atrium.assertions.BulletPointIdentifier -import ch.tutteli.atrium.core.CoreFactory -import ch.tutteli.atrium.core.coreFactory -import ch.tutteli.atrium.core.migration.toAtriumLocale -import ch.tutteli.atrium.reporting.translating.* - -/** - * The *deprecated* builder to create a [Reporter] consisting of several components. - */ -@Deprecated("Use the builder from package domain.builders.reporting; will be removed with 1.0.0") -class ReporterBuilder(private val assertionFormatterFacade: AssertionFormatterFacade) { - - /** - * Uses [CoreFactory.newOnlyFailureReporter] as [Reporter]. - */ - @Deprecated("Use`withOnlyFailureReporter.build()` from the builder from package domain.builders.reporting", ReplaceWith("this.withOnlyFailureReporter().build()")) - fun buildOnlyFailureReporter(): Reporter - = coreFactory.newOnlyFailureReporter(assertionFormatterFacade, coreFactory.newMultiAtriumErrorAdjuster( - coreFactory.newRemoveAtriumFromAtriumErrorAdjuster(), - coreFactory.newRemoveRunnerAtriumErrorAdjuster(), - listOf() - ) - ) - - /** - * Uses the given [factory] to build a custom [Reporter]. - */ - @Deprecated("Use`withCustomReporter` from the builder from package domain.builders.reporting", ReplaceWith("this.withCustomReporter(factory).build()")) - fun buildCustomReporter(factory: (AssertionFormatterFacade) -> Reporter): Reporter - = factory(assertionFormatterFacade) - - /** - * Provides options to create a [Translator] or [TranslationSupplier]. - */ - @Deprecated("Use reporterBuilder from package domain.builders.reporting; will be removed with 1.0.0") - companion object { - - /** - * Uses [UsingDefaultTranslator] as [Translator] where the given [primaryLocale] is used to format arguments - * of [TranslatableWithArgs]. - * - * [UsingDefaultTranslator] does not require a [TranslationSupplier] nor a [LocaleOrderDecider] and thus - * the options to specify implementations of them are skipped. - * - * Notice that [UsingDefaultTranslator] does not translate but uses what [Translatable.getDefault] returns. - * Also notice, that if you omit the [primaryLocale] then [java.util.Locale.getDefault] is used. - * - * @param primaryLocale The [Locale] used to format arguments of [TranslatableWithArgs]. - */ - @Deprecated( - "Use reporterBuilder from package domain.builders.reporting; will be removed with 1.0.0", - ReplaceWith( - "reporterBuilder.withoutTranslations(primaryLocale.toAtriumLocale())", - "ch.tutteli.atrium.domain.builders.reporting.reporterBuilder", - "ch.tutteli.atrium.core.migration.toAtriumLocale" - ) - ) - fun withoutTranslations(primaryLocale: java.util.Locale = java.util.Locale.getDefault()) - = ObjectFormatterOptions(UsingDefaultTranslator(primaryLocale.toAtriumLocale())) - - /** - * Uses the given [translator] as [Translator] skipping the options for [TranslationSupplier] and - * [LocaleOrderDecider] assuming the given [translator] is implemented differently -- use - * [withDefaultTranslationSupplier] or [withTranslationSupplier] in case the given [translator] requires - * a [TranslationSupplier] or a [LocaleOrderDecider]. - */ - @Deprecated( - "Use reporterBuilder from package domain.builders.reporting; will be removed with 1.0.0", - ReplaceWith( - "reporterBuilder.withTranslator(translator)", - "ch.tutteli.atrium.domain.builders.reporting.reporterBuilder" - ) - ) - fun withTranslator(translator: Translator) - = ObjectFormatterOptions(translator) - - /** - * Uses [CoreFactory.newPropertiesBasedTranslationSupplier] as [TranslationSupplier]. - */ - @Deprecated("Use reporterBuilder from package domain.builders.reporting", ReplaceWith( - "reporterBuilder.withDefaultTranslationSupplier()", - "ch.tutteli.atrium.domain.builders.reporting.reporterBuilder" - )) - fun withDefaultTranslationSupplier() - = LocaleOrderDeciderOptions(coreFactory.newPropertiesBasedTranslationSupplier()) - - /** - * Uses the given [translationSupplier] as [TranslationSupplier]. - */ - @Deprecated( - "Use reporterBuilder from package domain.builders.reporting; will be removed with 1.0.0", - ReplaceWith( - "reporterBuilder.withTranslationSupplier(translationSupplier)", - "ch.tutteli.atrium.domain.builders.reporting.reporterBuilder" - ) - ) - fun withTranslationSupplier(translationSupplier: TranslationSupplier) - = LocaleOrderDeciderOptions(translationSupplier) - } - - @Deprecated("Use the builder from package domain.builders.reporting; will be removed with 1.0.0") - class LocaleOrderDeciderOptions(private val translationSupplier: TranslationSupplier) { - - /** - * Uses [CoreFactory.newLocaleOrderDecider] as [LocaleOrderDecider]. - */ - fun withDefaultLocaleOrderDecider() - = TranslatorOptions(translationSupplier, coreFactory.newLocaleOrderDecider()) - - /** - * Uses [localeOrderDecider] as [LocaleOrderDecider]. - */ - fun withLocaleOrderDecider(localeOrderDecider: LocaleOrderDecider) - = TranslatorOptions(translationSupplier, localeOrderDecider) - } - - @Deprecated("Use the builder from package domain.builders.reporting; will be removed with 1.0.0") - class TranslatorOptions(private val translationSupplier: TranslationSupplier, private val localeOrderDecider: LocaleOrderDecider) { - - /** - * Uses [CoreFactory.newTranslator] as [Translator] where the specified [translationSupplier] is used to - * retrieve translations, the specified [localeOrderDecider] to determine candidate [Locale]s and - * [primaryLocale] is used as primary [Locale] and the optional [fallbackLocales] as fallback [Locale]s. - * - * @param primaryLocale The [Locale] for which the [Translator] will first search translations -- - * it will also be used to format arguments of [TranslatableWithArgs]. - * @param fallbackLocales One [Locale] after another (in the given order) will be considered as primary Locale - * in case no translation was found the previous primary Locale. - */ - fun withDefaultTranslator(primaryLocale: java.util.Locale, vararg fallbackLocales: java.util.Locale) - = ObjectFormatterOptions(coreFactory.newTranslator(translationSupplier, localeOrderDecider, primaryLocale.toAtriumLocale(), fallbackLocales.map { it.toAtriumLocale() })) - - /** - * Uses the given [factory] to build a [Translator]. - */ - fun withTranslator(factory: (TranslationSupplier, LocaleOrderDecider) -> Translator) - = ObjectFormatterOptions(factory(translationSupplier, localeOrderDecider)) - } - - /** - * Provides options to create an [ObjectFormatter]. - */ - @Deprecated("Use the builder from package domain.builders.reporting; will be removed with 1.0.0") - class ObjectFormatterOptions(private val translator: Translator) { - /** - * Uses [CoreFactory.newDetailedObjectFormatter] as [ObjectFormatter]. - */ - fun withDetailedObjectFormatter() - = AssertionFormatterControllerOptions(coreFactory.newDetailedObjectFormatter(translator), translator) - - /** - * Uses the given [factory] to build a custom [ObjectFormatter]. - */ - fun withObjectFormatter(factory: (Translator) -> ObjectFormatter) - = AssertionFormatterControllerOptions(factory(translator), translator) - } - - /** - * Provides options to create an [AssertionFormatterController]. - */ - @Deprecated("Use the builder from package domain.builders.reporting; will be removed with 1.0.0") - class AssertionFormatterControllerOptions(private val objectFormatter: ObjectFormatter, private val translator: Translator) { - /** - * Uses [CoreFactory.newAssertionFormatterController] as [AssertionFormatterController]. - */ - fun withDefaultAssertionFormatterController() - = AssertionFormatterFacadeOptions(coreFactory.newAssertionFormatterController(), objectFormatter, translator) - - /** - * Uses the given [assertionFormatterController] a custom [AssertionFormatterController]. - */ - fun withAssertionFormatterController(assertionFormatterController: AssertionFormatterController) - = AssertionFormatterFacadeOptions(assertionFormatterController, objectFormatter, translator) - } - - /** - * Provides options to create an [AssertionFormatterFacade]. - */ - @Deprecated("Use the builder from package domain.builders.reporting; will be removed with 1.0.0") - class AssertionFormatterFacadeOptions(private val assertionFormatterController: AssertionFormatterController, private val objectFormatter: ObjectFormatter, private val translator: Translator) { - /** - * Uses [CoreFactory.newAssertionFormatterFacade] as [AssertionFormatterFacade]. - */ - fun withDefaultAssertionFormatterFacade() - = AssertionPairFormatterOptions(AssertionFormatterChosenOptions( - coreFactory.newAssertionFormatterFacade(assertionFormatterController), objectFormatter, translator)) - - /** - * Uses the given [factory] to build a custom [AssertionFormatterFacade]. - */ - fun withAssertionFormatterFacade(factory: (AssertionFormatterController) -> AssertionFormatterFacade) - = AssertionPairFormatterOptions(AssertionFormatterChosenOptions( - factory(assertionFormatterController), objectFormatter, translator)) - } - - @Deprecated("Use the builder from package domain.builders.reporting; will be removed with 1.0.0") - class AssertionFormatterChosenOptions(val assertionFormatterFacade: AssertionFormatterFacade, val objectFormatter: ObjectFormatter, val translator: Translator) - - /** - * Provides options to create an [AssertionPairFormatter]. - */ - @Deprecated("Use the builder from package domain.builders.reporting; will be removed with 1.0.0") - class AssertionPairFormatterOptions(private val options: AssertionFormatterChosenOptions) { - - /** - * Uses [CoreFactory.newTextSameLineAssertionPairFormatter] as [AssertionPairFormatter]. - */ - fun withTextSameLineAssertionPairFormatter() - = TextAssertionFormatterOptions(options, coreFactory.newTextSameLineAssertionPairFormatter(options.objectFormatter, options.translator)) - - /** - * Uses the given [factory] to build a custom [AssertionPairFormatter]. - */ - fun withTextAssertionPairFormatter(factory: (ObjectFormatter, Translator) -> AssertionPairFormatter) - = TextAssertionFormatterOptions(options, factory(options.objectFormatter, options.translator)) - - fun withSameLineTextAssertionFormatter(vararg bulletPoints: Pair, String>): ReporterBuilder - = withTextSameLineAssertionPairFormatter() - .withDefaultTextCapabilities(*bulletPoints) - } - - /** - * Provides options to register [AssertionFormatter]s to the chosen [AssertionFormatterFacade]. - * - * @see AssertionFormatterFacadeOptions - */ - @Deprecated("Use the builder from package domain.builders.reporting; will be removed with 1.0.0") - class TextAssertionFormatterOptions(private val options: AssertionFormatterChosenOptions, private val assertionPairFormatter: AssertionPairFormatter) { - - /** - * Uses [CoreFactory.registerTextAssertionFormatterCapabilities] to register the default [AssertionFormatter]s - * intended for text output -- using the defined [assertionPairFormatter], - * [AssertionFormatterChosenOptions.objectFormatter] and [AssertionFormatterChosenOptions.translator] - * -- to the specified [AssertionFormatterChosenOptions.assertionFormatterFacade] where the given [bulletPoints] can be used to customise - * the predefined bullet points. - * - * Have a look at the sub types of [BulletPointIdentifier] to get a feel for what and how you can customise - * bullet points. - */ - fun withDefaultTextCapabilities(vararg bulletPoints: Pair, String>): ReporterBuilder { - coreFactory.registerTextAssertionFormatterCapabilities( - bulletPoints.associate { it.first.kotlin to it.second }, options.assertionFormatterFacade, assertionPairFormatter, options.objectFormatter, options.translator) - return ReporterBuilder(options.assertionFormatterFacade) - } - - /** - * Uses the given [factory] and [otherFactories] to create and register [AssertionFormatter]s to - * the specified [AssertionFormatterChosenOptions.assertionFormatterFacade]. - */ - fun withTextAssertionFormatter( - factory: (AssertionFormatterChosenOptions) -> (AssertionFormatterController) -> AssertionFormatter, - vararg otherFactories: (AssertionFormatterChosenOptions) -> (AssertionFormatterController) -> AssertionFormatter - ): ReporterBuilder { - listOf(factory, *otherFactories).forEach { - options.assertionFormatterFacade.register(it(options)) - } - return ReporterBuilder(options.assertionFormatterFacade) - } - } -} diff --git a/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/AssertImpl.kt b/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/AssertImpl.kt deleted file mode 100644 index b7fc401cc..000000000 --- a/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/AssertImpl.kt +++ /dev/null @@ -1,235 +0,0 @@ -@file:Suppress("DEPRECATION" /* will be removed with 1.0.0 */) - -package ch.tutteli.atrium.domain.builders - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.assertions.builders.AssertionBuilder -import ch.tutteli.atrium.assertions.builders.assertionBuilder -import ch.tutteli.atrium.core.CoreFactory -import ch.tutteli.atrium.core.polyfills.loadSingleService -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.creating.AssertionPlantNullable -import ch.tutteli.atrium.creating.BaseAssertionPlant -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.domain.builders.creating.* -import ch.tutteli.atrium.domain.builders.creating.collectors.AssertionCollectorBuilder -import ch.tutteli.atrium.domain.creating.* -import ch.tutteli.atrium.domain.creating.changers.subjectChanger -import ch.tutteli.atrium.domain.creating.collectors.AssertionCollector - -/** - * Bundles different domain objects which are defined by the module atrium-domain-api - * to give users of Atrium a fluent API as well. - */ -@Suppress("OVERRIDE_BY_INLINE") -@Deprecated("Switch from AssertImpl to ExpectImpl (as well as from Assert to Expect); will be removed with 1.0.0", ReplaceWith("ExpectImpl")) -object AssertImpl : AssertImplCommon { - - override inline val builder get() = assertionBuilder - - override inline val collector get() = AssertionCollectorBuilder - - @Deprecated("Switch from AssertImpl.coreFactory to coreFactory; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.core.coreFactory", "ch.tutteli.atrium.core.coreFactory")) - override inline val coreFactory get() = ch.tutteli.atrium.core.coreFactory - - - //--- assertions --------------------------------------------------------------------------- - - override inline val any get() = AnyAssertionsBuilder - - override inline val charSequence get() = CharSequenceAssertionsBuilder - - override inline val collection get() = CollectionAssertionsBuilder - - override inline val comparable get() = ComparableAssertionsBuilder - - @Suppress("DEPRECATION") - override inline val feature get() = FeatureAssertionsBuilder - - override inline val floatingPoint get() = FloatingPointAssertionsBuilder - - override inline val iterable get() = IterableAssertionsBuilder - - override inline val list get() = ListAssertionsBuilder - - override inline val map get() = MapAssertionsBuilder - - override inline val pair get() = PairAssertionsBuilder - - override inline val throwable get() = ThrowableAssertionsBuilder -} - -@Deprecated("Switch from AssertImplCommon to ExpectImplCommon (as well as from Assert to Expect); will be removed with 1.0.0") -interface AssertImplCommon { - - /** - * Returns [AssertionBuilder] - helping you creating [Assertion]s. - * In detail, its an `inline` property which returns [ch.tutteli.atrium.assertions.builders.assertionBuilder] - * which in turn returns an implementation of [AssertionBuilder]. - */ - val builder: AssertionBuilder - - /** - * Returns [AssertionCollectorBuilder] - helping you to collect feature assertions. - * which inter alia delegates to the implementation of [AssertionCollector]. - */ - val collector: AssertionCollectorBuilder - - /** - * Returns the implementation of [CoreFactory]. - * In detail, its an `inline` property which returns [ch.tutteli.atrium.core.coreFactory] - * which in turn delegates to the implementation via [loadSingleService]. - */ - val coreFactory: CoreFactory - - /** - * Creates a new [AssertionPlant] based on the given [subjectProvider] whereas the [AssertionPlant] delegates - * assertion checking to the given [originalPlant]. - * - * This method is useful if you want to make feature assertion(s) but you do not want that the feature is shown up - * in reporting. For instance, if a class can behave as another class (e.g. `Sequence::asIterable`) or you want to - * hide a conversion (e.g. `Int::toChar`) then you can use this function. - * - * Notice, if you do not require the resulting [AssertionPlant] but merely want to make feature assertions so that - * you can use them as part of a bigger assertion, then use [collector] instead. - */ - @Suppress("DEPRECATION") - @Deprecated( - "Use ExpectImpl.changeSubject.unreported; will be removed with 1.0.0 - moreover we advice you to switch to Expect and no longer use Assert", - ReplaceWith( - "ExpectImpl.changeSubject(originalPlant, subjectProvider).unreported", - "import ch.tutteli.atrium.domain.builders.ExpectImpl" - ) - ) - fun changeSubject( - originalPlant: BaseAssertionPlant, - subjectProvider: () -> R - ): AssertionPlant = subjectChanger.unreportedToAssert(originalPlant) { subjectProvider() } - - @Deprecated( - "Use ExpectImpl.changeSubject.unreported - this method was introduced in 0.9.0 to ease the migration from Assert to Expect; will be removed with 1.0.0", - ReplaceWith( - "ExpectImpl.changeSubject(originalAssertionCreator, transformation).unreported", - "import ch.tutteli.atrium.domain.builders.ExpectImpl" - ) - ) - fun changeSubject( - originalAssertionCreator: Expect, - transformation: (T) -> R - ): Expect = subjectChanger.unreported(originalAssertionCreator, transformation) - - /** - * Creates a new [AssertionPlantNullable] based on the given [subjectProvider] whereas the [AssertionPlant] - * delegates assertion checking to the given [originalPlant]. - * - * This method is useful if you want to make feature assertion(s) but you do not want that the feature is shown up - * in reporting. For instance, if a class can behave as another class (e.g. `Sequence::asIterable`) or you want to - * hide a conversion (e.g. `Int::toChar`) then you can use this function. - * - * Notice, if you do not require the resulting [AssertionPlantNullable] but merely want to make feature - * assertions so that you can use them as part of a bigger assertion, then use [collector] instead. - */ - @Deprecated( - "Use ExpectImpl.changeSubject.unreported; will be removed with 1.0.0 - moreover we advice you to switch to Expect and no longer use Assert", - ReplaceWith( - "ExpectImpl.changeSubject(originalPlant, subjectProvider).unreported", - "import ch.tutteli.atrium.domain.builders.ExpectImpl" - ) - ) - fun changeToNullableSubject( - originalPlant: BaseAssertionPlant, - subjectProvider: () -> R - ): AssertionPlantNullable = subjectChanger.unreportedNullableToAssert(originalPlant) { subjectProvider() } - - @Deprecated( - "Use ExpectImpl.changeSubject.unreported - this method was introduced in 0.9.0 to ease the migration from Assert to Expect; will be removed with 1.0.0", - ReplaceWith( - "ExpectImpl.changeSubject(originalAssertionCreator, transformation).unreported", - "import ch.tutteli.atrium.domain.builders.ExpectImpl" - ) - ) - fun changeToNullableSubject( - originalAssertionCreator: Expect, - transformation: (T) -> R - ): Expect = changeSubject(originalAssertionCreator, transformation) - - //--- assertions --------------------------------------------------------------------------- - - /** - * Returns [AnyAssertionsBuilder] - * which inter alia delegates to the implementation of [AnyAssertions]. - */ - @Deprecated("Use _logic from ch.tutteli.atrium.logic instead; will be removed with 1.0.0") - val any: AnyAssertionsBuilder - - /** - * Returns [CharSequenceAssertionsBuilder] - * which inter alia delegates to the implementation of [CharSequenceAssertions]. - */ - @Deprecated("Use _logic from ch.tutteli.atrium.logic instead; will be removed with 1.0.0") - val charSequence: CharSequenceAssertionsBuilder - - /** - * Returns [CollectionAssertionsBuilder] - * which inter alia delegates to the implementation of [CollectionAssertions]. - */ - @Deprecated("Use _logic from ch.tutteli.atrium.logic instead; will be removed with 1.0.0") - val collection: CollectionAssertionsBuilder - - /** - * Returns [ComparableAssertionsBuilder] - * which inter alia delegates to the implementation of [ComparableAssertions]. - */ - @Deprecated("Use _logic from ch.tutteli.atrium.logic instead; will be removed with 1.0.0") - val comparable: ComparableAssertionsBuilder - - /** - * Returns [FeatureAssertionsBuilder] - * which inter alia delegates to the implementation of [FeatureAssertions]. - */ - @Suppress("DEPRECATION") - @Deprecated("Use _logic from ch.tutteli.atrium.logic instead; will be removed with 1.0.0") - val feature: FeatureAssertionsBuilder - - /** - * Returns [FloatingPointAssertionsBuilder] - [Assertion]s applicable to [Float], [Double] - * and maybe more - which inter alia delegates to the implementation of [FloatingPointAssertions]. - */ - @Deprecated("Use _logic from ch.tutteli.atrium.logic instead; will be removed with 1.0.0") - val floatingPoint: FloatingPointAssertionsBuilder - - /** - * Returns [IterableAssertionsBuilder]. - * which inter alia delegates to the implementation of [IterableAssertions]. - */ - @Deprecated("Use _logic from ch.tutteli.atrium.logic instead; will be removed with 1.0.0") - val iterable: IterableAssertionsBuilder - - /** - * Returns [ListAssertionsBuilder] - * which inter alia delegates to the implementation of [ListAssertions]. - */ - @Deprecated("Use _logic from ch.tutteli.atrium.logic instead; will be removed with 1.0.0") - val list: ListAssertionsBuilder - - /** - * Returns [MapAssertionsBuilder] - * which inter alia delegates to the implementation of [MapAssertions]. - */ - @Deprecated("Use _logic from ch.tutteli.atrium.logic instead; will be removed with 1.0.0") - val map: MapAssertionsBuilder - - /** - * Returns [PairAssertionsBuilder] - * which inter alia delegates to the implementation of [PairAssertions]. - */ - @Deprecated("Use _logic from ch.tutteli.atrium.logic instead; will be removed with 1.0.0") - val pair: PairAssertionsBuilder - - /** - * Returns [ThrowableAssertionsBuilder] - * which inter alia delegates to the implementation of [ThrowableAssertions]. - */ - @Deprecated("Use _logic from ch.tutteli.atrium.logic instead; will be removed with 1.0.0") - val throwable: ThrowableAssertionsBuilder -} diff --git a/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/ExpectImpl.kt b/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/ExpectImpl.kt deleted file mode 100644 index a89e2c9d0..000000000 --- a/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/ExpectImpl.kt +++ /dev/null @@ -1,166 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "DeprecatedCallableAddReplaceWith") - -package ch.tutteli.atrium.domain.builders - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.assertions.builders.AssertionBuilder -import ch.tutteli.atrium.assertions.builders.assertionBuilder -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.domain.builders.creating.* -import ch.tutteli.atrium.domain.builders.creating.changers.SubjectChangerBuilder -import ch.tutteli.atrium.domain.builders.creating.collectors.AssertionCollectorBuilder -import ch.tutteli.atrium.domain.creating.* -import ch.tutteli.atrium.domain.creating.changers.SubjectChanger -import ch.tutteli.atrium.domain.creating.collectors.AssertionCollector - -/** - * Bundles different domain objects which are defined by the module atrium-domain-api - * to give assertion writers (and other consumers of the domain) a fluent API as well. - */ -@Suppress("OVERRIDE_BY_INLINE", "NOTHING_TO_INLINE") -object ExpectImpl { - - /** - * Returns [AssertionBuilder] - helping you creating [Assertion]s. - * In detail, its an `inline` property which returns [ch.tutteli.atrium.assertions.builders.assertionBuilder] - * which in turn returns an implementation of [AssertionBuilder]. - */ - @Deprecated( - "Use assertionBuilder directly, ExpectImpl will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.assertions.builders.assertionBuilder") - ) - inline val builder - get() = assertionBuilder - - /** - * Returns [SubjectChangerBuilder] - helping you to change the subject of the assertion. - * In detail, its an `inline` property which returns [SubjectChangerBuilder] - * which inter alia delegates to the implementation of [SubjectChanger]. - * - * In case you want to extract a feature (e.g. get the first element of a `List`) instead of changing the subject - * into another representation (e.g. down-cast `Person` to `Student`) then you should use - * [feature.extractor][NewFeatureAssertionsBuilder.extractor] instead. - */ - @Deprecated("Use _logic.changeSubject, will be removed with 1.0.0") - inline fun changeSubject(originalExpect: Expect) = - SubjectChangerBuilder.create(originalExpect) - - @Deprecated("Do no longer use Assert, use Expect instead - this method was introduced in 0.9.0 to ease the migration from Assert to Expect; will be removed with 1.0.0") - @Suppress("DEPRECATION", "DeprecatedCallableAddReplaceWith") - inline fun changeSubject(originalAssertionContainer: SubjectProvider) = - SubjectChangerBuilder.create(originalAssertionContainer) - - /** - * Returns [AssertionCollectorBuilder] - helping you to collect feature assertions. - * In detail, its an `inline` property which returns [AssertionCollectorBuilder] - * which inter alia delegates to the implementation of [AssertionCollector]. - */ - @Deprecated("Use _logic.collect instead; will be removed with 1.0.0") - inline val collector - get() = AssertionCollectorBuilder - - //--- assertions --------------------------------------------------------------------------- - - /** - * Returns [AnyAssertionsBuilder] - * which inter alia delegates to the implementation of [AnyAssertions]. - */ - @Deprecated("Use _logic from ch.tutteli.atrium.logic instead; will be removed with 1.0.0") - inline val any - get() = AnyAssertionsBuilder - - /** - * Returns [CharSequenceAssertionsBuilder] - * which inter alia delegates to the implementation of [CharSequenceAssertions]. - */ - @Deprecated("Use _logic from ch.tutteli.atrium.logic instead; will be removed with 1.0.0") - inline val charSequence get() = CharSequenceAssertionsBuilder - - /** - * Returns [CollectionAssertionsBuilder] - * which inter alia delegates to the implementation of [CollectionAssertions]. - */ - @Deprecated("Use _logic from ch.tutteli.atrium.logic instead; will be removed with 1.0.0") - inline val collection - get() = CollectionAssertionsBuilder - - /** - * Returns [ComparableAssertionsBuilder] - * which inter alia delegates to the implementation of [ComparableAssertions]. - */ - @Deprecated("Use _logic from ch.tutteli.atrium.logic instead; will be removed with 1.0.0") - inline val comparable - get() = ComparableAssertionsBuilder - - /** - * Returns [NewFeatureAssertionsBuilder] - * which inter alia delegates to the implementation of [FeatureAssertions]. - */ - @Deprecated("Use _logic from ch.tutteli.atrium.logic instead; will be removed with 1.0.0") - inline val feature - get() = NewFeatureAssertionsBuilder - - /** - * Returns [FloatingPointAssertionsBuilder] - [Assertion]s applicable to [Float], [Double] - * and maybe more - which inter alia delegates to the implementation of [FloatingPointAssertions]. - */ - @Deprecated("Use _logic from ch.tutteli.atrium.logic instead; will be removed with 1.0.0") - inline val floatingPoint - get() = FloatingPointAssertionsBuilder - - /** - * Returns [Fun0AssertionsBuilder] - [Assertion]s applicable to lambdas with arity 0 - * which inter alia delegates to the implementation of [FloatingPointAssertions]. - */ - @Deprecated("Use _logic from ch.tutteli.atrium.logic instead; will be removed with 1.0.0") - inline val fun0 - get() = Fun0AssertionsBuilder - - /** - * Returns [IterableAssertionsBuilder]. - * which inter alia delegates to the implementation of [IterableAssertions]. - */ - inline val iterable get() = IterableAssertionsBuilder - - /** - * Returns [ListAssertionsBuilder] - * which inter alia delegates to the implementation of [ListAssertions]. - */ - @Deprecated("Use _logic from ch.tutteli.atrium.logic instead; will be removed with 1.0.0") - val list - get() = ListAssertionsBuilder - - /** - * Returns [MapAssertionsBuilder] - * which inter alia delegates to the implementation of [MapAssertions]. - */ - @Deprecated("Use _logic from ch.tutteli.atrium.logic instead; will be removed with 1.0.0") - inline val map - get() = MapAssertionsBuilder - - /** - * Returns [PairAssertionsBuilder] - * which inter alia delegates to the implementation of [PairAssertions]. - */ - @Deprecated("Use _logic from ch.tutteli.atrium.logic instead; will be removed with 1.0.0") - inline val pair - get() = PairAssertionsBuilder - - /** - * Returns [ThrowableAssertionsBuilder] - * which inter alia delegates to the implementation of [ThrowableAssertions]. - */ - @Deprecated("Use _logic from ch.tutteli.atrium.logic instead; will be removed with 1.0.0") - inline val throwable - get() = ThrowableAssertionsBuilder - - /** - * Returns [IteratorAssertionsBuilder] - * which inter alia delegates to the implementation of [IteratorAssertions]. - */ - @Deprecated("Use _logic from ch.tutteli.atrium.logic instead; will be removed with 1.0.0") - inline val iterator - get() = IteratorAssertionsBuilder -} diff --git a/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/CollectionAssertionsBuilder.kt b/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/CollectionAssertionsBuilder.kt deleted file mode 100644 index b06aeb1b7..000000000 --- a/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/CollectionAssertionsBuilder.kt +++ /dev/null @@ -1,45 +0,0 @@ -@file:Suppress( -/* TODO remove annotation with 1.0.0 */ "DEPRECATION", -/* TODO remove annotation with 1.0.0 */ "TYPEALIAS_EXPANSION_DEPRECATION", - "OVERRIDE_BY_INLINE", "NOTHING_TO_INLINE" -) - -package ch.tutteli.atrium.domain.builders.creating - -import ch.tutteli.atrium.core.polyfills.loadSingleService -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.domain.creating.CollectionAssertions -import ch.tutteli.atrium.domain.creating.collectionAssertions - -/** - * Delegates inter alia to the implementation of [CollectionAssertions]. - * In detail, it implements [CollectionAssertions] by delegating to [collectionAssertions] - * which in turn delegates to the implementation via [loadSingleService]. - */ -@Deprecated("Use _logic from ch.tutteli.atrium.logic instead; will be removed with 1.0.0") -object CollectionAssertionsBuilder : CollectionAssertions { - - override inline fun isEmpty(subjectProvider: SubjectProvider>) = - collectionAssertions.isEmpty(subjectProvider) - - override inline fun isNotEmpty(subjectProvider: SubjectProvider>) = - collectionAssertions.isNotEmpty(subjectProvider) - - override inline fun > size(expect: Expect) = - collectionAssertions.size(expect) - - // everything below is deprecated functionality and will be removed with 1.0.0 - - @Suppress("DEPRECATION", "DeprecatedCallableAddReplaceWith") - @Deprecated("Switch from Assert to Expect; will be removed with 1.0.0") - override inline fun hasSize(plant: AssertionPlant>, size: Int) = - collectionAssertions.hasSize(plant, size) - - @Suppress("DEPRECATION", "DeprecatedCallableAddReplaceWith") - @Deprecated("Switch from Assert to Expect; will be removed with 1.0.0") - override inline fun size(plant: AssertionPlant>, noinline assertionCreator: Assert.() -> Unit) = - collectionAssertions.size(plant, assertionCreator) -} diff --git a/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/ComparableAssertionsBuilder.kt b/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/ComparableAssertionsBuilder.kt deleted file mode 100644 index c71edd240..000000000 --- a/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/ComparableAssertionsBuilder.kt +++ /dev/null @@ -1,44 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "OVERRIDE_BY_INLINE", "NOTHING_TO_INLINE") - -package ch.tutteli.atrium.domain.builders.creating - -import ch.tutteli.atrium.core.polyfills.loadSingleService -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.domain.creating.ComparableAssertions -import ch.tutteli.atrium.domain.creating.comparableAssertions - -/** - * Delegates inter alia to the implementation of [ComparableAssertions]. - * In detail, it implements [ComparableAssertions] by delegating to [comparableAssertions] - * which in turn delegates to the implementation via [loadSingleService]. - */ -@Deprecated("Use _logic from ch.tutteli.atrium.logic instead; will be removed with 1.0.0") -object ComparableAssertionsBuilder : ComparableAssertions { - - override inline fun , T2 : Any?> isLessThan( - subjectProvider: SubjectProvider, - expected: T2 - ) = comparableAssertions.isLessThan(subjectProvider, expected) - - override inline fun , T2 : Any?> isLessOrEquals( - subjectProvider: SubjectProvider, - expected: T2 - ) = comparableAssertions.isLessOrEquals(subjectProvider, expected) - - override inline fun , T2 : Any?> isGreaterThan( - subjectProvider: SubjectProvider, - expected: T2 - ) = comparableAssertions.isGreaterThan(subjectProvider, expected) - - override inline fun , T2 : Any?> isGreaterOrEquals( - subjectProvider: SubjectProvider, - expected: T2 - ) = comparableAssertions.isGreaterOrEquals(subjectProvider, expected) - - override inline fun , T2> isEqualComparingTo( - expect: Expect, - expected: T2 - ) = comparableAssertions.isEqualComparingTo(expect, expected) -} diff --git a/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/FeatureAssertionsBuilder.kt b/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/FeatureAssertionsBuilder.kt deleted file mode 100644 index 444229c45..000000000 --- a/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/FeatureAssertionsBuilder.kt +++ /dev/null @@ -1,893 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "OVERRIDE_BY_INLINE", "NOTHING_TO_INLINE") - -package ch.tutteli.atrium.domain.builders.creating - -import ch.tutteli.atrium.core.polyfills.loadSingleService -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.creating.AssertionPlantNullable -import ch.tutteli.atrium.domain.creating.FeatureAssertions -import ch.tutteli.atrium.domain.creating.feature.extract.FeatureExtractor -import ch.tutteli.atrium.domain.creating.featureAssertions -import ch.tutteli.atrium.reporting.translating.Translatable -import ch.tutteli.atrium.reporting.translating.Untranslatable -import kotlin.reflect.* -import kotlin.jvm.JvmName - -/** - * Delegates inter alia to the implementation of [FeatureAssertions]. - * In detail, it implements [FeatureAssertions] by delegating to [featureAssertions] - * which in turn delegates to the implementation via [loadSingleService]. - */ -@Deprecated("Switch from `Assert` to `Expect` and use then ExpectImpl.feature, NewFeatureAssertionsBuilder respectively; will be removed with 1.0.0") -object FeatureAssertionsBuilder : FeatureAssertions { - - @Suppress("DEPRECATION") - inline val extractor: FeatureExtractor.DescriptionOption - get() = FeatureExtractor.builder - - inline fun property(plant: AssertionPlant, property: KProperty1) = - property(plant, { @Suppress("DEPRECATION") property.invoke(plant.subject) }, Untranslatable(property.name)) - - inline fun property(plant: AssertionPlant, property: KProperty0) = - property(plant, property, Untranslatable(property.name)) - - override inline fun property( - plant: AssertionPlant, - noinline subjectProvider: () -> TProperty, - name: Translatable - ): AssertionPlant = featureAssertions.property(plant, subjectProvider, name) - - override inline fun property( - plant: AssertionPlant, - noinline subjectProvider: () -> TProperty, - noinline representationProvider: () -> Any?, - name: Translatable - ): AssertionPlant = featureAssertions.property(plant, subjectProvider, representationProvider, name) - - - inline fun property( - plant: AssertionPlant, - property: KProperty1, - noinline assertionCreator: AssertionPlant.() -> Unit - ) = property( - plant, - { @Suppress("DEPRECATION") property.invoke(plant.subject) }, - Untranslatable(property.name), - assertionCreator - ) - - inline fun property( - plant: AssertionPlant, - property: KProperty0, - noinline assertionCreator: AssertionPlant.() -> Unit - ) = property(plant, property, Untranslatable(property.name), assertionCreator) - - inline fun property( - plant: AssertionPlant, - noinline subjectProvider: () -> TProperty, - name: Translatable, - noinline assertionCreator: AssertionPlant.() -> Unit - ): AssertionPlant = property(plant, subjectProvider, name).addAssertionsCreatedBy(assertionCreator) - - inline fun property( - plant: AssertionPlant, - noinline subjectProvider: () -> TProperty, - noinline representationProvider: () -> Any?, - name: Translatable, - noinline assertionCreator: AssertionPlant.() -> Unit - ): AssertionPlant = - property(plant, subjectProvider, representationProvider, name).addAssertionsCreatedBy(assertionCreator) - - - inline fun property( - plant: AssertionPlant, - property: KProperty1 - ): AssertionPlantNullable { - //TODO get rid of l if https://youtrack.jetbrains.com/issue/KT-23768 is fixed - val l = { @Suppress("DEPRECATION") property.invoke(plant.subject) } - return property(plant, l, Untranslatable(property.name)) - } - - inline fun property(plant: AssertionPlant, property: KProperty0) = - property(plant, property, Untranslatable(property.name)) - - override inline fun property( - plant: AssertionPlant, - noinline subjectProvider: () -> TProperty, - name: Translatable - ): AssertionPlantNullable = featureAssertions.property(plant, subjectProvider, name) - - override inline fun property( - plant: AssertionPlant, - noinline subjectProvider: () -> TProperty, - noinline representationProvider: () -> Any?, - name: Translatable - ): AssertionPlantNullable = - featureAssertions.property(plant, subjectProvider, representationProvider, name) - - - //Arg0 - @JvmName("safeReturnValueOf0") - inline fun returnValueOf0( - plant: AssertionPlant, - method: KFunction1 - ): AssertionPlant = returnValueOf0(plant, { @Suppress("DEPRECATION") method(plant.subject) }, method.name) - - inline fun returnValueOf0(plant: AssertionPlant, method: KFunction0): AssertionPlant = - returnValueOf0(plant, method, method.name) - - override inline fun returnValueOf0( - plant: AssertionPlant, - noinline method: () -> R, - name: String - ): AssertionPlant = featureAssertions.returnValueOf0(plant, method, name) - - override inline fun returnValueOf0( - plant: AssertionPlant, - noinline method: () -> R, - noinline representationProvider: () -> Any?, - name: String - ): AssertionPlant = featureAssertions.returnValueOf0(plant, method, representationProvider, name) - - - @JvmName("safeReturnValueOf0") - inline fun returnValueOf0( - plant: AssertionPlant, - method: KFunction1, - noinline assertionCreator: AssertionPlant.() -> Unit - ): AssertionPlant = - returnValueOf0(plant, { @Suppress("DEPRECATION") method(plant.subject) }, method.name, assertionCreator) - - inline fun returnValueOf0( - plant: AssertionPlant, - method: KFunction0, - noinline assertionCreator: AssertionPlant.() -> Unit - ): AssertionPlant = returnValueOf0(plant, method, method.name, assertionCreator) - - inline fun returnValueOf0( - plant: AssertionPlant, - noinline method: () -> R, - name: String, - noinline assertionCreator: AssertionPlant.() -> Unit - ): AssertionPlant = returnValueOf0(plant, method, name).addAssertionsCreatedBy(assertionCreator) - - inline fun returnValueOf0( - plant: AssertionPlant, - noinline method: () -> R, - noinline representationProvider: () -> Any?, - name: String, - noinline assertionCreator: AssertionPlant.() -> Unit - ): AssertionPlant = - returnValueOf0(plant, method, representationProvider, name).addAssertionsCreatedBy(assertionCreator) - - - @JvmName("safeReturnValueOf0") - inline fun returnValueOf0( - plant: AssertionPlant, - method: KFunction1 - ): AssertionPlantNullable { - //TODO get rid of l if https://youtrack.jetbrains.com/issue/KT-23768 is fixed - val l = { @Suppress("DEPRECATION") method(plant.subject) } - return returnValueOf0(plant, l, l, method.name) - } - - inline fun returnValueOf0( - plant: AssertionPlant, - method: KFunction0 - ): AssertionPlantNullable = returnValueOf0(plant, method, method.name) - - override inline fun returnValueOf0( - plant: AssertionPlant, - noinline method: () -> R, - name: String - ): AssertionPlantNullable = featureAssertions.returnValueOf0(plant, method, name) - - override inline fun returnValueOf0( - plant: AssertionPlant, - noinline method: () -> R, - noinline representationProvider: () -> Any?, - name: String - ): AssertionPlantNullable = featureAssertions.returnValueOf0(plant, method, representationProvider, name) - - - //Arg1 - @JvmName("safeReturnValueOf1") - inline fun returnValueOf1( - plant: AssertionPlant, - method: KFunction2, - arg1: T1 - ): AssertionPlant = - returnValueOf1(plant, { a1 -> @Suppress("DEPRECATION") method(plant.subject, a1) }, arg1, method.name) - - inline fun returnValueOf1( - plant: AssertionPlant, - method: KFunction1, - arg1: T1 - ): AssertionPlant = returnValueOf1(plant, method, arg1, method.name) - - override inline fun returnValueOf1( - plant: AssertionPlant, - noinline method: (T1) -> R, - arg1: T1, - name: String - ): AssertionPlant = featureAssertions.returnValueOf1(plant, method, arg1, name) - - override inline fun returnValueOf1( - plant: AssertionPlant, - noinline method: (T1) -> R, - arg1: T1, - noinline representationProvider: () -> Any?, - name: String - ): AssertionPlant = featureAssertions.returnValueOf1(plant, method, arg1, representationProvider, name) - - - @JvmName("safeReturnValueOf1") - inline fun returnValueOf1( - plant: AssertionPlant, - method: KFunction2, - arg1: T1, - noinline assertionCreator: AssertionPlant.() -> Unit - ): AssertionPlant = returnValueOf1( - plant, - { a1 -> @Suppress("DEPRECATION") method(plant.subject, a1) }, - arg1, - method.name, - assertionCreator - ) - - inline fun returnValueOf1( - plant: AssertionPlant, - method: KFunction1, - arg1: T1, - noinline assertionCreator: AssertionPlant.() -> Unit - ): AssertionPlant = returnValueOf1(plant, method, arg1, method.name, assertionCreator) - - inline fun returnValueOf1( - plant: AssertionPlant, - noinline method: (T1) -> R, - arg1: T1, - name: String, - noinline assertionCreator: AssertionPlant.() -> Unit - ): AssertionPlant = returnValueOf1(plant, method, arg1, name).addAssertionsCreatedBy(assertionCreator) - - inline fun returnValueOf1( - plant: AssertionPlant, - noinline method: (T1) -> R, - arg1: T1, - noinline representationProvider: () -> Any?, - name: String, - noinline assertionCreator: AssertionPlant.() -> Unit - ): AssertionPlant = - returnValueOf1(plant, method, arg1, representationProvider, name).addAssertionsCreatedBy(assertionCreator) - - - @JvmName("safeReturnValueOf1") - inline fun returnValueOf1( - plant: AssertionPlant, - method: KFunction2, - arg1: T1 - ): AssertionPlantNullable { - //TODO get rid of l if https://youtrack.jetbrains.com/issue/KT-23768 is fixed - val l: (T1) -> R = { a1 -> @Suppress("DEPRECATION") method(plant.subject, a1) } - return returnValueOf1(plant, l, arg1, method.name) - } - - inline fun returnValueOf1( - plant: AssertionPlant, - method: KFunction1, - arg1: T1 - ): AssertionPlantNullable = returnValueOf1(plant, method, arg1, method.name) - - override inline fun returnValueOf1( - plant: AssertionPlant, - noinline method: (T1) -> R, - arg1: T1, - name: String - ): AssertionPlantNullable = featureAssertions.returnValueOf1(plant, method, arg1, name) - - override inline fun returnValueOf1( - plant: AssertionPlant, - noinline method: (T1) -> R, - arg1: T1, - noinline representationProvider: () -> Any?, - name: String - ): AssertionPlantNullable = featureAssertions.returnValueOf1(plant, method, arg1, representationProvider, name) - - - //Arg2 - @JvmName("safeReturnValueOf2") - inline fun returnValueOf2( - plant: AssertionPlant, - method: KFunction3, - arg1: T1, - arg2: T2 - ): AssertionPlant = returnValueOf2( - plant, - { a1, a2 -> @Suppress("DEPRECATION") method(plant.subject, a1, a2) }, - arg1, - arg2, - method.name - ) - - inline fun returnValueOf2( - plant: AssertionPlant, - method: KFunction2, - arg1: T1, - arg2: T2 - ): AssertionPlant = returnValueOf2(plant, method, arg1, arg2, method.name) - - override inline fun returnValueOf2( - plant: AssertionPlant, - noinline method: (T1, T2) -> R, - arg1: T1, - arg2: T2, - name: String - ): AssertionPlant = featureAssertions.returnValueOf2(plant, method, arg1, arg2, name) - - override inline fun returnValueOf2( - plant: AssertionPlant, - noinline method: (T1, T2) -> R, - arg1: T1, - arg2: T2, - noinline representationProvider: () -> Any?, - name: String - ): AssertionPlant = featureAssertions.returnValueOf2(plant, method, arg1, arg2, representationProvider, name) - - - @JvmName("safeReturnValueOf2") - inline fun returnValueOf2( - plant: AssertionPlant, - method: KFunction3, - arg1: T1, - arg2: T2, - noinline assertionCreator: AssertionPlant.() -> Unit - ): AssertionPlant = returnValueOf2( - plant, - { a1, a2 -> @Suppress("DEPRECATION") method(plant.subject, a1, a2) }, - arg1, - arg2, - method.name, - assertionCreator - ) - - inline fun returnValueOf2( - plant: AssertionPlant, - method: KFunction2, - arg1: T1, - arg2: T2, - noinline assertionCreator: AssertionPlant.() -> Unit - ): AssertionPlant = returnValueOf2(plant, method, arg1, arg2, method.name, assertionCreator) - - inline fun returnValueOf2( - plant: AssertionPlant, - noinline method: (T1, T2) -> R, - arg1: T1, - arg2: T2, - name: String, - noinline assertionCreator: AssertionPlant.() -> Unit - ): AssertionPlant = returnValueOf2(plant, method, arg1, arg2, name).addAssertionsCreatedBy(assertionCreator) - - inline fun returnValueOf2( - plant: AssertionPlant, - noinline method: (T1, T2) -> R, - arg1: T1, - arg2: T2, - noinline representationProvider: () -> Any?, - name: String, - noinline assertionCreator: AssertionPlant.() -> Unit - ): AssertionPlant = - returnValueOf2(plant, method, arg1, arg2, representationProvider, name).addAssertionsCreatedBy(assertionCreator) - - - @JvmName("safeReturnValueOf2") - inline fun returnValueOf2( - plant: AssertionPlant, - method: KFunction3, - arg1: T1, - arg2: T2 - ): AssertionPlantNullable { - //TODO get rid of l if https://youtrack.jetbrains.com/issue/KT-23768 is fixed - val l: (T1, T2) -> R = { a1, a2 -> @Suppress("DEPRECATION") method(plant.subject, a1, a2) } - return returnValueOf2(plant, l, arg1, arg2, method.name) - } - - inline fun returnValueOf2( - plant: AssertionPlant, - method: KFunction2, - arg1: T1, - arg2: T2 - ): AssertionPlantNullable = returnValueOf2(plant, method, arg1, arg2, method.name) - - override inline fun returnValueOf2( - plant: AssertionPlant, - noinline method: (T1, T2) -> R, - arg1: T1, - arg2: T2, - name: String - ): AssertionPlantNullable = featureAssertions.returnValueOf2(plant, method, arg1, arg2, name) - - override inline fun returnValueOf2( - plant: AssertionPlant, - noinline method: (T1, T2) -> R, - arg1: T1, - arg2: T2, - noinline representationProvider: () -> Any?, - name: String - ): AssertionPlantNullable = - featureAssertions.returnValueOf2(plant, method, arg1, arg2, representationProvider, name) - - - //Arg3 - @JvmName("safeReturnValueOf3") - inline fun returnValueOf3( - plant: AssertionPlant, - method: KFunction4, - arg1: T1, - arg2: T2, - arg3: T3 - ): AssertionPlant = returnValueOf3( - plant, - { a1, a2, a3 -> @Suppress("DEPRECATION") method(plant.subject, a1, a2, a3) }, - arg1, - arg2, - arg3, - method.name - ) - - inline fun returnValueOf3( - plant: AssertionPlant, - method: KFunction3, - arg1: T1, - arg2: T2, - arg3: T3 - ): AssertionPlant = returnValueOf3(plant, method, arg1, arg2, arg3, method.name) - - override inline fun returnValueOf3( - plant: AssertionPlant, - noinline method: (T1, T2, T3) -> R, - arg1: T1, - arg2: T2, - arg3: T3, - name: String - ): AssertionPlant = featureAssertions.returnValueOf3(plant, method, arg1, arg2, arg3, name) - - override inline fun returnValueOf3( - plant: AssertionPlant, - noinline method: (T1, T2, T3) -> R, - arg1: T1, - arg2: T2, - arg3: T3, - noinline representationProvider: () -> Any?, - name: String - ): AssertionPlant = - featureAssertions.returnValueOf3(plant, method, arg1, arg2, arg3, representationProvider, name) - - - @JvmName("safeReturnValueOf3") - inline fun returnValueOf3( - plant: AssertionPlant, - method: KFunction4, - arg1: T1, - arg2: T2, - arg3: T3, - noinline assertionCreator: AssertionPlant.() -> Unit - ): AssertionPlant = returnValueOf3( - plant, - { a1, a2, a3 -> @Suppress("DEPRECATION") method(plant.subject, a1, a2, a3) }, - arg1, - arg2, - arg3, - method.name, - assertionCreator - ) - - inline fun returnValueOf3( - plant: AssertionPlant, - method: KFunction3, - arg1: T1, - arg2: T2, - arg3: T3, - noinline assertionCreator: AssertionPlant.() -> Unit - ): AssertionPlant = returnValueOf3(plant, method, arg1, arg2, arg3, method.name, assertionCreator) - - inline fun returnValueOf3( - plant: AssertionPlant, - noinline method: (T1, T2, T3) -> R, - arg1: T1, - arg2: T2, - arg3: T3, - name: String, - noinline assertionCreator: AssertionPlant.() -> Unit - ): AssertionPlant = - returnValueOf3(plant, method, arg1, arg2, arg3, name).addAssertionsCreatedBy(assertionCreator) - - inline fun returnValueOf3( - plant: AssertionPlant, - noinline method: (T1, T2, T3) -> R, - arg1: T1, - arg2: T2, - arg3: T3, - noinline representationProvider: () -> Any?, - name: String, - noinline assertionCreator: AssertionPlant.() -> Unit - ): AssertionPlant = - returnValueOf3(plant, method, arg1, arg2, arg3, representationProvider, name).addAssertionsCreatedBy( - assertionCreator - ) - - - @JvmName("safeReturnValueOf3") - inline fun returnValueOf3( - plant: AssertionPlant, - method: KFunction4, - arg1: T1, - arg2: T2, - arg3: T3 - ): AssertionPlantNullable { - //TODO get rid of l if https://youtrack.jetbrains.com/issue/KT-23768 is fixed - val l: (T1, T2, T3) -> R = { a1, a2, a3 -> @Suppress("DEPRECATION") method(plant.subject, a1, a2, a3) } - return returnValueOf3(plant, l, arg1, arg2, arg3, method.name) - } - - inline fun returnValueOf3( - plant: AssertionPlant, - method: KFunction3, - arg1: T1, - arg2: T2, - arg3: T3 - ): AssertionPlantNullable = returnValueOf3(plant, method, arg1, arg2, arg3, method.name) - - override inline fun returnValueOf3( - plant: AssertionPlant, - noinline method: (T1, T2, T3) -> R, - arg1: T1, - arg2: T2, - arg3: T3, - name: String - ): AssertionPlantNullable = featureAssertions.returnValueOf3(plant, method, arg1, arg2, arg3, name) - - override inline fun returnValueOf3( - plant: AssertionPlant, - noinline method: (T1, T2, T3) -> R, - arg1: T1, - arg2: T2, - arg3: T3, - noinline representationProvider: () -> Any?, - name: String - ): AssertionPlantNullable = - featureAssertions.returnValueOf3(plant, method, arg1, arg2, arg3, representationProvider, name) - - - //Arg4 - @JvmName("safeReturnValueOf4") - inline fun returnValueOf4( - plant: AssertionPlant, - method: KFunction5, - arg1: T1, - arg2: T2, - arg3: T3, - arg4: T4 - ): AssertionPlant = returnValueOf4( - plant, - { a1, a2, a3, a4 -> @Suppress("DEPRECATION") method(plant.subject, a1, a2, a3, a4) }, - arg1, - arg2, - arg3, - arg4, - method.name - ) - - inline fun returnValueOf4( - plant: AssertionPlant, - method: KFunction4, - arg1: T1, - arg2: T2, - arg3: T3, - arg4: T4 - ): AssertionPlant = returnValueOf4(plant, method, arg1, arg2, arg3, arg4, method.name) - - override inline fun returnValueOf4( - plant: AssertionPlant, - noinline method: (T1, T2, T3, T4) -> R, - arg1: T1, - arg2: T2, - arg3: T3, - arg4: T4, - name: String - ): AssertionPlant = featureAssertions.returnValueOf4(plant, method, arg1, arg2, arg3, arg4, name) - - override inline fun returnValueOf4( - plant: AssertionPlant, - noinline method: (T1, T2, T3, T4) -> R, - arg1: T1, - arg2: T2, - arg3: T3, - arg4: T4, - noinline representationProvider: () -> Any?, - name: String - ): AssertionPlant = - featureAssertions.returnValueOf4(plant, method, arg1, arg2, arg3, arg4, representationProvider, name) - - - @JvmName("safeReturnValueOf4") - inline fun returnValueOf4( - plant: AssertionPlant, - method: KFunction5, - arg1: T1, - arg2: T2, - arg3: T3, - arg4: T4, - noinline assertionCreator: AssertionPlant.() -> Unit - ): AssertionPlant = returnValueOf4( - plant, - { a1, a2, a3, a4 -> @Suppress("DEPRECATION") method(plant.subject, a1, a2, a3, a4) }, - arg1, - arg2, - arg3, - arg4, - method.name, - assertionCreator - ) - - inline fun returnValueOf4( - plant: AssertionPlant, - method: KFunction4, - arg1: T1, - arg2: T2, - arg3: T3, - arg4: T4, - noinline assertionCreator: AssertionPlant.() -> Unit - ): AssertionPlant = returnValueOf4(plant, method, arg1, arg2, arg3, arg4, method.name, assertionCreator) - - inline fun returnValueOf4( - plant: AssertionPlant, - noinline method: (T1, T2, T3, T4) -> R, - arg1: T1, - arg2: T2, - arg3: T3, - arg4: T4, - name: String, - noinline assertionCreator: AssertionPlant.() -> Unit - ): AssertionPlant = - returnValueOf4(plant, method, arg1, arg2, arg3, arg4, name).addAssertionsCreatedBy(assertionCreator) - - inline fun returnValueOf4( - plant: AssertionPlant, - noinline method: (T1, T2, T3, T4) -> R, - arg1: T1, - arg2: T2, - arg3: T3, - arg4: T4, - noinline representationProvider: () -> Any?, - name: String, - noinline assertionCreator: AssertionPlant.() -> Unit - ): AssertionPlant = - returnValueOf4(plant, method, arg1, arg2, arg3, arg4, representationProvider, name).addAssertionsCreatedBy( - assertionCreator - ) - - - @JvmName("safeReturnValueOf4") - inline fun returnValueOf4( - plant: AssertionPlant, - method: KFunction5, - arg1: T1, - arg2: T2, - arg3: T3, - arg4: T4 - ): AssertionPlantNullable { - //TODO get rid of l if https://youtrack.jetbrains.com/issue/KT-23768 is fixed - val l: (T1, T2, T3, T4) -> R = - { a1, a2, a3, a4 -> @Suppress("DEPRECATION") method(plant.subject, a1, a2, a3, a4) } - return returnValueOf4(plant, l, arg1, arg2, arg3, arg4, method.name) - } - - inline fun returnValueOf4( - plant: AssertionPlant, - method: KFunction4, - arg1: T1, - arg2: T2, - arg3: T3, - arg4: T4 - ): AssertionPlantNullable = returnValueOf4(plant, method, arg1, arg2, arg3, arg4, method.name) - - override inline fun returnValueOf4( - plant: AssertionPlant, - noinline method: (T1, T2, T3, T4) -> R, - arg1: T1, - arg2: T2, - arg3: T3, - arg4: T4, - name: String - ): AssertionPlantNullable = featureAssertions.returnValueOf4(plant, method, arg1, arg2, arg3, arg4, name) - - override inline fun returnValueOf4( - plant: AssertionPlant, - noinline method: (T1, T2, T3, T4) -> R, - arg1: T1, - arg2: T2, - arg3: T3, - arg4: T4, - noinline representationProvider: () -> Any?, - name: String - ): AssertionPlantNullable = - featureAssertions.returnValueOf4(plant, method, arg1, arg2, arg3, arg4, representationProvider, name) - - - //Arg5 - @JvmName("safeReturnValueOf5") - inline fun returnValueOf5( - plant: AssertionPlant, - method: KFunction6, - arg1: T1, - arg2: T2, - arg3: T3, - arg4: T4, - arg5: T5 - ): AssertionPlant = returnValueOf5( - plant, - { a1, a2, a3, a4, a5 -> @Suppress("DEPRECATION") method(plant.subject, a1, a2, a3, a4, a5) }, - arg1, - arg2, - arg3, - arg4, - arg5, - method.name - ) - - inline fun returnValueOf5( - plant: AssertionPlant, - method: KFunction5, - arg1: T1, - arg2: T2, - arg3: T3, - arg4: T4, - arg5: T5 - ): AssertionPlant = returnValueOf5(plant, method, arg1, arg2, arg3, arg4, arg5, method.name) - - override inline fun returnValueOf5( - plant: AssertionPlant, - noinline method: (T1, T2, T3, T4, T5) -> R, - arg1: T1, - arg2: T2, - arg3: T3, - arg4: T4, - arg5: T5, - name: String - ): AssertionPlant = featureAssertions.returnValueOf5(plant, method, arg1, arg2, arg3, arg4, arg5, name) - - override inline fun returnValueOf5( - plant: AssertionPlant, - noinline method: (T1, T2, T3, T4, T5) -> R, - arg1: T1, - arg2: T2, - arg3: T3, - arg4: T4, - arg5: T5, - noinline representationProvider: () -> Any?, - name: String - ): AssertionPlant = - featureAssertions.returnValueOf5(plant, method, arg1, arg2, arg3, arg4, arg5, representationProvider, name) - - - @JvmName("safeReturnValueOf5") - inline fun returnValueOf5( - plant: AssertionPlant, - method: KFunction6, - arg1: T1, - arg2: T2, - arg3: T3, - arg4: T4, - arg5: T5, - noinline assertionCreator: AssertionPlant.() -> Unit - ): AssertionPlant = returnValueOf5( - plant, - { a1, a2, a3, a4, a5 -> @Suppress("DEPRECATION") method(plant.subject, a1, a2, a3, a4, a5) }, - arg1, - arg2, - arg3, - arg4, - arg5, - method.name, - assertionCreator - ) - - inline fun returnValueOf5( - plant: AssertionPlant, - method: KFunction5, - arg1: T1, - arg2: T2, - arg3: T3, - arg4: T4, - arg5: T5, - noinline assertionCreator: AssertionPlant.() -> Unit - ): AssertionPlant = returnValueOf5(plant, method, arg1, arg2, arg3, arg4, arg5, method.name, assertionCreator) - - inline fun returnValueOf5( - plant: AssertionPlant, - noinline method: (T1, T2, T3, T4, T5) -> R, - arg1: T1, - arg2: T2, - arg3: T3, - arg4: T4, - arg5: T5, - name: String, - noinline assertionCreator: AssertionPlant.() -> Unit - ): AssertionPlant = - returnValueOf5(plant, method, arg1, arg2, arg3, arg4, arg5, name).addAssertionsCreatedBy(assertionCreator) - - inline fun returnValueOf5( - plant: AssertionPlant, - noinline method: (T1, T2, T3, T4, T5) -> R, - arg1: T1, - arg2: T2, - arg3: T3, - arg4: T4, - arg5: T5, - noinline representationProvider: () -> Any?, - name: String, - noinline assertionCreator: AssertionPlant.() -> Unit - ): AssertionPlant = returnValueOf5( - plant, - method, - arg1, - arg2, - arg3, - arg4, - arg5, - representationProvider, - name - ).addAssertionsCreatedBy(assertionCreator) - - - @JvmName("safeReturnValueOf5") - inline fun returnValueOf5( - plant: AssertionPlant, - method: KFunction6, - arg1: T1, - arg2: T2, - arg3: T3, - arg4: T4, - arg5: T5 - ): AssertionPlantNullable { - //TODO get rid of l if https://youtrack.jetbrains.com/issue/KT-23768 is fixed - val l: (T1, T2, T3, T4, T5) -> R = - { a1, a2, a3, a4, a5 -> @Suppress("DEPRECATION") method(plant.subject, a1, a2, a3, a4, a5) } - return returnValueOf5(plant, l, arg1, arg2, arg3, arg4, arg5, method.name) - } - - inline fun returnValueOf5( - plant: AssertionPlant, - method: KFunction5, - arg1: T1, - arg2: T2, - arg3: T3, - arg4: T4, - arg5: T5 - ): AssertionPlantNullable = returnValueOf5(plant, method, arg1, arg2, arg3, arg4, arg5, method.name) - - override inline fun returnValueOf5( - plant: AssertionPlant, - noinline method: (T1, T2, T3, T4, T5) -> R, - arg1: T1, - arg2: T2, - arg3: T3, - arg4: T4, - arg5: T5, - name: String - ): AssertionPlantNullable = featureAssertions.returnValueOf5(plant, method, arg1, arg2, arg3, arg4, arg5, name) - - override inline fun returnValueOf5( - plant: AssertionPlant, - noinline method: (T1, T2, T3, T4, T5) -> R, - arg1: T1, - arg2: T2, - arg3: T3, - arg4: T4, - arg5: T5, - noinline representationProvider: () -> Any?, - name: String - ): AssertionPlantNullable = - featureAssertions.returnValueOf5(plant, method, arg1, arg2, arg3, arg4, arg5, representationProvider, name) -} diff --git a/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/FloatingPointAssertionsBuilder.kt b/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/FloatingPointAssertionsBuilder.kt deleted file mode 100644 index 0256060b7..000000000 --- a/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/FloatingPointAssertionsBuilder.kt +++ /dev/null @@ -1,15 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "OVERRIDE_BY_INLINE", "NOTHING_TO_INLINE") -package ch.tutteli.atrium.domain.builders.creating - -import ch.tutteli.atrium.core.polyfills.loadSingleService -import ch.tutteli.atrium.domain.creating.FloatingPointAssertions -import ch.tutteli.atrium.domain.creating.floatingPointAssertions - -/** - * Delegates inter alia to the implementation of [FloatingPointAssertions]. - * In detail, it implements [FloatingPointAssertions] by delegating to [floatingPointAssertions] - * which in turn delegates to the implementation via [loadSingleService]. - */ -@Deprecated("Use _logic from ch.tutteli.atrium.logic instead; will be removed with 1.0.0") -expect object FloatingPointAssertionsBuilder : FloatingPointAssertions diff --git a/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/Fun0AssertionsBuilder.kt b/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/Fun0AssertionsBuilder.kt deleted file mode 100644 index 9dd54c900..000000000 --- a/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/Fun0AssertionsBuilder.kt +++ /dev/null @@ -1,27 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "OVERRIDE_BY_INLINE", "NOTHING_TO_INLINE") - -package ch.tutteli.atrium.domain.builders.creating - -import ch.tutteli.atrium.core.polyfills.loadSingleService -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.domain.creating.Fun0Assertions -import ch.tutteli.atrium.domain.creating.fun0Assertions -import kotlin.reflect.KClass - -/** - * Delegates inter alia to the implementation of [Fun0Assertions]. - * In detail, it implements [Fun0Assertions] by delegating to [fun0Assertions] - * which in turn delegates to the implementation via [loadSingleService]. - */ -@Deprecated("Use _logic from ch.tutteli.atrium.logic instead; will be removed with 1.0.0") -object Fun0AssertionsBuilder : Fun0Assertions { - - override inline fun isThrowing( - expect: Expect Any?>, - expectedType: KClass - ) = fun0Assertions.isThrowing(expect, expectedType) - - override inline fun R> isNotThrowing(expect: Expect) = - fun0Assertions.isNotThrowing(expect) -} diff --git a/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/IteratorAssertionsBuilder.kt b/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/IteratorAssertionsBuilder.kt deleted file mode 100644 index 6b3210b4a..000000000 --- a/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/IteratorAssertionsBuilder.kt +++ /dev/null @@ -1,25 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "OVERRIDE_BY_INLINE", "NOTHING_TO_INLINE") - -package ch.tutteli.atrium.domain.builders.creating - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.core.polyfills.loadSingleService -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.domain.creating.IteratorAssertions -import ch.tutteli.atrium.domain.creating.iteratorAssertions - - -/** - * Delegates inter alia to the implementation of [IteratorAssertions]. - * In detail, it implements [IteratorAssertions] by delegating to [iteratorAssertions] - * which in turn delegates to the implementation via [loadSingleService]. - */ -@Deprecated("Use _logic from ch.tutteli.atrium.logic instead; will be removed with 1.0.0") -object IteratorAssertionsBuilder : IteratorAssertions { - override inline fun > hasNext(expect: Expect): Assertion = - iteratorAssertions.hasNext(expect) - - override inline fun > hasNotNext(expect: Expect): Assertion = - iteratorAssertions.hasNotNext(expect) -} diff --git a/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/ListAssertionsBuilder.kt b/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/ListAssertionsBuilder.kt deleted file mode 100644 index ffcc30841..000000000 --- a/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/ListAssertionsBuilder.kt +++ /dev/null @@ -1,54 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "OVERRIDE_BY_INLINE", "NOTHING_TO_INLINE") - -package ch.tutteli.atrium.domain.builders.creating - -import ch.tutteli.atrium.core.polyfills.loadSingleService -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.creating.AssertionPlantNullable -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.domain.creating.ListAssertions -import ch.tutteli.atrium.domain.creating.listAssertions - -/** - * Delegates inter alia to the implementation of [ListAssertions]. - * In detail, it implements [ListAssertions] by delegating to [listAssertions] - * which in turn delegates to the implementation via [loadSingleService]. - */ -@Deprecated("Use _logic from ch.tutteli.atrium.logic instead; will be removed with 1.0.0") -object ListAssertionsBuilder : ListAssertions { - - override inline fun > get( - expect: Expect, - index: Int - ) = listAssertions.get(expect, index) - - // everything below is deprecated functionality and will be removed with 1.0.0 - - @Suppress("DEPRECATION", "DeprecatedCallableAddReplaceWith") - @Deprecated("Switch from Assert to Expect; will be removed with 1.0.0") - override fun get(plant: AssertionPlant>, index: Int): AssertionPlant = - listAssertions.get(plant, index) - - @Suppress("DEPRECATION", "DeprecatedCallableAddReplaceWith") - @Deprecated("Switch from Assert to Expect; will be removed with 1.0.0") - override inline fun get( - plant: AssertionPlant>, - index: Int, - noinline assertionCreator: AssertionPlant.() -> Unit - ) = listAssertions.get(plant, index, assertionCreator) - - - @Suppress("DEPRECATION", "DeprecatedCallableAddReplaceWith") - @Deprecated("Switch from Assert to Expect; will be removed with 1.0.0") - override fun getNullable(plant: AssertionPlant>, index: Int): AssertionPlantNullable = - listAssertions.getNullable(plant, index) - - @Suppress("DEPRECATION", "DeprecatedCallableAddReplaceWith") - @Deprecated("Switch from Assert to Expect; will be removed with 1.0.0") - override inline fun getNullable( - plant: AssertionPlant>, - index: Int, - noinline assertionCreator: AssertionPlantNullable.() -> Unit - ) = listAssertions.getNullable(plant, index, assertionCreator) -} diff --git a/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/MapAssertionsBuilder.kt b/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/MapAssertionsBuilder.kt deleted file mode 100644 index 24f174789..000000000 --- a/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/MapAssertionsBuilder.kt +++ /dev/null @@ -1,122 +0,0 @@ -@file:Suppress( - "DEPRECATION", "OVERRIDE_BY_INLINE", "NOTHING_TO_INLINE", -/* TODO remove annotation with 1.0.0 */ "TYPEALIAS_EXPANSION_DEPRECATION" -) - -package ch.tutteli.atrium.domain.builders.creating - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.core.polyfills.loadSingleService -import ch.tutteli.atrium.creating.* -import ch.tutteli.atrium.domain.creating.MapAssertions -import ch.tutteli.atrium.domain.creating.MapEntryAssertions -import ch.tutteli.atrium.domain.creating.changers.ExtractedFeaturePostStep -import ch.tutteli.atrium.domain.creating.mapAssertions -import kotlin.reflect.KClass - -/** - * Delegates inter alia to the implementation of [MapAssertions]. - * In detail, it implements [MapAssertions] by delegating to [mapAssertions] - * which in turn delegates to the implementation via [loadSingleService]. - */ -@Deprecated("Use _logic from ch.tutteli.atrium.logic instead; will be removed with 1.0.0") -object MapAssertionsBuilder : MapAssertions { - - /** - * Returns [MapEntryAssertionsBuilder] - * which inter alia delegates to the implementation of [MapEntryAssertions]. - */ - inline val entry get() : MapEntryAssertionsBuilder = MapEntryAssertionsBuilder - - override inline fun > contains( - expect: Expect, - keyValuePairs: List> - ) = mapAssertions.contains(expect, keyValuePairs) - - override inline fun > containsKeyWithValueAssertions( - expect: Expect, - valueType: KClass, - keyValues: List.() -> Unit)?>> - ) = mapAssertions.containsKeyWithValueAssertions(expect, valueType, keyValues) - - - override inline fun containsKey(subjectProvider: SubjectProvider>, key: K) = - mapAssertions.containsKey(subjectProvider, key) - - override inline fun containsNotKey(subjectProvider: SubjectProvider>, key: K) = - mapAssertions.containsNotKey(subjectProvider, key) - - - override inline fun isEmpty(subjectProvider: SubjectProvider>) = - mapAssertions.isEmpty(subjectProvider) - - override inline fun > getExisting( - expect: Expect, - key: K - ): ExtractedFeaturePostStep = mapAssertions.getExisting(expect, key) - - override inline fun isNotEmpty(subjectProvider: SubjectProvider>) = - mapAssertions.isNotEmpty(subjectProvider) - - override inline fun > size(expect: Expect) = mapAssertions.size(expect) - - // everything below is deprecated functionality and will be removed with 1.0.0 - - @Suppress("DEPRECATION", "DeprecatedCallableAddReplaceWith") - @Deprecated("Switch from Assert to Expect; will be removed with 1.0.0") - override inline fun contains( - plant: AssertionPlant>, - keyValuePairs: List> - ) = mapAssertions.contains(plant, keyValuePairs) - - @Suppress("DEPRECATION", "DeprecatedCallableAddReplaceWith") - @Deprecated("Switch from Assert to Expect; will be removed with 1.0.0") - override inline fun containsKeyWithValueAssertions( - plant: AssertionPlant>, - keyValues: List.() -> Unit)?>> - ) = mapAssertions.containsKeyWithValueAssertions(plant, keyValues) - - @Suppress("DEPRECATION", "DeprecatedCallableAddReplaceWith") - @Deprecated("Switch from Assert to Expect; will be removed with 1.0.0") - override inline fun getExisting(plant: AssertionPlant>, key: K) = - mapAssertions.getExisting(plant, key) - - @Suppress("DEPRECATION", "DeprecatedCallableAddReplaceWith") - @Deprecated("Switch from Assert to Expect; will be removed with 1.0.0") - override inline fun getExisting( - plant: AssertionPlant>, - key: K, - noinline assertionCreator: AssertionPlant.() -> Unit - ) = mapAssertions.getExisting(plant, key, assertionCreator) - - @Suppress("DEPRECATION", "DeprecatedCallableAddReplaceWith") - @Deprecated("Switch from Assert to Expect; will be removed with 1.0.0") - override inline fun getExistingNullable(plant: AssertionPlant>, key: K) = - mapAssertions.getExistingNullable(plant, key) - - @Suppress("DEPRECATION", "DeprecatedCallableAddReplaceWith") - @Deprecated("Switch from Assert to Expect; will be removed with 1.0.0") - override inline fun getExistingNullable( - plant: AssertionPlant>, - key: K, - noinline assertionCreator: AssertionPlantNullable.() -> Unit - ) = mapAssertions.getExistingNullable(plant, key, assertionCreator) - - @Suppress("DEPRECATION", "DeprecatedCallableAddReplaceWith") - @Deprecated("Switch from Assert to Expect; will be removed with 1.0.0") - override inline fun hasSize(plant: AssertionPlant>, size: Int) = mapAssertions.hasSize(plant, size) - - @Suppress("DEPRECATION", "DeprecatedCallableAddReplaceWith") - @Deprecated("Switch from Assert to Expect; will be removed with 1.0.0") - override inline fun keys( - plant: AssertionPlant>, - noinline assertionCreator: AssertionPlant>.() -> Unit - ): Assertion = mapAssertions.keys(plant, assertionCreator) - - @Suppress("DEPRECATION", "DeprecatedCallableAddReplaceWith") - @Deprecated("Switch from Assert to Expect; will be removed with 1.0.0") - override inline fun values( - plant: AssertionPlant>, - noinline assertionCreator: AssertionPlant>.() -> Unit - ): Assertion = mapAssertions.values(plant, assertionCreator) -} diff --git a/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/MapEntryAssertionsBuilder.kt b/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/MapEntryAssertionsBuilder.kt deleted file mode 100644 index 49029d477..000000000 --- a/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/MapEntryAssertionsBuilder.kt +++ /dev/null @@ -1,70 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "OVERRIDE_BY_INLINE", "NOTHING_TO_INLINE") - -package ch.tutteli.atrium.domain.builders.creating - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.core.polyfills.loadSingleService -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.creating.AssertionPlantNullable -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.domain.creating.MapEntryAssertions -import ch.tutteli.atrium.domain.creating.mapEntryAssertions -import kotlin.reflect.KClass - -/** - * Delegates inter alia to the implementation of [MapEntryAssertions]. - * In detail, it implements [MapEntryAssertions] by delegating to [mapEntryAssertions] - * which in turn delegates to the implementation via [loadSingleService]. - */ -@Deprecated("Use _logic from ch.tutteli.atrium.logic instead; will be removed with 1.0.0") -object MapEntryAssertionsBuilder : MapEntryAssertions { - override inline fun > isKeyValue( - expect: Expect, - key: K, - value: V - ) = mapEntryAssertions.isKeyValue(expect, key, value) - - override inline fun > key(expect: Expect) = - mapEntryAssertions.key(expect) - - override inline fun > value(expect: Expect) = - mapEntryAssertions.value(expect) - - - @Suppress("DEPRECATION", "DeprecatedCallableAddReplaceWith") - @Deprecated("Switch from Assert to Expect; will be removed with 1.0.0") - override inline fun isKeyValue( - plant: AssertionPlant>, - key: K, - value: V - ): Assertion = mapEntryAssertions.isKeyValue(plant, key, value) - - @Suppress("DEPRECATION", "DeprecatedCallableAddReplaceWith") - @Deprecated("Switch from Assert to Expect; will be removed with 1.0.0") - override inline fun key( - plant: AssertionPlant>, - noinline assertionCreator: AssertionPlant.() -> Unit - ): Assertion = mapEntryAssertions.key(plant, assertionCreator) - - @Suppress("DEPRECATION", "DeprecatedCallableAddReplaceWith") - @Deprecated("Switch from Assert to Expect; will be removed with 1.0.0") - override inline fun value( - plant: AssertionPlant>, - noinline assertionCreator: AssertionPlant.() -> Unit - ): Assertion = mapEntryAssertions.value(plant, assertionCreator) - - @Suppress("DEPRECATION", "DeprecatedCallableAddReplaceWith") - @Deprecated("Switch from Assert to Expect; will be removed with 1.0.0") - override inline fun nullableKey( - plant: AssertionPlant>, - noinline assertionCreator: AssertionPlantNullable.() -> Unit - ): Assertion = mapEntryAssertions.nullableKey(plant, assertionCreator) - - @Suppress("DEPRECATION", "DeprecatedCallableAddReplaceWith") - @Deprecated("Switch from Assert to Expect; will be removed with 1.0.0") - override inline fun nullableValue( - plant: AssertionPlant>, - noinline assertionCreator: AssertionPlantNullable.() -> Unit - ): Assertion = mapEntryAssertions.nullableValue(plant, assertionCreator) -} diff --git a/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/NewFeatureAssertionsBuilder.kt b/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/NewFeatureAssertionsBuilder.kt index 15f333e8b..ce03402a7 100644 --- a/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/NewFeatureAssertionsBuilder.kt +++ b/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/NewFeatureAssertionsBuilder.kt @@ -1,114 +1,16 @@ -//TODO remove file with 1.0.0 +//TODO remove file with 0.17.0 @file:Suppress("DEPRECATION", "OVERRIDE_BY_INLINE", "NOTHING_TO_INLINE") package ch.tutteli.atrium.domain.builders.creating -import ch.tutteli.atrium.core.None -import ch.tutteli.atrium.core.Some import ch.tutteli.atrium.core.coreFactory -import ch.tutteli.atrium.core.polyfills.loadSingleService import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.domain.builders.ExpectImpl -import ch.tutteli.atrium.domain.builders.creating.changers.FeatureExtractorBuilder import ch.tutteli.atrium.domain.creating.MetaFeature -import ch.tutteli.atrium.domain.creating.NewFeatureAssertions -import ch.tutteli.atrium.domain.creating.changers.ExtractedFeaturePostStep -import ch.tutteli.atrium.domain.creating.newFeatureAssertions import ch.tutteli.atrium.reporting.MethodCallFormatter import ch.tutteli.atrium.reporting.Reporter -import ch.tutteli.atrium.reporting.translating.Translatable -import ch.tutteli.atrium.reporting.translating.Untranslatable -import ch.tutteli.atrium.translations.ErrorMessages import kotlin.reflect.* -/** - * Delegates inter alia to the implementation of [NewFeatureAssertions]. - * In detail, it implements [NewFeatureAssertions] by delegating to [newFeatureAssertions] - * which in turn delegates to the implementation via [loadSingleService]. - * - * Will be renamed to FeatureAssertionsBuilder with 1.0.0 - */ -@Deprecated("Use _logic from ch.tutteli.atrium.logic instead; will be removed with 1.0.0") -object NewFeatureAssertionsBuilder : NewFeatureAssertions { - - /** - * Start a feature extraction with the help of the [FeatureExtractorBuilder]. - * - * In case you do not want to extract a feature (e.g. get the first element of a `List`) - * but merely want to transform the subject into another representation - * (e.g. down-cast `Person` to `Student` or transform a `Sequence` into a `List`) then you should use - * [ExpectImpl.changeSubject] instead. - * - * Also, if the extraction of the feature is always safe, then you can just use one of the fN functions - * (e.g. [f1] for a function expecting 1 argument) or [property]. - */ - inline fun extractor(originalAssertionContainer: Expect): FeatureExtractorBuilder.DescriptionStep = - FeatureExtractorBuilder.create(originalAssertionContainer) - - - //@formatter:off - fun property(expect: Expect, property: KProperty1): ExtractedFeaturePostStep = - extractFeature(expect, property.name, property::get) - - fun f0(expect: Expect, f: KFunction1): ExtractedFeaturePostStep = - extractFeature(expect, coreFactory.newMethodCallFormatter().formatCall(f.name, arrayOf()), f::invoke) - - fun f1(expect: Expect, f: KFunction2, a1: A1): ExtractedFeaturePostStep = - extractFeature(expect, coreFactory.newMethodCallFormatter().formatCall(f.name, arrayOf(a1))) { f(it, a1) } - - fun f2(expect: Expect, f: KFunction3, a1: A1, a2: A2): ExtractedFeaturePostStep = - extractFeature(expect ,coreFactory.newMethodCallFormatter().formatCall(f.name, arrayOf(a1, a2))) { f(it, a1, a2) } - - fun f3(expect: Expect, f: KFunction4, a1: A1, a2: A2, a3: A3): ExtractedFeaturePostStep = - extractFeature(expect, coreFactory.newMethodCallFormatter().formatCall(f.name, arrayOf(a1, a2, a3))) { f(it, a1, a2, a3) } - - fun f4(expect: Expect, f: KFunction5, a1: A1, a2: A2, a3: A3, a4: A4): ExtractedFeaturePostStep = - extractFeature(expect, coreFactory.newMethodCallFormatter().formatCall(f.name, arrayOf(a1, a2, a3, a4))) { f(it, a1, a2, a3, a4) } - - fun f5(expect: Expect, f: KFunction6, a1: A1, a2: A2, a3: A3, a4: A4, a5: A5): ExtractedFeaturePostStep = - extractFeature(expect, coreFactory.newMethodCallFormatter().formatCall(f.name, arrayOf(a1, a2, a3, a4, a5))) { f(it, a1, a2, a3, a4, a5) } - //@formatter:on - - fun manualFeature( - expect: Expect, - description: String, - provider: T.() -> R - ): ExtractedFeaturePostStep = extractFeature(expect, description, provider) - - fun manualFeature( - expect: Expect, - description: Translatable, - provider: T.() -> R - ): ExtractedFeaturePostStep = - genericFeature(expect, ExpectImpl.feature.meta.create(expect, description, provider)) - - fun genericSubjectBasedFeature( - expect: Expect, - provider: (T) -> MetaFeature - ): ExtractedFeaturePostStep = ExpectImpl.feature.genericFeature( - expect, - ExpectImpl.feature.meta.createSubjectBased(expect, provider) - ) - - override inline fun genericFeature( - expect: Expect, - metaFeature: MetaFeature - ): ExtractedFeaturePostStep = newFeatureAssertions.genericFeature(expect, metaFeature) - - private fun extractFeature( - expect: Expect, - description: String, - provider: (T) -> R - ): ExtractedFeaturePostStep = - genericFeature(expect, ExpectImpl.feature.meta.create(expect, description, provider)) - - /** - * Returns [MetaFeatureBuilder] which helps to create a [MetaFeature]. - */ - inline val meta get() = MetaFeatureBuilder -} - /** * Helper class to circumvent overload bugs and KFunction bugs incorporated in Kotlin -- use [f] and in case you run * into an overload ambiguity, then either [p] (for property) or one of the `fN` functions (e.g. [f2] for @@ -212,7 +114,7 @@ class MetaFeatureOption(private val expect: Expect) { * previous transformation of the subject could not be carried out. */ fun p(property: KProperty0): MetaFeature = - ExpectImpl.feature.meta.property(property) + MetaFeatureBuilder.property(property) /** * Creates a [MetaFeature] for the given function [f] without arguments. @@ -223,7 +125,7 @@ class MetaFeatureOption(private val expect: Expect) { * previous transformation of the subject could not be carried out. */ fun f0(f: KFunction0): MetaFeature = - ExpectImpl.feature.meta.f0(expect, f) + MetaFeatureBuilder.f0(expect, f) /** * Creates a [MetaFeature] for the given function [f] which expects 1 argument. @@ -234,7 +136,7 @@ class MetaFeatureOption(private val expect: Expect) { * previous transformation of the subject could not be carried out. */ fun f1(f: KFunction1, a1: A1): MetaFeature = - ExpectImpl.feature.meta.f1(expect, f, a1) + MetaFeatureBuilder.f1(expect, f, a1) /** * Creates a [MetaFeature] for the given function [f] which expects 2 arguments. @@ -245,7 +147,7 @@ class MetaFeatureOption(private val expect: Expect) { * previous transformation of the subject could not be carried out. */ fun f2(f: KFunction2, a1: A1, a2: A2): MetaFeature = - ExpectImpl.feature.meta.f2(expect, f, a1, a2) + MetaFeatureBuilder.f2(expect, f, a1, a2) /** * Creates a [MetaFeature] for the given function [f] which expects 3 arguments. @@ -256,7 +158,7 @@ class MetaFeatureOption(private val expect: Expect) { * previous transformation of the subject could not be carried out. */ fun f3(f: KFunction3, a1: A1, a2: A2, a3: A3): MetaFeature = - ExpectImpl.feature.meta.f3(expect, f, a1, a2, a3) + MetaFeatureBuilder.f3(expect, f, a1, a2, a3) /** * Creates a [MetaFeature] for the given function [f] which expects 4 arguments. @@ -267,7 +169,7 @@ class MetaFeatureOption(private val expect: Expect) { * previous transformation of the subject could not be carried out. */ fun f4(f: KFunction4, a1: A1, a2: A2, a3: A3, a4: A4): MetaFeature = - ExpectImpl.feature.meta.f4(expect, f, a1, a2, a3, a4) + MetaFeatureBuilder.f4(expect, f, a1, a2, a3, a4) /** * Creates a [MetaFeature] for the given function [f] which expects 5 arguments. @@ -278,7 +180,7 @@ class MetaFeatureOption(private val expect: Expect) { * previous transformation of the subject could not be carried out. */ fun f5(f: KFunction5, a1: A1, a2: A2, a3: A3, a4: A4, a5: A5): MetaFeature = - ExpectImpl.feature.meta.f5(expect, f, a1, a2, a3, a4, a5) + MetaFeatureBuilder.f5(expect, f, a1, a2, a3, a4, a5) //@formatter:on } @@ -311,43 +213,4 @@ object MetaFeatureBuilder { fun f5(expect: Expect<*>, f: KFunction5, a1: A1, a2: A2, a3: A3, a4: A4, a5: A5) = MetaFeature(coreFactory.newMethodCallFormatter().formatCall(f.name, arrayOf(a1, a2, a3, a4, a5)), f.invoke(a1, a2, a3, a4, a5)) //@formatter:on - - /** - * creates a [MetaFeature] which is entirely based on the subject (i.e. also the description). - */ - fun createSubjectBased( - expect: Expect, - provider: (T) -> MetaFeature - ): MetaFeature = expect.maybeSubject.fold(this::createFeatureSubjectNotDefined) { provider(it) } - - private fun createFeatureSubjectNotDefined(): MetaFeature = - MetaFeature( - ErrorMessages.DEDSCRIPTION_BASED_ON_SUBJECT, - ErrorMessages.REPRESENTATION_BASED_ON_SUBJECT_NOT_DEFINED, - None - ) - - fun create( - expect: Expect, - description: String, - provider: (T) -> R - ): MetaFeature = create(expect, Untranslatable(description), provider) - - fun create( - expect: Expect, - description: Translatable, - provider: (T) -> R - ): MetaFeature { - return expect.maybeSubject.fold({ - MetaFeature( - description, - ErrorMessages.REPRESENTATION_BASED_ON_SUBJECT_NOT_DEFINED, - None - ) - }) { - val feature = provider(it) - MetaFeature(description, feature, Some(feature)) - } - } - } diff --git a/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/PairAssertionsBuilder.kt b/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/PairAssertionsBuilder.kt deleted file mode 100644 index b7737f763..000000000 --- a/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/PairAssertionsBuilder.kt +++ /dev/null @@ -1,55 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "OVERRIDE_BY_INLINE", "NOTHING_TO_INLINE") - -package ch.tutteli.atrium.domain.builders.creating - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.core.polyfills.loadSingleService -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.creating.AssertionPlantNullable -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.domain.creating.PairAssertions -import ch.tutteli.atrium.domain.creating.pairAssertions - -/** - * Delegates inter alia to the implementation of [PairAssertions]. - * In detail, it implements [PairAssertions] by delegating to [pairAssertions] - * which in turn delegates to the implementation via [loadSingleService]. - */ -@Deprecated("Use _logic from ch.tutteli.atrium.logic instead; will be removed with 1.0.0") -object PairAssertionsBuilder : PairAssertions { - - override inline fun > first(expect: Expect) = - pairAssertions.first(expect) - - override inline fun > second(expect: Expect) = - pairAssertions.second(expect) - - @Suppress("DEPRECATION", "DeprecatedCallableAddReplaceWith") - @Deprecated("Switch from Assert to Expect; will be removed with 1.0.0") - override inline fun first( - plant: AssertionPlant>, - noinline assertionCreator: AssertionPlant.() -> Unit - ): Assertion = pairAssertions.first(plant, assertionCreator) - - @Suppress("DEPRECATION", "DeprecatedCallableAddReplaceWith") - @Deprecated("Switch from Assert to Expect; will be removed with 1.0.0") - override inline fun second( - plant: AssertionPlant>, - noinline assertionCreator: AssertionPlant.() -> Unit - ): Assertion = pairAssertions.second(plant, assertionCreator) - - @Suppress("DEPRECATION", "DeprecatedCallableAddReplaceWith") - @Deprecated("Switch from Assert to Expect; will be removed with 1.0.0") - override inline fun nullableFirst( - plant: AssertionPlant>, - noinline assertionCreator: AssertionPlantNullable.() -> Unit - ): Assertion = pairAssertions.nullableFirst(plant, assertionCreator) - - @Suppress("DEPRECATION", "DeprecatedCallableAddReplaceWith") - @Deprecated("Switch from Assert to Expect; will be removed with 1.0.0") - override inline fun nullableSecond( - plant: AssertionPlant>, - noinline assertionCreator: AssertionPlantNullable.() -> Unit - ): Assertion = pairAssertions.nullableSecond(plant, assertionCreator) -} diff --git a/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/PleaseUseReplacementException.kt b/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/PleaseUseReplacementException.kt index 650566655..e496df635 100644 --- a/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/PleaseUseReplacementException.kt +++ b/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/PleaseUseReplacementException.kt @@ -3,4 +3,5 @@ package ch.tutteli.atrium.domain.builders.creating /** * Indicates a problem which was indicated by a `@Deprecated` annotation but was ignored by you ;-) */ +//TODO move to logic with 0.16.0 class PleaseUseReplacementException(reason: String) : Exception(reason) diff --git a/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/anyAssertionsBuilders.kt b/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/anyAssertionsBuilders.kt deleted file mode 100644 index 8a93c4d5f..000000000 --- a/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/anyAssertionsBuilders.kt +++ /dev/null @@ -1,157 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "OVERRIDE_BY_INLINE", "NOTHING_TO_INLINE") - -package ch.tutteli.atrium.domain.builders.creating - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.core.polyfills.loadSingleService -import ch.tutteli.atrium.creating.* -import ch.tutteli.atrium.domain.creating.AnyAssertions -import ch.tutteli.atrium.domain.creating.any.typetransformation.AnyTypeTransformation -import ch.tutteli.atrium.domain.creating.any.typetransformation.creators.AnyTypeTransformationAssertions -import ch.tutteli.atrium.domain.creating.any.typetransformation.creators.anyTypeTransformationAssertions -import ch.tutteli.atrium.domain.creating.any.typetransformation.failurehandlers.FailureHandlerFactory -import ch.tutteli.atrium.domain.creating.any.typetransformation.failurehandlers.failureHandlerFactory -import ch.tutteli.atrium.domain.creating.anyAssertions -import ch.tutteli.atrium.reporting.translating.Translatable -import kotlin.reflect.KClass - -/** - * Delegates inter alia to the implementation of [AnyAssertions]. - * In detail, it implements [AnyAssertions] by delegating to [anyAssertions] - * which in turn delegates to the implementation via [loadSingleService]. - */ -@Deprecated("Use _logic from ch.tutteli.atrium.logic instead; will be removed with 1.0.0") -object AnyAssertionsBuilder : AnyAssertions { - - override inline fun toBe(subjectProvider: SubjectProvider, expected: T): Assertion = - anyAssertions.toBe(subjectProvider, expected) - - override inline fun notToBe(subjectProvider: SubjectProvider, expected: T) = - anyAssertions.notToBe(subjectProvider, expected) - - override inline fun isSame(subjectProvider: SubjectProvider, expected: T) = - anyAssertions.isSame(subjectProvider, expected) - - override inline fun isNotSame(subjectProvider: SubjectProvider, expected: T) = - anyAssertions.isNotSame(subjectProvider, expected) - - override inline fun toBeNull(subjectProvider: SubjectProvider) = - anyAssertions.toBeNull(subjectProvider) - - override inline fun toBeNullIfNullGivenElse( - expect: Expect, - type: KClass, - noinline assertionCreatorOrNull: (Expect.() -> Unit)? - ) = anyAssertions.toBeNullIfNullGivenElse(expect, type, assertionCreatorOrNull) - - override inline fun isA(expect: Expect, subType: KClass) = - anyAssertions.isA(expect, subType) - - - // everything below is deprecated functionality and will be removed with 1.0.0 - - @Suppress("DeprecatedCallableAddReplaceWith") - @Deprecated("Switch from Assert to Expect and use toBeNullable; will be removed with 1.0.0") - override inline fun isNullable(plant: AssertionPlantNullable, type: KClass, expectedOrNull: T?) = - anyAssertions.isNullable(plant, type, expectedOrNull) - - - @Suppress("DeprecatedCallableAddReplaceWith") - @Deprecated("Switch from Assert to Expect and use toBeNullable; will be removed with 1.0.0") - override inline fun isNotNull( - plant: AssertionPlantNullable, - type: KClass, - noinline assertionCreator: AssertionPlant.() -> Unit - ) = anyAssertions.isNotNull(plant, type, assertionCreator) - - @Suppress("DeprecatedCallableAddReplaceWith") - @Deprecated("Switch from Assert to Expect and use toBeNullable; will be removed with 1.0.0") - override inline fun isNotNullBut(plant: AssertionPlantNullable, type: KClass, expected: T) = - anyAssertions.isNotNullBut(plant, type, expected) - - @Suppress("DeprecatedCallableAddReplaceWith") - @Deprecated("Switch from Assert to Expect and use toBeNullable; will be removed with 1.0.0") - override inline fun isNullIfNullGivenElse( - plant: AssertionPlantNullable, - type: KClass, - noinline assertionCreatorOrNull: (AssertionPlant.() -> Unit)? - ) = anyAssertions.isNullIfNullGivenElse(plant, type, assertionCreatorOrNull) - - - /** - * Returns [AnyTypeTransformationAssertionsBuilder] - * which inter alia delegates to the implementation of [AnyTypeTransformationAssertions]. - */ - @Suppress("DeprecatedCallableAddReplaceWith") - @Deprecated("Switch from `Assert` to `Expect` use `ExpectImpl.changeSubject` or `ExpectImpl.feature.extract` instead; will be removed with 1.0.0") - inline val typeTransformation - get() = AnyTypeTransformationAssertionsBuilder -} - -/** - * Delegates inter alia to the implementation of [AnyTypeTransformationAssertions]. - * In detail, it implements [AnyTypeTransformationAssertions] by delegating to [anyTypeTransformationAssertions] - * which in turn delegates to the implementation via [loadSingleService]. - */ -@Suppress("DEPRECATION") -@Deprecated("Switch from `Assert` to `Expect` and use `ExpectImpl` instead; will be removed with 1.0.0") -object AnyTypeTransformationAssertionsBuilder : AnyTypeTransformationAssertions { - - @Suppress("DEPRECATION", "DeprecatedCallableAddReplaceWith") - @Deprecated( - "This function will be removed in v.1.0.0 in favour of AssertImpl.any.isNotNull", ReplaceWith( - "plant.addAssertion(AssertImpl.any.isNotNull(plant, type, assertionCreator))", - "ch.tutteli.atrium.domain.builders.AssertImpl" - ) - ) - override inline fun isNotNull( - plant: AssertionPlantNullable, - type: KClass, - noinline assertionCreator: AssertionPlant.() -> Unit - ) = anyTypeTransformationAssertions.isNotNull(plant, type, assertionCreator) - - override inline fun isA( - plant: AssertionPlant, - subType: KClass, - noinline assertionCreator: AssertionPlant.() -> Unit - ) = anyTypeTransformationAssertions.isA(plant, subType, assertionCreator) - - override inline fun downCast( - description: Translatable, - subType: KClass, - subjectPlant: BaseAssertionPlant, - noinline assertionCreator: AssertionPlant.() -> Unit, - failureHandler: AnyTypeTransformation.FailureHandler - ) = anyTypeTransformationAssertions.downCast(description, subType, subjectPlant, assertionCreator, failureHandler) - - override inline fun transform( - parameterObject: AnyTypeTransformation.ParameterObject, - noinline canBeTransformed: (S) -> Boolean, - noinline transform: (S) -> T, - failureHandler: AnyTypeTransformation.FailureHandler - ) = anyTypeTransformationAssertions.transform(parameterObject, canBeTransformed, transform, failureHandler) - - /** - * Returns [AnyTypeTransformationFailureHandlerFactoryBuilder] - * which inter alia delegates to the implementation of [FailureHandlerFactory]. - */ - inline val failureHandlers get() = AnyTypeTransformationFailureHandlerFactoryBuilder -} - -/** - * Delegates inter alia to the implementation of [FailureHandlerFactory]. - * In detail, it implements [FailureHandlerFactory] by delegating to [failureHandlerFactory] - * which in turn delegates to the implementation via [loadSingleService]. - */ -@Suppress("DEPRECATION") -@Deprecated("Switch from `Assert` to `Expect` and use `ExpectImpl` instead; will be removed with 1.0.0") -object AnyTypeTransformationFailureHandlerFactoryBuilder : FailureHandlerFactory { - - override inline fun newExplanatory() = failureHandlerFactory.newExplanatory() - - override inline fun newExplanatoryWithHint( - noinline showHint: () -> Boolean, - noinline failureHintFactory: () -> Assertion - ) = failureHandlerFactory.newExplanatoryWithHint(showHint, failureHintFactory) -} diff --git a/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/basic/contains/CheckOptionExtension.kt b/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/basic/contains/CheckOptionExtension.kt deleted file mode 100644 index 8ca047c1e..000000000 --- a/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/basic/contains/CheckOptionExtension.kt +++ /dev/null @@ -1,84 +0,0 @@ -@file:Suppress(/* TODO remove annotation with 1.0.0 */ "TYPEALIAS_EXPANSION_DEPRECATION", "DEPRECATION") - -package ch.tutteli.atrium.domain.builders.creating.basic.contains - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.domain.builders.migration.asAssert -import ch.tutteli.atrium.domain.builders.migration.asExpect -import ch.tutteli.atrium.domain.creating.basic.contains.Contains -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains - - -/** - * Helper method which simplifies adding assertions to the assertion container which itself is stored in - * [Contains.CheckerOption.containsBuilder]. - * - * @return The plant to support a fluent API. - */ -@Deprecated("Will be removed with 1.0.0") -fun > Contains.CheckerOption.addAssertion( - assertion: Assertion -): Expect = addAssertion(containsBuilder.subjectProvider, assertion) - - -/** - * Helper method which simplifies adding assertions to the assertion container which itself is stored in - * [Contains.CheckerOption.containsBuilder]. - * - * @return The plant to support a fluent API. - */ -@Deprecated("Will be removed with 1.0.0") -fun , S : IterableContains.SearchBehaviour> IterableContains.Builder.addAssertion( - assertion: Assertion -): Expect = addAssertion(subjectProvider, assertion) - -@Suppress("DEPRECATION") -private fun addAssertion( - subjectProvider: SubjectProvider, - assertion: Assertion -): Expect = - //TODO simplify with 1.0.0 - when (subjectProvider) { - is Expect -> subjectProvider.addAssertion(assertion) - is Assert -> subjectProvider.asExpect().addAssertion(assertion) - else -> throw IllegalStateException("neither Expect nor Assert") - } - - -/** - * Helper method which simplifies adding assertions to the assertion container which itself is stored in - * [Contains.CheckerOption.containsBuilder]. - * - * @return The plant to support a fluent API. - */ -@Deprecated("Will be removed with 1.0.0") -fun > Contains.CheckerOption.addAssertionForAssert( - assertion: Assertion -): Assert = addAssertionForAssert(containsBuilder.subjectProvider, assertion) - - -/** - * Helper method which simplifies adding assertions to the assertion container which itself is stored in - * [Contains.CheckerOption.containsBuilder]. - * - * @return The plant to support a fluent API. - */ -@Deprecated("Will be removed with 1.0.0") -fun , S : IterableContains.SearchBehaviour> IterableContains.Builder.addAssertionForAssert( - assertion: Assertion -): Assert = addAssertionForAssert(subjectProvider, assertion) - -@Suppress("DEPRECATION") -private fun addAssertionForAssert( - subjectProvider: SubjectProvider, - assertion: Assertion -): Assert = - //TODO simplify with 1.0.0 - when (subjectProvider) { - is Expect -> subjectProvider.asAssert().addAssertion(assertion) - is Assert -> subjectProvider.addAssertion(assertion) - else -> throw IllegalStateException("neither Expect nor Assert") - } diff --git a/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/changers/FeatureExtractorBuilder.kt b/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/changers/FeatureExtractorBuilder.kt deleted file mode 100644 index a1b73b3e9..000000000 --- a/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/changers/FeatureExtractorBuilder.kt +++ /dev/null @@ -1,388 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.domain.builders.creating.changers - -import ch.tutteli.atrium.core.* -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.creating.FeatureExpectOptions -import ch.tutteli.atrium.domain.builders.creating.changers.impl.featureextractor.* -import ch.tutteli.atrium.domain.creating.changers.ExtractedFeaturePostStep -import ch.tutteli.atrium.reporting.LazyRepresentation -import ch.tutteli.atrium.reporting.Text -import ch.tutteli.atrium.reporting.translating.Translatable -import ch.tutteli.atrium.reporting.translating.Untranslatable - -/** - * Defines the contract for sophisticated `safe feature extractions` including assertion creation for the feature. - * - * It is similar to [ch.tutteli.atrium.domain.creating.NewFeatureAssertions] but differs in the intended usage. - * [ch.tutteli.atrium.domain.creating.NewFeatureAssertions] are intended to make assertions about a return value of a method call or a property, - * assuming that the call as such always succeeds (no exception is thrown). - * The [FeatureExtractorBuilder] on the other hand should be used if it is already known, - * that the call/access fails depending on given arguments. - * For instance, [List.get] is a good example where it fails if the given index is out of bounds. - */ -@Deprecated( - "Use FeatureExtractorBuilder from atrium-logic; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.logic.creating.transformers.FeatureExtractorBuilder") -) -interface FeatureExtractorBuilder { - - companion object { - /** - * Entry point to use the [FeatureExtractorBuilder]. - */ - @Deprecated( - "Use FeatureExtractorBuilder from atrium-logic; will be removed with 1.0.0", - ReplaceWith( - "ch.tutteli.atrium.logic.creating.transformers.FeatureExtractorBuilder(expect._logic)", - "ch.tutteli.atrium.logic._logic" - ) - ) - fun create(originalAssertionContainer: Expect): DescriptionStep = - DescriptionStep.create(originalAssertionContainer) - } - - /** - * Step which allows to specify the description which will be used to describe the feature. - * - * @param T the type of the current subject. - */ - @Deprecated( - "Use FeatureExtractorBuilder.DescriptionStep from atrium-logic; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.logic.creating.transformers.FeatureExtractorBuilder.DescriptionStep") - ) - interface DescriptionStep { - /** - * The previously specified assertion container from which we are going to extract the feature. - */ - val originalAssertionContainer: Expect - - /** - * Uses [coreFactory].[newMethodCallFormatter][CoreFactory.newMethodCallFormatter] to create a description - * of a method call with the given [methodName] and the given [arguments]. - * - * Use [withDescription] in case the feature extraction is not based on a method call. - */ - fun methodCall(methodName: String, vararg arguments: Any?): RepresentationInCaseOfFailureStep = - withDescription(coreFactory.newMethodCallFormatter().formatCall(methodName, arguments)) - - /** - * Uses the given [description], wraps it into an [Untranslatable] and uses it as description of the feature. - */ - fun withDescription(description: String): RepresentationInCaseOfFailureStep = - withDescription(Untranslatable(description)) - - /** - * Uses the given [translatable] as description of the feature. - */ - fun withDescription(translatable: Translatable): RepresentationInCaseOfFailureStep - - companion object { - /** - * Creates a [DescriptionStep] in the context of the [FeatureExtractorBuilder]. - */ - fun create( - originalAssertionContainer: Expect - ): DescriptionStep = DescriptionStepImpl(originalAssertionContainer) - } - } - - /** - * Step which allows to to define the representation which shall be used - * in case the extraction cannot be performed. - * - * @param T the type of the current subject. - */ - @Deprecated( - "Use FeatureExtractorBuilder.RepresentationInCaseOfFailureStep from atrium-logic; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.logic.creating.transformers.FeatureExtractorBuilder.RepresentationInCaseOfFailureStep") - ) - interface RepresentationInCaseOfFailureStep { - /** - * The previously specified assertion container from which we are going to extract the feature. - */ - val originalAssertionContainer: Expect - - /** - * The previously specified description which describes the kind of feature extraction. - */ - val description: Translatable - - /** - * Uses the given [representationProvider], by turning it into a [LazyRepresentation], - * to get the representation which will be used in case the extraction cannot be performed. - */ - fun withRepresentationForFailure(representationProvider: () -> Any?): FeatureExtractionStep = - withRepresentationForFailure(LazyRepresentation(representationProvider)) - - /** - * Uses the given [representation] in case the extraction cannot be performed. - * - * Notice, if you want to use text (a [String] which is treated as raw string in reporting) as representation, - * then wrap it into a [Text] and pass it instead. - */ - fun withRepresentationForFailure(representation: Any): FeatureExtractionStep - - companion object { - /** - * Creates a [RepresentationInCaseOfFailureStep] in the context of the [FeatureExtractorBuilder]. - */ - fun create( - originalAssertionContainer: Expect, - description: Translatable - ): RepresentationInCaseOfFailureStep = - RepresentationInCaseOfFailureStepImpl(originalAssertionContainer, description) - } - } - - /** - * Step to define the feature extraction as such where a one can include a check by returning [None] in case the - * extraction should not be carried out. - * - * @param T the type of the current subject. - */ - @Deprecated( - "Use FeatureExtractorBuilder.FeatureExtractionStep from atrium-logic; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.logic.creating.transformers.FeatureExtractorBuilder.FeatureExtractionStep") - ) - interface FeatureExtractionStep { - /** - * The previously specified assertion container from which we are going to extract the feature. - */ - val originalAssertionContainer: Expect - - /** - * The previously specified description which describes the kind of feature extraction. - */ - - val description: Translatable - - /** - * The previously specified representation which will be used in case the feature cannot be extracted. - */ - val representationForFailure: Any - - /** - * Defines the feature extraction as such which is most likely based on the current subject - * (but does not need to be). - * - * @param extraction A function returning either [Some] with the corresponding feature or [None] in case the - * extraction cannot be carried out. - */ - fun withFeatureExtraction(extraction: (subject: T) -> Option): OptionsStep - - companion object { - /** - * Creates a [FeatureExtractionStep] in the context of the [FeatureExtractorBuilder]. - */ - fun create( - originalAssertionContainer: Expect, - description: Translatable, - representationForFailure: Any - ): FeatureExtractionStep = FeatureExtractionStepImpl( - originalAssertionContainer, description, representationForFailure - ) - } - } - - /** - * Step which allows to override previously defined properties -- such as use a different description -- but - * also allows to define options where usually a default value is used, such as use the subject itself as - * representation. - * - * @param T the type of the subject. - */ - @Deprecated( - "Use FeatureExtractorBuilder.OptionsStep from atrium-logic; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.logic.creating.transformers.FeatureExtractorBuilder.OptionsStep") - ) - interface OptionsStep { - /** - * The so far chosen options up to the [FeatureExtractionStep] step. - */ - val featureExtractionStep: FeatureExtractionStep - - /** - * The previously specified feature extraction lambda. - */ - val featureExtraction: (T) -> Option - - /** - * Allows to define the [FeatureOptions] via an [OptionsChooser]-lambda which provides convenience functions. - * - * The function usually start with `with...` and are sometimes overloaded to ease the configuration. - */ - fun withOptions(configuration: OptionsChooser.() -> Unit): FinalStep = - withOptions(FeatureOptions(configuration)) - - /** - * Uses the given [expectOptions]. - */ - fun withOptions(expectOptions: FeatureOptions): FinalStep - - /** - * States explicitly that no optional [FeatureOptions] are defined, which means, `build` will create - * a new [Expect] based on the previously defined mandatory options but without any optional options or - * in other words, the default values are used for the optional options. - * - * Use [withOptions] if you want to define optional [FeatureOptions] such as, override the - * description, define an own representation etc. - */ - fun withoutOptions(): FinalStep - - companion object { - fun create( - featureExtractionStep: FeatureExtractionStep, - featureExtraction: (T) -> Option - ): OptionsStep = OptionsStepImpl(featureExtractionStep, featureExtraction) - } - } - - /** - * Helper lambda to specify [FeatureOptions] via convenience methods. - * - * Calling multiple times the same method overrides the previously defined value. - */ - @Deprecated( - "Use FeatureExtractorBuilder from atrium-logic and thus FeatureExpectOptionsChooser; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.creating.FeatureExpectOptionsChooser") - ) - interface OptionsChooser { - - /** - * Wraps the given [description] into an [Untranslatable] and passes it to the overload - * which expects a [Translatable] -- this is then used as custom description - * instead of the previously defined description. - * - */ - fun withDescription(description: String) { - withDescription(Untranslatable(description)) - } - - /** - * Uses the given [description] as custom description instead of the previously defined description. - */ - fun withDescription(description: Translatable) - - /** - * Wraps the given [textRepresentation] into a [Text] and uses it as representation of the subject - * instead of the representation that has been defined so far (which defaults to the subject itself). - * - * In case [Expect.maybeSubject] is not defined i.e. [None], then the previous representation is used. - */ - fun withRepresentation(textRepresentation: String): Unit = - withRepresentation { Text(textRepresentation) } - - /** - * Uses the given [representationProvider] to retrieve a representation which can be based on the current - * subject where this provided representation is used as new representation of the subject - * instead of the representation that has been defined so far (which defaults to the subject itself). - * - * Notice, if you want to use text (a [String] which is treated as raw string in reporting) as representation, - * then wrap it into a [Text] and pass it instead. - * If your text does not include the current subject, then we recommend to use the other overload which expects - * a `String` and does the wrapping for you. - * - * In case [Expect.maybeSubject] is not defined i.e. [None], then the previous representation is used. - */ - fun withRepresentation(representationProvider: (R) -> Any) - - companion object { - fun createAndBuild(configuration: OptionsChooser.() -> Unit): FeatureOptions = - OptionsChooserImpl().apply(configuration).build() - } - } - - /** - * Final step in the extract-feature-process, creates a [ExtractedFeaturePostStep] - * based on the previously specified options. - * - * @param T the type of the current subject. - * @param R the type of the feature, aka the new subject. - */ - @Deprecated( - "Use FeatureExtractorBuilder.FinalStep from atrium-logic; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.logic.creating.transformers.FeatureExtractorBuilder.FinalStep") - ) - interface FinalStep { - /** - * The so far chosen options up to the [FeatureExtractionStep] step. - */ - val featureExtractionStep: FeatureExtractionStep - - /** - * The previously specified feature extraction lambda. - */ - val featureExtraction: (T) -> Option - - /** - * Either the previously specified [FeatureOptions] or `null`. - */ - val featureOptions: FeatureOptions? - - /** - * Finishes the `feature extraction`-process by building a new [Expect] taking the previously chosen - * options into account. - * - * @return An [ExtractedFeaturePostStep] which allows to define what should happen with the new [Expect]. - */ - fun build(): ExtractedFeaturePostStep - - companion object { - /** - * Creates the [FinalStep] in the context of the [FeatureExtractorBuilder]. - */ - fun create( - featureExtractionStep: FeatureExtractionStep, - featureExtraction: (T) -> Option, - featureOptions: FeatureOptions? - ): FinalStep = FinalStepImpl( - featureExtractionStep, featureExtraction, featureOptions - ) - } - } -} - - -/** - * Additional (non-mandatory) options for the [FeatureExtractorBuilder] to create an [Expect]. - * - * @property description Defines a custom description if not null. - * @property representationInsteadOfFeature Defines a custom representation based on a present subject if not null. - */ -@Deprecated( - "Use FeatureExtractorBuilder from atrium-logic and thus FeatureExpectOptions; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.creating.FeatureExpectOptions") -) -data class FeatureOptions( - val description: Translatable? = null, - val representationInsteadOfFeature: ((R) -> Any)? = null -) { - /** - * Merges the given [options] with this object creating a new [FeatureOptions] - * where defined properties in [options] will have precedence over properties defined in this instance. - * - * For instance, this object has defined [representationInsteadOfFeature] (meaning it is not `null`) and - * the given [options] as well, then the resulting [FeatureOptions] will have the - * [representationInsteadOfFeature] of [options]. - */ - fun merge(options: FeatureOptions): FeatureOptions = - FeatureOptions( - options.description ?: description, - options.representationInsteadOfFeature ?: representationInsteadOfFeature - ) - - @ExperimentalNewExpectTypes - fun toFeatureExpectOptions(): FeatureExpectOptions = - FeatureExpectOptions(description, representationInsteadOfFeature) -} - -@Suppress("FunctionName") -@Deprecated( - "Use FeatureExpectOptions from atrium-core; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.creating.FeatureExpectOptions") -) -fun FeatureOptions(configuration: FeatureExtractorBuilder.OptionsChooser.() -> Unit): FeatureOptions = - FeatureExtractorBuilder.OptionsChooser.createAndBuild(configuration) diff --git a/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/changers/SubjectChangerBuilder.kt b/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/changers/SubjectChangerBuilder.kt deleted file mode 100644 index 4ace9609e..000000000 --- a/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/changers/SubjectChangerBuilder.kt +++ /dev/null @@ -1,326 +0,0 @@ -@file:Suppress( -/* TODO remove annotation with 1.0.0 */ "TYPEALIAS_EXPANSION_DEPRECATION", "DEPRECATION", - "OVERRIDE_BY_INLINE", "NOTHING_TO_INLINE" -) - -package ch.tutteli.atrium.domain.builders.creating.changers - -import ch.tutteli.atrium.assertions.DescriptiveAssertion -import ch.tutteli.atrium.core.None -import ch.tutteli.atrium.core.Option -import ch.tutteli.atrium.core.Some -import ch.tutteli.atrium.core.polyfills.cast -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.AssertionPlantNullable -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.domain.builders.creating.changers.impl.subjectchanger.* -import ch.tutteli.atrium.domain.creating.changers.ChangedSubjectPostStep -import ch.tutteli.atrium.domain.creating.changers.FailureHandlerAdapter -import ch.tutteli.atrium.domain.creating.changers.SubjectChanger -import ch.tutteli.atrium.domain.creating.changers.subjectChanger -import ch.tutteli.atrium.reporting.Text -import ch.tutteli.atrium.reporting.translating.Translatable -import ch.tutteli.atrium.reporting.translating.Untranslatable -import ch.tutteli.atrium.translations.DescriptionAnyAssertion -import kotlin.reflect.KClass - -/** - * Defines the contract for sophisticated `change subject` processes. - */ -@Deprecated( - "Use SubjectChangerBuilder from atrium-logic; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.logic.creating.transformers.SubjectChangerBuilder") -) -interface SubjectChangerBuilder { - - companion object { - /** - * Entry point to use the [SubjectChangerBuilder]. - */ - @Deprecated( - "Use SubjectChangerBuilder from atrium-logic; will be removed with 1.0.0", - ReplaceWith( - "ch.tutteli.atrium.logic.creating.transformers.SubjectChangerBuilder(expect._logic)", - "ch.tutteli.atrium.logic._logic" - ) - ) - fun create(expect: Expect): KindStep = KindStepImpl(expect) - - @Deprecated("Do no longer use Assert, use Expect instead - this method was introduced in 0.9.0 to ease the migration from Assert to Expect; will be removed with 1.0.0") - @Suppress("DEPRECATION", "DeprecatedCallableAddReplaceWith") - fun create( - originalPlant: SubjectProvider - ): DeprecatedKindStep = DeprecatedKindStepImpl(originalPlant) - } - - /** - * Step where one has to decide the kind of subject change. - * - * @param T the type of the current subject. - */ - @Deprecated("Do no longer use Assert, use Expect instead - this method was introduced in 0.9.0 to ease the migration from Assert to Expect; will be removed with 1.0.0") - interface DeprecatedKindStep { - /** - * The previously specified assertion plant to which the new [Assert] will delegate assertion checking. - */ - @Suppress("DEPRECATION") - val originalPlant: SubjectProvider - - @Deprecated("Do no longer use Assert, use Expect instead - this method was introduced in 0.9.0 to ease the migration from Assert to Expect; will be removed with 1.0.0") - @Suppress("DEPRECATION", "DeprecatedCallableAddReplaceWith") - fun unreported( - transformation: (T) -> R - ): Assert = subjectChanger.unreportedToAssert(originalPlant, transformation) - - @Deprecated("Do no longer use Assert, use Expect instead - this method was introduced in 0.9.0 to ease the migration from Assert to Expect; will be removed with 1.0.0") - @Suppress("DEPRECATION", "DeprecatedCallableAddReplaceWith") - fun unreportedNullable( - transformation: (T) -> R - ): AssertionPlantNullable = subjectChanger.unreportedNullableToAssert(originalPlant, transformation) - } - - /** - * Step where one has to decide the kind of subject change. - * - * @param T the type of the current subject. - */ - @Deprecated( - "Use SubjectChangerBuilder.KindStep from atrium-logic; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.logic.creating.transformers.SubjectChangerBuilder.KindStep") - ) - interface KindStep { - /** - * The previously specified assertion container to which the new [Expect] will delegate assertion checking. - */ - val originalExpect: Expect - - - /** - * First and final step in the change-subject-process -- changes the subject without showing the change as - * such in reporting. - * - * @return The newly created [Expect] for the new subject. - */ - fun unreported(transformation: (T) -> R): Expect = - subjectChanger.unreported(originalExpect, transformation) - - /** - * Entry point of the building process to not only change the subject but also report the change in reporting. - * - * Typically the change is documented by adding a [DescriptiveAssertion] to the new resulting [Expect]. - * - * This is basically a guide towards [SubjectChanger.reported], - * hence in a more verbose manner but also more readable in many cases. - */ - fun reportBuilder(): DescriptionRepresentationStep - } - - /** - * Step which allows to specify the description and representation of the change. - * - * @param T the type of the current subject. - */ - @Deprecated( - "Use SubjectChangerBuilder.DescriptionRepresentationStep from atrium-logic; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.logic.creating.transformers.SubjectChangerBuilder.DescriptionRepresentationStep") - ) - interface DescriptionRepresentationStep { - /** - * The previously specified assertion container to which the new [Expect] will delegate assertion checking. - */ - val originalExpect: Expect - - /** - * Uses [DescriptionAnyAssertion.IS_A] as description of the change, - * the given [subType] as representation and tries to perform a down-cast of [originalExpect]'s - * [Expect.maybeSubject] to the given type [TSub] - */ - //TODO once kotlin supports to have type parameters as upper bounds of another type parameter next to `: Any` we should restrict TSub : T & Any - fun downCastTo(subType: KClass): FailureHandlerOption = - withDescriptionAndRepresentation(DescriptionAnyAssertion.IS_A, subType) - .withTransformation { - Option.someIf(subType.isInstance(it)) { subType.cast(it) } - } - - /** - * Uses the given [description] and [representation] to represent the change by delegating to the other overload - * which expects a [Translatable] instead of a [String]. - * - * See the other overload for further information. - */ - fun withDescriptionAndRepresentation(description: String, representation: Any?): TransformationStep = - withDescriptionAndRepresentation(Untranslatable(description), representation) - - /** - * Uses the given [description] and [representation] to represent the change. - * Moreover, subsequent options in the building step allow to define rules when the change cannot be applied, in - * such a case an alternative description and representation might be used (depending on the implementation and - * chosen options). - * - * Notice, if you want to use text (a [String] which is treated as raw string in reporting) as representation, - * then wrap it into a [Text] and pass it instead. - */ - fun withDescriptionAndRepresentation(description: Translatable, representation: Any?): TransformationStep - - companion object { - /** - * Creates a [DescriptionRepresentationStep] in the context of the [SubjectChangerBuilder]. - */ - fun create( - originalAssertionContainer: Expect - ): DescriptionRepresentationStep = DescriptionRepresentationStepImpl(originalAssertionContainer) - } - } - - /** - * Step to define the transformation which yields the new subject wrapped into a [Some] if the transformation - * as such can be carried out; otherwise [None]. - * - * @param T the type of the current subject. - */ - @Deprecated( - "Use SubjectChangerBuilder.TransformationStep from atrium-logic; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.logic.creating.transformers.SubjectChangerBuilder.TransformationStep") - ) - interface TransformationStep { - /** - * The previously specified assertion container to which the new [Expect] will delegate assertion checking. - */ - val originalExpect: Expect - - /** - * The previously specified description which describes the kind of subject change. - */ - val description: Translatable - - /** - * The previously specified representation of the change. - */ - val representation: Any - - /** - * Defines the new subject, most likely based on the current subject (but does not need to be). - */ - fun withTransformation(transformation: (T) -> Option): FailureHandlerOption - - companion object { - /** - * Creates a [TransformationStep] in the context of the [SubjectChangerBuilder]. - */ - fun create( - originalAssertionContainer: Expect, - description: Translatable, - representation: Any - ): TransformationStep = TransformationStepImpl(originalAssertionContainer, description, representation) - } - } - - /** - * Optional step which allows to specify a custom [SubjectChanger.FailureHandler]. - * - * @param T the type of the current subject. - * @param R the type of the new subject. - */ - @Deprecated( - "Use SubjectChangerBuilder.FailureHandlerStep from atrium-logic; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.logic.creating.transformers.SubjectChangerBuilder.FailureHandlerStep") - ) - interface FailureHandlerOption { - /** - * The so far chosen options up to the [TransformationStep] step. - */ - val transformationStep: TransformationStep - - /** - * The previously specified new subject. - */ - val transformation: (T) -> Option - - /** - * Uses the given [failureHandler] as [SubjectChanger.FailureHandler] - * to create the failing assertion in case the subject change fails. - */ - fun withFailureHandler(failureHandler: SubjectChanger.FailureHandler): FinalStep - - /** - * Uses the given [failureHandler] as [SubjectChanger.FailureHandler] - * to create the failing assertion in case the subject change fails but previously maps the subject from - * [T] to [R1] as the failure handler only deals with [R1] subjects. - */ - fun withFailureHandlerAdapter( - failureHandler: SubjectChanger.FailureHandler, - map: (T) -> R1 - ): FinalStep = withFailureHandler(FailureHandlerAdapter(failureHandler, map)) - - /** - * Uses the default [SubjectChanger.FailureHandler] which builds the failing assertion based on the specified - * [TransformationStep.description] and [TransformationStep.representation] and includes the assertions - * a given assertionCreator lambda would create. - */ - fun withDefaultFailureHandler(): FinalStep - - /** - * Skips this step by using [withDefaultFailureHandler] and calls [FinalStep.build]. - * @return - */ - fun build(): ChangedSubjectPostStep = withDefaultFailureHandler().build() - - companion object { - /** - * Creates a [FailureHandlerOption] in the context of the [SubjectChangerBuilder]. - */ - fun create( - transformationStep: TransformationStep, - transformation: (T) -> Option - ): FailureHandlerOption = FailureHandlerOptionImpl(transformationStep, transformation) - } - } - - /** - * Final step in the change-subject-process, creates a [ChangedSubjectPostStep] - * ased on the previously specified options. - * - * @param T the type of the current subject. - * @param R the type of the new subject. - */ - @Deprecated( - "Use SubjectChangerBuilder.FinalStep from atrium-logic; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.logic.creating.transformers.SubjectChangerBuilder.FinalStep") - ) - interface FinalStep { - /** - * The so far chosen options up to the [TransformationStep] step. - */ - val transformationStep: TransformationStep - - /** - * The previously specified new subject. - */ - val transformation: (T) -> Option - - /** - * The previously specified [SubjectChanger.FailureHandler]. - */ - val failureHandler: SubjectChanger.FailureHandler - - /** - * Finishes the `reported subject change`-process by building a new [Expect] taking the previously chosen - * options into account. - * - * @return A [ChangedSubjectPostStep] which allows to define what should happen with the new [Expect]. - */ - fun build(): ChangedSubjectPostStep - - companion object { - /** - * Creates the [FinalStep] in the context of the [SubjectChangerBuilder]. - */ - fun create( - transformationStep: TransformationStep, - transformation: (T) -> Option, - failureHandler: SubjectChanger.FailureHandler - ): FinalStep = FinalStepImpl(transformationStep, transformation, failureHandler) - } - } -} diff --git a/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/changers/impl/featureextractor/OptionsChooserImpl.kt b/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/changers/impl/featureextractor/OptionsChooserImpl.kt deleted file mode 100644 index 3fca5f439..000000000 --- a/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/changers/impl/featureextractor/OptionsChooserImpl.kt +++ /dev/null @@ -1,23 +0,0 @@ -//TODO remove with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.domain.builders.creating.changers.impl.featureextractor - -import ch.tutteli.atrium.domain.builders.creating.changers.FeatureExtractorBuilder -import ch.tutteli.atrium.domain.builders.creating.changers.FeatureOptions -import ch.tutteli.atrium.reporting.translating.Translatable - -class OptionsChooserImpl : FeatureExtractorBuilder.OptionsChooser { - private var description: Translatable? = null - private var representationInsteadOfFeature: ((R) -> Any)? = null - - override fun withDescription(description: Translatable) { - this.description = description - } - - override fun withRepresentation(representationProvider: (R) -> Any) { - this.representationInsteadOfFeature = representationProvider - } - - fun build(): FeatureOptions = FeatureOptions(description, representationInsteadOfFeature) -} diff --git a/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/changers/impl/featureextractor/defaultImpls.kt b/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/changers/impl/featureextractor/defaultImpls.kt deleted file mode 100644 index d72f779de..000000000 --- a/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/changers/impl/featureextractor/defaultImpls.kt +++ /dev/null @@ -1,86 +0,0 @@ -//TODO remove with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.domain.builders.creating.changers.impl.featureextractor - -import ch.tutteli.atrium.core.None -import ch.tutteli.atrium.core.Option -import ch.tutteli.atrium.core.Some -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.creating.FeatureExpect -import ch.tutteli.atrium.domain.builders.creating.changers.FeatureExtractorBuilder -import ch.tutteli.atrium.domain.builders.creating.changers.FeatureOptions -import ch.tutteli.atrium.domain.creating.changers.ExtractedFeaturePostStep -import ch.tutteli.atrium.domain.creating.changers.featureExtractor -import ch.tutteli.atrium.reporting.translating.Translatable - -class DescriptionStepImpl( - override val originalAssertionContainer: Expect -) : FeatureExtractorBuilder.DescriptionStep { - - override fun withDescription( - translatable: Translatable - ): FeatureExtractorBuilder.RepresentationInCaseOfFailureStep = - FeatureExtractorBuilder.RepresentationInCaseOfFailureStep.create(originalAssertionContainer, translatable) -} - -internal class RepresentationInCaseOfFailureStepImpl( - override val originalAssertionContainer: Expect, - override val description: Translatable -) : FeatureExtractorBuilder.RepresentationInCaseOfFailureStep { - override fun withRepresentationForFailure(representation: Any): FeatureExtractorBuilder.FeatureExtractionStep = - FeatureExtractorBuilder.FeatureExtractionStep.create(originalAssertionContainer, description, representation) -} - -class FeatureExtractionStepImpl( - override val originalAssertionContainer: Expect, - override val description: Translatable, - override val representationForFailure: Any -) : FeatureExtractorBuilder.FeatureExtractionStep { - - override fun withFeatureExtraction(extraction: (T) -> Option): FeatureExtractorBuilder.OptionsStep = - FeatureExtractorBuilder.OptionsStep.create(this, extraction) -} - -class OptionsStepImpl( - override val featureExtractionStep: FeatureExtractorBuilder.FeatureExtractionStep, - override val featureExtraction: (T) -> Option -) : FeatureExtractorBuilder.OptionsStep { - - override fun withOptions(expectOptions: FeatureOptions): FeatureExtractorBuilder.FinalStep = - createFinalStep(expectOptions) - - override fun withoutOptions(): FeatureExtractorBuilder.FinalStep = createFinalStep(null) - - private fun createFinalStep(featureOptions: FeatureOptions?) = - FeatureExtractorBuilder.FinalStep.create( - featureExtractionStep, - featureExtraction, - featureOptions - ) -} - -class FinalStepImpl( - override val featureExtractionStep: FeatureExtractorBuilder.FeatureExtractionStep, - override val featureExtraction: (T) -> Option, - override val featureOptions: FeatureOptions? -) : FeatureExtractorBuilder.FinalStep { - - override fun build(): ExtractedFeaturePostStep = - ExtractedFeaturePostStep(featureExtractionStep.originalAssertionContainer, - extract = { extractIt(this, None) }, - extractAndApply = { assertionCreator -> extractIt(this, Some(assertionCreator)) } - ) - - //TODO reuse FeatureOptions instead of doing the .? .. ?: here as well - private fun extractIt(expect: Expect, maybeSubAssertions: Option.() -> Unit>): FeatureExpect = - featureExtractor.extract( - expect, - featureOptions?.description ?: featureExtractionStep.description, - featureExtractionStep.representationForFailure, - featureExtraction, - maybeSubAssertions, - featureOptions?.representationInsteadOfFeature - ) -} - diff --git a/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/changers/impl/subjectchanger/DefaultFailureHandlerImpl.kt b/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/changers/impl/subjectchanger/DefaultFailureHandlerImpl.kt deleted file mode 100644 index 4a94b3e26..000000000 --- a/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/changers/impl/subjectchanger/DefaultFailureHandlerImpl.kt +++ /dev/null @@ -1,34 +0,0 @@ -//TODO remove with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.domain.builders.creating.changers.impl.subjectchanger - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.assertions.builders.assertionBuilder -import ch.tutteli.atrium.assertions.builders.invisibleGroup -import ch.tutteli.atrium.core.None -import ch.tutteli.atrium.core.Option -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.domain.builders.creating.collectors.collectAssertions -import ch.tutteli.atrium.domain.creating.changers.SubjectChanger - -class DefaultFailureHandlerImpl : SubjectChanger.FailureHandler { - - override fun createAssertion( - originalAssertionContainer: Expect, - descriptiveAssertion: Assertion, - maybeAssertionCreator: Option.() -> Unit> - ): Assertion = maybeAssertionCreator.fold({ - descriptiveAssertion - }) { assertionCreator -> - assertionBuilder.invisibleGroup - .withAssertions( - descriptiveAssertion, - assertionBuilder.explanatoryGroup - .withDefaultType - .collectAssertions(None, assertionCreator) - .build() - ) - .build() - } -} diff --git a/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/changers/impl/subjectchanger/defaultImpls.kt b/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/changers/impl/subjectchanger/defaultImpls.kt deleted file mode 100644 index cd9a5d369..000000000 --- a/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/changers/impl/subjectchanger/defaultImpls.kt +++ /dev/null @@ -1,92 +0,0 @@ -//TODO remove with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.domain.builders.creating.changers.impl.subjectchanger - -import ch.tutteli.atrium.core.None -import ch.tutteli.atrium.core.Option -import ch.tutteli.atrium.core.Some -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.domain.builders.creating.changers.SubjectChangerBuilder -import ch.tutteli.atrium.domain.creating.changers.ChangedSubjectPostStep -import ch.tutteli.atrium.domain.creating.changers.SubjectChanger -import ch.tutteli.atrium.domain.creating.changers.subjectChanger -import ch.tutteli.atrium.reporting.Text -import ch.tutteli.atrium.reporting.translating.Translatable - -class KindStepImpl( - override val originalExpect: Expect -) : SubjectChangerBuilder.KindStep { - - override fun reportBuilder(): SubjectChangerBuilder.DescriptionRepresentationStep = - SubjectChangerBuilder.DescriptionRepresentationStep.create(originalExpect) -} - -@Suppress("DEPRECATION") -class DeprecatedKindStepImpl( - override val originalPlant: SubjectProvider -) : SubjectChangerBuilder.DeprecatedKindStep - -class DescriptionRepresentationStepImpl( - override val originalExpect: Expect -) : SubjectChangerBuilder.DescriptionRepresentationStep { - - override fun withDescriptionAndRepresentation( - description: Translatable, - representation: Any? - ): SubjectChangerBuilder.TransformationStep = SubjectChangerBuilder.TransformationStep.create( - originalExpect, - description, - representation ?: Text.NULL - ) -} - -class TransformationStepImpl( - override val originalExpect: Expect, - override val description: Translatable, - override val representation: Any -) : SubjectChangerBuilder.TransformationStep { - - override fun withTransformation( - transformation: (T) -> Option - ): SubjectChangerBuilder.FailureHandlerOption = - SubjectChangerBuilder.FailureHandlerOption.create(this, transformation) -} - -class FailureHandlerOptionImpl( - override val transformationStep: SubjectChangerBuilder.TransformationStep, - override val transformation: (T) -> Option -) : SubjectChangerBuilder.FailureHandlerOption { - - override fun withFailureHandler( - failureHandler: SubjectChanger.FailureHandler - ): SubjectChangerBuilder.FinalStep = - SubjectChangerBuilder.FinalStep.create(transformationStep, transformation, failureHandler) - - override fun withDefaultFailureHandler(): SubjectChangerBuilder.FinalStep = - withFailureHandler(DefaultFailureHandlerImpl()) -} - -class FinalStepImpl( - override val transformationStep: SubjectChangerBuilder.TransformationStep, - override val transformation: (T) -> Option, - override val failureHandler: SubjectChanger.FailureHandler -) : SubjectChangerBuilder.FinalStep { - - override fun build(): ChangedSubjectPostStep = - ChangedSubjectPostStep(transformationStep.originalExpect, - transform = { transformIt(this, None) }, - transformAndApply = { assertionCreator -> transformIt(this, Some(assertionCreator)) } - ) - - private fun transformIt(expect: Expect, maybeSubAssertions: Option.() -> Unit>) = - subjectChanger.reported( - expect, - transformationStep.description, - transformationStep.representation, - transformation, - failureHandler, - maybeSubAssertions - ) -} diff --git a/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/charSequenceAssertionsBuilders.kt b/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/charSequenceAssertionsBuilders.kt deleted file mode 100644 index 7911e6f60..000000000 --- a/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/charSequenceAssertionsBuilders.kt +++ /dev/null @@ -1,135 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "OVERRIDE_BY_INLINE", "NOTHING_TO_INLINE") - -package ch.tutteli.atrium.domain.builders.creating - -import ch.tutteli.atrium.core.polyfills.loadSingleService -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.domain.creating.CharSequenceAssertions -import ch.tutteli.atrium.domain.creating.charSequenceAssertions -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains -import ch.tutteli.atrium.domain.creating.charsequence.contains.creators.CharSequenceContainsAssertions -import ch.tutteli.atrium.domain.creating.charsequence.contains.creators.charSequenceContainsAssertions -import ch.tutteli.atrium.domain.creating.charsequence.contains.searchbehaviours.IgnoringCaseSearchBehaviour -import ch.tutteli.atrium.domain.creating.charsequence.contains.searchbehaviours.NoOpSearchBehaviour -import ch.tutteli.atrium.domain.creating.charsequence.contains.searchbehaviours.SearchBehaviourFactory -import ch.tutteli.atrium.domain.creating.charsequence.contains.searchbehaviours.searchBehaviourFactory -import ch.tutteli.atrium.domain.creating.typeutils.CharSequenceOrNumberOrChar -import ch.tutteli.atrium.reporting.translating.Translatable -import kotlin.jvm.JvmName - -/** - * Delegates inter alia to the implementation of [CharSequenceAssertions]. - * In detail, it implements [CharSequenceAssertions] by delegating to [charSequenceAssertions] - * which in turn delegates to the implementation via [loadSingleService]. - */ -@Deprecated("Use _logic from ch.tutteli.atrium.logic instead; will be removed with 1.0.0") -object CharSequenceAssertionsBuilder : CharSequenceAssertions { - - override inline fun containsBuilder(subjectProvider: SubjectProvider) = - charSequenceAssertions.containsBuilder(subjectProvider) - - override inline fun containsNotBuilder(subjectProvider: SubjectProvider) = - charSequenceAssertions.containsNotBuilder(subjectProvider) - - override inline fun startsWith(subjectProvider: SubjectProvider, expected: CharSequence) = - charSequenceAssertions.startsWith(subjectProvider, expected) - - override inline fun startsNotWith(subjectProvider: SubjectProvider, expected: CharSequence) = - charSequenceAssertions.startsNotWith(subjectProvider, expected) - - override inline fun endsWith(subjectProvider: SubjectProvider, expected: CharSequence) = - charSequenceAssertions.endsWith(subjectProvider, expected) - - override inline fun endsNotWith(subjectProvider: SubjectProvider, expected: CharSequence) = - charSequenceAssertions.endsNotWith(subjectProvider, expected) - - override inline fun isEmpty(subjectProvider: SubjectProvider) = - charSequenceAssertions.isEmpty(subjectProvider) - - override inline fun isNotEmpty(subjectProvider: SubjectProvider) = - charSequenceAssertions.isNotEmpty(subjectProvider) - - override inline fun isNotBlank(subjectProvider: SubjectProvider) = - charSequenceAssertions.isNotBlank(subjectProvider) - - override inline fun matches(expect: Expect, expected: Regex) = - charSequenceAssertions.matches(expect, expected) - - override inline fun mismatches(expect: Expect, expected: Regex) = - charSequenceAssertions.mismatches(expect, expected) - - /** - * Returns [CharSequenceContainsAssertionsBuilder] - * which inter alia delegates to the implementation of [CharSequenceContainsAssertions]. - */ - inline val contains get() = CharSequenceContainsAssertionsBuilder -} - -/** - * Delegates inter alia to the implementation of [CharSequenceContainsAssertions]. - * In detail, it implements [CharSequenceContainsAssertions] by delegating to [charSequenceContainsAssertions] - * which in turn delegates to the implementation via [loadSingleService]. - */ -@Deprecated("Use _logic from ch.tutteli.atrium.logic instead; will be removed with 1.0.0") -object CharSequenceContainsAssertionsBuilder : CharSequenceContainsAssertions { - - override inline fun values( - checkerOption: CharSequenceContains.CheckerOption, - expected: List - ) = charSequenceContainsAssertions.values(checkerOption, expected) - - override inline fun valuesIgnoringCase( - checkerOption: CharSequenceContains.CheckerOption, - expected: List - ) = charSequenceContainsAssertions.valuesIgnoringCase(checkerOption, expected) - - @Suppress("OverridingDeprecatedMember") - override inline fun defaultTranslationOf( - checkerOption: CharSequenceContains.CheckerOption, - expected: List - ) = charSequenceContainsAssertions.defaultTranslationOf(checkerOption, expected) - - @Suppress("OverridingDeprecatedMember") - override inline fun defaultTranslationOfIgnoringCase( - checkerOption: CharSequenceContains.CheckerOption, - expected: List - ) = charSequenceContainsAssertions.defaultTranslationOfIgnoringCase(checkerOption, expected) - - @JvmName("stringRegex") - inline fun regex( - checkerOption: CharSequenceContains.CheckerOption, - expected: List - ) = regex(checkerOption, expected.map { it.toRegex() }) - - override inline fun regex( - checkerOption: CharSequenceContains.CheckerOption, - expected: List - ) = charSequenceContainsAssertions.regex(checkerOption, expected) - - override inline fun regexIgnoringCase( - checkerOption: CharSequenceContains.CheckerOption, - expected: List - ) = charSequenceContainsAssertions.regexIgnoringCase(checkerOption, expected) - - /** - * Returns [CharSequenceContainsSearchBehaviourFactoryBuilder] - * which inter alia delegates to the implementation of [SearchBehaviourFactory]. - */ - inline val searchBehaviours get() = CharSequenceContainsSearchBehaviourFactoryBuilder -} - -/** - * Delegates inter alia to the implementation of [SearchBehaviourFactory]. - * In detail, it implements [SearchBehaviourFactory] by delegating to [searchBehaviourFactory] - * which in turn delegates to the implementation via [loadSingleService]. - */ -@Deprecated("Use _logic from ch.tutteli.atrium.logic instead; will be removed with 1.0.0") -object CharSequenceContainsSearchBehaviourFactoryBuilder : SearchBehaviourFactory { - - override inline fun ignoringCase( - containsBuilder: CharSequenceContains.Builder - ): CharSequenceContains.Builder = - searchBehaviourFactory.ignoringCase(containsBuilder) -} diff --git a/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/charsequence/contains/builders/AtLeastCheckerOptionBase.kt b/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/charsequence/contains/builders/AtLeastCheckerOptionBase.kt deleted file mode 100644 index 0ddd00c11..000000000 --- a/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/charsequence/contains/builders/AtLeastCheckerOptionBase.kt +++ /dev/null @@ -1,40 +0,0 @@ -//TODO remove with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.domain.builders.creating.charsequence.contains.builders - -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains.Checker -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains.SearchBehaviour -import ch.tutteli.atrium.domain.creating.charsequence.contains.checkers.checkerFactory - -/** - * The base class for builders which create a `contains at least` check within the fluent API of a sophisticated - * `contains` assertion for [CharSequence]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - * - * @property times The number which the check will compare against the actual number of times an expected object - * is found in the input of the search. - * - * @constructor The base class for builders which create a `contains at least` check within the fluent API of a - * sophisticated `contains` assertion for [CharSequence]. - * @param times The number which the check will compare against the actual number of times an expected object is - * found in the input of the search. - * @param containsBuilder The previously used [CharSequenceContains.Builder]. - * @param nameContainsNotFun The name of the function which represents a `CharSequence contains not` assertion. - * @param atLeastCall The name of the function which was called and created this builder. - */ -@Deprecated("Use AtLeastCheckerStep from atrium-logic; will be removed with 1.0.0") -abstract class AtLeastCheckerOptionBase( - final override val times: Int, - final override val containsBuilder: CharSequenceContains.Builder, - nameContainsNotFun: String, - atLeastCall: (Int) -> String -) : WithTimesCheckerOption { - - override val checkers: List = listOf( - checkerFactory.newAtLeastChecker(times, nameContainsNotFun, atLeastCall) - ) -} diff --git a/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/charsequence/contains/builders/AtMostCheckerOptionBase.kt b/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/charsequence/contains/builders/AtMostCheckerOptionBase.kt deleted file mode 100644 index c0927c87f..000000000 --- a/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/charsequence/contains/builders/AtMostCheckerOptionBase.kt +++ /dev/null @@ -1,55 +0,0 @@ -//TODO remove with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.domain.builders.creating.charsequence.contains.builders - -import ch.tutteli.atrium.domain.builders.utils.validateAtMost -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains.Checker -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains.SearchBehaviour -import ch.tutteli.atrium.domain.creating.charsequence.contains.checkers.checkerFactory - -/** - * The base class for builders which create a `contains at least once but at most` check within the fluent API of a - * sophisticated `contains` assertion for [CharSequence]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - * - * @property times The number which the check will compare against the actual number of times an expected object - * is found in the input of the search. - * - * @constructor The base class for builders which create a `contains at most` check within the fluent API of a - * sophisticated `contains` assertion for [CharSequence]. - * @param times The number which the check will compare against the actual number of times an expected object is - * found in the input of the search. - * @param containsBuilder The previously used [CharSequenceContains.Builder]. - * @param nameContainsNotFun The name of the function which represents a `CharSequence contains not` assertion. - * @param atMostCall The name of the function which was called and created this builder. - * @param atLeastCall The name of the function which represents a `CharSequence contains at least` assertion. - * @param exactlyCall The name of the function which represents a `CharSequence contains exactly` assertion. - */ -@Deprecated("Use AtMostCheckerStep from atrium-logic; will be removed with 1.0.0") -abstract class AtMostCheckerOptionBase( - final override val times: Int, - final override val containsBuilder: CharSequenceContains.Builder, - nameContainsNotFun: String, - atMostCall: (Int) -> String, - atLeastCall: (Int) -> String, - exactlyCall: (Int) -> String -) : WithTimesCheckerOption { - - init { - validateAtMost( - times, - atMostCall, - atLeastCall, - exactlyCall - ) - } - - override val checkers: List = listOf( - checkerFactory.newAtLeastChecker(1, nameContainsNotFun, atLeastCall), - checkerFactory.newAtMostChecker(times, nameContainsNotFun, atMostCall) - ) -} diff --git a/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/charsequence/contains/builders/ButAtMostCheckerOptionBase.kt b/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/charsequence/contains/builders/ButAtMostCheckerOptionBase.kt deleted file mode 100644 index 3a741fcef..000000000 --- a/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/charsequence/contains/builders/ButAtMostCheckerOptionBase.kt +++ /dev/null @@ -1,61 +0,0 @@ -//TODO remove with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.domain.builders.creating.charsequence.contains.builders - -import ch.tutteli.atrium.domain.builders.utils.validateButAtMost -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains.Checker -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains.SearchBehaviour -import ch.tutteli.atrium.domain.creating.charsequence.contains.checkers.checkerFactory - -/** - * The base class for builders which create the second step of a `contains at least but at most` check within the - * fluent API of a sophisticated `contains` assertion for [CharSequence]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied to the input of the search. - * - * @property times The number which the check will compare against the actual number of times an expected object - * is found in the input of the search. - * - * @constructor The base class for builders which create the second step of a `contains at least but at most` check - * within the fluent API of a sophisticated `contains` assertion for [CharSequence]. - * @param times The number which the check will compare against the actual number of times an expected object is - * found in the input of the search. - * @param containsBuilder The previously used [CharSequenceContains.Builder]. - * @param nameContainsNotFun The name of the function which represents a `CharSequence contains not` assertion. - * @param atMostCall The name of the function which represents a `CharSequence contains at most` assertion. - * @param atLeastCall The name of the function which represents a `CharSequence contains at least` assertion. - * @param butAtMostCall The name of the function which was called and created this builder. - * @param exactlyCall The name of the function which represents a `CharSequence contains exactly` assertion. - */ -@Deprecated("Use ButAtMostCheckerStep from atrium-logic; will be removed with 1.0.0") -abstract class ButAtMostCheckerOptionBase( - final override val times: Int, - atLeastBuilder: WithTimesCheckerOption, - final override val containsBuilder: CharSequenceContains.Builder, - nameContainsNotFun: String, - atLeastButAtMostCall: (Int, Int) -> String, - atMostCall: (Int) -> String, - atLeastCall: (Int) -> String, - butAtMostCall: (Int) -> String, - exactlyCall: (Int) -> String -) : WithTimesCheckerOption { - - init { - validateButAtMost( - atLeastBuilder.times, - times, - atLeastButAtMostCall, - atLeastCall, - butAtMostCall, - exactlyCall - ) - } - - override val checkers: List = listOf( - *atLeastBuilder.checkers.toTypedArray(), - checkerFactory.newAtMostChecker(times, nameContainsNotFun, atMostCall) - ) -} diff --git a/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/charsequence/contains/builders/ExactlyCheckerOptionBase.kt b/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/charsequence/contains/builders/ExactlyCheckerOptionBase.kt deleted file mode 100644 index 8f8de0c37..000000000 --- a/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/charsequence/contains/builders/ExactlyCheckerOptionBase.kt +++ /dev/null @@ -1,40 +0,0 @@ -//TODO remove with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.domain.builders.creating.charsequence.contains.builders - -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains.Checker -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains.SearchBehaviour -import ch.tutteli.atrium.domain.creating.charsequence.contains.checkers.checkerFactory - -/** - * The base class for builders which create a `contains exactly` check within the fluent API of a sophisticated - * `contains` assertion for [CharSequence]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - * - * @property times The number which the check will compare against the actual number of times an expected object - * is found in the input of the search. - * - * @constructor The base class for builders which create a `contains exactly` check within the fluent API of a sophisticated - * `contains` assertion for [CharSequence]. - * @param times The number which the check will compare against the actual number of times an expected object is - * found in the input of the search. - * @param containsBuilder The previously used [CharSequenceContains.Builder]. - * @param nameContainsNotFun The name of the function which represents a `CharSequence contains not` assertion. - * @param exactlyCall The function call which should not be used if [times] equals to zero. - */ -@Deprecated("Use ExactlyCheckerStep from atrium-logic; will be removed with 1.0.0") -abstract class ExactlyCheckerOptionBase( - final override val times: Int, - final override val containsBuilder: CharSequenceContains.Builder, - nameContainsNotFun: String, - exactlyCall: (Int) -> String -) : WithTimesCheckerOption { - - override val checkers: List = listOf( - checkerFactory.newExactlyChecker(times, nameContainsNotFun, exactlyCall) - ) -} diff --git a/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/charsequence/contains/builders/NotCheckerOptionBase.kt b/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/charsequence/contains/builders/NotCheckerOptionBase.kt deleted file mode 100644 index 0e5bb7871..000000000 --- a/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/charsequence/contains/builders/NotCheckerOptionBase.kt +++ /dev/null @@ -1,29 +0,0 @@ -//TODO remove with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.domain.builders.creating.charsequence.contains.builders - -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains.SearchBehaviour -import ch.tutteli.atrium.domain.creating.charsequence.contains.checkers.checkerFactory - -/** - * The base class for builders which create a `contains not` check within the fluent API of a sophisticated - * `contains` assertion for [CharSequence]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - * - * @constructor The base class for builders which create a `contains at least` check within the fluent API of a - * sophisticated `contains` assertion for [CharSequence]. - */ -@Deprecated("Use NotCheckerStep from atrium-logic; will be removed with 1.0.0") -abstract class NotCheckerOptionBase( - override val containsBuilder: CharSequenceContains.Builder -) : CharSequenceContains.CheckerOption { - - override val checkers = listOf( - checkerFactory.newNotChecker() - ) -} - diff --git a/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/charsequence/contains/builders/NotOrAtMostCheckerOptionBase.kt b/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/charsequence/contains/builders/NotOrAtMostCheckerOptionBase.kt deleted file mode 100644 index 7a855654f..000000000 --- a/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/charsequence/contains/builders/NotOrAtMostCheckerOptionBase.kt +++ /dev/null @@ -1,40 +0,0 @@ -//TODO remove with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.domain.builders.creating.charsequence.contains.builders - -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains.Checker -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains.SearchBehaviour -import ch.tutteli.atrium.domain.creating.charsequence.contains.checkers.checkerFactory - -/** - * The base class for builders which create a `contains not or at most` check within the fluent API of a - * sophisticated `contains` assertion for [CharSequence]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - * - * @property times The number which the check will compare against the actual number of times an expected object - * is found in the input of the search. - * - * @constructor The base class for builders which create a `contains not or at most` check within the fluent API of a - * sophisticated `contains` assertion for [CharSequence]. - * @param times The number which the check will compare against the actual number of times an expected object is - * found in the input of the search. - * @param containsBuilder The previously used [CharSequenceContains.Builder]. - * @param nameContainsNotFun The name of the function which represents a `CharSequence contains not` assertion. - * @param notOrAtMostCall The name of the function which was called and created this builder. - */ -@Deprecated("Use NotOrAtMostCheckerStep from atrium-logic; will be removed with 1.0.0") -abstract class NotOrAtMostCheckerOptionBase( - final override val times: Int, - final override val containsBuilder: CharSequenceContains.Builder, - nameContainsNotFun: String, - notOrAtMostCall: (Int) -> String -) : WithTimesCheckerOption { - - override val checkers: List = listOf( - checkerFactory.newAtMostChecker(times, nameContainsNotFun, notOrAtMostCall) - ) -} diff --git a/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/charsequence/contains/builders/WithTimesCheckerOption.kt b/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/charsequence/contains/builders/WithTimesCheckerOption.kt deleted file mode 100644 index 3448860b4..000000000 --- a/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/charsequence/contains/builders/WithTimesCheckerOption.kt +++ /dev/null @@ -1,16 +0,0 @@ -//TODO remove with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.domain.builders.creating.charsequence.contains.builders - -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains - -/** - * A [CharSequenceContains.CheckerOption] which is used to choose - * a [CharSequenceContains.Checker] which is based on a number of [times]. - */ -@Deprecated("Use WithTimesCheckerStep from atrium-logic; will be removed with 1.0.0") -interface WithTimesCheckerOption - : CharSequenceContains.CheckerOption { - val times: Int -} diff --git a/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/collectors/AssertionCollectorBuilder.kt b/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/collectors/AssertionCollectorBuilder.kt deleted file mode 100644 index ed7d53a19..000000000 --- a/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/collectors/AssertionCollectorBuilder.kt +++ /dev/null @@ -1,90 +0,0 @@ -@file:Suppress("OVERRIDE_BY_INLINE", "NOTHING_TO_INLINE") - -package ch.tutteli.atrium.domain.builders.creating.collectors - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.assertions.AssertionGroup -import ch.tutteli.atrium.core.Option -import ch.tutteli.atrium.core.polyfills.loadSingleService -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.domain.creating.collectors.* -import ch.tutteli.atrium.reporting.translating.Translatable - -/** - * Delegates inter alia to the implementation of [AssertionCollector]. - * In detail, it implements [AssertionCollector] by delegating to [assertionCollector] - * which in turn delegates to the implementation via [loadSingleService]. - */ -@Deprecated("Use _logic.collect instead, will be removed with 1.0.0") -object AssertionCollectorBuilder : AssertionCollector { - - override inline fun collect( - maybeSubject: Option, - noinline assertionCreator: Expect.() -> Unit - ): Assertion = assertionCollector.collect(maybeSubject, assertionCreator) - - override inline fun collectForComposition( - maybeSubject: Option, - noinline assertionCreator: Expect.() -> Unit - ) = assertionCollector.collectForComposition(maybeSubject, assertionCreator) - - - @Suppress("DEPRECATION", "DeprecatedCallableAddReplaceWith") - @Deprecated("Switch from Assert to Expect and use the other overload; will be removed with 1.0.0") - override inline fun , C : ch.tutteli.atrium.creating.BaseCollectingAssertionPlant> collect( - noinline subjectProvider: () -> T, - noinline collectingPlantFactory: (() -> T) -> C, - noinline assertionCreator: C.() -> Unit - ): AssertionGroup = assertionCollector.collect(subjectProvider, collectingPlantFactory, assertionCreator) - - @Suppress("DEPRECATION", "DeprecatedCallableAddReplaceWith") - @Deprecated("Switch from Assert to Expect and use the other overload; will be removed with 1.0.0") - override inline fun , C : ch.tutteli.atrium.creating.BaseCollectingAssertionPlant> collectOrExplain( - safeToCollect: Boolean, - warningCannotEvaluate: Translatable, - noinline subjectProvider: () -> T, - noinline collectingPlantFactory: (() -> T) -> C, - noinline assertionCreator: C.() -> Unit - ): AssertionGroup = assertionCollector.collectOrExplain( - safeToCollect, warningCannotEvaluate, subjectProvider, collectingPlantFactory, assertionCreator - ) - - /** - * Returns [ExplainingAssertionCollectorOption] providing options to create an assertion collector which collects - * assertions in the context of explaining assertions. - * It inter alia delegates to the implementation of [ThrowingAssertionCollectorForExplanation] and - * [NonThrowingAssertionCollectorForExplanation]. - */ - @Suppress("DeprecatedCallableAddReplaceWith", "DEPRECATION") - @Deprecated("Switch from Assert to Expect and use ExpectImpl.collector.collectForComposition; will be removed with 1.0.0") - inline val forExplanation - get() = ExplainingAssertionCollectorOption -} - -/** - * Delegates inter alia to the implementation of [ThrowingAssertionCollectorForExplanation] and - * [NonThrowingAssertionCollectorForExplanation]. - */ -@Deprecated("Switch from Assert to Expect and use ExpectImpl.collector.collectForComposition; will be removed with 1.0.0") -object ExplainingAssertionCollectorOption { - - /** - * Choosing this option causes the [AssertionCollector] to throw an [IllegalArgumentException] in case not a single - * [Assertion] was collected. - * - * Use [doNotThrowIfNoAssertionIsCollected] if such use cases should be ignored (no exception should be thrown). - */ - @Suppress("DEPRECATION") - inline val throwIfNoAssertionIsCollected - get() = throwingAssertionCollectorForExplanation - - /** - * Choosing this option will ignore use cases where not a single [Assertion] was collected. - * - * Use [throwIfNoAssertionIsCollected] if you want that [AssertionCollector] throws an - * [IllegalArgumentException] in such cases. - */ - @Suppress("DEPRECATION") - inline val doNotThrowIfNoAssertionIsCollected - get() = nonThrowingAssertionCollectorForExplanation -} diff --git a/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/collectors/AssertionOptionExplantoryExtensions.kt b/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/collectors/AssertionOptionExplantoryExtensions.kt index 635651014..3f294d8f4 100644 --- a/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/collectors/AssertionOptionExplantoryExtensions.kt +++ b/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/collectors/AssertionOptionExplantoryExtensions.kt @@ -7,15 +7,6 @@ import ch.tutteli.atrium.core.Option import ch.tutteli.atrium.creating.Expect import ch.tutteli.atrium.domain.creating.collectors.assertionCollector -/** - * Collects the assertions [assertionCreator] creates and uses them as [AssertionGroup.assertions]. - */ -//TODO move to atrium-logic with 0.16.0 -fun AssertionsOption.collectAssertions( - expect: Expect, - assertionCreator: Expect.() -> Unit -): R = collectAssertions(expect.maybeSubject, assertionCreator) - /** * Collects the assertions [assertionCreator] creates and uses them as [AssertionGroup.assertions]. */ diff --git a/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/iterable/contains/builders/AtLeastCheckerOptionBase.kt b/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/iterable/contains/builders/AtLeastCheckerOptionBase.kt deleted file mode 100644 index e3e46c94f..000000000 --- a/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/iterable/contains/builders/AtLeastCheckerOptionBase.kt +++ /dev/null @@ -1,40 +0,0 @@ -//TODO remove with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.domain.builders.creating.iterable.contains.builders - -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains.Checker -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains.SearchBehaviour -import ch.tutteli.atrium.domain.creating.iterable.contains.checkers.checkerFactory - -/** - * The base class for builders which create a `contains at least` check within the fluent API of a sophisticated - * `contains` assertion for [Iterable]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - * - * @property times The number which the check will compare against the actual number of times an expected object - * is found in the input of the search. - * - * @constructor The base class for builders which create a `contains at least` check within the fluent API of a - * sophisticated `contains` assertion for [Iterable]. - * @param times The number which the check will compare against the actual number of times an expected entry is - * found in the [Iterable]. - * @param containsBuilder The previously used [IterableContains.Builder]. - * @param nameContainsNotFun The name of the function which represents a `CharSequence contains not` assertion. - * @param atLeastCall The name of the function which was called and created this builder. - */ -@Deprecated("Use AtLeastCheckerStep from atrium-logic; will be removed with 1.0.0") -abstract class AtLeastCheckerOptionBase, out S : SearchBehaviour>( - final override val times: Int, - final override val containsBuilder: IterableContains.Builder, - nameContainsNotFun: String, - atLeastCall: (Int) -> String -) : WithTimesCheckerOption { - - override val checkers: List = listOf( - checkerFactory.newAtLeastChecker(times, nameContainsNotFun, atLeastCall) - ) -} diff --git a/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/iterable/contains/builders/AtMostCheckerOptionBase.kt b/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/iterable/contains/builders/AtMostCheckerOptionBase.kt deleted file mode 100644 index 7986eb404..000000000 --- a/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/iterable/contains/builders/AtMostCheckerOptionBase.kt +++ /dev/null @@ -1,55 +0,0 @@ -//TODO remove with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.domain.builders.creating.iterable.contains.builders - -import ch.tutteli.atrium.domain.builders.utils.validateAtMost -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains.Checker -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains.SearchBehaviour -import ch.tutteli.atrium.domain.creating.iterable.contains.checkers.checkerFactory - -/** - * The base class for builders which create a `contains at least once but at most` check within the fluent API of a - * sophisticated `contains` assertion for [Iterable]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - * - * @property times The number which the check will compare against the actual number of times an expected object - * is found in the input of the search. - * - * @constructor The base class for builders which create a `contains at most` check within the fluent API of a - * sophisticated `contains` assertion for [Iterable]. - * @param times The number which the check will compare against the actual number of times an expected entry is - * found in the [Iterable]. - * @param containsBuilder The previously used [IterableContains.Builder]. - * @param nameContainsNotFun The name of the function which represents a `CharSequence contains not` assertion. - * @param atMostCall The name of the function which was called and created this builder. - * @param atLeastCall The name of the function which represents a `CharSequence contains at least` assertion. - * @param exactlyCall The name of the function which represents a `CharSequence contains exactly` assertion. - */ -@Deprecated("Use AtMostCheckerStep from atrium-logic; will be removed with 1.0.0") -abstract class AtMostCheckerOptionBase, out S : SearchBehaviour>( - final override val times: Int, - final override val containsBuilder: IterableContains.Builder, - nameContainsNotFun: String, - atMostCall: (Int) -> String, - atLeastCall: (Int) -> String, - exactlyCall: (Int) -> String -) : WithTimesCheckerOption { - - init { - validateAtMost( - times, - atMostCall, - atLeastCall, - exactlyCall - ) - } - - override val checkers: List = listOf( - checkerFactory.newAtLeastChecker(1, nameContainsNotFun, atLeastCall), - checkerFactory.newAtMostChecker(times, nameContainsNotFun, atMostCall) - ) -} diff --git a/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/iterable/contains/builders/ButAtMostCheckerOptionBase.kt b/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/iterable/contains/builders/ButAtMostCheckerOptionBase.kt deleted file mode 100644 index 107d3f319..000000000 --- a/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/iterable/contains/builders/ButAtMostCheckerOptionBase.kt +++ /dev/null @@ -1,61 +0,0 @@ -//TODO remove with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.domain.builders.creating.iterable.contains.builders - -import ch.tutteli.atrium.domain.builders.utils.validateButAtMost -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains.Checker -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains.SearchBehaviour -import ch.tutteli.atrium.domain.creating.iterable.contains.checkers.checkerFactory - -/** - * The base class for builders which create the second step of a `contains at least but at most` check within the - * fluent API of a sophisticated `contains` assertion for [Iterable]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied to the input of the search. - * - * @property times The number which the check will compare against the actual number of times an expected object - * is found in the input of the search. - * - * @constructor The base class for builders which create the second step of a `contains at least but at most` check - * within the fluent API of a sophisticated `contains` assertion for [Iterable]. - * @param times The number which the check will compare against the actual number of times an expected entry is - * found in the [Iterable]. - * @param containsBuilder The previously used [IterableContains.Builder]. - * @param nameContainsNotFun The name of the function which represents a `Iterable contains not` assertion. - * @param atMostCall The name of the function which represents a `Iterable contains at most` assertion. - * @param atLeastCall The name of the function which represents a `Iterable contains at least` assertion. - * @param atMostCall The name of the function which was called and created this builder. - * @param exactlyCall The name of the function which represents a `Iterable contains exactly` assertion. - */ -@Deprecated("Use ButAtMostCheckerStep from atrium-logic; will be removed with 1.0.0") -abstract class ButAtMostCheckerOptionBase, out S : SearchBehaviour>( - final override val times: Int, - atLeastBuilder: WithTimesCheckerOption, - final override val containsBuilder: IterableContains.Builder, - nameContainsNotFun: String, - atLeastButAtMostCall: (Int, Int) -> String, - atMostCall: (Int) -> String, - atLeastCall: (Int) -> String, - butAtMostCall: (Int) -> String, - exactlyCall: (Int) -> String -) : WithTimesCheckerOption { - - init { - validateButAtMost( - atLeastBuilder.times, - times, - atLeastButAtMostCall, - atLeastCall, - butAtMostCall, - exactlyCall - ) - } - - override val checkers: List = listOf( - *atLeastBuilder.checkers.toTypedArray(), - checkerFactory.newAtMostChecker(times, nameContainsNotFun, atMostCall) - ) -} diff --git a/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/iterable/contains/builders/ExactlyCheckerOptionBase.kt b/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/iterable/contains/builders/ExactlyCheckerOptionBase.kt deleted file mode 100644 index fa36bb5f9..000000000 --- a/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/iterable/contains/builders/ExactlyCheckerOptionBase.kt +++ /dev/null @@ -1,40 +0,0 @@ -//TODO remove with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.domain.builders.creating.iterable.contains.builders - -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains.Checker -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains.SearchBehaviour -import ch.tutteli.atrium.domain.creating.iterable.contains.checkers.checkerFactory - -/** - * The base class for builders which create a `contains exactly` check within the fluent API of a sophisticated - * `contains` assertion for [Iterable]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - * - * @property times The number which the check will compare against the actual number of times an expected object - * is found in the input of the search. - * - * @constructor The base class for builders which create a `contains exactly` check within the fluent API of a sophisticated - * `contains` assertion for [Iterable]. - * @param times The number which the check will compare against the actual number of times an expected entry is - * found in the [Iterable]. - * @param containsBuilder The previously used [IterableContains.Builder]. - * @param nameContainsNotFun The name of the function which represents a `Iterable contains not` assertion. - * @param exactlyCall The name of the function which was called and created this builder. - */ -@Deprecated("Use ExactlyCheckerStep from atrium-logic; will be removed with 1.0.0") -abstract class ExactlyCheckerOptionBase, out S : SearchBehaviour>( - final override val times: Int, - final override val containsBuilder: IterableContains.Builder, - nameContainsNotFun: String, - exactlyCall: (Int) -> String -) : WithTimesCheckerOption { - - override val checkers: List = listOf( - checkerFactory.newExactlyChecker(times, nameContainsNotFun, exactlyCall) - ) -} diff --git a/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/iterable/contains/builders/NotCheckerOptionBase.kt b/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/iterable/contains/builders/NotCheckerOptionBase.kt deleted file mode 100644 index 5b5abd45f..000000000 --- a/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/iterable/contains/builders/NotCheckerOptionBase.kt +++ /dev/null @@ -1,29 +0,0 @@ -//TODO remove with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.domain.builders.creating.iterable.contains.builders - -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains.SearchBehaviour -import ch.tutteli.atrium.domain.creating.iterable.contains.checkers.checkerFactory - -/** - * The base class for builders which create a `contains not` check within the fluent API of a sophisticated - * `contains` assertion for [Iterable]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - * - * @constructor The base class for builders which create a `contains at least` check within the fluent API of a - * sophisticated `contains` assertion for [Iterable]. - */ -@Deprecated("Use NotCheckerStep from atrium-logic; will be removed with 1.0.0") -abstract class NotCheckerOptionBase, out S : SearchBehaviour>( - override val containsBuilder: IterableContains.Builder -) : IterableContains.CheckerOption { - - override val checkers = listOf( - checkerFactory.newNotChecker() - ) -} - diff --git a/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/iterable/contains/builders/NotOrAtMostCheckerOptionBase.kt b/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/iterable/contains/builders/NotOrAtMostCheckerOptionBase.kt deleted file mode 100644 index 50dc8b3b6..000000000 --- a/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/iterable/contains/builders/NotOrAtMostCheckerOptionBase.kt +++ /dev/null @@ -1,37 +0,0 @@ -//TODO remove with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.domain.builders.creating.iterable.contains.builders - -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains.Checker -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains.SearchBehaviour -import ch.tutteli.atrium.domain.creating.iterable.contains.checkers.checkerFactory - -/** - * The base class for builders which create a `contains not or at most` check within the fluent API of a - * sophisticated `contains` assertion for [Iterable]. - * - * @param T The input type of the search. - * @param S The search behaviour which should be applied for the input of the search. - * - * @constructor The base class for builders which create a `contains at most` check within the fluent API of a - * sophisticated `contains` assertion for [Iterable]. - * @param times The number which the check will compare against the actual number of times an expected entry is - * found in the [Iterable]. - * @param containsBuilder The previously used [IterableContains.Builder]. - * @param nameContainsNotFun The name of the function which represents a `CharSequence contains not` assertion. - * @param notOrAtMostCall The name of the function which was called and created this builder. - */ -@Deprecated("Use NotOrAtMostCheckerStep from atrium-logic; will be removed with 1.0.0") -abstract class NotOrAtMostCheckerOptionBase, out S : SearchBehaviour>( - final override val times: Int, - final override val containsBuilder: IterableContains.Builder, - nameContainsNotFun: String, - notOrAtMostCall: (Int) -> String -) : WithTimesCheckerOption { - - override val checkers: List = listOf( - checkerFactory.newAtMostChecker(times, nameContainsNotFun, notOrAtMostCall) - ) -} diff --git a/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/iterable/contains/builders/WithTimesCheckerOption.kt b/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/iterable/contains/builders/WithTimesCheckerOption.kt deleted file mode 100644 index 3b8a5907a..000000000 --- a/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/iterable/contains/builders/WithTimesCheckerOption.kt +++ /dev/null @@ -1,16 +0,0 @@ -//TODO remove with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.domain.builders.creating.iterable.contains.builders - -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains - -/** - * A [IterableContains.CheckerOption] which is used to choose - * a [IterableContains.Checker] which is based on a number of [times]. - */ -@Deprecated("Use WithTimesCheckerStep from atrium-logic; will be removed with 1.0.0") -interface WithTimesCheckerOption, out S : IterableContains.SearchBehaviour> - : IterableContains.CheckerOption { - val times: Int -} diff --git a/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/iterableAssertionsBuilders.kt b/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/iterableAssertionsBuilders.kt deleted file mode 100644 index 499ca8c45..000000000 --- a/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/iterableAssertionsBuilders.kt +++ /dev/null @@ -1,180 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "OVERRIDE_BY_INLINE", "NOTHING_TO_INLINE") - -package ch.tutteli.atrium.domain.builders.creating - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.core.polyfills.loadSingleService -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.domain.creating.IterableAssertions -import ch.tutteli.atrium.domain.creating.changers.ExtractedFeaturePostStep -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.creating.iterable.contains.creators.IterableContainsAssertions -import ch.tutteli.atrium.domain.creating.iterable.contains.creators.iterableContainsAssertions -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.* -import ch.tutteli.atrium.domain.creating.iterableAssertions - -/** - * Delegates inter alia to the implementation of [IterableAssertions]. - * In detail, it implements [IterableAssertions] by delegating to [iterableAssertions] - * which in turn delegates to the implementation via [loadSingleService]. - */ -@Deprecated("Use _logic from ch.tutteli.atrium.logic instead; will be removed with 1.0.0") -object IterableAssertionsBuilder : IterableAssertions { - - override inline fun > containsBuilder(subjectProvider: SubjectProvider) = - iterableAssertions.containsBuilder(subjectProvider) - - override inline fun > containsNotBuilder(subjectProvider: SubjectProvider) = - iterableAssertions.containsNotBuilder(subjectProvider) - - override inline fun > all( - expect: Expect, - noinline assertionCreator: (Expect.() -> Unit)? - ): Assertion = iterableAssertions.all(expect, assertionCreator) - - - override inline fun > hasNext(expect: Expect): Assertion = - iterableAssertions.hasNext(expect) - - override inline fun > hasNotNext(expect: Expect): Assertion = - iterableAssertions.hasNotNext(expect) - - override inline fun , T : Iterable> min(expect: Expect): ExtractedFeaturePostStep = - iterableAssertions.min(expect) - - override inline fun , T : Iterable> max(expect: Expect) = - iterableAssertions.max(expect) - - /** - * Returns [IterableContainsAssertionsBuilder] - * which inter alia delegates to the implementation of [IterableContainsAssertions]. - */ - inline val contains get() = IterableContainsAssertionsBuilder - - // everything below is deprecated functionality and will be removed with 1.0.0 - - @Suppress("DEPRECATION", "DeprecatedCallableAddReplaceWith") - @Deprecated("Switch from Assert to Expect; will be removed with 1.0.0") - override inline fun all( - plant: AssertionPlant>, - noinline assertionCreator: (AssertionPlant.() -> Unit)? - ): Assertion = iterableAssertions.all(plant, assertionCreator) -} - -/** - * Delegates inter alia to the implementation of [IterableContainsAssertions]. - * In detail, it implements [IterableContainsAssertions] by delegating to [iterableContainsAssertions] - * which in turn delegates to the implementation via [loadSingleService]. - */ -@Deprecated("Use _logic from ch.tutteli.atrium.logic instead; will be removed with 1.0.0") -object IterableContainsAssertionsBuilder : IterableContainsAssertions { - - override inline fun > valuesInAnyOrder( - checkerOption: IterableContains.CheckerOption, - expected: List - ) = iterableContainsAssertions.valuesInAnyOrder(checkerOption, expected) - - override inline fun > entriesInAnyOrder( - checkerOption: IterableContains.CheckerOption, - assertionCreators: List<(Expect.() -> Unit)?> - ) = iterableContainsAssertions.entriesInAnyOrder(checkerOption, assertionCreators) - - override inline fun > valuesInAnyOrderOnly( - builder: IterableContains.Builder, - expected: List - ) = iterableContainsAssertions.valuesInAnyOrderOnly(builder, expected) - - override inline fun > entriesInAnyOrderOnly( - builder: IterableContains.Builder, - assertionCreators: List<(Expect.() -> Unit)?> - ) = iterableContainsAssertions.entriesInAnyOrderOnly(builder, assertionCreators) - - override inline fun > valuesInOrderOnly( - builder: IterableContains.Builder, - expected: List - ) = iterableContainsAssertions.valuesInOrderOnly(builder, expected) - - override inline fun > entriesInOrderOnly( - builder: IterableContains.Builder, - assertionCreators: List<(Expect.() -> Unit)?> - ) = iterableContainsAssertions.entriesInOrderOnly(builder, assertionCreators) - - override inline fun > valuesInOrderOnlyGrouped( - builder: IterableContains.Builder, - groups: List> - ): Assertion = iterableContainsAssertions.valuesInOrderOnlyGrouped(builder, groups) - - override inline fun > entriesInOrderOnlyGrouped( - builder: IterableContains.Builder, - groups: List.() -> Unit)?>> - ): Assertion = iterableContainsAssertions.entriesInOrderOnlyGrouped(builder, groups) - - - /** - * Returns [IterableContainsSearchBehaviourFactoryBuilder] - * which inter alia delegates to the implementation of [SearchBehaviourFactory]. - */ - inline val searchBehaviours get() = IterableContainsSearchBehaviourFactoryBuilder - - // everything below is deprecated functionality and will be removed with 1.0.0 - - @Suppress("DEPRECATION", "DeprecatedCallableAddReplaceWith") - @Deprecated("Switch from Assert to Expect; will be removed with 1.0.0") - override inline fun > entriesInAnyOrderWithAssert( - checkerOption: IterableContains.CheckerOption, - assertionCreators: List<(AssertionPlant.() -> Unit)?> - ) = iterableContainsAssertions.entriesInAnyOrderWithAssert(checkerOption, assertionCreators) - - - @Suppress("DEPRECATION", "DeprecatedCallableAddReplaceWith") - @Deprecated("Switch from Assert to Expect; will be removed with 1.0.0") - override inline fun > entriesInAnyOrderOnlyWithAssert( - builder: IterableContains.Builder, - assertionCreators: List<(AssertionPlant.() -> Unit)?> - ) = iterableContainsAssertions.entriesInAnyOrderOnlyWithAssert(builder, assertionCreators) - - @Suppress("DEPRECATION", "DeprecatedCallableAddReplaceWith") - @Deprecated("Switch from Assert to Expect; will be removed with 1.0.0") - override inline fun > entriesInOrderOnlyWithAssert( - builder: IterableContains.Builder, - assertionCreators: List<(AssertionPlant.() -> Unit)?> - ) = iterableContainsAssertions.entriesInOrderOnlyWithAssert(builder, assertionCreators) - - @Suppress("DEPRECATION", "DeprecatedCallableAddReplaceWith") - @Deprecated("Switch from Assert to Expect; will be removed with 1.0.0") - override inline fun > entriesInOrderOnlyGroupedWithAssert( - builder: IterableContains.Builder, - groups: List.() -> Unit)?>> - ): Assertion = iterableContainsAssertions.entriesInOrderOnlyGroupedWithAssert(builder, groups) -} - -/** - * Delegates inter alia to the implementation of [SearchBehaviourFactory]. - * In detail, it implements [SearchBehaviourFactory] by delegating to [searchBehaviourFactory] - * which in turn delegates to the implementation via [loadSingleService]. - */ -@Deprecated("Use _logic from ch.tutteli.atrium.logic instead; will be removed with 1.0.0") -object IterableContainsSearchBehaviourFactoryBuilder : SearchBehaviourFactory { - - override inline fun > inAnyOrder(builder: IterableContains.Builder) = - searchBehaviourFactory.inAnyOrder(builder) - - override inline fun > inAnyOrderOnly(builder: IterableContains.Builder) = - searchBehaviourFactory.inAnyOrderOnly(builder) - - override inline fun > inOrder(builder: IterableContains.Builder) = - searchBehaviourFactory.inOrder(builder) - - override inline fun > inOrderOnly(builder: IterableContains.Builder) = - searchBehaviourFactory.inOrderOnly(builder) - - override inline fun > inOrderOnlyGrouped(builder: IterableContains.Builder) = - searchBehaviourFactory.inOrderOnlyGrouped(builder) - - override inline fun > inOrderOnlyGroupedWithin(builder: IterableContains.Builder) = - searchBehaviourFactory.inOrderOnlyGroupedWithin(builder) - -} diff --git a/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/throwableAssertionsBuilders.kt b/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/throwableAssertionsBuilders.kt deleted file mode 100644 index 89f5f3c0b..000000000 --- a/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/throwableAssertionsBuilders.kt +++ /dev/null @@ -1,101 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "OVERRIDE_BY_INLINE", "NOTHING_TO_INLINE") - -package ch.tutteli.atrium.domain.builders.creating - -import ch.tutteli.atrium.core.polyfills.loadSingleService -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.domain.creating.ThrowableAssertions -import ch.tutteli.atrium.domain.creating.changers.ChangedSubjectPostStep -import ch.tutteli.atrium.domain.creating.throwable.thrown.ThrowableThrown -import ch.tutteli.atrium.domain.creating.throwable.thrown.creators.ThrowableThrownAssertions -import ch.tutteli.atrium.domain.creating.throwable.thrown.creators.throwableThrownAssertions -import ch.tutteli.atrium.domain.creating.throwable.thrown.providers.absentThrowableMessageProviderFactory -import ch.tutteli.atrium.domain.creating.throwableAssertions -import ch.tutteli.atrium.reporting.Reporter -import ch.tutteli.atrium.reporting.translating.Translatable -import kotlin.reflect.KClass - -/** - * Delegates inter alia to the implementation of [ThrowableAssertions]. - * In detail, it implements [ThrowableAssertions] by delegating to [throwableAssertions] - * which in turn delegates to the implementation via [loadSingleService]. - */ -@Deprecated("Use _logic from ch.tutteli.atrium.logic instead; will be removed with 1.0.0") -object ThrowableAssertionsBuilder : ThrowableAssertions { - - override inline fun cause( - expect: Expect, - expectedType: KClass - ): ChangedSubjectPostStep = - throwableAssertions.cause(expect, expectedType) - - - @Deprecated( - "Use Expect instead; will be removed with 1.0.0", - ReplaceWith( - "this.thrownBuilder(\n" + - "// !!!! in case you define an assertion verb, remove it entirely, this is no longer required !!!!\n" + - ")" - ) - ) - override inline fun thrownBuilder( - assertionVerb: Translatable, - noinline act: () -> Unit, - reporter: Reporter - ): ThrowableThrown.Builder = throwableAssertions.thrownBuilder(assertionVerb, act, reporter) - - /** - * Returns [ThrowableThrownAssertionsBuilder] - * which inter alia delegates to the implementation of [ThrowableThrownAssertions]. - */ - @Deprecated("Will be removed with 1.0.0") - inline val thrown - get() = ThrowableThrownAssertionsBuilder -} - -/** - * Delegates inter alia to the implementation of [ThrowableThrownAssertions]. - * In detail, it implements [ThrowableThrownAssertions] by delegating to [throwableThrownAssertions] - * which in turn delegates to the implementation via [loadSingleService]. - */ -@Deprecated("Will be removed with 1.0.0") -object ThrowableThrownAssertionsBuilder : ThrowableThrownAssertions { - - @Suppress("DEPRECATION", "DeprecatedCallableAddReplaceWith") - @Deprecated("Switch from Assert to Expect; will be removed with 1.0.0") - override inline fun toBe( - throwableThrownBuilder: ThrowableThrown.Builder, - expectedType: KClass, - noinline assertionCreator: AssertionPlant.() -> Unit - ) = throwableThrownAssertions.toBe(throwableThrownBuilder, expectedType, assertionCreator) - - @Suppress("DEPRECATION", "DeprecatedCallableAddReplaceWith") - @Deprecated("Switch from Assert to Expect; will be removed with 1.0.0") - override inline fun nothingThrown(throwableThrownBuilder: ThrowableThrown.Builder) = - throwableThrownAssertions.nothingThrown(throwableThrownBuilder) - - /** - * Returns [AbsentThrowableMessageProviderFactoryBuilder] - * which inter alia delegates to the implementation of [ch.tutteli.atrium.domain.creating.throwable.thrown.providers.AbsentThrowableMessageProviderFactory]. - */ - @Suppress("DeprecatedCallableAddReplaceWith", "DEPRECATION") - @Deprecated("Will be removed with 1.0.0") - inline val providers - get() = AbsentThrowableMessageProviderFactoryBuilder -} - -/** - * Delegates inter alia to the implementation of [ch.tutteli.atrium.domain.creating.throwable.thrown.providers.AbsentThrowableMessageProviderFactory]. - * In detail, it implements [ch.tutteli.atrium.domain.creating.throwable.thrown.providers.AbsentThrowableMessageProviderFactory] by delegating to [absentThrowableMessageProviderFactory] - * which in turn delegates to the implementation via [loadSingleService]. - */ -@Suppress("DEPRECATION") -@Deprecated("Will be removed with 1.0.0") -object AbsentThrowableMessageProviderFactoryBuilder : - ch.tutteli.atrium.domain.creating.throwable.thrown.providers.AbsentThrowableMessageProviderFactory { - - override inline fun translatableBased(translatable: Translatable): ThrowableThrown.AbsentThrowableMessageProvider = - absentThrowableMessageProviderFactory.translatableBased(translatable) -} diff --git a/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/migration/assertToExpect.kt b/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/migration/assertToExpect.kt deleted file mode 100644 index fd5c43cf1..000000000 --- a/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/migration/assertToExpect.kt +++ /dev/null @@ -1,107 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("TYPEALIAS_EXPANSION_DEPRECATION") - -package ch.tutteli.atrium.domain.builders.migration - -import ch.tutteli.atrium.core.coreFactory -import ch.tutteli.atrium.core.getOrElse -import ch.tutteli.atrium.core.newReportingPlantNullable -import ch.tutteli.atrium.creating.* -import ch.tutteli.atrium.domain.builders.utils.Group -import ch.tutteli.atrium.domain.builders.utils.subExpect -import ch.tutteli.atrium.reporting.SHOULD_NOT_BE_SHOWN_TO_THE_USER_BUG_TRANSLATABLE -import kotlin.js.JsName - -/** - * Turns this [Expect] into an [Assert] so that you can use functions which have not yet been migrated to [Expect]. - * - * Will be removed with 1.0.0 - */ -@Deprecated( - "Switch from Assert to Expect, most likely you only need to add `import ch.tutteli.atrium.api.fluent.en_GB.*` and then you can remove this call. " + - "This function was introduced in 0.9.0 to ease the migration from Assert to Expect; will be removed with 1.0.0" -) -@Suppress("DEPRECATION", "DeprecatedCallableAddReplaceWith") -@JsName("asAssert") -fun Expect.asAssert(): Assert = - coreFactory.newReportingPlant( - SHOULD_NOT_BE_SHOWN_TO_THE_USER_BUG_TRANSLATABLE, - { this.maybeSubject.getOrElse { throw PlantHasNoSubjectException() } }, - coreFactory.newDelegatingAssertionChecker(this) - ) - -/** - * Turns this [Expect] into an [Assert] so that you can use functions which have not yet been migrated to [Expect]. - * - * Will be removed with 1.0.0 - */ -@Deprecated( - "Switch from Assert to Expect, most likely you only need to add `import ch.tutteli.atrium.api.fluent.en_GB.*` and then you can remove this call. " + - "This function was introduced in 0.9.0 to ease the migration from Assert to Expect; will be removed with 1.0.0" -) -@Suppress("DEPRECATION", "DeprecatedCallableAddReplaceWith") -fun Expect.asAssert(assertionCreator: Assert.() -> Unit): Assert = - asAssert().addAssertionsCreatedBy(assertionCreator) - -/** - * Turns this [Expect] into an [AssertionPlantNullable] so that you can use functions - * which have not yet been migrated to [Expect]. - * - * Will be removed with 1.0.0 - */ -@Deprecated( - "Switch from Assert to Expect, most likely you only need to add `import ch.tutteli.atrium.api.fluent.en_GB.*` and then you can remove this call. " + - "This function was introduced in 0.9.0 to ease the migration from Assert to Expect; will be removed with 1.0.0" -) -@Suppress("DEPRECATION", "DeprecatedCallableAddReplaceWith") -fun Expect.asAssert(): AssertionPlantNullable = - coreFactory.newReportingPlantNullable( - SHOULD_NOT_BE_SHOWN_TO_THE_USER_BUG_TRANSLATABLE, - { this.maybeSubject.getOrElse { throw PlantHasNoSubjectException() } }, - coreFactory.newDelegatingAssertionChecker(this) - ) - -@Deprecated( - "Switch from Assert to Expect, migrate all inner functions first and then remove this call -- this function was introduced in 0.9.0 to ease the migration from Assert to Expect; will be removed with 1.0.0", - ReplaceWith("group") -) -@Suppress("DEPRECATION") -fun asExpectGroup(group: Group<(Assert.() -> Unit)?>): Group<(Expect.() -> Unit)?> = - object : Group<(Expect.() -> Unit)?> { - override fun toList() = group.toList().map { asSubExpect(it) } - } - -@Deprecated( - "Switch from Assert to Expect, migrate all inner functions first and then remove this call -- this function was introduced in 0.9.0 to ease the migration from Assert to Expect; will be removed with 1.0.0", - ReplaceWith("assertionCreatorOrNull") -) -@Suppress("DEPRECATION") -fun asSubExpect( - assertionCreatorOrNull: (Assert.() -> Unit)? -): (Expect.() -> Unit)? = assertionCreatorOrNull?.let { subExpect { asAssert(it) } } - -/** - * Turns [Assert] or [AssertionPlantNullable] into an [Expect] so that you can use new functionality - * which is not available on [Assert]/[AssertionPlantNullable]. - * - * Try to switch entirely to [Expect] as [Assert] along with this function will be removed with 1.0.0 - */ -@Deprecated("Switch from Assert to Expect, this function was introduced in 0.9.0 to ease the migration from Assert to Expect; will be removed with 1.0.0") -@Suppress("DEPRECATION", "DeprecatedCallableAddReplaceWith") -fun > A.asExpect(): Expect = - DelegatingExpect(this, this.maybeSubject) - -/** - * Turns [Assert] or [AssertionPlantNullable] into an [Expect] so that you can use new functionality - * which is not available on [Assert]/[AssertionPlantNullable]. - * - * Try to switch entirely to [Expect] as [Assert] along with this function will be removed with 1.0.0 - * - * @returns The deprecated plant. - */ -@Deprecated("Switch from Assert to Expect, this function was introduced in 0.9.0 to ease the migration from Assert to Expect; will be removed with 1.0.0") -@Suppress("DEPRECATION", "DeprecatedCallableAddReplaceWith") -fun > A.asExpect(assertionCreator: Expect.() -> Unit): A { - asExpect().addAssertionsCreatedBy(assertionCreator) - return this -} diff --git a/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/utils/VarArgHelper.kt b/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/utils/VarArgHelper.kt index 25eb04a3a..102d4d7d2 100644 --- a/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/utils/VarArgHelper.kt +++ b/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/utils/VarArgHelper.kt @@ -3,7 +3,6 @@ package ch.tutteli.atrium.domain.builders.utils -import ch.tutteli.atrium.domain.creating.typeutils.IterableLike import ch.tutteli.kbox.glue /** @@ -32,41 +31,3 @@ interface VarArgHelper { */ fun toList(): List = expected glue otherExpected } - -/** - * Transforms the given [IterableLike] to `Pair>` with the intend that it can be easily used for a function - * requiring `T, vararg T` - * - * @throws IllegalArgumentException in case the iterable is empty. - */ -@Suppress("DeprecatedCallableAddReplaceWith") -@Deprecated("Use toVarArg from atrium-logic; will be removed with 1.0.0") -inline fun toVarArg(iterableLike: IterableLike): Pair> = - iterableToPair(iterableLikeToIterable(iterableLike)) - -@Suppress("DeprecatedCallableAddReplaceWith") -@Deprecated("Use iterableLikeToIterable from atrium-logic; will be removed with 1.0.0") -inline fun iterableLikeToIterable(iterableLike: IterableLike): Iterable = - when (iterableLike) { - is Sequence<*> -> iterableLike.map { it as T }.asIterable() - is Iterable<*> -> iterableLike.map { it as T } - is Array<*> -> iterableLike.map { it as T } - is CharArray -> iterableLike.map { it as T } - is ByteArray -> iterableLike.map { it as T } - is ShortArray -> iterableLike.map { it as T } - is IntArray -> iterableLike.map { it as T } - is LongArray -> iterableLike.map { it as T } - is FloatArray -> iterableLike.map { it as T } - is DoubleArray -> iterableLike.map { it as T } - is BooleanArray -> iterableLike.map { it as T } - else -> throw IllegalArgumentException("iterableLikeToIterable accepts arguments of types Iterable, Sequence, Array") - } - -@Deprecated( - "Use toVarArg from atrium-logic; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.logic.utils.toVarArg(iterable)") -) -inline fun iterableToPair(iterable: Iterable): Pair> { - require(iterable.iterator().hasNext()) { "Iterable without elements are not allowed for this function." } - return iterable.first() to iterable.drop(1).toTypedArray() -} diff --git a/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/utils/mapArguments.kt b/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/utils/mapArguments.kt index 3f31196e2..97c823fb0 100644 --- a/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/utils/mapArguments.kt +++ b/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/utils/mapArguments.kt @@ -5,9 +5,6 @@ package ch.tutteli.atrium.domain.builders.utils -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.creating.AssertionPlantNullable import ch.tutteli.atrium.creating.Expect import ch.tutteli.atrium.domain.builders.creating.PleaseUseReplacementException import kotlin.js.JsName @@ -255,31 +252,6 @@ class ArgumentMapperBuilder( crossinline assertionCreator: Expect.(T) -> Unit ): Pair.() -> Unit, Array.() -> Unit>> = to { t -> subExpect { assertionCreator(t) } } - /** - * Maps each argument to an [Assert][AssertionPlant]<[R]> lambda with receiver - * using the given [assertionCreator] (passing in the argument). - * - * @returns The mapped [first] and [others]. - */ - @Deprecated("Switch from Assert to Expect and use toExpect instead; will be removed with 1.0.0") - inline fun toAssert( - crossinline assertionCreator: Assert.(T) -> Unit - ): Pair.() -> Unit, Array.() -> Unit>> = to { t -> subAssert { assertionCreator(t) } } - - /** - * Maps each argument to an [AssertionPlantNullable]<[R]> lambda with receiver by - * using the given [assertionCreator] (passing in the argument). - * - * Notice, a future version might constrain [T] with a lower bound `Nothing?`. - * - * @returns The mapped [first] and [others]. - */ - @Deprecated("Switch from Assert to Expect and use toExpect instead; will be removed with 1.0.0") - inline fun toAssertionPlantNullable( - crossinline assertionCreator: AssertionPlantNullable.(T) -> Unit - ): Pair.() -> Unit, Array.() -> Unit>> = - to { t -> subAssertNullable { assertionCreator(t) } } - /** * Maps each argument to the given type [R] by using the given [mapper] * @@ -333,16 +305,4 @@ class ArgumentToNullOrMapperBuilder( crossinline assertionCreator: Expect.(T) -> Unit ): Pair<(Expect.() -> Unit)?, Array.() -> Unit)?>> = argumentMapperBuilder.to { nullableT -> nullableT?.let { t -> subExpect { assertionCreator(t) } } } - - /** - * Maps each argument to `null` if it is already `null` and if not, then to an [AssertionPlantNullable]<[R]> - * lambda with receiver by using the given [assertionCreator] (passing in the argument). - * - * @returns The mapped arguments. - */ - @Deprecated("Switch from Assert to Expect and use toExpect instead; will be removed with 1.0.0") - inline fun toAssert( - crossinline assertionCreator: Assert.(T) -> Unit - ): Pair<(Assert.() -> Unit)?, Array.() -> Unit)?>> = - argumentMapperBuilder.to { nullableT -> nullableT?.let { t -> subAssert { assertionCreator(t) } } } } diff --git a/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/utils/subAssert.kt b/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/utils/subAssert.kt index 69313736d..43272377b 100644 --- a/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/utils/subAssert.kt +++ b/misc/deprecated/domain/builders/atrium-domain-builders-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/utils/subAssert.kt @@ -5,51 +5,8 @@ package ch.tutteli.atrium.domain.builders.utils -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.creating.AssertionPlantNullable import ch.tutteli.atrium.creating.Expect -/** - * Helper function to create an [Assert<T>][AssertionPlant] lambda with receiver; - * helps to circumvent Kotlin type inference bugs involving lambdas. - * - * Following a few examples of bugs (you might want to vote if you encounter the same): - * - https://youtrack.jetbrains.com/issue/KT-24230 - * - https://youtrack.jetbrains.com/issue/KT-23883 - * - and probably more - * - * @param assertionCreator Your assertion creator lambda. - * @return your passed lambda. - */ -@Suppress("NOTHING_TO_INLINE") -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0", - ReplaceWith("expectLambda(assertionCreator)", "ch.tutteli.atrium.logic.utils.expectLambda") -) -inline fun subAssert(noinline assertionCreator: Assert.() -> Unit) = assertionCreator - - -/** - * Helper function to create an [AssertionPlantNullable] lambda with receiver; - * helps to circumvent Kotlin type inference bugs involving lambdas. - * - * Following a few examples of bugs (you might want to vote if you encounter the same): - * - https://youtrack.jetbrains.com/issue/KT-24230 - * - https://youtrack.jetbrains.com/issue/KT-23883 - * - and probably more - * - * @param assertionCreator Your assertion creator lambda. - * @return your passed lambda. - */ -@Suppress("NOTHING_TO_INLINE") -@Deprecated( - "Switch from Assert to Expect; will be removed with 1.0.0", - ReplaceWith("expectLambda(assertionCreator)", "ch.tutteli.atrium.logic.utils.expectLambda") -) -inline fun subAssertNullable(noinline assertionCreator: AssertionPlantNullable.() -> Unit) = - assertionCreator - @Suppress("NOTHING_TO_INLINE") @Deprecated( "Use expectLambda from atrium-logic; will be removed with 1.0.0", diff --git a/misc/deprecated/domain/builders/atrium-domain-builders-common/src/test/kotlin/ch/tutteli/atrium/domain/builders/utils/MapArgumentsSpec.kt b/misc/deprecated/domain/builders/atrium-domain-builders-common/src/test/kotlin/ch/tutteli/atrium/domain/builders/utils/MapArgumentsSpec.kt deleted file mode 100644 index e6324e40e..000000000 --- a/misc/deprecated/domain/builders/atrium-domain-builders-common/src/test/kotlin/ch/tutteli/atrium/domain/builders/utils/MapArgumentsSpec.kt +++ /dev/null @@ -1,262 +0,0 @@ -//TODO remove with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.domain.builders.utils - -import ch.tutteli.atrium.api.fluent.en_GB.* -import ch.tutteli.atrium.api.verbs.internal.expect -import ch.tutteli.atrium.domain.builders.creating.PleaseUseReplacementException -import ch.tutteli.atrium.domain.builders.migration.asAssert -import ch.tutteli.atrium.domain.builders.migration.asExpect -import ch.tutteli.atrium.logic._logic -import ch.tutteli.atrium.logic.changeSubject -import org.spekframework.spek2.Spek -import org.spekframework.spek2.style.specification.describe -import ch.tutteli.atrium.verbs.internal.assert as deprecatedAssert - -object MapArgumentsSpec : Spek({ - - describe("mapArguments") { - - context("T") { - it("without second step") { - fun it(i: String, vararg iX: String) = mapArguments(i, iX) { "$it." } - - expect(it("a", "b", "c")) - .first { toBe("a.") } - .second.asList().containsExactly("b.", "c.") - } - - it("with second step `to`") { - fun it(i: String, vararg iX: String) = mapArguments(i, iX).to { "$it." } - - expect(it("a", "b", "c")) - .first { toBe("a.") } - .second.asList().containsExactly("b.", "c.") - } - - it("toExpect") { - fun it(i: String, vararg iX: String) = - mapArguments(i, iX).toExpect { startsWith(it) } - - val (first, others) = it("a", "b", "c") - expect("apple").first() - others[0](expect("banana")) - others[1](expect("caramel")) - } - - it("toAssert") { - @Suppress("DEPRECATION") - fun it(i: String, vararg iX: String) = - mapArguments(i, iX).toAssert { asExpect().startsWith(it) } - - val (first, others) = it("a", "b", "c") - @Suppress("DEPRECATION") - deprecatedAssert("apple").first() - @Suppress("DEPRECATION") - others[0](deprecatedAssert("banana")) - @Suppress("DEPRECATION") - others[1](deprecatedAssert("caramel")) - } - - it("toAssertNullable") { - @Suppress("DEPRECATION") - fun it(i: String, vararg iX: String) = - mapArguments(i, iX).toAssertionPlantNullable { asExpect().notToBeNull { startsWith(it) } } - - val (first, others) = it("a", "b", "c") - @Suppress("DEPRECATION") - deprecatedAssert("apple" as String?).first() - @Suppress("DEPRECATION") - others[0](deprecatedAssert("banana" as String?)) - @Suppress("DEPRECATION") - others[1](deprecatedAssert("caramel" as String?)) - } - - context("toNullOr...") { - - it("toExpect") { - fun it(i: String?, vararg iX: String?) = - mapArguments(i, iX).toNullOr().toExpect { startsWith(it) } - - val (first, others) = it(null, "b", "c") - expect(first).toBe(null) - expect(others[0]).notToBeNull { - maybeSubject.map { assertionCreator -> - _logic.changeSubject.unreported { "banana" }.assertionCreator() - } - } - @Suppress("DEPRECATION") - deprecatedAssert(others[1]).asExpect().notToBeNull { - maybeSubject.map { assertionCreator -> - _logic.changeSubject.unreported { "caramel" }.assertionCreator() - } - } - } - - it("toAssert") { - @Suppress("DEPRECATION") - fun it(i: String?, vararg iX: String?) = - mapArguments(i, iX).toNullOr().toAssert { asExpect().startsWith(it) } - - val (first, others) = it(null, "b", "c") - @Suppress("DEPRECATION") - deprecatedAssert(first).asExpect().toBe(null) - @Suppress("DEPRECATION") - deprecatedAssert(others[0]).asExpect().notToBeNull { - maybeSubject.map { assertionCreator -> - @Suppress("DEPRECATION") - _logic.changeSubject.unreported { "banana" }.asAssert().assertionCreator() - } - } - @Suppress("DEPRECATION") - deprecatedAssert(others[1]).asExpect().notToBeNull { - maybeSubject.map { assertionCreator -> - @Suppress("DEPRECATION") - _logic.changeSubject.unreported { "caramel" }.asAssert().assertionCreator() - } - } - } - - it("on non-nullable arguments") { - @Suppress("DEPRECATION") - fun it(i: String, vararg iX: String): Nothing = mapArguments(i, iX).toNullOr() - - expect { - it("a", "b", "c") - }.toThrow() - } - } - } - - context("Byte") { - it("without second step") { - fun it(i: Byte, vararg iX: Byte) = mapArguments(i, iX) { it + 1 } - - expect(it(1, 2, 3, 4)) - .first { toBe(2) } - .second.asList().containsExactly(3, 4, 5) - } - - it("with second step") { - fun it(i: Byte, vararg iX: Byte) = mapArguments(i, iX).to { it + 1 } - - expect(it(1, 2, 3, 4)) - .first { toBe(2) } - .second.asList().containsExactly(3, 4, 5) - } - } - context("Char") { - it("without second step") { - fun it(i: Char, vararg iX: Char) = mapArguments(i, iX) { it + 1 } - - expect(it('a', 'b', 'c')) - .first { toBe('b') } - .second.asList().containsExactly('c', 'd') - } - it("with second step") { - fun it(i: Char, vararg iX: Char) = mapArguments(i, iX).to { it + 1 } - - expect(it('a', 'b', 'c')) - .first { toBe('b') } - .second.asList().containsExactly('c', 'd') - } - } - context("Short") { - it("without second step") { - fun it(i: Short, vararg iX: Short) = mapArguments(i, iX) { it + 1 } - - expect(it(1, 2, 3, 4)) - .first { toBe(2) } - .second.asList().containsExactly(3, 4, 5) - } - it("with second step") { - fun it(i: Short, vararg iX: Short) = mapArguments(i, iX).to { it + 1 } - - expect(it(1, 2, 3, 4)) - .first { toBe(2) } - .second.asList().containsExactly(3, 4, 5) - } - } - context("Int") { - it("without second step") { - fun it(i: Int, vararg iX: Int) = mapArguments(i, iX) { it + 1 } - - expect(it(1, 2, 3, 4)) - .first { toBe(2) } - .second.asList().containsExactly(3, 4, 5) - } - it("with second step") { - fun it(i: Int, vararg iX: Int) = mapArguments(i, iX).to { it + 1 } - - expect(it(1, 2, 3, 4)) - .first { toBe(2) } - .second.asList().containsExactly(3, 4, 5) - } - } - context("Long") { - it("without second step") { - fun it(i: Long, vararg iX: Long) = mapArguments(i, iX) { it + 1 } - - expect(it(1L, 2L, 3L, 4L)) - .first { toBe(2) } - .second.asList().containsExactly(3, 4, 5) - } - it("with second step") { - fun it(i: Long, vararg iX: Long) = mapArguments(i, iX).to { it + 1 } - - expect(it(1L, 2L, 3L, 4L)) - .first { toBe(2) } - .second.asList().containsExactly(3, 4, 5) - } - } - context("Float") { - it("without second step") { - fun it(i: Float, vararg iX: Float) = mapArguments(i, iX) { it + 1 } - - expect(it(1f, 2f, 3f, 4f)) - .first { toBe(2f) } - .second.asList().containsExactly(3f, 4f, 5f) - } - it("with second step") { - fun it(i: Float, vararg iX: Float) = mapArguments(i, iX).to { it + 1 } - - expect(it(1f, 2f, 3f, 4f)) - .first { toBe(2f) } - .second.asList().containsExactly(3f, 4f, 5f) - } - } - context("Double") { - it("without second step") { - fun it(i: Double, vararg iX: Double) = mapArguments(i, iX) { it + 1 } - - expect(it(1.0, 2.0, 3.0, 4.0)) - .first { toBe(2.0) } - .second.asList().containsExactly(3.0, 4.0, 5.0) - } - it("with second step") { - fun it(i: Double, vararg iX: Double) = mapArguments(i, iX).to { it + 1 } - - expect(it(1.0, 2.0, 3.0, 4.0)) - .first { toBe(2.0) } - .second.asList().containsExactly(3.0, 4.0, 5.0) - } - } - context("Boolean") { - it("without second step") { - fun it(i: Boolean, vararg iX: Boolean) = mapArguments(i, iX) { !it } - - expect(it(true, false, true)) - .first { toBe(false) } - .second.asList().containsExactly(true, false) - } - it("with second step") { - fun it(i: Boolean, vararg iX: Boolean) = mapArguments(i, iX).to { if (it) "a" else "b" } - - expect(it(true, false, false)) - .first { toBe("a") } - .second.asList().containsExactly("b", "b") - } - } - } -}) diff --git a/misc/deprecated/domain/builders/atrium-domain-builders-js/build.gradle b/misc/deprecated/domain/builders/atrium-domain-builders-js/build.gradle index a686d2042..20dcfa8eb 100644 --- a/misc/deprecated/domain/builders/atrium-domain-builders-js/build.gradle +++ b/misc/deprecated/domain/builders/atrium-domain-builders-js/build.gradle @@ -6,6 +6,5 @@ dependencies { // it is up to the consumer of atrium-domain-builders which atrium-translations module is used at runtime compileOnly prefixedProject('translations-en_GB-js') - testImplementation prefixedProject('api-fluent-en_GB-js') testImplementation prefixedProject('specs-js') } diff --git a/misc/deprecated/domain/builders/atrium-domain-builders-js/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/FloatingPointAssertionsBuilder.kt b/misc/deprecated/domain/builders/atrium-domain-builders-js/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/FloatingPointAssertionsBuilder.kt deleted file mode 100644 index 1c500b18b..000000000 --- a/misc/deprecated/domain/builders/atrium-domain-builders-js/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/FloatingPointAssertionsBuilder.kt +++ /dev/null @@ -1,30 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "OVERRIDE_BY_INLINE", "NOTHING_TO_INLINE") - -package ch.tutteli.atrium.domain.builders.creating - -import ch.tutteli.atrium.core.polyfills.loadSingleService -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.domain.creating.FloatingPointAssertions -import ch.tutteli.atrium.domain.creating.floatingPointAssertions - -/** - * Delegates inter alia to the implementation of [FloatingPointAssertions]. - * In detail, it implements [FloatingPointAssertions] by delegating to [floatingPointAssertions] - * which in turn delegates to the implementation via [loadSingleService]. - */ -@Deprecated("Use _logic from ch.tutteli.atrium.logic instead; will be removed with 1.0.0") -actual object FloatingPointAssertionsBuilder : FloatingPointAssertions { - - override inline fun toBeWithErrorTolerance( - subjectProvider: SubjectProvider, - expected: Float, - tolerance: Float - ) = floatingPointAssertions.toBeWithErrorTolerance(subjectProvider, expected, tolerance) - - override inline fun toBeWithErrorTolerance( - subjectProvider: SubjectProvider, - expected: Double, - tolerance: Double - ) = floatingPointAssertions.toBeWithErrorTolerance(subjectProvider, expected, tolerance) -} diff --git a/misc/deprecated/domain/builders/atrium-domain-builders-jvm/build.gradle b/misc/deprecated/domain/builders/atrium-domain-builders-jvm/build.gradle index f272c90f0..e0d719578 100644 --- a/misc/deprecated/domain/builders/atrium-domain-builders-jvm/build.gradle +++ b/misc/deprecated/domain/builders/atrium-domain-builders-jvm/build.gradle @@ -6,18 +6,12 @@ dependencies { // it is up to the consumer of atrium-domain-builders which atrium-translations module is used at runtime compileOnly prefixedProject('translations-en_GB-jvm') - testImplementation prefixedProject('api-fluent-en_GB-jvm') testImplementation prefixedProject('specs-jvm') - - //TODO remove with 1.0.0, only used for FeatureAssertionBuilderName...Spec - testImplementation prefixedProject('api-cc-en_GB-jvm') } //TODO should not be necessary https://youtrack.jetbrains.com/issue/KT-28124 compileTestKotlin.dependsOn( prefixedProject('core-robstoll-jvm').compileKotlin, prefixedProject('core-robstoll-jvm').processResources, - prefixedProject('domain-robstoll-jvm').compileKotlin, - prefixedProject('domain-robstoll-jvm').processResources ) diff --git a/misc/deprecated/domain/builders/atrium-domain-builders-jvm/src/main/kotlin/ch/tutteli/atrium/domain/builders/AssertImpl.kt b/misc/deprecated/domain/builders/atrium-domain-builders-jvm/src/main/kotlin/ch/tutteli/atrium/domain/builders/AssertImpl.kt deleted file mode 100644 index 62804de3d..000000000 --- a/misc/deprecated/domain/builders/atrium-domain-builders-jvm/src/main/kotlin/ch/tutteli/atrium/domain/builders/AssertImpl.kt +++ /dev/null @@ -1,13 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("JAVA_MODULE_DOES_NOT_READ_UNNAMED_MODULE", "DEPRECATION", "DeprecatedCallableAddReplaceWith") - -package ch.tutteli.atrium.domain.builders - -import ch.tutteli.atrium.domain.builders.creating.BigDecimalAssertionsBuilder - -/** - * Bundles different domain objects which are defined by the module atrium-domain-api - * to give users of Atrium a fluent API for the domain as well. - */ -@Deprecated("Use _logic from ch.tutteli.atrium.logic instead; will be removed with 1.0.0") -inline val AssertImpl.bigDecimal get() = BigDecimalAssertionsBuilder diff --git a/misc/deprecated/domain/builders/atrium-domain-builders-jvm/src/main/kotlin/ch/tutteli/atrium/domain/builders/ExpectImpl.kt b/misc/deprecated/domain/builders/atrium-domain-builders-jvm/src/main/kotlin/ch/tutteli/atrium/domain/builders/ExpectImpl.kt deleted file mode 100644 index 72d3c83b7..000000000 --- a/misc/deprecated/domain/builders/atrium-domain-builders-jvm/src/main/kotlin/ch/tutteli/atrium/domain/builders/ExpectImpl.kt +++ /dev/null @@ -1,73 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "DeprecatedCallableAddReplaceWith") -package ch.tutteli.atrium.domain.builders - -import ch.tutteli.atrium.domain.builders.creating.* -import ch.tutteli.atrium.domain.creating.BigDecimalAssertions -import ch.tutteli.atrium.domain.creating.ChronoZonedDateTimeAssertions -import ch.tutteli.atrium.domain.creating.LocalDateAssertions -import ch.tutteli.atrium.domain.creating.OptionalAssertions -import ch.tutteli.atrium.domain.creating.PathAssertions - -/** - * Returns [BigDecimalAssertionsBuilder] - * which inter alia delegates to the implementation of [BigDecimalAssertions]. - */ -@Deprecated("Use _logic from ch.tutteli.atrium.logic instead; will be removed with 1.0.0") -inline val ExpectImpl.bigDecimal get() = BigDecimalAssertionsBuilder - -/** - * Returns [OptionalAssertionsBuilder] - * which inter alia delegates to the implementation of [OptionalAssertions]. - */ -@Deprecated("Use _logic from ch.tutteli.atrium.logic instead; will be removed with 1.0.0") -inline val ExpectImpl.optional get() = OptionalAssertionsBuilder - -/** - * Returns [PathAssertionsBuilder] - * which inter alia delegates to the implementation of [PathAssertions]. - */ -@Deprecated("Use _logic from ch.tutteli.atrium.logic instead; will be removed with 1.0.0") -inline val ExpectImpl.path get() = PathAssertionsBuilder - -/** - * Returns [ChronoLocalDateAssertionsBuilder] - * which inter alia delegates to the implementation of [ChronoLocalDateAssertions]. - */ -@Deprecated("Use _logic from ch.tutteli.atrium.logic instead; will be removed with 1.0.0") -inline val ExpectImpl.chronoLocalDate get() = ChronoLocalDateAssertionsBuilder - -/** - * Returns [ChronoLocalDateTimeAssertionsBuilder] - * which inter alia delegates to the implementation of [ChronoLocalDateTimeAssertions]. - */ -@Deprecated("Use _logic from ch.tutteli.atrium.logic instead; will be removed with 1.0.0") -inline val ExpectImpl.chronoLocalDateTime get() = ChronoLocalDateTimeAssertionsBuilder - -/** - * Returns [ChronoZonedDateTimeAssertionsBuilder] - * which inter alia delegates to the implementation of [ChronoZonedDateTimeAssertions]. - */ -@Deprecated("Use _logic from ch.tutteli.atrium.logic instead; will be removed with 1.0.0") -inline val ExpectImpl.chronoZonedDateTime get() = ChronoZonedDateTimeAssertionsBuilder - -/** - * Returns [LocalDateAssertionsBuilder] - * which inter alia delegates to the implementation of [LocalDateAssertions]. - */ -@Deprecated("Use _logic from ch.tutteli.atrium.logic instead; will be removed with 1.0.0") -inline val ExpectImpl.localDate get() = LocalDateAssertionsBuilder - -/** - * Returns [LocalDateTimeAssertionsBuilder] - * which inter alia delegates to the implementation of [LocalDateTimeAssertionsBuilder]. - */ -@Deprecated("Use _logic from ch.tutteli.atrium.logic instead; will be removed with 1.0.0") -inline val ExpectImpl.localDateTime get() = LocalDateTimeAssertionsBuilder - -/** - * Returns [ZonedDateTimeAssertionsBuilder] - * which inter alia delegates to the implementation of [ZonedDateTimeAssertionsBuilder]. - */ -@Deprecated("Use _logic from ch.tutteli.atrium.logic instead; will be removed with 1.0.0") -inline val ExpectImpl.zonedDateTime get() = ZonedDateTimeAssertionsBuilder diff --git a/misc/deprecated/domain/builders/atrium-domain-builders-jvm/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/BigDecimalAssertionsBuilder.kt b/misc/deprecated/domain/builders/atrium-domain-builders-jvm/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/BigDecimalAssertionsBuilder.kt deleted file mode 100644 index 41e52526f..000000000 --- a/misc/deprecated/domain/builders/atrium-domain-builders-jvm/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/BigDecimalAssertionsBuilder.kt +++ /dev/null @@ -1,39 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress( - "DEPRECATION", - "OVERRIDE_BY_INLINE", - "NOTHING_TO_INLINE", - "JAVA_MODULE_DOES_NOT_READ_UNNAMED_MODULE" /* TODO remove once https://youtrack.jetbrains.com/issue/KT-35343 is fixed */ -) - -package ch.tutteli.atrium.domain.builders.creating - -import ch.tutteli.atrium.core.polyfills.loadSingleService -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.domain.creating.BigDecimalAssertions -import ch.tutteli.atrium.domain.creating.bigDecimalAssertions -import java.math.BigDecimal - -/** - * Delegates inter alia to the implementation of [BigDecimalAssertions]. - * In detail, it implements [BigDecimalAssertions] by delegating to [bigDecimalAssertions] - * which in turn delegates to the implementation via [loadSingleService]. - */ -@Deprecated("Use _logic from ch.tutteli.atrium.logic instead; will be removed with 1.0.0") -object BigDecimalAssertionsBuilder : BigDecimalAssertions { - - override inline fun isNumericallyEqualTo(subjectProvider: SubjectProvider, expected: T) = - bigDecimalAssertions.isNumericallyEqualTo(subjectProvider, expected) - - override inline fun isNotNumericallyEqualTo(subjectProvider: SubjectProvider, expected: T) = - bigDecimalAssertions.isNotNumericallyEqualTo(subjectProvider, expected) - - override inline fun isEqualIncludingScale( - subjectProvider: SubjectProvider, - expected: T, - nameOfIsNumericallyEqualTo: String - ) = bigDecimalAssertions.isEqualIncludingScale(subjectProvider, expected, nameOfIsNumericallyEqualTo) - - override inline fun isNotEqualIncludingScale(subjectProvider: SubjectProvider, expected: T) = - bigDecimalAssertions.isNotEqualIncludingScale(subjectProvider, expected) -} diff --git a/misc/deprecated/domain/builders/atrium-domain-builders-jvm/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/ChronoLocalDateAssertionsBuilder.kt b/misc/deprecated/domain/builders/atrium-domain-builders-jvm/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/ChronoLocalDateAssertionsBuilder.kt deleted file mode 100644 index 659b0a6d8..000000000 --- a/misc/deprecated/domain/builders/atrium-domain-builders-jvm/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/ChronoLocalDateAssertionsBuilder.kt +++ /dev/null @@ -1,39 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress( - "DEPRECATION", - "OVERRIDE_BY_INLINE", - "NOTHING_TO_INLINE", - "JAVA_MODULE_DOES_NOT_READ_UNNAMED_MODULE" /* TODO remove once https://youtrack.jetbrains.com/issue/KT-35343 is fixed */ -) - -package ch.tutteli.atrium.domain.builders.creating - -import ch.tutteli.atrium.core.polyfills.loadSingleService -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.domain.creating.ChronoLocalDateAssertions -import ch.tutteli.atrium.domain.creating.chronoLocalDateAssertions -import java.time.chrono.ChronoLocalDate - -/** - * Delegates inter alia to the implementation of [ChronoLocalDateAssertionsBuilder]. - * In detail, it implements [ChronoLocalDateAssertions] by delegating to [chronoLocalDateAssertions] - * which in turn delegates to the implementation via [loadSingleService]. - */ -@Deprecated("Use _logic from ch.tutteli.atrium.logic instead; will be removed with 1.0.0") -object ChronoLocalDateAssertionsBuilder : ChronoLocalDateAssertions { - - override inline fun isBefore(expect: Expect, expected: ChronoLocalDate) = - chronoLocalDateAssertions.isBefore(expect, expected) - - override inline fun isBeforeOrEquals(expect: Expect, expected: ChronoLocalDate) = - chronoLocalDateAssertions.isBeforeOrEquals(expect, expected) - - override inline fun isAfter(expect: Expect, expected: ChronoLocalDate) = - chronoLocalDateAssertions.isAfter(expect, expected) - - override inline fun isAfterOrEquals(expect: Expect, expected: ChronoLocalDate) = - chronoLocalDateAssertions.isAfterOrEquals(expect, expected) - - override inline fun isEqual(expect: Expect, expected: ChronoLocalDate) = - chronoLocalDateAssertions.isEqual(expect, expected) -} diff --git a/misc/deprecated/domain/builders/atrium-domain-builders-jvm/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/ChronoLocalDateTimeAssertionsBuilder.kt b/misc/deprecated/domain/builders/atrium-domain-builders-jvm/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/ChronoLocalDateTimeAssertionsBuilder.kt deleted file mode 100644 index 0ea364c5d..000000000 --- a/misc/deprecated/domain/builders/atrium-domain-builders-jvm/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/ChronoLocalDateTimeAssertionsBuilder.kt +++ /dev/null @@ -1,50 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress( - "DEPRECATION", - "OVERRIDE_BY_INLINE", - "NOTHING_TO_INLINE", - "JAVA_MODULE_DOES_NOT_READ_UNNAMED_MODULE" /* TODO remove once https://youtrack.jetbrains.com/issue/KT-35343 is fixed */ -) - -package ch.tutteli.atrium.domain.builders.creating - -import ch.tutteli.atrium.core.polyfills.loadSingleService -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.domain.creating.ChronoLocalDateTimeAssertions -import ch.tutteli.atrium.domain.creating.chronoLocalDateTimeAssertions -import java.time.chrono.ChronoLocalDate -import java.time.chrono.ChronoLocalDateTime - -/** - * Delegates inter alia to the implementation of [ChronoLocalDateTimeAssertionsBuilder]. - * In detail, it implements [ChronoLocalDateTimeAssertions] by delegating to [chronoLocalDateTimeAssertions] - * which in turn delegates to the implementation via [loadSingleService]. - */ -@Deprecated("Use _logic from ch.tutteli.atrium.logic instead; will be removed with 1.0.0") -object ChronoLocalDateTimeAssertionsBuilder : ChronoLocalDateTimeAssertions { - - override inline fun > isBefore( - expect: Expect, - expected: ChronoLocalDateTime<*> - ) = chronoLocalDateTimeAssertions.isBefore(expect, expected) - - override inline fun > isBeforeOrEquals( - expect: Expect, - expected: ChronoLocalDateTime<*> - ) = chronoLocalDateTimeAssertions.isBeforeOrEquals(expect, expected) - - override inline fun > isAfter( - expect: Expect, - expected: ChronoLocalDateTime<*> - ) = chronoLocalDateTimeAssertions.isAfter(expect, expected) - - override inline fun > isAfterOrEquals( - expect: Expect, - expected: ChronoLocalDateTime<*> - ) = chronoLocalDateTimeAssertions.isAfterOrEquals(expect, expected) - - override inline fun > isEqual( - expect: Expect, - expected: ChronoLocalDateTime<*> - ) = chronoLocalDateTimeAssertions.isEqual(expect, expected) -} diff --git a/misc/deprecated/domain/builders/atrium-domain-builders-jvm/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/ChronoZonedDateTimeAssertionsBuilder.kt b/misc/deprecated/domain/builders/atrium-domain-builders-jvm/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/ChronoZonedDateTimeAssertionsBuilder.kt deleted file mode 100644 index fa4e92859..000000000 --- a/misc/deprecated/domain/builders/atrium-domain-builders-jvm/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/ChronoZonedDateTimeAssertionsBuilder.kt +++ /dev/null @@ -1,50 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress( - "DEPRECATION", - "OVERRIDE_BY_INLINE", - "NOTHING_TO_INLINE", - "JAVA_MODULE_DOES_NOT_READ_UNNAMED_MODULE" /* TODO remove once https://youtrack.jetbrains.com/issue/KT-35343 is fixed */ -) - -package ch.tutteli.atrium.domain.builders.creating - -import ch.tutteli.atrium.core.polyfills.loadSingleService -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.domain.creating.ChronoZonedDateTimeAssertions -import ch.tutteli.atrium.domain.creating.chronoZonedDateTimeAssertions -import java.time.chrono.ChronoLocalDate -import java.time.chrono.ChronoZonedDateTime - -/** - * Delegates inter alia to the implementation of [ChronoZonedDateTimeAssertionsBuilder]. - * In detail, it implements [ChronoZonedDateTimeAssertions] by delegating to [chronoZonedDateTimeAssertions] - * which in turn delegates to the implementation via [loadSingleService]. - */ -@Deprecated("Use _logic from ch.tutteli.atrium.logic instead; will be removed with 1.0.0") -object ChronoZonedDateTimeAssertionsBuilder : ChronoZonedDateTimeAssertions { - - override inline fun > isBefore( - expect: Expect, - expected: ChronoZonedDateTime<*> - ) = chronoZonedDateTimeAssertions.isBefore(expect, expected) - - override inline fun > isBeforeOrEqual( - expect: Expect, - expected: ChronoZonedDateTime<*> - ) = chronoZonedDateTimeAssertions.isBeforeOrEqual(expect, expected) - - override inline fun > isAfter( - expect: Expect, - expected: ChronoZonedDateTime<*> - ) = chronoZonedDateTimeAssertions.isAfter(expect, expected) - - override inline fun > isAfterOrEqual( - expect: Expect, - expected: ChronoZonedDateTime<*> - ) = chronoZonedDateTimeAssertions.isAfterOrEqual(expect, expected) - - override inline fun > isEqual( - expect: Expect, - expected: ChronoZonedDateTime<*> - ) = chronoZonedDateTimeAssertions.isEqual(expect, expected) -} diff --git a/misc/deprecated/domain/builders/atrium-domain-builders-jvm/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/FloatingPointAssertionsBuilder.kt b/misc/deprecated/domain/builders/atrium-domain-builders-jvm/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/FloatingPointAssertionsBuilder.kt deleted file mode 100644 index 6e0f4cf1d..000000000 --- a/misc/deprecated/domain/builders/atrium-domain-builders-jvm/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/FloatingPointAssertionsBuilder.kt +++ /dev/null @@ -1,42 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress( - "DEPRECATION", - "OVERRIDE_BY_INLINE", - "NOTHING_TO_INLINE", - "JAVA_MODULE_DOES_NOT_READ_UNNAMED_MODULE" /* TODO remove once https://youtrack.jetbrains.com/issue/KT-35343 is fixed */ -) - -package ch.tutteli.atrium.domain.builders.creating - -import ch.tutteli.atrium.core.polyfills.loadSingleService -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.domain.creating.FloatingPointAssertions -import ch.tutteli.atrium.domain.creating.floatingPointAssertions -import java.math.BigDecimal - -/** - * Delegates inter alia to the implementation of [FloatingPointAssertions]. - * In detail, it implements [FloatingPointAssertions] by delegating to [floatingPointAssertions] - * which in turn delegates to the implementation via [loadSingleService]. - */ -@Deprecated("Use _logic from ch.tutteli.atrium.logic instead; will be removed with 1.0.0") -actual object FloatingPointAssertionsBuilder : FloatingPointAssertions { - - override inline fun toBeWithErrorTolerance( - subjectProvider: SubjectProvider, - expected: Float, - tolerance: Float - ) = floatingPointAssertions.toBeWithErrorTolerance(subjectProvider, expected, tolerance) - - override inline fun toBeWithErrorTolerance( - subjectProvider: SubjectProvider, - expected: Double, - tolerance: Double - ) = floatingPointAssertions.toBeWithErrorTolerance(subjectProvider, expected, tolerance) - - override inline fun toBeWithErrorTolerance( - subjectProvider: SubjectProvider, - expected: T, - tolerance: T - ) = floatingPointAssertions.toBeWithErrorTolerance(subjectProvider, expected, tolerance) -} diff --git a/misc/deprecated/domain/builders/atrium-domain-builders-jvm/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/LocalDateAssertionsBuilder.kt b/misc/deprecated/domain/builders/atrium-domain-builders-jvm/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/LocalDateAssertionsBuilder.kt deleted file mode 100644 index a0739d330..000000000 --- a/misc/deprecated/domain/builders/atrium-domain-builders-jvm/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/LocalDateAssertionsBuilder.kt +++ /dev/null @@ -1,35 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress( - "DEPRECATION", - "OVERRIDE_BY_INLINE", - "NOTHING_TO_INLINE", - "JAVA_MODULE_DOES_NOT_READ_UNNAMED_MODULE" /* TODO remove once https://youtrack.jetbrains.com/issue/KT-35343 is fixed */ -) - -package ch.tutteli.atrium.domain.builders.creating - -import ch.tutteli.atrium.core.polyfills.loadSingleService -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.domain.creating.LocalDateAssertions -import ch.tutteli.atrium.domain.creating.localDateAssertions -import java.time.LocalDate - -/** - * Delegates inter alia to the implementation of [LocalDateAssertions]. - * In detail, it implements [LocalDateAssertions] by delegating to [localDateAssertions] - * which in turn delegates to the implementation via [loadSingleService]. - */ -@Deprecated("Use _logic from ch.tutteli.atrium.logic instead; will be removed with 1.0.0") -object LocalDateAssertionsBuilder : LocalDateAssertions { - override inline fun year(expect: Expect) = - localDateAssertions.year(expect) - - override inline fun month(expect: Expect) = - localDateAssertions.month(expect) - - override inline fun day(expect: Expect) = - localDateAssertions.day(expect) - - override inline fun dayOfWeek(expect: Expect) = - localDateAssertions.dayOfWeek(expect) -} diff --git a/misc/deprecated/domain/builders/atrium-domain-builders-jvm/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/LocalDateTimeAssertionsBuilder.kt b/misc/deprecated/domain/builders/atrium-domain-builders-jvm/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/LocalDateTimeAssertionsBuilder.kt deleted file mode 100644 index b1575cc7c..000000000 --- a/misc/deprecated/domain/builders/atrium-domain-builders-jvm/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/LocalDateTimeAssertionsBuilder.kt +++ /dev/null @@ -1,35 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress( - "DEPRECATION", - "OVERRIDE_BY_INLINE", - "NOTHING_TO_INLINE", - "JAVA_MODULE_DOES_NOT_READ_UNNAMED_MODULE" /* TODO remove once https://youtrack.jetbrains.com/issue/KT-35343 is fixed */ -) - -package ch.tutteli.atrium.domain.builders.creating - -import ch.tutteli.atrium.core.polyfills.loadSingleService -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.domain.creating.LocalDateTimeAssertions -import ch.tutteli.atrium.domain.creating.localDateTimeAssertions -import java.time.LocalDateTime - -/** - * Delegates inter alia to the implementation of [LocalDateTimeAssertions]. - * In detail, it implements [LocalDateTimeAssertions] by delegating to [localDateTimeAssertions] - * which in turn delegates to the implementation via [loadSingleService]. - */ -@Deprecated("Use _logic from ch.tutteli.atrium.logic instead; will be removed with 1.0.0") -object LocalDateTimeAssertionsBuilder : LocalDateTimeAssertions { - override inline fun year(expect: Expect) = - localDateTimeAssertions.year(expect) - - override inline fun month(expect: Expect) = - localDateTimeAssertions.month(expect) - - override inline fun day(expect: Expect) = - localDateTimeAssertions.day(expect) - - override inline fun dayOfWeek(expect: Expect) = - localDateTimeAssertions.dayOfWeek(expect) -} diff --git a/misc/deprecated/domain/builders/atrium-domain-builders-jvm/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/OptionalAssertionsBuilder.kt b/misc/deprecated/domain/builders/atrium-domain-builders-jvm/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/OptionalAssertionsBuilder.kt deleted file mode 100644 index 6026b9013..000000000 --- a/misc/deprecated/domain/builders/atrium-domain-builders-jvm/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/OptionalAssertionsBuilder.kt +++ /dev/null @@ -1,31 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress( - "DEPRECATION", - "OVERRIDE_BY_INLINE", - "NOTHING_TO_INLINE", - "JAVA_MODULE_DOES_NOT_READ_UNNAMED_MODULE" /* TODO remove once https://youtrack.jetbrains.com/issue/KT-35343 is fixed */ -) - -package ch.tutteli.atrium.domain.builders.creating - -import ch.tutteli.atrium.core.polyfills.loadSingleService -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.domain.creating.OptionalAssertions -import ch.tutteli.atrium.domain.creating.changers.ExtractedFeaturePostStep -import ch.tutteli.atrium.domain.creating.optionalAssertions -import java.util.* - -/** - * Delegates inter alia to the implementation of [OptionalAssertions]. - * In detail, it implements [OptionalAssertions] by delegating to [optionalAssertions] - * which in turn delegates to the implementation via [loadSingleService]. - */ -@Deprecated("Use _logic from ch.tutteli.atrium.logic instead; will be removed with 1.0.0") -object OptionalAssertionsBuilder : OptionalAssertions { - - override inline fun > isEmpty(expect: Expect) = - optionalAssertions.isEmpty(expect) - - override inline fun > isPresent(expect: Expect): ExtractedFeaturePostStep = - optionalAssertions.isPresent(expect) -} diff --git a/misc/deprecated/domain/builders/atrium-domain-builders-jvm/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/PathAssertionsBuilder.kt b/misc/deprecated/domain/builders/atrium-domain-builders-jvm/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/PathAssertionsBuilder.kt deleted file mode 100644 index ed9e1b6bf..000000000 --- a/misc/deprecated/domain/builders/atrium-domain-builders-jvm/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/PathAssertionsBuilder.kt +++ /dev/null @@ -1,75 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress( - "DEPRECATION", - "OVERRIDE_BY_INLINE", - "NOTHING_TO_INLINE", - "JAVA_MODULE_DOES_NOT_READ_UNNAMED_MODULE" /* TODO remove once https://youtrack.jetbrains.com/issue/KT-35343 is fixed */ -) - -package ch.tutteli.atrium.domain.builders.creating - -import ch.tutteli.atrium.core.polyfills.loadSingleService -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.domain.creating.PathAssertions -import ch.tutteli.atrium.domain.creating.pathAssertions -import java.nio.charset.Charset -import java.nio.file.Path - -/** - * Delegates inter alia to the implementation of [PathAssertions]. - * In detail, it implements [PathAssertions] by delegating to [pathAssertions] - * which in turn delegates to the implementation via [loadSingleService]. - */ -@Deprecated("Use _logic from ch.tutteli.atrium.logic instead; will be removed with 1.0.0") -object PathAssertionsBuilder : PathAssertions { - override inline fun startsWith(expect: Expect, expected: Path) = - pathAssertions.startsWith(expect, expected) - - override inline fun startsNotWith(expect: Expect, expected: Path) = - pathAssertions.startsNotWith(expect, expected) - - override inline fun endsWith(expect: Expect, expected: Path) = - pathAssertions.endsWith(expect, expected) - - override inline fun endsNotWith(expect: Expect, expected: Path) = - pathAssertions.endsNotWith(expect, expected) - - override inline fun exists(expect: Expect) = - pathAssertions.exists(expect) - - override inline fun existsNot(expect: Expect) = - pathAssertions.existsNot(expect) - - override inline fun fileName(expect: Expect) = - pathAssertions.fileName(expect) - - override inline fun extension(expect: Expect) = - pathAssertions.extension(expect) - - override inline fun fileNameWithoutExtension(expect: Expect) = - pathAssertions.fileNameWithoutExtension(expect) - - override inline fun parent(expect: Expect) = - pathAssertions.parent(expect) - - override inline fun resolve(expect: Expect, other: String) = - pathAssertions.resolve(expect, other) - - override inline fun isReadable(expect: Expect) = - pathAssertions.isReadable(expect) - - override inline fun isWritable(expect: Expect) = - pathAssertions.isWritable(expect) - - override inline fun isRegularFile(expect: Expect) = - pathAssertions.isRegularFile(expect) - - override inline fun isDirectory(expect: Expect) = - pathAssertions.isDirectory(expect) - - override inline fun hasSameTextualContentAs(expect: Expect, targetPath: Path, sourceCharset: Charset, targetCharset: Charset) = - pathAssertions.hasSameTextualContentAs(expect, targetPath, sourceCharset, targetCharset) - - override inline fun hasSameBinaryContentAs(expect: Expect, targetPath: Path) = - pathAssertions.hasSameBinaryContentAs(expect, targetPath) -} diff --git a/misc/deprecated/domain/builders/atrium-domain-builders-jvm/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/ZonedDateTimeAssertionsBuilder.kt b/misc/deprecated/domain/builders/atrium-domain-builders-jvm/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/ZonedDateTimeAssertionsBuilder.kt deleted file mode 100644 index 4ff8f68e0..000000000 --- a/misc/deprecated/domain/builders/atrium-domain-builders-jvm/src/main/kotlin/ch/tutteli/atrium/domain/builders/creating/ZonedDateTimeAssertionsBuilder.kt +++ /dev/null @@ -1,35 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress( - "DEPRECATION", - "OVERRIDE_BY_INLINE", - "NOTHING_TO_INLINE", - "JAVA_MODULE_DOES_NOT_READ_UNNAMED_MODULE" /* TODO remove once https://youtrack.jetbrains.com/issue/KT-35343 is fixed */ -) - -package ch.tutteli.atrium.domain.builders.creating - -import ch.tutteli.atrium.core.polyfills.loadSingleService -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.domain.creating.ZonedDateTimeAssertions -import ch.tutteli.atrium.domain.creating.zonedDateTimeAssertions -import java.time.ZonedDateTime - -/** - * Delegates inter alia to the implementation of [ZonedDateTimeAssertions]. - * In detail, it implements [ZonedDateTimeAssertions] by delegating to [zonedDateTimeAssertions] - * which in turn delegates to the implementation via [loadSingleService]. - */ -@Deprecated("Use _logic from ch.tutteli.atrium.logic instead; will be removed with 1.0.0") -object ZonedDateTimeAssertionsBuilder : ZonedDateTimeAssertions { - override inline fun year(expect: Expect) = - zonedDateTimeAssertions.year(expect) - - override inline fun month(expect: Expect) = - zonedDateTimeAssertions.month(expect) - - override inline fun day(expect: Expect) = - zonedDateTimeAssertions.day(expect) - - override inline fun dayOfWeek(expect: Expect) = - zonedDateTimeAssertions.dayOfWeek(expect) -} diff --git a/misc/deprecated/domain/builders/atrium-domain-builders-jvm/src/module/module-info.java b/misc/deprecated/domain/builders/atrium-domain-builders-jvm/src/module/module-info.java index 67d6445f8..2b551126b 100644 --- a/misc/deprecated/domain/builders/atrium-domain-builders-jvm/src/module/module-info.java +++ b/misc/deprecated/domain/builders/atrium-domain-builders-jvm/src/module/module-info.java @@ -4,14 +4,8 @@ module ch.tutteli.atrium.domain.builders { requires static ch.tutteli.atrium.translations.en_GB; requires kotlin.stdlib; - exports ch.tutteli.atrium.domain.builders; exports ch.tutteli.atrium.domain.builders.creating; - exports ch.tutteli.atrium.domain.builders.creating.basic.contains; - exports ch.tutteli.atrium.domain.builders.creating.changers; - exports ch.tutteli.atrium.domain.builders.creating.charsequence.contains.builders; exports ch.tutteli.atrium.domain.builders.creating.collectors; - exports ch.tutteli.atrium.domain.builders.creating.iterable.contains.builders; - exports ch.tutteli.atrium.domain.builders.migration; exports ch.tutteli.atrium.domain.builders.reporting; exports ch.tutteli.atrium.domain.builders.utils; diff --git a/misc/deprecated/domain/builders/atrium-domain-builders-jvm/src/test/kotlin/ch/tutteli/atrium/domain/builders/creating/FeatureAssertionsBuilderNameRepresentationSpec.kt b/misc/deprecated/domain/builders/atrium-domain-builders-jvm/src/test/kotlin/ch/tutteli/atrium/domain/builders/creating/FeatureAssertionsBuilderNameRepresentationSpec.kt deleted file mode 100644 index 12285b788..000000000 --- a/misc/deprecated/domain/builders/atrium-domain-builders-jvm/src/test/kotlin/ch/tutteli/atrium/domain/builders/creating/FeatureAssertionsBuilderNameRepresentationSpec.kt +++ /dev/null @@ -1,106 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") - -package ch.tutteli.atrium.domain.builders.creating - -import ch.tutteli.atrium.api.cc.en_GB.contains -import ch.tutteli.atrium.api.cc.en_GB.notToBeNull -import ch.tutteli.atrium.api.cc.en_GB.toBe -import ch.tutteli.atrium.verbs.internal.AssertionVerbFactory -import ch.tutteli.atrium.domain.builders.creating.FeatureAssertionsBuilder.property -import ch.tutteli.atrium.domain.builders.creating.FeatureAssertionsBuilder.returnValueOf0 -import ch.tutteli.atrium.domain.builders.creating.FeatureAssertionsBuilder.returnValueOf1 -import ch.tutteli.atrium.domain.builders.creating.FeatureAssertionsBuilder.returnValueOf2 -import ch.tutteli.atrium.domain.builders.creating.FeatureAssertionsBuilder.returnValueOf3 -import ch.tutteli.atrium.domain.builders.creating.FeatureAssertionsBuilder.returnValueOf4 -import ch.tutteli.atrium.domain.builders.creating.FeatureAssertionsBuilder.returnValueOf5 -import ch.tutteli.atrium.reporting.translating.Untranslatable - - -//TODO remove with 1.0.0 - no need to migrate to Spek2 -class FeatureAssertionsBuilderNameRepresentationSpec : ch.tutteli.atrium.spec.integration.FeatureAssertionsSpec( - AssertionVerbFactory, - propertyImmediate, - propertyLazy, - return0ValueImmediate, - return1ValueImmediate, - return2ValueImmediate, - return3ValueImmediate, - return4ValueImmediate, - return5ValueImmediate, - return0ValueLazy, - return1ValueLazy, - return2ValueLazy, - return3ValueLazy, - return4ValueLazy, - return5ValueLazy, - - propertyNullableDoesNotHold, - return0ValueNullableDoesNotHold, - return1ValueNullableDoesNotHold, - return2ValueNullableDoesNotHold, - return3ValueNullableDoesNotHold, - return4ValueNullableDoesNotHold, - return5ValueNullableDoesNotHold, - - propertyNullableHolds, - return0ValueNullableHolds, - return1ValueNullableHolds, - return2ValueNullableHolds, - return3ValueNullableHolds, - return4ValueNullableHolds, - return5ValueNullableHolds, - - propertyLazyWithNestedImmediate, - propertyLazyWithNestedLazy, - representationProvider() -) { - - @Suppress("DEPRECATION" /* feature mechanism shown here is obsolete and will be removed with 1.0.0 */) - companion object { - val representationProvider = { "own representation" } - val propertyImmediate: F = { property(this, { subject.description }, representationProvider, Untranslatable("description")).contains("hello") } - val propertyLazy: F = { property(this, { subject.description }, representationProvider, Untranslatable("description")) { contains("hello") } } - val return0ValueImmediate: F = { returnValueOf0(this, { subject.return0() }, representationProvider, "return0").contains("hello") } - val return1ValueImmediate: F = { returnValueOf1(this, {a1 -> subject.return1(a1) }, "a", representationProvider, "return1").contains("hello") } - val return2ValueImmediate: F = { returnValueOf2(this, {a1, a2 -> subject.return2(a1, a2) }, "a", 1, representationProvider, "return2").contains("hello") } - val return3ValueImmediate: F = { returnValueOf3(this, {a1, a2, a3 -> subject.return3(a1, a2, a3) }, "a", 1, true, representationProvider, "return3").contains("hello") } - val return4ValueImmediate: F = { returnValueOf4(this, {a1, a2, a3, a4 -> subject.return4(a1, a2, a3, a4) }, "a", 1, true, 1.2, representationProvider, "return4").contains("hello") } - val return5ValueImmediate: F = { returnValueOf5(this, {a1, a2, a3, a4, a5 -> subject.return5(a1, a2, a3, a4, a5) }, "a", 1, true, 1.2, 'b', representationProvider, "return5").contains("hello") } - val return0ValueLazy: F = { returnValueOf0(this, { subject.return0() }, representationProvider, "return0") { contains("hello") } } - val return1ValueLazy: F = { returnValueOf1(this, {a1 -> subject.return1(a1) }, "a", representationProvider, "return1") { contains("hello") } } - val return2ValueLazy: F = { returnValueOf2(this, {a1, a2 -> subject.return2(a1, a2) }, "a", 1, representationProvider, "return2") { contains("hello") } } - val return3ValueLazy: F = { returnValueOf3(this, {a1, a2, a3 -> subject.return3(a1, a2, a3) }, "a", 1, true, representationProvider, "return3") { contains("hello") } } - val return4ValueLazy: F = { returnValueOf4(this, {a1, a2, a3, a4 -> subject.return4(a1, a2, a3, a4) }, "a", 1, true, 1.2, representationProvider, "return4") { contains("hello") } } - val return5ValueLazy: F = { returnValueOf5(this, {a1, a2, a3, a4, a5 -> subject.return5(a1, a2, a3, a4, a5) }, "a", 1, true, 1.2, 'b', representationProvider, "return5") { contains("hello") } } - - //TODO get rid of l if https://youtrack.jetbrains.com/issue/KT-23768 is fixed - val propertyNullableDoesNotHold: F = { val l = { subject.nullableValue }; property(this, l, representationProvider, Untranslatable("nullableValue")).toBe(null) } - val return0ValueNullableDoesNotHold: F = { val l = { subject.returnNullable0() }; returnValueOf0(this, l, representationProvider, "returnNullable0").toBe(null) } - val return1ValueNullableDoesNotHold: F = { val l: (String) -> Int? = {a1 -> subject.returnNullable1(a1) }; returnValueOf1(this, l, "a", representationProvider, "returnNullable1").toBe(null) } - val return2ValueNullableDoesNotHold: F = { val l: (String, Int) -> Int? = {a1, a2 -> subject.returnNullable2(a1, a2) }; returnValueOf2(this, l, "a", 1, representationProvider, "returnNullable2").toBe(null) } - val return3ValueNullableDoesNotHold: F = { val l: (String, Int, Boolean) -> Int? = {a1, a2, a3 -> subject.returnNullable3(a1, a2, a3) }; returnValueOf3(this, l, "a", 1, true, representationProvider, "returnNullable3").toBe(null) } - val return4ValueNullableDoesNotHold: F = { val l: (String, Int, Boolean, Double) -> Int? = {a1, a2, a3, a4 -> subject.returnNullable4(a1, a2, a3, a4) }; returnValueOf4(this, l, "a", 1, true, 1.2, representationProvider, "returnNullable4").toBe(null) } - val return5ValueNullableDoesNotHold: F = { val l: (String, Int, Boolean, Double, Char) -> Int? = {a1, a2, a3, a4, a5 -> subject.returnNullable5(a1, a2, a3, a4, a5) }; returnValueOf5(this, l, "a", 1, true, 1.2, 'b', representationProvider, "returnNullable5").toBe(null) } - - //TODO get rid of l if https://youtrack.jetbrains.com/issue/KT-23768 is fixed - val propertyNullableHolds: F = { val l = { subject.nullableValue }; property(this, l, representationProvider, Untranslatable("nullableValue")).notToBeNull {} } - val return0ValueNullableHolds: F = { val l = { subject.returnNullable0() }; returnValueOf0(this, l, representationProvider, "returnNullable0").notToBeNull {} } - val return1ValueNullableHolds: F = { val l: (String) -> Int? = {a1 -> subject.returnNullable1(a1) }; returnValueOf1(this, l, "a", representationProvider, "returnNullable1").notToBeNull {} } - val return2ValueNullableHolds: F = { val l: (String, Int) -> Int? = {a1, a2 -> subject.returnNullable2(a1, a2) }; returnValueOf2(this, l, "a", 1, representationProvider, "returnNullable2").notToBeNull {} } - val return3ValueNullableHolds: F = { val l: (String, Int, Boolean) -> Int? = {a1, a2, a3 -> subject.returnNullable3(a1, a2, a3) }; returnValueOf3(this, l, "a", 1, true, representationProvider, "returnNullable3").notToBeNull {} } - val return4ValueNullableHolds: F = { val l: (String, Int, Boolean, Double) -> Int? = {a1, a2, a3, a4 -> subject.returnNullable4(a1, a2, a3, a4) }; returnValueOf4(this, l, "a", 1, true, 1.2, representationProvider, "returnNullable4").notToBeNull {} } - val return5ValueNullableHolds: F = { val l: (String, Int, Boolean, Double, Char) -> Int? = {a1, a2, a3, a4, a5 -> subject.returnNullable5(a1, a2, a3, a4, a5) }; returnValueOf5(this, l, "a", 1, true, 1.2, 'b', representationProvider, "returnNullable5").notToBeNull {} } - - val propertyLazyWithNestedImmediate: F = { - property(this, { subject.description }, representationProvider, Untranslatable("description")) { - property(this, String::length).toBe(12) - } - } - val propertyLazyWithNestedLazy: F = { - property(this, { subject.description }, representationProvider, Untranslatable("description")) { - property(this, String::length) { toBe(12) } - } - } - } -} diff --git a/misc/deprecated/domain/builders/atrium-domain-builders-jvm/src/test/kotlin/ch/tutteli/atrium/domain/builders/creating/FeatureAssertionsBuilderNameSpec.kt b/misc/deprecated/domain/builders/atrium-domain-builders-jvm/src/test/kotlin/ch/tutteli/atrium/domain/builders/creating/FeatureAssertionsBuilderNameSpec.kt deleted file mode 100644 index d53808b06..000000000 --- a/misc/deprecated/domain/builders/atrium-domain-builders-jvm/src/test/kotlin/ch/tutteli/atrium/domain/builders/creating/FeatureAssertionsBuilderNameSpec.kt +++ /dev/null @@ -1,108 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") - -package ch.tutteli.atrium.domain.builders.creating - -import ch.tutteli.atrium.api.cc.en_GB.contains -import ch.tutteli.atrium.api.cc.en_GB.notToBeNull -import ch.tutteli.atrium.api.cc.en_GB.toBe -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.verbs.internal.AssertionVerbFactory -import ch.tutteli.atrium.domain.builders.creating.FeatureAssertionsBuilder.property -import ch.tutteli.atrium.domain.builders.creating.FeatureAssertionsBuilder.returnValueOf0 -import ch.tutteli.atrium.domain.builders.creating.FeatureAssertionsBuilder.returnValueOf1 -import ch.tutteli.atrium.domain.builders.creating.FeatureAssertionsBuilder.returnValueOf2 -import ch.tutteli.atrium.domain.builders.creating.FeatureAssertionsBuilder.returnValueOf3 -import ch.tutteli.atrium.domain.builders.creating.FeatureAssertionsBuilder.returnValueOf4 -import ch.tutteli.atrium.domain.builders.creating.FeatureAssertionsBuilder.returnValueOf5 -import ch.tutteli.atrium.reporting.translating.Untranslatable -import ch.tutteli.atrium.spec.integration.TestData - -internal typealias F = AssertionPlant.() -> Unit - -//TODO remove with 1.0.0 - no need to migrate to Spek2 -class FeatureAssertionsBuilderNameSpec : ch.tutteli.atrium.spec.integration.FeatureAssertionsSpec( - AssertionVerbFactory, - propertyImmediate, - propertyLazy, - return0ValueImmediate, - return1ValueImmediate, - return2ValueImmediate, - return3ValueImmediate, - return4ValueImmediate, - return5ValueImmediate, - return0ValueLazy, - return1ValueLazy, - return2ValueLazy, - return3ValueLazy, - return4ValueLazy, - return5ValueLazy, - - propertyNullableDoesNotHold, - return0ValueNullableDoesNotHold, - return1ValueNullableDoesNotHold, - return2ValueNullableDoesNotHold, - return3ValueNullableDoesNotHold, - return4ValueNullableDoesNotHold, - return5ValueNullableDoesNotHold, - - propertyNullableHolds, - return0ValueNullableHolds, - return1ValueNullableHolds, - return2ValueNullableHolds, - return3ValueNullableHolds, - return4ValueNullableHolds, - return5ValueNullableHolds, - - propertyLazyWithNestedImmediate, - propertyLazyWithNestedLazy -) { - - @Suppress("DEPRECATION" /* feature mechanism shown here is obsolete and will be removed with 1.0.0 */) - companion object { - val propertyImmediate: F = { property(this, { subject.description }, Untranslatable("description")).contains("hello") } - val propertyLazy: F = { property(this, { subject.description }, Untranslatable("description")) { contains("hello") } } - val return0ValueImmediate: F = { returnValueOf0(this, { subject.return0() }, "return0").contains("hello") } - val return1ValueImmediate: F = { returnValueOf1(this, {a1 -> subject.return1(a1) }, "a", "return1").contains("hello") } - val return2ValueImmediate: F = { returnValueOf2(this, {a1, a2 -> subject.return2(a1, a2) }, "a", 1, "return2").contains("hello") } - val return3ValueImmediate: F = { returnValueOf3(this, {a1, a2, a3 -> subject.return3(a1, a2, a3) }, "a", 1, true, "return3").contains("hello") } - val return4ValueImmediate: F = { returnValueOf4(this, {a1, a2, a3, a4 -> subject.return4(a1, a2, a3, a4) }, "a", 1, true, 1.2, "return4").contains("hello") } - val return5ValueImmediate: F = { returnValueOf5(this, {a1, a2, a3, a4, a5 -> subject.return5(a1, a2, a3, a4, a5) }, "a", 1, true, 1.2, 'b', "return5").contains("hello") } - val return0ValueLazy: F = { returnValueOf0(this, { subject.return0() }, "return0") { contains("hello") } } - val return1ValueLazy: F = { returnValueOf1(this, {a1 -> subject.return1(a1) }, "a", "return1") { contains("hello") } } - val return2ValueLazy: F = { returnValueOf2(this, {a1, a2 -> subject.return2(a1, a2) }, "a", 1, "return2") { contains("hello") } } - val return3ValueLazy: F = { returnValueOf3(this, {a1, a2, a3 -> subject.return3(a1, a2, a3) }, "a", 1, true, "return3") { contains("hello") } } - val return4ValueLazy: F = { returnValueOf4(this, {a1, a2, a3, a4 -> subject.return4(a1, a2, a3, a4) }, "a", 1, true, 1.2, "return4") { contains("hello") } } - val return5ValueLazy: F = { returnValueOf5(this, {a1, a2, a3, a4, a5 -> subject.return5(a1, a2, a3, a4, a5) }, "a", 1, true, 1.2, 'b', "return5") { contains("hello") } } - - //TODO get rid of l if https://youtrack.jetbrains.com/issue/KT-23768 is fixed - val propertyNullableDoesNotHold: F = { val l = { subject.nullableValue }; property(this, l, Untranslatable("nullableValue")).toBe(null) } - val return0ValueNullableDoesNotHold: F = { val l = { subject.returnNullable0() }; returnValueOf0(this, l, "returnNullable0").toBe(null) } - val return1ValueNullableDoesNotHold: F = { val l: (String) -> Int? = {a1 -> subject.returnNullable1(a1) }; returnValueOf1(this, l, "a", "returnNullable1").toBe(null) } - val return2ValueNullableDoesNotHold: F = { val l: (String, Int) -> Int? = {a1, a2 -> subject.returnNullable2(a1, a2) }; returnValueOf2(this, l, "a", 1, "returnNullable2").toBe(null) } - val return3ValueNullableDoesNotHold: F = { val l: (String, Int, Boolean) -> Int? = {a1, a2, a3 -> subject.returnNullable3(a1, a2, a3) }; returnValueOf3(this, l, "a", 1, true, "returnNullable3").toBe(null) } - val return4ValueNullableDoesNotHold: F = { val l: (String, Int, Boolean, Double) -> Int? = {a1, a2, a3, a4 -> subject.returnNullable4(a1, a2, a3, a4) }; returnValueOf4(this, l, "a", 1, true, 1.2, "returnNullable4").toBe(null) } - val return5ValueNullableDoesNotHold: F = { val l: (String, Int, Boolean, Double, Char) -> Int? = {a1, a2, a3, a4, a5 -> subject.returnNullable5(a1, a2, a3, a4, a5) }; returnValueOf5(this, l, "a", 1, true, 1.2, 'b', "returnNullable5").toBe(null) } - - //TODO get rid of l if https://youtrack.jetbrains.com/issue/KT-23768 is fixed - val propertyNullableHolds: F = { val l = { subject.nullableValue }; property(this, l, Untranslatable("nullableValue")).notToBeNull {} } - val return0ValueNullableHolds: F = { val l = { subject.returnNullable0() }; returnValueOf0(this, l, "returnNullable0").notToBeNull {} } - val return1ValueNullableHolds: F = { val l: (String) -> Int? = {a1 -> subject.returnNullable1(a1) }; returnValueOf1(this, l, "a", "returnNullable1").notToBeNull {} } - val return2ValueNullableHolds: F = { val l: (String, Int) -> Int? = {a1, a2 -> subject.returnNullable2(a1, a2) }; returnValueOf2(this, l, "a", 1, "returnNullable2").notToBeNull {} } - val return3ValueNullableHolds: F = { val l: (String, Int, Boolean) -> Int? = {a1, a2, a3 -> subject.returnNullable3(a1, a2, a3) }; returnValueOf3(this, l, "a", 1, true, "returnNullable3").notToBeNull {} } - val return4ValueNullableHolds: F = { val l: (String, Int, Boolean, Double) -> Int? = {a1, a2, a3, a4 -> subject.returnNullable4(a1, a2, a3, a4) }; returnValueOf4(this, l, "a", 1, true, 1.2, "returnNullable4").notToBeNull {} } - val return5ValueNullableHolds: F = { val l: (String, Int, Boolean, Double, Char) -> Int? = {a1, a2, a3, a4, a5 -> subject.returnNullable5(a1, a2, a3, a4, a5) }; returnValueOf5(this, l, "a", 1, true, 1.2, 'b', "returnNullable5").notToBeNull {} } - - - val propertyLazyWithNestedImmediate: F = { - property(this, { subject.description }, Untranslatable("description")) { - property(this, String::length).toBe(12) - } - } - val propertyLazyWithNestedLazy: F = { - property(this, { subject.description }, Untranslatable("description")) { - property(this, String::length) { toBe(12) } - } - } - } -} diff --git a/misc/deprecated/domain/builders/atrium-domain-builders-jvm/src/test/kotlin/ch/tutteli/atrium/domain/builders/utils/NullableSpec.kt b/misc/deprecated/domain/builders/atrium-domain-builders-jvm/src/test/kotlin/ch/tutteli/atrium/domain/builders/utils/NullableSpec.kt deleted file mode 100644 index 73bbe83b1..000000000 --- a/misc/deprecated/domain/builders/atrium-domain-builders-jvm/src/test/kotlin/ch/tutteli/atrium/domain/builders/utils/NullableSpec.kt +++ /dev/null @@ -1,165 +0,0 @@ -//TODO remove with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.domain.builders.utils - -import ch.tutteli.atrium.api.fluent.en_GB.* -import ch.tutteli.atrium.api.verbs.internal.expect -import ch.tutteli.atrium.specs.describeFunTemplate -import ch.tutteli.atrium.specs.toBeDescr -import ch.tutteli.atrium.translations.DescriptionAnyAssertion -import org.spekframework.spek2.Spek -import org.spekframework.spek2.style.specification.Suite -import kotlin.reflect.KFunction1 - -object NullableSpec : Spek({ - //TODO use function reference directly once https://youtrack.jetbrains.com/issue/KT-24606 is fixed - val t: (Int) -> Int? = ::nullable - val nullableFun: KFunction1 = t as KFunction1 - val t2: (Iterable) -> Iterable = ::nullableContainer - val nullableContainerFun: KFunction1, Iterable> = - t2 as KFunction1, Iterable> - val t3: (Map) -> Map = ::nullableValueMap - val nullableValueMapFun: KFunction1, Map> = - t3 as KFunction1, Map> - val t4: (Map) -> Map = ::nullableKeyMap - val nullableKeyMapFun: KFunction1, Map> = - t4 as KFunction1, Map> - val t5: (Map) -> Map = ::nullableKeyValueMap - val nullableKeyValueMapFun: KFunction1, Map> = - t5 as KFunction1, Map> - - fun describeFun(vararg funName: String, body: Suite.() -> Unit) = - describeFunTemplate("", funName, body = body) - - val testee = Test() - - describeFun(nullableFun.name) { - it("can be applied to String!") { - expect(nullable(testee.string)).toBe(null) - } - - context("can be usd in feature assertions") { - it("for a method with 0 arguments") { - expect(testee) { - feature { f(nullable(it::arg0)) }.toBe(0) - } - } - it("for a method with 1 arguments") { - expect(testee) { - feature { f(nullable(testee::arg1), 1) }.toBe(1) - } - } - it("for a method with 2 arguments") { - expect(testee) { - feature { f(nullable(testee::arg2), 1, 2) }.toBe(2) - } - } - it("for a method with 3 arguments") { - expect(testee) { - feature { f(nullable(testee::arg3), 1, 2, 3) }.toBe(3) - } - } - it("for a method with 4 arguments") { - expect(testee) { - feature { f(nullable(testee::arg4), 1, 2, 3, 4) }.toBe(4) - } - } - it("for a method with 5 arguments") { - expect(testee) { - feature { f(nullable(testee::arg5), 1, 2, 3, 4, 5) }.toBe(5) - } - } - } - } - - describeFun(nullableContainerFun.name) { - context("(Mutable)List!") { - it("can be applied to it") { - expect(nullableContainer(testee.strings)).contains(null) - } - it("can be combined with ${nullableFun.name}") { - expect(nullable(nullableContainer(testee.strings))).notToBeNull { - contains(null, "hello") - } - } - } - - context("Array!") { - it("can be applied to it") { - expect(nullableContainer(testee.stringArray)).asList().contains(null) - } - it("can be combined with ${nullableFun.name}") { - expect(nullable(nullableContainer(testee.stringArray))).notToBeNull { - asList().contains(null, "hello") - } - } - } - } - - describeFun(nullableKeyMapFun.name) { - it("can be applied to a (Mutable)Map!") { - expect(nullableKeyMap(testee.numbersWithString)).getExisting(2) { - toBe("hello") - } - } - it("throws if the value was actually null") { - expect { - expect(nullableKeyMap(testee.numbersWithString)).getExisting(1).toBe("a") - }.toThrow { messageContains("get(1): null", "equals: \"a\"") } - } - it("can pass `null` as key") { - expect(nullableKeyMap(testee.numbersWithString)[null]).toBe("tada") - } - - it("can be combined with ${nullableFun.name}") { - expect(nullable(nullableKeyMap(testee.numbersWithString))).notToBeNull { - feature { f(it::get, 0) }.toBe(null) - } - } - } - - describeFun(nullableValueMapFun.name) { - it("can be applied to a (Mutable)Map!") { - expect(nullableValueMap(testee.numbersWithString)).getExisting(1).toBe(null) - expect { - expect(nullableValueMap(testee.numbersWithString)).getExisting(1).toBe("test") - }.toThrow { - messageContains( - "get(1): null", - "$toBeDescr: \"test\"" - ) - } - - } - it("can be combined with ${nullableFun.name}") { - expect(nullable(nullableValueMap(testee.numbersWithString))).notToBeNull { - feature { f(it::get, 0) }.toBe(null) - } - } - } - - describeFun(nullableKeyValueMapFun.name) { - it("can be applied to a (Mutable)Map!") { - expect(nullableKeyValueMap(testee.numbersWithString)).getExisting(1).toBe(null) - expect { - expect(nullableKeyValueMap(testee.numbersWithString)).getExisting(1).toBe("hello") - }.toThrow { - messageContains( - "get(1): null", - "$toBeDescr: \"hello\"" - ) - } - } - - it("can pass `null` as key") { - expect(nullableKeyMap(testee.numbersWithString)).getExisting(null).toBe("tada") - } - - it("can be combined with ${nullableFun.name}") { - expect(nullable(nullableKeyValueMap(testee.numbersWithString))).notToBeNull { - feature { f(it::get, 0) }.toBe(null) - } - } - } -}) diff --git a/misc/deprecated/domain/builders/extensions/kotlin_1_3/atrium-domain-builders-kotlin_1_3-common/build.gradle b/misc/deprecated/domain/builders/extensions/kotlin_1_3/atrium-domain-builders-kotlin_1_3-common/build.gradle deleted file mode 100644 index b7354baaa..000000000 --- a/misc/deprecated/domain/builders/extensions/kotlin_1_3/atrium-domain-builders-kotlin_1_3-common/build.gradle +++ /dev/null @@ -1,12 +0,0 @@ -description = 'Kotlin 1.3 specific extension for domain-builders-common -- will be merged into domain-builders-common with 1.0.0' - -dependencies { - api prefixedProject('domain-builders-common') - api prefixedProject('domain-api-kotlin_1_3-common') - - // it is up to the consumer of atrium-domain-builders which atrium-translations module is used at runtime - compileOnly prefixedProject('translations-en_GB-common') - - testImplementation prefixedProject('api-fluent-en_GB-common') - testImplementation prefixedProject('specs-common') -} diff --git a/misc/deprecated/domain/builders/extensions/kotlin_1_3/atrium-domain-builders-kotlin_1_3-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/kotlin_1_3/ExpectImplExtensions.kt b/misc/deprecated/domain/builders/extensions/kotlin_1_3/atrium-domain-builders-kotlin_1_3-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/kotlin_1_3/ExpectImplExtensions.kt deleted file mode 100644 index be64d1b26..000000000 --- a/misc/deprecated/domain/builders/extensions/kotlin_1_3/atrium-domain-builders-kotlin_1_3-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/kotlin_1_3/ExpectImplExtensions.kt +++ /dev/null @@ -1,14 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "DeprecatedCallableAddReplaceWith") -package ch.tutteli.atrium.domain.builders.kotlin_1_3 - -import ch.tutteli.atrium.domain.builders.ExpectImpl -import ch.tutteli.atrium.domain.builders.kotlin_1_3.creating.ResultAssertionsBuilder -import ch.tutteli.atrium.domain.kotlin_1_3.creating.ResultAssertions - -/** - * Returns [ResultAssertionsBuilder] - * which inter alia delegates to the implementation of [ResultAssertions]. - */ -@Deprecated("Use _logic from ch.tutteli.atrium.logic instead; will be removed with 1.0.0") -inline val ExpectImpl.result get() = ResultAssertionsBuilder diff --git a/misc/deprecated/domain/builders/extensions/kotlin_1_3/atrium-domain-builders-kotlin_1_3-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/kotlin_1_3/creating/ResultAssertionsBuilder.kt b/misc/deprecated/domain/builders/extensions/kotlin_1_3/atrium-domain-builders-kotlin_1_3-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/kotlin_1_3/creating/ResultAssertionsBuilder.kt deleted file mode 100644 index 6b16ab5b8..000000000 --- a/misc/deprecated/domain/builders/extensions/kotlin_1_3/atrium-domain-builders-kotlin_1_3-common/src/main/kotlin/ch/tutteli/atrium/domain/builders/kotlin_1_3/creating/ResultAssertionsBuilder.kt +++ /dev/null @@ -1,26 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "OVERRIDE_BY_INLINE", "NOTHING_TO_INLINE") - -package ch.tutteli.atrium.domain.builders.kotlin_1_3.creating - -import ch.tutteli.atrium.core.polyfills.loadSingleService -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.domain.creating.changers.ExtractedFeaturePostStep -import ch.tutteli.atrium.domain.kotlin_1_3.creating.ResultAssertions -import ch.tutteli.atrium.domain.kotlin_1_3.creating.resultAssertions -import kotlin.reflect.KClass - -/** - * Delegates inter alia to the implementation of [ResultAssertions]. - * In detail, it implements [ResultAssertions] by delegating to [resultAssertions] - * which in turn delegates to the implementation via [loadSingleService]. - */ -@Deprecated("Use _logic from ch.tutteli.atrium.logic instead; will be removed with 1.0.0") -object ResultAssertionsBuilder : ResultAssertions { - - override inline fun > isSuccess(expect: Expect): ExtractedFeaturePostStep = - resultAssertions.isSuccess(expect) - - override fun isFailure(expect: Expect>, expectedType: KClass) = - resultAssertions.isFailure(expect, expectedType) -} diff --git a/misc/deprecated/domain/builders/extensions/kotlin_1_3/atrium-domain-builders-kotlin_1_3-js/build.gradle b/misc/deprecated/domain/builders/extensions/kotlin_1_3/atrium-domain-builders-kotlin_1_3-js/build.gradle deleted file mode 100644 index 6e1b302a2..000000000 --- a/misc/deprecated/domain/builders/extensions/kotlin_1_3/atrium-domain-builders-kotlin_1_3-js/build.gradle +++ /dev/null @@ -1,12 +0,0 @@ -description = 'Kotlin 1.3 specific extension for domain-builders-js -- will be merged into domain-builders-js with 1.0.0' - -dependencies { - api prefixedProject('domain-builders-js') - api prefixedProject('domain-api-kotlin_1_3-js') - - // it is up to the consumer of atrium-domain-builders which atrium-translations module is used at runtime - compileOnly prefixedProject('translations-en_GB-js') - - testImplementation prefixedProject('api-fluent-en_GB-js') - testImplementation prefixedProject('specs-js') -} diff --git a/misc/deprecated/domain/builders/extensions/kotlin_1_3/atrium-domain-builders-kotlin_1_3-jvm/build.gradle b/misc/deprecated/domain/builders/extensions/kotlin_1_3/atrium-domain-builders-kotlin_1_3-jvm/build.gradle deleted file mode 100644 index b916eb596..000000000 --- a/misc/deprecated/domain/builders/extensions/kotlin_1_3/atrium-domain-builders-kotlin_1_3-jvm/build.gradle +++ /dev/null @@ -1,21 +0,0 @@ -description = 'Kotlin 1.3 specific extension for domain-builders-jvm -- will be merged into domain-builders-jvm with 1.0.0' - -dependencies { - api prefixedProject('domain-builders-jvm') - api prefixedProject('domain-api-kotlin_1_3-jvm') - - // it is up to the consumer of atrium-domain-builders which atrium-translations module is used at runtime - compileOnly prefixedProject('translations-en_GB-jvm') - - testImplementation prefixedProject('api-fluent-en_GB-jvm') - testImplementation prefixedProject('specs-jvm') -} - -//TODO should not be necessary https://youtrack.jetbrains.com/issue/KT-28124 -compileTestKotlin.dependsOn( - prefixedProject('core-robstoll-jvm').compileKotlin, - prefixedProject('core-robstoll-jvm').processResources, - prefixedProject('domain-robstoll-jvm').compileKotlin, - prefixedProject('domain-robstoll-jvm').processResources -) - diff --git a/misc/deprecated/domain/builders/extensions/kotlin_1_3/atrium-domain-builders-kotlin_1_3-jvm/src/module/module-info.java b/misc/deprecated/domain/builders/extensions/kotlin_1_3/atrium-domain-builders-kotlin_1_3-jvm/src/module/module-info.java deleted file mode 100644 index 32712ac58..000000000 --- a/misc/deprecated/domain/builders/extensions/kotlin_1_3/atrium-domain-builders-kotlin_1_3-jvm/src/module/module-info.java +++ /dev/null @@ -1,10 +0,0 @@ -module ch.tutteli.atrium.domain.builders.kotlin_1_3 { - requires transitive ch.tutteli.atrium.domain.builders; - requires transitive ch.tutteli.atrium.domain.api.kotlin_1_3; - requires transitive ch.tutteli.atrium.core.api; - requires static ch.tutteli.atrium.translations.en_GB; - requires kotlin.stdlib; - - exports ch.tutteli.atrium.domain.builders.kotlin_1_3.creating; - exports ch.tutteli.atrium.domain.builders.kotlin_1_3; -} diff --git a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/build.gradle b/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/build.gradle index 1c076db22..aaa08cf64 100644 --- a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/build.gradle +++ b/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/build.gradle @@ -6,13 +6,8 @@ description = 'Contains the bits and pieces behind robstoll\'s AssertionGroup) : AssertionGroup { - private val assertionGroup by lazy(LazyThreadSafetyMode.NONE) { - assertionCreator() - } - - override val description get() = assertionGroup.description - override val type get() = assertionGroup.type - override val representation get() = assertionGroup.representation - override val assertions get() = assertionGroup.assertions - override fun holds() = assertionGroup.holds() -} diff --git a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/assertions/LazyThreadUnsafeBasicAssertion.kt b/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/assertions/LazyThreadUnsafeBasicAssertion.kt deleted file mode 100644 index 61689c136..000000000 --- a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/assertions/LazyThreadUnsafeBasicAssertion.kt +++ /dev/null @@ -1,20 +0,0 @@ -package ch.tutteli.atrium.domain.robstoll.lib.assertions - -import ch.tutteli.atrium.assertions.DescriptiveAssertion - -/** - * Represents a [DescriptiveAssertion] which is evaluated lazily where the lazy loading is not thread safe. - * - * @constructor Represents a [DescriptiveAssertion] which is evaluated lazily where the lazy loading is not thread safe. - * @param assertionCreator The factory function which is used for lazy loading. - */ -@Deprecated("Will be removed with 1.0.0") -class LazyThreadUnsafeBasicAssertion(assertionCreator: () -> DescriptiveAssertion) : DescriptiveAssertion { - private val basicAssertion by lazy(LazyThreadSafetyMode.NONE) { - assertionCreator() - } - - override val representation get() = basicAssertion.representation - override val description get() = basicAssertion.description - override fun holds() = basicAssertion.holds() -} diff --git a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/assertions/composers/descriptiveWithFailureHint.kt b/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/assertions/composers/descriptiveWithFailureHint.kt deleted file mode 100644 index 4116944cb..000000000 --- a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/assertions/composers/descriptiveWithFailureHint.kt +++ /dev/null @@ -1,31 +0,0 @@ -package ch.tutteli.atrium.domain.robstoll.lib.assertions.composers - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.assertions.builders.assertionBuilder -import ch.tutteli.atrium.assertions.builders.fixedClaimGroup -import ch.tutteli.atrium.reporting.translating.Translatable - -@Deprecated("Will be removed with 1.0.0") -fun _createDescriptiveWithFailureHint( - description: Translatable, - representation: Any, - test: () -> Boolean, - showHint: () -> Boolean, - failureHintFactory: () -> Assertion -): Assertion { - val holds = try { - test() - } catch (@Suppress("DEPRECATION") e: ch.tutteli.atrium.creating.PlantHasNoSubjectException) { - true - } - return if (holds || !showHint()) { - assertionBuilder.createDescriptive(description, representation) { holds } - } else { - assertionBuilder.fixedClaimGroup - .withListType - .failing - .withDescriptionAndRepresentation(description, representation) - .withAssertion(failureHintFactory()) - .build() - } -} diff --git a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/any/typetransformation/creators/DownCastAssertionCreator.kt b/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/any/typetransformation/creators/DownCastAssertionCreator.kt deleted file mode 100644 index d599269b0..000000000 --- a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/any/typetransformation/creators/DownCastAssertionCreator.kt +++ /dev/null @@ -1,67 +0,0 @@ -@file:Suppress("DEPRECATION" /* will be removed with 1.0.0 */) - -package ch.tutteli.atrium.domain.robstoll.lib.creating.any.typetransformation.creators - -import ch.tutteli.atrium.assertions.DescriptiveAssertion -import ch.tutteli.atrium.core.polyfills.cast -import ch.tutteli.atrium.core.polyfills.fullName -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.creating.BaseAssertionPlant -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.domain.creating.any.typetransformation.AnyTypeTransformation -import ch.tutteli.atrium.reporting.translating.Translatable -import ch.tutteli.atrium.reporting.translating.TranslatableWithArgs -import ch.tutteli.atrium.translations.DescriptionTypeTransformationAssertion -import kotlin.reflect.KClass - -/** - * Helps to make an assertion about the [BaseAssertionPlant.subject], that it is of type [T] and can be - * down-casted to type [TSub]. - * - * @param T The type of [BaseAssertionPlant.subject]. - * @param TSub The type to which [BaseAssertionPlant.subject] can be down-casted, hence needs to be a subtype of [T]. - */ -@Deprecated("Use _changeSubject instead; will be removed with 1.0.0") -class DownCastAssertionCreator { - private val creator = TypeTransformationAssertionCreator() - - /** - * Performs the down-cast and applies the given [assertionCreator] to the down-casted - * [subject][BaseAssertionPlant.subject] of [subjectPlant] if successful or passes it - * to a [AnyTypeTransformation.FailureHandler] otherwise. - * - * It also adds a [DescriptiveAssertion], representing the down-cast as such (succeeding or failing), to the given - * [subjectPlant] using the given [description]. - * - * @param description The [description][DescriptiveAssertion.description] of the resulting [DescriptiveAssertion]. - * @param subType The type to which the [subjectPlant]'s [subject][SubjectProvider.subject] should be down-casted. - * @param subjectPlant The plant to which additional assertions will be added. - * @param assertionCreator The lambda function which can create subsequent assertions for the down-casted subject. - * @param failureHandler The handler which deals with a lambda function which could have created subsequent assertions - * for a down-casted subject. - * - * @throws AssertionError Might throw an [AssertionError] in case the down-cast cannot be performed, depending on - * the [subjectPlant] and the defined [AnyTypeTransformation.FailureHandler]. - */ - fun downCast( - description: Translatable, - subType: KClass, - subjectPlant: BaseAssertionPlant, - assertionCreator: AssertionPlant.() -> Unit, - failureHandler: AnyTypeTransformation.FailureHandler - ) { - val warningTransformationFailed = TranslatableWithArgs( - DescriptionTypeTransformationAssertion.WARNING_DOWN_CAST_FAILED, - subType.fullName - ) - val parameterObject = AnyTypeTransformation.ParameterObject( - description, subType, subjectPlant, assertionCreator, warningTransformationFailed - ) - creator.create( - parameterObject, - { subType.isInstance(it) }, - { subType.cast(it) }, - failureHandler - ) - } -} diff --git a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/any/typetransformation/creators/TypeTransformationAssertionCreator.kt b/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/any/typetransformation/creators/TypeTransformationAssertionCreator.kt deleted file mode 100644 index 9d7f12e6c..000000000 --- a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/any/typetransformation/creators/TypeTransformationAssertionCreator.kt +++ /dev/null @@ -1,34 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0 */) - -package ch.tutteli.atrium.domain.robstoll.lib.creating.any.typetransformation.creators - -import ch.tutteli.atrium.domain.builders.AssertImpl -import ch.tutteli.atrium.domain.creating.any.typetransformation.AnyTypeTransformation - -@Deprecated("Use _changeSubject instead; will be removed with 1.0.0") -class TypeTransformationAssertionCreator : AnyTypeTransformation.Creator { - - @Suppress("DEPRECATION") - override fun create( - parameterObject: AnyTypeTransformation.ParameterObject, - canBeTransformed: (S) -> Boolean, - transform: (S) -> T, - failureHandler: AnyTypeTransformation.FailureHandler - ) { - val (description, representation, subjectPlant, assertionCreator) = parameterObject - subjectPlant.maybeSubject - .filter { it != null && canBeTransformed(it) } - .fold({ - failureHandler.createAndAddAssertionToPlant(parameterObject) - }) { - val plant = AssertImpl.changeSubject(subjectPlant) { transform(it as S) } - plant.addAssertion( - AssertImpl.builder.descriptive - .holding - .withDescriptionAndRepresentation(description, representation) - .build() - ) - plant.addAssertionsCreatedBy(assertionCreator) - } - } -} diff --git a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/any/typetransformation/creators/deprecatedCreators.kt b/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/any/typetransformation/creators/deprecatedCreators.kt deleted file mode 100644 index 528e10deb..000000000 --- a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/any/typetransformation/creators/deprecatedCreators.kt +++ /dev/null @@ -1,58 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0 */) - -package ch.tutteli.atrium.domain.robstoll.lib.creating.any.typetransformation.creators - -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.creating.AssertionPlantNullable -import ch.tutteli.atrium.creating.BaseAssertionPlant -import ch.tutteli.atrium.domain.builders.AssertImpl -import ch.tutteli.atrium.domain.creating.any.typetransformation.AnyTypeTransformation -import ch.tutteli.atrium.domain.robstoll.lib.creating.any.typetransformation.failurehandlers.ExplanatoryFailureHandler -import ch.tutteli.atrium.reporting.translating.Translatable -import ch.tutteli.atrium.translations.DescriptionTypeTransformationAssertion.IS_A -import kotlin.reflect.KClass - -@Suppress("DeprecatedCallableAddReplaceWith") -@Deprecated("Use _changeSubject instead; will be removed with 1.0.0") -fun _isNotNull( - plant: AssertionPlantNullable, - type: KClass, - assertionCreator: AssertionPlant.() -> Unit -) { - plant.addAssertion(AssertImpl.any.isNotNull(plant, type, assertionCreator)) -} - -@Suppress("DeprecatedCallableAddReplaceWith") -@Deprecated("Use _changeSubject instead; will be removed with 1.0.0") -fun _isA( - plant: AssertionPlant, - subType: KClass, - assertionCreator: AssertionPlant.() -> Unit -) { - _downCast(IS_A, subType, plant, assertionCreator, ExplanatoryFailureHandler()) -} - -@Suppress("DeprecatedCallableAddReplaceWith") -@Deprecated("Use _changeSubject instead; will be removed with 1.0.0") -fun _downCast( - description: Translatable, - subType: KClass, - subjectPlant: BaseAssertionPlant, - assertionCreator: AssertionPlant.() -> Unit, - failureHandler: AnyTypeTransformation.FailureHandler -) { - DownCastAssertionCreator() - .downCast(description, subType, subjectPlant, assertionCreator, failureHandler) -} - -@Suppress("DeprecatedCallableAddReplaceWith") -@Deprecated("Use _changeSubject instead; will be removed with 1.0.0") -fun _typeTransformation( - parameterObject: AnyTypeTransformation.ParameterObject, - canBeTransformed: (S) -> Boolean, - transform: (S) -> T, - failureHandler: AnyTypeTransformation.FailureHandler -) { - TypeTransformationAssertionCreator() - .create(parameterObject, canBeTransformed, transform, failureHandler) -} diff --git a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/any/typetransformation/failurehandlers/ExplanatoryFailureHandler.kt b/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/any/typetransformation/failurehandlers/ExplanatoryFailureHandler.kt deleted file mode 100644 index fd605fc41..000000000 --- a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/any/typetransformation/failurehandlers/ExplanatoryFailureHandler.kt +++ /dev/null @@ -1,16 +0,0 @@ -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.domain.robstoll.lib.creating.any.typetransformation.failurehandlers - -import ch.tutteli.atrium.domain.builders.AssertImpl -import ch.tutteli.atrium.reporting.translating.Translatable - -@Deprecated("Will be removed with 1.0.0") -class ExplanatoryFailureHandler : ExplanatoryFailureHandlerBase() { - - override fun createFailingAssertion(description: Translatable, representation: Any) = - AssertImpl.builder.descriptive - .failing - .withDescriptionAndRepresentation(description, representation) - .build() -} diff --git a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/any/typetransformation/failurehandlers/ExplanatoryFailureHandlerBase.kt b/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/any/typetransformation/failurehandlers/ExplanatoryFailureHandlerBase.kt deleted file mode 100644 index 5a8571dd8..000000000 --- a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/any/typetransformation/failurehandlers/ExplanatoryFailureHandlerBase.kt +++ /dev/null @@ -1,39 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0 */) - -package ch.tutteli.atrium.domain.robstoll.lib.creating.any.typetransformation.failurehandlers - -import ch.tutteli.atrium.assertions.builders.invisibleGroup -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.creating.MaybeSubject -import ch.tutteli.atrium.domain.builders.AssertImpl -import ch.tutteli.atrium.domain.creating.any.typetransformation.AnyTypeTransformation -import ch.tutteli.atrium.domain.creating.any.typetransformation.AnyTypeTransformation.ParameterObject -import ch.tutteli.atrium.reporting.translating.Translatable - -@Deprecated("Will be removed with 1.0.0") -abstract class ExplanatoryFailureHandlerBase : AnyTypeTransformation.FailureHandler { - - override fun createAndAddAssertionToPlant(parameterObject: ParameterObject) { - val explanatoryAssertions = collectAssertions( - parameterObject.warningTransformationFailed, parameterObject.assertionCreator - ) - val assertion = AssertImpl.builder.invisibleGroup - .withAssertions( - createFailingAssertion(parameterObject.description, parameterObject.representation), - AssertImpl.builder.explanatoryGroup - .withDefaultType - .withAssertions(explanatoryAssertions) - .build() - ) - .build() - parameterObject.subjectPlant.addAssertion(assertion) - } - - private fun collectAssertions( - warningTransformationFailed: Translatable, - assertionCreator: AssertionPlant.() -> Unit - ) = AssertImpl.collector - .forExplanation - .doNotThrowIfNoAssertionIsCollected - .collect(warningTransformationFailed, MaybeSubject.Absent, assertionCreator) -} diff --git a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/any/typetransformation/failurehandlers/ExplanatoryFailureHandlerWithHint.kt b/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/any/typetransformation/failurehandlers/ExplanatoryFailureHandlerWithHint.kt deleted file mode 100644 index 9dc1ef6d2..000000000 --- a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/any/typetransformation/failurehandlers/ExplanatoryFailureHandlerWithHint.kt +++ /dev/null @@ -1,29 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0 */) - -package ch.tutteli.atrium.domain.robstoll.lib.creating.any.typetransformation.failurehandlers - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.assertions.builders.invisibleGroup -import ch.tutteli.atrium.domain.builders.AssertImpl -import ch.tutteli.atrium.reporting.translating.Translatable - -@Deprecated("Will be removed with 1.0.0") -class ExplanatoryFailureHandlerWithHint( - private val showHint: () -> Boolean, - private val failureHintFactory: () -> Assertion -) : ExplanatoryFailureHandlerBase() { - - override fun createFailingAssertion(description: Translatable, representation: Any): Assertion { - val failingAssertion = AssertImpl.builder.descriptive - .failing - .withDescriptionAndRepresentation(description, representation) - .build() - return if (showHint()) { - AssertImpl.builder.invisibleGroup - .withAssertions(failingAssertion, failureHintFactory()) - .build() - } else { - failingAssertion - } - } -} diff --git a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/any/typetransformation/failurehandlers/ThrowableThrownFailureHandler.kt b/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/any/typetransformation/failurehandlers/ThrowableThrownFailureHandler.kt deleted file mode 100644 index 25334e325..000000000 --- a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/any/typetransformation/failurehandlers/ThrowableThrownFailureHandler.kt +++ /dev/null @@ -1,62 +0,0 @@ -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.domain.robstoll.lib.creating.any.typetransformation.failurehandlers - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.assertions.AssertionGroup -import ch.tutteli.atrium.domain.builders.AssertImpl -import ch.tutteli.atrium.domain.robstoll.lib.creating.throwable.thrown.creators.ThrowableThrownFailureHandler -import ch.tutteli.atrium.reporting.translating.Translatable -import kotlin.reflect.KClass - -@Deprecated( - "Use ThrowableThrownFailureHandler in package throwable.thrown; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.domain.robstoll.lib.creating.throwable.thrown.creators.ThrowableThrownFailureHandler") -) -class ThrowableThrownFailureHandler( - private val throwable: Throwable?, - private val expectedType: KClass -) : ExplanatoryFailureHandlerBase() { - - override fun createFailingAssertion(description: Translatable, representation: Any): Assertion { - @Suppress("DEPRECATION") - return AssertImpl.any.typeTransformation.failureHandlers.newExplanatoryWithHint( - showHint = { throwable != null && !expectedType.isInstance(throwable) }, - failureHintFactory = { - //cannot/shouldn't be null since we checked it in showHint (or it needs to be checked on the outside) - propertiesOfException(throwable!!, maxStackTrace = 7) - } - ).createFailingAssertion(description, representation) - } - - companion object { - @Deprecated( - "Use throwable.thrown.creators.ThrowableThrownFailureHandler.propertiesOfThrowable", - ReplaceWith("ch.tutteli.atrium.domain.robstoll.lib.creating.throwable.thrown.creators.ThrowableThrownFailureHandler.propertiesOfThrowable(throwable, maxStackTrace)") - ) - fun propertiesOfException(throwable: Throwable, maxStackTrace: Int): AssertionGroup = - ThrowableThrownFailureHandler.propertiesOfThrowable(throwable, maxStackTrace) - - @Deprecated( - "Use throwable.thrown.creators.ThrowableThrownFailureHandler.createChildHint", - ReplaceWith("ch.tutteli.atrium.domain.robstoll.lib.creating.throwable.thrown.creators.ThrowableThrownFailureHandler.createChildHint(throwable, child, childDescription, maxStackTrace)") - ) - fun createChildHint( - throwable: Throwable, - child: Throwable, - childDescription: Translatable, - maxStackTrace: Int - ): AssertionGroup = ThrowableThrownFailureHandler.createChildHint( - throwable, child, childDescription, maxStackTrace - ) - } -} - -@Deprecated( - "use the function from package throwable.thrown; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.domain.robstoll.lib.creating.throwable.thrown.creators.createAdditionalHints(throwable, maxStackTrace)") -) -fun createAdditionalHints(throwable: Throwable, maxStackTrace: Int): List = - ch.tutteli.atrium.domain.robstoll.lib.creating.throwable.thrown.creators.createAdditionalHints( - throwable, maxStackTrace - ) diff --git a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/anyAssertions.kt b/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/anyAssertions.kt deleted file mode 100644 index 81ad5cd3c..000000000 --- a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/anyAssertions.kt +++ /dev/null @@ -1,70 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION") -@file:JvmMultifileClass -@file:JvmName("AnyAssertionsKt") - -package ch.tutteli.atrium.domain.robstoll.lib.creating - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.assertions.builders.assertionBuilder -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.domain.builders.ExpectImpl -import ch.tutteli.atrium.domain.creating.changers.ChangedSubjectPostStep -import ch.tutteli.atrium.reporting.Text -import ch.tutteli.atrium.translations.DescriptionAnyAssertion.* -import kotlin.jvm.JvmMultifileClass -import kotlin.jvm.JvmName -import kotlin.reflect.KClass - -@Suppress("DeprecatedCallableAddReplaceWith") -@Deprecated("use the function from atrium-logic instead, will be removed with 1.0.0") -fun _toBe(subjectProvider: SubjectProvider, expected: T) = - assertionBuilder.createDescriptive(subjectProvider, TO_BE, expected) { it == expected } - -@Suppress("DeprecatedCallableAddReplaceWith") -@Deprecated("use the function from atrium-logic instead, will be removed with 1.0.0") -fun _notToBe(subjectProvider: SubjectProvider, expected: T) = - assertionBuilder.createDescriptive(subjectProvider, NOT_TO_BE, expected) { it != expected } - -@Suppress("DeprecatedCallableAddReplaceWith") -@Deprecated("use the function from atrium-logic instead, will be removed with 1.0.0") -fun _isSame(subjectProvider: SubjectProvider, expected: T) = - assertionBuilder.createDescriptive(subjectProvider, IS_SAME, expected) { it === expected } - -@Suppress("DeprecatedCallableAddReplaceWith") -@Deprecated("use the function from atrium-logic instead, will be removed with 1.0.0") -fun _isNotSame(subjectProvider: SubjectProvider, expected: T) = - assertionBuilder.createDescriptive(subjectProvider, IS_NOT_SAME, expected) { it !== expected } - - -@Suppress("DeprecatedCallableAddReplaceWith") -@Deprecated("use the function from atrium-logic instead, will be removed with 1.0.0") -fun _toBeNull(subjectProvider: SubjectProvider) = - assertionBuilder.createDescriptive(subjectProvider, TO_BE, Text.NULL) { it == null } - -@Suppress("DeprecatedCallableAddReplaceWith") -@Deprecated("use the function from atrium-logic instead, will be removed with 1.0.0") -fun _toBeNullIfNullGivenElse( - expect: Expect, - type: KClass, - assertionCreatorOrNull: (Expect.() -> Unit)? -): Assertion = - if (assertionCreatorOrNull == null) ExpectImpl.any.toBeNull(expect) - else notToBeNull(expect, type, assertionCreatorOrNull) - -private fun notToBeNull( - expect: Expect, - type: KClass, - assertionCreator: Expect.() -> Unit -) = ExpectImpl.any.notToBeNull(expect, type).collect(assertionCreator) - -@Suppress("DeprecatedCallableAddReplaceWith") -@Deprecated("use the function from atrium-logic instead, will be removed with 1.0.0") -fun _isA( - expect: Expect, - subType: KClass -): ChangedSubjectPostStep = - ExpectImpl.changeSubject(expect).reportBuilder() - .downCastTo(subType) - .build() diff --git a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/anyAssertionsDeprecated.kt b/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/anyAssertionsDeprecated.kt deleted file mode 100644 index ef447d9f1..000000000 --- a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/anyAssertionsDeprecated.kt +++ /dev/null @@ -1,50 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION") -@file:JvmMultifileClass -@file:JvmName("AnyAssertionsKt") - -package ch.tutteli.atrium.domain.robstoll.lib.creating - -import ch.tutteli.atrium.api.cc.en_GB.toBe -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.creating.AssertionPlantNullable -import ch.tutteli.atrium.domain.builders.AssertImpl -import ch.tutteli.atrium.domain.robstoll.lib.creating.any.typetransformation.creators._downCast -import ch.tutteli.atrium.domain.robstoll.lib.creating.any.typetransformation.failurehandlers.ExplanatoryFailureHandler -import ch.tutteli.atrium.translations.DescriptionTypeTransformationAssertion -import kotlin.jvm.JvmMultifileClass -import kotlin.jvm.JvmName -import kotlin.reflect.KClass - -fun _isNullable( - plant: AssertionPlantNullable, - type: KClass, - expectedOrNull: T? -): Assertion = - if (expectedOrNull == null) AssertImpl.any.toBeNull(plant) - else AssertImpl.any.isNotNullBut(plant, type, expectedOrNull) - -fun _isNotNull( - plant: AssertionPlantNullable, - type: KClass, - assertionCreator: AssertionPlant.() -> Unit -): Assertion = AssertImpl.collector.collectNullable(plant) { - _downCast(DescriptionTypeTransformationAssertion.IS_A, type, this, assertionCreator, ExplanatoryFailureHandler()) -} - -fun _isNotNullBut( - plant: AssertionPlantNullable, - type: KClass, - expected: T -): Assertion { - return AssertImpl.any.isNotNull(plant, type) { toBe(expected) } -} - -fun _isNullIfNullGivenElse( - plant: AssertionPlantNullable, - type: KClass, - assertionCreatorOrNull: (AssertionPlant.() -> Unit)? -): Assertion = - if (assertionCreatorOrNull == null) AssertImpl.any.toBeNull(plant) - else AssertImpl.any.isNotNull(plant, type, assertionCreatorOrNull) diff --git a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/basic/contains/builders/ContainsBuilder.kt b/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/basic/contains/builders/ContainsBuilder.kt deleted file mode 100644 index c3519fa6b..000000000 --- a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/basic/contains/builders/ContainsBuilder.kt +++ /dev/null @@ -1,9 +0,0 @@ -package ch.tutteli.atrium.domain.robstoll.lib.creating.basic.contains.builders - -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.domain.creating.basic.contains.Contains - -abstract class ContainsBuilder( - override val subjectProvider: SubjectProvider, - override val searchBehaviour: S -) : Contains.Builder diff --git a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/basic/contains/checkers/ContainsChecker.kt b/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/basic/contains/checkers/ContainsChecker.kt deleted file mode 100644 index b47325bb3..000000000 --- a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/basic/contains/checkers/ContainsChecker.kt +++ /dev/null @@ -1,49 +0,0 @@ -package ch.tutteli.atrium.domain.robstoll.lib.creating.basic.contains.checkers - -import ch.tutteli.atrium.assertions.DescriptiveAssertion -import ch.tutteli.atrium.assertions.builders.assertionBuilder -import ch.tutteli.atrium.domain.creating.basic.contains.Contains -import ch.tutteli.atrium.reporting.Text -import ch.tutteli.atrium.reporting.translating.Translatable - -/** - * Represents a base class for [Contains.Checker]s which compare how many occurrences of an expected object are found - * in the input of the search, against how many [times] the check expect it to be contained. - * - * It further checks that [times] is bigger than 0 (throws an [IllegalArgumentException] otherwise) and additionally - * suggest to use a different function if [times] equals to zero. - * - * @property times The number which the check uses to compare against the actual number of times an expected object is - * found in the input of the search. - * - * @constructor Represents a base class for checkers which compare how many occurrences of an expected object are found - * in the input of the search, against how many [times] the check expect it to be contained. - * @param times The number which the check uses to compare against the actual number of times an expected object is - * found in the input of the search. - * @param correctCall The function which should be used instead of `wrongCall` when [times] equals to zero. - * @param wrongCall The function call which was used and should not be used if [times] equals to zero. - * - * @throws IllegalArgumentException In case [times] is smaller than 1. - */ -abstract class ContainsChecker( - val times: Int, - correctCall: String, - wrongCall: (Int) -> String -) : Contains.Checker { - init { - require(times != 0) { "use $correctCall instead of ${wrongCall(0)}" } - require(times > 0) { "only positive numbers allowed: $times given" } - } - - /** - * Creates a [DescriptiveAssertion] based on the given [description], the property [times] as [Text] - * and the given [check]. - * - * @param description The description used for [DescriptiveAssertion.description] - * @param check The check used for [DescriptiveAssertion.holds] - * - * @return The newly created [DescriptiveAssertion]. - */ - protected fun createDescriptiveAssertion(description: Translatable, check: () -> Boolean): DescriptiveAssertion = - assertionBuilder.createDescriptive(description, Text(times.toString()), check) -} diff --git a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/basic/contains/creators/ContainsAssertionCreator.kt b/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/basic/contains/creators/ContainsAssertionCreator.kt deleted file mode 100644 index 367ba34e0..000000000 --- a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/basic/contains/creators/ContainsAssertionCreator.kt +++ /dev/null @@ -1,84 +0,0 @@ -//TODO remove with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.domain.robstoll.lib.creating.basic.contains.creators - -import ch.tutteli.atrium.assertions.AssertionGroup -import ch.tutteli.atrium.assertions.builders.assertionBuilder -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.domain.creating.basic.contains.Contains -import ch.tutteli.atrium.domain.robstoll.lib.assertions.LazyThreadUnsafeAssertionGroup -import ch.tutteli.atrium.reporting.Text -import ch.tutteli.atrium.reporting.translating.Translatable - -/** - * Represents the base class for [Contains.Creator]s, providing a template to fulfill its job. - * - * @param T The type of the [AssertionPlant.subject][SubjectProvider.subject]. - * @param SC The type of the search criteria. - * @param C The type of the checkers in use (typically a sub interface of [Contains.Checker]). - * - * @property checkers The [Contains.Checker]s which shall be applied to the search result. - * - * @constructor Represents the base class for [Contains.Creator]s, providing a template to fulfill its job. - * @param checkers The [Contains.Checker]s which shall be applied to the search result. - */ -abstract class ContainsAssertionCreator( - protected val searchBehaviour: Contains.SearchBehaviour, - private val checkers: List -) : Contains.Creator { - - /** - * Provides the translation for `contains`. - */ - protected abstract val descriptionContains: Translatable - - final override fun createAssertionGroup( - subjectProvider: SubjectProvider, - searchCriteria: List - ): AssertionGroup { - val transformedSubjectProvider = makeSubjectMultipleTimesConsumable(subjectProvider) - val assertions = searchCriteria.map { - LazyThreadUnsafeAssertionGroup { - searchAndCreateAssertion(transformedSubjectProvider, it, this::featureFactory) - } - } - val description = searchBehaviour.decorateDescription(descriptionContains) - return assertionBuilder.list - .withDescriptionAndEmptyRepresentation(description) - .withAssertions(assertions) - .build() - } - - /** - * Make the underlying subject multiple times consumable. - */ - protected abstract fun makeSubjectMultipleTimesConsumable(subjectProvider: SubjectProvider): SubjectProvider - - /** - * Searches for something fulfilling the given [searchCriterion] in the given [subjectProvider]'s - * [subject][SubjectProvider.subject] and should pass on the number of occurrences to the given - * [featureFactory] which creates feature assertions based on the [checkers], which in turn can be used to create - * a resulting [AssertionGroup] representing the assertion for a search criteria as a whole. - * - * @param subjectProvider Provides the subject of the assertion for which the assertion is created. - * @param searchCriterion A search criterion. - * @param featureFactory The feature factory which should be called, passing the number of occurrences (matching - * the given [searchCriterion]) including a translation for `number of occurrences`. - * - * @return The newly created [AssertionGroup]. - */ - protected abstract fun searchAndCreateAssertion( - subjectProvider: SubjectProvider, - searchCriterion: SC, - featureFactory: (numberOfOccurrences: Int, description: Translatable) -> AssertionGroup - ): AssertionGroup - - private fun featureFactory(count: Int, numberOfOccurrences: Translatable): AssertionGroup { - val assertions = checkers.map { it.createAssertion(count) } - return assertionBuilder.feature - .withDescriptionAndRepresentation(numberOfOccurrences, Text(count.toString())) - .withAssertions(assertions) - .build() - } -} diff --git a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/basic/contains/creators/ContainsObjectsAssertionCreator.kt b/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/basic/contains/creators/ContainsObjectsAssertionCreator.kt deleted file mode 100644 index 25654fc07..000000000 --- a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/basic/contains/creators/ContainsObjectsAssertionCreator.kt +++ /dev/null @@ -1,80 +0,0 @@ -package ch.tutteli.atrium.domain.robstoll.lib.creating.basic.contains.creators - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.assertions.AssertionGroup -import ch.tutteli.atrium.assertions.AssertionGroupType -import ch.tutteli.atrium.assertions.builders.assertionBuilder -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.domain.creating.basic.contains.Contains -import ch.tutteli.atrium.reporting.translating.Translatable - -/** - * Represents the base class for [Contains.Creator]s which use bare objects as search criteria (matching them - * with `==`). - * - * It provides a template to fulfill the job of creating the sophisticated `contains` [Assertion]. - * - * @param T The type of the [AssertionPlant.subject][SubjectProvider.subject]. - * @param SC The type of the search criteria. - * @param S The type of the current [Contains.SearchBehaviour]. - * @param C The type of the checkers in use (typically a sub interface of [Contains.Checker]). - * - * @property searchBehaviour The chosen search behaviour. - * - * @constructor Represents the base class for [Contains.Creator]s which use bare objects as search criteria (matching them - * with `==`). - * @param searchBehaviour The chosen search behaviour. - * @param checkers The [Contains.Checker]s which shall be applied to the search result. - */ -abstract class ContainsObjectsAssertionCreator( - searchBehaviour: S, - checkers: List -) : ContainsAssertionCreator(searchBehaviour, checkers) { - - final override fun searchAndCreateAssertion( - subjectProvider: SubjectProvider, - searchCriterion: SC, - featureFactory: (Int, Translatable) -> AssertionGroup - ): AssertionGroup { - val count = search(subjectProvider, searchCriterion) - val featureAssertion = featureFactory(count, descriptionNumberOfOccurrences) - - return assertionBuilder.customType(getAssertionGroupType()) - .withDescriptionAndRepresentation(groupDescription, searchCriterion) - .withAssertions(decorateAssertion(subjectProvider, featureAssertion)) - .build() - } - - /** - * Provides the translation for `number of occurrences`. - */ - protected abstract val descriptionNumberOfOccurrences: Translatable - - /** - * Provides the translation for [AssertionGroup.description] - */ - protected abstract val groupDescription: Translatable - - /** - * Provides the [AssertionGroupType] for the resulting [AssertionGroup]. - */ - protected abstract fun getAssertionGroupType(): AssertionGroupType - - - /** - * Searches for something matching the given [searchCriterion] in the subject the given [subjectProvider] - * provides and returns the number of occurrences. - * - * @param subjectProvider The provider of the subject of the assertion in which we shall look for something - * matching the given [searchCriterion]. - * @param searchCriterion The search criterion used to determine whether something matches or not. - * - * @return The number of times the [searchCriterion] matched in the subject of the assertion. - */ - protected abstract fun search(subjectProvider: SubjectProvider, searchCriterion: SC): Int - - /** - * Either return the given [featureAssertion] as [List] or add further assertions. - */ - abstract fun decorateAssertion(subjectProvider: SubjectProvider, featureAssertion: Assertion): List -} diff --git a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/changers/changeSubject.kt b/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/changers/changeSubject.kt deleted file mode 100644 index d25dcdfb9..000000000 --- a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/changers/changeSubject.kt +++ /dev/null @@ -1,59 +0,0 @@ -//TODO remove with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.domain.robstoll.lib.creating.changers - -import ch.tutteli.atrium.assertions.builders.assertionBuilder -import ch.tutteli.atrium.core.Option -import ch.tutteli.atrium.core.trueProvider -import ch.tutteli.atrium.creating.DelegatingExpect -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.domain.creating.changers.SubjectChanger -import ch.tutteli.atrium.reporting.translating.Translatable - -fun _changeSubjectUnreported( - originalAssertionContainer: Expect, - transformation: (T) -> R -): Expect = DelegatingExpect( - originalAssertionContainer, - //TODO wrap transformation with error handling. Could be interesting to see the exception in the context of the assertion - originalAssertionContainer.maybeSubject.map(transformation) -) - -fun _changeSubject( - originalAssertionContainer: Expect, - description: Translatable, - representation: Any, - transformation: (T) -> Option, - failureHandler: SubjectChanger.FailureHandler, - maybeAssertionCreator: Option.() -> Unit> -): Expect { - - val expect = DelegatingExpect( - originalAssertionContainer, - // TODO wrap transformation with error handling. Could be interesting to see the exception in the context of the assertion - originalAssertionContainer.maybeSubject.flatMap(transformation) - ) - // we can transform if maybeSubject is None as we have to be in an explaining like context in such a case, - // even if the transformation cannot be carried out - val shallTransform = - originalAssertionContainer.maybeSubject.fold(trueProvider, { expect.maybeSubject.isDefined() }) - - val descriptiveAssertion = assertionBuilder.descriptive - .withTest(expect) { true } - .withDescriptionAndRepresentation(description, representation) - .build() - - if (shallTransform) { - expect.addAssertion(descriptiveAssertion) - maybeAssertionCreator.fold({ /*nothing to do */ }) { assertionCreator -> - expect.addAssertionsCreatedBy(assertionCreator) - } - } else { - val assertion = failureHandler.createAssertion( - originalAssertionContainer, descriptiveAssertion, maybeAssertionCreator - ) - expect.addAssertion(assertion) - } - return expect -} diff --git a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/changers/extractFeature.kt b/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/changers/extractFeature.kt deleted file mode 100644 index 197fbe57c..000000000 --- a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/changers/extractFeature.kt +++ /dev/null @@ -1,70 +0,0 @@ -package ch.tutteli.atrium.domain.robstoll.lib.creating.changers - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.assertions.builders.assertionBuilder -import ch.tutteli.atrium.assertions.builders.fixedClaimGroup -import ch.tutteli.atrium.core.ExperimentalNewExpectTypes -import ch.tutteli.atrium.core.None -import ch.tutteli.atrium.core.Option -import ch.tutteli.atrium.core.Some -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.creating.FeatureExpect -import ch.tutteli.atrium.creating.FeatureExpectOptions -import ch.tutteli.atrium.domain.builders.creating.collectors.collectAssertions -import ch.tutteli.atrium.domain.creating.collectors.assertionCollector -import ch.tutteli.atrium.reporting.translating.Translatable - -@Suppress("DEPRECATION" /* OptIn is only available since 1.3.70 which we cannot use if we want to support 1.2 */) -@UseExperimental(ExperimentalNewExpectTypes::class) -fun _extractFeature( - originalAssertionContainer: Expect, - description: Translatable, - representationForFailure: Any, - featureExtraction: (T) -> Option, - maybeSubAssertions: Option.() -> Unit>, - representationInsteadOfFeature: ((R) -> Any)? -): FeatureExpect = - originalAssertionContainer.maybeSubject - .flatMap { subject -> featureExtraction(subject) } - .fold( - { - originalAssertionContainer.addAssertion( - assertionBuilder.fixedClaimGroup - .withFeatureType - .failing - .withDescriptionAndRepresentation(description, representationForFailure) - .withAssertions(maybeSubAssertions.fold({ - listOf() - }) { assertionCreator -> - listOf( - assertionBuilder.explanatoryGroup.withDefaultType - .collectAssertions(None, assertionCreator) - .build() - ) - }) - .build() - ) - FeatureExpect( - originalAssertionContainer, - None, - description, - listOf(), - FeatureExpectOptions(representationInsteadOfFeature = { representationForFailure }) - ) - }, - { subject -> - FeatureExpect( - originalAssertionContainer, - Some(subject), - description, - maybeSubAssertions.fold({ - listOf() - }) { assertionCreator -> - assertionCollector.collectForComposition(Some(subject), assertionCreator) - }, - FeatureExpectOptions( - representationInsteadOfFeature = representationInsteadOfFeature - ) - ) - } - ) diff --git a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/charSequenceAssertions.kt b/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/charSequenceAssertions.kt deleted file mode 100644 index 88d88325e..000000000 --- a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/charSequenceAssertions.kt +++ /dev/null @@ -1,69 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION") -package ch.tutteli.atrium.domain.robstoll.lib.creating - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.assertions.builders.assertionBuilder -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains -import ch.tutteli.atrium.domain.creating.charsequence.contains.searchbehaviours.NoOpSearchBehaviour -import ch.tutteli.atrium.domain.creating.charsequence.contains.searchbehaviours.NotSearchBehaviour -import ch.tutteli.atrium.domain.robstoll.lib.creating.charsequence.contains.builders.CharSequenceContainsBuilder -import ch.tutteli.atrium.domain.robstoll.lib.creating.charsequence.contains.searchbehaviours.NoOpSearchBehaviourImpl -import ch.tutteli.atrium.domain.robstoll.lib.creating.charsequence.contains.searchbehaviours.NotSearchBehaviourImpl -import ch.tutteli.atrium.translations.DescriptionBasic.IS -import ch.tutteli.atrium.translations.DescriptionBasic.IS_NOT -import ch.tutteli.atrium.translations.DescriptionCharSequenceAssertion.* - -fun _containsBuilder(subjectProvider: SubjectProvider): CharSequenceContains.Builder = - CharSequenceContainsBuilder(subjectProvider, NoOpSearchBehaviourImpl()) - -fun _containsNotBuilder(subjectProvider: SubjectProvider): CharSequenceContains.Builder = - CharSequenceContainsBuilder(subjectProvider, NotSearchBehaviourImpl()) - - -@Suppress("DeprecatedCallableAddReplaceWith") -@Deprecated("use the function from atrium-logic instead, will be removed with 1.0.0") -fun _startsWith(subjectProvider: SubjectProvider, expected: CharSequence): Assertion = - assertionBuilder.createDescriptive(subjectProvider, STARTS_WITH, expected) { it.startsWith(expected) } - -@Suppress("DeprecatedCallableAddReplaceWith") -@Deprecated("use the function from atrium-logic instead, will be removed with 1.0.0") -fun _startsNotWith(subjectProvider: SubjectProvider, expected: CharSequence): Assertion = - assertionBuilder.createDescriptive(subjectProvider, STARTS_NOT_WITH, expected) { !it.startsWith(expected) } - -@Suppress("DeprecatedCallableAddReplaceWith") -@Deprecated("use the function from atrium-logic instead, will be removed with 1.0.0") -fun _endsWith(subjectProvider: SubjectProvider, expected: CharSequence): Assertion = - assertionBuilder.createDescriptive(subjectProvider, ENDS_WITH, expected) { it.endsWith(expected) } - -@Suppress("DeprecatedCallableAddReplaceWith") -@Deprecated("use the function from atrium-logic instead, will be removed with 1.0.0") -fun _endsNotWith(subjectProvider: SubjectProvider, expected: CharSequence): Assertion = - assertionBuilder.createDescriptive(subjectProvider, ENDS_NOT_WITH, expected) { !it.endsWith(expected) } - -@Suppress("DeprecatedCallableAddReplaceWith") -@Deprecated("use the function from atrium-logic instead, will be removed with 1.0.0") -fun _isEmpty(subjectProvider: SubjectProvider): Assertion = - assertionBuilder.createDescriptive(subjectProvider, IS, EMPTY) { it.isEmpty() } - -@Suppress("DeprecatedCallableAddReplaceWith") -@Deprecated("use the function from atrium-logic instead, will be removed with 1.0.0") -fun _isNotEmpty(subjectProvider: SubjectProvider): Assertion = - assertionBuilder.createDescriptive(subjectProvider, IS_NOT, EMPTY) { it.isNotEmpty() } - -@Suppress("DeprecatedCallableAddReplaceWith") -@Deprecated("use the function from atrium-logic instead, will be removed with 1.0.0") -fun _isNotBlank(subjectProvider: SubjectProvider): Assertion = - assertionBuilder.createDescriptive(subjectProvider, IS_NOT, BLANK) { it.isNotBlank() } - -@Suppress("DeprecatedCallableAddReplaceWith") -@Deprecated("use the function from atrium-logic instead, will be removed with 1.0.0") -fun _matches(expect: Expect, expected: Regex): Assertion = - assertionBuilder.createDescriptive(expect, MATCHES, expected) { it.matches(expected) } - -@Suppress("DeprecatedCallableAddReplaceWith") -@Deprecated("use the function from atrium-logic instead, will be removed with 1.0.0") -fun _mismatches(expect: Expect, expected: Regex): Assertion = - assertionBuilder.createDescriptive(expect, MISMATCHES, expected) { !it.matches(expected) } diff --git a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/charsequence/contains/builders/CharSequenceContainsBuilder.kt b/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/charsequence/contains/builders/CharSequenceContainsBuilder.kt deleted file mode 100644 index 2860c5181..000000000 --- a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/charsequence/contains/builders/CharSequenceContainsBuilder.kt +++ /dev/null @@ -1,14 +0,0 @@ -//TODO remove with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.domain.robstoll.lib.creating.charsequence.contains.builders - -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains -import ch.tutteli.atrium.domain.robstoll.lib.creating.basic.contains.builders.ContainsBuilder - -@Deprecated("Use class from atrium-logic; will be removed with 1.0.0") -class CharSequenceContainsBuilder( - subjectProvider: SubjectProvider, searchBehaviour: S -) : ContainsBuilder(subjectProvider, searchBehaviour), CharSequenceContains.Builder - diff --git a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/charsequence/contains/checkers/AtLeastChecker.kt b/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/charsequence/contains/checkers/AtLeastChecker.kt deleted file mode 100644 index 1c782faf3..000000000 --- a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/charsequence/contains/checkers/AtLeastChecker.kt +++ /dev/null @@ -1,28 +0,0 @@ -//TODO remove with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.domain.robstoll.lib.creating.charsequence.contains.checkers - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.translations.DescriptionCharSequenceAssertion - -/** - * Represents a check that an expected object is contained at least [times] in the search input. - * - * @param times The number which the check uses to compare against the actual number of times an expected object is - * found in the input of the search. - * @param nameContainsNotFun The function which should be used instead of `atLeastCall` when [times] equals to zero. - * @param atLeastCall The function which was used and should not be used if [times] equals to zero. - * - * @throws IllegalArgumentException In case [times] is smaller than 1. - */ -@Deprecated("Use class from atrium-logic; will be removed with 1.0.0") -class AtLeastChecker( - times: Int, - nameContainsNotFun: String, - atLeastCall: (Int) -> String -) : Checker(times, nameContainsNotFun, atLeastCall) { - - override fun createAssertion(foundNumberOfTimes: Int): Assertion = - createDescriptiveAssertion(DescriptionCharSequenceAssertion.AT_LEAST) { foundNumberOfTimes >= times } -} diff --git a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/charsequence/contains/checkers/AtMostChecker.kt b/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/charsequence/contains/checkers/AtMostChecker.kt deleted file mode 100644 index b07dbbf5e..000000000 --- a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/charsequence/contains/checkers/AtMostChecker.kt +++ /dev/null @@ -1,28 +0,0 @@ -//TODO remove with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.domain.robstoll.lib.creating.charsequence.contains.checkers - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.translations.DescriptionCharSequenceAssertion - -/** - * Represents a check that an expected object is contained at most [times] in the search input. - * - * @param times The number which the check uses to compare against the actual number of times an expected object is - * found in the input of the search. - * @param nameContainsNotFun The function which should be used instead of `atMostCall` when [times] equals to zero. - * @param atMostCall The function which was used and should not be used if [times] equals to zero. - * - * @throws IllegalArgumentException In case [times] is smaller than 1. - */ -@Deprecated("Use class from atrium-logic; will be removed with 1.0.0") -class AtMostChecker( - times: Int, - nameContainsNotFun: String, - atMostCall: (Int) -> String -) : Checker(times, nameContainsNotFun, atMostCall) { - - override fun createAssertion(foundNumberOfTimes: Int): Assertion = - createDescriptiveAssertion(DescriptionCharSequenceAssertion.AT_MOST) { foundNumberOfTimes <= times } -} diff --git a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/charsequence/contains/checkers/Checker.kt b/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/charsequence/contains/checkers/Checker.kt deleted file mode 100644 index af72e2667..000000000 --- a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/charsequence/contains/checkers/Checker.kt +++ /dev/null @@ -1,27 +0,0 @@ -//TODO remove with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.domain.robstoll.lib.creating.charsequence.contains.checkers - -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains -import ch.tutteli.atrium.domain.robstoll.lib.creating.basic.contains.checkers.ContainsChecker - -/** - * Represents the base class for [CharSequenceContains.Checker]. - * - * It does not do much more than specifying that its super class is [ContainsChecker] and sub-classes have to implement - * [CharSequenceContains.Checker]. - * - * @param times The number which the check uses to compare against the actual number of times an expected object is - * found in the input of the search. - * @param correctCall The function which should be used instead of `wrongCall` when [times] equals to zero. - * @param wrongCall The function call which was used and should not be used if [times] equals to zero. - * - * @throws IllegalArgumentException In case [times] is smaller than 1. - */ -@Deprecated("Use class from atrium-logic; will be removed with 1.0.0") -abstract class Checker( - times: Int, - correctCall: String, - wrongCall: (Int) -> String -) : ContainsChecker(times, correctCall, wrongCall), CharSequenceContains.Checker diff --git a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/charsequence/contains/checkers/ExactlyChecker.kt b/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/charsequence/contains/checkers/ExactlyChecker.kt deleted file mode 100644 index 345ca2556..000000000 --- a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/charsequence/contains/checkers/ExactlyChecker.kt +++ /dev/null @@ -1,28 +0,0 @@ -//TODO remove with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.domain.robstoll.lib.creating.charsequence.contains.checkers - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.translations.DescriptionCharSequenceAssertion - -/** - * Represents a check that an expected object is contained exactly [times] in the search input. - * - * @param times The number which the check uses to compare against the actual number of times an expected object is - * found in the input of the search. - * @param nameContainsNotFun The function which should be used instead of `exactlyCall` when [times] equals to zero. - * @param exactlyCall The function call which was used and should not be used if [times] equals to zero. - * - * @throws IllegalArgumentException In case [times] is smaller than 1. - */ -@Deprecated("Use class from atrium-logic; will be removed with 1.0.0") -class ExactlyChecker( - times: Int, - nameContainsNotFun: String, - exactlyCall: (Int) -> String -) : Checker(times, nameContainsNotFun, exactlyCall) { - - override fun createAssertion(foundNumberOfTimes: Int): Assertion = - createDescriptiveAssertion(DescriptionCharSequenceAssertion.EXACTLY) { foundNumberOfTimes == times } -} diff --git a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/charsequence/contains/checkers/NotChecker.kt b/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/charsequence/contains/checkers/NotChecker.kt deleted file mode 100644 index d965f5017..000000000 --- a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/charsequence/contains/checkers/NotChecker.kt +++ /dev/null @@ -1,19 +0,0 @@ -//TODO remove with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.domain.robstoll.lib.creating.charsequence.contains.checkers - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.assertions.builders.assertionBuilder -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains -import ch.tutteli.atrium.translations.DescriptionBasic - -/** - * Represents a check that an expected object is not contained in the search input. - */ -@Deprecated("Use class from atrium-logic; will be removed with 1.0.0") -class NotChecker : CharSequenceContains.Checker { - - override fun createAssertion(foundNumberOfTimes: Int): Assertion = - assertionBuilder.createDescriptive(DescriptionBasic.IS, 0) { foundNumberOfTimes == 0 } -} diff --git a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/charsequence/contains/creators/CharSequenceContainsAssertionCreator.kt b/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/charsequence/contains/creators/CharSequenceContainsAssertionCreator.kt deleted file mode 100644 index 8f923ce11..000000000 --- a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/charsequence/contains/creators/CharSequenceContainsAssertionCreator.kt +++ /dev/null @@ -1,60 +0,0 @@ -//TODO remove with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.domain.robstoll.lib.creating.charsequence.contains.creators - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.assertions.AssertionGroup -import ch.tutteli.atrium.assertions.AssertionGroupType -import ch.tutteli.atrium.assertions.DefaultListAssertionGroupType -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.domain.builders.ExpectImpl -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains.* -import ch.tutteli.atrium.domain.robstoll.lib.creating.basic.contains.creators.ContainsObjectsAssertionCreator -import ch.tutteli.atrium.reporting.translating.Translatable -import ch.tutteli.atrium.translations.DescriptionCharSequenceAssertion - -/** - * Represents a creator of sophisticated `contains` assertions for [CharSequence]. - * - * A sophisticated `contains` assertion is build up by a desired [SearchBehaviour], a [Searcher] and a number of - * [Checker]s. The [searcher] searches for specified objects -- considering the given [searchBehaviour] -- and - * then passes on the result to the given [checkers] which in turn create the assertions representing the - * corresponding check. Those created assertions are then grouped into an [AssertionGroup] which represents the - * sophisticated assertion as a whole. - * - * @param T The type of the [AssertionPlant.subject][SubjectProvider.subject] for which the `contains` assertion is be build. - * @param SC The type of the search criteria. - * @param S The search behaviour which should be applied to the input of the search. - * - * @constructor Represents a creator for sophisticated `contains` assertions for [CharSequence]. - * @param searchBehaviour The search behaviour. - * @param searcher The search method which is used to search for given objects. - * @param checkers The checkers which create assertions based on the search result. - */ -@Deprecated("Use class from atrium-logic; will be removed with 1.0.0") -class CharSequenceContainsAssertionCreator( - searchBehaviour: S, - private val searcher: Searcher, - checkers: List, - override val groupDescription: Translatable -) : ContainsObjectsAssertionCreator(searchBehaviour, checkers), Creator { - - override val descriptionContains: Translatable = DescriptionCharSequenceAssertion.CONTAINS - override val descriptionNumberOfOccurrences: Translatable = DescriptionCharSequenceAssertion.NUMBER_OF_OCCURRENCES - - override fun getAssertionGroupType(): AssertionGroupType = DefaultListAssertionGroupType - - @Suppress("DEPRECATION" /* switch to Expect and remove this annotation with 1.0.0 */) - override fun makeSubjectMultipleTimesConsumable(subjectProvider: SubjectProvider): SubjectProvider = - ExpectImpl.changeSubject(subjectProvider).unreported { it.toString() } - - override fun search(subjectProvider: SubjectProvider, searchCriterion: SC): Int = - // if the maybeSubject is None it means we are in an explanation like context in which it does not matter if it is found or not. - subjectProvider.maybeSubject.fold({ -1 }) { searcher.search(it, searchCriterion) } - - override fun decorateAssertion( - subjectProvider: SubjectProvider, - featureAssertion: Assertion - ): List = listOf(featureAssertion) -} diff --git a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/charsequence/contains/creators/creators.kt b/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/charsequence/contains/creators/creators.kt deleted file mode 100644 index f37f29e88..000000000 --- a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/charsequence/contains/creators/creators.kt +++ /dev/null @@ -1,98 +0,0 @@ -//TODO remove with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.domain.robstoll.lib.creating.charsequence.contains.creators - -import ch.tutteli.atrium.assertions.AssertionGroup -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains -import ch.tutteli.atrium.domain.creating.charsequence.contains.searchbehaviours.IgnoringCaseSearchBehaviour -import ch.tutteli.atrium.domain.creating.charsequence.contains.searchbehaviours.NoOpSearchBehaviour -import ch.tutteli.atrium.domain.creating.typeutils.CharSequenceOrNumberOrChar -import ch.tutteli.atrium.domain.robstoll.lib.creating.charsequence.contains.searchers.IgnoringCaseIndexSearcher -import ch.tutteli.atrium.domain.robstoll.lib.creating.charsequence.contains.searchers.IgnoringCaseRegexSearcher -import ch.tutteli.atrium.domain.robstoll.lib.creating.charsequence.contains.searchers.IndexSearcher -import ch.tutteli.atrium.domain.robstoll.lib.creating.charsequence.contains.searchers.RegexSearcher -import ch.tutteli.atrium.reporting.translating.Translatable -import ch.tutteli.atrium.translations.DescriptionCharSequenceAssertion.STRING_MATCHING_REGEX -import ch.tutteli.atrium.translations.DescriptionCharSequenceAssertion.VALUE - -fun _containsValues( - checkerOption: CharSequenceContains.CheckerOption, - expected: List -): AssertionGroup = checkOnlyAllowedTypeNotEmptyStringAndCreateAssertionGroup(checkerOption, IndexSearcher(), expected) - -fun _containsValuesIgnoringCase( - checkerOption: CharSequenceContains.CheckerOption, - expected: List -): AssertionGroup = - checkOnlyAllowedTypeNotEmptyStringAndCreateAssertionGroup(checkerOption, IgnoringCaseIndexSearcher(), expected) - -private fun checkOnlyAllowedTypeNotEmptyStringAndCreateAssertionGroup( - checkerOption: CharSequenceContains.CheckerOption, - searcher: CharSequenceContains.Searcher, - expected: List -): AssertionGroup { - require(expected.isNotEmpty()) { - "You have to specify at least one search criterion for a CharSequence contains assertion" - } - expected.forEach { - require(it is CharSequence || it is Number || it is Char) { - "Only values of type CharSequence, Number and Char are allowed\nGiven: $it\n" + - "We provide an API with CharSequenceOrNumberOrChar (typealias for Any) for convenience (so that you can mix String and Int for instance).\n" + - "Use toString() if you really want to search for its toString()-representation." - } - require(it != "") { - "Searching for the empty string does not make sense. You probably forgot to specify the search criterion." - } - require(it.toString() != "") { - "Searching for an empty CharSequence does not make sense. You probably forgot to specify the search criterion." - } - } - return createAssertionGroup(checkerOption, searcher, expected, VALUE) -} - -//TODO remove with 1.0.0 -@Suppress("DeprecatedCallableAddReplaceWith") -@Deprecated("will be removed with 1.0.0") -fun _containsDefaultTranslationOf( - checkerOption: CharSequenceContains.CheckerOption, - expected: List -): AssertionGroup = _containsValues(checkerOption, expected.map { it.getDefault() }) - -//TODO remove with 1.0.0 -@Suppress("DeprecatedCallableAddReplaceWith") -@Deprecated("will be removed with 1.0.0") -fun _containsDefaultTranslationOfIgnoringCase( - checkerOption: CharSequenceContains.CheckerOption, - expected: List -): AssertionGroup = _containsValuesIgnoringCase(checkerOption, expected.map { it.getDefault() }) - -fun _containsRegex( - checkerOption: CharSequenceContains.CheckerOption, - expected: List -): AssertionGroup = createAssertionGroup(checkerOption, RegexSearcher(), expected, STRING_MATCHING_REGEX) - -fun _containsRegexIgnoringCase( - checkerOption: CharSequenceContains.CheckerOption, - expected: List -): AssertionGroup = createAssertionGroup( - checkerOption, - IgnoringCaseRegexSearcher(), - expected, - STRING_MATCHING_REGEX -) - -private fun createAssertionGroup( - checkerOption: CharSequenceContains.CheckerOption, - searcher: CharSequenceContains.Searcher, - expected: List, - groupDescription: Translatable -): AssertionGroup { - val creator = CharSequenceContainsAssertionCreator( - checkerOption.containsBuilder.searchBehaviour, - searcher, - checkerOption.checkers, - groupDescription - ) - return creator.createAssertionGroup(checkerOption.containsBuilder.subjectProvider, expected) -} diff --git a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/charsequence/contains/searchbehaviours/IgnoringCaseSearchBehaviourImpl.kt b/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/charsequence/contains/searchbehaviours/IgnoringCaseSearchBehaviourImpl.kt deleted file mode 100644 index 0d6fed2fe..000000000 --- a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/charsequence/contains/searchbehaviours/IgnoringCaseSearchBehaviourImpl.kt +++ /dev/null @@ -1,26 +0,0 @@ -//TODO remove with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.domain.robstoll.lib.creating.charsequence.contains.searchbehaviours - -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains -import ch.tutteli.atrium.domain.creating.charsequence.contains.searchbehaviours.IgnoringCaseSearchBehaviour -import ch.tutteli.atrium.domain.creating.charsequence.contains.searchbehaviours.NoOpSearchBehaviour -import ch.tutteli.atrium.reporting.translating.Translatable -import ch.tutteli.atrium.reporting.translating.TranslatableWithArgs -import ch.tutteli.atrium.translations.DescriptionCharSequenceAssertion - -/** - * Represents the search behaviour that a [CharSequenceContains.Searcher] should ignore case - * when searching for an expected object. - */ -@Deprecated("Use class from atrium-logic; will be removed with 1.0.0") -class IgnoringCaseSearchBehaviourImpl( - private val previousBehaviour: NoOpSearchBehaviour -) : IgnoringCaseSearchBehaviour { - - override fun decorateDescription(description: Translatable): Translatable { - val previousDecorated = previousBehaviour.decorateDescription(description) - return TranslatableWithArgs(DescriptionCharSequenceAssertion.IGNORING_CASE, previousDecorated) - } -} diff --git a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/charsequence/contains/searchbehaviours/NoOpSearchBehaviourImpl.kt b/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/charsequence/contains/searchbehaviours/NoOpSearchBehaviourImpl.kt deleted file mode 100644 index d2b8a7a5d..000000000 --- a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/charsequence/contains/searchbehaviours/NoOpSearchBehaviourImpl.kt +++ /dev/null @@ -1,15 +0,0 @@ -//TODO remove with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.domain.robstoll.lib.creating.charsequence.contains.searchbehaviours - -import ch.tutteli.atrium.domain.creating.charsequence.contains.searchbehaviours.NoOpSearchBehaviour - -/** - * Represents the default search behaviour or rather does not define a search behaviour at all. - * - * It furthermore implements a no operation for [decorateDescription], meaning it passes back the description which - * is passed in (identity function). - */ -@Deprecated("Use class from atrium-logic; will be removed with 1.0.0") -class NoOpSearchBehaviourImpl : NoOpSearchBehaviour diff --git a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/charsequence/contains/searchbehaviours/NotSearchBehaviourImpl.kt b/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/charsequence/contains/searchbehaviours/NotSearchBehaviourImpl.kt deleted file mode 100644 index 2602ca830..000000000 --- a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/charsequence/contains/searchbehaviours/NotSearchBehaviourImpl.kt +++ /dev/null @@ -1,23 +0,0 @@ -//TODO remove with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.domain.robstoll.lib.creating.charsequence.contains.searchbehaviours - -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains -import ch.tutteli.atrium.domain.creating.charsequence.contains.searchbehaviours.NotSearchBehaviour -import ch.tutteli.atrium.reporting.translating.Translatable -import ch.tutteli.atrium.translations.DescriptionCharSequenceAssertion - -/** - * Represents still the default search behaviour but a [CharSequenceContains.Checker] should be used which verifies - * that the [CharSequenceContains.Searcher] could not find the expected object. - */ -@Deprecated("Use class from atrium-logic; will be removed with 1.0.0") -class NotSearchBehaviourImpl : NotSearchBehaviour { - /** - * Returns [DescriptionCharSequenceAssertion.CONTAINS_NOT]. - * @return [DescriptionCharSequenceAssertion.CONTAINS_NOT] - */ - override fun decorateDescription(description: Translatable): Translatable = - DescriptionCharSequenceAssertion.CONTAINS_NOT -} diff --git a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/charsequence/contains/searchbehaviours/searchBehaviours.kt b/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/charsequence/contains/searchbehaviours/searchBehaviours.kt deleted file mode 100644 index 5861dec58..000000000 --- a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/charsequence/contains/searchbehaviours/searchBehaviours.kt +++ /dev/null @@ -1,16 +0,0 @@ -//TODO remove with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.domain.robstoll.lib.creating.charsequence.contains.searchbehaviours - -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains -import ch.tutteli.atrium.domain.creating.charsequence.contains.searchbehaviours.IgnoringCaseSearchBehaviour -import ch.tutteli.atrium.domain.creating.charsequence.contains.searchbehaviours.NoOpSearchBehaviour -import ch.tutteli.atrium.domain.robstoll.lib.creating.charsequence.contains.builders.CharSequenceContainsBuilder - -fun _containsIgnoringCase( - containsBuilder: CharSequenceContains.Builder -): CharSequenceContains.Builder = CharSequenceContainsBuilder( - containsBuilder.subjectProvider, - IgnoringCaseSearchBehaviourImpl(containsBuilder.searchBehaviour) -) diff --git a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/charsequence/contains/searchers/IgnoringCaseIndexSearcher.kt b/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/charsequence/contains/searchers/IgnoringCaseIndexSearcher.kt deleted file mode 100644 index 360b5d06b..000000000 --- a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/charsequence/contains/searchers/IgnoringCaseIndexSearcher.kt +++ /dev/null @@ -1,19 +0,0 @@ -//TODO remove with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.domain.robstoll.lib.creating.charsequence.contains.searchers - -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains.Searcher -import ch.tutteli.atrium.domain.creating.charsequence.contains.searchbehaviours.IgnoringCaseSearchBehaviour - -/** - * Represents a [Searcher] which implements the [IgnoringCaseSearchBehaviour] behaviour and uses - * [CharSequence.indexOf] to find expected objects. - */ -@Deprecated("Use class from atrium-logic; will be removed with 1.0.0") -class IgnoringCaseIndexSearcher : Searcher { - private val searcher = IndexSearcher() - - override fun search(searchIn: CharSequence, searchFor: Any): Int = - searcher.search(searchIn.toString().toUpperCase(), searchFor.toString().toUpperCase()) -} diff --git a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/charsequence/contains/searchers/IgnoringCaseRegexSearcher.kt b/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/charsequence/contains/searchers/IgnoringCaseRegexSearcher.kt deleted file mode 100644 index 23168a5da..000000000 --- a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/charsequence/contains/searchers/IgnoringCaseRegexSearcher.kt +++ /dev/null @@ -1,19 +0,0 @@ -//TODO remove with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.domain.robstoll.lib.creating.charsequence.contains.searchers - -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains.Searcher -import ch.tutteli.atrium.domain.creating.charsequence.contains.searchbehaviours.IgnoringCaseSearchBehaviour - -/** - * Represents a [Searcher] which implements the [IgnoringCaseSearchBehaviour] behaviour and evaluates - * the matches of a given regular expression on the input of the search. - */ -@Deprecated("Use class from atrium-logic; will be removed with 1.0.0") -class IgnoringCaseRegexSearcher : Searcher { - private val searcher = RegexSearcher() - - override fun search(searchIn: CharSequence, searchFor: String): Int = - searcher.search(searchIn, Regex(searchFor, RegexOption.IGNORE_CASE)) -} diff --git a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/charsequence/contains/searchers/IndexSearcher.kt b/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/charsequence/contains/searchers/IndexSearcher.kt deleted file mode 100644 index 9ea50107c..000000000 --- a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/charsequence/contains/searchers/IndexSearcher.kt +++ /dev/null @@ -1,24 +0,0 @@ -//TODO remove with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.domain.robstoll.lib.creating.charsequence.contains.searchers - -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains.Searcher -import ch.tutteli.atrium.domain.creating.charsequence.contains.searchbehaviours.NoOpSearchBehaviour - -/** - * Represents a [Searcher] which uses [CharSequence.indexOf] to find expected objects. - */ -@Deprecated("Use class from atrium-logic; will be removed with 1.0.0") -class IndexSearcher : Searcher { - override fun search(searchIn: CharSequence, searchFor: Any): Int { - val expected = searchFor.toString() - var index = searchIn.indexOf(expected) - var counter = 0 - while (index >= 0) { - index = searchIn.indexOf(expected, index + 1) - ++counter - } - return counter - } -} diff --git a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/charsequence/contains/searchers/RegexSearcher.kt b/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/charsequence/contains/searchers/RegexSearcher.kt deleted file mode 100644 index 21302a141..000000000 --- a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/charsequence/contains/searchers/RegexSearcher.kt +++ /dev/null @@ -1,25 +0,0 @@ -//TODO remove with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.domain.robstoll.lib.creating.charsequence.contains.searchers - -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains.Searcher -import ch.tutteli.atrium.domain.creating.charsequence.contains.searchbehaviours.NoOpSearchBehaviour - -/** - * Represents a [Searcher] which evaluates the matches of a given regular expression on the input of the search. - * - * It performs a non-disjoint search, meaning searching 'aa?' in 'aaaa' has 4 hits. - */ -@Deprecated("Use class from atrium-logic; will be removed with 1.0.0") -class RegexSearcher : Searcher { - override fun search(searchIn: CharSequence, searchFor: Regex): Int { - var counter = 0 - var matchResult = searchFor.find(searchIn) - while (matchResult != null) { - matchResult = searchFor.find(searchIn, matchResult.range.first + 1) - ++counter - } - return counter - } -} diff --git a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/collectionAssertions.kt b/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/collectionAssertions.kt deleted file mode 100644 index 93b6920cb..000000000 --- a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/collectionAssertions.kt +++ /dev/null @@ -1,29 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION") -package ch.tutteli.atrium.domain.robstoll.lib.creating - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.assertions.builders.assertionBuilder -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.domain.builders.ExpectImpl -import ch.tutteli.atrium.domain.creating.changers.ExtractedFeaturePostStep -import ch.tutteli.atrium.translations.DescriptionBasic.IS -import ch.tutteli.atrium.translations.DescriptionBasic.IS_NOT -import ch.tutteli.atrium.translations.DescriptionCollectionAssertion -import ch.tutteli.atrium.translations.DescriptionCollectionAssertion.EMPTY - -@Suppress("DeprecatedCallableAddReplaceWith") -@Deprecated("use the function from atrium-logic instead, will be removed with 1.0.0") -fun _isEmpty(subjectProvider: SubjectProvider>): Assertion = - assertionBuilder.createDescriptive(subjectProvider, IS, EMPTY) { it.isEmpty() } - -@Suppress("DeprecatedCallableAddReplaceWith") -@Deprecated("use the function from atrium-logic instead, will be removed with 1.0.0") -fun _isNotEmpty(subjectProvider: SubjectProvider>): Assertion = - assertionBuilder.createDescriptive(subjectProvider, IS_NOT, EMPTY) { it.isNotEmpty() } - -@Suppress("DeprecatedCallableAddReplaceWith") -@Deprecated("use the function from atrium-logic instead, will be removed with 1.0.0") -fun > _size(expect: Expect): ExtractedFeaturePostStep = - ExpectImpl.feature.manualFeature(expect, DescriptionCollectionAssertion.SIZE) { size } diff --git a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/collectionAssertionsDeprecated.kt b/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/collectionAssertionsDeprecated.kt deleted file mode 100644 index 0f75516e8..000000000 --- a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/collectionAssertionsDeprecated.kt +++ /dev/null @@ -1,21 +0,0 @@ -@file:Suppress( -/* TODO remove annotation with 1.0.0 */ "DEPRECATION", -/* TODO remove annotation with 1.0.0 */ "TYPEALIAS_EXPANSION_DEPRECATION" -) - -package ch.tutteli.atrium.domain.robstoll.lib.creating - -import ch.tutteli.atrium.api.cc.en_GB.property -import ch.tutteli.atrium.api.cc.en_GB.toBe -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.domain.builders.ExpectImpl - -@Suppress("DEPRECATION") -fun _hasSize(plant: AssertionPlant>, size: Int): Assertion = - ExpectImpl.collection.size(plant) { toBe(size) } - -@Suppress("DEPRECATION") -fun _size(plant: AssertionPlant>, assertionCreator: Assert.() -> Unit) = - ExpectImpl.collector.collect(plant) { property(Collection<*>::size, assertionCreator) } diff --git a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/collectors/AssertionCollectorForExplanationImpl.kt b/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/collectors/AssertionCollectorForExplanationImpl.kt deleted file mode 100644 index 381c70364..000000000 --- a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/collectors/AssertionCollectorForExplanationImpl.kt +++ /dev/null @@ -1,62 +0,0 @@ -@file:Suppress("DEPRECATION" /* will be removed with 1.0.0 */) - -package ch.tutteli.atrium.domain.robstoll.lib.creating.collectors - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.assertions.builders.withExplanatoryAssertion -import ch.tutteli.atrium.creating.BaseAssertionPlant -import ch.tutteli.atrium.creating.BaseCollectingAssertionPlant -import ch.tutteli.atrium.creating.MaybeSubject -import ch.tutteli.atrium.creating.PlantHasNoSubjectException -import ch.tutteli.atrium.domain.builders.AssertImpl -import ch.tutteli.atrium.reporting.Text -import ch.tutteli.atrium.reporting.translating.Translatable -import ch.tutteli.atrium.translations.DescriptionBasic - -@Deprecated("Switch from Assert to Expect and use _collectForComposition instead; will be removed with 1.0.0") -class AssertionCollectorForExplanationImpl, C : BaseCollectingAssertionPlant>( - private val throwIfNoAssertionIsCollected: Boolean, - private val collectingPlantFactory: (() -> T) -> C -) { - - fun collect( - warningCannotEvaluate: Translatable, - subject: MaybeSubject, - assertionCreator: (C.() -> Unit)? - ): List { - return try { - val collectedAssertions = collect(subject, assertionCreator) - - require(!(throwIfNoAssertionIsCollected && collectedAssertions.isEmpty())) { - "There was not any assertion created. Specify at least one assertion" - } - - // since assertions can be lazily computed we have to provoke their creation here, - // so that a potential PlantHasNoSubjectException is thrown. It's fine to provoke the computation - // because we require the assertions for the explanation anyway. - expandAssertionGroups(collectedAssertions) - - collectedAssertions - } catch (e: PlantHasNoSubjectException) { - listOf( - AssertImpl.builder.explanatoryGroup - .withWarningType - .withExplanatoryAssertion(warningCannotEvaluate) - .build() - ) - } - } - - private fun collect(@Suppress("DEPRECATION") subject: MaybeSubject, assertionCreator: (C.() -> Unit)?): List { - //TODO almost same as in _containsKeyWithNullableValueAssertions - return if (assertionCreator != null) { - val collectingAssertionPlant = collectingPlantFactory(subject::get) - collectingAssertionPlant.assertionCreator() - collectingAssertionPlant.getAssertions() - } else { - listOf(AssertImpl.builder.createDescriptive(DescriptionBasic.IS, Text.NULL) { - subject is MaybeSubject.Absent - }) - } - } -} diff --git a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/collectors/collectAssertionsDeprecated.kt b/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/collectors/collectAssertionsDeprecated.kt deleted file mode 100644 index a74d54221..000000000 --- a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/collectors/collectAssertionsDeprecated.kt +++ /dev/null @@ -1,23 +0,0 @@ -@file:Suppress("DEPRECATION" /* will be removed with 1.0.0 */) - -package ch.tutteli.atrium.domain.robstoll.lib.creating.collectors - -import ch.tutteli.atrium.assertions.AssertionGroup -import ch.tutteli.atrium.assertions.builders.invisibleGroup -import ch.tutteli.atrium.creating.BaseAssertionPlant -import ch.tutteli.atrium.creating.BaseCollectingAssertionPlant -import ch.tutteli.atrium.domain.builders.AssertImpl - -fun , C : BaseCollectingAssertionPlant> _collectAssertions( - subjectProvider: () -> T, - collectingPlantFactory: (() -> T) -> C, - subPlantAndAssertionCreator: C.() -> Unit -): AssertionGroup { - val collectingPlant = collectingPlantFactory(subjectProvider) - subPlantAndAssertionCreator(collectingPlant) - val collectedAssertions = collectingPlant.getAssertions() - check(collectedAssertions.isNotEmpty()) { - "There was not any assertion created. Did you forget to add it to the plant?" - } - return AssertImpl.builder.invisibleGroup.withAssertions(collectedAssertions).build() -} diff --git a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/collectors/collectOrExplainDeprecated.kt b/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/collectors/collectOrExplainDeprecated.kt deleted file mode 100644 index 5137ceefc..000000000 --- a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/collectors/collectOrExplainDeprecated.kt +++ /dev/null @@ -1,30 +0,0 @@ -@file:Suppress("DEPRECATION" /* will be removed with 1.0.0 */) - -package ch.tutteli.atrium.domain.robstoll.lib.creating.collectors - -import ch.tutteli.atrium.assertions.AssertionGroup -import ch.tutteli.atrium.creating.BaseAssertionPlant -import ch.tutteli.atrium.creating.BaseCollectingAssertionPlant -import ch.tutteli.atrium.creating.MaybeSubject.Absent -import ch.tutteli.atrium.domain.builders.AssertImpl -import ch.tutteli.atrium.reporting.translating.Translatable - -fun , C : BaseCollectingAssertionPlant> _collectOrExplain( - safeToCollect: Boolean, - warningCannotEvaluate: Translatable, - subjectProvider: () -> T, - collectingPlantFactory: (() -> T) -> C, - assertionCreator: C.() -> Unit -): AssertionGroup = if (safeToCollect) { - AssertImpl.collector.collect(subjectProvider, collectingPlantFactory, assertionCreator) -} else { - val explanatoryAssertions = AssertImpl - .collector - .forExplanation - .throwIfNoAssertionIsCollected - .collect(warningCannotEvaluate, Absent, collectingPlantFactory, assertionCreator) - AssertImpl.builder.explanatoryGroup - .withDefaultType - .withAssertions(explanatoryAssertions) - .build() -} diff --git a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/comparableAssertions.kt b/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/comparableAssertions.kt deleted file mode 100644 index 6364bec2e..000000000 --- a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/comparableAssertions.kt +++ /dev/null @@ -1,31 +0,0 @@ -package ch.tutteli.atrium.domain.robstoll.lib.creating - -import ch.tutteli.atrium.assertions.builders.assertionBuilder -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.translations.DescriptionComparableAssertion.* - -@Suppress("DeprecatedCallableAddReplaceWith") -@Deprecated("use the function from atrium-logic instead, will be removed with 1.0.0") -fun , T2 : Any?> _isLessThan(subjectProvider: SubjectProvider, expected: T2) = - assertionBuilder.createDescriptive(subjectProvider, IS_LESS_THAN, expected) { it < expected } - -@Suppress("DeprecatedCallableAddReplaceWith") -@Deprecated("use the function from atrium-logic instead, will be removed with 1.0.0") -fun , T2 : Any?> _isLessThanOrEqual(subjectProvider: SubjectProvider, expected: T2) = - assertionBuilder.createDescriptive(subjectProvider, IS_LESS_THAN_OR_EQUAL, expected) { it <= expected } - -@Suppress("DeprecatedCallableAddReplaceWith") -@Deprecated("use the function from atrium-logic instead, will be removed with 1.0.0") -fun , T2 : Any?> _isGreaterThan(subjectProvider: SubjectProvider, expected: T2) = - assertionBuilder.createDescriptive(subjectProvider, IS_GREATER_THAN, expected) { it > expected } - -@Suppress("DeprecatedCallableAddReplaceWith") -@Deprecated("use the function from atrium-logic instead, will be removed with 1.0.0") -fun , T2 : Any?> _isGreaterThanOrEqual(subjectProvider: SubjectProvider, expected: T2) = - assertionBuilder.createDescriptive(subjectProvider, IS_GREATER_THAN_OR_EQUAL, expected) { it >= expected } - -@Suppress("DeprecatedCallableAddReplaceWith") -@Deprecated("use the function from atrium-logic instead, will be removed with 1.0.0") -fun , T2 : Any?> _isEqualComparingTo(expect: Expect, expected: T2) = - assertionBuilder.createDescriptive(expect, IS_EQUAL, expected) { it.compareTo(expected) == 0 } diff --git a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/feature/extract/creators/FeatureExtractorCreatorImpl.kt b/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/feature/extract/creators/FeatureExtractorCreatorImpl.kt deleted file mode 100644 index 7ed11700c..000000000 --- a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/feature/extract/creators/FeatureExtractorCreatorImpl.kt +++ /dev/null @@ -1,128 +0,0 @@ -@file:Suppress("DEPRECATION" /* will be removed with 1.0.0 */) - -package ch.tutteli.atrium.domain.robstoll.lib.creating.feature.extract.creators - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.assertions.builders.fixedClaimGroup -import ch.tutteli.atrium.assertions.builders.partiallyFixedClaimGroup -import ch.tutteli.atrium.assertions.builders.withExplanatoryAssertion -import ch.tutteli.atrium.core.coreFactory -import ch.tutteli.atrium.core.falseProvider -import ch.tutteli.atrium.creating.* -import ch.tutteli.atrium.domain.builders.AssertImpl -import ch.tutteli.atrium.domain.creating.feature.extract.FeatureExtractor -import ch.tutteli.atrium.reporting.SHOULD_NOT_BE_SHOWN_TO_THE_USER_BUG_TRANSLATABLE -import ch.tutteli.atrium.reporting.Text -import ch.tutteli.atrium.reporting.translating.Translatable - -@Deprecated("Use _extractFeature instead; will be removed with 1.0.0") -abstract class BaseFeatureExtractorCreator, C : BaseCollectingAssertionPlant>( - override val featureRepresentation: Translatable, - override val parameterObject: FeatureExtractor.ParameterObject, - private val plantCreator: (AssertionPlantWithCommonFields.CommonFields) -> A, - private val collectingPlantFactory: (() -> T) -> C -) : FeatureExtractor.CreatorLike { - - override fun extract(): A { - - val isSafeToExtract = safeToExtract() - return if (isSafeToExtract) { - val featureExtractionOnce = featureExtractionOnce() - plantCreator( - AssertionPlantWithCommonFields.CommonFields( - featureRepresentation, - featureExtractionOnce, - featureExtractionOnce, - coreFactory.newFeatureAssertionChecker(parameterObject.subjectPlant), - Text.NULL - ) - ) - } else { - val representationProvider = { parameterObject.extractionNotSuccessful } - val plant = plantCreator( - AssertionPlantWithCommonFields.CommonFields( - SHOULD_NOT_BE_SHOWN_TO_THE_USER_BUG_TRANSLATABLE, - { throw PlantHasNoSubjectException() }, - representationProvider, - coreFactory.newDelegatingAssertionChecker(parameterObject.subjectPlant), - Text.NULL - ) - ) - - plant.addAssertion( - AssertImpl.builder.fixedClaimGroup - .withFeatureType - .failing - .withDescriptionAndRepresentation(featureRepresentation, representationProvider) - .withAssertion( - AssertImpl.builder.explanatoryGroup - .withWarningType - .withExplanatoryAssertion(parameterObject.warningCannotEvaluate) - .build() - ) - .build() - ) - } - } - - private fun featureExtractionOnce(): () -> T { - return { - val subject by lazy { - @Suppress("DEPRECATION") - parameterObject.featureExtraction(parameterObject.subjectPlant.subject) - } - subject - } - } - - override fun extractAndAssertIt(assertionCreator: C.() -> Unit): Assertion { - val isSafeToExtract = safeToExtract() - val featureExtractionOnce = featureExtractionOnce() - return AssertImpl.builder.partiallyFixedClaimGroup - .withFeatureType - .withClaim(isSafeToExtract) - .withDescriptionAndRepresentation(featureRepresentation) { - if (isSafeToExtract) featureExtractionOnce() ?: Text.NULL - else parameterObject.extractionNotSuccessful - } - .withAssertion( - AssertImpl.collector.collectOrExplain( - isSafeToExtract, - parameterObject.warningCannotEvaluate, - featureExtractionOnce, - collectingPlantFactory, - assertionCreator - ) - ) - .build() - } - - private fun safeToExtract(): Boolean = - parameterObject.subjectPlant.maybeSubject.fold(falseProvider, parameterObject.canBeExtracted) -} - -@Suppress("DEPRECATION") -@Deprecated("Use _extractFeature instead; will be removed with 1.0.0") -class FeatureExtractorCreatorImpl( - featureRepresentation: Translatable, - parameterObject: FeatureExtractor.ParameterObject -) : FeatureExtractor.Creator, - BaseFeatureExtractorCreator, CollectingAssertionPlant>( - featureRepresentation, - parameterObject, - AssertImpl.coreFactory::newReportingPlant, - AssertImpl.coreFactory::newCollectingPlant - ) - -@Suppress("DEPRECATION") -@Deprecated("Use _extractFeature instead; will be removed with 1.0.0") -class FeatureExtractorCreatorNullableImpl( - featureRepresentation: Translatable, - parameterObject: FeatureExtractor.ParameterObject -) : FeatureExtractor.CreatorNullable, - BaseFeatureExtractorCreator, CollectingAssertionPlantNullable>( - featureRepresentation, - parameterObject, - AssertImpl.coreFactory::newReportingPlantNullable, - AssertImpl.coreFactory::newCollectingPlantNullable - ) diff --git a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/featureAssertions.kt b/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/featureAssertions.kt deleted file mode 100644 index 7e1af60be..000000000 --- a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/featureAssertions.kt +++ /dev/null @@ -1,21 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION") -package ch.tutteli.atrium.domain.robstoll.lib.creating - -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.domain.builders.ExpectImpl -import ch.tutteli.atrium.domain.creating.MetaFeature -import ch.tutteli.atrium.domain.creating.changers.ExtractedFeaturePostStep -import ch.tutteli.atrium.reporting.Text - -@Suppress("DeprecatedCallableAddReplaceWith") -@Deprecated("use the function from atrium-logic instead, will be removed with 1.0.0") -fun _genericFeature(expect: Expect, metaFeature: MetaFeature): ExtractedFeaturePostStep { - val representation: Any = metaFeature.representation ?: Text.NULL - return ExpectImpl.feature.extractor(expect) - .withDescription(metaFeature.description) - .withRepresentationForFailure(representation) - .withFeatureExtraction { metaFeature.maybeSubject } - .withOptions { withRepresentation { representation } } - .build() -} diff --git a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/featureAssertionsDeprecated.kt b/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/featureAssertionsDeprecated.kt deleted file mode 100644 index 5487576ae..000000000 --- a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/featureAssertionsDeprecated.kt +++ /dev/null @@ -1,145 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION") -package ch.tutteli.atrium.domain.robstoll.lib.creating - -import ch.tutteli.atrium.core.coreFactory -import ch.tutteli.atrium.core.evalOnce -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.creating.AssertionPlantNullable -import ch.tutteli.atrium.creating.AssertionPlantWithCommonFields -import ch.tutteli.atrium.reporting.Text -import ch.tutteli.atrium.reporting.translating.Translatable -import ch.tutteli.atrium.reporting.translating.Untranslatable - -fun _property(plant: AssertionPlant, subjectProvider: () -> TProperty, name: Translatable): AssertionPlant { - val provider = subjectProvider.evalOnce() - return _property(plant, provider, provider, name) -} - -fun _property(plant: AssertionPlant, subjectProvider: () -> TProperty, name: Translatable): AssertionPlantNullable { - val provider = subjectProvider.evalOnce() - return _property(plant, provider, provider, name) -} - -fun _property(plant: AssertionPlant, subjectProvider: () -> TProperty, representationProvider: () -> Any?, name: Translatable): AssertionPlant - = coreFactory.newReportingPlant(plant.createCommonFieldsForFeatureFactory(name, representationProvider, subjectProvider)) - -fun _property(plant: AssertionPlant, subjectProvider: () -> TProperty, representationProvider: () -> Any?, name: Translatable): AssertionPlantNullable - = coreFactory.newReportingPlantNullable(plant.createCommonFieldsForFeatureFactory(name, representationProvider, subjectProvider)) - -private fun AssertionPlant.createCommonFieldsForFeatureFactory(featureName: Translatable, representationProvider: () -> Any?, subjectProvider: () -> TFeature) - = AssertionPlantWithCommonFields.CommonFields(featureName, subjectProvider, representationProvider, coreFactory.newFeatureAssertionChecker(this), Text.NULL) - - -//Arg0 -fun _returnValueOf0(plant: AssertionPlant, method: () -> R, name: String): AssertionPlant - = plant.createPlantForMethod(name, method) - -fun _returnValueOf0(plant: AssertionPlant, method: () -> R, representationProvider: () -> Any?, name: String): AssertionPlant - = plant.createPlantForMethod(name, representationProvider, method) - - -fun _returnValueOf0(plant: AssertionPlant, method: () -> R, name: String): AssertionPlantNullable - = plant.createPlantForMethodNullable(name, method) - -fun _returnValueOf0(plant: AssertionPlant, method: () -> R, representationProvider: () -> Any?, name: String): AssertionPlantNullable - = plant.createPlantForMethodNullable(name, representationProvider, method) - - -//Arg1 -fun _returnValueOf1(plant: AssertionPlant, method: (T1) -> R, arg1: T1, name: String): AssertionPlant - = plant.createPlantForMethod(name, { method(arg1) }, arg1) - -fun _returnValueOf1(plant: AssertionPlant, method: (T1) -> R, arg1: T1, representationProvider: () -> Any?, name: String): AssertionPlant - = plant.createPlantForMethod(name, representationProvider, { method(arg1) }, arg1) - - -fun _returnValueOf1(plant: AssertionPlant, method: (T1) -> R, arg1: T1, name: String): AssertionPlantNullable - = plant.createPlantForMethodNullable(name, { method(arg1) }, arg1) - -fun _returnValueOf1(plant: AssertionPlant, method: (T1) -> R, arg1: T1, representationProvider: () -> Any?, name: String): AssertionPlantNullable - = plant.createPlantForMethodNullable(name, representationProvider, { method(arg1) }, arg1) - -//Arg2 -fun _returnValueOf2(plant: AssertionPlant, method: (T1, T2) -> R, arg1: T1, arg2: T2, name: String): AssertionPlant - = plant.createPlantForMethod(name, { method(arg1, arg2) }, arg1, arg2) - -fun _returnValueOf2(plant: AssertionPlant, method: (T1, T2) -> R, arg1: T1, arg2: T2, representationProvider: () -> Any?, name: String): AssertionPlant - = plant.createPlantForMethod(name, representationProvider, { method(arg1, arg2) }, arg1, arg2) - - -fun _returnValueOf2(plant: AssertionPlant, method: (T1, T2) -> R, arg1: T1, arg2: T2, name: String): AssertionPlantNullable - = plant.createPlantForMethodNullable(name, { method(arg1, arg2) }, arg1, arg2) - -fun _returnValueOf2(plant: AssertionPlant, method: (T1, T2) -> R, arg1: T1, arg2: T2, representationProvider: () -> Any?, name: String): AssertionPlantNullable - = plant.createPlantForMethodNullable(name, representationProvider, { method(arg1, arg2) }, arg1, arg2) - -//Arg3 -fun _returnValueOf3(plant: AssertionPlant, method: (T1, T2, T3) -> R, arg1: T1, arg2: T2, arg3: T3, name: String): AssertionPlant - = plant.createPlantForMethod(name, { method(arg1, arg2, arg3) }, arg1, arg2, arg3) - -fun _returnValueOf3(plant: AssertionPlant, method: (T1, T2, T3) -> R, arg1: T1, arg2: T2, arg3: T3, representationProvider: () -> Any?, name: String): AssertionPlant - = plant.createPlantForMethod(name, representationProvider, { method(arg1, arg2, arg3) }, arg1, arg2, arg3) - - -fun _returnValueOf3(plant: AssertionPlant, method: (T1, T2, T3) -> R, arg1: T1, arg2: T2, arg3: T3, name: String): AssertionPlantNullable - = plant.createPlantForMethodNullable(name, { method(arg1, arg2, arg3) }, arg1, arg2, arg3) - -fun _returnValueOf3(plant: AssertionPlant, method: (T1, T2, T3) -> R, arg1: T1, arg2: T2, arg3: T3, representationProvider: () -> Any?, name: String): AssertionPlantNullable - = plant.createPlantForMethodNullable(name, representationProvider, { method(arg1, arg2, arg3) }, arg1, arg2, arg3) - -//Arg4 -fun _returnValueOf4(plant: AssertionPlant, method: (T1, T2, T3, T4) -> R, arg1: T1, arg2: T2, arg3: T3, arg4: T4, name: String): AssertionPlant - = plant.createPlantForMethod(name, { method(arg1, arg2, arg3, arg4) }, arg1, arg2, arg3, arg4) - -fun _returnValueOf4(plant: AssertionPlant, method: (T1, T2, T3, T4) -> R, arg1: T1, arg2: T2, arg3: T3, arg4: T4, representationProvider: () -> Any?, name: String): AssertionPlant - = plant.createPlantForMethod(name, representationProvider, { method(arg1, arg2, arg3, arg4) }, arg1, arg2, arg3, arg4) - - -fun _returnValueOf4(plant: AssertionPlant, method: (T1, T2, T3, T4) -> R, arg1: T1, arg2: T2, arg3: T3, arg4: T4, name: String): AssertionPlantNullable - = plant.createPlantForMethodNullable(name, { method(arg1, arg2, arg3, arg4) }, arg1, arg2, arg3, arg4) - -fun _returnValueOf4(plant: AssertionPlant, method: (T1, T2, T3, T4) -> R, arg1: T1, arg2: T2, arg3: T3, arg4: T4, representationProvider: () -> Any?, name: String): AssertionPlantNullable - = plant.createPlantForMethodNullable(name, representationProvider, { method(arg1, arg2, arg3, arg4) }, arg1, arg2, arg3, arg4) - -//Arg5 -fun _returnValueOf5(plant: AssertionPlant, method: (T1, T2, T3, T4, T5) -> R, arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, name: String): AssertionPlant - = plant.createPlantForMethod(name, { method(arg1, arg2, arg3, arg4, arg5) }, arg1, arg2, arg3, arg4, arg5) - -fun _returnValueOf5(plant: AssertionPlant, method: (T1, T2, T3, T4, T5) -> R, arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, representationProvider: () -> Any?, name: String): AssertionPlant - = plant.createPlantForMethod(name, representationProvider, { method(arg1, arg2, arg3, arg4, arg5) }, arg1, arg2, arg3, arg4, arg5) - - -fun _returnValueOf5(plant: AssertionPlant, method: (T1, T2, T3, T4, T5) -> R, arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, name: String): AssertionPlantNullable - = plant.createPlantForMethodNullable(name, { method(arg1, arg2, arg3, arg4, arg5) }, arg1, arg2, arg3, arg4, arg5) - -fun _returnValueOf5(plant: AssertionPlant, method: (T1, T2, T3, T4, T5) -> R, arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, representationProvider: () -> Any?, name: String): AssertionPlantNullable - = plant.createPlantForMethodNullable(name, representationProvider, { method(arg1, arg2, arg3, arg4, arg5) }, arg1, arg2, arg3, arg4, arg5) - - - -private fun AssertionPlant.createPlantForMethod(name: String, subjectProvider: () -> R, vararg arguments: Any?): AssertionPlant { - val provider = subjectProvider.evalOnce() - return createPlantForMethod(name, provider as () -> Any?, provider, *arguments) -} - -private fun AssertionPlant.createPlantForMethod(name: String, representationProvider: () -> Any?, subjectProvider: () -> R, vararg arguments: Any?) - = coreFactory.newReportingPlant(createCommonFieldsForFeatureFactory(name, representationProvider, subjectProvider, arguments)) - - -private fun AssertionPlant.createPlantForMethodNullable(name: String, subjectProvider: () -> R, vararg arguments: Any?): AssertionPlantNullable { - val provider = subjectProvider.evalOnce() - return createPlantForMethodNullable(name, provider as () -> Any?, provider, *arguments) -} - -private fun AssertionPlant.createPlantForMethodNullable(name: String, representationProvider: () -> Any?, subjectProvider: () -> R, vararg arguments: Any?) - = coreFactory.newReportingPlantNullable(createCommonFieldsForFeatureFactory(name, representationProvider, subjectProvider, arguments)) - -private fun AssertionPlant.createCommonFieldsForFeatureFactory(name: String, representationProvider: () -> Any?, subjectProvider: () -> R, arguments: Array) - = AssertionPlantWithCommonFields.CommonFields( - Untranslatable(coreFactory.newMethodCallFormatter().formatCall(name, arguments)), - subjectProvider, - representationProvider, - coreFactory.newFeatureAssertionChecker(this), - Text.NULL - ) diff --git a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/floatingPointAssertions.kt b/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/floatingPointAssertions.kt deleted file mode 100644 index 1f8c7b08d..000000000 --- a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/floatingPointAssertions.kt +++ /dev/null @@ -1,82 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION") -@file:JvmMultifileClass -@file:JvmName("floatingPointAssertionsKt") - -package ch.tutteli.atrium.domain.robstoll.lib.creating - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.assertions.ExplanatoryAssertion -import ch.tutteli.atrium.assertions.builders.assertionBuilder -import ch.tutteli.atrium.assertions.builders.withFailureHintBasedOnDefinedSubject -import ch.tutteli.atrium.core.polyfills.formatFloatingPointNumber -import ch.tutteli.atrium.core.polyfills.fullName -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.reporting.translating.TranslatableWithArgs -import ch.tutteli.atrium.translations.DescriptionFloatingPointAssertion.* -import kotlin.jvm.JvmMultifileClass -import kotlin.jvm.JvmName -import kotlin.math.absoluteValue - -@Suppress("DeprecatedCallableAddReplaceWith") -@Deprecated("use the function from atrium-logic instead, will be removed with 1.0.0") -fun _toBeWithErrorTolerance(subjectProvider: SubjectProvider, expected: Float, tolerance: Float): Assertion = - toBeWithErrorToleranceOfFloatOrDouble(subjectProvider, expected, tolerance) { (it - expected).absoluteValue } - -@Suppress("DeprecatedCallableAddReplaceWith") -@Deprecated("use the function from atrium-logic instead, will be removed with 1.0.0") -fun _toBeWithErrorTolerance(subjectProvider: SubjectProvider, expected: Double, tolerance: Double): Assertion = - toBeWithErrorToleranceOfFloatOrDouble(subjectProvider, expected, tolerance) { (it - expected).absoluteValue } - -private fun toBeWithErrorToleranceOfFloatOrDouble( - subjectProvider: SubjectProvider, - expected: T, - tolerance: T, - absDiff: (T) -> T -): Assertion where T : Comparable, T : Number { - return toBeWithErrorTolerance(subjectProvider, expected, tolerance, absDiff) { subject -> - listOf( - assertionBuilder.explanatory - .withExplanation(FAILURE_DUE_TO_FLOATING_POINT_NUMBER, subject::class.fullName) - .build(), - createToBeWithErrorToleranceExplained(subject, expected, absDiff, tolerance) - ) - } -} - -@Suppress("DEPRECATION" /* TODO don't format number here, should be done via ObjectFormatter */) -internal fun createToBeWithErrorToleranceExplained( - subject: T, - expected: T, - absDiff: (T) -> T, - tolerance: T -): ExplanatoryAssertion where T : Comparable, T : Number = assertionBuilder.explanatory - .withExplanation( - TO_BE_WITH_ERROR_TOLERANCE_EXPLAINED, - formatFloatingPointNumber(subject), - formatFloatingPointNumber(expected), - formatFloatingPointNumber(absDiff(subject)), - formatFloatingPointNumber(tolerance) - ) - .build() - -internal fun > toBeWithErrorTolerance( - subjectProvider: SubjectProvider, - expected: T, - tolerance: T, - absDiff: (T) -> T, - explanatoryAssertionCreator: (T) -> List -): Assertion = assertionBuilder.descriptive - .withTest(subjectProvider) { absDiff(it) <= tolerance } - .withFailureHintBasedOnDefinedSubject(subjectProvider) { subject -> - //TODO 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 - assertionBuilder.explanatoryGroup - .withDefaultType - .withAssertions(explanatoryAssertionCreator(subject)) - .build() - } - .withDescriptionAndRepresentation(TranslatableWithArgs(TO_BE_WITH_ERROR_TOLERANCE, tolerance), expected) - .build() diff --git a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/fun0Assertions.kt b/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/fun0Assertions.kt deleted file mode 100644 index 1daa2ce98..000000000 --- a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/fun0Assertions.kt +++ /dev/null @@ -1,77 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.domain.robstoll.lib.creating - -import ch.tutteli.atrium.api.fluent.en_GB.ExperimentalWithOptions -import ch.tutteli.atrium.api.fluent.en_GB.withRepresentation -import ch.tutteli.atrium.core.Either -import ch.tutteli.atrium.core.Left -import ch.tutteli.atrium.core.Right -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.domain.builders.ExpectImpl -import ch.tutteli.atrium.domain.creating.changers.ChangedSubjectPostStep -import ch.tutteli.atrium.domain.robstoll.lib.creating.throwable.thrown.creators.ThrowableThrownFailureHandler -import ch.tutteli.atrium.reporting.reporter -import ch.tutteli.atrium.translations.DescriptionFunLikeAssertion.* -import kotlin.reflect.KClass - - -@Suppress( - "DeprecatedCallableAddReplaceWith", - "DEPRECATION" /* OptIn is only available since 1.3.70 which we cannot use if we want to support 1.2 */ -) -@Deprecated("use the function from atrium-logic instead, will be removed with 1.0.0") -@UseExperimental(ExperimentalWithOptions::class) -fun _isThrowing( - expect: Expect Any?>, - expectedType: KClass -): ChangedSubjectPostStep<*, TExpected> = - ExpectImpl.feature - .manualFeature(expect, THROWN_EXCEPTION_WHEN_CALLED) { - catchAndAdjustThrowable(this).fold( - { it }, - { - // use null as subject in case no exception occurred - null - } - ) - } - .getExpectOfFeature() - .withRepresentation { it ?: NO_EXCEPTION_OCCURRED } - .let { - ExpectImpl.changeSubject(it).reportBuilder() - .downCastTo(expectedType) - .withFailureHandler(ThrowableThrownFailureHandler(maxStackTrace = 7)) - .build() - } - -private inline fun catchAndAdjustThrowable(act: () -> R): Either = - try { - Right(act()) - } catch (throwable: Throwable) { - //TODO should be taken from current expect once it is configured this way - reporter.atriumErrorAdjuster.adjust(throwable) - Left(throwable) - } - -@Suppress("DeprecatedCallableAddReplaceWith") -@Deprecated("use the function from atrium-logic instead, will be removed with 1.0.0") -fun R> _isNotThrowing(expect: Expect): ChangedSubjectPostStep<*, R> { - return ExpectImpl.changeSubject(expect) - .unreported { - catchAndAdjustThrowable(it) - } - .let { eitherContainer -> - ExpectImpl.changeSubject(eitherContainer).reportBuilder() - .withDescriptionAndRepresentation(IS_NOT_THROWING_1, IS_NOT_THROWING_2) - .withTransformation { either -> either.toOption() } - .withFailureHandlerAdapter(ThrowableThrownFailureHandler(maxStackTrace = 15)) { - // must be left as otherwise the failure handler would not kick in. - (it as Left).l - } - .build() - } -} - - diff --git a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/builders/IterableContainsBuilder.kt b/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/builders/IterableContainsBuilder.kt deleted file mode 100644 index 17b76946d..000000000 --- a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/builders/IterableContainsBuilder.kt +++ /dev/null @@ -1,9 +0,0 @@ -package ch.tutteli.atrium.domain.robstoll.lib.creating.iterable.contains.builders - -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.robstoll.lib.creating.basic.contains.builders.ContainsBuilder - -class IterableContainsBuilder, out S : IterableContains.SearchBehaviour>( - subjectProvider: SubjectProvider, searchBehaviour: S -) : ContainsBuilder(subjectProvider, searchBehaviour), IterableContains.Builder diff --git a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/builders/NoOpCheckerOption.kt b/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/builders/NoOpCheckerOption.kt deleted file mode 100644 index c1c45d5ec..000000000 --- a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/builders/NoOpCheckerOption.kt +++ /dev/null @@ -1,24 +0,0 @@ -package ch.tutteli.atrium.domain.robstoll.lib.creating.iterable.contains.builders - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.core.polyfills.fullName -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains - -/** - * Represents a "no [IterableContains.Checker]" option, meaning no checker shall be applied to a search result. - * - * The checking as such is then usually carried out by the [IterableContains.Creator]. - */ -class NoOpCheckerOption, out S : IterableContains.SearchBehaviour>( - override val containsBuilder: IterableContains.Builder -) : IterableContains.CheckerOption { - - override val checkers: List = listOf(NotIntendedForUseChecker) - - private object NotIntendedForUseChecker : IterableContains.Checker { - override fun createAssertion(foundNumberOfTimes: Int): Assertion = throw UnsupportedOperationException( - "You used ${NoOpCheckerOption::class.fullName} but are still using its" + - " ${NoOpCheckerOption, *>::checkers.name} which is a no go." - ) - } -} diff --git a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/checkers/AtLeastChecker.kt b/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/checkers/AtLeastChecker.kt deleted file mode 100644 index d374765e4..000000000 --- a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/checkers/AtLeastChecker.kt +++ /dev/null @@ -1,23 +0,0 @@ -package ch.tutteli.atrium.domain.robstoll.lib.creating.iterable.contains.checkers - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.translations.DescriptionIterableAssertion - -/** - * 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] equals to zero. - * @param atLeastCall The function which was used and should not be used if [times] equals to zero. - * @throws IllegalArgumentException In case [times] is smaller than 1. - */ -class AtLeastChecker( - times: Int, - nameContainsNotFun: String, - atLeastCall: (Int) -> String -) : Checker(times, nameContainsNotFun, atLeastCall) { - - override fun createAssertion(foundNumberOfTimes: Int): Assertion = - createDescriptiveAssertion(DescriptionIterableAssertion.AT_LEAST) { foundNumberOfTimes >= times } -} diff --git a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/checkers/AtMostChecker.kt b/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/checkers/AtMostChecker.kt deleted file mode 100644 index 7efb624bb..000000000 --- a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/checkers/AtMostChecker.kt +++ /dev/null @@ -1,24 +0,0 @@ -package ch.tutteli.atrium.domain.robstoll.lib.creating.iterable.contains.checkers - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.translations.DescriptionIterableAssertion - -/** - * 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] equals to zero. - * @param atMostCall The function which was used and should not be used if [times] equals to zero. - * - * @throws IllegalArgumentException In case [times] is smaller than 1. - */ -class AtMostChecker( - times: Int, - nameContainsNotFun: String, - atMostCall: (Int) -> String -) : Checker(times, nameContainsNotFun, atMostCall) { - - override fun createAssertion(foundNumberOfTimes: Int): Assertion = - createDescriptiveAssertion(DescriptionIterableAssertion.AT_MOST) { foundNumberOfTimes <= times } -} diff --git a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/checkers/Checker.kt b/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/checkers/Checker.kt deleted file mode 100644 index efff5dcd0..000000000 --- a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/checkers/Checker.kt +++ /dev/null @@ -1,21 +0,0 @@ -package ch.tutteli.atrium.domain.robstoll.lib.creating.iterable.contains.checkers - -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.robstoll.lib.creating.basic.contains.checkers.ContainsChecker - -/** - * Represents the base class for [IterableContains.Checker]. - * - * It does not do much more than specifying that its super class is [ContainsChecker] and sub-classes have to implement - * [IterableContains.Checker]. - * - * @param correctCall The function which should be used instead of `wrongCall` when [times] equals to zero. - * @param wrongCall The function call which was used and should not be used if [times] equals to zero. - * - * @throws IllegalArgumentException In case [times] is smaller than 1. - */ -abstract class Checker( - times: Int, - correctCall: String, - wrongCall: (Int) -> String -) : ContainsChecker(times, correctCall, wrongCall), IterableContains.Checker diff --git a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/checkers/ExactlyChecker.kt b/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/checkers/ExactlyChecker.kt deleted file mode 100644 index 974e932a0..000000000 --- a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/checkers/ExactlyChecker.kt +++ /dev/null @@ -1,24 +0,0 @@ -package ch.tutteli.atrium.domain.robstoll.lib.creating.iterable.contains.checkers - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.translations.DescriptionIterableAssertion - -/** - * 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] equals to zero. - * @param exactlyCall The function call which was used and should not be used if [times] equals to zero. - * - * @throws IllegalArgumentException In case [times] is smaller than 1. - */ -class ExactlyChecker( - times: Int, - nameContainsNotFun: String, - exactlyCall: (Int) -> String -) : Checker(times, nameContainsNotFun, exactlyCall) { - - override fun createAssertion(foundNumberOfTimes: Int): Assertion = - createDescriptiveAssertion(DescriptionIterableAssertion.EXACTLY) { foundNumberOfTimes == times } -} diff --git a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/checkers/NotChecker.kt b/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/checkers/NotChecker.kt deleted file mode 100644 index c564bb61f..000000000 --- a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/checkers/NotChecker.kt +++ /dev/null @@ -1,15 +0,0 @@ -package ch.tutteli.atrium.domain.robstoll.lib.creating.iterable.contains.checkers - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.assertions.builders.assertionBuilder -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.translations.DescriptionBasic - -/** - * Represents a check that an expected entry is not contained in the [Iterable]. - */ -class NotChecker : IterableContains.Checker { - - override fun createAssertion(foundNumberOfTimes: Int): Assertion = - assertionBuilder.createDescriptive(DescriptionBasic.IS, 0) { foundNumberOfTimes == 0 } -} diff --git a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/containsHelperFun.kt b/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/containsHelperFun.kt deleted file mode 100644 index 99a125f4a..000000000 --- a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/containsHelperFun.kt +++ /dev/null @@ -1,133 +0,0 @@ -//TODO remove with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.domain.robstoll.lib.creating.iterable.contains - -import ch.tutteli.atrium.api.fluent.en_GB.feature -import ch.tutteli.atrium.api.fluent.en_GB.toBe -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.assertions.AssertionGroup -import ch.tutteli.atrium.assertions.builders.assertionBuilder -import ch.tutteli.atrium.assertions.builders.fixedClaimGroup -import ch.tutteli.atrium.core.* -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.domain.builders.ExpectImpl -import ch.tutteli.atrium.domain.builders.creating.collectors.collectAssertions -import ch.tutteli.atrium.domain.robstoll.lib.assertions.LazyThreadUnsafeAssertionGroup -import ch.tutteli.atrium.reporting.Text -import ch.tutteli.atrium.reporting.translating.TranslatableWithArgs -import ch.tutteli.atrium.translations.DescriptionBasic -import ch.tutteli.atrium.translations.DescriptionIterableAssertion -import ch.tutteli.atrium.translations.DescriptionIterableAssertion.* -import ch.tutteli.kbox.ifWithinBound -import ch.tutteli.kbox.mapRemainingWithCounter - -internal fun createExplanatoryAssertionGroup( - assertionCreatorOrNull: (Expect.() -> Unit)?, - list: List -): AssertionGroup = createExplanatoryAssertionGroup(assertionCreatorOrNull) { - list.asSequence().filterNotNull().map { Some(it) }.firstOrNull() ?: None -} - -internal inline fun createExplanatoryAssertionGroup( - noinline assertionCreatorOrNull: (Expect.() -> Unit)?, - firstOrNull: () -> Option -): AssertionGroup { - return assertionBuilder.explanatoryGroup - .withDefaultType - .let { - if (assertionCreatorOrNull != null) { - it.collectAssertions(firstOrNull(), assertionCreatorOrNull) - } else { - it.withAssertion( - // it is for an explanatoryGroup where it does not matter if the assertion holds or not - // thus it is OK to use trueProvider - assertionBuilder.createDescriptive(DescriptionBasic.IS, Text.NULL, trueProvider) - ) - } - } - .build() -} - -internal fun createEntryAssertion(explanatoryGroup: AssertionGroup, found: Boolean): AssertionGroup { - return assertionBuilder.fixedClaimGroup - .withListType - .withClaim(found) - .withDescriptionAndEmptyRepresentation(AN_ELEMENT_WHICH) - .withAssertion(explanatoryGroup) - .build() -} - -internal fun allCreatedAssertionsHold( - subject: E?, - assertionCreator: (Expect.() -> Unit)? -): Boolean = when (subject) { - null -> assertionCreator == null - else -> assertionCreator != null && ExpectImpl.collector.collect(Some(subject), assertionCreator).holds() -} - -internal fun createEntryAssertionTemplate( - maybeSubject: Option>, - index: Int, - searchCriterion: SC, - entryWithIndex: DescriptionIterableAssertion, - matches: (E, SC) -> Boolean -): ((() -> Boolean) -> Assertion) -> AssertionGroup { - return { createEntryFeatureAssertion -> - val list = maybeSubject.getOrElse { emptyList() } - val (found, entryRepresentation) = list.ifWithinBound(index, { - val entry = list[index] - matches(entry, searchCriterion) to entry - }, { - false to SIZE_EXCEEDED - }) - val description = TranslatableWithArgs(entryWithIndex, index) - assertionBuilder.feature - .withDescriptionAndRepresentation(description, entryRepresentation) - .withAssertion(createEntryFeatureAssertion { found }) - .build() - } -} - -internal fun createSizeFeatureAssertionForInOrderOnly( - expectedSize: Int, - iterableAsList: List, - itr: Iterator -): Assertion { - return ExpectImpl.collector.collect(Some(iterableAsList)) { - feature(Collection<*>::size) { - toBe(expectedSize) - if (iterableAsList.size > expectedSize) { - addAssertion(LazyThreadUnsafeAssertionGroup { - val additionalEntries = itr.mapRemainingWithCounter { counter, it -> - val description = TranslatableWithArgs(ELEMENT_WITH_INDEX, expectedSize + counter) - assertionBuilder.descriptive - .holding - .withDescriptionAndRepresentation(description, it) - .build() - } - - assertionBuilder.explanatoryGroup - .withWarningType - .withAssertion( - assertionBuilder.list - .withDescriptionAndEmptyRepresentation(WARNING_ADDITIONAL_ELEMENTS) - .withAssertions(additionalEntries) - .build() - ) - .build() - }) - } - } - } -} - -internal fun createHasElementAssertion(iterator: Iterator<*>): AssertionGroup { - val hasElement = iterator.hasNext() - return assertionBuilder.feature - .withDescriptionAndRepresentation(HAS_ELEMENT, Text(hasElement.toString())) - .withAssertion( - assertionBuilder.createDescriptive(DescriptionBasic.IS, Text(true.toString())) { hasElement } - ) - .build() -} diff --git a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/creators/InAnyOrderEntriesAssertionCreator.kt b/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/creators/InAnyOrderEntriesAssertionCreator.kt deleted file mode 100644 index 3e284821b..000000000 --- a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/creators/InAnyOrderEntriesAssertionCreator.kt +++ /dev/null @@ -1,130 +0,0 @@ -package ch.tutteli.atrium.domain.robstoll.lib.creating.iterable.contains.creators - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.assertions.AssertionGroup -import ch.tutteli.atrium.assertions.DefaultListAssertionGroupType -import ch.tutteli.atrium.assertions.DefaultSummaryAssertionGroupType -import ch.tutteli.atrium.assertions.builders.assertionBuilder -import ch.tutteli.atrium.core.None -import ch.tutteli.atrium.core.Some -import ch.tutteli.atrium.core.getOrElse -import ch.tutteli.atrium.creating.CollectingExpect -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InAnyOrderSearchBehaviour -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.NotSearchBehaviour -import ch.tutteli.atrium.domain.robstoll.lib.creating.basic.contains.creators.ContainsAssertionCreator -import ch.tutteli.atrium.domain.robstoll.lib.creating.iterable.contains.allCreatedAssertionsHold -import ch.tutteli.atrium.domain.robstoll.lib.creating.iterable.contains.createExplanatoryAssertionGroup -import ch.tutteli.atrium.domain.robstoll.lib.creating.iterable.contains.createHasElementAssertion -import ch.tutteli.atrium.reporting.translating.Translatable -import ch.tutteli.atrium.translations.DescriptionIterableAssertion -import ch.tutteli.atrium.translations.DescriptionIterableAssertion.AN_ELEMENT_WHICH - -/** - * Represents a creator of a sophisticated `contains` assertions for [Iterable] where an expected entry can appear - * in any order and is identified by holding a group of assertions, created by an assertion creator lambda. - * - * @param T The type of the subject of the assertion for which the `contains` assertion is be build. - * - * @property searchBehaviour The search behaviour -- in this case representing `in any order` which is used to - * decorate the description (a [Translatable]) which is used for the [AssertionGroup]. - * - * @constructor Represents a creator of a sophisticated `contains` assertions for [Iterable] where expected entries - * can appear in any order and are identified by holding a group of assertions, created by an assertion - * creator lambda. - * @param searchBehaviour The search behaviour -- in this case representing `in any order` which is used to - * decorate the description (a [Translatable]) which is used for the [AssertionGroup]. - * @param checkers The checkers which create assertions based on the search result. - */ -class InAnyOrderEntriesAssertionCreator>( - searchBehaviour: InAnyOrderSearchBehaviour, - checkers: List -) : ContainsAssertionCreator, (Expect.() -> Unit)?, IterableContains.Checker>(searchBehaviour, checkers), - IterableContains.Creator.() -> Unit)?> { - - - override val descriptionContains: Translatable = DescriptionIterableAssertion.CONTAINS - - override fun makeSubjectMultipleTimesConsumable(subjectProvider: SubjectProvider): SubjectProvider> = - turnSubjectToList(subjectProvider) - - override fun searchAndCreateAssertion( - subjectProvider: SubjectProvider>, - searchCriterion: (Expect.() -> Unit)?, - featureFactory: (Int, Translatable) -> AssertionGroup - ): AssertionGroup { - val iterator = subjectProvider.maybeSubject.getOrElse { emptyList() }.iterator() - val hasElementAssertion = createHasElementAssertion(iterator) - val (explanatoryGroup, count) = - createExplanatoryAssertionsAndMatchingCount(iterator, searchCriterion) - - val featureAssertion = featureFactory(count, DescriptionIterableAssertion.NUMBER_OF_OCCURRENCES) - val assertions = mutableListOf(explanatoryGroup, featureAssertion) - - val groupType = if (searchBehaviour is NotSearchBehaviour) { - assertions.add(hasElementAssertion) - addEmptyAssertionCreatorLambdaIfNecessary(assertions, searchCriterion, count) - DefaultSummaryAssertionGroupType - } else { - DefaultListAssertionGroupType - } - - return assertionBuilder.customType(groupType) - .withDescriptionAndEmptyRepresentation(AN_ELEMENT_WHICH) - .withAssertions(assertions) - .build() - } - - private fun createExplanatoryAssertionsAndMatchingCount( - itr: Iterator, - assertionCreatorOrNull: (Expect.() -> Unit)? - ): Pair { - val (firstNonNullOrNull, sequence) = if (itr.hasNext() && assertionCreatorOrNull != null) { - // we search the first non-null element in order that feature assertions - // which are based on the subject can be showed properly in the explanation - getFirstNonNullAndSequence(itr, sequenceOf()) - } else { - null to itr.asSequence() - } - val group = - createExplanatoryAssertionGroup(assertionCreatorOrNull) { firstNonNullOrNull?.let { Some(it) } ?: None } - val count = sequence.count { allCreatedAssertionsHold(it, assertionCreatorOrNull) } - return group to count - } - - private tailrec fun getFirstNonNullAndSequence(itr: Iterator, sequence: Sequence): Pair> { - return if (itr.hasNext()) { - val first = itr.next() - if (first != null) { - first to sequence + sequenceOf(first) + itr.asSequence() - } else { - getFirstNonNullAndSequence(itr, sequence + sequenceOf(first)) - } - } else { - null to sequence - } - } - - - private fun addEmptyAssertionCreatorLambdaIfNecessary( - assertions: MutableList, - searchCriterion: (Expect.() -> Unit)?, - count: Int - ) { - if (searchCriterion != null && count == 0) { - val container = CollectingExpect(None) - // not using addAssertionsCreatedBy on purpose so that we don't get a failing assertion as well - container.searchCriterion() - val collectedAssertions = container.getAssertions() - if (collectedAssertions.isEmpty()) { - assertions.addAll( - CollectingExpect(None) - .addAssertionsCreatedBy(searchCriterion) - .getAssertions() - ) - } - } - } -} diff --git a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/creators/InAnyOrderEntriesDeprecatedAssertionCreator.kt b/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/creators/InAnyOrderEntriesDeprecatedAssertionCreator.kt deleted file mode 100644 index b9a942495..000000000 --- a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/creators/InAnyOrderEntriesDeprecatedAssertionCreator.kt +++ /dev/null @@ -1,119 +0,0 @@ -//TODO remove with 1.0.0 -@file:Suppress("DEPRECATION") - - -package ch.tutteli.atrium.domain.robstoll.lib.creating.iterable.contains.creators - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.assertions.AssertionGroup -import ch.tutteli.atrium.assertions.DefaultListAssertionGroupType -import ch.tutteli.atrium.assertions.DefaultSummaryAssertionGroupType -import ch.tutteli.atrium.core.getOrElse -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.domain.builders.AssertImpl -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InAnyOrderSearchBehaviour -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.NotSearchBehaviour -import ch.tutteli.atrium.domain.robstoll.lib.creating.basic.contains.creators.ContainsAssertionCreator -import ch.tutteli.atrium.domain.robstoll.lib.creating.iterable.contains.allCreatedAssertionsHold -import ch.tutteli.atrium.domain.robstoll.lib.creating.iterable.contains.collectIterableAssertionsForExplanation -import ch.tutteli.atrium.domain.robstoll.lib.creating.iterable.contains.collectIterableAssertionsForExplanationWithFirst -import ch.tutteli.atrium.domain.robstoll.lib.creating.iterable.contains.createHasElementAssertion -import ch.tutteli.atrium.reporting.translating.Translatable -import ch.tutteli.atrium.translations.DescriptionIterableAssertion -import ch.tutteli.atrium.translations.DescriptionIterableAssertion.AN_ELEMENT_WHICH - -/** - * Represents a creator of a sophisticated `contains` assertions for [Iterable] where an expected entry can appear - * in any order and is identified by holding a group of assertions, created by an assertion creator lambda. - * - * @param T The type of the [AssertionPlant.subject][SubjectProvider.subject] for which the `contains` assertion is be build. - * - * @property searchBehaviour The search behaviour -- in this case representing `in any order` which is used to - * decorate the description (a [Translatable]) which is used for the [AssertionGroup]. - * - * @constructor Represents a creator of a sophisticated `contains` assertions for [Iterable] where expected entries - * can appear in any order and are identified by holding a group of assertions, created by an assertion - * creator lambda. - * @param searchBehaviour The search behaviour -- in this case representing `in any order` which is used to - * decorate the description (a [Translatable]) which is used for the [AssertionGroup]. - * @param checkers The checkers which create assertions based on the search result. - */ -@Deprecated("Switch from Assert to Expect and use InAnyOrderEntriesAssertionCreator; will be removed with 1.0.0") -class InAnyOrderEntriesDeprecatedAssertionCreator>( - searchBehaviour: InAnyOrderSearchBehaviour, - checkers: List -) : ContainsAssertionCreator, (AssertionPlant.() -> Unit)?, IterableContains.Checker>( - searchBehaviour, - checkers -), IterableContains.Creator.() -> Unit)?> { - - override val descriptionContains: Translatable = DescriptionIterableAssertion.CONTAINS - - override fun makeSubjectMultipleTimesConsumable(subjectProvider: SubjectProvider): SubjectProvider> = - turnSubjectToList(subjectProvider) - - override fun searchAndCreateAssertion( - subjectProvider: SubjectProvider>, - searchCriterion: (AssertionPlant.() -> Unit)?, - featureFactory: (Int, Translatable) -> AssertionGroup - ): AssertionGroup { - val iterator = subjectProvider.maybeSubject.getOrElse { emptyList() }.iterator() - val hasElementAssertion = createHasElementAssertion(iterator) - val (explanatoryAssertions, count) = createExplanatoryAssertionsAndMatchingCount( - iterator, - searchCriterion - ) - val explanatoryGroup = AssertImpl.builder.explanatoryGroup - .withDefaultType - .withAssertions(explanatoryAssertions) - .build() - val featureAssertion = featureFactory(count, DescriptionIterableAssertion.NUMBER_OF_OCCURRENCES) - val assertions = mutableListOf(explanatoryGroup, featureAssertion) - - val groupType = if (searchBehaviour is NotSearchBehaviour) { - assertions.add(hasElementAssertion) - DefaultSummaryAssertionGroupType - } else { - DefaultListAssertionGroupType - } - - return AssertImpl.builder.customType(groupType) - .withDescriptionAndEmptyRepresentation(AN_ELEMENT_WHICH) - .withAssertions(assertions) - .build() - } - - @Suppress("DEPRECATION") - private fun createExplanatoryAssertionsAndMatchingCount( - itr: Iterator, - assertionCreator: (AssertionPlant.() -> Unit)? - ): Pair, Int> { - return if (itr.hasNext()) { - val (firstNonNullOrNull, sequence) = getFirstNonNullAndSequence(itr, sequenceOf()) - val group = collectIterableAssertionsForExplanationWithFirst(assertionCreator, firstNonNullOrNull) - val count = sequence.count { allCreatedAssertionsHold(it, assertionCreator) } - group to count - } else { - val group = collectIterableAssertionsForExplanation( - assertionCreator, - ch.tutteli.atrium.creating.MaybeSubject.Absent - ) - group to 0 - } - } - - private tailrec fun getFirstNonNullAndSequence(itr: Iterator, sequence: Sequence): Pair> { - return if (itr.hasNext()) { - val first = itr.next() - if (first != null) { - first to sequence + sequenceOf(first) + itr.asSequence() - } else { - getFirstNonNullAndSequence(itr, sequence + sequenceOf(first)) - } - } else { - null to sequence - } - } -} diff --git a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/creators/InAnyOrderOnlyAssertionCreator.kt b/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/creators/InAnyOrderOnlyAssertionCreator.kt deleted file mode 100644 index c067f7d2f..000000000 --- a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/creators/InAnyOrderOnlyAssertionCreator.kt +++ /dev/null @@ -1,127 +0,0 @@ -//TODO remove with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.domain.robstoll.lib.creating.iterable.contains.creators - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.assertions.AssertionGroup -import ch.tutteli.atrium.assertions.builders.assertionBuilder -import ch.tutteli.atrium.assertions.builders.invisibleGroup -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InAnyOrderOnlySearchBehaviour -import ch.tutteli.atrium.domain.robstoll.lib.assertions.LazyThreadUnsafeAssertionGroup -import ch.tutteli.atrium.reporting.Text -import ch.tutteli.atrium.reporting.translating.Translatable -import ch.tutteli.atrium.reporting.translating.Untranslatable -import ch.tutteli.atrium.translations.DescriptionAnyAssertion.TO_BE -import ch.tutteli.atrium.translations.DescriptionIterableAssertion -import ch.tutteli.atrium.translations.DescriptionIterableAssertion.* - -/** - * Represents the base class for `in any order only` assertion creators and provides a corresponding template to fulfill - * its responsibility. - * - * @param T The type of the subject of the assertion for which the `contains` assertion is be build. - * @param SC The type of the search criteria. - * - * @property searchBehaviour The search behaviour -- in this case representing `in any order only` which is used to - * decorate the description (a [Translatable]) which is used for the [AssertionGroup]. - * - * @constructor Represents the base class for `in any order only` assertion creators and provides a corresponding - * template to fulfill its responsibility. - * @param searchBehaviour The search behaviour -- in this case representing `in any order only` which is used to - * decorate the description (a [Translatable]) which is used for the [AssertionGroup]. - */ -abstract class InAnyOrderOnlyAssertionCreator, in SC>( - private val searchBehaviour: InAnyOrderOnlySearchBehaviour -) : IterableContains.Creator { - - final override fun createAssertionGroup( - subjectProvider: SubjectProvider, - searchCriteria: List - ): AssertionGroup { - return LazyThreadUnsafeAssertionGroup { - val list = subjectProvider.maybeSubject.fold({ mutableListOf() }) { it.toMutableList() } - val actualSize = list.size - val assertions = mutableListOf() - - val mismatches = createAssertionsForAllSearchCriteria(searchCriteria, list, assertions) - val featureAssertions = createSizeFeatureAssertion(searchCriteria, actualSize) - if (mismatches == 0 && list.isNotEmpty()) { - featureAssertions.add(LazyThreadUnsafeAssertionGroup { - createExplanatoryGroupForMismatchesEtc(list, WARNING_ADDITIONAL_ELEMENTS) - }) - } - assertions.add( - assertionBuilder.feature - .withDescriptionAndRepresentation(Untranslatable("size"), Text(actualSize.toString())) - .withAssertions(featureAssertions) - .build() - ) - - val description = searchBehaviour.decorateDescription(CONTAINS) - val summary = assertionBuilder.summary - .withDescription(description) - .withAssertions(assertions) - .build() - - if (mismatches != 0 && list.isNotEmpty()) { - val warningDescription = when (list.size) { - mismatches -> WARNING_MISMATCHES - else -> WARNING_MISMATCHES_ADDITIONAL_ENTRIES - } - assertionBuilder.invisibleGroup - .withAssertions( - summary, - createExplanatoryGroupForMismatchesEtc(list, warningDescription) - ) - .build() - } else { - summary - } - } - } - - private fun createAssertionsForAllSearchCriteria( - allSearchCriteria: List, - list: MutableList, - assertions: MutableList - ): Int { - var mismatches = 0 - allSearchCriteria.forEach { - val (found, assertion) = createAssertionForSearchCriterionAndRemoveMatchFromList(it, list) - if (!found) ++mismatches - assertions.add(assertion) - } - return mismatches - } - - protected abstract fun createAssertionForSearchCriterionAndRemoveMatchFromList( - searchCriterion: SC, - list: MutableList - ): Pair - - private fun createSizeFeatureAssertion(allSearchCriteria: List, actualSize: Int): MutableList = - mutableListOf( - assertionBuilder.descriptive - .withTest { actualSize == allSearchCriteria.size } - .withDescriptionAndRepresentation(TO_BE, Text(allSearchCriteria.size.toString())) - .build() - ) - - private fun createExplanatoryGroupForMismatchesEtc( - list: MutableList, - warning: DescriptionIterableAssertion - ): AssertionGroup { - val assertions = list.map { assertionBuilder.explanatory.withExplanation(it).build() } - val additionalEntries = assertionBuilder.list - .withDescriptionAndEmptyRepresentation(warning) - .withAssertions(assertions) - .build() - return assertionBuilder.explanatoryGroup - .withWarningType - .withAssertion(additionalEntries) - .build() - } -} diff --git a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/creators/InAnyOrderOnlyEntriesAssertionCreator.kt b/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/creators/InAnyOrderOnlyEntriesAssertionCreator.kt deleted file mode 100644 index 489629895..000000000 --- a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/creators/InAnyOrderOnlyEntriesAssertionCreator.kt +++ /dev/null @@ -1,48 +0,0 @@ -package ch.tutteli.atrium.domain.robstoll.lib.creating.iterable.contains.creators - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.assertions.AssertionGroup -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InAnyOrderOnlySearchBehaviour -import ch.tutteli.atrium.domain.robstoll.lib.creating.iterable.contains.allCreatedAssertionsHold -import ch.tutteli.atrium.domain.robstoll.lib.creating.iterable.contains.createEntryAssertion -import ch.tutteli.atrium.domain.robstoll.lib.creating.iterable.contains.createExplanatoryAssertionGroup -import ch.tutteli.atrium.reporting.translating.Translatable - -/** - * Represents a creator of a sophisticated `contains` assertions for [Iterable] where exactly the expected entries have - * to appear in the [Iterable] but in any order -- an entry is identified by holding a group of assertions - * created by an assertion creator lambda. - * - * @param T The type of the subject of the assertion for which the `contains` assertion is be build. - * - * @constructor Represents a creator of a sophisticated `contains` assertions for [Iterable] where exactly the expected - * entries have to appear in the [Iterable] but in any order -- an entry is identified by holding a group - * of assertions created by an assertion creator lambda. - * @param searchBehaviour The search behaviour -- in this case representing `in any order only` which is used to - * decorate the description (a [Translatable]) which is used for the [AssertionGroup]. - */ -class InAnyOrderOnlyEntriesAssertionCreator>( - searchBehaviour: InAnyOrderOnlySearchBehaviour -) : InAnyOrderOnlyAssertionCreator.() -> Unit)?>(searchBehaviour) { - - override fun createAssertionForSearchCriterionAndRemoveMatchFromList( - searchCriterion: (Expect.() -> Unit)?, - list: MutableList - ): Pair { - val explanatoryAssertions = createExplanatoryAssertionGroup(searchCriterion, list) - val found = removeMatch(list, searchCriterion) - return found to createEntryAssertion(explanatoryAssertions, found) - } - - private fun removeMatch(list: MutableList, assertionCreator: (Expect.() -> Unit)?): Boolean { - val itr = list.iterator() - while (itr.hasNext()) { - if (allCreatedAssertionsHold(itr.next(), assertionCreator)) { - itr.remove() - return true - } - } - return false - } -} diff --git a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/creators/InAnyOrderOnlyEntriesDeprecatedAssertionCreator.kt b/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/creators/InAnyOrderOnlyEntriesDeprecatedAssertionCreator.kt deleted file mode 100644 index 4cbf7af1f..000000000 --- a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/creators/InAnyOrderOnlyEntriesDeprecatedAssertionCreator.kt +++ /dev/null @@ -1,55 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove annotation with 1.0.0 */) - -package ch.tutteli.atrium.domain.robstoll.lib.creating.iterable.contains.creators - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.assertions.AssertionGroup -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InAnyOrderOnlySearchBehaviour -import ch.tutteli.atrium.domain.robstoll.lib.creating.iterable.contains.allCreatedAssertionsHold -import ch.tutteli.atrium.domain.robstoll.lib.creating.iterable.contains.createEntryAssertion -import ch.tutteli.atrium.domain.robstoll.lib.creating.iterable.contains.createExplanatoryAssertions -import ch.tutteli.atrium.reporting.translating.Translatable - -/** - * Represents a creator of a sophisticated `contains` assertions for [Iterable] where exactly the expected entries have - * to appear in the [Iterable] but in any order -- an entry is identified by holding a group of assertions - * created by an assertion creator lambda. - * - * @param T The type of the [AssertionPlant.subject][SubjectProvider.subject] for which the `contains` assertion is be build. - * - * @constructor Represents a creator of a sophisticated `contains` assertions for [Iterable] where exactly the expected - * entries have to appear in the [Iterable] but in any order -- an entry is identified by holding a group - * of assertions created by an assertion creator lambda. - * @param searchBehaviour The search behaviour -- in this case representing `in any order only` which is used to - * decorate the description (a [Translatable]) which is used for the [AssertionGroup]. - */ -@Deprecated("Switch from Assert to Expect and use InAnyOrderOnlyEntriesAssertionCreator; will be removed with 1.0.0") -class InAnyOrderOnlyEntriesDeprecatedAssertionCreator>( - searchBehaviour: InAnyOrderOnlySearchBehaviour -) : InAnyOrderOnlyAssertionCreator.() -> Unit)?>(searchBehaviour) { - - override fun createAssertionForSearchCriterionAndRemoveMatchFromList( - searchCriterion: (AssertionPlant.() -> Unit)?, - list: MutableList - ): Pair { - @Suppress("DEPRECATION") - val explanatoryAssertions = createExplanatoryAssertions(searchCriterion, list) - val found = removeMatch(list, searchCriterion) - @Suppress("DEPRECATION") - return found to createEntryAssertion(explanatoryAssertions, found) - } - - private fun removeMatch(list: MutableList, assertionCreator: (AssertionPlant.() -> Unit)?): Boolean { - val itr = list.iterator() - while (itr.hasNext()) { - @Suppress("DEPRECATION") - if (allCreatedAssertionsHold(itr.next(), assertionCreator)) { - itr.remove() - return true - } - } - return false - } -} diff --git a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/creators/InAnyOrderOnlyValuesAssertionCreator.kt b/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/creators/InAnyOrderOnlyValuesAssertionCreator.kt deleted file mode 100644 index 858c6c791..000000000 --- a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/creators/InAnyOrderOnlyValuesAssertionCreator.kt +++ /dev/null @@ -1,33 +0,0 @@ -package ch.tutteli.atrium.domain.robstoll.lib.creating.iterable.contains.creators - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.assertions.AssertionGroup -import ch.tutteli.atrium.assertions.builders.assertionBuilder -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InAnyOrderOnlySearchBehaviour -import ch.tutteli.atrium.reporting.translating.Translatable -import ch.tutteli.atrium.translations.DescriptionIterableAssertion.AN_ELEMENT_WHICH_EQUALS - -/** - * Represents a creator of a sophisticated `contains` assertions for [Iterable] where exactly the expected entries have - * to appear in the [Iterable] but in any order -- an entry is identified by an expected object (equality comparison). - * - * @param T The type of the subject of the assertion for which the `contains` assertion is be build. - * - * @constructor Represents a creator of a sophisticated `contains` assertions for [Iterable] where exactly the expected - * entries have to appear in the [Iterable] but in any order -- an entry is identified by an expected - * object (equality comparison). - * @param searchBehaviour The search behaviour -- in this case representing `in any order only` which is used to - * decorate the description (a [Translatable]) which is used for the [AssertionGroup]. - */ -class InAnyOrderOnlyValuesAssertionCreator>( - searchBehaviour: InAnyOrderOnlySearchBehaviour -) : InAnyOrderOnlyAssertionCreator(searchBehaviour) { - - override fun createAssertionForSearchCriterionAndRemoveMatchFromList( - searchCriterion: E, - list: MutableList - ): Pair { - val found: Boolean = list.remove(searchCriterion) - return found to assertionBuilder.createDescriptive(AN_ELEMENT_WHICH_EQUALS, searchCriterion) { found } - } -} diff --git a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/creators/InAnyOrderValuesAssertionCreator.kt b/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/creators/InAnyOrderValuesAssertionCreator.kt deleted file mode 100644 index 7babc6988..000000000 --- a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/creators/InAnyOrderValuesAssertionCreator.kt +++ /dev/null @@ -1,66 +0,0 @@ -package ch.tutteli.atrium.domain.robstoll.lib.creating.iterable.contains.creators - -import ch.tutteli.atrium.assertions.* -import ch.tutteli.atrium.core.getOrElse -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InAnyOrderSearchBehaviour -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.NotSearchBehaviour -import ch.tutteli.atrium.domain.robstoll.lib.creating.basic.contains.creators.ContainsObjectsAssertionCreator -import ch.tutteli.atrium.domain.robstoll.lib.creating.iterable.contains.createHasElementAssertion -import ch.tutteli.atrium.reporting.translating.Translatable -import ch.tutteli.atrium.translations.DescriptionIterableAssertion - -/** - * Represents a creator of a sophisticated `contains` assertions for [Iterable] where an expected entry can appear - * in any order and is identified by expected objects (equality comparison). - * - * @param T The type of the subject of the assertion for which the `contains` assertion is be build. - * @param SC The type of the elements of the iterable, used as search criteria. - * - * @constructor Represents a creator of a sophisticated `contains` assertions for [Iterable] where expected entries - * can appear in any order and are identified by expected objects (equality comparison). - * @param searchBehaviour The search behaviour -- in this case representing `in any order` which is used to - * decorate the description (a [Translatable]) which is used for the [AssertionGroup]. - * @param checkers The checkers which create assertions based on the search result. - */ -class InAnyOrderValuesAssertionCreator>( - searchBehaviour: InAnyOrderSearchBehaviour, - checkers: List -) : ContainsObjectsAssertionCreator, SC, InAnyOrderSearchBehaviour, IterableContains.Checker>( - searchBehaviour, - checkers -), IterableContains.Creator { - - override val descriptionContains: Translatable = DescriptionIterableAssertion.CONTAINS - override val descriptionNumberOfOccurrences: Translatable = DescriptionIterableAssertion.NUMBER_OF_OCCURRENCES - override val groupDescription: Translatable = DescriptionIterableAssertion.AN_ELEMENT_WHICH_EQUALS - - override fun getAssertionGroupType(): AssertionGroupType { - return if (searchBehaviour is NotSearchBehaviour) { - DefaultSummaryAssertionGroupType - } else { - DefaultListAssertionGroupType - } - } - - override fun makeSubjectMultipleTimesConsumable(subjectProvider: SubjectProvider): SubjectProvider> = - turnSubjectToList(subjectProvider) - - override fun search(subjectProvider: SubjectProvider>, searchCriterion: SC): Int = - subjectProvider.maybeSubject.fold({ -1 }) { subject -> subject.filter { it == searchCriterion }.size } - - override fun decorateAssertion( - subjectProvider: SubjectProvider>, - featureAssertion: Assertion - ): List { - return if (searchBehaviour is NotSearchBehaviour) { - listOf( - featureAssertion, - createHasElementAssertion(subjectProvider.maybeSubject.getOrElse { emptyList() }.iterator()) - ) - } else { - listOf(featureAssertion) - } - } -} diff --git a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/creators/InOrderOnlyAssertionCreator.kt b/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/creators/InOrderOnlyAssertionCreator.kt deleted file mode 100644 index b336df3a9..000000000 --- a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/creators/InOrderOnlyAssertionCreator.kt +++ /dev/null @@ -1,39 +0,0 @@ -package ch.tutteli.atrium.domain.robstoll.lib.creating.iterable.contains.creators - -import ch.tutteli.atrium.assertions.AssertionGroup -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InOrderOnlySearchBehaviour -import ch.tutteli.atrium.reporting.translating.Translatable -import ch.tutteli.atrium.translations.DescriptionIterableAssertion - -/** - * Represents the base class for `in order only` assertion creators and provides a corresponding template to fulfill - * its responsibility. - * - * @param T The type of the subject of the assertion for which the `contains` assertion is be build. - * @param SC The type of the search criteria. - * - * @property searchBehaviour The search behaviour -- in this case representing `in order only` which is used to - * decorate the description (a [Translatable]) which is used for the [AssertionGroup]. - * - * @constructor Represents the base class for `in any order only` assertion creators and provides a corresponding - * template to fulfill its responsibility. - * @param searchBehaviour The search behaviour -- in this case representing `in order only` which is used to - * decorate the description (a [Translatable]) which is used for the [AssertionGroup]. - */ -abstract class InOrderOnlyAssertionCreator, SC>( - searchBehaviour: InOrderOnlySearchBehaviour -) : InOrderOnlyBaseAssertionCreator(searchBehaviour), - //TODO use protected visibility once https://youtrack.jetbrains.com/issue/KT-24328 is implemented - InOrderOnlyMatcher { - - override fun Expect>.createAssertionsAndReturnIndex(searchCriteria: List): Int { - var index = 0 - searchCriteria.forEachIndexed { currentIndex, searchCriterion -> - createSingleEntryAssertion(currentIndex, searchCriterion, DescriptionIterableAssertion.ELEMENT_WITH_INDEX) - index = currentIndex - } - ++index - return index - } -} diff --git a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/creators/InOrderOnlyBaseAssertionCreator.kt b/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/creators/InOrderOnlyBaseAssertionCreator.kt deleted file mode 100644 index a69ab54b7..000000000 --- a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/creators/InOrderOnlyBaseAssertionCreator.kt +++ /dev/null @@ -1,46 +0,0 @@ -//TODO remove with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.domain.robstoll.lib.creating.iterable.contains.creators - -import ch.tutteli.atrium.assertions.AssertionGroup -import ch.tutteli.atrium.assertions.builders.assertionBuilder -import ch.tutteli.atrium.core.Some -import ch.tutteli.atrium.core.getOrElse -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.domain.builders.ExpectImpl -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.robstoll.lib.assertions.LazyThreadUnsafeAssertionGroup -import ch.tutteli.atrium.domain.robstoll.lib.creating.iterable.contains.createSizeFeatureAssertionForInOrderOnly -import ch.tutteli.atrium.translations.DescriptionIterableAssertion -import ch.tutteli.kbox.ifWithinBound - -abstract class InOrderOnlyBaseAssertionCreator, SC>( - private val searchBehaviour: IterableContains.SearchBehaviour -) : IterableContains.Creator { - - final override fun createAssertionGroup( - subjectProvider: SubjectProvider, - searchCriteria: List - ): AssertionGroup { - return LazyThreadUnsafeAssertionGroup { - val subject = turnSubjectToList(subjectProvider).maybeSubject.getOrElse { emptyList() } - val assertion = ExpectImpl.collector.collect(Some(subject)) { - val index = createAssertionsAndReturnIndex(searchCriteria) - val remainingList = subject.ifWithinBound(index, - { subject.subList(index, subject.size) }, - { emptyList() } - ) - addAssertion(createSizeFeatureAssertionForInOrderOnly(index, subject, remainingList.iterator())) - } - val description = searchBehaviour.decorateDescription(DescriptionIterableAssertion.CONTAINS) - assertionBuilder.summary - .withDescription(description) - .withAssertion(assertion) - .build() - } - } - - protected abstract fun Expect>.createAssertionsAndReturnIndex(searchCriteria: List): Int -} diff --git a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/creators/InOrderOnlyDeprecatedAssertionCreator.kt b/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/creators/InOrderOnlyDeprecatedAssertionCreator.kt deleted file mode 100644 index ef0d8a64a..000000000 --- a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/creators/InOrderOnlyDeprecatedAssertionCreator.kt +++ /dev/null @@ -1,66 +0,0 @@ -//TODO remove this file with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.domain.robstoll.lib.creating.iterable.contains.creators - -import ch.tutteli.atrium.assertions.AssertionGroup -import ch.tutteli.atrium.core.getOrElse -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.domain.builders.AssertImpl -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InOrderOnlySearchBehaviour -import ch.tutteli.atrium.domain.robstoll.lib.assertions.LazyThreadUnsafeAssertionGroup -import ch.tutteli.atrium.domain.robstoll.lib.creating.iterable.contains.createSizeFeatureAssertionForInOrderOnly -import ch.tutteli.atrium.reporting.translating.Translatable -import ch.tutteli.atrium.translations.DescriptionIterableAssertion - -/** - * Represents the base class for `in order only` assertion creators and provides a corresponding template to fulfill - * its responsibility. - * - * @param T The type of the [AssertionPlant.subject][SubjectProvider.subject] for which the `contains` assertion is be build. - * @param SC The type of the search criteria. - * - * @property searchBehaviour The search behaviour -- in this case representing `in order only` which is used to - * decorate the description (a [Translatable]) which is used for the [AssertionGroup]. - * - * @constructor Represents the base class for `in any order only` assertion creators and provides a corresponding - * template to fulfill its responsibility. - * @param searchBehaviour The search behaviour -- in this case representing `in order only` which is used to - * decorate the description (a [Translatable]) which is used for the [AssertionGroup]. - */ -@Deprecated("Switch from Assert to Expect and use InOrderOnlyAssertionCreator; will be removed with 1.0.0") -abstract class InOrderOnlyDeprecatedAssertionCreator, SC>( - private val searchBehaviour: InOrderOnlySearchBehaviour -) : IterableContains.Creator, - //TODO use protected visibility once https://youtrack.jetbrains.com/issue/KT-24328 is implemented - InOrderOnlyDeprecatedMatcher { - - final override fun createAssertionGroup( - subjectProvider: SubjectProvider, - searchCriteria: List - ): AssertionGroup { - return LazyThreadUnsafeAssertionGroup { - val subject = turnSubjectToList(subjectProvider).maybeSubject.getOrElse { emptyList() } - val assertion = AssertImpl.collector.collect({ subject }) { - var index = 0 - searchCriteria.forEachIndexed { currentIndex, searchCriterion -> - createSingleEntryAssertion( - currentIndex, - searchCriterion, - DescriptionIterableAssertion.ELEMENT_WITH_INDEX - ) - index = currentIndex - } - ++index - val remainingList = if (index < subject.size) subject.subList(index, subject.size) else listOf() - addAssertion(createSizeFeatureAssertionForInOrderOnly(index, subject, remainingList.iterator())) - } - val description = searchBehaviour.decorateDescription(DescriptionIterableAssertion.CONTAINS) - AssertImpl.builder.summary - .withDescription(description) - .withAssertion(assertion) - .build() - } - } -} diff --git a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/creators/InOrderOnlyDeprecatedMatcher.kt b/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/creators/InOrderOnlyDeprecatedMatcher.kt deleted file mode 100644 index e764f958d..000000000 --- a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/creators/InOrderOnlyDeprecatedMatcher.kt +++ /dev/null @@ -1,32 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.domain.robstoll.lib.creating.iterable.contains.creators - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.creating.CollectingAssertionPlant -import ch.tutteli.atrium.domain.robstoll.lib.creating.iterable.contains.createEntryAssertionTemplate -import ch.tutteli.atrium.translations.DescriptionIterableAssertion - -@Deprecated("Switch from Assert to Expect and use InOrderOnlyMatcher; will be removed with 1.0.0") -interface InOrderOnlyDeprecatedMatcher { - fun matches(actual: E, searchCriterion: SC): Boolean - - fun entryAssertionCreator(subjectProvider: () -> List, searchCriterion: SC): (() -> Boolean) -> Assertion - - @Suppress("DEPRECATION") - fun CollectingAssertionPlant>.createSingleEntryAssertion( - currentIndex: Int, - searchCriterion: SC, - translatableIndex: DescriptionIterableAssertion - ) { - @Suppress("DEPRECATION") val template = createEntryAssertionTemplate( - this.subjectProvider, - currentIndex, - searchCriterion, - translatableIndex, - ::matches - ) - addAssertion(template(entryAssertionCreator(this.subjectProvider, searchCriterion))) - } -} diff --git a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/creators/InOrderOnlyEntriesAssertionCreator.kt b/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/creators/InOrderOnlyEntriesAssertionCreator.kt deleted file mode 100644 index 9e1148f86..000000000 --- a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/creators/InOrderOnlyEntriesAssertionCreator.kt +++ /dev/null @@ -1,24 +0,0 @@ -package ch.tutteli.atrium.domain.robstoll.lib.creating.iterable.contains.creators - -import ch.tutteli.atrium.assertions.AssertionGroup -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InOrderOnlySearchBehaviour -import ch.tutteli.atrium.reporting.translating.Translatable - -/** - * Represents a creator of a sophisticated `contains` assertions for [Iterable] where exactly the expected entries - * have to appear in the specified order and where an entry is identified by holding a group of assertions, - * created by an assertion creator lambda. - * - * @param T The type of the subject of the assertion for which the `contains` assertion is be build. - * - * @constructor Represents a creator of a sophisticated `contains` assertions for [Iterable] where exactly the - * expected entries have to appear in the specified order and where an entry is identified by holding a - * group of assertions, created by an assertion creator lambda. - * @param searchBehaviour The search behaviour -- in this case representing `in any order only` which is used to - * decorate the description (a [Translatable]) which is used for the [AssertionGroup]. - */ -class InOrderOnlyEntriesAssertionCreator>( - searchBehaviour: InOrderOnlySearchBehaviour -) : InOrderOnlyAssertionCreator.() -> Unit)?>(searchBehaviour), - InOrderOnlyMatcher.() -> Unit)?> by InOrderOnlyEntriesMatcher() diff --git a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/creators/InOrderOnlyEntriesDeprecatedAssertionCreator.kt b/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/creators/InOrderOnlyEntriesDeprecatedAssertionCreator.kt deleted file mode 100644 index de0fb5270..000000000 --- a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/creators/InOrderOnlyEntriesDeprecatedAssertionCreator.kt +++ /dev/null @@ -1,29 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove annotation with 1.0.0 */) - -package ch.tutteli.atrium.domain.robstoll.lib.creating.iterable.contains.creators - -import ch.tutteli.atrium.assertions.AssertionGroup -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InOrderOnlySearchBehaviour -import ch.tutteli.atrium.reporting.translating.Translatable - -/** - * Represents a creator of a sophisticated `contains` assertions for [Iterable] where exactly the expected entries - * have to appear in the specified order and where an entry is identified by holding a group of assertions, - * created by an assertion creator lambda. - * - * @param T The type of the [AssertionPlant.subject][SubjectProvider.subject] for which the `contains` assertion is be build. - * - * @constructor Represents a creator of a sophisticated `contains` assertions for [Iterable] where exactly the - * expected entries have to appear in the specified order and where an entry is identified by holding a - * group of assertions, created by an assertion creator lambda. - * @param searchBehaviour The search behaviour -- in this case representing `in any order only` which is used to - * decorate the description (a [Translatable]) which is used for the [AssertionGroup]. - */ -@Suppress("DEPRECATION") -@Deprecated("Switch from Assert to Expect and use InOrderOnlyEntriesAssertionCreator; will be removed with 1.0.0") -class InOrderOnlyEntriesDeprecatedAssertionCreator>( - searchBehaviour: InOrderOnlySearchBehaviour -) : InOrderOnlyDeprecatedAssertionCreator.() -> Unit)?>(searchBehaviour), - InOrderOnlyDeprecatedMatcher.() -> Unit)?> by InOrderOnlyEntriesDeprecatedMatcher() diff --git a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/creators/InOrderOnlyEntriesDeprecatedMatcher.kt b/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/creators/InOrderOnlyEntriesDeprecatedMatcher.kt deleted file mode 100644 index cbda2b0bb..000000000 --- a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/creators/InOrderOnlyEntriesDeprecatedMatcher.kt +++ /dev/null @@ -1,25 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove annotation with 1.0.0 */) - -package ch.tutteli.atrium.domain.robstoll.lib.creating.iterable.contains.creators - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.domain.robstoll.lib.creating.iterable.contains.allCreatedAssertionsHold -import ch.tutteli.atrium.domain.robstoll.lib.creating.iterable.contains.createEntryAssertion -import ch.tutteli.atrium.domain.robstoll.lib.creating.iterable.contains.createExplanatoryAssertions - -@Suppress("DEPRECATION") -@Deprecated("Switch from Assert to Expect and use InOrderOnlyEntriesMatcher; will be removed with 1.0.0") -class InOrderOnlyEntriesDeprecatedMatcher : InOrderOnlyDeprecatedMatcher.() -> Unit)?> { - - override fun matches(actual: E?, searchCriterion: (AssertionPlant.() -> Unit)?): Boolean = - allCreatedAssertionsHold(actual, searchCriterion) - - override fun entryAssertionCreator( - subjectProvider: () -> List, - searchCriterion: (AssertionPlant.() -> Unit)? - ): (() -> Boolean) -> Assertion { - val explanatoryAssertions = createExplanatoryAssertions(searchCriterion, subjectProvider()) - return { found -> createEntryAssertion(explanatoryAssertions, found()) } - } -} diff --git a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/creators/InOrderOnlyEntriesMatcher.kt b/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/creators/InOrderOnlyEntriesMatcher.kt deleted file mode 100644 index d64d99542..000000000 --- a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/creators/InOrderOnlyEntriesMatcher.kt +++ /dev/null @@ -1,23 +0,0 @@ -package ch.tutteli.atrium.domain.robstoll.lib.creating.iterable.contains.creators - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.core.Option -import ch.tutteli.atrium.core.getOrElse -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.domain.robstoll.lib.creating.iterable.contains.allCreatedAssertionsHold -import ch.tutteli.atrium.domain.robstoll.lib.creating.iterable.contains.createEntryAssertion -import ch.tutteli.atrium.domain.robstoll.lib.creating.iterable.contains.createExplanatoryAssertionGroup - -class InOrderOnlyEntriesMatcher : InOrderOnlyMatcher.() -> Unit)?> { - - override fun matches(actual: E?, searchCriterion: (Expect.() -> Unit)?): Boolean = - allCreatedAssertionsHold(actual, searchCriterion) - - override fun entryAssertionCreator( - maybeSubject: Option>, - searchCriterion: (Expect.() -> Unit)? - ): (() -> Boolean) -> Assertion { - val explanatoryGroup = createExplanatoryAssertionGroup(searchCriterion, maybeSubject.getOrElse { emptyList() }) - return { found -> createEntryAssertion(explanatoryGroup, found()) } - } -} diff --git a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/creators/InOrderOnlyGroupedAssertionCreator.kt b/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/creators/InOrderOnlyGroupedAssertionCreator.kt deleted file mode 100644 index a2b214f20..000000000 --- a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/creators/InOrderOnlyGroupedAssertionCreator.kt +++ /dev/null @@ -1,61 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION") -package ch.tutteli.atrium.domain.robstoll.lib.creating.iterable.contains.creators - -import ch.tutteli.atrium.core.Option -import ch.tutteli.atrium.core.getOrElse -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.domain.builders.ExpectImpl -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InOrderOnlyGroupedSearchBehaviour -import ch.tutteli.atrium.reporting.translating.TranslatableWithArgs -import ch.tutteli.atrium.translations.DescriptionIterableAssertion - -abstract class InOrderOnlyGroupedAssertionCreator, SC>( - searchBehaviour: InOrderOnlyGroupedSearchBehaviour -) : InOrderOnlyBaseAssertionCreator>(searchBehaviour), - //TODO use protected visibility once https://youtrack.jetbrains.com/issue/KT-24328 is implemented - InOrderOnlyMatcher { - - final override fun Expect>.createAssertionsAndReturnIndex( - searchCriteria: List> - ): Int { - var index = 0 - searchCriteria.forEach { group -> - val currentIndex = index - val untilIndex = index + group.size - if (group.size == 1) { - createSingleEntryAssertion(currentIndex, group[0], DescriptionIterableAssertion.INDEX) - } else { - createSublistAssertion(currentIndex, untilIndex, group, maybeSubject.getOrElse { emptyList() }) - } - index = untilIndex - } - return index - } - - private fun Expect>.createSublistAssertion( - currentIndex: Int, - untilIndex: Int, - groupOfSearchCriteria: List, - subject: List - ) { - ExpectImpl.feature.extractor(this) - .withDescription( - TranslatableWithArgs(DescriptionIterableAssertion.INDEX_FROM_TO, currentIndex, untilIndex - 1) - ) - .withRepresentationForFailure(DescriptionIterableAssertion.SIZE_EXCEEDED) - .withFeatureExtraction { - Option.someIf(currentIndex <= it.size) { - val safeUntilIndex = if (untilIndex < subject.size) untilIndex else subject.size - subject.subList(currentIndex, safeUntilIndex) - } - } - .withoutOptions() - .build() - .addToInitial { - createSublistAssertion(groupOfSearchCriteria) - } - } - - protected abstract fun Expect>.createSublistAssertion(groupOfSearchCriteria: List) -} diff --git a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/creators/InOrderOnlyGroupedDeprecatedAssertionCreator.kt b/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/creators/InOrderOnlyGroupedDeprecatedAssertionCreator.kt deleted file mode 100644 index 4286b0e33..000000000 --- a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/creators/InOrderOnlyGroupedDeprecatedAssertionCreator.kt +++ /dev/null @@ -1,78 +0,0 @@ -@file:Suppress( -/* TODO remove annotation with 1.0.0 */ "DEPRECATION", -/* TODO remove annotation with 1.0.0 */ "TYPEALIAS_EXPANSION_DEPRECATION" -) -package ch.tutteli.atrium.domain.robstoll.lib.creating.iterable.contains.creators - -import ch.tutteli.atrium.assertions.AssertionGroup -import ch.tutteli.atrium.core.evalOnce -import ch.tutteli.atrium.core.getOrElse -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.CollectingAssertionPlant -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.domain.builders.AssertImpl -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InOrderOnlyGroupedSearchBehaviour -import ch.tutteli.atrium.domain.robstoll.lib.assertions.LazyThreadUnsafeAssertionGroup -import ch.tutteli.atrium.domain.robstoll.lib.creating.iterable.contains.createSizeFeatureAssertionForInOrderOnly -import ch.tutteli.atrium.reporting.translating.TranslatableWithArgs -import ch.tutteli.atrium.translations.DescriptionIterableAssertion -import ch.tutteli.kbox.ifWithinBound - -@Suppress("DEPRECATION") -@Deprecated("Switch from Assert to Expect and use InOrderOnlyGroupedAssertionCreator; will be removed with 1.0.0") -abstract class InOrderOnlyGroupedDeprecatedAssertionCreator, SC>( - private val searchBehaviour: InOrderOnlyGroupedSearchBehaviour -) : IterableContains.Creator>, - InOrderOnlyDeprecatedMatcher { - - override fun createAssertionGroup( - subjectProvider: SubjectProvider, - searchCriteria: List> - ): AssertionGroup { - return LazyThreadUnsafeAssertionGroup { - val subject = turnSubjectToList(subjectProvider).maybeSubject.getOrElse { emptyList() } - val assertion = AssertImpl.collector.collect({ subject }) { - - var index = 0 - searchCriteria.forEach { group -> - val currentIndex = index - val untilIndex = index + group.size - if (group.size == 1) { - createSingleEntryAssertion(currentIndex, group[0], DescriptionIterableAssertion.INDEX) - } else { - createSublistAssertion(currentIndex, untilIndex, group, subject) - } - index = untilIndex - } - val remainingList = if (index < subject.size) subject.subList(index, subject.size) else listOf() - addAssertion(createSizeFeatureAssertionForInOrderOnly(index, subject, remainingList.iterator())) - } - val description = searchBehaviour.decorateDescription(DescriptionIterableAssertion.CONTAINS) - AssertImpl.builder.summary - .withDescription(description) - .withAssertion(assertion) - .build() - } - } - - private fun CollectingAssertionPlant>.createSublistAssertion( - currentIndex: Int, - untilIndex: Int, - groupOfSearchCriteria: List, - subject: List - ) { - val subListProvider = { - val safeUntilIndex = if (untilIndex < subject.size) untilIndex else subject.size - subject.subList(currentIndex, safeUntilIndex) - }.evalOnce() - val sizeExceededProvider = { DescriptionIterableAssertion.SIZE_EXCEEDED } - val representationProvider = { subject.ifWithinBound(currentIndex, subListProvider, sizeExceededProvider) } - val featureName = TranslatableWithArgs(DescriptionIterableAssertion.INDEX_FROM_TO, currentIndex, untilIndex - 1) - AssertImpl.feature.property(this, subListProvider, representationProvider, featureName) { - createSublistAssertion(groupOfSearchCriteria) - } - } - - protected abstract fun Assert>.createSublistAssertion(groupOfSearchCriteria: List) -} diff --git a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/creators/InOrderOnlyGroupedEntriesAssertionCreator.kt b/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/creators/InOrderOnlyGroupedEntriesAssertionCreator.kt deleted file mode 100644 index 385e39851..000000000 --- a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/creators/InOrderOnlyGroupedEntriesAssertionCreator.kt +++ /dev/null @@ -1,20 +0,0 @@ -package ch.tutteli.atrium.domain.robstoll.lib.creating.iterable.contains.creators - -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.domain.builders.ExpectImpl -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InOrderOnlyGroupedSearchBehaviour - -class InOrderOnlyGroupedEntriesAssertionCreator>( - searchBehaviour: InOrderOnlyGroupedSearchBehaviour -) : InOrderOnlyGroupedAssertionCreator.() -> Unit)?>(searchBehaviour), - InOrderOnlyMatcher.() -> Unit)?> by InOrderOnlyEntriesMatcher() { - - override fun Expect>.createSublistAssertion(groupOfSearchCriteria: List<(Expect.() -> Unit)?>) { - val inAnyOrderOnly = ExpectImpl.iterable.contains.searchBehaviours.inAnyOrderOnly( - ExpectImpl.iterable.contains.searchBehaviours.inAnyOrder( - ExpectImpl.iterable.containsBuilder(this) - ) - ) - addAssertion(ExpectImpl.iterable.contains.entriesInAnyOrderOnly(inAnyOrderOnly, groupOfSearchCriteria)) - } -} diff --git a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/creators/InOrderOnlyGroupedEntriesDeprecatedAssertionCreator.kt b/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/creators/InOrderOnlyGroupedEntriesDeprecatedAssertionCreator.kt deleted file mode 100644 index b3bd8a8d9..000000000 --- a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/creators/InOrderOnlyGroupedEntriesDeprecatedAssertionCreator.kt +++ /dev/null @@ -1,32 +0,0 @@ -@file:Suppress( -/* TODO remove annotation with 1.0.0 */ "DEPRECATION", -/* TODO remove annotation with 1.0.0 */ "TYPEALIAS_EXPANSION_DEPRECATION" -) - -package ch.tutteli.atrium.domain.robstoll.lib.creating.iterable.contains.creators - -import ch.tutteli.atrium.api.cc.en_GB.contains -import ch.tutteli.atrium.api.cc.en_GB.inAnyOrder -import ch.tutteli.atrium.api.cc.en_GB.only -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.domain.builders.AssertImpl -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InOrderOnlyGroupedSearchBehaviour - -@Suppress("DEPRECATION") -@Deprecated("Switch from Assert to Expect and use InOrderOnlyGroupedEntriesAssertionCreator; will be removed with 1.0.0") -class InOrderOnlyGroupedEntriesDeprecatedAssertionCreator>( - searchBehaviour: InOrderOnlyGroupedSearchBehaviour -) : InOrderOnlyGroupedDeprecatedAssertionCreator.() -> Unit)?>(searchBehaviour), - InOrderOnlyDeprecatedMatcher.() -> Unit)?> by InOrderOnlyEntriesDeprecatedMatcher() { - - override fun Assert>.createSublistAssertion(groupOfSearchCriteria: List<(AssertionPlant.() -> Unit)?>) { - val inAnyOrderOnly = contains.inAnyOrder.only - addAssertion( - AssertImpl.iterable.contains.entriesInAnyOrderOnlyWithAssert( - inAnyOrderOnly, - groupOfSearchCriteria - ) - ) - } -} diff --git a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/creators/InOrderOnlyGroupedValuesAssertionCreator.kt b/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/creators/InOrderOnlyGroupedValuesAssertionCreator.kt deleted file mode 100644 index 1cff72b85..000000000 --- a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/creators/InOrderOnlyGroupedValuesAssertionCreator.kt +++ /dev/null @@ -1,20 +0,0 @@ -package ch.tutteli.atrium.domain.robstoll.lib.creating.iterable.contains.creators - -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.domain.builders.ExpectImpl.iterable -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InOrderOnlyGroupedSearchBehaviour - -class InOrderOnlyGroupedValuesAssertionCreator>( - searchBehaviour: InOrderOnlyGroupedSearchBehaviour -) : InOrderOnlyGroupedAssertionCreator(searchBehaviour), - InOrderOnlyMatcher by InOrderOnlyValueMatcher() { - - override fun Expect>.createSublistAssertion(groupOfSearchCriteria: List) { - val inAnyOrderOnly = iterable.contains.searchBehaviours.inAnyOrderOnly( - iterable.contains.searchBehaviours.inAnyOrder( - iterable.containsBuilder(this) - ) - ) - addAssertion(iterable.contains.valuesInAnyOrderOnly(inAnyOrderOnly, groupOfSearchCriteria)) - } -} diff --git a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/creators/InOrderOnlyMatcher.kt b/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/creators/InOrderOnlyMatcher.kt deleted file mode 100644 index 7ca58d1cd..000000000 --- a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/creators/InOrderOnlyMatcher.kt +++ /dev/null @@ -1,28 +0,0 @@ -package ch.tutteli.atrium.domain.robstoll.lib.creating.iterable.contains.creators - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.core.Option -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.domain.robstoll.lib.creating.iterable.contains.createEntryAssertionTemplate -import ch.tutteli.atrium.translations.DescriptionIterableAssertion - -interface InOrderOnlyMatcher { - fun matches(actual: E, searchCriterion: SC): Boolean - - fun entryAssertionCreator(maybeSubject: Option>, searchCriterion: SC): (() -> Boolean) -> Assertion - - fun Expect>.createSingleEntryAssertion( - currentIndex: Int, - searchCriterion: SC, - translatableIndex: DescriptionIterableAssertion - ) { - val template = createEntryAssertionTemplate( - this.maybeSubject, - currentIndex, - searchCriterion, - translatableIndex, - ::matches - ) - addAssertion(template(entryAssertionCreator(this.maybeSubject, searchCriterion))) - } -} diff --git a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/creators/InOrderOnlyValueMatcher.kt b/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/creators/InOrderOnlyValueMatcher.kt deleted file mode 100644 index d021c02ca..000000000 --- a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/creators/InOrderOnlyValueMatcher.kt +++ /dev/null @@ -1,18 +0,0 @@ -package ch.tutteli.atrium.domain.robstoll.lib.creating.iterable.contains.creators - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.assertions.builders.assertionBuilder -import ch.tutteli.atrium.core.Option -import ch.tutteli.atrium.translations.DescriptionAnyAssertion.TO_BE - -class InOrderOnlyValueMatcher : InOrderOnlyMatcher { - - override fun matches(actual: E, searchCriterion: E): Boolean = actual == searchCriterion - - override fun entryAssertionCreator( - maybeSubject: Option>, - searchCriterion: E - ): (() -> Boolean) -> Assertion = { found -> - assertionBuilder.createDescriptive(TO_BE, searchCriterion, found) - } -} diff --git a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/creators/InOrderOnlyValuesAssertionCreator.kt b/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/creators/InOrderOnlyValuesAssertionCreator.kt deleted file mode 100644 index 3d9460ee3..000000000 --- a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/creators/InOrderOnlyValuesAssertionCreator.kt +++ /dev/null @@ -1,24 +0,0 @@ -package ch.tutteli.atrium.domain.robstoll.lib.creating.iterable.contains.creators - -import ch.tutteli.atrium.assertions.AssertionGroup -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InOrderOnlySearchBehaviour -import ch.tutteli.atrium.reporting.translating.Translatable - -/** - * Represents a creator of a sophisticated `contains` assertions for [Iterable] where exactly the expected entries - * have to appear in the specified order and where an entry is identified by an expected object (equality comparison). - * - * @param T The type of the [AssertionPlant.subject][SubjectProvider.subject] for which the `contains` assertion is be build. - * - * @constructor Represents a creator of a sophisticated `contains` assertions for [Iterable] where exactly the - * expected entries have to appear in the specified order and where an entry is identified by an - * expected object (equality comparison). - * @param searchBehaviour The search behaviour -- in this case representing `in any order only` which is used to - * decorate the description (a [Translatable]) which is used for the [AssertionGroup]. - */ -class InOrderOnlyValuesAssertionCreator>( - searchBehaviour: InOrderOnlySearchBehaviour -) : InOrderOnlyAssertionCreator(searchBehaviour), - //TODO use protected visibility once https://youtrack.jetbrains.com/issue/KT-24328 is implemented - InOrderOnlyMatcher by InOrderOnlyValueMatcher() diff --git a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/creators/creators.kt b/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/creators/creators.kt deleted file mode 100644 index 9b1eaa131..000000000 --- a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/creators/creators.kt +++ /dev/null @@ -1,92 +0,0 @@ -package ch.tutteli.atrium.domain.robstoll.lib.creating.iterable.contains.creators - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.assertions.AssertionGroup -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InAnyOrderOnlySearchBehaviour -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InAnyOrderSearchBehaviour -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InOrderOnlyGroupedSearchBehaviour -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InOrderOnlySearchBehaviour -import ch.tutteli.atrium.domain.robstoll.lib.creating.iterable.contains.builders.NoOpCheckerOption - -fun > _containsValuesInAnyOrder( - checkerOption: IterableContains.CheckerOption, - expected: List -): Assertion = createAssertionGroup(checkerOption, expected, ::InAnyOrderValuesAssertionCreator) - -fun > _containsEntriesInAnyOrder( - checkerOption: IterableContains.CheckerOption, - assertionCreators: List<(Expect.() -> Unit)?> -): Assertion = createAssertionGroup(checkerOption, assertionCreators, ::InAnyOrderEntriesAssertionCreator) - - -fun > _containsValuesInAnyOrderOnly( - builder: IterableContains.Builder, - expected: List -): Assertion { - val checkerBuilder = NoOpCheckerOption(builder) - return createAssertionGroupWithoutChecker(checkerBuilder, expected, ::InAnyOrderOnlyValuesAssertionCreator) -} - -fun > _containsEntriesInAnyOrderOnly( - builder: IterableContains.Builder, - assertionCreators: List<(Expect.() -> Unit)?> -): Assertion { - val checkerBuilder = NoOpCheckerOption(builder) - return createAssertionGroupWithoutChecker( - checkerBuilder, assertionCreators, ::InAnyOrderOnlyEntriesAssertionCreator - ) -} - - -fun > _containsValuesInOrderOnly( - builder: IterableContains.Builder, - expected: List -): Assertion { - val checkerBuilder = NoOpCheckerOption(builder) - return createAssertionGroupWithoutChecker(checkerBuilder, expected, ::InOrderOnlyValuesAssertionCreator) -} - -fun > _containsEntriesInOrderOnly( - builder: IterableContains.Builder, - assertionCreators: List<(Expect.() -> Unit)?> -): Assertion { - val checkerBuilder = NoOpCheckerOption(builder) - return createAssertionGroupWithoutChecker(checkerBuilder, assertionCreators, ::InOrderOnlyEntriesAssertionCreator) -} - -fun > _containsValuesInOrderOnlyGrouped( - builder: IterableContains.Builder, - groups: List> -): Assertion { - val checkerBuilder = NoOpCheckerOption(builder) - return createAssertionGroupWithoutChecker(checkerBuilder, groups, ::InOrderOnlyGroupedValuesAssertionCreator) -} - -fun > _containsEntriesInOrderOnlyGrouped( - builder: IterableContains.Builder, - groups: List.() -> Unit)?>> -): Assertion { - val checkerBuilder = NoOpCheckerOption(builder) - return createAssertionGroupWithoutChecker(checkerBuilder, groups, ::InOrderOnlyGroupedEntriesAssertionCreator) -} - - -private fun , SC, S : IterableContains.SearchBehaviour> createAssertionGroupWithoutChecker( - checkerOption: IterableContains.CheckerOption, - expected: List, - factory: (S) -> IterableContains.Creator -): AssertionGroup { - val creator = factory(checkerOption.containsBuilder.searchBehaviour) - return creator.createAssertionGroup(checkerOption.containsBuilder.subjectProvider, expected) -} - -private fun , SC, S : IterableContains.SearchBehaviour> createAssertionGroup( - checkerOption: IterableContains.CheckerOption, - expected: List, - factory: (S, List) -> IterableContains.Creator -): AssertionGroup { - val creator = factory(checkerOption.containsBuilder.searchBehaviour, checkerOption.checkers) - return creator.createAssertionGroup(checkerOption.containsBuilder.subjectProvider, expected) -} diff --git a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/creators/creatorsDeprecated.kt b/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/creators/creatorsDeprecated.kt deleted file mode 100644 index 45f908de7..000000000 --- a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/creators/creatorsDeprecated.kt +++ /dev/null @@ -1,72 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0 */) - -package ch.tutteli.atrium.domain.robstoll.lib.creating.iterable.contains.creators - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.assertions.AssertionGroup -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InAnyOrderOnlySearchBehaviour -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InAnyOrderSearchBehaviour -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InOrderOnlyGroupedSearchBehaviour -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InOrderOnlySearchBehaviour -import ch.tutteli.atrium.domain.robstoll.lib.creating.iterable.contains.builders.NoOpCheckerOption - -fun > _containsEntriesInAnyOrder( - checkerOption: IterableContains.CheckerOption, - assertionCreators: List<(AssertionPlant.() -> Unit)?> -): Assertion = createAssertionGroup(checkerOption, assertionCreators, ::InAnyOrderEntriesDeprecatedAssertionCreator) - -fun > _containsEntriesInAnyOrderOnly( - builder: IterableContains.Builder, - assertionCreators: List<(AssertionPlant.() -> Unit)?> -): Assertion { - val checkerBuilder = NoOpCheckerOption(builder) - return createAssertionGroupWithoutChecker( - checkerBuilder, - assertionCreators, - ::InAnyOrderOnlyEntriesDeprecatedAssertionCreator - ) -} - -fun > _containsEntriesInOrderOnly( - builder: IterableContains.Builder, - assertionCreators: List<(AssertionPlant.() -> Unit)?> -): Assertion { - val checkerBuilder = NoOpCheckerOption(builder) - return createAssertionGroupWithoutChecker( - checkerBuilder, - assertionCreators, - ::InOrderOnlyEntriesDeprecatedAssertionCreator - ) -} - -fun > _containsEntriesInOrderOnlyGrouped( - builder: IterableContains.Builder, - groups: List.() -> Unit)?>> -): Assertion { - val checkerBuilder = NoOpCheckerOption(builder) - return createAssertionGroupWithoutChecker( - checkerBuilder, - groups, - ::InOrderOnlyGroupedEntriesDeprecatedAssertionCreator - ) -} - -private fun , SC, S : IterableContains.SearchBehaviour> createAssertionGroupWithoutChecker( - checkerOption: IterableContains.CheckerOption, - expected: List, - factory: (S) -> IterableContains.Creator -): AssertionGroup { - val creator = factory(checkerOption.containsBuilder.searchBehaviour) - return creator.createAssertionGroup(checkerOption.containsBuilder.subjectProvider, expected) -} - -private fun , SC, S : IterableContains.SearchBehaviour> createAssertionGroup( - checkerOption: IterableContains.CheckerOption, - expected: List, - factory: (S, List) -> IterableContains.Creator -): AssertionGroup { - val creator = factory(checkerOption.containsBuilder.searchBehaviour, checkerOption.checkers) - return creator.createAssertionGroup(checkerOption.containsBuilder.subjectProvider, expected) -} diff --git a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/creators/iterableMultiConsumable.kt b/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/creators/iterableMultiConsumable.kt deleted file mode 100644 index c97cb426d..000000000 --- a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/creators/iterableMultiConsumable.kt +++ /dev/null @@ -1,29 +0,0 @@ -package ch.tutteli.atrium.domain.robstoll.lib.creating.iterable.contains.creators - -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.domain.builders.ExpectImpl - -@Suppress("DEPRECATION" /* TODO switch to Expect instead of SubjectProvider and remove this annotation with 1.0.0 */) -fun turnSubjectToList(subjectProvider: SubjectProvider>): SubjectProvider> = - subjectProvider.maybeSubject.fold( - { - @Suppress( - // if the subject is not present, then we do not have to make it multiple times consumable and - // can safely cast the type of the subject to List - "UNCHECKED_CAST" - ) - subjectProvider as SubjectProvider> - }, - { subject -> - if (subject is List) { - @Suppress( - // if the subject is already a list, then we don't have to perform a subject change at all and - // can cast safely the subject to List - "UNCHECKED_CAST" - ) - subjectProvider as SubjectProvider> - } else { - ExpectImpl.changeSubject(subjectProvider).unreported { it.toList() } - } - } - ) diff --git a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/deprecatedContainsHelperFun.kt b/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/deprecatedContainsHelperFun.kt deleted file mode 100644 index 7fe429167..000000000 --- a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/deprecatedContainsHelperFun.kt +++ /dev/null @@ -1,120 +0,0 @@ -//TODO remove with 1.0.0 -@file:Suppress("DEPRECATION") - - -package ch.tutteli.atrium.domain.robstoll.lib.creating.iterable.contains - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.assertions.AssertionGroup -import ch.tutteli.atrium.assertions.builders.assertionBuilder -import ch.tutteli.atrium.core.coreFactory -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.creating.MaybeSubject -import ch.tutteli.atrium.domain.builders.ExpectImpl -import ch.tutteli.atrium.reporting.Text -import ch.tutteli.atrium.reporting.translating.Translatable -import ch.tutteli.atrium.reporting.translating.TranslatableWithArgs -import ch.tutteli.atrium.translations.DescriptionIterableAssertion -import ch.tutteli.atrium.translations.DescriptionIterableAssertion.CANNOT_EVALUATE_SUBJECT_EMPTY_ITERABLE -import ch.tutteli.atrium.translations.DescriptionIterableAssertion.CANNOT_EVALUATE_SUBJECT_ONLY_NULL -import ch.tutteli.kbox.ifWithinBound - -@Suppress("DeprecatedCallableAddReplaceWith") -@Deprecated("Will be removed with 1.0.0") -internal fun createExplanatoryAssertions( - assertionCreator: (AssertionPlant.() -> Unit)?, - list: List -): List { - return when { - list.isNotEmpty() -> - collectIterableAssertionsForExplanationWithFirst(assertionCreator, list.firstOrNull { it != null }) - else -> - collectIterableAssertionsForExplanation(assertionCreator, MaybeSubject.Absent) - } -} - -@Suppress("DeprecatedCallableAddReplaceWith", "DEPRECATION") -@Deprecated("Will be removed with 1.0.0") -internal fun collectIterableAssertionsForExplanationWithFirst( - assertionCreator: (AssertionPlant.() -> Unit)?, - first: E? -): List { - return if (first != null) { - collectIterableAssertionsForExplanation(assertionCreator, MaybeSubject.Present(first)) - } else { - collectIterableAssertionsForExplanation( - CANNOT_EVALUATE_SUBJECT_ONLY_NULL, - assertionCreator, - MaybeSubject.Absent - ) - } -} - -@Suppress("DeprecatedCallableAddReplaceWith") -@Deprecated("Will be removed with 1.0.0") -internal fun collectIterableAssertionsForExplanation( - assertionCreator: (AssertionPlant.() -> Unit)?, - maybeSubject: MaybeSubject -) = collectIterableAssertionsForExplanation(CANNOT_EVALUATE_SUBJECT_EMPTY_ITERABLE, assertionCreator, maybeSubject) - -internal fun collectIterableAssertionsForExplanation( - warningCannotEvaluate: Translatable, - assertionCreator: (AssertionPlant.() -> Unit)?, - maybeSubject: MaybeSubject -) = ExpectImpl.collector - .forExplanation - .throwIfNoAssertionIsCollected - .collect(warningCannotEvaluate, maybeSubject, assertionCreator) - - -@Suppress("DeprecatedCallableAddReplaceWith", "DEPRECATION") -@Deprecated("Will be removed with 1.0.0") -internal fun allCreatedAssertionsHold( - subject: E?, - assertionCreator: (AssertionPlant.() -> Unit)? -): Boolean = when (subject) { - null -> assertionCreator == null - else -> assertionCreator != null && - coreFactory.newCheckingPlant { - //TODO remove if https://youtrack.jetbrains.com/issue/KT-24917 is fixed - @Suppress("USELESS_CAST") - subject as E - } - .addAssertionsCreatedBy(assertionCreator) - .allAssertionsHold() -} - -@Suppress("DeprecatedCallableAddReplaceWith", "DEPRECATION") -@Deprecated("Will be removed with 1.0.0") -internal fun createEntryAssertionTemplate( - subjectProvider: () -> List, - index: Int, - searchCriterion: SC, - entryWithIndex: DescriptionIterableAssertion, - matches: (E, SC) -> Boolean -): ((() -> Boolean) -> Assertion) -> AssertionGroup { - return { createEntryFeatureAssertion -> - val list = subjectProvider() - val (found, entryRepresentation) = list.ifWithinBound(index, { - val entry = list[index] - Pair(matches(entry, searchCriterion), entry ?: Text.NULL) - }, { - Pair(false, DescriptionIterableAssertion.SIZE_EXCEEDED) - }) - val description = TranslatableWithArgs(entryWithIndex, index) - assertionBuilder.feature - .withDescriptionAndRepresentation(description, entryRepresentation) - .withAssertion(createEntryFeatureAssertion { found }) - .build() - } -} - -@Suppress("DeprecatedCallableAddReplaceWith", "DEPRECATION") -@Deprecated("Will be removed with 1.0.0") -internal fun createEntryAssertion(explanatoryAssertions: List, found: Boolean): AssertionGroup { - val explanatoryGroup = assertionBuilder.explanatoryGroup - .withDefaultType - .withAssertions(explanatoryAssertions) - .build() - return createEntryAssertion(explanatoryGroup, found) -} diff --git a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/searchbehaviours/InAnyOrderOnlySearchBehaviourImpl.kt b/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/searchbehaviours/InAnyOrderOnlySearchBehaviourImpl.kt deleted file mode 100644 index 54bdc1916..000000000 --- a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/searchbehaviours/InAnyOrderOnlySearchBehaviourImpl.kt +++ /dev/null @@ -1,11 +0,0 @@ -package ch.tutteli.atrium.domain.robstoll.lib.creating.iterable.contains.searchbehaviours - -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InAnyOrderOnlySearchBehaviour -import ch.tutteli.atrium.reporting.translating.Translatable -import ch.tutteli.atrium.reporting.translating.TranslatableWithArgs -import ch.tutteli.atrium.translations.DescriptionIterableAssertion - -class InAnyOrderOnlySearchBehaviourImpl : InAnyOrderOnlySearchBehaviour { - override fun decorateDescription(description: Translatable): Translatable = - TranslatableWithArgs(DescriptionIterableAssertion.IN_ANY_ORDER_ONLY, description) -} diff --git a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/searchbehaviours/InAnyOrderSearchBehaviourImpl.kt b/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/searchbehaviours/InAnyOrderSearchBehaviourImpl.kt deleted file mode 100644 index 75dbe47a0..000000000 --- a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/searchbehaviours/InAnyOrderSearchBehaviourImpl.kt +++ /dev/null @@ -1,11 +0,0 @@ -package ch.tutteli.atrium.domain.robstoll.lib.creating.iterable.contains.searchbehaviours - -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InAnyOrderSearchBehaviour -import ch.tutteli.atrium.reporting.translating.Translatable -import ch.tutteli.atrium.reporting.translating.TranslatableWithArgs -import ch.tutteli.atrium.translations.DescriptionIterableAssertion - -class InAnyOrderSearchBehaviourImpl : InAnyOrderSearchBehaviour { - override fun decorateDescription(description: Translatable): Translatable = - TranslatableWithArgs(DescriptionIterableAssertion.IN_ANY_ORDER, description) -} diff --git a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/searchbehaviours/InOrderOnlyGroupedSearchBehaviourImpl.kt b/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/searchbehaviours/InOrderOnlyGroupedSearchBehaviourImpl.kt deleted file mode 100644 index 8472736bb..000000000 --- a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/searchbehaviours/InOrderOnlyGroupedSearchBehaviourImpl.kt +++ /dev/null @@ -1,11 +0,0 @@ -package ch.tutteli.atrium.domain.robstoll.lib.creating.iterable.contains.searchbehaviours - -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InOrderOnlyGroupedSearchBehaviour -import ch.tutteli.atrium.reporting.translating.Translatable -import ch.tutteli.atrium.reporting.translating.TranslatableWithArgs -import ch.tutteli.atrium.translations.DescriptionIterableAssertion - -class InOrderOnlyGroupedSearchBehaviourImpl : InOrderOnlyGroupedSearchBehaviour { - override fun decorateDescription(description: Translatable): Translatable = - TranslatableWithArgs(DescriptionIterableAssertion.IN_ORDER_ONLY_GROUPED, description) -} diff --git a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/searchbehaviours/InOrderOnlyGroupedWithinSearchBehaviourImpl.kt b/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/searchbehaviours/InOrderOnlyGroupedWithinSearchBehaviourImpl.kt deleted file mode 100644 index 468d10518..000000000 --- a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/searchbehaviours/InOrderOnlyGroupedWithinSearchBehaviourImpl.kt +++ /dev/null @@ -1,11 +0,0 @@ -package ch.tutteli.atrium.domain.robstoll.lib.creating.iterable.contains.searchbehaviours - -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InOrderOnlyGroupedWithinSearchBehaviour -import ch.tutteli.atrium.reporting.translating.Translatable -import ch.tutteli.atrium.reporting.translating.TranslatableWithArgs -import ch.tutteli.atrium.translations.DescriptionIterableAssertion - -class InOrderOnlyGroupedWithinSearchBehaviourImpl : InOrderOnlyGroupedWithinSearchBehaviour { - override fun decorateDescription(description: Translatable): Translatable = - TranslatableWithArgs(DescriptionIterableAssertion.IN_ORDER_ONLY_GROUPED, description) -} diff --git a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/searchbehaviours/InOrderOnlySearchBehaviourImpl.kt b/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/searchbehaviours/InOrderOnlySearchBehaviourImpl.kt deleted file mode 100644 index 0ba0c2fe7..000000000 --- a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/searchbehaviours/InOrderOnlySearchBehaviourImpl.kt +++ /dev/null @@ -1,11 +0,0 @@ -package ch.tutteli.atrium.domain.robstoll.lib.creating.iterable.contains.searchbehaviours - -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InOrderOnlySearchBehaviour -import ch.tutteli.atrium.reporting.translating.Translatable -import ch.tutteli.atrium.reporting.translating.TranslatableWithArgs -import ch.tutteli.atrium.translations.DescriptionIterableAssertion - -class InOrderOnlySearchBehaviourImpl : InOrderOnlySearchBehaviour { - override fun decorateDescription(description: Translatable): Translatable = - TranslatableWithArgs(DescriptionIterableAssertion.IN_ORDER_ONLY, description) -} diff --git a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/searchbehaviours/InOrderSearchBehaviourImpl.kt b/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/searchbehaviours/InOrderSearchBehaviourImpl.kt deleted file mode 100644 index 5dbd98eaf..000000000 --- a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/searchbehaviours/InOrderSearchBehaviourImpl.kt +++ /dev/null @@ -1,11 +0,0 @@ -package ch.tutteli.atrium.domain.robstoll.lib.creating.iterable.contains.searchbehaviours - -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InOrderSearchBehaviour -import ch.tutteli.atrium.reporting.translating.Translatable -import ch.tutteli.atrium.reporting.translating.TranslatableWithArgs -import ch.tutteli.atrium.translations.DescriptionIterableAssertion - -class InOrderSearchBehaviourImpl : InOrderSearchBehaviour { - override fun decorateDescription(description: Translatable): Translatable = - TranslatableWithArgs(DescriptionIterableAssertion.IN_ORDER, description) -} diff --git a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/searchbehaviours/NoOpSearchBehaviourImpl.kt b/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/searchbehaviours/NoOpSearchBehaviourImpl.kt deleted file mode 100644 index 8ffce1001..000000000 --- a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/searchbehaviours/NoOpSearchBehaviourImpl.kt +++ /dev/null @@ -1,5 +0,0 @@ -package ch.tutteli.atrium.domain.robstoll.lib.creating.iterable.contains.searchbehaviours - -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.NoOpSearchBehaviour - -class NoOpSearchBehaviourImpl : NoOpSearchBehaviour diff --git a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/searchbehaviours/NotSearchBehaviourImpl.kt b/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/searchbehaviours/NotSearchBehaviourImpl.kt deleted file mode 100644 index ec2b31ffd..000000000 --- a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/searchbehaviours/NotSearchBehaviourImpl.kt +++ /dev/null @@ -1,11 +0,0 @@ -package ch.tutteli.atrium.domain.robstoll.lib.creating.iterable.contains.searchbehaviours - -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.NotSearchBehaviour -import ch.tutteli.atrium.reporting.translating.Translatable -import ch.tutteli.atrium.translations.DescriptionIterableAssertion - -class NotSearchBehaviourImpl : NotSearchBehaviour { - - override fun decorateDescription(description: Translatable): Translatable = - DescriptionIterableAssertion.CONTAINS_NOT -} diff --git a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/searchbehaviours/searchBehaviours.kt b/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/searchbehaviours/searchBehaviours.kt deleted file mode 100644 index 628f7c230..000000000 --- a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterable/contains/searchbehaviours/searchBehaviours.kt +++ /dev/null @@ -1,35 +0,0 @@ -package ch.tutteli.atrium.domain.robstoll.lib.creating.iterable.contains.searchbehaviours - -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.* -import ch.tutteli.atrium.domain.robstoll.lib.creating.iterable.contains.builders.IterableContainsBuilder - -fun > _containsInAnyOrder( - builder: IterableContains.Builder -): IterableContains.Builder = - IterableContainsBuilder(builder.subjectProvider, InAnyOrderSearchBehaviourImpl()) - -fun > _containsInAnyOrderOnly( - builder: IterableContains.Builder -): IterableContains.Builder = - IterableContainsBuilder(builder.subjectProvider, InAnyOrderOnlySearchBehaviourImpl()) - -fun > _containsInOrder( - builder: IterableContains.Builder -): IterableContains.Builder = - IterableContainsBuilder(builder.subjectProvider, InOrderSearchBehaviourImpl()) - -fun > _containsInOrderOnly( - builder: IterableContains.Builder -): IterableContains.Builder = - IterableContainsBuilder(builder.subjectProvider, InOrderOnlySearchBehaviourImpl()) - -fun > _containsInOrderOnlyGrouped( - builder: IterableContains.Builder -): IterableContains.Builder = - IterableContainsBuilder(builder.subjectProvider, InOrderOnlyGroupedSearchBehaviourImpl()) - -fun > _containsInOrderOnlyGroupedWithing( - builder: IterableContains.Builder -): IterableContains.Builder = - IterableContainsBuilder(builder.subjectProvider, InOrderOnlyGroupedWithinSearchBehaviourImpl()) diff --git a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterableAssertions.kt b/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterableAssertions.kt deleted file mode 100644 index 49de1bf8c..000000000 --- a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterableAssertions.kt +++ /dev/null @@ -1,133 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION") -package ch.tutteli.atrium.domain.robstoll.lib.creating - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.assertions.builders.assertionBuilder -import ch.tutteli.atrium.assertions.builders.fixedClaimGroup -import ch.tutteli.atrium.assertions.builders.invisibleGroup -import ch.tutteli.atrium.core.Option -import ch.tutteli.atrium.core.falseProvider -import ch.tutteli.atrium.core.getOrElse -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.domain.builders.ExpectImpl -import ch.tutteli.atrium.domain.creating.changers.ExtractedFeaturePostStep -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.NoOpSearchBehaviour -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.NotSearchBehaviour -import ch.tutteli.atrium.domain.robstoll.lib.assertions.LazyThreadUnsafeAssertionGroup -import ch.tutteli.atrium.domain.robstoll.lib.creating.iterable.contains.allCreatedAssertionsHold -import ch.tutteli.atrium.domain.robstoll.lib.creating.iterable.contains.builders.IterableContainsBuilder -import ch.tutteli.atrium.domain.robstoll.lib.creating.iterable.contains.createExplanatoryAssertionGroup -import ch.tutteli.atrium.domain.robstoll.lib.creating.iterable.contains.createHasElementAssertion -import ch.tutteli.atrium.domain.robstoll.lib.creating.iterable.contains.creators.turnSubjectToList -import ch.tutteli.atrium.domain.robstoll.lib.creating.iterable.contains.searchbehaviours.NoOpSearchBehaviourImpl -import ch.tutteli.atrium.domain.robstoll.lib.creating.iterable.contains.searchbehaviours.NotSearchBehaviourImpl -import ch.tutteli.atrium.reporting.translating.TranslatableWithArgs -import ch.tutteli.atrium.translations.DescriptionBasic -import ch.tutteli.atrium.translations.DescriptionIterableAssertion.* -import ch.tutteli.kbox.mapWithIndex - -fun > _containsBuilder(subjectProvider: SubjectProvider): IterableContains.Builder = - IterableContainsBuilder(subjectProvider, NoOpSearchBehaviourImpl()) - -fun > _containsNotBuilder(subjectProvider: SubjectProvider): IterableContains.Builder = - IterableContainsBuilder(subjectProvider, NotSearchBehaviourImpl()) - -@Suppress("DeprecatedCallableAddReplaceWith") -@Deprecated("use the function from atrium-logic instead, will be removed with 1.0.0") -fun > _iterableAll( - expect: Expect, - assertionCreatorOrNull: (Expect.() -> Unit)? -): Assertion { - return LazyThreadUnsafeAssertionGroup { - val list = turnSubjectToList(expect).maybeSubject.getOrElse { emptyList() } - val hasElementAssertion = createHasElementAssertion(list.iterator()) - - val assertions = ArrayList(2) - assertions.add(createExplanatoryAssertionGroup(assertionCreatorOrNull, list)) - - val mismatches = createMismatchAssertions(list, assertionCreatorOrNull) - assertions.add( - assertionBuilder.explanatoryGroup - .withWarningType - .withAssertion( - assertionBuilder.list - .withDescriptionAndEmptyRepresentation(WARNING_MISMATCHES) - .withAssertions(mismatches) - .build() - ) - .build() - ) - - assertionBuilder.invisibleGroup - .withAssertions( - hasElementAssertion, - assertionBuilder.fixedClaimGroup - .withListType - .withClaim(mismatches.isEmpty()) - .withDescriptionAndEmptyRepresentation(ALL) - .withAssertions(assertions) - .build() - ) - .build() - } -} - -private fun createMismatchAssertions( - list: List, - assertionCreator: (Expect.() -> Unit)? -): List { - return list - .asSequence() - .mapWithIndex() - .filter { (_, element) -> !allCreatedAssertionsHold(element, assertionCreator) } - .map { (index, element) -> - assertionBuilder.createDescriptive(TranslatableWithArgs(INDEX, index), element, falseProvider) - } - .toList() -} - -@Suppress("DeprecatedCallableAddReplaceWith") -@Deprecated("use the function from atrium-logic instead, will be removed with 1.0.0") -fun > _hasNext(expect: Expect): Assertion = - assertionBuilder.createDescriptive(expect, DescriptionBasic.HAS, NEXT_ELEMENT) { - it.iterator().hasNext() - } - -@Suppress("DeprecatedCallableAddReplaceWith") -@Deprecated("use the function from atrium-logic instead, will be removed with 1.0.0") -fun > _hasNotNext(expect: Expect): Assertion = - assertionBuilder.createDescriptive(expect, DescriptionBasic.HAS_NOT, NEXT_ELEMENT) { - !it.iterator().hasNext() - } - -@Suppress("DeprecatedCallableAddReplaceWith") -@Deprecated("use the function from atrium-logic instead, will be removed with 1.0.0") -fun , T : Iterable> _min(expect: Expect): ExtractedFeaturePostStep = - collect(expect, "min", Iterable::min) - -@Suppress("DeprecatedCallableAddReplaceWith") -@Deprecated("use the function from atrium-logic instead, will be removed with 1.0.0") -fun , T : Iterable> _max(expect: Expect): ExtractedFeaturePostStep = - collect(expect, "max", Iterable::max) - -private fun , T : Iterable> collect( - expect: Expect, - method: String, - collect: T.() -> E? -): ExtractedFeaturePostStep { - return ExpectImpl.feature.extractor(expect) - .methodCall(method) - .withRepresentationForFailure(NO_ELEMENTS) - .withFeatureExtraction { - Option.someIf(it.iterator().hasNext()) { - it.collect() ?: throw IllegalStateException( - "Iterable does not haveNext() even though checked before! Concurrent access?" - ) - } - } - .withoutOptions() - .build() -} diff --git a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterableAssertionsDeprecated.kt b/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterableAssertionsDeprecated.kt deleted file mode 100644 index dc7489d3d..000000000 --- a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iterableAssertionsDeprecated.kt +++ /dev/null @@ -1,85 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.domain.robstoll.lib.creating - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.assertions.AssertionGroup -import ch.tutteli.atrium.assertions.builders.fixedClaimGroup -import ch.tutteli.atrium.assertions.builders.invisibleGroup -import ch.tutteli.atrium.core.getOrElse -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.domain.builders.AssertImpl -import ch.tutteli.atrium.domain.robstoll.lib.assertions.LazyThreadUnsafeAssertionGroup -import ch.tutteli.atrium.domain.robstoll.lib.creating.iterable.contains.allCreatedAssertionsHold -import ch.tutteli.atrium.domain.robstoll.lib.creating.iterable.contains.createExplanatoryAssertions -import ch.tutteli.atrium.domain.robstoll.lib.creating.iterable.contains.createHasElementAssertion -import ch.tutteli.atrium.domain.robstoll.lib.creating.iterable.contains.creators.turnSubjectToList -import ch.tutteli.atrium.reporting.translating.TranslatableWithArgs -import ch.tutteli.atrium.translations.DescriptionIterableAssertion.* -import ch.tutteli.kbox.mapWithIndex - -fun _iterableAll( - plant: AssertionPlant>, - assertionCreator: (AssertionPlant.() -> Unit)? -): Assertion { - return LazyThreadUnsafeAssertionGroup { - val list = turnSubjectToList(plant).maybeSubject.getOrElse { emptyList() } - val hasElementAssertion = createHasElementAssertion(list.iterator()) - - val assertions = ArrayList(2) - assertions.add(createExplanatoryAssertionGroup(assertionCreator, list)) - - val mismatches = createMismatchAssertions(list, assertionCreator) - assertions.add( - AssertImpl.builder.explanatoryGroup - .withWarningType - .withAssertion( - AssertImpl.builder.list - .withDescriptionAndEmptyRepresentation(WARNING_MISMATCHES) - .withAssertions(mismatches) - .build() - ) - .build() - ) - - AssertImpl.builder.invisibleGroup - .withAssertions( - hasElementAssertion, - AssertImpl.builder.fixedClaimGroup - .withListType - .withClaim(mismatches.isEmpty()) - .withDescriptionAndEmptyRepresentation(ALL) - .withAssertions(assertions) - .build() - ) - .build() - } -} - -private fun createMismatchAssertions( - list: List, - assertionCreator: (AssertionPlant.() -> Unit)? -): List { - return list - .asSequence() - .mapWithIndex() - .filter { (_, element) -> !allCreatedAssertionsHold(element, assertionCreator) } - .map { (index, element) -> - AssertImpl.builder.createDescriptive(TranslatableWithArgs(INDEX, index), element) { - allCreatedAssertionsHold(element, assertionCreator) - } - } - .toList() -} - -private fun createExplanatoryAssertionGroup( - assertionCreator: (AssertionPlant.() -> Unit)?, - list: List -): AssertionGroup { - val explanatoryAssertions = createExplanatoryAssertions(assertionCreator, list) - return AssertImpl.builder.explanatoryGroup - .withDefaultType - .withAssertions(explanatoryAssertions) - .build() -} diff --git a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iteratorAssertions.kt b/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iteratorAssertions.kt deleted file mode 100644 index c11812692..000000000 --- a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/iteratorAssertions.kt +++ /dev/null @@ -1,20 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION") -package ch.tutteli.atrium.domain.robstoll.lib.creating - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.assertions.builders.assertionBuilder -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.translations.DescriptionBasic -import ch.tutteli.atrium.translations.DescriptionIterableAssertion.NEXT_ELEMENT - -@Suppress("DeprecatedCallableAddReplaceWith") -@Deprecated("use the function from atrium-logic instead, will be removed with 1.0.0") -fun > _hasNext(expect: Expect): Assertion = - assertionBuilder.createDescriptive(expect, DescriptionBasic.HAS, NEXT_ELEMENT) { it.hasNext() } - -@Suppress("DeprecatedCallableAddReplaceWith") -@Deprecated("use the function from atrium-logic instead, will be removed with 1.0.0") -fun > _hasNotNext(expect: Expect): Assertion = - assertionBuilder.createDescriptive(expect, DescriptionBasic.HAS_NOT, NEXT_ELEMENT) { !it.hasNext() } - diff --git a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/listAssertions.kt b/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/listAssertions.kt deleted file mode 100644 index ab5a9f788..000000000 --- a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/listAssertions.kt +++ /dev/null @@ -1,26 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION") -@file:JvmMultifileClass -@file:JvmName("ListAssertionsKt") - -package ch.tutteli.atrium.domain.robstoll.lib.creating - -import ch.tutteli.atrium.core.Option -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.domain.builders.ExpectImpl -import ch.tutteli.atrium.domain.creating.changers.ExtractedFeaturePostStep -import ch.tutteli.atrium.translations.DescriptionListAssertion -import kotlin.jvm.JvmMultifileClass -import kotlin.jvm.JvmName - -@Suppress("DeprecatedCallableAddReplaceWith") -@Deprecated("use the function from atrium-logic instead, will be removed with 1.0.0") -fun > _get(expect: Expect, index: Int): ExtractedFeaturePostStep = - ExpectImpl.feature.extractor(expect) - .methodCall("get", index) - .withRepresentationForFailure(DescriptionListAssertion.INDEX_OUT_OF_BOUNDS) - .withFeatureExtraction { - Option.someIf(index < it.size) { it[index] } - } - .withoutOptions() - .build() diff --git a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/listAssertionsDeprecated.kt b/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/listAssertionsDeprecated.kt deleted file mode 100644 index e9d688e30..000000000 --- a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/listAssertionsDeprecated.kt +++ /dev/null @@ -1,61 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION") -@file:JvmMultifileClass -@file:JvmName("ListAssertionsKt") - -package ch.tutteli.atrium.domain.robstoll.lib.creating - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.creating.AssertionPlantNullable -import ch.tutteli.atrium.creating.CollectingAssertionPlant -import ch.tutteli.atrium.creating.CollectingAssertionPlantNullable -import ch.tutteli.atrium.domain.builders.AssertImpl -import ch.tutteli.atrium.domain.creating.feature.extract.FeatureExtractor -import ch.tutteli.atrium.translations.DescriptionListAssertion -import kotlin.jvm.JvmMultifileClass -import kotlin.jvm.JvmName - -fun _get( - plant: AssertionPlant>, - index: Int -): AssertionPlant = extractorForGetCall(index) - .withParameterObject(createGetParameterObject(plant, index)) - .extract() - -fun _get( - plant: AssertionPlant>, - index: Int, - assertionCreator: CollectingAssertionPlant.() -> Unit -): Assertion = extractorForGetCall(index) - .withParameterObject(createGetParameterObject(plant, index)) - .extractAndAssertIt(assertionCreator) - -fun _getNullable( - plant: AssertionPlant>, - index: Int -): AssertionPlantNullable = extractorForGetCall(index) - .withParameterObjectNullable(createGetParameterObject(plant, index)) - .extract() - -fun _getNullable( - plant: AssertionPlant>, - index: Int, - assertionCreator: CollectingAssertionPlantNullable.() -> Unit -): Assertion = extractorForGetCall(index) - .withParameterObjectNullable(createGetParameterObject(plant, index)) - .extractAndAssertIt(assertionCreator) - -private fun extractorForGetCall(index: Int) = AssertImpl.feature.extractor.methodCall("get", index) - -@Suppress("DEPRECATION") -private fun createGetParameterObject( - plant: AssertionPlant>, - index: Int -): FeatureExtractor.ParameterObject, T> = FeatureExtractor.ParameterObject( - plant, - extractionNotSuccessful = DescriptionListAssertion.INDEX_OUT_OF_BOUNDS, - warningCannotEvaluate = DescriptionListAssertion.CANNOT_EVALUATE_INDEX_OUT_OF_BOUNDS, - canBeExtracted = { index < it.size }, - featureExtraction = { it[index] } -) diff --git a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/mapAssertions.kt b/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/mapAssertions.kt deleted file mode 100644 index 90de363b8..000000000 --- a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/mapAssertions.kt +++ /dev/null @@ -1,126 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION") -@file:JvmMultifileClass -@file:JvmName("MapAssertionsKt") - -package ch.tutteli.atrium.domain.robstoll.lib.creating - -import ch.tutteli.atrium.api.fluent.en_GB.toBe -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.assertions.builders.assertionBuilder -import ch.tutteli.atrium.core.Option -import ch.tutteli.atrium.core.coreFactory -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.domain.builders.ExpectImpl -import ch.tutteli.atrium.domain.builders.utils.subExpect -import ch.tutteli.atrium.domain.creating.changers.ExtractedFeaturePostStep -import ch.tutteli.atrium.reporting.translating.TranslatableWithArgs -import ch.tutteli.atrium.translations.DescriptionBasic.IS -import ch.tutteli.atrium.translations.DescriptionBasic.IS_NOT -import ch.tutteli.atrium.translations.DescriptionCollectionAssertion.EMPTY -import ch.tutteli.atrium.translations.DescriptionMapAssertion.* -import kotlin.jvm.JvmMultifileClass -import kotlin.jvm.JvmName -import kotlin.reflect.KClass - -@Suppress("DeprecatedCallableAddReplaceWith") -@Deprecated("use the function from atrium-logic instead, will be removed with 1.0.0") -fun > _contains( - expect: Expect, - pairs: List> -): Assertion = _containsKeyWithValueAssertion(expect, pairs.map { (key, value) -> - key to subExpect { toBe(value) } -}) - -@Suppress("DeprecatedCallableAddReplaceWith") -@Deprecated("use the function from atrium-logic instead, will be removed with 1.0.0") -fun > _containsKeyWithValueAssertion( - expect: Expect, - valueType: KClass, - keyValues: List.() -> Unit)?>> -): Assertion = _containsKeyWithValueAssertion(expect, keyValues.map { (key, assertionCreatorOrNull) -> - key to subExpect { - addAssertion(ExpectImpl.any.toBeNullIfNullGivenElse(this, valueType, assertionCreatorOrNull)) - } -}) - -@Suppress("DeprecatedCallableAddReplaceWith") -@Deprecated("use the function from atrium-logic instead, will be removed with 1.0.0") -fun > _containsKeyWithValueAssertion( - expect: Expect, - keyValues: List.() -> Unit>> -): Assertion { - //TODO we should actually make MethodCallFormatter configurable in ReporterBuilder and then get it via Expect - val methodCallFormatter = coreFactory.newMethodCallFormatter() - - val assertion = ExpectImpl.collector.collect(expect) { - keyValues.forEach { (key, assertionCreator) -> - ExpectImpl.feature.extractor(this) - .withDescription(TranslatableWithArgs(ENTRY_WITH_KEY, methodCallFormatter.formatArgument(key))) - .withRepresentationForFailure(KEY_DOES_NOT_EXIST) - .withFeatureExtraction { extractKey(it, key) } - .withoutOptions() - .build() - .addToInitial(assertionCreator) - } - } - return assertionBuilder.list - .withDescriptionAndEmptyRepresentation(CONTAINS_IN_ANY_ORDER) - .withAssertion(assertion) - .build() -} - -@Suppress("DeprecatedCallableAddReplaceWith") -@Deprecated("use the function from atrium-logic instead, will be removed with 1.0.0") -fun _containsKey(subjectProvider: SubjectProvider>, key: K): Assertion = - assertionBuilder.createDescriptive(subjectProvider, CONTAINS_KEY, key) { it.containsKey(key) } - -@Suppress("DeprecatedCallableAddReplaceWith") -@Deprecated("use the function from atrium-logic instead, will be removed with 1.0.0") -fun _containsNotKey(subjectProvider: SubjectProvider>, key: K): Assertion = - assertionBuilder.createDescriptive(subjectProvider, CONTAINS_NOT_KEY, key) { it.containsKey(key).not() } - - -@Suppress("DeprecatedCallableAddReplaceWith") -@Deprecated("use the function from atrium-logic instead, will be removed with 1.0.0") -fun _isEmpty(subjectProvider: SubjectProvider>): Assertion = - assertionBuilder.createDescriptive(subjectProvider, IS, EMPTY) { it.isEmpty() } - -@Suppress("DeprecatedCallableAddReplaceWith") -@Deprecated("use the function from atrium-logic instead, will be removed with 1.0.0") -fun _isNotEmpty(subjectProvider: SubjectProvider>): Assertion = - assertionBuilder.createDescriptive(subjectProvider, IS_NOT, EMPTY) { it.isNotEmpty() } - -@Suppress("DeprecatedCallableAddReplaceWith") -@Deprecated("use the function from atrium-logic instead, will be removed with 1.0.0") -fun > _getExisting(expect: Expect, key: K): ExtractedFeaturePostStep = - ExpectImpl.feature.extractor(expect) - .methodCall("get", key) - .withRepresentationForFailure(KEY_DOES_NOT_EXIST) - .withFeatureExtraction { extractKey(it, key) } - .withoutOptions() - .build() - -private fun , V> extractKey(it: T, key: K): Option { - return Option.someIf(it.containsKey(key)) { - @Suppress( - "UNCHECKED_CAST" - /* - UNCHECKED_CAST is OK as this function will only be called if the key exists, so the value should be V - One note though, if one deals with a Map returned by Java code and forgot that the Map actually contains - `null` as values as well, then we ignore it here (due to the UNCHECKED_CAST). However, usually this - should not matter as the assertion about the value will cover it. In the worst case, a null-check included - by the Kotlin compiler will throw -> in such a case it might be hard for the user to grasp what is going on. - In this sense it might be better if we catch that already here and report accordingly. Yet, in the end we - end up introducing null-checks everywhere only because of Java => keep it like this for now. - */ - ) - it[key] as V - } -} - -@Suppress("DeprecatedCallableAddReplaceWith") -@Deprecated("use the function from atrium-logic instead, will be removed with 1.0.0") -fun > _size(expect: Expect): ExtractedFeaturePostStep = - ExpectImpl.feature.manualFeature(expect, SIZE) { size } diff --git a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/mapAssertionsDeprecated.kt b/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/mapAssertionsDeprecated.kt deleted file mode 100644 index 94d3e1f70..000000000 --- a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/mapAssertionsDeprecated.kt +++ /dev/null @@ -1,157 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") - -@file:JvmMultifileClass -@file:JvmName("MapAssertionsKt") - -package ch.tutteli.atrium.domain.robstoll.lib.creating - -import ch.tutteli.atrium.api.cc.en_GB.property -import ch.tutteli.atrium.api.cc.en_GB.toBe -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.core.trueProvider -import ch.tutteli.atrium.creating.* -import ch.tutteli.atrium.domain.builders.AssertImpl -import ch.tutteli.atrium.domain.builders.ExpectImpl -import ch.tutteli.atrium.domain.builders.utils.subAssert -import ch.tutteli.atrium.domain.creating.feature.extract.FeatureExtractor -import ch.tutteli.atrium.domain.robstoll.lib.assertions.LazyThreadUnsafeAssertionGroup -import ch.tutteli.atrium.reporting.Text -import ch.tutteli.atrium.reporting.translating.TranslatableWithArgs -import ch.tutteli.atrium.translations.DescriptionBasic -import ch.tutteli.atrium.translations.DescriptionMapAssertion -import kotlin.jvm.JvmMultifileClass -import kotlin.jvm.JvmName - -fun _contains( - plant: AssertionPlant>, - pairs: List> -): Assertion = _containsKeyWithValueAssertion(plant, pairs.map { - it.first to it.second?.let { expected -> subAssert { toBe(expected as Any) } } -}) - -fun _containsKeyWithValueAssertion( - plant: AssertionPlant>, - keyValues: List.() -> Unit)?>> -): Assertion = containsNullable(plant, keyValues.map { it }) { assertionCreator -> - // we can pretend that the subject is null if maybeSubject is None as we have to be in an explaining like context in such a case - val subjectIsNull = this.maybeSubject.fold({ true }) { it == null } - if (assertionCreator != null && !subjectIsNull) { - @Suppress("DEPRECATION" /* TODO switch to Expect */) - ExpectImpl.changeSubject(this).unreported { it as V }.assertionCreator() - } else if (subjectIsNull && assertionCreator == null) { - addAssertion(AssertImpl.builder.createDescriptive(DescriptionBasic.IS, Text.NULL, trueProvider)) - } else { - addAssertion( - AssertImpl.builder.explanatoryGroup - .withDefaultType - .withAssertions( - AssertImpl.collector.forExplanation.throwIfNoAssertionIsCollected.collect( - DescriptionMapAssertion.CANNOT_EVALUATE_KEY_DOES_NOT_EXIST, - MaybeSubject.Absent, - assertionCreator - ) - ) - .build() - ) - } -} - -private fun containsNullable( - plant: AssertionPlant>, - pairs: List>, - assertionCreator: AssertionPlantNullable.(M) -> Unit -) = contains( - pairs, - { option, key -> option.withParameterObjectNullable(createGetParameterObject(plant, key)) }, - assertionCreator -) - -private fun , C : BaseCollectingAssertionPlant> contains( - pairs: List>, - @Suppress("DEPRECATION") parameterObjectOption: (FeatureExtractor.ParameterObjectOption, K) -> FeatureExtractor.CreatorLike, V, A, C>, - assertionCreator: C.(M) -> Unit -): Assertion = LazyThreadUnsafeAssertionGroup { - //TODO we should actually make MethodCallFormatter configurable in ReporterBuilder and then get it via AssertionPlant - val methodCallFormatter = AssertImpl.coreFactory.newMethodCallFormatter() - val assertions = pairs.map { (key: K, matcher: M) -> - val option = AssertImpl.feature.extractor - .withDescription( - TranslatableWithArgs(DescriptionMapAssertion.ENTRY_WITH_KEY, methodCallFormatter.formatArgument(key)) - ) - parameterObjectOption(option, key) - .extractAndAssertIt { assertionCreator(matcher) } - } - AssertImpl.builder.list - .withDescriptionAndEmptyRepresentation(DescriptionMapAssertion.CONTAINS_IN_ANY_ORDER) - .withAssertions(assertions) - .build() -} - - -fun _getExisting(plant: AssertionPlant>, key: K): AssertionPlant = - extractorForGetCall(key) - .withParameterObject(createGetParameterObject(plant, key)) - .extract() - -fun _getExisting( - plant: AssertionPlant>, - key: K, - assertionCreator: CollectingAssertionPlant.() -> Unit -): Assertion = extractorForGetCall(key) - .withParameterObject(createGetParameterObject(plant, key)) - .extractAndAssertIt(assertionCreator) - -fun _getExistingNullable(plant: AssertionPlant>, key: K): AssertionPlantNullable = - extractorForGetCall(key) - .withParameterObjectNullable(createGetParameterObject(plant, key)) - .extract() - -fun _getExistingNullable( - plant: AssertionPlant>, - key: K, - assertionCreator: CollectingAssertionPlantNullable.() -> Unit -): Assertion = extractorForGetCall(key) - .withParameterObjectNullable(createGetParameterObject(plant, key)) - .extractAndAssertIt(assertionCreator) - - -private fun extractorForGetCall(key: K) = AssertImpl.feature.extractor.methodCall("get", key) - -@Suppress("DEPRECATION") -private fun createGetParameterObject( - plant: AssertionPlant>, - key: K -): FeatureExtractor.ParameterObject, V> = FeatureExtractor.ParameterObject( - plant, - extractionNotSuccessful = DescriptionMapAssertion.KEY_DOES_NOT_EXIST, - warningCannotEvaluate = DescriptionMapAssertion.CANNOT_EVALUATE_KEY_DOES_NOT_EXIST, - canBeExtracted = { it.containsKey(key) }, - featureExtraction = { - @Suppress( - "UNCHECKED_CAST" - /* - UNCHECKED_CAST is OK as this function will only be called if the key exists, so the value should be V - One note though, if one deals with a Map returned by Java code and forgot that the Map actually contains - `null` as values as well, then we ignore it here (due to the UNCHECKED_CAST). However, usually this - should not matter as the assertion about the value will cover it. In the worst case, a null-check included - by the Kotlin compiler will throw -> in such a case it might be hard for the user to grasp what is going on. - In this sense it might be better if we catch that already here and report accordingly. Yet, in the end we - end up introducing null-checks everywhere only because of Java => keep it like this for now. - */ - ) - it[key] as V - } -) - -fun _hasSize(plant: AssertionPlant>, size: Int): Assertion = AssertImpl.collector.collect(plant) { - property(Map<*, *>::size) { toBe(size) } -} - -fun _keys(plant: AssertionPlant>, assertionCreator: AssertionPlant>.() -> Unit): Assertion -//TODO check that one assertion was created - problem property creates at least a feature assertion group, that's why collect is happy - = AssertImpl.collector.collect(plant) { property(Map::keys, assertionCreator) } - -fun _values(plant: AssertionPlant>, assertionCreator: AssertionPlant>.() -> Unit): Assertion -//TODO check that one assertion was created - problem property creates at least a feature assertion group, that's why collect is happy - = AssertImpl.collector.collect(plant) { property(Map<*, V>::values, assertionCreator) } diff --git a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/mapEntryAssertions.kt b/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/mapEntryAssertions.kt deleted file mode 100644 index 09551931f..000000000 --- a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/mapEntryAssertions.kt +++ /dev/null @@ -1,29 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION") -package ch.tutteli.atrium.domain.robstoll.lib.creating - -import ch.tutteli.atrium.api.fluent.en_GB.toBe -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.domain.builders.ExpectImpl -import ch.tutteli.atrium.domain.creating.changers.ExtractedFeaturePostStep - -@Suppress("DeprecatedCallableAddReplaceWith") -@Deprecated("use the function from atrium-logic instead, will be removed with 1.0.0") -fun > _isKeyValue(expect: Expect, key: K, value: V): Assertion = - ExpectImpl.collector.collect(expect) { - ExpectImpl.map.entry.key(this).addToInitial { toBe(key) } - ExpectImpl.map.entry.value(this).addToInitial { toBe(value) } - } - -@Suppress("DeprecatedCallableAddReplaceWith") -@Deprecated("use the function from atrium-logic instead, will be removed with 1.0.0") -fun > _key(expect: Expect): ExtractedFeaturePostStep = - ExpectImpl.feature.property(expect, Map.Entry::key) - -@Suppress("DeprecatedCallableAddReplaceWith") -@Deprecated("use the function from atrium-logic instead, will be removed with 1.0.0") -fun > _value(expect: Expect): ExtractedFeaturePostStep = - ExpectImpl.feature.property(expect, Map.Entry<*, V>::value) - - diff --git a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/mapEntryAssertionsDeprecated.kt b/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/mapEntryAssertionsDeprecated.kt deleted file mode 100644 index 42070cdff..000000000 --- a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/mapEntryAssertionsDeprecated.kt +++ /dev/null @@ -1,38 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.domain.robstoll.lib.creating - -import ch.tutteli.atrium.api.cc.en_GB.property -import ch.tutteli.atrium.api.cc.en_GB.toBe -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.creating.AssertionPlantNullable -import ch.tutteli.atrium.domain.builders.AssertImpl - -fun _keyValue( - plant: AssertionPlant>, - key: K, - value: V -): Assertion = AssertImpl.collector.collect(plant) { - addAssertion(AssertImpl.map.entry.key(this) { toBe(key) }) - addAssertion(AssertImpl.map.entry.value(this) { toBe(value) }) -} - -fun _key(plant: AssertionPlant>, assertionCreator: AssertionPlant.() -> Unit): Assertion = - AssertImpl.collector.collect(plant) { property(Map.Entry::key, assertionCreator) } - -fun _value( - plant: AssertionPlant>, - assertionCreator: AssertionPlant.() -> Unit -): Assertion = AssertImpl.collector.collect(plant) { property(Map.Entry<*, V>::value, assertionCreator) } - -fun _nullableKey( - plant: AssertionPlant>, - assertionCreator: AssertionPlantNullable.() -> Unit -): Assertion = AssertImpl.collector.collect(plant) { property(Map.Entry::key).assertionCreator() } - -fun _nullableValue( - plant: AssertionPlant>, - assertionCreator: AssertionPlantNullable.() -> Unit -): Assertion = AssertImpl.collector.collect(plant) { property(Map.Entry<*, V>::value).assertionCreator() } diff --git a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/pairAssertions.kt b/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/pairAssertions.kt deleted file mode 100644 index 6388ec04e..000000000 --- a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/pairAssertions.kt +++ /dev/null @@ -1,17 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION") -package ch.tutteli.atrium.domain.robstoll.lib.creating - -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.domain.builders.ExpectImpl -import ch.tutteli.atrium.domain.creating.changers.ExtractedFeaturePostStep - -@Suppress("DeprecatedCallableAddReplaceWith") -@Deprecated("use the function from atrium-logic instead, will be removed with 1.0.0") -fun > _first(expect: Expect): ExtractedFeaturePostStep = - ExpectImpl.feature.property(expect, Pair::first) - -@Suppress("DeprecatedCallableAddReplaceWith") -@Deprecated("use the function from atrium-logic instead, will be removed with 1.0.0") -fun > _second(expect: Expect): ExtractedFeaturePostStep = - ExpectImpl.feature.property(expect, Pair<*, V>::second) diff --git a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/pairAssertionsDeprecated.kt b/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/pairAssertionsDeprecated.kt deleted file mode 100644 index b3736fef6..000000000 --- a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/pairAssertionsDeprecated.kt +++ /dev/null @@ -1,26 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.domain.robstoll.lib.creating - -import ch.tutteli.atrium.api.cc.en_GB.property -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.creating.AssertionPlantNullable -import ch.tutteli.atrium.domain.builders.AssertImpl - -fun _first(plant: AssertionPlant>, assertionCreator: AssertionPlant.() -> Unit): Assertion = - AssertImpl.collector.collect(plant) { property(Pair::first, assertionCreator) } - -fun _second(plant: AssertionPlant>, assertionCreator: AssertionPlant.() -> Unit): Assertion = - AssertImpl.collector.collect(plant) { property(Pair<*, V>::second, assertionCreator) } - -fun _nullableFirst( - plant: AssertionPlant>, - assertionCreator: AssertionPlantNullable.() -> Unit -): Assertion = AssertImpl.collector.collect(plant) { property(Pair::first).assertionCreator() } - -fun _nullableSecond( - plant: AssertionPlant>, - assertionCreator: AssertionPlantNullable.() -> Unit -): Assertion = AssertImpl.collector.collect(plant) { property(Pair<*, V>::second).assertionCreator() } diff --git a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/throwable/thrown/builders/ThrowableThrownBuilder.kt b/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/throwable/thrown/builders/ThrowableThrownBuilder.kt deleted file mode 100644 index d9077782c..000000000 --- a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/throwable/thrown/builders/ThrowableThrownBuilder.kt +++ /dev/null @@ -1,31 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0 */) - -package ch.tutteli.atrium.domain.robstoll.lib.creating.throwable.thrown.builders - -import ch.tutteli.atrium.core.CoreFactory -import ch.tutteli.atrium.creating.AssertionPlantNullable -import ch.tutteli.atrium.domain.creating.throwable.thrown.ThrowableThrown -import ch.tutteli.atrium.reporting.Reporter -import ch.tutteli.atrium.reporting.translating.Translatable - -/** - * Represents the entry point of the fluent API of sophisticated a [Throwable] `was thrown` assertions. - * - * It contains the [assertionVerb] and [reporter] which will be used to create an [AssertionPlantNullable] as well as - * the [act] function which is expected to throw a [Throwable]. - * - * @property assertionVerb The assertion verb which will be used inter alia in reporting. - * @property act The function which is expected to throw a [Throwable]. - * @property reporter The reporter which will be used for a [CoreFactory.newThrowingAssertionChecker]. - * - * @constructor Represents the entry point of the fluent API of sophisticated a [Throwable] `was thrown` assertions. - * @param assertionVerb The assertion verb which will be used inter alia in reporting. - * @param act The function which is expected to throw a [Throwable]. - * @param reporter The reporter which will be used for a [CoreFactory.newThrowingAssertionChecker]. - */ -@Deprecated("Use Expect instead; will be removed with 1.0.0") -class ThrowableThrownBuilder( - override val assertionVerb: Translatable, - override val act: () -> Unit, - override val reporter: Reporter -) : ThrowableThrown.Builder diff --git a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/throwable/thrown/creators/ThrowableThrownAssertionCreator.kt b/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/throwable/thrown/creators/ThrowableThrownAssertionCreator.kt deleted file mode 100644 index ab65937a2..000000000 --- a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/throwable/thrown/creators/ThrowableThrownAssertionCreator.kt +++ /dev/null @@ -1,79 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0 */) - -package ch.tutteli.atrium.domain.robstoll.lib.creating.throwable.thrown.creators - -import ch.tutteli.atrium.core.newReportingPlantNullable -import ch.tutteli.atrium.core.trueProvider -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.creating.ReportingAssertionPlantNullable -import ch.tutteli.atrium.domain.builders.AssertImpl -import ch.tutteli.atrium.domain.creating.throwable.thrown.ThrowableThrown -import ch.tutteli.atrium.domain.robstoll.lib.creating.any.typetransformation.creators.DownCastAssertionCreator -import ch.tutteli.atrium.domain.robstoll.lib.creating.any.typetransformation.failurehandlers.ThrowableThrownFailureHandler -import ch.tutteli.atrium.reporting.translating.Translatable -import ch.tutteli.atrium.translations.DescriptionThrowableAssertion.IS_NOT_THROWN_1 -import ch.tutteli.atrium.translations.DescriptionThrowableAssertion.IS_NOT_THROWN_2 -import kotlin.reflect.KClass - -@Deprecated("Switch from Assert to Expect and use throwable.thrown.isA or throwable.thrown.notThrown instead; will be removed with 1.0.0") -class ThrowableThrownAssertionCreator( - private val absentThrowableMessageProvider: ThrowableThrown.AbsentThrowableMessageProvider -) : ThrowableThrown.Creator { - - override fun executeActAssertNothingThrown(throwableThrownBuilder: ThrowableThrown.Builder) { - val throwable: Throwable? = catchThrowableAndAdjust(throwableThrownBuilder) - val subjectPlant = createReportingPlantForThrowable(throwableThrownBuilder, throwable) - if (throwable == null) { - subjectPlant.addAssertion( - AssertImpl.builder.createDescriptive(IS_NOT_THROWN_1, IS_NOT_THROWN_2) { true } - ) - } else { - val explainingAssertion = - AssertImpl.any.typeTransformation.failureHandlers.newExplanatoryWithHint( - showHint = trueProvider, - failureHintFactory = { - ThrowableThrownFailureHandler.propertiesOfException( - throwable, - maxStackTrace = 15 - ) - } - ).createFailingAssertion(IS_NOT_THROWN_1, IS_NOT_THROWN_2) - subjectPlant.addAssertion(explainingAssertion) - } - } - - override fun executeActAndCreateAssertion( - throwableThrownBuilder: ThrowableThrown.Builder, - description: Translatable, - expectedType: KClass, - assertionCreator: AssertionPlant.() -> Unit - ) { - val throwable: Throwable? = catchThrowableAndAdjust(throwableThrownBuilder) - val subjectPlant = createReportingPlantForThrowable(throwableThrownBuilder, throwable) - - val failureHandler = ThrowableThrownFailureHandler(throwable, expectedType) - DownCastAssertionCreator() - .downCast(description, expectedType, subjectPlant, assertionCreator, failureHandler) - } - - private fun catchThrowableAndAdjust(throwableThrownBuilder: ThrowableThrown.Builder): Throwable? { - return try { - throwableThrownBuilder.act() - null - } catch (throwable: Throwable) { - throwableThrownBuilder.reporter.atriumErrorAdjuster.adjust(throwable) - throwable - } - } - - @Suppress("DEPRECATION") - private fun createReportingPlantForThrowable( - throwableThrownBuilder: ThrowableThrown.Builder, - throwable: Throwable? - ): ReportingAssertionPlantNullable = AssertImpl.coreFactory.newReportingPlantNullable( - throwableThrownBuilder.assertionVerb, - { throwable }, - throwableThrownBuilder.reporter, - absentThrowableMessageProvider.message - ) -} diff --git a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/throwable/thrown/creators/ThrowableThrownFailureHandler.kt b/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/throwable/thrown/creators/ThrowableThrownFailureHandler.kt deleted file mode 100644 index 8232af50f..000000000 --- a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/throwable/thrown/creators/ThrowableThrownFailureHandler.kt +++ /dev/null @@ -1,183 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION") -package ch.tutteli.atrium.domain.robstoll.lib.creating.throwable.thrown.creators - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.assertions.AssertionGroup -import ch.tutteli.atrium.assertions.ExplanatoryAssertionGroupType -import ch.tutteli.atrium.assertions.builders.assertionBuilder -import ch.tutteli.atrium.assertions.builders.invisibleGroup -import ch.tutteli.atrium.core.None -import ch.tutteli.atrium.core.Option -import ch.tutteli.atrium.core.polyfills.fullName -import ch.tutteli.atrium.core.polyfills.stackBacktrace -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.domain.builders.creating.collectors.collectAssertions -import ch.tutteli.atrium.domain.creating.changers.SubjectChanger -import ch.tutteli.atrium.reporting.Text -import ch.tutteli.atrium.reporting.translating.Translatable -import ch.tutteli.atrium.translations.DescriptionThrowableAssertion - -@Deprecated( - "Use ThrowableThrownFailureHandler of atrium.logic; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.logic.creating.changers.impl.ThrowableThrownFailureHandler") -) -class ThrowableThrownFailureHandler( - private val maxStackTrace: Int -) : SubjectChanger.FailureHandler { - - override fun createAssertion( - originalAssertionContainer: Expect, - descriptiveAssertion: Assertion, - maybeAssertionCreator: Option.() -> Unit> - ): Assertion { - val assertions = mutableListOf(descriptiveAssertion) - maybeAssertionCreator.fold({ /* nothing to do */ }) { assertionCreator -> - assertions.add( - assertionBuilder.explanatoryGroup - .withDefaultType - .collectAssertions(None, assertionCreator) - .build() - ) - } - originalAssertionContainer.maybeSubject.fold( - { /* nothing to do */ }, - { - if (it != null) assertions.add(propertiesOfThrowable(it, maxStackTrace)) - } - ) - return assertionBuilder.invisibleGroup - .withAssertions(assertions.toList()) - .build() - } - - companion object { - - /** - * Returns an [AssertionGroup] with an [ExplanatoryAssertionGroupType] containing properties - * of the given [throwable] where [maxStackTrace] are shown. - */ - fun propertiesOfThrowable( - throwable: Throwable, - maxStackTrace: Int, - explanation: Assertion = createExplanation(throwable) - ): AssertionGroup { - return assertionBuilder.explanatoryGroup - .withDefaultType - .withAssertions( - explanation, - createHints(throwable, maxStackTrace, secondStackFrameOfParent = null) - ) - .build() - } - - private fun createExplanation(throwable: Throwable) = - assertionBuilder.explanatory - .withExplanation( - DescriptionThrowableAssertion.OCCURRED_EXCEPTION_PROPERTIES, - throwable::class.simpleName ?: throwable::class.fullName - ) - .build() - - private fun createHints( - throwable: Throwable, - maxStackTrace: Int, - secondStackFrameOfParent: String? - ): Assertion { - val assertions = mutableListOf( - createMessageHint(throwable), - createStackTraceHint( - throwable, - maxStackTrace, - secondStackFrameOfParent - ) - ) - assertions.addAll(createAdditionalHints(throwable, maxStackTrace)) - createCauseHint(throwable, maxStackTrace)?.let { assertions.add(it) } - - return assertionBuilder.explanatoryGroup - .withDefaultType - .withAssertions(assertions.toList()) - .build() - } - - private fun createMessageHint(throwable: Throwable) = - assertionBuilder.descriptive - .holding - .withDescriptionAndRepresentation( - DescriptionThrowableAssertion.OCCURRED_EXCEPTION_MESSAGE, - throwable.message - ) - .build() - - private fun createStackTraceHint( - throwable: Throwable, - maxStackTrace: Int, - secondStackFrameOfParent: String? - ): Assertion { - val stackTrace = if (secondStackFrameOfParent != null) { - throwable.stackBacktrace.takeWhile { it != secondStackFrameOfParent } - } else { - throwable.stackBacktrace - } - val assertions = stackTrace.asSequence() - .take(maxStackTrace) - .map { - assertionBuilder.explanatory.withExplanation(Text(it)).build() - } - .let { - if (stackTrace.size > maxStackTrace) { - it.plus(assertionBuilder.explanatory.withExplanation(Text("...")).build()) - } else { - it - } - }.toList() - - return assertionBuilder.list - .withDescriptionAndEmptyRepresentation(DescriptionThrowableAssertion.OCCURRED_EXCEPTION_STACKTRACE) - .withAssertions(assertions) - .build() - } - - - private fun createCauseHint(throwable: Throwable, maxStackTrace: Int): AssertionGroup? = - throwable.cause?.let { cause -> - createChildHint( - throwable, - cause, - DescriptionThrowableAssertion.OCCURRED_EXCEPTION_CAUSE, - maxStackTrace - ) - } - - /** - * Creates a hint for a given [child] of the given [throwable] using the given [childDescription] - * and displaying [maxStackTrace]. - */ - fun createChildHint( - throwable: Throwable, - child: Throwable, - childDescription: Translatable, - maxStackTrace: Int - ): AssertionGroup { - val secondStackTrace = if (throwable.stackBacktrace.size > 1) throwable.stackBacktrace[1] else null - return assertionBuilder.list - .withDescriptionAndRepresentation(childDescription, child) - .withAssertion( - createHints( - child, - maxStackTrace, - secondStackTrace - ) - ) - .build() - } - } -} - -/** - * Hook for platform specific additional hints. - */ -@Suppress("DeprecatedCallableAddReplaceWith") -@Deprecated("use the function from atrium-logic instead, will be removed with 1.0.0") -expect fun createAdditionalHints(throwable: Throwable, maxStackTrace: Int): List diff --git a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/throwable/thrown/creators/creatorsDeprecated.kt b/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/throwable/thrown/creators/creatorsDeprecated.kt deleted file mode 100644 index 2f670d254..000000000 --- a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/throwable/thrown/creators/creatorsDeprecated.kt +++ /dev/null @@ -1,31 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0 */) -package ch.tutteli.atrium.domain.robstoll.lib.creating.throwable.thrown.creators - -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.domain.creating.throwable.thrown.ThrowableThrown -import ch.tutteli.atrium.domain.robstoll.lib.creating.throwable.thrown.providers._translatableBased -import ch.tutteli.atrium.translations.DescriptionThrowableAssertion -import ch.tutteli.atrium.translations.DescriptionThrowableAssertion.NO_EXCEPTION_OCCURRED -import kotlin.reflect.KClass - -@Suppress("DEPRECATION") -fun _nothingThrown(throwableThrownBuilder: ThrowableThrown.Builder) { - val provider = _translatableBased(NO_EXCEPTION_OCCURRED) - ThrowableThrownAssertionCreator(provider).executeActAssertNothingThrown(throwableThrownBuilder) -} - -@Suppress("DEPRECATION") -fun _toBe( - throwableThrownBuilder: ThrowableThrown.Builder, - expectedType: KClass, - assertionCreator: AssertionPlant.() -> Unit -) { - val provider = _translatableBased(NO_EXCEPTION_OCCURRED) - ThrowableThrownAssertionCreator(provider) - .executeActAndCreateAssertion( - throwableThrownBuilder, - DescriptionThrowableAssertion.IS_A, - expectedType, - assertionCreator - ) -} diff --git a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/throwable/thrown/providers/AbsentThrowableMessageProvider.kt b/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/throwable/thrown/providers/AbsentThrowableMessageProvider.kt deleted file mode 100644 index 1873b0fc7..000000000 --- a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/throwable/thrown/providers/AbsentThrowableMessageProvider.kt +++ /dev/null @@ -1,17 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0 */) - -package ch.tutteli.atrium.domain.robstoll.lib.creating.throwable.thrown.providers - -import ch.tutteli.atrium.domain.creating.throwable.thrown.ThrowableThrown -import ch.tutteli.atrium.reporting.RawString -import ch.tutteli.atrium.reporting.translating.Translatable - -/** - * Represents a [ThrowableThrown.AbsentThrowableMessageProvider] which is using a given [Translatable] which in $ - * turn explains an absent [Throwable]. - */ -@Suppress("DEPRECATION") -@Deprecated("Will be removed with 1.0.0") -class AbsentThrowableMessageProvider(translatable: Translatable) : ThrowableThrown.AbsentThrowableMessageProvider { - override val message = RawString.create(translatable) -} diff --git a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/throwable/thrown/providers/providers.kt b/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/throwable/thrown/providers/providers.kt deleted file mode 100644 index 852b5e689..000000000 --- a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/throwable/thrown/providers/providers.kt +++ /dev/null @@ -1,11 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0 */) - -package ch.tutteli.atrium.domain.robstoll.lib.creating.throwable.thrown.providers - -import ch.tutteli.atrium.domain.creating.throwable.thrown.ThrowableThrown -import ch.tutteli.atrium.reporting.translating.Translatable - -@Suppress("DeprecatedCallableAddReplaceWith", "DEPRECATION") -@Deprecated("Will be removed with 1.0.0") -fun _translatableBased(translatable: Translatable): ThrowableThrown.AbsentThrowableMessageProvider = - AbsentThrowableMessageProvider(translatable) diff --git a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/throwableAssertions.kt b/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/throwableAssertions.kt deleted file mode 100644 index 9952d2c9b..000000000 --- a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/throwableAssertions.kt +++ /dev/null @@ -1,33 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.domain.robstoll.lib.creating - -import ch.tutteli.atrium.api.fluent.en_GB.ExperimentalWithOptions -import ch.tutteli.atrium.api.fluent.en_GB.withRepresentation -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.domain.builders.ExpectImpl -import ch.tutteli.atrium.domain.creating.changers.ChangedSubjectPostStep -import ch.tutteli.atrium.domain.robstoll.lib.creating.throwable.thrown.creators.ThrowableThrownFailureHandler -import ch.tutteli.atrium.translations.DescriptionThrowableAssertion -import kotlin.reflect.KClass - -@Suppress( - "DeprecatedCallableAddReplaceWith", - /* OptIn is only available since 1.3.70 which we cannot use if we want to support 1.2 */ "DEPRECATION" -) -@Deprecated("use the function from atrium-logic instead, will be removed with 1.0.0") -@UseExperimental(ExperimentalWithOptions::class) -fun _cause( - expect: Expect, - expectedType: KClass -): ChangedSubjectPostStep = - ExpectImpl.feature.manualFeature(expect, DescriptionThrowableAssertion.OCCURRED_EXCEPTION_CAUSE) { cause } - .getExpectOfFeature() - .withRepresentation { it ?: DescriptionThrowableAssertion.NOT_CAUSED } - .let { - ExpectImpl.changeSubject(it).reportBuilder() - .downCastTo(expectedType) - .withFailureHandler(ThrowableThrownFailureHandler(maxStackTrace = 7)) - .build() - } diff --git a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/test/kotlin/ch/tutteli/atrium/assertions/LazyThreadUnsafeAssertionGroupSpec.kt b/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/test/kotlin/ch/tutteli/atrium/assertions/LazyThreadUnsafeAssertionGroupSpec.kt deleted file mode 100644 index a8f3e0ddd..000000000 --- a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/test/kotlin/ch/tutteli/atrium/assertions/LazyThreadUnsafeAssertionGroupSpec.kt +++ /dev/null @@ -1,73 +0,0 @@ -//TODO remove with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.assertions - -import ch.tutteli.atrium.api.fluent.en_GB.containsExactly -import ch.tutteli.atrium.api.fluent.en_GB.toBe -import ch.tutteli.atrium.api.verbs.internal.expect -import ch.tutteli.atrium.assertions.builders.assertionBuilder -import ch.tutteli.atrium.domain.robstoll.lib.assertions.LazyThreadUnsafeAssertionGroup -import org.spekframework.spek2.Spek -import org.spekframework.spek2.style.specification.describe - -object LazyThreadUnsafeAssertionGroupSpec : Spek({ - - describe("creating it") { - var callingCount = 0 - val assertion = assertionBuilder.descriptive - .failing - .withDescriptionAndRepresentation("b", 3) - .build() - - val testee = LazyThreadUnsafeAssertionGroup { - ++callingCount - assertionBuilder.feature - .withDescriptionAndRepresentation("a", 2) - .withAssertion(assertion) - .build() - } - it("does not evaluate anything") { - expect(callingCount).toBe(0) - } - it("adding it to a list does not evaluate anything") { - listOf(testee) - expect(callingCount).toBe(0) - } - context("invoking ${testee::holds.name}") { - var resultHolds = true - - it("execute it") { - resultHolds = testee.holds() - } - - it("evaluates it") { - expect(callingCount).toBe(1) - } - - it("returns ${AssertionGroup::holds.name}() of the underlying ${AssertionGroup::class.simpleName}") { - expect(resultHolds).toBe(false) - } - } - - context("invoking ${testee::holds.name} and then ${testee::assertions.name}") { - var resultHolds = true - - it("execute it") { - resultHolds = testee.holds() - } - - it("evaluates it only once") { - expect(callingCount).toBe(1) - } - - it("returns ${AssertionGroup::holds.name}() of the underlying ${AssertionGroup::class.simpleName}") { - expect(resultHolds).toBe(false) - } - - it("returns the ${AssertionGroup::assertions.name} of the underlying ${AssertionGroup::class.simpleName}") { - expect(testee.assertions).containsExactly(assertion) - } - } - } -}) diff --git a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/test/kotlin/ch/tutteli/atrium/assertions/LazyThreadUnsafeBasicAssertionSpec.kt b/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/test/kotlin/ch/tutteli/atrium/assertions/LazyThreadUnsafeBasicAssertionSpec.kt deleted file mode 100644 index 35173ad3d..000000000 --- a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/test/kotlin/ch/tutteli/atrium/assertions/LazyThreadUnsafeBasicAssertionSpec.kt +++ /dev/null @@ -1,63 +0,0 @@ -//TODO remove with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.assertions - -import ch.tutteli.atrium.api.fluent.en_GB.toBe -import ch.tutteli.atrium.api.verbs.internal.expect -import ch.tutteli.atrium.assertions.builders.assertionBuilder -import ch.tutteli.atrium.domain.robstoll.lib.assertions.LazyThreadUnsafeBasicAssertion -import org.spekframework.spek2.Spek -import org.spekframework.spek2.style.specification.describe - -object LazyThreadUnsafeBasicAssertionSpec : Spek({ - - describe("creating it") { - var callingCount = 0 - val testee = LazyThreadUnsafeBasicAssertion { - ++callingCount - assertionBuilder.descriptive.failing.withDescriptionAndRepresentation("a", 2).build() - } - it("does not evaluate anything") { - expect(callingCount).toBe(0) - } - it("adding it to a list does not evaluate anything") { - listOf(testee) - expect(callingCount).toBe(0) - } - context("invoking ${testee::holds.name}") { - var resultHolds = true - it("execute it") { - resultHolds = testee.holds() - } - - it("evaluates it") { - expect(callingCount).toBe(1) - } - - it("returns holds() of the underlying ${DescriptiveAssertion::class.simpleName}") { - expect(resultHolds).toBe(false) - } - } - - context("invoking ${testee::holds.name} and then ${testee::representation.name}") { - var resultHolds = true - - it("execute it") { - resultHolds = testee.holds() - } - - it("evaluates it only once") { - expect(callingCount).toBe(1) - } - - it("returns ${DescriptiveAssertion::holds.name}() of the underlying ${DescriptiveAssertion::class.simpleName}") { - expect(resultHolds).toBe(false) - } - - it("returns ${DescriptiveAssertion::representation.name} of the underlying ${DescriptiveAssertion::class.simpleName}") { - expect(testee.representation).toBe(2) - } - } - } -}) diff --git a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/test/kotlin/ch/tutteli/atrium/creating/charsequence/contains/searchers/CharSequenceContainsIndexSearcherSpec.kt b/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/test/kotlin/ch/tutteli/atrium/creating/charsequence/contains/searchers/CharSequenceContainsIndexSearcherSpec.kt deleted file mode 100644 index f1e77adb0..000000000 --- a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/test/kotlin/ch/tutteli/atrium/creating/charsequence/contains/searchers/CharSequenceContainsIndexSearcherSpec.kt +++ /dev/null @@ -1,18 +0,0 @@ -package ch.tutteli.atrium.creating.charsequence.contains.searchers - -import ch.tutteli.atrium.api.fluent.en_GB.contains -import ch.tutteli.atrium.api.fluent.en_GB.exactly -import ch.tutteli.atrium.api.fluent.en_GB.value -import ch.tutteli.atrium.api.verbs.internal.expect -import org.spekframework.spek2.Spek -import org.spekframework.spek2.style.specification.describe - -object CharSequenceContainsIndexSearcherSpec : Spek({ - - describe("text 'aaaa'") { - it("search for 'aa' finds 3 hits since we want non disjoint matches") { - expect("aaaa").contains.exactly(3).value("aa") - } - } - -}) diff --git a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/test/kotlin/ch/tutteli/atrium/creating/charsequence/contains/searchers/CharSequenceContainsRegexSearcherSpec.kt b/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/test/kotlin/ch/tutteli/atrium/creating/charsequence/contains/searchers/CharSequenceContainsRegexSearcherSpec.kt deleted file mode 100644 index 45b1d2e5c..000000000 --- a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-common/src/test/kotlin/ch/tutteli/atrium/creating/charsequence/contains/searchers/CharSequenceContainsRegexSearcherSpec.kt +++ /dev/null @@ -1,21 +0,0 @@ -package ch.tutteli.atrium.creating.charsequence.contains.searchers - -import ch.tutteli.atrium.api.fluent.en_GB.contains -import ch.tutteli.atrium.api.fluent.en_GB.exactly -import ch.tutteli.atrium.api.fluent.en_GB.regex -import ch.tutteli.atrium.api.verbs.internal.expect -import org.spekframework.spek2.Spek -import org.spekframework.spek2.style.specification.describe - -object CharSequenceContainsRegexSearcherSpec : Spek({ - - describe("text 'aaaa'") { - it("search for 'aa' finds 3 hits since we want non disjoint matches") { - expect("aaaa").contains.exactly(3).regex("aa") - } - it("search for 'aa?' finds 4 hits since we want non disjoint matches") { - expect("aaaa").contains.exactly(4).regex("aa?") - } - } - -}) diff --git a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-js/build.gradle b/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-js/build.gradle index 336efd556..48a7cd20a 100644 --- a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-js/build.gradle +++ b/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-js/build.gradle @@ -6,13 +6,8 @@ description = 'Contains the bits and pieces behind robstoll\'s = emptyList() diff --git a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-jvm/build.gradle b/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-jvm/build.gradle index 43a344bf9..fce9718e5 100644 --- a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-jvm/build.gradle +++ b/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-jvm/build.gradle @@ -11,15 +11,11 @@ ext.jacoco_additional = [ dependencies { api prefixedProject('domain-builders-jvm') - implementation prefixedProject('api-fluent-en_GB-jvm') implementation niok() // it is up to the consumer of atrium-domain-robstoll-lib which atrium-translations module is used at runtime compileOnly prefixedProject('translations-en_GB-jvm') - //TODO remove with 1.0.0 - implementation prefixedProject('api-cc-en_GB-jvm') - testImplementation prefixedProject('specs-jvm') } diff --git a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-jvm/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/bigDecimalAssertions.kt b/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-jvm/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/bigDecimalAssertions.kt deleted file mode 100644 index 47ed9936b..000000000 --- a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-jvm/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/bigDecimalAssertions.kt +++ /dev/null @@ -1,69 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress( - "DEPRECATION", - /* TODO remove once https://youtrack.jetbrains.com/issue/KT-35343 is fixed */ - "JAVA_MODULE_DOES_NOT_READ_UNNAMED_MODULE" -) - -package ch.tutteli.atrium.domain.robstoll.lib.creating - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.assertions.builders.assertionBuilder -import ch.tutteli.atrium.assertions.builders.withExplanatoryAssertion -import ch.tutteli.atrium.assertions.builders.withFailureHint -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.translations.DescriptionBigDecimalAssertion.* -import java.math.BigDecimal - -@Suppress("DeprecatedCallableAddReplaceWith") -@Deprecated("use the function from atrium-logic instead, will be removed with 1.0.0") -fun _isNumericallyEqualTo(subjectProvider: SubjectProvider, expected: T) = - assertionBuilder.createDescriptive(subjectProvider, IS_NUMERICALLY_EQUAL_TO, expected) { - isNumericallyEqualTo(it, expected) - } - -private fun isNumericallyEqualTo(subject: T, expected: T) = - subject.compareTo(expected) == 0 - -@Suppress("DeprecatedCallableAddReplaceWith") -@Deprecated("use the function from atrium-logic instead, will be removed with 1.0.0") -fun _isNotNumericallyEqualTo(subjectProvider: SubjectProvider, expected: T) = - assertionBuilder.createDescriptive( - subjectProvider, - IS_NOT_NUMERICALLY_EQUAL_TO, - expected - ) { !isNumericallyEqualTo(it, expected) } - -@Suppress("DeprecatedCallableAddReplaceWith") -@Deprecated("use the function from atrium-logic instead, will be removed with 1.0.0") -fun _isEqualIncludingScale( - subjectProvider: SubjectProvider, - expected: T, - nameOfIsNumericallyEqualTo: String -): Assertion = assertionBuilder.descriptive - .withTest(subjectProvider) { it == expected } - .withFailureHint { - assertionBuilder.explanatoryGroup - .withDefaultType - .withExplanatoryAssertion( - FAILURE_IS_EQUAL_INCLUDING_SCALE_BUT_NUMERICALLY_EQUAL, - nameOfIsNumericallyEqualTo - ) - .build() - } - .showBasedOnDefinedSubjectOnlyIf(subjectProvider) { - isNumericallyEqualTo(it, expected) - } - .withDescriptionAndRepresentation(IS_EQUAL_INCLUDING_SCALE, expected) - .build() - -@Suppress("DeprecatedCallableAddReplaceWith") -@Deprecated("use the function from atrium-logic instead, will be removed with 1.0.0") -fun _isNotEqualIncludingScale(subjectProvider: SubjectProvider, expected: T): Assertion { - // unfortunately we cannot give a hint about isNotNumericallyEqualTo, because <<10 is not 10.0>> holds - // so we do not get to the point where we can detect that using this function instead of isNotNumericallyEqualTo - // might not be the intention of the user - return assertionBuilder.createDescriptive(subjectProvider, IS_NOT_EQUAL_INCLUDING_SCALE, expected) { - it != expected - } -} diff --git a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-jvm/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/chronoLocalDateAssertions.kt b/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-jvm/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/chronoLocalDateAssertions.kt deleted file mode 100644 index 46d93bb41..000000000 --- a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-jvm/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/chronoLocalDateAssertions.kt +++ /dev/null @@ -1,46 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress( - "DEPRECATION", - /* TODO remove once https://youtrack.jetbrains.com/issue/KT-35343 is fixed */ - "JAVA_MODULE_DOES_NOT_READ_UNNAMED_MODULE" -) - -package ch.tutteli.atrium.domain.robstoll.lib.creating - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.assertions.builders.assertionBuilder -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.translations.DescriptionDateTimeLikeAssertion.* -import java.time.chrono.ChronoLocalDate - -@Suppress("DeprecatedCallableAddReplaceWith") -@Deprecated("use the function from atrium-logic instead, will be removed with 1.0.0") -fun _isBefore(expect: Expect, expected: ChronoLocalDate): Assertion = - assertionBuilder.createDescriptive(expect, IS_BEFORE, expected) { it.isBefore(expected) } - -@Suppress("DeprecatedCallableAddReplaceWith") -@Deprecated("use the function from atrium-logic instead, will be removed with 1.0.0") -fun _isBeforeOrEquals(expect: Expect, expected: ChronoLocalDate): Assertion = - assertionBuilder.createDescriptive(expect, IS_BEFORE_OR_EQUAL, expected) { - it.isBefore(expected) || it.isEqual(expected) - } - -@Suppress("DeprecatedCallableAddReplaceWith") -@Deprecated("use the function from atrium-logic instead, will be removed with 1.0.0") -fun _isAfter(expect: Expect, expected: ChronoLocalDate): Assertion = - assertionBuilder.createDescriptive(expect, IS_AFTER, expected) { it.isAfter(expected) } - -@Suppress("DeprecatedCallableAddReplaceWith") -@Deprecated("use the function from atrium-logic instead, will be removed with 1.0.0") -fun _isAfterOrEquals(expect: Expect, expected: ChronoLocalDate): Assertion = - assertionBuilder.createDescriptive(expect, IS_AFTER_OR_EQUAL, expected) { - it.isAfter(expected) || it.isEqual(expected) - } - -@Suppress("DeprecatedCallableAddReplaceWith") -@Deprecated("use the function from atrium-logic instead, will be removed with 1.0.0") -fun _isEqual(expect: Expect, expected: ChronoLocalDate): Assertion = - assertionBuilder.createDescriptive(expect, SAME_DAY, expected) { - it.isEqual(expected) - } - diff --git a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-jvm/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/chronoLocalDateTimeAssertions.kt b/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-jvm/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/chronoLocalDateTimeAssertions.kt deleted file mode 100644 index c22ae1803..000000000 --- a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-jvm/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/chronoLocalDateTimeAssertions.kt +++ /dev/null @@ -1,96 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress( - "DEPRECATION", - /* TODO remove once https://youtrack.jetbrains.com/issue/KT-35343 is fixed */ - "JAVA_MODULE_DOES_NOT_READ_UNNAMED_MODULE" -) - -package ch.tutteli.atrium.domain.robstoll.lib.creating - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.assertions.builders.assertionBuilder -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.translations.DescriptionDateTimeLikeAssertion.* -import java.time.LocalDate -import java.time.LocalDateTime -import java.time.chrono.ChronoLocalDate -import java.time.chrono.ChronoLocalDateTime - -@Suppress("DeprecatedCallableAddReplaceWith") -@Deprecated("use the function from atrium-logic instead, will be removed with 1.0.0") -fun > _isBefore(expect: Expect, expected: ChronoLocalDateTime<*>): Assertion = - assertionBuilder.createDescriptive(expect, IS_BEFORE, expected) { it.isBefore(expected) } - -fun > _isBefore(expect: Expect, expected: String): Assertion = - assertionBuilder.createDescriptive(expect, IS_BEFORE, expected) { it.isBefore(stringToLocalDateTime(expected)) } - -@Suppress("DeprecatedCallableAddReplaceWith") -@Deprecated("use the function from atrium-logic instead, will be removed with 1.0.0") -fun > _isBeforeOrEquals( - expect: Expect, - expected: ChronoLocalDateTime<*> -): Assertion = - assertionBuilder.createDescriptive(expect, IS_BEFORE_OR_EQUAL, expected) { - it.isBefore(expected) || it.isEqual(expected) - } - -fun > _isBeforeOrEquals( - expect: Expect, - expected: String -): Assertion = assertionBuilder.createDescriptive(expect, IS_BEFORE_OR_EQUAL, expected) { - it.isBefore(stringToLocalDateTime(expected)) || it.isEqual(stringToLocalDateTime(expected)) - } - -@Suppress("DeprecatedCallableAddReplaceWith") -@Deprecated("use the function from atrium-logic instead, will be removed with 1.0.0") -fun > _isAfter( - expect: Expect, - expected: ChronoLocalDateTime<*> -): Assertion = assertionBuilder.createDescriptive(expect, IS_AFTER, expected) { it.isAfter(expected) } - -@Suppress("DeprecatedCallableAddReplaceWith") -@Deprecated("use the function from atrium-logic instead, will be removed with 1.0.0") -fun > _isAfter( - expect: Expect, - expected: String -): Assertion = assertionBuilder.createDescriptive(expect, IS_AFTER, expected) { - it.isAfter(stringToLocalDateTime(expected)) -} - -fun > _isAfterOrEquals( - expect: Expect, - expected: ChronoLocalDateTime<*> -): Assertion = assertionBuilder.createDescriptive(expect, IS_AFTER_OR_EQUAL, expected) { - it.isAfter(expected) || it.isEqual(expected) -} - -@Suppress("DeprecatedCallableAddReplaceWith") -@Deprecated("use the function from atrium-logic instead, will be removed with 1.0.0") -fun > _isAfterOrEquals( - expect: Expect, - expected: String -): Assertion = assertionBuilder.createDescriptive(expect, IS_AFTER_OR_EQUAL, expected) { - it.isAfter(stringToLocalDateTime(expected)) || it.isEqual(stringToLocalDateTime(expected)) -} - -fun > _isEqual( - expect: Expect, - expected: ChronoLocalDateTime<*> -): Assertion = assertionBuilder.createDescriptive(expect, IS_EQUAL_TO, expected) { - it.isEqual(expected) -} - -fun > _isEqual( - expect: Expect, - expected: String -): Assertion = assertionBuilder.createDescriptive(expect, IS_EQUAL_TO, expected) { - it.isEqual(stringToLocalDateTime(expected)) -} - -private fun stringToLocalDateTime(data: String): LocalDateTime { - return if (data.contains("T")) { - LocalDateTime.parse(data) - } else { - LocalDate.parse(data).atStartOfDay() - } -} diff --git a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-jvm/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/chronoZonedDateTimeAssertions.kt b/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-jvm/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/chronoZonedDateTimeAssertions.kt deleted file mode 100644 index 45e64e4e8..000000000 --- a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-jvm/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/chronoZonedDateTimeAssertions.kt +++ /dev/null @@ -1,57 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress( - "DEPRECATION", - /* TODO remove once https://youtrack.jetbrains.com/issue/KT-35343 is fixed */ - "JAVA_MODULE_DOES_NOT_READ_UNNAMED_MODULE" -) - -package ch.tutteli.atrium.domain.robstoll.lib.creating - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.assertions.builders.assertionBuilder -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.translations.DescriptionDateTimeLikeAssertion.* -import java.time.chrono.ChronoLocalDate -import java.time.chrono.ChronoZonedDateTime - -@Suppress("DeprecatedCallableAddReplaceWith") -@Deprecated("use the function from atrium-logic instead, will be removed with 1.0.0") -fun > _isBefore( - expect: Expect, - expected: ChronoZonedDateTime<*> -): Assertion = assertionBuilder.createDescriptive(expect, IS_BEFORE, expected) { it.isBefore(expected) } - -@Suppress("DeprecatedCallableAddReplaceWith") -@Deprecated("use the function from atrium-logic instead, will be removed with 1.0.0") -fun > _isBeforeOrEquals( - expect: Expect, - expected: ChronoZonedDateTime<*> -): Assertion = - assertionBuilder.createDescriptive(expect, IS_BEFORE_OR_EQUAL, expected) { - it.isBefore(expected) || it.isEqual(expected) - } - -@Suppress("DeprecatedCallableAddReplaceWith") -@Deprecated("use the function from atrium-logic instead, will be removed with 1.0.0") -fun > _isAfter( - expect: Expect, - expected: ChronoZonedDateTime<*> -): Assertion = assertionBuilder.createDescriptive(expect, IS_AFTER, expected) { it.isAfter(expected) } - -@Suppress("DeprecatedCallableAddReplaceWith") -@Deprecated("use the function from atrium-logic instead, will be removed with 1.0.0") -fun > _isAfterOrEquals( - expect: Expect, - expected: ChronoZonedDateTime<*> -): Assertion = assertionBuilder.createDescriptive(expect, IS_AFTER_OR_EQUAL, expected) { - it.isAfter(expected) || it.isEqual(expected) -} - -@Suppress("DeprecatedCallableAddReplaceWith") -@Deprecated("use the function from atrium-logic instead, will be removed with 1.0.0") -fun > _isEqual( - expect: Expect, - expected: ChronoZonedDateTime<*> -): Assertion = assertionBuilder.createDescriptive(expect, IS_EQUAL_TO, expected) { - it.isEqual(expected) -} diff --git a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-jvm/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/filesystem/IoResult.kt b/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-jvm/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/filesystem/IoResult.kt deleted file mode 100644 index 881034051..000000000 --- a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-jvm/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/filesystem/IoResult.kt +++ /dev/null @@ -1,28 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.domain.robstoll.lib.creating.filesystem - -import java.io.IOException -import java.nio.file.Path - -/** - * Executes the given [block] and catches [IOException]s. - * - * @return [Success] with [this] path and [block]’s result if [block] executes successfully. - * [Failure] with [this] path and the thrown [IOException] if [block] throws an [IOException] - * @throws Exception any exception that is thrown by [block] if it is not an [IOException] - */ -@Deprecated("use runCatchingIo from atrium-logic; will be removed with 1.0.0") -inline fun Path.runCatchingIo(block: Path.() -> T): IoResult = try { - Success(this, this.block()) -} catch (e: IOException) { - Failure(this, e) -} - -@Deprecated("use IoResult from atrium-logic; will be removed with 1.0.0") -sealed class IoResult(val path: Path) -@Deprecated("use Success from atrium-logic; will be removed with 1.0.0") -class Success(path: Path, val value: T) : IoResult(path) -@Deprecated("use Failure from atrium-logic; will be removed with 1.0.0") -class Failure(path: Path, val exception: IOException) : IoResult(path) diff --git a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-jvm/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/filesystem/symbolicLinkResolving.kt b/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-jvm/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/filesystem/symbolicLinkResolving.kt deleted file mode 100644 index f64af31d2..000000000 --- a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-jvm/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/filesystem/symbolicLinkResolving.kt +++ /dev/null @@ -1,106 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress( - /* TODO remove once https://youtrack.jetbrains.com/issue/KT-35343 is fixed */ "JAVA_MODULE_DOES_NOT_READ_UNNAMED_MODULE", - "DEPRECATION" -) - -package ch.tutteli.atrium.domain.robstoll.lib.creating.filesystem - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.assertions.AssertionGroup -import ch.tutteli.atrium.assertions.builders.assertionBuilder -import ch.tutteli.atrium.assertions.builders.withExplanatoryAssertion -import ch.tutteli.atrium.translations.DescriptionPathAssertion.FAILURE_DUE_TO_LINK_LOOP -import ch.tutteli.atrium.translations.DescriptionPathAssertion.HINT_FOLLOWED_SYMBOLIC_LINK -import ch.tutteli.niok.followSymbolicLink -import java.io.IOException -import java.nio.file.Path -import java.util.* - -@Deprecated("use function from atrium-logic; will be removed with 1.0.0") -inline fun explainForResolvedLink(path: Path, resolvedPathAssertionProvider: (realPath: Path) -> Assertion): Assertion { - val hintList = LinkedList() - val realPath = addAllLevelResolvedSymlinkHints(path, hintList) - val resolvedPathAssertion = resolvedPathAssertionProvider(realPath) - return if (hintList.isNotEmpty()) { - when (resolvedPathAssertion) { - //TODO this should be done differently - is AssertionGroup -> hintList.addAll(resolvedPathAssertion.assertions) - else -> hintList.add(resolvedPathAssertion) - } - assertionBuilder.explanatoryGroup.withDefaultType - .withAssertions(hintList) - .build() - } else { - resolvedPathAssertion - } -} - -/** - * Resolves the provided [path] and returns the resolved target (if resolving is possible). - * Adds explanatory hints for all involved symbolic links to [hintList]. - */ -@PublishedApi -@Deprecated("use function from atrium-logic; will be removed with 1.0.0") -internal fun addAllLevelResolvedSymlinkHints(path: Path, hintList: Deque): Path { - val absolutePath = path.toAbsolutePath().normalize() - return addAllLevelResolvedSymlinkHints(absolutePath, hintList, Stack()) -} - -private fun addAllLevelResolvedSymlinkHints( - absolutePath: Path, - hintList: Deque, - loopDetection: Stack -): Path { - var currentPath = absolutePath.root - - for (part in absolutePath) { - currentPath = currentPath.resolve(part) - - val loopDetectionIndex = loopDetection.indexOf(currentPath) - if (loopDetectionIndex != -1) { - // add to the list so [hintForLinkLoop] prints this duplicate twice - loopDetection.add(currentPath) - hintList.add(hintForLinkLoop(loopDetection, loopDetectionIndex)) - return absolutePath - } - - val nextPathAfterFollowSymbolicLink = addOneStepResolvedSymlinkHint(currentPath, hintList) - if (nextPathAfterFollowSymbolicLink != null) { - loopDetection.push(currentPath) - currentPath = addAllLevelResolvedSymlinkHints(nextPathAfterFollowSymbolicLink, hintList, loopDetection) - loopDetection.pop() - } - } - return currentPath -} - -/** - * If [absolutePath] is surely a symlink, adds an explanatory hint to [hintList] and returns the link target. - * Return `null` and does not modify [hintList] otherwise. - */ -private fun addOneStepResolvedSymlinkHint(absolutePath: Path, hintList: Deque): Path? { - // we use try-catch as a control flow structure, where within the try we assume [absolutePath] to be a symbolic link - return try { - val nextPath = absolutePath - .resolveSibling(absolutePath.followSymbolicLink()) - .normalize() - - hintList.add( - assertionBuilder.explanatory - .withExplanation(HINT_FOLLOWED_SYMBOLIC_LINK, absolutePath, nextPath) - .build() - ) - nextPath - } catch (e: IOException) { - // either this is not a link, or we cannot check it. The best we can do is assume it is not a link. - null - } -} - -private fun hintForLinkLoop(loop: List, startIndex: Int): Assertion { - val loopRepresentation = loop.subList(startIndex, loop.size).joinToString(" -> ") - return assertionBuilder.explanatoryGroup.withWarningType - .withExplanatoryAssertion(FAILURE_DUE_TO_LINK_LOOP, loopRepresentation) - .build() -} diff --git a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-jvm/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/floatingPointJvmAssertions.kt b/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-jvm/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/floatingPointJvmAssertions.kt deleted file mode 100644 index 388c42257..000000000 --- a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-jvm/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/floatingPointJvmAssertions.kt +++ /dev/null @@ -1,29 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress( - "DEPRECATION", - /* TODO remove once https://youtrack.jetbrains.com/issue/KT-35343 is fixed */ - "JAVA_MODULE_DOES_NOT_READ_UNNAMED_MODULE" -) -@file:JvmMultifileClass -@file:JvmName("floatingPointAssertionsKt") - -package ch.tutteli.atrium.domain.robstoll.lib.creating - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.creating.SubjectProvider -import java.math.BigDecimal - -@Suppress("DeprecatedCallableAddReplaceWith") -@Deprecated("use the function from atrium-logic instead, will be removed with 1.0.0") -fun _toBeWithErrorTolerance( - subjectProvider: SubjectProvider, - expected: T, - tolerance: T -): Assertion { - val absDiff = { subject: BigDecimal -> (subject - expected).abs() } - return toBeWithErrorTolerance(subjectProvider, expected, tolerance, absDiff) { subject -> - listOf( - createToBeWithErrorToleranceExplained(subject, expected, absDiff, tolerance) - ) - } -} diff --git a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-jvm/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/localDateAssertions.kt b/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-jvm/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/localDateAssertions.kt deleted file mode 100644 index 34d2584b7..000000000 --- a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-jvm/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/localDateAssertions.kt +++ /dev/null @@ -1,39 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress( - "DEPRECATION", - /* TODO remove once https://youtrack.jetbrains.com/issue/KT-35343 is fixed */ - "JAVA_MODULE_DOES_NOT_READ_UNNAMED_MODULE", - /* remove once https://youtrack.jetbrains.com/issue/KT-34257 is fixed */ - "FINAL_UPPER_BOUND" -) - -package ch.tutteli.atrium.domain.robstoll.lib.creating - -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.domain.builders.ExpectImpl -import ch.tutteli.atrium.domain.creating.changers.ExtractedFeaturePostStep -import ch.tutteli.atrium.translations.DescriptionDateTimeLikeAssertion -import java.time.DayOfWeek -import java.time.LocalDate - -@Suppress("DeprecatedCallableAddReplaceWith") -@Deprecated("use the function from atrium-logic instead, will be removed with 1.0.0") -fun _year(expect: Expect): ExtractedFeaturePostStep = - ExpectImpl.feature.manualFeature(expect, DescriptionDateTimeLikeAssertion.YEAR) { year } - -@Suppress("DeprecatedCallableAddReplaceWith") -@Deprecated("use the function from atrium-logic instead, will be removed with 1.0.0") -fun _month(expect: Expect): ExtractedFeaturePostStep = - ExpectImpl.feature.manualFeature(expect, DescriptionDateTimeLikeAssertion.MONTH) { monthValue } - -@Suppress("DeprecatedCallableAddReplaceWith") -@Deprecated("use the function from atrium-logic instead, will be removed with 1.0.0") -fun _day(expect: Expect): ExtractedFeaturePostStep = - ExpectImpl.feature.manualFeature(expect, DescriptionDateTimeLikeAssertion.DAY) { dayOfMonth } - -@Suppress("DeprecatedCallableAddReplaceWith") -@Deprecated("use the function from atrium-logic instead, will be removed with 1.0.0") -fun _dayOfWeek(expect: Expect): ExtractedFeaturePostStep = - ExpectImpl.feature.manualFeature(expect, DescriptionDateTimeLikeAssertion.DAY_OF_WEEK) { dayOfWeek } - - diff --git a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-jvm/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/localDateTimeAssertions.kt b/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-jvm/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/localDateTimeAssertions.kt deleted file mode 100644 index 0a447ad03..000000000 --- a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-jvm/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/localDateTimeAssertions.kt +++ /dev/null @@ -1,38 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress( - "DEPRECATION", - /* TODO remove once https://youtrack.jetbrains.com/issue/KT-35343 is fixed */ - "JAVA_MODULE_DOES_NOT_READ_UNNAMED_MODULE", - /* remove once https://youtrack.jetbrains.com/issue/KT-34257 is fixed */ - "FINAL_UPPER_BOUND" -) - -package ch.tutteli.atrium.domain.robstoll.lib.creating - -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.domain.builders.ExpectImpl -import ch.tutteli.atrium.domain.creating.changers.ExtractedFeaturePostStep -import ch.tutteli.atrium.translations.DescriptionDateTimeLikeAssertion -import java.time.DayOfWeek -import java.time.LocalDateTime - -@Suppress("DeprecatedCallableAddReplaceWith") -@Deprecated("use the function from atrium-logic instead, will be removed with 1.0.0") -fun _year(expect: Expect): ExtractedFeaturePostStep = - ExpectImpl.feature.manualFeature(expect, DescriptionDateTimeLikeAssertion.YEAR) { year } - -@Suppress("DeprecatedCallableAddReplaceWith") -@Deprecated("use the function from atrium-logic instead, will be removed with 1.0.0") -fun _month(expect: Expect): ExtractedFeaturePostStep = - ExpectImpl.feature.manualFeature(expect, DescriptionDateTimeLikeAssertion.MONTH) { monthValue } - -@Suppress("DeprecatedCallableAddReplaceWith") -@Deprecated("use the function from atrium-logic instead, will be removed with 1.0.0") -fun _day(expect: Expect): ExtractedFeaturePostStep = - ExpectImpl.feature.manualFeature(expect, DescriptionDateTimeLikeAssertion.DAY) { dayOfMonth } - -@Suppress("DeprecatedCallableAddReplaceWith") -@Deprecated("use the function from atrium-logic instead, will be removed with 1.0.0") -fun _dayOfWeek(expect: Expect): ExtractedFeaturePostStep = - ExpectImpl.feature.manualFeature(expect, DescriptionDateTimeLikeAssertion.DAY_OF_WEEK) { dayOfWeek } - diff --git a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-jvm/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/optionalAssertions.kt b/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-jvm/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/optionalAssertions.kt deleted file mode 100644 index ca1631600..000000000 --- a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-jvm/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/optionalAssertions.kt +++ /dev/null @@ -1,34 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress( - "DEPRECATION", - /* TODO remove once https://youtrack.jetbrains.com/issue/KT-35343 is fixed */ - "JAVA_MODULE_DOES_NOT_READ_UNNAMED_MODULE" -) -package ch.tutteli.atrium.domain.robstoll.lib.creating - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.assertions.builders.assertionBuilder -import ch.tutteli.atrium.core.Option -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.domain.builders.ExpectImpl -import ch.tutteli.atrium.domain.creating.changers.ExtractedFeaturePostStep -import ch.tutteli.atrium.translations.DescriptionBasic.IS -import ch.tutteli.atrium.translations.DescriptionOptionalAssertion -import java.util.* - -@Suppress("DeprecatedCallableAddReplaceWith") -@Deprecated("use the function from atrium-logic instead, will be removed with 1.0.0") -fun > _isEmpty(expect: Expect): Assertion = - assertionBuilder.createDescriptive(expect, IS, DescriptionOptionalAssertion.EMPTY) { !it.isPresent } - -@Suppress("DeprecatedCallableAddReplaceWith") -@Deprecated("use the function from atrium-logic instead, will be removed with 1.0.0") -fun > _isPresent(expect: Expect): ExtractedFeaturePostStep = - ExpectImpl.feature.extractor(expect) - .withDescription(DescriptionOptionalAssertion.GET) - .withRepresentationForFailure(DescriptionOptionalAssertion.IS_NOT_PRESENT) - .withFeatureExtraction { - Option.someIf(it.isPresent) { it.get() } - } - .withoutOptions() - .build() diff --git a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-jvm/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/pathAssertions.kt b/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-jvm/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/pathAssertions.kt deleted file mode 100644 index 20a693c49..000000000 --- a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-jvm/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/pathAssertions.kt +++ /dev/null @@ -1,458 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress( - "DEPRECATION", - /* TODO remove once https://youtrack.jetbrains.com/issue/KT-35343 is fixed */ - "JAVA_MODULE_DOES_NOT_READ_UNNAMED_MODULE" -) - -package ch.tutteli.atrium.domain.robstoll.lib.creating - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.assertions.AssertionGroup -import ch.tutteli.atrium.assertions.builders.assertionBuilder -import ch.tutteli.atrium.assertions.builders.withFailureHintBasedOnDefinedSubject -import ch.tutteli.atrium.core.None -import ch.tutteli.atrium.core.Some -import ch.tutteli.atrium.core.polyfills.fullName -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.domain.builders.ExpectImpl -import ch.tutteli.atrium.domain.creating.changers.ExtractedFeaturePostStep -import ch.tutteli.atrium.domain.robstoll.lib.creating.filesystem.* -import ch.tutteli.atrium.domain.robstoll.lib.creating.throwable.thrown.creators.ThrowableThrownFailureHandler -import ch.tutteli.atrium.reporting.translating.Translatable -import ch.tutteli.atrium.reporting.translating.TranslatableWithArgs -import ch.tutteli.atrium.translations.DescriptionBasic.* -import ch.tutteli.atrium.translations.DescriptionCharSequenceAssertion.ENDS_NOT_WITH -import ch.tutteli.atrium.translations.DescriptionPathAssertion.* -import ch.tutteli.niok.* -import java.io.IOException -import java.nio.charset.Charset -import java.nio.file.AccessDeniedException -import java.nio.file.AccessMode -import java.nio.file.NoSuchFileException -import java.nio.file.Path -import java.nio.file.attribute.* -import java.nio.file.attribute.PosixFilePermission.* -import java.util.* - -private const val IO_EXCEPTION_STACK_TRACE_LENGTH = 15 - -@Suppress("DeprecatedCallableAddReplaceWith") -@Deprecated("use the function from atrium-logic instead, will be removed with 1.0.0") -fun _startsWith(expect: Expect, expected: Path): Assertion = - assertionBuilder.createDescriptive(expect, STARTS_WITH, expected) { it.startsWith(expected) } - -@Suppress("DeprecatedCallableAddReplaceWith") -@Deprecated("use the function from atrium-logic instead, will be removed with 1.0.0") -fun _startsNotWith(expect: Expect, expected: Path): Assertion = - assertionBuilder.createDescriptive(expect, STARTS_NOT_WITH, expected) { !it.startsWith(expected) } - -@Suppress("DeprecatedCallableAddReplaceWith") -@Deprecated("use the function from atrium-logic instead, will be removed with 1.0.0") -fun _endsWith(expect: Expect, expected: Path): Assertion = - assertionBuilder.createDescriptive(expect, ENDS_WITH, expected) { it.endsWith(expected) } - -@Suppress("DeprecatedCallableAddReplaceWith") -@Deprecated("use the function from atrium-logic instead, will be removed with 1.0.0") -fun _endsNotWith(expect: Expect, expected: Path) = - assertionBuilder.createDescriptive(expect, ENDS_NOT_WITH, expected) { !it.endsWith(expected) } - -@Suppress("DeprecatedCallableAddReplaceWith") -@Deprecated("use the function from atrium-logic instead, will be removed with 1.0.0") -fun _hasSameTextualContentAs( - expect: Expect, - targetPath: Path, - sourceCharset: Charset, - targetCharset: Charset -) = - assertionBuilder.createDescriptive( - expect, - TranslatableWithArgs(HAS_SAME_TEXTUAL_CONTENT, sourceCharset, targetCharset), - targetPath - ) { - it.readText(sourceCharset) == targetPath.readText(targetCharset) - } - -@Suppress("DeprecatedCallableAddReplaceWith") -@Deprecated("use the function from atrium-logic instead, will be removed with 1.0.0") -fun _hasSameBinaryContentAs(expect: Expect, targetPath: Path) = - assertionBuilder.createDescriptive(expect, HAS_SAME_BINARY_CONTENT, targetPath) { - it.readAllBytes().contentEquals(targetPath.readAllBytes()) - } - -@Suppress("DeprecatedCallableAddReplaceWith") -@Deprecated("use the function from atrium-logic instead, will be removed with 1.0.0") -fun _exists(expect: Expect): Assertion = - changeSubjectToFileAttributes(expect) { fileAttributesAssertionContainer -> - assertionBuilder.descriptive - .withTest(fileAttributesAssertionContainer) { it is Success } - .withFailureHintBasedOnDefinedSubject(fileAttributesAssertionContainer) { result -> - explainForResolvedLink(result.path) { realPath -> - val exception = (result as Failure).exception - when (exception) { - // TODO remove group once https://github.com/robstoll/atrium-roadmap/issues/1 is implemented - is NoSuchFileException -> assertionBuilder.explanatoryGroup.withDefaultType.withAssertion( - hintForClosestExistingParent(realPath) - ).build() - else -> hintForIoException(realPath, exception) - } - } - } - .withDescriptionAndRepresentation(TO, EXIST) - .build() - } - -@Suppress("DeprecatedCallableAddReplaceWith") -@Deprecated("use the function from atrium-logic instead, will be removed with 1.0.0") -fun _existsNot(expect: Expect): Assertion = - changeSubjectToFileAttributes(expect) { fileAttributesAssertionContainer -> - assertionBuilder.descriptive - .withTest(fileAttributesAssertionContainer) { it is Failure && it.exception is NoSuchFileException } - .withFailureHintBasedOnDefinedSubject(fileAttributesAssertionContainer) { result -> - explainForResolvedLink(result.path) { realPath -> - when (result) { - is Success -> describeWas(result.value.fileType) - is Failure -> hintForIoException(realPath, result.exception) - } - } - } - .withDescriptionAndRepresentation(NOT_TO, EXIST) - .build() - } - -@Suppress("DeprecatedCallableAddReplaceWith") -@Deprecated("use the function from atrium-logic instead, will be removed with 1.0.0") -fun _isReadable(expect: Expect): Assertion = - filePermissionAssertion(expect, READABLE, AccessMode.READ) - -@Suppress("DeprecatedCallableAddReplaceWith") -@Deprecated("use the function from atrium-logic instead, will be removed with 1.0.0") -fun _isWritable(expect: Expect): Assertion = - filePermissionAssertion(expect, WRITABLE, AccessMode.WRITE) - -@Suppress("DeprecatedCallableAddReplaceWith") -@Deprecated("use the function from atrium-logic instead, will be removed with 1.0.0") -fun _isRegularFile(expect: Expect): Assertion = - fileTypeAssertion(expect, A_FILE) { it.isRegularFile } - -@Suppress("DeprecatedCallableAddReplaceWith") -@Deprecated("use the function from atrium-logic instead, will be removed with 1.0.0") -fun _isDirectory(expect: Expect): Assertion = - fileTypeAssertion(expect, A_DIRECTORY) { it.isDirectory } - -private fun filePermissionAssertion( - expect: Expect, - permissionName: Translatable, - accessMode: AccessMode -) = ExpectImpl.changeSubject(expect).unreported { - it.runCatchingIo { fileSystem.provider().checkAccess(it, accessMode) } -}.let { checkAccessResultContainer -> - assertionBuilder.descriptive - .withTest(checkAccessResultContainer) { it is Success } - .withFailureHintBasedOnDefinedSubject(checkAccessResultContainer) { result -> - explainForResolvedLink(result.path) { realPath -> - val exception = (result as Failure).exception - when (exception) { - is AccessDeniedException -> findHintForProblemWithParent(realPath) - ?: assertionBuilder.explanatoryGroup.withDefaultType - .withAssertions( - listOf(hintForExistsButMissingPermission(realPath, permissionName)) - + hintForOwnersAndPermissions(realPath) - ) - .build() - else -> hintForIoException(realPath, exception) - } - } - } - .withDescriptionAndRepresentation(IS, permissionName) - .build() -} - -private inline fun fileTypeAssertion( - expect: Expect, - typeName: Translatable, - crossinline typeTest: (BasicFileAttributes) -> Boolean -) = changeSubjectToFileAttributes(expect) { fileAttributesAssertionContainer -> - assertionBuilder.descriptive - .withTest(fileAttributesAssertionContainer) { it is Success && typeTest(it.value) } - .withFailureHintBasedOnDefinedSubject(fileAttributesAssertionContainer) { result -> - explainForResolvedLink(result.path) { realPath -> - when (result) { - is Success -> describeWas(result.value.fileType) - is Failure -> hintForIoException(realPath, result.exception) - } - } - } - .withDescriptionAndRepresentation(IS, typeName) - .build() -} - -private inline fun changeSubjectToFileAttributes( - expect: Expect, - block: (Expect>) -> R -): R = ExpectImpl.changeSubject(expect).unreported { - it.runCatchingIo { readAttributes() } -}.let(block) - -/** - * Searches for any problem with a parent directory that is not that the directory does not exist. - * @return an appropriate hint if a problem with a parent is found that is not that that parent does not exist. - */ -private fun findHintForProblemWithParent(path: Path): Assertion? { - val absolutePath = path.toAbsolutePath() - var currentParentPart = absolutePath.root - for (part in absolutePath) { - currentParentPart = currentParentPart.resolve(part) - if (currentParentPart != path) { - try { - val attributes = currentParentPart.readAttributes() - if (!attributes.isDirectory) { - return hintForParentFailure( - currentParentPart, - explanation = hintForNotDirectory(attributes.fileType) - ) - } - } catch (e: AccessDeniedException) { - return hintForParentFailure( - currentParentPart.parent, - explanation = hintForAccessDenied(currentParentPart.parent) - ) - } catch (e: IOException) { - return hintForParentFailure( - currentParentPart, - explanation = hintForFileSpecificIoException(currentParentPart, e) - ) - } - } - } - return null -} - -private fun hintForParentFailure(parent: Path, explanation: Assertion) = - assertionBuilder.explanatoryGroup.withDefaultType - .withAssertions( - assertionBuilder.descriptive.failing - .withDescriptionAndRepresentation(FAILURE_DUE_TO_PARENT, parent) - .build(), - when (explanation) { - is AssertionGroup -> explanation - // TODO remove group once https://github.com/robstoll/atrium-roadmap/issues/1 is implemented - else -> assertionBuilder.explanatoryGroup.withDefaultType - .withAssertion(explanation) - .build() - } - ).build() - -private fun hintForAccessDenied(path: Path): Assertion { - val failureDueToAccessDeniedHint = assertionBuilder.explanatory - .withExplanation(FAILURE_DUE_TO_ACCESS_DENIED) - .build() - return try { - val hints = hintForOwnersAndPermissions(path) - hints.add(0, failureDueToAccessDeniedHint) - assertionBuilder.explanatoryGroup.withDefaultType - .withAssertions(hints) - .build() - } catch (e: IOException) { - failureDueToAccessDeniedHint - } -} - -private fun hintForOwnersAndPermissions(path: Path): MutableList { - val hintList = LinkedList() - val aclView = path.getFileAttributeView() - if (aclView != null) { - hintList.add(hintForOwner(aclView.owner.name)) - hintList.addAll(hintsForActualAclPermissions(aclView.acl)) - } else { - val posixView = path.getFileAttributeView() - if (posixView != null) { - val posixAttributes = posixView.readAttributes() - hintList.add(hintForOwnerAndGroup(posixAttributes.owner().name, posixAttributes.group().name)) - hintList.add(hintForActualPosixPermissions(posixAttributes.permissions())) - } - } - return hintList -} - -private fun hintForOwner(owner: String) = - assertionBuilder.explanatory - .withExplanation(HINT_OWNER, owner) - .build() - -private fun hintForOwnerAndGroup(owner: String, group: String) = - assertionBuilder.explanatory - .withExplanation(HINT_OWNER_AND_GROUP, owner, group) - .build() - -private fun hintsForActualAclPermissions(acl: List) = - arrayOf( - assertionBuilder.explanatory - .withExplanation(HINT_ACTUAL_ACL_PERMISSIONS) - .build(), - assertionBuilder.explanatoryGroup.withDefaultType - .withAssertions(acl.map(::hintForAclEntry)) - .build() - ) - -private fun hintForAclEntry(entry: AclEntry) = - assertionBuilder.explanatory - .withExplanation("${entry.type()} ${entry.principal().name}: ${entry.permissions().joinToString()}") - .build() - -private fun hintForActualPosixPermissions(filePermissions: Set) = - assertionBuilder.explanatory - .withExplanation(HINT_ACTUAL_POSIX_PERMISSIONS, formatPosixPermissions(filePermissions)) - .build() - -private fun formatPosixPermissions(filePermissions: Set): StringBuilder { - val permissionString = StringBuilder(3 * 5 + 2) - permissionString - .append("u=") - .append(toPermissionString(filePermissions, OWNER_READ, OWNER_WRITE, OWNER_EXECUTE)) - .append(' ') - .append("g=") - .append(toPermissionString(filePermissions, GROUP_READ, GROUP_WRITE, GROUP_EXECUTE)) - .append(' ') - .append("o=") - .append(toPermissionString(filePermissions, OTHERS_READ, OTHERS_WRITE, OTHERS_EXECUTE)) - return permissionString -} - -private fun toPermissionString( - permissions: Set, - readPermission: PosixFilePermission, - writePermission: PosixFilePermission, - executePermission: PosixFilePermission -): StringBuilder { - val result = StringBuilder(3) - if (permissions.contains(readPermission)) result.append('r') - if (permissions.contains(writePermission)) result.append('w') - if (permissions.contains(executePermission)) result.append('x') - return result -} - -private fun hintForExistsButMissingPermission(subject: T, permissionName: Translatable) = - assertionBuilder.explanatory - .withExplanation(FAILURE_DUE_TO_PERMISSION_FILE_TYPE_HINT, subject.fileType, permissionName) - .build() - -private fun describeWas(actual: Translatable) = - assertionBuilder.descriptive.failing - .withDescriptionAndRepresentation(WAS, actual) - .build() - -private fun hintForIoException(path: Path, exception: IOException) = when (exception) { - is NoSuchFileException -> hintForFileNotFound(path) - else -> findHintForProblemWithParent(path) ?: hintForFileSpecificIoException(path, exception) -} - -private fun hintForFileSpecificIoException(path: Path, exception: IOException) = - when (exception) { - is AccessDeniedException -> hintForAccessDenied(path) - else -> hintForOtherIoException(exception) - } - -private fun hintForFileNotFound(path: Path) = - assertionBuilder.explanatoryGroup.withDefaultType - .withAssertions( - hintForNoSuchFile(), - hintForClosestExistingParent(path) - ) - .build() - -private fun hintForNoSuchFile() = - assertionBuilder.explanatory - .withExplanation(FAILURE_DUE_TO_NO_SUCH_FILE) - .build() - -/** - * Assumes that we know that [path] does not exist. - * @return The closest parent directory (including [path] itself) that exists. `null` if there is no such directory. - */ -private fun hintForClosestExistingParent(path: Path): Assertion { - var testPath = path.toAbsolutePath().parent - while (testPath.nameCount > 0) { - try { - val testPathAttributes = testPath.readAttributes() - return if (testPathAttributes.isDirectory) { - hintForExistingParentDirectory(testPath) - } else { - hintForParentFailure( - testPath, - explanation = hintForNotDirectory(testPathAttributes.fileType) - ) - } - } catch (e: NoSuchFileException) { - /* continue searching. Any other IOException should not occur because [path] does not exist */ - } - testPath = testPath.parent - } - return hintForExistingParentDirectory(null) -} - -private fun hintForExistingParentDirectory(parent: Path?) = - assertionBuilder.explanatory - .withExplanation(HINT_CLOSEST_EXISTING_PARENT_DIRECTORY, parent ?: NONE) - .build() - -private fun hintForNotDirectory(actualType: Translatable) = - assertionBuilder.explanatory - .withExplanation(FAILURE_DUE_TO_WRONG_FILE_TYPE, actualType, A_DIRECTORY) - .build() - -private fun hintForOtherIoException(exception: IOException) = - ThrowableThrownFailureHandler.propertiesOfThrowable( - exception, - maxStackTrace = IO_EXCEPTION_STACK_TRACE_LENGTH, - explanation = assertionBuilder.explanatory - .withExplanation( - FAILURE_DUE_TO_ACCESS_EXCEPTION, - exception::class.simpleName ?: exception::class.fullName - ) - .build() - ) - -private val Path.fileType: Translatable - get() = readAttributes().fileType - -private val BasicFileAttributes.fileType: Translatable - get() = when { - isRegularFile -> A_FILE - isDirectory -> A_DIRECTORY - isSymbolicLink -> A_SYMBOLIC_LINK - else -> A_UNKNOWN_FILE_TYPE - } - -@Suppress("DeprecatedCallableAddReplaceWith") -@Deprecated("use the function from atrium-logic instead, will be removed with 1.0.0") -fun _fileName(expect: Expect): ExtractedFeaturePostStep = - ExpectImpl.feature.manualFeature(expect, FILE_NAME) { fileName.toString() } - -@Suppress("DeprecatedCallableAddReplaceWith") -@Deprecated("use the function from atrium-logic instead, will be removed with 1.0.0") -fun _fileNameWithoutExtension(expect: Expect): ExtractedFeaturePostStep = - ExpectImpl.feature.manualFeature(expect, FILE_NAME_WITHOUT_EXTENSION) { fileNameWithoutExtension } - -@Suppress("DeprecatedCallableAddReplaceWith") -@Deprecated("use the function from atrium-logic instead, will be removed with 1.0.0") -fun _parent(expect: Expect): ExtractedFeaturePostStep = - ExpectImpl.feature.extractor(expect) - .withDescription(PARENT) - .withRepresentationForFailure(DOES_NOT_HAVE_PARENT) - .withFeatureExtraction { - val parent: Path? = it.parent - if (parent != null) Some(parent) else None - } - .withoutOptions() - .build() - -@Suppress("DeprecatedCallableAddReplaceWith") -@Deprecated("use the function from atrium-logic instead, will be removed with 1.0.0") -fun _resolve(expect: Expect, other: String): ExtractedFeaturePostStep = - ExpectImpl.feature.f1(expect, Path::resolve, other) - -@Suppress("DeprecatedCallableAddReplaceWith") -@Deprecated("use the function from atrium-logic instead, will be removed with 1.0.0") -fun _extension(expect: Expect): ExtractedFeaturePostStep = - ExpectImpl.feature.manualFeature(expect, EXTENSION) { extension } diff --git a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-jvm/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/throwable/thrown/creators/createAdditionalHints.kt b/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-jvm/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/throwable/thrown/creators/createAdditionalHints.kt deleted file mode 100644 index 65ff4f01d..000000000 --- a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-jvm/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/throwable/thrown/creators/createAdditionalHints.kt +++ /dev/null @@ -1,25 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress( - "DEPRECATION", - // TODO remove once https://youtrack.jetbrains.com/issue/KT-35343 is fixed - "JAVA_MODULE_DOES_NOT_READ_UNNAMED_MODULE" -) - -package ch.tutteli.atrium.domain.robstoll.lib.creating.throwable.thrown.creators - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.translations.DescriptionThrowableAssertion - -@Suppress("DeprecatedCallableAddReplaceWith") -@Deprecated("use the function from atrium-logic instead, will be removed with 1.0.0") -actual fun createAdditionalHints( - throwable: Throwable, - maxStackTrace: Int -): List = throwable.suppressed.map { suppressed -> - ThrowableThrownFailureHandler.createChildHint( - throwable, - suppressed, - DescriptionThrowableAssertion.OCCURRED_EXCEPTION_SUPPRESSED, - maxStackTrace - ) -} diff --git a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-jvm/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/zonedDateTimeAssertions.kt b/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-jvm/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/zonedDateTimeAssertions.kt deleted file mode 100644 index 6d5109803..000000000 --- a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-jvm/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/lib/creating/zonedDateTimeAssertions.kt +++ /dev/null @@ -1,37 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress( - "DEPRECATION", - /* TODO remove once https://youtrack.jetbrains.com/issue/KT-35343 is fixed */ - "JAVA_MODULE_DOES_NOT_READ_UNNAMED_MODULE", - /* remove once https://youtrack.jetbrains.com/issue/KT-34257 is fixed */ - "FINAL_UPPER_BOUND" -) - -package ch.tutteli.atrium.domain.robstoll.lib.creating - -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.domain.builders.ExpectImpl -import ch.tutteli.atrium.domain.creating.changers.ExtractedFeaturePostStep -import ch.tutteli.atrium.translations.DescriptionDateTimeLikeAssertion.* -import java.time.DayOfWeek -import java.time.ZonedDateTime - -@Suppress("DeprecatedCallableAddReplaceWith") -@Deprecated("use the function from atrium-logic instead, will be removed with 1.0.0") -fun _year(expect: Expect): ExtractedFeaturePostStep = - ExpectImpl.feature.manualFeature(expect, YEAR) { year } - -@Suppress("DeprecatedCallableAddReplaceWith") -@Deprecated("use the function from atrium-logic instead, will be removed with 1.0.0") -fun _month(expect: Expect): ExtractedFeaturePostStep = - ExpectImpl.feature.manualFeature(expect, MONTH) { monthValue } - -@Suppress("DeprecatedCallableAddReplaceWith") -@Deprecated("use the function from atrium-logic instead, will be removed with 1.0.0") -fun _day(expect: Expect): ExtractedFeaturePostStep = - ExpectImpl.feature.manualFeature(expect, DAY) { dayOfMonth } - -@Suppress("DeprecatedCallableAddReplaceWith") -@Deprecated("use the function from atrium-logic instead, will be removed with 1.0.0") -fun _dayOfWeek(expect: Expect): ExtractedFeaturePostStep = - ExpectImpl.feature.manualFeature(expect, DAY_OF_WEEK) { dayOfWeek } diff --git a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-jvm/src/module/module-info.java b/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-jvm/src/module/module-info.java index 70cc66e77..88a20790a 100644 --- a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-jvm/src/module/module-info.java +++ b/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-jvm/src/module/module-info.java @@ -1,30 +1,8 @@ module ch.tutteli.atrium.domain.robstoll.lib { - requires ch.tutteli.atrium.api.fluent.en_GB; requires ch.tutteli.atrium.domain.builders; requires static ch.tutteli.atrium.translations.en_GB; requires kotlin.stdlib; requires ch.tutteli.niok; - //TODO remove with 1.0.0 - requires ch.tutteli.atrium.api.cc.en_GB; - - exports ch.tutteli.atrium.domain.robstoll.lib.assertions; - exports ch.tutteli.atrium.domain.robstoll.lib.assertions.composers; - exports ch.tutteli.atrium.domain.robstoll.lib.creating; - exports ch.tutteli.atrium.domain.robstoll.lib.creating.any.typetransformation.creators; - exports ch.tutteli.atrium.domain.robstoll.lib.creating.any.typetransformation.failurehandlers; - exports ch.tutteli.atrium.domain.robstoll.lib.creating.changers; - exports ch.tutteli.atrium.domain.robstoll.lib.creating.charsequence.contains.builders; - exports ch.tutteli.atrium.domain.robstoll.lib.creating.charsequence.contains.checkers; - exports ch.tutteli.atrium.domain.robstoll.lib.creating.charsequence.contains.creators; - exports ch.tutteli.atrium.domain.robstoll.lib.creating.charsequence.contains.searchbehaviours; exports ch.tutteli.atrium.domain.robstoll.lib.creating.collectors; - exports ch.tutteli.atrium.domain.robstoll.lib.creating.feature.extract.creators; - exports ch.tutteli.atrium.domain.robstoll.lib.creating.iterable.contains.builders; - exports ch.tutteli.atrium.domain.robstoll.lib.creating.iterable.contains.checkers; - exports ch.tutteli.atrium.domain.robstoll.lib.creating.iterable.contains.creators; - exports ch.tutteli.atrium.domain.robstoll.lib.creating.iterable.contains.searchbehaviours; - exports ch.tutteli.atrium.domain.robstoll.lib.creating.throwable.thrown.builders; - exports ch.tutteli.atrium.domain.robstoll.lib.creating.throwable.thrown.creators; - exports ch.tutteli.atrium.domain.robstoll.lib.creating.throwable.thrown.providers; } diff --git a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-jvm/src/test/kotlin/ch/tutteli/atrium/assertions/filesystem/IoResultSpec.kt b/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-jvm/src/test/kotlin/ch/tutteli/atrium/assertions/filesystem/IoResultSpec.kt deleted file mode 100644 index 0eabdd1c4..000000000 --- a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-jvm/src/test/kotlin/ch/tutteli/atrium/assertions/filesystem/IoResultSpec.kt +++ /dev/null @@ -1,43 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.assertions.filesystem - -import ch.tutteli.atrium.api.fluent.en_GB.* -import ch.tutteli.atrium.api.verbs.internal.expect -import ch.tutteli.atrium.domain.robstoll.lib.creating.filesystem.Failure -import ch.tutteli.atrium.domain.robstoll.lib.creating.filesystem.IoResult -import ch.tutteli.atrium.domain.robstoll.lib.creating.filesystem.Success -import ch.tutteli.atrium.domain.robstoll.lib.creating.filesystem.runCatchingIo -import org.spekframework.spek2.Spek -import org.spekframework.spek2.style.specification.describe -import java.nio.file.Paths - -object IoResultSpec : Spek({ - describe("runCatchingIo") { - val testPath = Paths.get("/test") - - it("creates a Success if the block completes normally") { - val result = testPath.runCatchingIo { "testString" } - expect(result).isA> { - feature(IoResult<*>::path).toBe(testPath) - feature(Success<*>::value).toBe("testString") - } - } - - it("creates a Failure if the block thrown an IOException") { - val testException = NoSuchFileException(testPath.toFile()) - val result = testPath.runCatchingIo { throw testException } - expect(result).isA { - feature(IoResult<*>::path).toBe(testPath) - feature(Failure::exception).isSameAs(testException) - } - } - - it("re-throws other exceptions") { - expect { - testPath.runCatchingIo { throw IllegalStateException() } - }.toThrow() - } - } -}) diff --git a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-jvm/src/test/kotlin/ch/tutteli/atrium/assertions/filesystem/SymbolicLinkResolvingSpec.kt b/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-jvm/src/test/kotlin/ch/tutteli/atrium/assertions/filesystem/SymbolicLinkResolvingSpec.kt deleted file mode 100644 index ab4f8a967..000000000 --- a/misc/deprecated/domain/robstoll-lib/atrium-domain-robstoll-lib-jvm/src/test/kotlin/ch/tutteli/atrium/assertions/filesystem/SymbolicLinkResolvingSpec.kt +++ /dev/null @@ -1,288 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.assertions.filesystem - -import ch.tutteli.atrium.api.fluent.en_GB.* -import ch.tutteli.atrium.api.verbs.internal.expect -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.assertions.AssertionGroup -import ch.tutteli.atrium.assertions.ExplanatoryAssertion -import ch.tutteli.atrium.assertions.WarningAssertionGroupType -import ch.tutteli.atrium.assertions.builders.assertionBuilder -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.domain.robstoll.lib.creating.filesystem.explainForResolvedLink -import ch.tutteli.atrium.reporting.translating.TranslatableWithArgs -import ch.tutteli.atrium.reporting.translating.Untranslatable -import ch.tutteli.atrium.specs.fileSystemSupportsCreatingSymlinks -import ch.tutteli.atrium.translations.DescriptionPathAssertion.FAILURE_DUE_TO_LINK_LOOP -import ch.tutteli.atrium.translations.DescriptionPathAssertion.HINT_FOLLOWED_SYMBOLIC_LINK -import ch.tutteli.niok.createDirectory -import ch.tutteli.niok.createFile -import ch.tutteli.niok.createSymbolicLink -import ch.tutteli.spek.extensions.memoizedTempFolder -import com.nhaarman.mockitokotlin2.* -import org.spekframework.spek2.Spek -import org.spekframework.spek2.dsl.Skip -import org.spekframework.spek2.lifecycle.CachingMode.TEST -import org.spekframework.spek2.style.specification.describe -import java.nio.file.Path -import java.nio.file.Paths - -object SymbolicLinkResolvingSpec : Spek({ - val tempFolder by memoizedTempFolder() - - // Windows with neither symlink nor admin privilege - val ifSymlinksNotSupported = - if (fileSystemSupportsCreatingSymlinks()) Skip.No else Skip.Yes("creating symbolic links is not supported on this file system") - - val testAssertion = assertionBuilder.createDescriptive(Untranslatable("testAssertion"), null) { true } - val resolvedPathConsumer by memoized(TEST) { - mock<(Path) -> Assertion> { - on { this(any()) } doReturn testAssertion - } - } - - /** - * Throughout this suite, we have to make sure that all paths we use are already completely resolved. Otherwise, we - * might get additional, unexpected messages because the path to the temporary folder contains a symlink. - */ - - describe("explainForResolvedLink", skip = ifSymlinksNotSupported) { - describe("resolves correctly") { - afterEachTest { - verifyNoMoreInteractions(resolvedPathConsumer) - } - - it("resolves an existing file to itself") { - val file = tempFolder.newFile("testFile").toRealPath() - - explainForResolvedLink(file, resolvedPathConsumer) - verify(resolvedPathConsumer)(file) - } - - it("resolves an existing directory to itself") { - val folder = tempFolder.newFile("testDir").toRealPath() - - explainForResolvedLink(folder, resolvedPathConsumer) - verify(resolvedPathConsumer)(folder) - } - - it("resolves a non-existent path to itself") { - val notExisting = tempFolder.tmpDir.toRealPath().resolve("notExisting") - - explainForResolvedLink(notExisting, resolvedPathConsumer) - verify(resolvedPathConsumer)(notExisting) - } - - it("resolves a relative path to its absolute target") { - val relativePath = Paths.get(".") - - explainForResolvedLink(relativePath, resolvedPathConsumer) - verify(resolvedPathConsumer)(relativePath.toRealPath()) - } - - it("resolves a symbolic link to its target") { - val testDir = tempFolder.newDirectory("symbolic-to-target").toRealPath() - val target = testDir.resolve("notExisting") - val link = target.createSymbolicLink(testDir.resolve("link")) - - explainForResolvedLink(link, resolvedPathConsumer) - verify(resolvedPathConsumer)(target) - } - - it("a relative symbolic link to its absolute target") { - val testDir = tempFolder.newDirectory("relative-symbolic-to-target").toRealPath() - val target = testDir.resolve("testFile").createFile() - val folder = testDir.resolve("testFolder").createDirectory() - val relativeLink = - Paths.get("..").resolve(target.fileName).createSymbolicLink(folder.resolve("testLink")) - - explainForResolvedLink(relativeLink, resolvedPathConsumer) - verify(resolvedPathConsumer)(target) - } - - it("resolves a symbolic link chain as far as possible") { - val testDir = tempFolder.newDirectory("chain").toRealPath() - val nowhere = testDir.resolve("dont-exist") - val toNowhere = nowhere.createSymbolicLink(testDir.resolve("link-to-nowhere")) - val start = tempFolder.newSymbolicLink("start", toNowhere) - - explainForResolvedLink(start, resolvedPathConsumer) - verify(resolvedPathConsumer)(nowhere) - } - - it("resolves multiple symbolic links to their target") { - val testDir = tempFolder.newDirectory("multi-links").toRealPath() - val target = testDir.resolve("notExisting") - val grandparent = testDir.resolve("__linksgrandparent").createDirectory() - val parent = grandparent.resolve("step").createDirectory() - val grandparentLink = grandparent.createSymbolicLink(testDir.resolve("__linkTo_grandparent")) - val innerLink = target.createSymbolicLink(parent.resolve("__linkTo_${target.fileName}")) - val innerLinkInGrandparentLink = grandparentLink.resolve(parent.fileName).resolve(innerLink.fileName) - val linkToInnerLink = tempFolder.newSymbolicLink( - "__transitive_linkTo_${target.fileName}", innerLinkInGrandparentLink - ) - - explainForResolvedLink(linkToInnerLink, resolvedPathConsumer) - verify(resolvedPathConsumer)(target) - } - } - - describe("explains correctly") { - it("returns the original assertion if no link is involved") { - val file = tempFolder.newFile("testFile").toRealPath() - - val resultAssertion = explainForResolvedLink(file, resolvedPathConsumer) - expect(resultAssertion).isSameAs(testAssertion) - } - - it("adds an explanation for one symbolic link") { - val testDir = tempFolder.newDirectory("link").toRealPath() - val target = testDir.resolve("notExisting") - val link = target.createSymbolicLink(testDir.resolve("link")) - - val resultAssertion = explainForResolvedLink(link, resolvedPathConsumer) - expect(resultAssertion).isA() - .feature { p(it::assertions) }.containsExactly( - { describesLink(link, target) }, - { isSameAs(testAssertion) } - ) - } - - it("adds explanations for a symbolic link chain as far as possible") { - val testDir = tempFolder.newDirectory("chain").toRealPath() - val nowhere = testDir.resolve("dont-exist") - val toNowhere = nowhere.createSymbolicLink(testDir.resolve("link-to-nowhere")) - val start = toNowhere.createSymbolicLink(testDir.resolve("start")) - - val resultAssertion = explainForResolvedLink(start, resolvedPathConsumer) - expect(resultAssertion).isA() - .feature { p(it::assertions) }.containsExactly( - { describesLink(start, toNowhere) }, - { describesLink(toNowhere, nowhere) }, - { isSameAs(testAssertion) } - ) - } - - it("adds explanations for multiple symbolic links") { - val testDir = tempFolder.newDirectory("multi-links").toRealPath() - val target = testDir.resolve("notExisting") - val grandparent = testDir.resolve("__linksgrandparent").createDirectory() - val parent = grandparent.resolve("step").createDirectory() - val grandparentLink = grandparent.createSymbolicLink(testDir.resolve("__linkTo_grandparent")) - val innerLink = target.createSymbolicLink(parent.resolve("__linkTo_${target.fileName}")) - val innerLinkInGrandparentLink = - grandparentLink.resolve(parent.fileName).resolve(innerLink.fileName) - val linkToInnerLink = innerLinkInGrandparentLink.createSymbolicLink( - testDir.resolve("__transitive_linkTo_${target.fileName}") - ) - - val resultAssertion = explainForResolvedLink(linkToInnerLink, resolvedPathConsumer) - expect(resultAssertion).isA() - .feature { p(it::assertions) }.containsExactly( - { describesLink(linkToInnerLink, innerLinkInGrandparentLink) }, - { describesLink(grandparentLink, grandparent) }, - { describesLink(innerLink, target) }, - { isSameAs(testAssertion) } - ) - } - - it("does not assume a link loop even if the same link appears multiple times") { - val testDir = tempFolder.newDirectory("multi-non-loop").toRealPath() - val barLink = testDir.createSymbolicLink(testDir.resolve("bar")) - val target = testDir.resolve("target").createFile() - val testLink = barLink.resolve(barLink.fileName).resolve(barLink.fileName).resolve(target.fileName) - - val resultAssertion = explainForResolvedLink(testLink, resolvedPathConsumer) - expect(resultAssertion).isA() - .feature { p(it::assertions) }.containsExactly( - { describesLink(barLink, testDir) }, - { describesLink(barLink, testDir) }, - { describesLink(barLink, testDir) }, - { isSameAs(testAssertion) } - ) - } - } - - it("adds an explanation for link loops") { - val testDir = tempFolder.newDirectory("link-loop").toRealPath() - val a = testDir.resolve("linkA") - val b = a.createSymbolicLink(testDir.resolve("linkB")) - b.createSymbolicLink(a) - - val resultAssertion = explainForResolvedLink(a, resolvedPathConsumer) - expect(resultAssertion).isA() - .feature { p(it::assertions) }.containsExactly( - { describesLink(a, b) }, - { describesLink(b, a) }, - { describesLinkLoop(a, b, a) }, - { isSameAs(testAssertion) } - ) - } - - it("adds an explanation for more subtle link loops") { - val testDir = tempFolder.newDirectory("sneaky-loop").toRealPath() - val foo = testDir.resolve("foo").createDirectory() - val fooLink = foo.createSymbolicLink(testDir.resolve("bar")) - val link = fooLink.resolve("link").createSymbolicLink(foo.resolve("link")) - - val resultAssertion = explainForResolvedLink(link, resolvedPathConsumer) - expect(resultAssertion).isA() - .feature { p(it::assertions) }.containsExactly( - { describesLink(link, fooLink.resolve("link")) }, - { describesLink(fooLink, foo) }, - { describesLinkLoop(link, link) }, - { isSameAs(testAssertion) } - ) - } - - it("keeps explanations for links that are not part of the loop") { - val testDir = tempFolder.newDirectory("link-loop").toRealPath() - val a = testDir.resolve("linkA") - val c = a.createSymbolicLink(testDir.resolve("linkC")) - val b = c.createSymbolicLink(testDir.resolve("linkB")) - b.createSymbolicLink(a) - val grandparent = testDir.resolve("__linksgrandparent").createDirectory() - val parent = grandparent.resolve("step").createDirectory() - val grandparentLink = grandparent.createSymbolicLink(testDir.resolve("__linkTo_grandparent")) - val innerLink = a.createSymbolicLink(parent.resolve("__linkTo_${a.fileName}")) - val innerLinkInGrandparentLink = grandparentLink.resolve(parent.fileName).resolve(innerLink.fileName) - val linkToInnerLink = - innerLinkInGrandparentLink.createSymbolicLink(testDir.resolve("__transitive_linkTo_${a.fileName}")) - - val resultAssertion = explainForResolvedLink(linkToInnerLink, resolvedPathConsumer) - expect(resultAssertion).isA() - .feature { p(it::assertions) }.containsExactly( - { describesLink(linkToInnerLink, innerLinkInGrandparentLink) }, - { describesLink(grandparentLink, grandparent) }, - { describesLink(innerLink, a) }, - { describesLink(a, b) }, - { describesLink(b, c) }, - { describesLink(c, a) }, - { describesLinkLoop(a, b, c, a) }, - { isSameAs(testAssertion) } - ) - } - } -}) - -fun Expect.describesLink(link: Path, target: Path) { - isA { - feature { p(it::explanation) }.toBe( - TranslatableWithArgs(HINT_FOLLOWED_SYMBOLIC_LINK, link, target) - ) - } -} - -fun Expect.describesLinkLoop(vararg loop: Path) { - isA { - feature { p(it::assertions) }.containsExactly { - isA { - val expectedExplanation = TranslatableWithArgs(FAILURE_DUE_TO_LINK_LOOP, loop.joinToString(" -> ")) - feature { p(it::explanation) }.toBe(expectedExplanation) - } - } - feature { p(it::type) }.toBe(WarningAssertionGroupType) - } -} diff --git a/misc/deprecated/domain/robstoll-lib/extensions/kotlin_1_3/atrium-domain-robstoll-lib-kotlin_1_3-common/build.gradle b/misc/deprecated/domain/robstoll-lib/extensions/kotlin_1_3/atrium-domain-robstoll-lib-kotlin_1_3-common/build.gradle deleted file mode 100644 index 30ff74caa..000000000 --- a/misc/deprecated/domain/robstoll-lib/extensions/kotlin_1_3/atrium-domain-robstoll-lib-kotlin_1_3-common/build.gradle +++ /dev/null @@ -1,17 +0,0 @@ -description = 'Kotlin 1.3 specific extension for domain-robstoll-lib-common -- will be merged into domain-robstoll-lib-common with 1.0.0' - - -dependencies { - api prefixedProject('domain-robstoll-lib-common') - api prefixedProject('domain-builders-kotlin_1_3-common') - - implementation prefixedProject('api-fluent-en_GB-common') - - // it is up to the consumer of atrium-domain-robstoll-lib which atrium-translations module is used at runtime - compileOnly prefixedProject('translations-en_GB-common') - - //TODO remove with 1.0.0 - implementation prefixedProject('api-cc-en_GB-common') - - testImplementation prefixedProject('specs-common') -} diff --git a/misc/deprecated/domain/robstoll-lib/extensions/kotlin_1_3/atrium-domain-robstoll-lib-kotlin_1_3-common/src/main/kotlin/ch/tutteli/atrium/domain.robstoll.lib.kotlin_1_3/creating/resultAssertions.kt b/misc/deprecated/domain/robstoll-lib/extensions/kotlin_1_3/atrium-domain-robstoll-lib-kotlin_1_3-common/src/main/kotlin/ch/tutteli/atrium/domain.robstoll.lib.kotlin_1_3/creating/resultAssertions.kt deleted file mode 100644 index 618d1104a..000000000 --- a/misc/deprecated/domain/robstoll-lib/extensions/kotlin_1_3/atrium-domain-robstoll-lib-kotlin_1_3-common/src/main/kotlin/ch/tutteli/atrium/domain.robstoll.lib.kotlin_1_3/creating/resultAssertions.kt +++ /dev/null @@ -1,50 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.domain.robstoll.lib.kotlin_1_3.creating - -import ch.tutteli.atrium.api.fluent.en_GB.ExperimentalWithOptions -import ch.tutteli.atrium.api.fluent.en_GB.withRepresentation -import ch.tutteli.atrium.core.Option -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.domain.builders.ExpectImpl -import ch.tutteli.atrium.domain.creating.changers.ChangedSubjectPostStep -import ch.tutteli.atrium.domain.creating.changers.ExtractedFeaturePostStep -import ch.tutteli.atrium.domain.robstoll.lib.creating.throwable.thrown.creators.ThrowableThrownFailureHandler -import ch.tutteli.atrium.translations.DescriptionResultAssertion -import ch.tutteli.atrium.translations.DescriptionResultAssertion.EXCEPTION -import ch.tutteli.atrium.translations.DescriptionResultAssertion.IS_NOT_FAILURE -import kotlin.reflect.KClass - -@Suppress("DeprecatedCallableAddReplaceWith") -@Deprecated("use the function from atrium-logic instead, will be removed with 1.0.0") -fun > _isSuccess(expect: Expect): ExtractedFeaturePostStep = - ExpectImpl.feature.extractor(expect) - .withDescription(DescriptionResultAssertion.VALUE) - .withRepresentationForFailure(DescriptionResultAssertion.IS_NOT_SUCCESS) - .withFeatureExtraction { - Option.someIf(it.isSuccess) { it.getOrThrow() } - } - .withoutOptions() - .build() - -@Suppress( - "DeprecatedCallableAddReplaceWith", - /* OptIn is only available since 1.3.70 which we cannot use if we want to support 1.2 */"DEPRECATION" -) -@Deprecated("use the function from atrium-logic instead, will be removed with 1.0.0") -@UseExperimental(ExperimentalWithOptions::class) -fun _isFailure( - expect: Expect>, - expectedType: KClass -): ChangedSubjectPostStep { - val throwableExpect = ExpectImpl.feature - .manualFeature(expect, EXCEPTION) { exceptionOrNull() } - .getExpectOfFeature() - .withRepresentation { it ?: IS_NOT_FAILURE } - - return ExpectImpl.changeSubject(throwableExpect).reportBuilder() - .downCastTo(expectedType) - .withFailureHandler(ThrowableThrownFailureHandler(maxStackTrace = 7)) - .build() -} diff --git a/misc/deprecated/domain/robstoll-lib/extensions/kotlin_1_3/atrium-domain-robstoll-lib-kotlin_1_3-js/build.gradle b/misc/deprecated/domain/robstoll-lib/extensions/kotlin_1_3/atrium-domain-robstoll-lib-kotlin_1_3-js/build.gradle deleted file mode 100644 index 7401f3eec..000000000 --- a/misc/deprecated/domain/robstoll-lib/extensions/kotlin_1_3/atrium-domain-robstoll-lib-kotlin_1_3-js/build.gradle +++ /dev/null @@ -1,16 +0,0 @@ -description = 'Kotlin 1.3 specific extension for domain-robstoll-lib-js -- will be merged into domain-robstoll-lib-js with 1.0.0' - -dependencies { - api prefixedProject('domain-robstoll-lib-js') - api prefixedProject('domain-builders-kotlin_1_3-js') - - implementation prefixedProject('api-fluent-en_GB-js') - - // it is up to the consumer of atrium-domain-robstoll-lib which atrium-translations module is used at runtime - compileOnly prefixedProject('translations-en_GB-js') - - // TODO remove with 1.0.0 - implementation prefixedProject('api-cc-en_GB-js') - - testImplementation prefixedProject('verbs-internal-js') -} diff --git a/misc/deprecated/domain/robstoll-lib/extensions/kotlin_1_3/atrium-domain-robstoll-lib-kotlin_1_3-jvm/build.gradle b/misc/deprecated/domain/robstoll-lib/extensions/kotlin_1_3/atrium-domain-robstoll-lib-kotlin_1_3-jvm/build.gradle deleted file mode 100644 index 6a3c0580d..000000000 --- a/misc/deprecated/domain/robstoll-lib/extensions/kotlin_1_3/atrium-domain-robstoll-lib-kotlin_1_3-jvm/build.gradle +++ /dev/null @@ -1,30 +0,0 @@ -description = 'Kotlin 1.3 specific extension for domain-robstoll-lib-jvm -- will be merged into domain-robstoll-lib-jvm with 1.0.0' - -ext.jacoco_additional = [ - prefixedProject('core-robstoll-jvm'), - prefixedProject('core-robstoll-lib-jvm'), -] - -dependencies { - api prefixedProject('domain-robstoll-lib-jvm') - api prefixedProject('domain-builders-kotlin_1_3-jvm') - - implementation prefixedProject('api-fluent-en_GB-jvm') - implementation niok() - - // it is up to the consumer of atrium-domain-robstoll-lib which atrium-translations module is used at runtime - compileOnly prefixedProject('translations-en_GB-jvm') - - //TODO remove with 1.0.0 - implementation prefixedProject('api-cc-en_GB-jvm') - - testImplementation prefixedProject('verbs-internal-jvm') -} - -//TODO should not be necessary https://youtrack.jetbrains.com/issue/KT-28124 -compileTestKotlin.dependsOn( - prefixedProject('core-robstoll-jvm').compileKotlin, - prefixedProject('core-robstoll-jvm').processResources, - prefixedProject('domain-robstoll-jvm').compileKotlin, - prefixedProject('domain-robstoll-jvm').processResources -) diff --git a/misc/deprecated/domain/robstoll-lib/extensions/kotlin_1_3/atrium-domain-robstoll-lib-kotlin_1_3-jvm/src/module/module-info.java b/misc/deprecated/domain/robstoll-lib/extensions/kotlin_1_3/atrium-domain-robstoll-lib-kotlin_1_3-jvm/src/module/module-info.java deleted file mode 100644 index dfc4873af..000000000 --- a/misc/deprecated/domain/robstoll-lib/extensions/kotlin_1_3/atrium-domain-robstoll-lib-kotlin_1_3-jvm/src/module/module-info.java +++ /dev/null @@ -1,8 +0,0 @@ -module ch.tutteli.atrium.domain.robstoll.lib.kotlin_1_3 { - requires ch.tutteli.atrium.api.fluent.en_GB; - requires ch.tutteli.atrium.domain.builders.kotlin_1_3; - requires static ch.tutteli.atrium.translations.en_GB; - requires kotlin.stdlib; - - exports ch.tutteli.atrium.domain.robstoll.lib.kotlin_1_3.creating; -} diff --git a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/assertions/composers/AssertionComposerImpl.kt b/misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/assertions/composers/AssertionComposerImpl.kt deleted file mode 100644 index ffcf89b16..000000000 --- a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/assertions/composers/AssertionComposerImpl.kt +++ /dev/null @@ -1,20 +0,0 @@ -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.domain.robstoll.assertions.composers - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.domain.assertions.composers.AssertionComposer -import ch.tutteli.atrium.domain.robstoll.lib.assertions.composers._createDescriptiveWithFailureHint -import ch.tutteli.atrium.reporting.translating.Translatable - -@Deprecated("Will be removed with 1.0.0") -class AssertionComposerImpl : AssertionComposer { - - override fun createDescriptiveWithFailureHint( - description: Translatable, - representation: Any, - test: () -> Boolean, - showHint: () -> Boolean, - failureHintFactory: () -> Assertion - ): Assertion = _createDescriptiveWithFailureHint(description, representation, test, showHint, failureHintFactory) -} diff --git a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/AnyAssertionsDeprecatedImpl.kt b/misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/AnyAssertionsDeprecatedImpl.kt deleted file mode 100644 index 8bb100313..000000000 --- a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/AnyAssertionsDeprecatedImpl.kt +++ /dev/null @@ -1,40 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove annotation with 1.0.0 */) - -package ch.tutteli.atrium.domain.robstoll.creating - -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.creating.AssertionPlantNullable -import ch.tutteli.atrium.domain.creating.AnyAssertions -import ch.tutteli.atrium.domain.robstoll.lib.creating._isNotNull -import ch.tutteli.atrium.domain.robstoll.lib.creating._isNotNullBut -import ch.tutteli.atrium.domain.robstoll.lib.creating._isNullIfNullGivenElse -import ch.tutteli.atrium.domain.robstoll.lib.creating._isNullable -import kotlin.reflect.KClass - -@Deprecated("Will be removed with 1.0.0") -abstract class AnyAssertionsDeprecatedImpl : AnyAssertions { - - override fun isNullable( - plant: AssertionPlantNullable, - type: KClass, - expectedOrNull: T? - ) = _isNullable(plant, type, expectedOrNull) - - override fun isNotNull( - plant: AssertionPlantNullable, - type: KClass, - assertionCreator: AssertionPlant.() -> Unit - ) = _isNotNull(plant, type, assertionCreator) - - override fun isNotNullBut( - plant: AssertionPlantNullable, - type: KClass, - expected: T - ) = _isNotNullBut(plant, type, expected) - - override fun isNullIfNullGivenElse( - plant: AssertionPlantNullable, - type: KClass, - assertionCreatorOrNull: (AssertionPlant.() -> Unit)? - ) = _isNullIfNullGivenElse(plant, type, assertionCreatorOrNull) -} diff --git a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/AnyAssertionsImpl.kt b/misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/AnyAssertionsImpl.kt deleted file mode 100644 index d5a36ce24..000000000 --- a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/AnyAssertionsImpl.kt +++ /dev/null @@ -1,29 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION") -package ch.tutteli.atrium.domain.robstoll.creating - -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.domain.creating.AnyAssertions -import ch.tutteli.atrium.domain.robstoll.lib.creating.* -import kotlin.reflect.KClass - -@Deprecated("Will be removed with 1.0.0") -class AnyAssertionsImpl : AnyAssertions, AnyAssertionsDeprecatedImpl() { - - override fun toBe(subjectProvider: SubjectProvider, expected: T) = _toBe(subjectProvider, expected) - override fun notToBe(subjectProvider: SubjectProvider, expected: T) = _notToBe(subjectProvider, expected) - override fun isSame(subjectProvider: SubjectProvider, expected: T) = _isSame(subjectProvider, expected) - override fun isNotSame(subjectProvider: SubjectProvider, expected: T) = _isNotSame(subjectProvider, expected) - - override fun toBeNull(subjectProvider: SubjectProvider) = _toBeNull(subjectProvider) - - override fun toBeNullIfNullGivenElse( - expect: Expect, - type: KClass, - assertionCreatorOrNull: (Expect.() -> Unit)? - ) = _toBeNullIfNullGivenElse(expect, type, assertionCreatorOrNull) - - override fun isA(expect: Expect, subType: KClass) = - _isA(expect, subType) -} diff --git a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/CharSequenceAssertionsImpl.kt b/misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/CharSequenceAssertionsImpl.kt deleted file mode 100644 index d81e7ecd0..000000000 --- a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/CharSequenceAssertionsImpl.kt +++ /dev/null @@ -1,41 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION") -package ch.tutteli.atrium.domain.robstoll.creating - -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.domain.creating.CharSequenceAssertions -import ch.tutteli.atrium.domain.robstoll.lib.creating.* - -@Deprecated("Will be removed with 1.0.0") -class CharSequenceAssertionsImpl : CharSequenceAssertions { - - override fun containsBuilder(subjectProvider: SubjectProvider) = - _containsBuilder(subjectProvider) - - override fun containsNotBuilder(subjectProvider: SubjectProvider) = - _containsNotBuilder(subjectProvider) - - - override fun startsWith(subjectProvider: SubjectProvider, expected: CharSequence) = - _startsWith(subjectProvider, expected) - - override fun startsNotWith(subjectProvider: SubjectProvider, expected: CharSequence) = - _startsNotWith(subjectProvider, expected) - - override fun endsWith(subjectProvider: SubjectProvider, expected: CharSequence) = - _endsWith(subjectProvider, expected) - - override fun endsNotWith(subjectProvider: SubjectProvider, expected: CharSequence) = - _endsNotWith(subjectProvider, expected) - - override fun isEmpty(subjectProvider: SubjectProvider) = _isEmpty(subjectProvider) - - override fun isNotEmpty(subjectProvider: SubjectProvider) = _isNotEmpty(subjectProvider) - - override fun isNotBlank(subjectProvider: SubjectProvider) = _isNotBlank(subjectProvider) - - override fun matches(expect: Expect, expected: Regex) = _matches(expect, expected) - - override fun mismatches(expect: Expect, expected: Regex) = _mismatches(expect, expected) -} diff --git a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/CollectionAssertionsDeprecatedImpl.kt b/misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/CollectionAssertionsDeprecatedImpl.kt deleted file mode 100644 index e0ebf0a43..000000000 --- a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/CollectionAssertionsDeprecatedImpl.kt +++ /dev/null @@ -1,21 +0,0 @@ -@file:Suppress( -/* TODO remove annotation with 1.0.0 */ "DEPRECATION", -/* TODO remove annotation with 1.0.0 */ "TYPEALIAS_EXPANSION_DEPRECATION" -) - -package ch.tutteli.atrium.domain.robstoll.creating - -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.domain.creating.CollectionAssertions -import ch.tutteli.atrium.domain.robstoll.lib.creating._hasSize -import ch.tutteli.atrium.domain.robstoll.lib.creating._size - -@Deprecated("Will be removed with 1.0.0") -abstract class CollectionAssertionsDeprecatedImpl : CollectionAssertions { - - override fun hasSize(plant: AssertionPlant>, size: Int) = _hasSize(plant, size) - - override fun size(plant: AssertionPlant>, assertionCreator: Assert.() -> Unit) = - _size(plant, assertionCreator) -} diff --git a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/CollectionAssertionsImpl.kt b/misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/CollectionAssertionsImpl.kt deleted file mode 100644 index f2516feb0..000000000 --- a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/CollectionAssertionsImpl.kt +++ /dev/null @@ -1,20 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION") -package ch.tutteli.atrium.domain.robstoll.creating - -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.domain.creating.CollectionAssertions -import ch.tutteli.atrium.domain.robstoll.lib.creating._isEmpty -import ch.tutteli.atrium.domain.robstoll.lib.creating._isNotEmpty -import ch.tutteli.atrium.domain.robstoll.lib.creating._size - -@Deprecated("Will be removed with 1.0.0") -class CollectionAssertionsImpl : CollectionAssertions, CollectionAssertionsDeprecatedImpl() { - - override fun isEmpty(subjectProvider: SubjectProvider>) = _isEmpty(subjectProvider) - - override fun isNotEmpty(subjectProvider: SubjectProvider>) = _isNotEmpty(subjectProvider) - - override fun > size(expect: Expect) = _size(expect) -} diff --git a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/ComparableAssertionsImpl.kt b/misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/ComparableAssertionsImpl.kt deleted file mode 100644 index c21a5d808..000000000 --- a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/ComparableAssertionsImpl.kt +++ /dev/null @@ -1,31 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION") -package ch.tutteli.atrium.domain.robstoll.creating - -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.domain.creating.ComparableAssertions -import ch.tutteli.atrium.domain.robstoll.lib.creating.* - -@Deprecated("Will be removed with 1.0.0") -class ComparableAssertionsImpl : ComparableAssertions { - - override fun , T2 : Any?> isLessThan(subjectProvider: SubjectProvider, expected: T2) = - _isLessThan(subjectProvider, expected) - - override fun , T2 : Any?> isLessOrEquals(subjectProvider: SubjectProvider, expected: T2) = - _isLessThanOrEqual(subjectProvider, expected) - - override fun , T2 : Any?> isGreaterThan(subjectProvider: SubjectProvider, expected: T2) = - _isGreaterThan(subjectProvider, expected) - - override fun , T2 : Any?> isGreaterOrEquals( - subjectProvider: SubjectProvider, - expected: T2 - ) = _isGreaterThanOrEqual(subjectProvider, expected) - - override fun , T2 : Any?> isEqualComparingTo( - expect: Expect, - expected: T2 - ) = _isEqualComparingTo(expect, expected) -} diff --git a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/FeatureAssertionsImpl.kt b/misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/FeatureAssertionsImpl.kt deleted file mode 100644 index 775471789..000000000 --- a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/FeatureAssertionsImpl.kt +++ /dev/null @@ -1,89 +0,0 @@ -@file:Suppress("DEPRECATION" /* will be removed with 1.0.0 */) - -package ch.tutteli.atrium.domain.robstoll.creating - -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.creating.AssertionPlantNullable -import ch.tutteli.atrium.domain.creating.FeatureAssertions -import ch.tutteli.atrium.domain.robstoll.lib.creating.* -import ch.tutteli.atrium.reporting.translating.Translatable - -@Deprecated("Will be removed with 1.0.0") -class FeatureAssertionsImpl : FeatureAssertions { - - override fun property(plant: AssertionPlant, subjectProvider: () -> TProperty, name: Translatable): AssertionPlant - = _property(plant, subjectProvider, name) - override fun property(plant: AssertionPlant, subjectProvider: () -> TProperty, representationProvider: () -> Any?, name: Translatable): AssertionPlant - = _property(plant, subjectProvider, representationProvider, name) - - override fun property(plant: AssertionPlant, subjectProvider: () -> TProperty, name: Translatable): AssertionPlantNullable - = _property(plant, subjectProvider, name) - override fun property(plant: AssertionPlant, subjectProvider: () -> TProperty, representationProvider: () -> Any?, name: Translatable): AssertionPlantNullable - = _property(plant, subjectProvider, representationProvider, name) - - //Arg0 - override fun returnValueOf0(plant: AssertionPlant, method: () -> R, name: String): AssertionPlant - = _returnValueOf0(plant, method, name) - override fun returnValueOf0(plant: AssertionPlant, method: () -> R, representationProvider: () -> Any?, name: String): AssertionPlant - = _returnValueOf0(plant, method, representationProvider, name) - - override fun returnValueOf0(plant: AssertionPlant, method: () -> R, name: String): AssertionPlantNullable - = _returnValueOf0(plant, method, name) - override fun returnValueOf0(plant: AssertionPlant, method: () -> R, representationProvider: () -> Any?, name: String): AssertionPlantNullable - = _returnValueOf0(plant, method, representationProvider, name) - - //Arg1 - override fun returnValueOf1(plant: AssertionPlant, method: (T1) -> R, arg1: T1, name: String): AssertionPlant - = _returnValueOf1(plant, method, arg1, name) - override fun returnValueOf1(plant: AssertionPlant, method: (T1) -> R, arg1: T1, representationProvider: () -> Any?, name: String): AssertionPlant - = _returnValueOf1(plant, method, arg1, representationProvider, name) - - override fun returnValueOf1(plant: AssertionPlant, method: (T1) -> R, arg1: T1, name: String): AssertionPlantNullable - = _returnValueOf1(plant, method, arg1, name) - override fun returnValueOf1(plant: AssertionPlant, method: (T1) -> R, arg1: T1, representationProvider: () -> Any?, name: String): AssertionPlantNullable - = _returnValueOf1(plant, method, arg1, representationProvider, name) - - //Arg2 - override fun returnValueOf2(plant: AssertionPlant, method: (T1, T2) -> R, arg1: T1, arg2: T2, name: String): AssertionPlant - = _returnValueOf2(plant, method, arg1, arg2, name) - override fun returnValueOf2(plant: AssertionPlant, method: (T1, T2) -> R, arg1: T1, arg2: T2, representationProvider: () -> Any?, name: String): AssertionPlant - = _returnValueOf2(plant, method, arg1, arg2, representationProvider, name) - - override fun returnValueOf2(plant: AssertionPlant, method: (T1, T2) -> R, arg1: T1, arg2: T2, name: String): AssertionPlantNullable - = _returnValueOf2(plant, method, arg1, arg2, name) - override fun returnValueOf2(plant: AssertionPlant, method: (T1, T2) -> R, arg1: T1, arg2: T2, representationProvider: () -> Any?, name: String): AssertionPlantNullable - = _returnValueOf2(plant, method, arg1, arg2, representationProvider, name) - - //Arg3 - override fun returnValueOf3(plant: AssertionPlant, method: (T1, T2, T3) -> R, arg1: T1, arg2: T2, arg3: T3, name: String): AssertionPlant - = _returnValueOf3(plant, method, arg1, arg2, arg3, name) - override fun returnValueOf3(plant: AssertionPlant, method: (T1, T2, T3) -> R, arg1: T1, arg2: T2, arg3: T3, representationProvider: () -> Any?, name: String): AssertionPlant - = _returnValueOf3(plant, method, arg1, arg2, arg3, representationProvider, name) - - override fun returnValueOf3(plant: AssertionPlant, method: (T1, T2, T3) -> R, arg1: T1, arg2: T2, arg3: T3, name: String): AssertionPlantNullable - = _returnValueOf3(plant, method, arg1, arg2, arg3, name) - override fun returnValueOf3(plant: AssertionPlant, method: (T1, T2, T3) -> R, arg1: T1, arg2: T2, arg3: T3, representationProvider: () -> Any?, name: String): AssertionPlantNullable - = _returnValueOf3(plant, method, arg1, arg2, arg3, representationProvider, name) - - //Arg4 - override fun returnValueOf4(plant: AssertionPlant, method: (T1, T2, T3, T4) -> R, arg1: T1, arg2: T2, arg3: T3, arg4: T4, name: String): AssertionPlant - = _returnValueOf4(plant, method, arg1, arg2, arg3, arg4, name) - override fun returnValueOf4(plant: AssertionPlant, method: (T1, T2, T3, T4) -> R, arg1: T1, arg2: T2, arg3: T3, arg4: T4, representationProvider: () -> Any?, name: String): AssertionPlant - = _returnValueOf4(plant, method, arg1, arg2, arg3, arg4, representationProvider, name) - - override fun returnValueOf4(plant: AssertionPlant, method: (T1, T2, T3, T4) -> R, arg1: T1, arg2: T2, arg3: T3, arg4: T4, name: String): AssertionPlantNullable - = _returnValueOf4(plant, method, arg1, arg2, arg3, arg4, name) - override fun returnValueOf4(plant: AssertionPlant, method: (T1, T2, T3, T4) -> R, arg1: T1, arg2: T2, arg3: T3, arg4: T4, representationProvider: () -> Any?, name: String): AssertionPlantNullable - = _returnValueOf4(plant, method, arg1, arg2, arg3, arg4, representationProvider, name) - - //Arg5 - override fun returnValueOf5(plant: AssertionPlant, method: (T1, T2, T3, T4, T5) -> R, arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, name: String): AssertionPlant - = _returnValueOf5(plant, method, arg1, arg2, arg3, arg4, arg5, name) - override fun returnValueOf5(plant: AssertionPlant, method: (T1, T2, T3, T4, T5) -> R, arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, representationProvider: () -> Any?, name: String): AssertionPlant - = _returnValueOf5(plant, method, arg1, arg2, arg3, arg4, arg5, representationProvider, name) - - override fun returnValueOf5(plant: AssertionPlant, method: (T1, T2, T3, T4, T5) -> R, arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, name: String): AssertionPlantNullable - = _returnValueOf5(plant, method, arg1, arg2, arg3, arg4, arg5, name) - override fun returnValueOf5(plant: AssertionPlant, method: (T1, T2, T3, T4, T5) -> R, arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, representationProvider: () -> Any?, name: String): AssertionPlantNullable - = _returnValueOf5(plant, method, arg1, arg2, arg3, arg4, arg5, representationProvider, name) -} diff --git a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/Fun0AssertionsImpl.kt b/misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/Fun0AssertionsImpl.kt deleted file mode 100644 index 9f6b682fb..000000000 --- a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/Fun0AssertionsImpl.kt +++ /dev/null @@ -1,20 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION") -package ch.tutteli.atrium.domain.robstoll.creating - -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.domain.creating.Fun0Assertions -import ch.tutteli.atrium.domain.robstoll.lib.creating._isThrowing -import ch.tutteli.atrium.domain.robstoll.lib.creating._isNotThrowing -import kotlin.reflect.KClass - -@Deprecated("Will be removed with 1.0.0") -class Fun0AssertionsImpl : Fun0Assertions { - - override fun isThrowing( - expect: Expect Any?>, - expectedType: KClass - ) = _isThrowing(expect, expectedType) - - override fun R> isNotThrowing(expect: Expect) = _isNotThrowing(expect) -} diff --git a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/IterableAssertionsDeprecatedImpl.kt b/misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/IterableAssertionsDeprecatedImpl.kt deleted file mode 100644 index f65bbd69a..000000000 --- a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/IterableAssertionsDeprecatedImpl.kt +++ /dev/null @@ -1,17 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove annotation with 1.0.0 */) - -package ch.tutteli.atrium.domain.robstoll.creating - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.domain.creating.IterableAssertions -import ch.tutteli.atrium.domain.robstoll.lib.creating._iterableAll - -@Deprecated("Will be removed with 1.0.0") -abstract class IterableAssertionsDeprecatedImpl : IterableAssertions { - - override fun all( - plant: AssertionPlant>, - assertionCreator: (AssertionPlant.() -> Unit)? - ): Assertion = _iterableAll(plant, assertionCreator) -} diff --git a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/IterableAssertionsImpl.kt b/misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/IterableAssertionsImpl.kt deleted file mode 100644 index 7b91ae5d4..000000000 --- a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/IterableAssertionsImpl.kt +++ /dev/null @@ -1,41 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION") -package ch.tutteli.atrium.domain.robstoll.creating - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.domain.creating.IterableAssertions -import ch.tutteli.atrium.domain.robstoll.lib.creating._containsBuilder -import ch.tutteli.atrium.domain.robstoll.lib.creating._containsNotBuilder -import ch.tutteli.atrium.domain.robstoll.lib.creating._hasNext -import ch.tutteli.atrium.domain.robstoll.lib.creating._hasNotNext -import ch.tutteli.atrium.domain.robstoll.lib.creating._iterableAll -import ch.tutteli.atrium.domain.robstoll.lib.creating._max -import ch.tutteli.atrium.domain.robstoll.lib.creating._min - -@Deprecated("Will be removed with 1.0.0") -class IterableAssertionsImpl : IterableAssertions, IterableAssertionsDeprecatedImpl() { - - override fun > containsBuilder(subjectProvider: SubjectProvider) = - _containsBuilder(subjectProvider) - - override fun > containsNotBuilder(subjectProvider: SubjectProvider) = - _containsNotBuilder(subjectProvider) - - override fun > all( - expect: Expect, - assertionCreator: (Expect.() -> Unit)? - ): Assertion = _iterableAll(expect, assertionCreator) - - override fun > hasNext(expect: Expect): Assertion = _hasNext(expect) - - override fun > hasNotNext(expect: Expect): Assertion = _hasNotNext(expect) - - override fun , T : Iterable> min(expect: Expect) = - _min(expect) - - override fun , T : Iterable> max(expect: Expect) = - _max(expect) - -} diff --git a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/IteratorAssertionsImpl.kt b/misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/IteratorAssertionsImpl.kt deleted file mode 100644 index a983b064d..000000000 --- a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/IteratorAssertionsImpl.kt +++ /dev/null @@ -1,16 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION") -package ch.tutteli.atrium.domain.robstoll.creating - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.domain.creating.IteratorAssertions -import ch.tutteli.atrium.domain.robstoll.lib.creating._hasNext -import ch.tutteli.atrium.domain.robstoll.lib.creating._hasNotNext - -@Deprecated("Will be removed with 1.0.0") -class IteratorAssertionsImpl : IteratorAssertions { - override fun > hasNext(expect: Expect): Assertion = _hasNext(expect) - - override fun > hasNotNext(expect: Expect): Assertion = _hasNotNext(expect) -} diff --git a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/ListAssertionsDeprecatedImpl.kt b/misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/ListAssertionsDeprecatedImpl.kt deleted file mode 100644 index dc465c3ca..000000000 --- a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/ListAssertionsDeprecatedImpl.kt +++ /dev/null @@ -1,30 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove annotation with 1.0.0 */) - -package ch.tutteli.atrium.domain.robstoll.creating - -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.creating.AssertionPlantNullable -import ch.tutteli.atrium.domain.creating.ListAssertions -import ch.tutteli.atrium.domain.robstoll.lib.creating._get -import ch.tutteli.atrium.domain.robstoll.lib.creating._getNullable - -@Deprecated("Will be removed with 1.0.0") -abstract class ListAssertionsDeprecatedImpl : ListAssertions { - - override fun get(plant: AssertionPlant>, index: Int): AssertionPlant = _get(plant, index) - - override fun get( - plant: AssertionPlant>, - index: Int, - assertionCreator: AssertionPlant.() -> Unit - ) = _get(plant, index, assertionCreator) - - override fun getNullable( - plant: AssertionPlant>, - index: Int, - assertionCreator: AssertionPlantNullable.() -> Unit - ) = _getNullable(plant, index, assertionCreator) - - override fun getNullable(plant: AssertionPlant>, index: Int): AssertionPlantNullable = - _getNullable(plant, index) -} diff --git a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/ListAssertionsImpl.kt b/misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/ListAssertionsImpl.kt deleted file mode 100644 index 179698215..000000000 --- a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/ListAssertionsImpl.kt +++ /dev/null @@ -1,16 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION") -package ch.tutteli.atrium.domain.robstoll.creating - -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.domain.creating.ListAssertions -import ch.tutteli.atrium.domain.robstoll.lib.creating._get - -@Deprecated("Will be removed with 1.0.0") -class ListAssertionsImpl : ListAssertions, ListAssertionsDeprecatedImpl() { - - override fun > get( - expect: Expect, - index: Int - ) = _get(expect, index) -} diff --git a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/MapAssertionsDeprecatedImpl.kt b/misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/MapAssertionsDeprecatedImpl.kt deleted file mode 100644 index 266ebd99f..000000000 --- a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/MapAssertionsDeprecatedImpl.kt +++ /dev/null @@ -1,55 +0,0 @@ -@file:Suppress( -/* TODO remove annotation with 1.0.0 */ "DEPRECATION", -/* TODO remove annotation with 1.0.0 */ "TYPEALIAS_EXPANSION_DEPRECATION" -) - -package ch.tutteli.atrium.domain.robstoll.creating - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.creating.AssertionPlantNullable -import ch.tutteli.atrium.domain.creating.MapAssertions -import ch.tutteli.atrium.domain.robstoll.lib.creating.* - -@Deprecated("Will be removed with 1.0.0") -abstract class MapAssertionsDeprecatedImpl : MapAssertions { - - override fun contains(plant: AssertionPlant>, keyValuePairs: List>) = - _contains(plant, keyValuePairs) - - override fun containsKeyWithValueAssertions( - plant: AssertionPlant>, - keyValues: List.() -> Unit)?>> - ) = _containsKeyWithValueAssertion(plant, keyValues) - - override fun getExisting(plant: AssertionPlant>, key: K) = _getExisting(plant, key) - - override fun getExisting( - plant: AssertionPlant>, - key: K, - assertionCreator: AssertionPlant.() -> Unit - ) = _getExisting(plant, key, assertionCreator) - - override fun getExistingNullable(plant: AssertionPlant>, key: K) = - _getExistingNullable(plant, key) - - override fun getExistingNullable( - plant: AssertionPlant>, - key: K, - assertionCreator: AssertionPlantNullable.() -> Unit - ) = _getExistingNullable(plant, key, assertionCreator) - - - override fun hasSize(plant: AssertionPlant>, size: Int) = _hasSize(plant, size) - - override fun keys( - plant: AssertionPlant>, - assertionCreator: AssertionPlant>.() -> Unit - ): Assertion = _keys(plant, assertionCreator) - - override fun values( - plant: AssertionPlant>, - assertionCreator: AssertionPlant>.() -> Unit - ): Assertion = _values(plant, assertionCreator) -} diff --git a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/MapAssertionsImpl.kt b/misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/MapAssertionsImpl.kt deleted file mode 100644 index b447d32c1..000000000 --- a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/MapAssertionsImpl.kt +++ /dev/null @@ -1,42 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION") -package ch.tutteli.atrium.domain.robstoll.creating - -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.domain.creating.MapAssertions -import ch.tutteli.atrium.domain.creating.changers.ExtractedFeaturePostStep -import ch.tutteli.atrium.domain.robstoll.lib.creating.* -import kotlin.reflect.KClass - -@Deprecated("Will be removed with 1.0.0") -class MapAssertionsImpl : MapAssertions, MapAssertionsDeprecatedImpl() { - - override fun > contains( - expect: Expect, - keyValuePairs: List> - ) = _contains(expect, keyValuePairs) - - override fun > containsKeyWithValueAssertions( - expect: Expect, - valueType: KClass, - keyValues: List.() -> Unit)?>> - ) = _containsKeyWithValueAssertion(expect, valueType, keyValues) - - override fun containsKey(subjectProvider: SubjectProvider>, key: K) = - _containsKey(subjectProvider, key) - - override fun containsNotKey(subjectProvider: SubjectProvider>, key: K) = - _containsNotKey(subjectProvider, key) - - override fun isEmpty(subjectProvider: SubjectProvider>) = _isEmpty(subjectProvider) - - override fun isNotEmpty(subjectProvider: SubjectProvider>) = _isNotEmpty(subjectProvider) - - override fun > getExisting( - expect: Expect, - key: K - ): ExtractedFeaturePostStep = _getExisting(expect, key) - - override fun > size(expect: Expect) = _size(expect) -} diff --git a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/MapEntryAssertionsDeprecatedImpl.kt b/misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/MapEntryAssertionsDeprecatedImpl.kt deleted file mode 100644 index 41ed587f8..000000000 --- a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/MapEntryAssertionsDeprecatedImpl.kt +++ /dev/null @@ -1,38 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove annotation with 1.0.0 */) - -package ch.tutteli.atrium.domain.robstoll.creating - -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.creating.AssertionPlantNullable -import ch.tutteli.atrium.domain.creating.MapEntryAssertions -import ch.tutteli.atrium.domain.robstoll.lib.creating.* - -@Deprecated("Will be removed with 1.0.0") -abstract class MapEntryAssertionsDeprecatedImpl : MapEntryAssertions { - - override fun isKeyValue( - plant: AssertionPlant>, - key: K, - value: V - ) = _keyValue(plant, key, value) - - override fun key( - plant: AssertionPlant>, - assertionCreator: AssertionPlant.() -> Unit - ) = _key(plant, assertionCreator) - - override fun value( - plant: AssertionPlant>, - assertionCreator: AssertionPlant.() -> Unit - ) = _value(plant, assertionCreator) - - override fun nullableKey( - plant: AssertionPlant>, - assertionCreator: AssertionPlantNullable.() -> Unit - ) = _nullableKey(plant, assertionCreator) - - override fun nullableValue( - plant: AssertionPlant>, - assertionCreator: AssertionPlantNullable.() -> Unit - ) = _nullableValue(plant, assertionCreator) -} diff --git a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/MapEntryAssertionsImpl.kt b/misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/MapEntryAssertionsImpl.kt deleted file mode 100644 index 0c228e427..000000000 --- a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/MapEntryAssertionsImpl.kt +++ /dev/null @@ -1,18 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION") -package ch.tutteli.atrium.domain.robstoll.creating - -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.domain.creating.MapEntryAssertions -import ch.tutteli.atrium.domain.robstoll.lib.creating._isKeyValue -import ch.tutteli.atrium.domain.robstoll.lib.creating._key -import ch.tutteli.atrium.domain.robstoll.lib.creating._value - -@Deprecated("Will be removed with 1.0.0") -class MapEntryAssertionsImpl : MapEntryAssertions, MapEntryAssertionsDeprecatedImpl() { - override fun > isKeyValue(expect: Expect, key: K, value: V) = - _isKeyValue(expect, key, value) - - override fun > key(expect: Expect) = _key(expect) - override fun > value(expect: Expect) = _value(expect) -} diff --git a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/NewFeatureAssertionsImpl.kt b/misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/NewFeatureAssertionsImpl.kt deleted file mode 100644 index bc2d59adf..000000000 --- a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/NewFeatureAssertionsImpl.kt +++ /dev/null @@ -1,15 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION") -package ch.tutteli.atrium.domain.robstoll.creating - -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.domain.creating.MetaFeature -import ch.tutteli.atrium.domain.creating.NewFeatureAssertions -import ch.tutteli.atrium.domain.robstoll.lib.creating._genericFeature - -@Deprecated("Will be removed with 1.0.0") -class NewFeatureAssertionsImpl : NewFeatureAssertions { - - override fun genericFeature(expect: Expect, metaFeature: MetaFeature) = - _genericFeature(expect, metaFeature) -} diff --git a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/PairAssertionsImpl.kt b/misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/PairAssertionsImpl.kt deleted file mode 100644 index 3ebb2cd05..000000000 --- a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/PairAssertionsImpl.kt +++ /dev/null @@ -1,41 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.domain.robstoll.creating - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.creating.AssertionPlantNullable -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.domain.creating.PairAssertions -import ch.tutteli.atrium.domain.robstoll.lib.creating._first -import ch.tutteli.atrium.domain.robstoll.lib.creating._nullableFirst -import ch.tutteli.atrium.domain.robstoll.lib.creating._nullableSecond -import ch.tutteli.atrium.domain.robstoll.lib.creating._second - -@Deprecated("Will be removed with 1.0.0") -class PairAssertionsImpl : PairAssertions { - override fun > first(expect: Expect) = _first(expect) - override fun > second(expect: Expect) = _second(expect) - - - override fun first( - plant: AssertionPlant>, - assertionCreator: AssertionPlant.() -> Unit - ): Assertion = _first(plant, assertionCreator) - - override fun second( - plant: AssertionPlant>, - assertionCreator: AssertionPlant.() -> Unit - ): Assertion = _second(plant, assertionCreator) - - override fun nullableFirst( - plant: AssertionPlant>, - assertionCreator: AssertionPlantNullable.() -> Unit - ): Assertion = _nullableFirst(plant, assertionCreator) - - override fun nullableSecond( - plant: AssertionPlant>, - assertionCreator: AssertionPlantNullable.() -> Unit - ): Assertion = _nullableSecond(plant, assertionCreator) -} diff --git a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/ThrowableAssertionsImpl.kt b/misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/ThrowableAssertionsImpl.kt deleted file mode 100644 index 90b8bf4a1..000000000 --- a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/ThrowableAssertionsImpl.kt +++ /dev/null @@ -1,33 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION") -package ch.tutteli.atrium.domain.robstoll.creating - -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.domain.creating.ThrowableAssertions -import ch.tutteli.atrium.domain.creating.changers.ChangedSubjectPostStep -import ch.tutteli.atrium.domain.robstoll.lib.creating._cause -import ch.tutteli.atrium.reporting.Reporter -import ch.tutteli.atrium.reporting.translating.Translatable -import kotlin.reflect.KClass - -@Deprecated("Will be removed with 1.0.0") -class ThrowableAssertionsImpl : ThrowableAssertions { - - override fun cause( - expect: Expect, - expectedType: KClass - ): ChangedSubjectPostStep = - _cause(expect, expectedType) - - - @Suppress("OverridingDeprecatedMember", "DEPRECATION") - override fun thrownBuilder( - assertionVerb: Translatable, - act: () -> Unit, - reporter: Reporter - ): ch.tutteli.atrium.domain.creating.throwable.thrown.ThrowableThrown.Builder = - ch.tutteli.atrium.domain.robstoll.lib.creating.throwable.thrown.builders.ThrowableThrownBuilder( - assertionVerb, act, reporter - ) -} - diff --git a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/any/typetransformation/creators/AnyTypeTransformationAssertionsImpl.kt b/misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/any/typetransformation/creators/AnyTypeTransformationAssertionsImpl.kt deleted file mode 100644 index ca364530c..000000000 --- a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/any/typetransformation/creators/AnyTypeTransformationAssertionsImpl.kt +++ /dev/null @@ -1,56 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0 */) - -package ch.tutteli.atrium.domain.robstoll.creating.any.typetransformation.creators - -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.creating.AssertionPlantNullable -import ch.tutteli.atrium.creating.BaseAssertionPlant -import ch.tutteli.atrium.domain.creating.any.typetransformation.AnyTypeTransformation -import ch.tutteli.atrium.domain.creating.any.typetransformation.creators.AnyTypeTransformationAssertions -import ch.tutteli.atrium.domain.robstoll.lib.creating.any.typetransformation.creators._downCast -import ch.tutteli.atrium.domain.robstoll.lib.creating.any.typetransformation.creators._isA -import ch.tutteli.atrium.domain.robstoll.lib.creating.any.typetransformation.creators._isNotNull -import ch.tutteli.atrium.domain.robstoll.lib.creating.any.typetransformation.creators._typeTransformation -import ch.tutteli.atrium.reporting.translating.Translatable -import kotlin.reflect.KClass - - -@Deprecated("Use _isA or _changeSubject; will be removed with 1.0.0") -class AnyTypeTransformationAssertionsImpl : AnyTypeTransformationAssertions { - - override fun isNotNull( - plant: AssertionPlantNullable, - type: KClass, - assertionCreator: AssertionPlant.() -> Unit - ) { - @Suppress("DEPRECATION") - _isNotNull(plant, type, assertionCreator) - } - - override fun isA( - plant: AssertionPlant, - subType: KClass, - assertionCreator: AssertionPlant.() -> Unit - ) { - _isA(plant, subType, assertionCreator) - } - - override fun downCast( - description: Translatable, - subType: KClass, - subjectPlant: BaseAssertionPlant, - assertionCreator: AssertionPlant.() -> Unit, - failureHandler: AnyTypeTransformation.FailureHandler - ) { - _downCast(description, subType, subjectPlant, assertionCreator, failureHandler) - } - - override fun transform( - parameterObject: AnyTypeTransformation.ParameterObject, - canBeTransformed: (S) -> Boolean, - transform: (S) -> T, - failureHandler: AnyTypeTransformation.FailureHandler - ) { - _typeTransformation(parameterObject, canBeTransformed, transform, failureHandler) - } -} diff --git a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/any/typetransformation/failurehandlers/FailureHandlerFactoryImpl.kt b/misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/any/typetransformation/failurehandlers/FailureHandlerFactoryImpl.kt deleted file mode 100644 index e09591089..000000000 --- a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/any/typetransformation/failurehandlers/FailureHandlerFactoryImpl.kt +++ /dev/null @@ -1,22 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0 */) - -package ch.tutteli.atrium.domain.robstoll.creating.any.typetransformation.failurehandlers - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.domain.creating.any.typetransformation.AnyTypeTransformation -import ch.tutteli.atrium.domain.creating.any.typetransformation.failurehandlers.FailureHandlerFactory -import ch.tutteli.atrium.domain.robstoll.lib.creating.any.typetransformation.failurehandlers.ExplanatoryFailureHandler -import ch.tutteli.atrium.domain.robstoll.lib.creating.any.typetransformation.failurehandlers.ExplanatoryFailureHandlerWithHint - - -@Deprecated("Use _changeSubject or _extractFeature instead; will be removed with 1.0.0") -class FailureHandlerFactoryImpl : FailureHandlerFactory { - - override fun newExplanatory(): AnyTypeTransformation.FailureHandler = - ExplanatoryFailureHandler() - - override fun newExplanatoryWithHint( - showHint: () -> Boolean, - failureHintFactory: () -> Assertion - ): AnyTypeTransformation.FailureHandler = ExplanatoryFailureHandlerWithHint(showHint, failureHintFactory) -} diff --git a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/changers/FeatureExtractoImpl.kt b/misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/changers/FeatureExtractoImpl.kt deleted file mode 100644 index 77c90960f..000000000 --- a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/changers/FeatureExtractoImpl.kt +++ /dev/null @@ -1,30 +0,0 @@ -//TODO remove with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.domain.robstoll.creating.changers - -import ch.tutteli.atrium.core.Option -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.creating.FeatureExpect -import ch.tutteli.atrium.domain.creating.changers.FeatureExtractor -import ch.tutteli.atrium.domain.robstoll.lib.creating.changers._extractFeature -import ch.tutteli.atrium.reporting.translating.Translatable - -class FeatureExtractorImpl : FeatureExtractor { - - override fun extract( - originalAssertionContainer: Expect, - description: Translatable, - representationForFailure: Any, - featureExtraction: (T) -> Option, - maybeSubAssertions: Option.() -> Unit>, - representationInsteadOfFeature: ((R) -> Any)? - ): FeatureExpect = _extractFeature( - originalAssertionContainer, - description, - representationForFailure, - featureExtraction, - maybeSubAssertions, - representationInsteadOfFeature - ) -} diff --git a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/changers/SubjectChangerImpl.kt b/misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/changers/SubjectChangerImpl.kt deleted file mode 100644 index 7e8491fd3..000000000 --- a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/changers/SubjectChangerImpl.kt +++ /dev/null @@ -1,75 +0,0 @@ -//TODO remove with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.domain.robstoll.creating.changers - -import ch.tutteli.atrium.core.Option -import ch.tutteli.atrium.core.coreFactory -import ch.tutteli.atrium.core.getOrElse -import ch.tutteli.atrium.core.newReportingPlantNullable -import ch.tutteli.atrium.creating.* -import ch.tutteli.atrium.domain.creating.changers.SubjectChanger -import ch.tutteli.atrium.domain.robstoll.lib.creating.changers._changeSubject -import ch.tutteli.atrium.domain.robstoll.lib.creating.changers._changeSubjectUnreported -import ch.tutteli.atrium.reporting.SHOULD_NOT_BE_SHOWN_TO_THE_USER_BUG_TRANSLATABLE -import ch.tutteli.atrium.reporting.translating.Translatable -import ch.tutteli.atrium.reporting.translating.Untranslatable - -class SubjectChangerImpl : SubjectChanger { - - override fun unreported( - originalAssertionContainer: Expect, - transformation: (T) -> R - ): Expect = _changeSubjectUnreported(originalAssertionContainer, transformation) - - override fun reported( - originalAssertionContainer: Expect, - description: Translatable, - representation: Any, - transformation: (T) -> Option, - failureHandler: SubjectChanger.FailureHandler, - maybeSubAssertions: Option.() -> Unit> - ): Expect = _changeSubject( - originalAssertionContainer, - description, - representation, - transformation, - failureHandler, - maybeSubAssertions - ) - - @Suppress("DEPRECATION", "KDocMissingDocumentation", "OverridingDeprecatedMember", - "TYPEALIAS_EXPANSION_DEPRECATION" - ) - override fun unreportedToAssert( - originalPlant: SubjectProvider, - transformation: (T) -> R - ): Assert { - val (assertionChecker, assertionVerb) = createDelegatingAssertionCheckerAndVerb(originalPlant) - return coreFactory.newReportingPlant( - assertionVerb, - { transformation(originalPlant.maybeSubject.getOrElse { throw PlantHasNoSubjectException() }) }, - assertionChecker - ) - } - - @Suppress("DEPRECATION", "KDocMissingDocumentation", "OverridingDeprecatedMember") - override fun unreportedNullableToAssert( - originalPlant: SubjectProvider, - transformation: (T) -> R - ): AssertionPlantNullable { - val (assertionChecker, assertionVerb) = createDelegatingAssertionCheckerAndVerb(originalPlant) - return coreFactory.newReportingPlantNullable( - assertionVerb, - { transformation(originalPlant.maybeSubject.getOrElse { throw PlantHasNoSubjectException() }) }, - assertionChecker - ) - } - - //TODO remove with 1.0.0 - @Suppress("DEPRECATION") - private fun createDelegatingAssertionCheckerAndVerb(originalPlant: AssertionHolder): Pair { - val assertionChecker = coreFactory.newDelegatingAssertionChecker(originalPlant) - return assertionChecker to SHOULD_NOT_BE_SHOWN_TO_THE_USER_BUG_TRANSLATABLE - } -} diff --git a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/charsequence/contains/checkers/CheckerFactoryImpl.kt b/misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/charsequence/contains/checkers/CheckerFactoryImpl.kt deleted file mode 100644 index 15e074614..000000000 --- a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/charsequence/contains/checkers/CheckerFactoryImpl.kt +++ /dev/null @@ -1,35 +0,0 @@ -//TODO remove with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.domain.robstoll.creating.charsequence.contains.checkers - -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains -import ch.tutteli.atrium.domain.creating.charsequence.contains.checkers.CheckerFactory -import ch.tutteli.atrium.domain.robstoll.lib.creating.charsequence.contains.checkers.AtLeastChecker -import ch.tutteli.atrium.domain.robstoll.lib.creating.charsequence.contains.checkers.AtMostChecker -import ch.tutteli.atrium.domain.robstoll.lib.creating.charsequence.contains.checkers.ExactlyChecker -import ch.tutteli.atrium.domain.robstoll.lib.creating.charsequence.contains.checkers.NotChecker - -@Deprecated("use extension functions of atrium-logic; will be removed with 1.0.0") -class CheckerFactoryImpl : CheckerFactory { - - override fun newAtLeastChecker( - times: Int, - nameContainsNotFun: String, - atLeastCall: (Int) -> String - ): CharSequenceContains.Checker = AtLeastChecker(times, nameContainsNotFun, atLeastCall) - - override fun newAtMostChecker( - times: Int, - nameContainsNotFun: String, - atMostCall: (Int) -> String - ): CharSequenceContains.Checker = AtMostChecker(times, nameContainsNotFun, atMostCall) - - override fun newExactlyChecker( - times: Int, - nameContainsNotFun: String, - exactlyCall: (Int) -> String - ): CharSequenceContains.Checker = ExactlyChecker(times, nameContainsNotFun, exactlyCall) - - override fun newNotChecker(): CharSequenceContains.Checker = NotChecker() -} diff --git a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/charsequence/contains/creators/CharSequenceContainsAssertionsImpl.kt b/misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/charsequence/contains/creators/CharSequenceContainsAssertionsImpl.kt deleted file mode 100644 index 91b0ebd38..000000000 --- a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/charsequence/contains/creators/CharSequenceContainsAssertionsImpl.kt +++ /dev/null @@ -1,50 +0,0 @@ -//TODO remove with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.domain.robstoll.creating.charsequence.contains.creators - -import ch.tutteli.atrium.assertions.AssertionGroup -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains -import ch.tutteli.atrium.domain.creating.charsequence.contains.creators.CharSequenceContainsAssertions -import ch.tutteli.atrium.domain.creating.charsequence.contains.searchbehaviours.IgnoringCaseSearchBehaviour -import ch.tutteli.atrium.domain.creating.charsequence.contains.searchbehaviours.NoOpSearchBehaviour -import ch.tutteli.atrium.domain.creating.typeutils.CharSequenceOrNumberOrChar -import ch.tutteli.atrium.domain.robstoll.lib.creating.charsequence.contains.creators.* -import ch.tutteli.atrium.reporting.translating.Translatable - - -@Deprecated("use CharSequenceContainsAssertions of atrium-logic; will be removed with 1.0.0") -class CharSequenceContainsAssertionsImpl : CharSequenceContainsAssertions { - - override fun values( - checkerOption: CharSequenceContains.CheckerOption, - expected: List - ): AssertionGroup = _containsValues(checkerOption, expected) - - override fun valuesIgnoringCase( - checkerOption: CharSequenceContains.CheckerOption, - expected: List - ): AssertionGroup = _containsValuesIgnoringCase(checkerOption, expected) - - @Suppress("OverridingDeprecatedMember", "DEPRECATION") - override fun defaultTranslationOf( - checkerOption: CharSequenceContains.CheckerOption, - expected: List - ): AssertionGroup = _containsDefaultTranslationOf(checkerOption, expected) - - @Suppress("OverridingDeprecatedMember", "DEPRECATION") - override fun defaultTranslationOfIgnoringCase( - checkerOption: CharSequenceContains.CheckerOption, - expected: List - ): AssertionGroup = _containsDefaultTranslationOfIgnoringCase(checkerOption, expected) - - override fun regex( - checkerOption: CharSequenceContains.CheckerOption, - expected: List - ): AssertionGroup = _containsRegex(checkerOption, expected) - - override fun regexIgnoringCase( - checkerOption: CharSequenceContains.CheckerOption, - expected: List - ): AssertionGroup = _containsRegexIgnoringCase(checkerOption, expected) -} diff --git a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/charsequence/contains/searchbehaviours/SearchBehaviourFactoryImpl.kt b/misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/charsequence/contains/searchbehaviours/SearchBehaviourFactoryImpl.kt deleted file mode 100644 index 74b9c6125..000000000 --- a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/charsequence/contains/searchbehaviours/SearchBehaviourFactoryImpl.kt +++ /dev/null @@ -1,18 +0,0 @@ -//TODO remove with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.domain.robstoll.creating.charsequence.contains.searchbehaviours - -import ch.tutteli.atrium.domain.creating.charsequence.contains.CharSequenceContains -import ch.tutteli.atrium.domain.creating.charsequence.contains.searchbehaviours.IgnoringCaseSearchBehaviour -import ch.tutteli.atrium.domain.creating.charsequence.contains.searchbehaviours.NoOpSearchBehaviour -import ch.tutteli.atrium.domain.creating.charsequence.contains.searchbehaviours.SearchBehaviourFactory -import ch.tutteli.atrium.domain.robstoll.lib.creating.charsequence.contains.searchbehaviours._containsIgnoringCase - -@Deprecated("use extension function of atrium-logic; will be removed with 1.0.0") -class SearchBehaviourFactoryImpl : SearchBehaviourFactory { - - override fun ignoringCase( - containsBuilder: CharSequenceContains.Builder - ): CharSequenceContains.Builder = _containsIgnoringCase(containsBuilder) -} diff --git a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/collectors/AssertionCollectorDeprecatedImpl.kt b/misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/collectors/AssertionCollectorDeprecatedImpl.kt deleted file mode 100644 index f1f72d396..000000000 --- a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/collectors/AssertionCollectorDeprecatedImpl.kt +++ /dev/null @@ -1,31 +0,0 @@ -@file:Suppress("DEPRECATION" /* will be removed with 1.0.0 */) - -package ch.tutteli.atrium.domain.robstoll.creating.collectors - -import ch.tutteli.atrium.assertions.AssertionGroup -import ch.tutteli.atrium.creating.BaseAssertionPlant -import ch.tutteli.atrium.creating.BaseCollectingAssertionPlant -import ch.tutteli.atrium.domain.creating.collectors.AssertionCollector -import ch.tutteli.atrium.domain.robstoll.lib.creating.collectors._collectAssertions -import ch.tutteli.atrium.domain.robstoll.lib.creating.collectors._collectOrExplain -import ch.tutteli.atrium.reporting.translating.Translatable - -@Deprecated("will be removed with 1.0.0") -abstract class AssertionCollectorDeprecatedImpl : AssertionCollector { - - override fun , C : BaseCollectingAssertionPlant> collect( - subjectProvider: () -> T, - collectingPlantFactory: (() -> T) -> C, - assertionCreator: C.() -> Unit - ): AssertionGroup = _collectAssertions(subjectProvider, collectingPlantFactory, assertionCreator) - - override fun , C : BaseCollectingAssertionPlant> collectOrExplain( - safeToCollect: Boolean, - warningCannotEvaluate: Translatable, - subjectProvider: () -> T, - collectingPlantFactory: (() -> T) -> C, - assertionCreator: C.() -> Unit - ): AssertionGroup = _collectOrExplain( - safeToCollect, warningCannotEvaluate, subjectProvider, collectingPlantFactory, assertionCreator - ) -} diff --git a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/collectors/AssertionCollectorImpl.kt b/misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/collectors/AssertionCollectorImpl.kt index 40de27e75..9b7b80bce 100644 --- a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/collectors/AssertionCollectorImpl.kt +++ b/misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/collectors/AssertionCollectorImpl.kt @@ -1,4 +1,4 @@ -//TODO remove file with 1.0.0 +//TODO remove file with 0.17.0 @file:Suppress("DEPRECATION") package ch.tutteli.atrium.domain.robstoll.creating.collectors @@ -9,7 +9,8 @@ import ch.tutteli.atrium.domain.creating.collectors.AssertionCollector import ch.tutteli.atrium.domain.robstoll.lib.creating.collectors._collect import ch.tutteli.atrium.domain.robstoll.lib.creating.collectors._collectForComposition -class AssertionCollectorImpl : AssertionCollector, AssertionCollectorDeprecatedImpl() { +//TODO 0.16.0 move to logic and deprecate +class AssertionCollectorImpl : AssertionCollector { override fun collect( maybeSubject: Option, diff --git a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/collectors/assertionCollectorsForExplanation.kt b/misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/collectors/assertionCollectorsForExplanation.kt deleted file mode 100644 index 3a57a024a..000000000 --- a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/collectors/assertionCollectorsForExplanation.kt +++ /dev/null @@ -1,41 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.domain.robstoll.creating.collectors - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.creating.BaseAssertionPlant -import ch.tutteli.atrium.creating.BaseCollectingAssertionPlant -import ch.tutteli.atrium.creating.MaybeSubject -import ch.tutteli.atrium.domain.creating.collectors.NonThrowingAssertionCollectorForExplanation -import ch.tutteli.atrium.domain.creating.collectors.ThrowingAssertionCollectorForExplanation -import ch.tutteli.atrium.domain.robstoll.lib.creating.collectors.AssertionCollectorForExplanationImpl -import ch.tutteli.atrium.reporting.translating.Translatable - -@Deprecated("Will be removed with 1.0.0") -class NonThrowingAssertionCollectorForExplanationImpl : NonThrowingAssertionCollectorForExplanation { - - @Suppress("DeprecatedCallableAddReplaceWith", "DEPRECATION") - @Deprecated("Switch from Assert to Expect and use the other overload; will be removed with 1.0.0") - override fun , C : BaseCollectingAssertionPlant> collect( - warningCannotEvaluate: Translatable, - maybeSubject: MaybeSubject, - collectingPlantFactory: (() -> T) -> C, - assertionCreator: (C.() -> Unit)? - ): List = AssertionCollectorForExplanationImpl(false, collectingPlantFactory) - .collect(warningCannotEvaluate, maybeSubject, assertionCreator) -} - -@Deprecated("Will be removed with 1.0.0") -class ThrowingAssertionCollectorForExplanationImpl : ThrowingAssertionCollectorForExplanation { - - @Suppress("DeprecatedCallableAddReplaceWith", "DEPRECATION") - @Deprecated("Switch from Assert to Expect and use the other overload; will be removed with 1.0.0") - override fun , C : BaseCollectingAssertionPlant> collect( - warningCannotEvaluate: Translatable, - maybeSubject: MaybeSubject, - collectingPlantFactory: (() -> T) -> C, - assertionCreator: (C.() -> Unit)? - ): List = AssertionCollectorForExplanationImpl(true, collectingPlantFactory) - .collect(warningCannotEvaluate, maybeSubject, assertionCreator) -} diff --git a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/feature/extract/creators/FeatureExtractorCreatorFactoryImpl.kt b/misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/feature/extract/creators/FeatureExtractorCreatorFactoryImpl.kt deleted file mode 100644 index 05ab242c0..000000000 --- a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/feature/extract/creators/FeatureExtractorCreatorFactoryImpl.kt +++ /dev/null @@ -1,26 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0 */) - -package ch.tutteli.atrium.domain.robstoll.creating.feature.extract.creators - -import ch.tutteli.atrium.domain.creating.feature.extract.FeatureExtractor -import ch.tutteli.atrium.domain.creating.feature.extract.creators.FeatureExtractorCreatorFactory -import ch.tutteli.atrium.domain.robstoll.lib.creating.feature.extract.creators.FeatureExtractorCreatorImpl -import ch.tutteli.atrium.domain.robstoll.lib.creating.feature.extract.creators.FeatureExtractorCreatorNullableImpl -import ch.tutteli.atrium.reporting.translating.Translatable - -@Deprecated("Use FeatureExtractorImpl instead; will be removed with 1.0.0") -class FeatureExtractorCreatorFactoryImpl : FeatureExtractorCreatorFactory { - - override fun create( - featureRepresentation: Translatable, - parameterObject: FeatureExtractor.ParameterObject - ): FeatureExtractor.Creator = FeatureExtractorCreatorImpl(featureRepresentation, parameterObject) - - override fun createNullable( - featureRepresentation: Translatable, - parameterObject: FeatureExtractor.ParameterObject - ): FeatureExtractor.CreatorNullable = - FeatureExtractorCreatorNullableImpl(featureRepresentation, parameterObject) -} - - diff --git a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/iterable/contains/checkers/CheckerFactoryImpl.kt b/misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/iterable/contains/checkers/CheckerFactoryImpl.kt deleted file mode 100644 index 484f9d058..000000000 --- a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/iterable/contains/checkers/CheckerFactoryImpl.kt +++ /dev/null @@ -1,32 +0,0 @@ -package ch.tutteli.atrium.domain.robstoll.creating.iterable.contains.checkers - -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.creating.iterable.contains.checkers.CheckerFactory -import ch.tutteli.atrium.domain.robstoll.lib.creating.iterable.contains.checkers.AtLeastChecker -import ch.tutteli.atrium.domain.robstoll.lib.creating.iterable.contains.checkers.AtMostChecker -import ch.tutteli.atrium.domain.robstoll.lib.creating.iterable.contains.checkers.ExactlyChecker -import ch.tutteli.atrium.domain.robstoll.lib.creating.iterable.contains.checkers.NotChecker - - -class CheckerFactoryImpl : CheckerFactory { - - override fun newAtLeastChecker( - times: Int, - nameContainsNotFun: String, - atLeastCall: (Int) -> String - ): IterableContains.Checker = AtLeastChecker(times, nameContainsNotFun, atLeastCall) - - override fun newAtMostChecker( - times: Int, - nameContainsNotFun: String, - atMostCall: (Int) -> String - ): IterableContains.Checker = AtMostChecker(times, nameContainsNotFun, atMostCall) - - override fun newExactlyChecker( - times: Int, - nameContainsNotFun: String, - exactlyCall: (Int) -> String - ): IterableContains.Checker = ExactlyChecker(times, nameContainsNotFun, exactlyCall) - - override fun newNotChecker(): IterableContains.Checker = NotChecker() -} diff --git a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/iterable/contains/creators/IterableContainsAssertionsDeprecatedImpl.kt b/misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/iterable/contains/creators/IterableContainsAssertionsDeprecatedImpl.kt deleted file mode 100644 index 1b4aa3a74..000000000 --- a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/iterable/contains/creators/IterableContainsAssertionsDeprecatedImpl.kt +++ /dev/null @@ -1,40 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove annotation with 1.0.0 */) - -package ch.tutteli.atrium.domain.robstoll.creating.iterable.contains.creators - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.creating.iterable.contains.creators.IterableContainsAssertions -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InAnyOrderOnlySearchBehaviour -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InAnyOrderSearchBehaviour -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InOrderOnlyGroupedSearchBehaviour -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InOrderOnlySearchBehaviour -import ch.tutteli.atrium.domain.robstoll.lib.creating.iterable.contains.creators._containsEntriesInAnyOrder -import ch.tutteli.atrium.domain.robstoll.lib.creating.iterable.contains.creators._containsEntriesInAnyOrderOnly -import ch.tutteli.atrium.domain.robstoll.lib.creating.iterable.contains.creators._containsEntriesInOrderOnly -import ch.tutteli.atrium.domain.robstoll.lib.creating.iterable.contains.creators._containsEntriesInOrderOnlyGrouped - - -abstract class IterableContainsAssertionsDeprecatedImpl : IterableContainsAssertions { - - override fun > entriesInAnyOrderWithAssert( - checkerOption: IterableContains.CheckerOption, - assertionCreators: List<(AssertionPlant.() -> Unit)?> - ): Assertion = _containsEntriesInAnyOrder(checkerOption, assertionCreators) - - override fun > entriesInAnyOrderOnlyWithAssert( - builder: IterableContains.Builder, - assertionCreators: List<(AssertionPlant.() -> Unit)?> - ): Assertion = _containsEntriesInAnyOrderOnly(builder, assertionCreators) - - override fun > entriesInOrderOnlyWithAssert( - builder: IterableContains.Builder, - assertionCreators: List<(AssertionPlant.() -> Unit)?> - ): Assertion = _containsEntriesInOrderOnly(builder, assertionCreators) - - override fun > entriesInOrderOnlyGroupedWithAssert( - builder: IterableContains.Builder, - groups: List.() -> Unit)?>> - ): Assertion = _containsEntriesInOrderOnlyGrouped(builder, groups) -} diff --git a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/iterable/contains/creators/IterableContainsAssertionsImpl.kt b/misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/iterable/contains/creators/IterableContainsAssertionsImpl.kt deleted file mode 100644 index bbcf22313..000000000 --- a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/iterable/contains/creators/IterableContainsAssertionsImpl.kt +++ /dev/null @@ -1,55 +0,0 @@ -package ch.tutteli.atrium.domain.robstoll.creating.iterable.contains.creators - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.creating.iterable.contains.creators.IterableContainsAssertions -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InAnyOrderOnlySearchBehaviour -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InAnyOrderSearchBehaviour -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InOrderOnlyGroupedSearchBehaviour -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.InOrderOnlySearchBehaviour -import ch.tutteli.atrium.domain.robstoll.lib.creating.iterable.contains.creators.* - - -class IterableContainsAssertionsImpl : IterableContainsAssertions, IterableContainsAssertionsDeprecatedImpl() { - - override fun > valuesInAnyOrder( - checkerOption: IterableContains.CheckerOption, - expected: List - ): Assertion = _containsValuesInAnyOrder(checkerOption, expected) - - override fun > entriesInAnyOrder( - checkerOption: IterableContains.CheckerOption, - assertionCreators: List<(Expect.() -> Unit)?> - ): Assertion = _containsEntriesInAnyOrder(checkerOption, assertionCreators) - - override fun > valuesInAnyOrderOnly( - builder: IterableContains.Builder, - expected: List - ): Assertion = _containsValuesInAnyOrderOnly(builder, expected) - - override fun > entriesInAnyOrderOnly( - builder: IterableContains.Builder, - assertionCreators: List<(Expect.() -> Unit)?> - ): Assertion = _containsEntriesInAnyOrderOnly(builder, assertionCreators) - - override fun > valuesInOrderOnly( - builder: IterableContains.Builder, - expected: List - ): Assertion = _containsValuesInOrderOnly(builder, expected) - - override fun > entriesInOrderOnly( - builder: IterableContains.Builder, - assertionCreators: List<(Expect.() -> Unit)?> - ): Assertion = _containsEntriesInOrderOnly(builder, assertionCreators) - - override fun > valuesInOrderOnlyGrouped( - builder: IterableContains.Builder, - groups: List> - ): Assertion = _containsValuesInOrderOnlyGrouped(builder, groups) - - override fun > entriesInOrderOnlyGrouped( - builder: IterableContains.Builder, - groups: List.() -> Unit)?>> - ): Assertion = _containsEntriesInOrderOnlyGrouped(builder, groups) -} diff --git a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/iterable/contains/searchbehaviours/SearchBehaviourFactoryImpl.kt b/misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/iterable/contains/searchbehaviours/SearchBehaviourFactoryImpl.kt deleted file mode 100644 index e6fa17224..000000000 --- a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/iterable/contains/searchbehaviours/SearchBehaviourFactoryImpl.kt +++ /dev/null @@ -1,34 +0,0 @@ -package ch.tutteli.atrium.domain.robstoll.creating.iterable.contains.searchbehaviours - -import ch.tutteli.atrium.domain.creating.iterable.contains.IterableContains -import ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.* -import ch.tutteli.atrium.domain.robstoll.lib.creating.iterable.contains.searchbehaviours.* - - -class SearchBehaviourFactoryImpl : SearchBehaviourFactory { - - override fun > inAnyOrder( - builder: IterableContains.Builder - ): IterableContains.Builder = _containsInAnyOrder(builder) - - override fun > inAnyOrderOnly( - builder: IterableContains.Builder - ): IterableContains.Builder = _containsInAnyOrderOnly(builder) - - override fun > inOrder( - builder: IterableContains.Builder - ): IterableContains.Builder = _containsInOrder(builder) - - override fun > inOrderOnly( - builder: IterableContains.Builder - ): IterableContains.Builder = _containsInOrderOnly(builder) - - override fun > inOrderOnlyGrouped( - builder: IterableContains.Builder - ): IterableContains.Builder = _containsInOrderOnlyGrouped(builder) - - override fun > inOrderOnlyGroupedWithin( - builder: IterableContains.Builder - ): IterableContains.Builder = - _containsInOrderOnlyGroupedWithing(builder) -} diff --git a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/throwable/thrown/creators/ThrowableThrownAssertionsImpl.kt b/misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/throwable/thrown/creators/ThrowableThrownAssertionsImpl.kt deleted file mode 100644 index 0a1a8a4ba..000000000 --- a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/throwable/thrown/creators/ThrowableThrownAssertionsImpl.kt +++ /dev/null @@ -1,25 +0,0 @@ -@file:Suppress("DEPRECATION" /* will be remove with 1.0.0 */) -package ch.tutteli.atrium.domain.robstoll.creating.throwable.thrown.creators - -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.domain.creating.throwable.thrown.ThrowableThrown -import ch.tutteli.atrium.domain.creating.throwable.thrown.creators.ThrowableThrownAssertions -import ch.tutteli.atrium.domain.robstoll.lib.creating.throwable.thrown.creators._nothingThrown -import ch.tutteli.atrium.domain.robstoll.lib.creating.throwable.thrown.creators._toBe -import kotlin.reflect.KClass - -@Deprecated("Use Fun0Assertions instead; will be removed with 1.0.0") -class ThrowableThrownAssertionsImpl : ThrowableThrownAssertions { - - override fun toBe( - throwableThrownBuilder: ThrowableThrown.Builder, - expectedType: KClass, - assertionCreator: AssertionPlant.() -> Unit - ) { - _toBe(throwableThrownBuilder, expectedType, assertionCreator) - } - - override fun nothingThrown(throwableThrownBuilder: ThrowableThrown.Builder) { - _nothingThrown(throwableThrownBuilder) - } -} diff --git a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/throwable/thrown/providers/AbsentThrowableMessageProviderFactoryImpl.kt b/misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/throwable/thrown/providers/AbsentThrowableMessageProviderFactoryImpl.kt deleted file mode 100644 index 73b47e36e..000000000 --- a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/throwable/thrown/providers/AbsentThrowableMessageProviderFactoryImpl.kt +++ /dev/null @@ -1,15 +0,0 @@ -@file:Suppress("DEPRECATION" /* will be remove with 1.0.0 */) - -package ch.tutteli.atrium.domain.robstoll.creating.throwable.thrown.providers - -import ch.tutteli.atrium.domain.creating.throwable.thrown.ThrowableThrown -import ch.tutteli.atrium.domain.creating.throwable.thrown.providers.AbsentThrowableMessageProviderFactory -import ch.tutteli.atrium.domain.robstoll.lib.creating.throwable.thrown.providers._translatableBased -import ch.tutteli.atrium.reporting.translating.Translatable - -@Deprecated("Will be removed with 1.0.0") -class AbsentThrowableMessageProviderFactoryImpl : AbsentThrowableMessageProviderFactory { - - override fun translatableBased(translatable: Translatable): ThrowableThrown.AbsentThrowableMessageProvider = - _translatableBased(translatable) -} diff --git a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-js/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/FloatingPointAssertionsImpl.kt b/misc/deprecated/domain/robstoll/atrium-domain-robstoll-js/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/FloatingPointAssertionsImpl.kt deleted file mode 100644 index 467ef0ef7..000000000 --- a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-js/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/FloatingPointAssertionsImpl.kt +++ /dev/null @@ -1,24 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.domain.robstoll.creating - -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.domain.creating.FloatingPointAssertions -import ch.tutteli.atrium.domain.robstoll.lib.creating._toBeWithErrorTolerance - -@Deprecated("Will be removed with 1.0.0") -class FloatingPointAssertionsImpl : FloatingPointAssertions { - - override fun toBeWithErrorTolerance( - subjectProvider: SubjectProvider, - expected: Float, - tolerance: Float - ) = _toBeWithErrorTolerance(subjectProvider, expected, tolerance) - - override fun toBeWithErrorTolerance( - subjectProvider: SubjectProvider, - expected: Double, - tolerance: Double - ) = _toBeWithErrorTolerance(subjectProvider, expected, tolerance) -} diff --git a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-js/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/registerServices.kt b/misc/deprecated/domain/robstoll/atrium-domain-robstoll-js/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/registerServices.kt index a08ed9528..1b5636fc7 100644 --- a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-js/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/registerServices.kt +++ b/misc/deprecated/domain/robstoll/atrium-domain-robstoll-js/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/registerServices.kt @@ -7,36 +7,5 @@ import ch.tutteli.atrium.core.polyfills.registerService @Suppress("unused" /* here in order that the code is executed when module is loaded */) private val register = run { - registerService { ch.tutteli.atrium.domain.robstoll.assertions.composers.AssertionComposerImpl() } - registerService { ch.tutteli.atrium.domain.robstoll.creating.AnyAssertionsImpl() } - registerService { ch.tutteli.atrium.domain.robstoll.creating.CharSequenceAssertionsImpl() } - registerService { ch.tutteli.atrium.domain.robstoll.creating.CollectionAssertionsImpl() } - registerService { ch.tutteli.atrium.domain.robstoll.creating.ComparableAssertionsImpl() } - registerService { ch.tutteli.atrium.domain.robstoll.creating.FeatureAssertionsImpl() } - registerService { ch.tutteli.atrium.domain.robstoll.creating.FloatingPointAssertionsImpl() } - registerService { ch.tutteli.atrium.domain.robstoll.creating.Fun0AssertionsImpl() } - registerService { ch.tutteli.atrium.domain.robstoll.creating.IterableAssertionsImpl() } - registerService { ch.tutteli.atrium.domain.robstoll.creating.IteratorAssertionsImpl() } - registerService { ch.tutteli.atrium.domain.robstoll.creating.ListAssertionsImpl() } - registerService { ch.tutteli.atrium.domain.robstoll.creating.MapAssertionsImpl() } - registerService { ch.tutteli.atrium.domain.robstoll.creating.MapEntryAssertionsImpl() } - registerService { ch.tutteli.atrium.domain.robstoll.creating.NewFeatureAssertionsImpl() } - registerService { ch.tutteli.atrium.domain.robstoll.creating.PairAssertionsImpl() } - registerService { ch.tutteli.atrium.domain.robstoll.creating.ThrowableAssertionsImpl() } - registerService { ch.tutteli.atrium.domain.robstoll.creating.any.typetransformation.creators.AnyTypeTransformationAssertionsImpl() } - registerService { ch.tutteli.atrium.domain.robstoll.creating.any.typetransformation.failurehandlers.FailureHandlerFactoryImpl() } - registerService { ch.tutteli.atrium.domain.robstoll.creating.changers.FeatureExtractorImpl() } - registerService { ch.tutteli.atrium.domain.robstoll.creating.changers.SubjectChangerImpl() } - registerService { ch.tutteli.atrium.domain.robstoll.creating.charsequence.contains.checkers.CheckerFactoryImpl() } - registerService { ch.tutteli.atrium.domain.robstoll.creating.charsequence.contains.creators.CharSequenceContainsAssertionsImpl() } - registerService { ch.tutteli.atrium.domain.robstoll.creating.charsequence.contains.searchbehaviours.SearchBehaviourFactoryImpl() } registerService { ch.tutteli.atrium.domain.robstoll.creating.collectors.AssertionCollectorImpl() } - registerService { ch.tutteli.atrium.domain.robstoll.creating.collectors.NonThrowingAssertionCollectorForExplanationImpl() } - registerService { ch.tutteli.atrium.domain.robstoll.creating.collectors.ThrowingAssertionCollectorForExplanationImpl() } - registerService { ch.tutteli.atrium.domain.robstoll.creating.feature.extract.creators.FeatureExtractorCreatorFactoryImpl() } - registerService { ch.tutteli.atrium.domain.robstoll.creating.iterable.contains.checkers.CheckerFactoryImpl() } - registerService { ch.tutteli.atrium.domain.robstoll.creating.iterable.contains.creators.IterableContainsAssertionsImpl() } - registerService { ch.tutteli.atrium.domain.robstoll.creating.iterable.contains.searchbehaviours.SearchBehaviourFactoryImpl() } - registerService { ch.tutteli.atrium.domain.robstoll.creating.throwable.thrown.creators.ThrowableThrownAssertionsImpl() } - registerService { ch.tutteli.atrium.domain.robstoll.creating.throwable.thrown.providers.AbsentThrowableMessageProviderFactoryImpl() } } diff --git a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/BigDecimalAssertionsImpl.kt b/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/BigDecimalAssertionsImpl.kt deleted file mode 100644 index 977b2b834..000000000 --- a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/BigDecimalAssertionsImpl.kt +++ /dev/null @@ -1,35 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress( - "DEPRECATION", - /* TODO remove once https://youtrack.jetbrains.com/issue/KT-35343 is fixed */ - "JAVA_MODULE_DOES_NOT_READ_UNNAMED_MODULE" -) - -package ch.tutteli.atrium.domain.robstoll.creating - -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.domain.creating.BigDecimalAssertions -import ch.tutteli.atrium.domain.robstoll.lib.creating._isEqualIncludingScale -import ch.tutteli.atrium.domain.robstoll.lib.creating._isNotEqualIncludingScale -import ch.tutteli.atrium.domain.robstoll.lib.creating._isNotNumericallyEqualTo -import ch.tutteli.atrium.domain.robstoll.lib.creating._isNumericallyEqualTo -import java.math.BigDecimal - -@Deprecated("Will be removed with 1.0.0") -class BigDecimalAssertionsImpl : BigDecimalAssertions { - - override fun isNumericallyEqualTo(subjectProvider: SubjectProvider, expected: T) = - _isNumericallyEqualTo(subjectProvider, expected) - - override fun isNotNumericallyEqualTo(subjectProvider: SubjectProvider, expected: T) = - _isNotNumericallyEqualTo(subjectProvider, expected) - - override fun isEqualIncludingScale( - subjectProvider: SubjectProvider, - expected: T, - nameOfIsNumericallyEqualTo: String - ) = _isEqualIncludingScale(subjectProvider, expected, nameOfIsNumericallyEqualTo) - - override fun isNotEqualIncludingScale(subjectProvider: SubjectProvider, expected: T) = - _isNotEqualIncludingScale(subjectProvider, expected) -} diff --git a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/ChronoLocalDateAssertionsImpl.kt b/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/ChronoLocalDateAssertionsImpl.kt deleted file mode 100644 index a7272195f..000000000 --- a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/ChronoLocalDateAssertionsImpl.kt +++ /dev/null @@ -1,33 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress( - "DEPRECATION", - /* TODO remove once https://youtrack.jetbrains.com/issue/KT-35343 is fixed */ - "JAVA_MODULE_DOES_NOT_READ_UNNAMED_MODULE" -) - -package ch.tutteli.atrium.domain.robstoll.creating - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.domain.creating.ChronoLocalDateAssertions -import ch.tutteli.atrium.domain.robstoll.lib.creating.* -import java.time.chrono.ChronoLocalDate - -@Deprecated("Will be removed with 1.0.0") -class ChronoLocalDateAssertionsImpl : ChronoLocalDateAssertions { - - override fun isBefore(expect: Expect, expected: ChronoLocalDate): Assertion = - _isBefore(expect, expected) - - override fun isBeforeOrEquals(expect: Expect, expected: ChronoLocalDate): Assertion = - _isBeforeOrEquals(expect, expected) - - override fun isAfter(expect: Expect, expected: ChronoLocalDate): Assertion = - _isAfter(expect, expected) - - override fun isAfterOrEquals(expect: Expect, expected: ChronoLocalDate): Assertion = - _isAfterOrEquals(expect, expected) - - override fun isEqual(expect: Expect, expected: ChronoLocalDate): Assertion = - _isEqual(expect, expected) -} diff --git a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/ChronoLocalDateTimeAssertionsImpl.kt b/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/ChronoLocalDateTimeAssertionsImpl.kt deleted file mode 100644 index 32a58acc8..000000000 --- a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/ChronoLocalDateTimeAssertionsImpl.kt +++ /dev/null @@ -1,44 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress( - "DEPRECATION", - /* TODO remove once https://youtrack.jetbrains.com/issue/KT-35343 is fixed */ - "JAVA_MODULE_DOES_NOT_READ_UNNAMED_MODULE" -) - -package ch.tutteli.atrium.domain.robstoll.creating - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.domain.creating.ChronoLocalDateTimeAssertions -import ch.tutteli.atrium.domain.robstoll.lib.creating.* -import java.time.chrono.ChronoLocalDate -import java.time.chrono.ChronoLocalDateTime - -@Deprecated("Will be removed with 1.0.0") -class ChronoLocalDateTimeAssertionsImpl : ChronoLocalDateTimeAssertions { - - override fun > isBefore( - expect: Expect, - expected: ChronoLocalDateTime<*> - ): Assertion = _isBefore(expect, expected) - - override fun > isBeforeOrEquals( - expect: Expect, - expected: ChronoLocalDateTime<*> - ): Assertion = _isBeforeOrEquals(expect, expected) - - override fun > isAfter( - expect: Expect, - expected: ChronoLocalDateTime<*> - ): Assertion = _isAfter(expect, expected) - - override fun > isAfterOrEquals( - expect: Expect, - expected: ChronoLocalDateTime<*> - ): Assertion = _isAfterOrEquals(expect, expected) - - override fun > isEqual( - expect: Expect, - expected: ChronoLocalDateTime<*> - ): Assertion = _isEqual(expect, expected) -} diff --git a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/ChronoZonedDateTimeAssertionsImpl.kt b/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/ChronoZonedDateTimeAssertionsImpl.kt deleted file mode 100644 index 00d2ba5a9..000000000 --- a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/ChronoZonedDateTimeAssertionsImpl.kt +++ /dev/null @@ -1,43 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress( - "DEPRECATION", - /* TODO remove once https://youtrack.jetbrains.com/issue/KT-35343 is fixed */ - "JAVA_MODULE_DOES_NOT_READ_UNNAMED_MODULE" -) - -package ch.tutteli.atrium.domain.robstoll.creating - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.domain.creating.ChronoZonedDateTimeAssertions -import ch.tutteli.atrium.domain.robstoll.lib.creating.* -import java.time.chrono.ChronoZonedDateTime - -@Deprecated("Will be removed with 1.0.0") -class ChronoZonedDateTimeAssertionsImpl : ChronoZonedDateTimeAssertions { - - override fun > isBefore( - expect: Expect, - expected: ChronoZonedDateTime<*> - ): Assertion = _isBefore(expect, expected) - - override fun > isBeforeOrEqual( - expect: Expect, - expected: ChronoZonedDateTime<*> - ): Assertion = _isBeforeOrEquals(expect, expected) - - override fun > isAfter( - expect: Expect, - expected: ChronoZonedDateTime<*> - ): Assertion = _isAfter(expect, expected) - - override fun > isAfterOrEqual( - expect: Expect, - expected: ChronoZonedDateTime<*> - ): Assertion = _isAfterOrEquals(expect, expected) - - override fun > isEqual( - expect: Expect, - expected: ChronoZonedDateTime<*> - ): Assertion = _isEqual(expect, expected) -} diff --git a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/FloatingPointAssertionsImpl.kt b/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/FloatingPointAssertionsImpl.kt deleted file mode 100644 index d429583ba..000000000 --- a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/FloatingPointAssertionsImpl.kt +++ /dev/null @@ -1,36 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress( - "DEPRECATION", - /* TODO remove once https://youtrack.jetbrains.com/issue/KT-35343 is fixed */ - "JAVA_MODULE_DOES_NOT_READ_UNNAMED_MODULE" -) - -package ch.tutteli.atrium.domain.robstoll.creating - -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.domain.creating.FloatingPointAssertions -import ch.tutteli.atrium.domain.robstoll.lib.creating._toBeWithErrorTolerance -import java.math.BigDecimal - - -@Deprecated("Will be removed with 1.0.0") -class FloatingPointAssertionsImpl : FloatingPointAssertions { - - override fun toBeWithErrorTolerance( - subjectProvider: SubjectProvider, - expected: Float, - tolerance: Float - ) = _toBeWithErrorTolerance(subjectProvider, expected, tolerance) - - override fun toBeWithErrorTolerance( - subjectProvider: SubjectProvider, - expected: Double, - tolerance: Double - ) = _toBeWithErrorTolerance(subjectProvider, expected, tolerance) - - override fun toBeWithErrorTolerance( - subjectProvider: SubjectProvider, - expected: T, - tolerance: T - ) = _toBeWithErrorTolerance(subjectProvider, expected, tolerance) -} diff --git a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/LocalDateAssertionsImpl.kt b/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/LocalDateAssertionsImpl.kt deleted file mode 100644 index f1b66b2d4..000000000 --- a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/LocalDateAssertionsImpl.kt +++ /dev/null @@ -1,27 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress( - "DEPRECATION", - /* TODO remove once https://youtrack.jetbrains.com/issue/KT-35343 is fixed */ - "JAVA_MODULE_DOES_NOT_READ_UNNAMED_MODULE" -) - -package ch.tutteli.atrium.domain.robstoll.creating - -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.domain.creating.LocalDateAssertions -import ch.tutteli.atrium.domain.robstoll.lib.creating._day -import ch.tutteli.atrium.domain.robstoll.lib.creating._dayOfWeek -import ch.tutteli.atrium.domain.robstoll.lib.creating._month -import ch.tutteli.atrium.domain.robstoll.lib.creating._year -import java.time.LocalDate - -@Deprecated("Will be removed with 1.0.0") -class LocalDateAssertionsImpl : LocalDateAssertions { - override fun year(expect: Expect) = _year(expect) - - override fun month(expect: Expect) = _month(expect) - - override fun day(expect: Expect) = _day(expect) - - override fun dayOfWeek(expect: Expect) = _dayOfWeek(expect) -} diff --git a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/LocalDateTimeAssertionsImpl.kt b/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/LocalDateTimeAssertionsImpl.kt deleted file mode 100644 index 67e20d34c..000000000 --- a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/LocalDateTimeAssertionsImpl.kt +++ /dev/null @@ -1,27 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress( - "DEPRECATION", - /* TODO remove once https://youtrack.jetbrains.com/issue/KT-35343 is fixed */ - "JAVA_MODULE_DOES_NOT_READ_UNNAMED_MODULE" -) - -package ch.tutteli.atrium.domain.robstoll.creating - -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.domain.creating.LocalDateTimeAssertions -import ch.tutteli.atrium.domain.robstoll.lib.creating._day -import ch.tutteli.atrium.domain.robstoll.lib.creating._dayOfWeek -import ch.tutteli.atrium.domain.robstoll.lib.creating._month -import ch.tutteli.atrium.domain.robstoll.lib.creating._year -import java.time.LocalDateTime - -@Deprecated("Will be removed with 1.0.0") -class LocalDateTimeAssertionsImpl : LocalDateTimeAssertions { - override fun year(expect: Expect) = _year(expect) - - override fun month(expect: Expect) = _month(expect) - - override fun day(expect: Expect) = _day(expect) - - override fun dayOfWeek(expect: Expect) = _dayOfWeek(expect) -} diff --git a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/OptionalAssertionsImpl.kt b/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/OptionalAssertionsImpl.kt deleted file mode 100644 index 477c10c23..000000000 --- a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/OptionalAssertionsImpl.kt +++ /dev/null @@ -1,22 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress( - "DEPRECATION", - /* TODO remove once https://youtrack.jetbrains.com/issue/KT-35343 is fixed */ - "JAVA_MODULE_DOES_NOT_READ_UNNAMED_MODULE" -) - -package ch.tutteli.atrium.domain.robstoll.creating - -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.domain.creating.OptionalAssertions -import ch.tutteli.atrium.domain.creating.changers.ExtractedFeaturePostStep -import ch.tutteli.atrium.domain.robstoll.lib.creating._isEmpty -import ch.tutteli.atrium.domain.robstoll.lib.creating._isPresent -import java.util.* - -@Deprecated("Will be removed with 1.0.0") -class OptionalAssertionsImpl : OptionalAssertions { - - override fun > isEmpty(expect: Expect) = _isEmpty(expect) - override fun > isPresent(expect: Expect): ExtractedFeaturePostStep = _isPresent(expect) -} diff --git a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/PathAssertionsImpl.kt b/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/PathAssertionsImpl.kt deleted file mode 100644 index cf842277c..000000000 --- a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/PathAssertionsImpl.kt +++ /dev/null @@ -1,52 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress( - "DEPRECATION", - /* TODO remove once https://youtrack.jetbrains.com/issue/KT-35343 is fixed */ - "JAVA_MODULE_DOES_NOT_READ_UNNAMED_MODULE" -) - -package ch.tutteli.atrium.domain.robstoll.creating - -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.domain.creating.PathAssertions -import ch.tutteli.atrium.domain.robstoll.lib.creating.* -import java.nio.charset.Charset -import java.nio.file.Path - -@Deprecated("Will be removed with 1.0.0") -class PathAssertionsImpl : PathAssertions { - override fun startsWith(expect: Expect, expected: Path) = - _startsWith(expect, expected) - - override fun startsNotWith(expect: Expect, expected: Path) = - _startsNotWith(expect, expected) - - override fun endsWith(expect: Expect, expected: Path) = - _endsWith(expect, expected) - - override fun endsNotWith(expect: Expect, expected: Path) = - _endsNotWith(expect, expected) - - override fun exists(expect: Expect) = _exists(expect) - - override fun existsNot(expect: Expect) = _existsNot(expect) - - override fun fileName(expect: Expect) = _fileName(expect) - override fun extension(expect: Expect) = _extension(expect) - override fun fileNameWithoutExtension(expect: Expect) = - _fileNameWithoutExtension(expect) - - override fun parent(expect: Expect) = _parent(expect) - override fun resolve(expect: Expect, other: String) = _resolve(expect, other) - - override fun isReadable(expect: Expect) = _isReadable(expect) - override fun isWritable(expect: Expect) = _isWritable(expect) - override fun isRegularFile(expect: Expect) = _isRegularFile(expect) - override fun isDirectory(expect: Expect) = _isDirectory(expect) - - override fun hasSameTextualContentAs(expect: Expect, targetPath: Path, sourceCharset: Charset, targetCharset: Charset) = - _hasSameTextualContentAs(expect, targetPath, sourceCharset, targetCharset) - - override fun hasSameBinaryContentAs(expect: Expect, targetPath: Path) = - _hasSameBinaryContentAs(expect, targetPath) -} diff --git a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/ZonedDateTimeAssertionsImpl.kt b/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/ZonedDateTimeAssertionsImpl.kt deleted file mode 100644 index e51baa3da..000000000 --- a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/kotlin/ch/tutteli/atrium/domain/robstoll/creating/ZonedDateTimeAssertionsImpl.kt +++ /dev/null @@ -1,27 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress( - "DEPRECATION", - /* TODO remove once https://youtrack.jetbrains.com/issue/KT-35343 is fixed */ - "JAVA_MODULE_DOES_NOT_READ_UNNAMED_MODULE" -) - -package ch.tutteli.atrium.domain.robstoll.creating - -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.domain.creating.ZonedDateTimeAssertions -import ch.tutteli.atrium.domain.robstoll.lib.creating._day -import ch.tutteli.atrium.domain.robstoll.lib.creating._dayOfWeek -import ch.tutteli.atrium.domain.robstoll.lib.creating._month -import ch.tutteli.atrium.domain.robstoll.lib.creating._year -import java.time.ZonedDateTime - -@Deprecated("Will be removed with 1.0.0") -class ZonedDateTimeAssertionsImpl : ZonedDateTimeAssertions { - override fun year(expect: Expect) = _year(expect) - - override fun month(expect: Expect) = _month(expect) - - override fun day(expect: Expect) = _day(expect) - - override fun dayOfWeek(expect: Expect) = _dayOfWeek(expect) -} diff --git a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.assertions.composers.AssertionComposer b/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.assertions.composers.AssertionComposer deleted file mode 100644 index 0d8fad683..000000000 --- a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.assertions.composers.AssertionComposer +++ /dev/null @@ -1 +0,0 @@ -ch.tutteli.atrium.domain.robstoll.assertions.composers.AssertionComposerImpl diff --git a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.AnyAssertions b/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.AnyAssertions deleted file mode 100644 index 884be118b..000000000 --- a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.AnyAssertions +++ /dev/null @@ -1 +0,0 @@ -ch.tutteli.atrium.domain.robstoll.creating.AnyAssertionsImpl diff --git a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.BigDecimalAssertions b/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.BigDecimalAssertions deleted file mode 100644 index 9b4f73869..000000000 --- a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.BigDecimalAssertions +++ /dev/null @@ -1 +0,0 @@ -ch.tutteli.atrium.domain.robstoll.creating.BigDecimalAssertionsImpl diff --git a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.CharSequenceAssertions b/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.CharSequenceAssertions deleted file mode 100644 index 51ef07639..000000000 --- a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.CharSequenceAssertions +++ /dev/null @@ -1 +0,0 @@ -ch.tutteli.atrium.domain.robstoll.creating.CharSequenceAssertionsImpl diff --git a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.ChronoLocalDateAssertions b/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.ChronoLocalDateAssertions deleted file mode 100644 index 7aaf4632c..000000000 --- a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.ChronoLocalDateAssertions +++ /dev/null @@ -1 +0,0 @@ -ch.tutteli.atrium.domain.robstoll.creating.ChronoLocalDateAssertionsImpl diff --git a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.ChronoLocalDateTimeAssertions b/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.ChronoLocalDateTimeAssertions deleted file mode 100644 index a56d5436c..000000000 --- a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.ChronoLocalDateTimeAssertions +++ /dev/null @@ -1 +0,0 @@ -ch.tutteli.atrium.domain.robstoll.creating.ChronoLocalDateTimeAssertionsImpl diff --git a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.ChronoZonedDateTimeAssertions b/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.ChronoZonedDateTimeAssertions deleted file mode 100644 index 0d1d0488a..000000000 --- a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.ChronoZonedDateTimeAssertions +++ /dev/null @@ -1 +0,0 @@ -ch.tutteli.atrium.domain.robstoll.creating.ChronoZonedDateTimeAssertionsImpl diff --git a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.CollectionAssertions b/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.CollectionAssertions deleted file mode 100644 index a5f4a4e35..000000000 --- a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.CollectionAssertions +++ /dev/null @@ -1 +0,0 @@ -ch.tutteli.atrium.domain.robstoll.creating.CollectionAssertionsImpl diff --git a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.ComparableAssertions b/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.ComparableAssertions deleted file mode 100644 index 38ecba0ec..000000000 --- a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.ComparableAssertions +++ /dev/null @@ -1 +0,0 @@ -ch.tutteli.atrium.domain.robstoll.creating.ComparableAssertionsImpl diff --git a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.FeatureAssertions b/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.FeatureAssertions deleted file mode 100644 index ddf9e11d9..000000000 --- a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.FeatureAssertions +++ /dev/null @@ -1 +0,0 @@ -ch.tutteli.atrium.domain.robstoll.creating.FeatureAssertionsImpl diff --git a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.FloatingPointAssertions b/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.FloatingPointAssertions deleted file mode 100644 index 5175c047a..000000000 --- a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.FloatingPointAssertions +++ /dev/null @@ -1 +0,0 @@ -ch.tutteli.atrium.domain.robstoll.creating.FloatingPointAssertionsImpl diff --git a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.Fun0Assertions b/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.Fun0Assertions deleted file mode 100644 index 827dc57b2..000000000 --- a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.Fun0Assertions +++ /dev/null @@ -1 +0,0 @@ -ch.tutteli.atrium.domain.robstoll.creating.Fun0AssertionsImpl diff --git a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.IterableAssertions b/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.IterableAssertions deleted file mode 100644 index 719c56b49..000000000 --- a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.IterableAssertions +++ /dev/null @@ -1 +0,0 @@ -ch.tutteli.atrium.domain.robstoll.creating.IterableAssertionsImpl diff --git a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.IteratorAssertions b/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.IteratorAssertions deleted file mode 100644 index 61daa307f..000000000 --- a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.IteratorAssertions +++ /dev/null @@ -1 +0,0 @@ -ch.tutteli.atrium.domain.robstoll.creating.IteratorAssertionsImpl diff --git a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.ListAssertions b/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.ListAssertions deleted file mode 100644 index 338ba6ffa..000000000 --- a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.ListAssertions +++ /dev/null @@ -1 +0,0 @@ -ch.tutteli.atrium.domain.robstoll.creating.ListAssertionsImpl diff --git a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.LocalDateAssertions b/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.LocalDateAssertions deleted file mode 100644 index 716487ba8..000000000 --- a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.LocalDateAssertions +++ /dev/null @@ -1 +0,0 @@ -ch.tutteli.atrium.domain.robstoll.creating.LocalDateAssertionsImpl diff --git a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.LocalDateTimeAssertions b/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.LocalDateTimeAssertions deleted file mode 100644 index ad656c5d8..000000000 --- a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.LocalDateTimeAssertions +++ /dev/null @@ -1 +0,0 @@ -ch.tutteli.atrium.domain.robstoll.creating.LocalDateTimeAssertionsImpl diff --git a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.MapAssertions b/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.MapAssertions deleted file mode 100644 index f5644691c..000000000 --- a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.MapAssertions +++ /dev/null @@ -1 +0,0 @@ -ch.tutteli.atrium.domain.robstoll.creating.MapAssertionsImpl diff --git a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.MapEntryAssertions b/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.MapEntryAssertions deleted file mode 100644 index 5ad0f7395..000000000 --- a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.MapEntryAssertions +++ /dev/null @@ -1 +0,0 @@ -ch.tutteli.atrium.domain.robstoll.creating.MapEntryAssertionsImpl diff --git a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.NewFeatureAssertions b/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.NewFeatureAssertions deleted file mode 100644 index 2e47ccedd..000000000 --- a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.NewFeatureAssertions +++ /dev/null @@ -1 +0,0 @@ -ch.tutteli.atrium.domain.robstoll.creating.NewFeatureAssertionsImpl diff --git a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.OptionalAssertions b/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.OptionalAssertions deleted file mode 100644 index da8401067..000000000 --- a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.OptionalAssertions +++ /dev/null @@ -1 +0,0 @@ -ch.tutteli.atrium.domain.robstoll.creating.OptionalAssertionsImpl diff --git a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.PairAssertions b/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.PairAssertions deleted file mode 100644 index fc9ecd7fa..000000000 --- a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.PairAssertions +++ /dev/null @@ -1 +0,0 @@ -ch.tutteli.atrium.domain.robstoll.creating.PairAssertionsImpl diff --git a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.PathAssertions b/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.PathAssertions deleted file mode 100644 index 1586fd7b7..000000000 --- a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.PathAssertions +++ /dev/null @@ -1 +0,0 @@ -ch.tutteli.atrium.domain.robstoll.creating.PathAssertionsImpl diff --git a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.ThrowableAssertions b/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.ThrowableAssertions deleted file mode 100644 index f0058c346..000000000 --- a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.ThrowableAssertions +++ /dev/null @@ -1 +0,0 @@ -ch.tutteli.atrium.domain.robstoll.creating.ThrowableAssertionsImpl diff --git a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.ZonedDateTimeAssertions b/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.ZonedDateTimeAssertions deleted file mode 100644 index f989cd313..000000000 --- a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.ZonedDateTimeAssertions +++ /dev/null @@ -1 +0,0 @@ -ch.tutteli.atrium.domain.robstoll.creating.ZonedDateTimeAssertionsImpl diff --git a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.any.typetransformation.creators.AnyTypeTransformationAssertions b/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.any.typetransformation.creators.AnyTypeTransformationAssertions deleted file mode 100644 index bfa845de7..000000000 --- a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.any.typetransformation.creators.AnyTypeTransformationAssertions +++ /dev/null @@ -1 +0,0 @@ -ch.tutteli.atrium.domain.robstoll.creating.any.typetransformation.creators.AnyTypeTransformationAssertionsImpl diff --git a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.any.typetransformation.failurehandlers.FailureHandlerFactory b/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.any.typetransformation.failurehandlers.FailureHandlerFactory deleted file mode 100644 index 07687f48d..000000000 --- a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.any.typetransformation.failurehandlers.FailureHandlerFactory +++ /dev/null @@ -1 +0,0 @@ -ch.tutteli.atrium.domain.robstoll.creating.any.typetransformation.failurehandlers.FailureHandlerFactoryImpl diff --git a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.changers.FeatureExtractor b/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.changers.FeatureExtractor deleted file mode 100644 index e964267bb..000000000 --- a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.changers.FeatureExtractor +++ /dev/null @@ -1 +0,0 @@ -ch.tutteli.atrium.domain.robstoll.creating.changers.FeatureExtractorImpl diff --git a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.changers.SubjectChanger b/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.changers.SubjectChanger deleted file mode 100644 index 6ceb15ef1..000000000 --- a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.changers.SubjectChanger +++ /dev/null @@ -1 +0,0 @@ -ch.tutteli.atrium.domain.robstoll.creating.changers.SubjectChangerImpl diff --git a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.charsequence.contains.checkers.CheckerFactory b/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.charsequence.contains.checkers.CheckerFactory deleted file mode 100644 index 31972028f..000000000 --- a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.charsequence.contains.checkers.CheckerFactory +++ /dev/null @@ -1 +0,0 @@ -ch.tutteli.atrium.domain.robstoll.creating.charsequence.contains.checkers.CheckerFactoryImpl diff --git a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.charsequence.contains.creators.CharSequenceContainsAssertions b/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.charsequence.contains.creators.CharSequenceContainsAssertions deleted file mode 100644 index 4cf843f39..000000000 --- a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.charsequence.contains.creators.CharSequenceContainsAssertions +++ /dev/null @@ -1 +0,0 @@ -ch.tutteli.atrium.domain.robstoll.creating.charsequence.contains.creators.CharSequenceContainsAssertionsImpl diff --git a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.charsequence.contains.searchbehaviours.SearchBehaviourFactory b/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.charsequence.contains.searchbehaviours.SearchBehaviourFactory deleted file mode 100644 index a28182ff2..000000000 --- a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.charsequence.contains.searchbehaviours.SearchBehaviourFactory +++ /dev/null @@ -1 +0,0 @@ -ch.tutteli.atrium.domain.robstoll.creating.charsequence.contains.searchbehaviours.SearchBehaviourFactoryImpl diff --git a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.collectors.NonThrowingAssertionCollectorForExplanation b/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.collectors.NonThrowingAssertionCollectorForExplanation deleted file mode 100644 index cf8dc101e..000000000 --- a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.collectors.NonThrowingAssertionCollectorForExplanation +++ /dev/null @@ -1 +0,0 @@ -ch.tutteli.atrium.domain.robstoll.creating.collectors.NonThrowingAssertionCollectorForExplanationImpl diff --git a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.collectors.ThrowingAssertionCollectorForExplanation b/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.collectors.ThrowingAssertionCollectorForExplanation deleted file mode 100644 index 14f2a91e4..000000000 --- a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.collectors.ThrowingAssertionCollectorForExplanation +++ /dev/null @@ -1 +0,0 @@ -ch.tutteli.atrium.domain.robstoll.creating.collectors.ThrowingAssertionCollectorForExplanationImpl diff --git a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.feature.extract.creators.FeatureExtractorCreatorFactory b/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.feature.extract.creators.FeatureExtractorCreatorFactory deleted file mode 100644 index 003ecfb84..000000000 --- a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.feature.extract.creators.FeatureExtractorCreatorFactory +++ /dev/null @@ -1 +0,0 @@ -ch.tutteli.atrium.domain.robstoll.creating.feature.extract.creators.FeatureExtractorCreatorFactoryImpl diff --git a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.iterable.contains.checkers.CheckerFactory b/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.iterable.contains.checkers.CheckerFactory deleted file mode 100644 index 4b2a92fdd..000000000 --- a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.iterable.contains.checkers.CheckerFactory +++ /dev/null @@ -1 +0,0 @@ -ch.tutteli.atrium.domain.robstoll.creating.iterable.contains.checkers.CheckerFactoryImpl diff --git a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.iterable.contains.creators.IterableContainsAssertions b/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.iterable.contains.creators.IterableContainsAssertions deleted file mode 100644 index bb1743757..000000000 --- a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.iterable.contains.creators.IterableContainsAssertions +++ /dev/null @@ -1 +0,0 @@ -ch.tutteli.atrium.domain.robstoll.creating.iterable.contains.creators.IterableContainsAssertionsImpl diff --git a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.SearchBehaviourFactory b/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.SearchBehaviourFactory deleted file mode 100644 index 9effd0c8a..000000000 --- a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.SearchBehaviourFactory +++ /dev/null @@ -1 +0,0 @@ -ch.tutteli.atrium.domain.robstoll.creating.iterable.contains.searchbehaviours.SearchBehaviourFactoryImpl diff --git a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.throwable.thrown.creators.ThrowableThrownAssertions b/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.throwable.thrown.creators.ThrowableThrownAssertions deleted file mode 100644 index b0e88b6e2..000000000 --- a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.throwable.thrown.creators.ThrowableThrownAssertions +++ /dev/null @@ -1 +0,0 @@ -ch.tutteli.atrium.domain.robstoll.creating.throwable.thrown.creators.ThrowableThrownAssertionsImpl diff --git a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.throwable.thrown.providers.AbsentThrowableMessageProviderFactory b/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.throwable.thrown.providers.AbsentThrowableMessageProviderFactory deleted file mode 100644 index 82086978f..000000000 --- a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.creating.throwable.thrown.providers.AbsentThrowableMessageProviderFactory +++ /dev/null @@ -1 +0,0 @@ -ch.tutteli.atrium.domain.robstoll.creating.throwable.thrown.providers.AbsentThrowableMessageProviderFactoryImpl diff --git a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/module/module-info.java b/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/module/module-info.java index 8eb9431c2..7d45a2946 100644 --- a/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/module/module-info.java +++ b/misc/deprecated/domain/robstoll/atrium-domain-robstoll-jvm/src/module/module-info.java @@ -3,99 +3,6 @@ module ch.tutteli.atrium.domain.robstoll { requires ch.tutteli.atrium.domain.robstoll.lib; requires kotlin.stdlib; - provides ch.tutteli.atrium.domain.assertions.composers.AssertionComposer - with ch.tutteli.atrium.domain.robstoll.assertions.composers.AssertionComposerImpl; - - provides ch.tutteli.atrium.domain.creating.any.typetransformation.creators.AnyTypeTransformationAssertions - with ch.tutteli.atrium.domain.robstoll.creating.any.typetransformation.creators.AnyTypeTransformationAssertionsImpl; - - provides ch.tutteli.atrium.domain.creating.any.typetransformation.failurehandlers.FailureHandlerFactory - with ch.tutteli.atrium.domain.robstoll.creating.any.typetransformation.failurehandlers.FailureHandlerFactoryImpl; - - provides ch.tutteli.atrium.domain.creating.changers.FeatureExtractor - with ch.tutteli.atrium.domain.robstoll.creating.changers.FeatureExtractorImpl; - - provides ch.tutteli.atrium.domain.creating.changers.SubjectChanger - with ch.tutteli.atrium.domain.robstoll.creating.changers.SubjectChangerImpl; - - provides ch.tutteli.atrium.domain.creating.AnyAssertions - with ch.tutteli.atrium.domain.robstoll.creating.AnyAssertionsImpl; - - provides ch.tutteli.atrium.domain.creating.BigDecimalAssertions - with ch.tutteli.atrium.domain.robstoll.creating.BigDecimalAssertionsImpl; - - provides ch.tutteli.atrium.domain.creating.charsequence.contains.checkers.CheckerFactory - with ch.tutteli.atrium.domain.robstoll.creating.charsequence.contains.checkers.CheckerFactoryImpl; - - provides ch.tutteli.atrium.domain.creating.charsequence.contains.creators.CharSequenceContainsAssertions - with ch.tutteli.atrium.domain.robstoll.creating.charsequence.contains.creators.CharSequenceContainsAssertionsImpl; - - provides ch.tutteli.atrium.domain.creating.charsequence.contains.searchbehaviours.SearchBehaviourFactory - with ch.tutteli.atrium.domain.robstoll.creating.charsequence.contains.searchbehaviours.SearchBehaviourFactoryImpl; - - provides ch.tutteli.atrium.domain.creating.CharSequenceAssertions - with ch.tutteli.atrium.domain.robstoll.creating.CharSequenceAssertionsImpl; - - provides ch.tutteli.atrium.domain.creating.CollectionAssertions - with ch.tutteli.atrium.domain.robstoll.creating.CollectionAssertionsImpl; - provides ch.tutteli.atrium.domain.creating.collectors.AssertionCollector with ch.tutteli.atrium.domain.robstoll.creating.collectors.AssertionCollectorImpl; - - provides ch.tutteli.atrium.domain.creating.collectors.NonThrowingAssertionCollectorForExplanation - with ch.tutteli.atrium.domain.robstoll.creating.collectors.NonThrowingAssertionCollectorForExplanationImpl; - - provides ch.tutteli.atrium.domain.creating.collectors.ThrowingAssertionCollectorForExplanation - with ch.tutteli.atrium.domain.robstoll.creating.collectors.ThrowingAssertionCollectorForExplanationImpl; - - provides ch.tutteli.atrium.domain.creating.ComparableAssertions - with ch.tutteli.atrium.domain.robstoll.creating.ComparableAssertionsImpl; - - provides ch.tutteli.atrium.domain.creating.FeatureAssertions - with ch.tutteli.atrium.domain.robstoll.creating.FeatureAssertionsImpl; - - provides ch.tutteli.atrium.domain.creating.Fun0Assertions - with ch.tutteli.atrium.domain.robstoll.creating.Fun0AssertionsImpl; - - provides ch.tutteli.atrium.domain.creating.feature.extract.creators.FeatureExtractorCreatorFactory - with ch.tutteli.atrium.domain.robstoll.creating.feature.extract.creators.FeatureExtractorCreatorFactoryImpl; - - provides ch.tutteli.atrium.domain.creating.FloatingPointAssertions - with ch.tutteli.atrium.domain.robstoll.creating.FloatingPointAssertionsImpl; - - provides ch.tutteli.atrium.domain.creating.iterable.contains.checkers.CheckerFactory - with ch.tutteli.atrium.domain.robstoll.creating.iterable.contains.checkers.CheckerFactoryImpl; - - provides ch.tutteli.atrium.domain.creating.iterable.contains.creators.IterableContainsAssertions - with ch.tutteli.atrium.domain.robstoll.creating.iterable.contains.creators.IterableContainsAssertionsImpl; - - provides ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours.SearchBehaviourFactory - with ch.tutteli.atrium.domain.robstoll.creating.iterable.contains.searchbehaviours.SearchBehaviourFactoryImpl; - - provides ch.tutteli.atrium.domain.creating.IterableAssertions - with ch.tutteli.atrium.domain.robstoll.creating.IterableAssertionsImpl; - - provides ch.tutteli.atrium.domain.creating.ListAssertions - with ch.tutteli.atrium.domain.robstoll.creating.ListAssertionsImpl; - - provides ch.tutteli.atrium.domain.creating.MapAssertions - with ch.tutteli.atrium.domain.robstoll.creating.MapAssertionsImpl; - - provides ch.tutteli.atrium.domain.creating.MapEntryAssertions - with ch.tutteli.atrium.domain.robstoll.creating.MapEntryAssertionsImpl; - - provides ch.tutteli.atrium.domain.creating.PairAssertions - with ch.tutteli.atrium.domain.robstoll.creating.PairAssertionsImpl; - - provides ch.tutteli.atrium.domain.creating.throwable.thrown.creators.ThrowableThrownAssertions - with ch.tutteli.atrium.domain.robstoll.creating.throwable.thrown.creators.ThrowableThrownAssertionsImpl; - - provides ch.tutteli.atrium.domain.creating.throwable.thrown.providers.AbsentThrowableMessageProviderFactory - with ch.tutteli.atrium.domain.robstoll.creating.throwable.thrown.providers.AbsentThrowableMessageProviderFactoryImpl; - - provides ch.tutteli.atrium.domain.creating.ThrowableAssertions - with ch.tutteli.atrium.domain.robstoll.creating.ThrowableAssertionsImpl; - - provides ch.tutteli.atrium.domain.creating.PathAssertions - with ch.tutteli.atrium.domain.robstoll.creating.PathAssertionsImpl; } diff --git a/misc/deprecated/domain/robstoll/extensions/kotlin_1_3/atrium-domain-robstoll-kotlin_1_3-common/build.gradle b/misc/deprecated/domain/robstoll/extensions/kotlin_1_3/atrium-domain-robstoll-kotlin_1_3-common/build.gradle deleted file mode 100644 index 968fcd73c..000000000 --- a/misc/deprecated/domain/robstoll/extensions/kotlin_1_3/atrium-domain-robstoll-kotlin_1_3-common/build.gradle +++ /dev/null @@ -1,7 +0,0 @@ -description = 'Kotlin 1.3 specific extension for domain-robstoll-common -- will be merged into domain-robstoll-common with 1.0.0' - -dependencies { - api prefixedProject('domain-robstoll-common') - api prefixedProject('domain-api-kotlin_1_3-common') - implementation prefixedProject('domain-robstoll-lib-kotlin_1_3-common') -} diff --git a/misc/deprecated/domain/robstoll/extensions/kotlin_1_3/atrium-domain-robstoll-kotlin_1_3-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll.kotlin_1_3/creating/ResultAssertionsImpl.kt b/misc/deprecated/domain/robstoll/extensions/kotlin_1_3/atrium-domain-robstoll-kotlin_1_3-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll.kotlin_1_3/creating/ResultAssertionsImpl.kt deleted file mode 100644 index 6a1263448..000000000 --- a/misc/deprecated/domain/robstoll/extensions/kotlin_1_3/atrium-domain-robstoll-kotlin_1_3-common/src/main/kotlin/ch/tutteli/atrium/domain/robstoll.kotlin_1_3/creating/ResultAssertionsImpl.kt +++ /dev/null @@ -1,18 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION") -package ch.tutteli.atrium.domain.robstoll.kotlin_1_3.creating - -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.domain.kotlin_1_3.creating.ResultAssertions -import ch.tutteli.atrium.domain.robstoll.lib.kotlin_1_3.creating._isFailure -import ch.tutteli.atrium.domain.robstoll.lib.kotlin_1_3.creating._isSuccess -import kotlin.reflect.KClass - -@Deprecated("Will be removed with 1.0.0") -class ResultAssertionsImpl : ResultAssertions { - override fun > isSuccess(expect: Expect) = - _isSuccess(expect) - - override fun isFailure(expect: Expect>, expectedType: KClass) = - _isFailure(expect, expectedType) -} diff --git a/misc/deprecated/domain/robstoll/extensions/kotlin_1_3/atrium-domain-robstoll-kotlin_1_3-js/build.gradle b/misc/deprecated/domain/robstoll/extensions/kotlin_1_3/atrium-domain-robstoll-kotlin_1_3-js/build.gradle deleted file mode 100644 index a00b21a76..000000000 --- a/misc/deprecated/domain/robstoll/extensions/kotlin_1_3/atrium-domain-robstoll-kotlin_1_3-js/build.gradle +++ /dev/null @@ -1,7 +0,0 @@ -description = 'Kotlin 1.3 specific extension for domain-robstoll-js -- will be merged into domain-robstoll-js with 1.0.0' - -dependencies { - api prefixedProject('domain-robstoll-js') - api prefixedProject('domain-api-kotlin_1_3-js') - implementation prefixedProject('domain-robstoll-lib-kotlin_1_3-js') -} diff --git a/misc/deprecated/domain/robstoll/extensions/kotlin_1_3/atrium-domain-robstoll-kotlin_1_3-js/src/main/kotlin/ch/tutteli/atrium/domain/kotlin_1_3/registerServices.kt b/misc/deprecated/domain/robstoll/extensions/kotlin_1_3/atrium-domain-robstoll-kotlin_1_3-js/src/main/kotlin/ch/tutteli/atrium/domain/kotlin_1_3/registerServices.kt deleted file mode 100644 index 8e837dce2..000000000 --- a/misc/deprecated/domain/robstoll/extensions/kotlin_1_3/atrium-domain-robstoll-kotlin_1_3-js/src/main/kotlin/ch/tutteli/atrium/domain/kotlin_1_3/registerServices.kt +++ /dev/null @@ -1,11 +0,0 @@ -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.domain.kotlin_1_3 - -import ch.tutteli.atrium.core.polyfills.registerService - -@Suppress("unused" /* here in order that the code is executed when module is loaded */) -private val register = run { - - registerService { ch.tutteli.atrium.domain.robstoll.kotlin_1_3.creating.ResultAssertionsImpl() } -} diff --git a/misc/deprecated/domain/robstoll/extensions/kotlin_1_3/atrium-domain-robstoll-kotlin_1_3-jvm/build.gradle b/misc/deprecated/domain/robstoll/extensions/kotlin_1_3/atrium-domain-robstoll-kotlin_1_3-jvm/build.gradle deleted file mode 100644 index afbbc1a24..000000000 --- a/misc/deprecated/domain/robstoll/extensions/kotlin_1_3/atrium-domain-robstoll-kotlin_1_3-jvm/build.gradle +++ /dev/null @@ -1,7 +0,0 @@ -description = 'Kotlin 1.3 specific extension for domain-robstoll-jvm -- will be merged into domain-robstoll-jvm with 1.0.0' - -dependencies { - api prefixedProject('domain-robstoll-jvm') - api prefixedProject('domain-api-kotlin_1_3-jvm') - implementation prefixedProject('domain-robstoll-lib-kotlin_1_3-jvm') -} diff --git a/misc/deprecated/domain/robstoll/extensions/kotlin_1_3/atrium-domain-robstoll-kotlin_1_3-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.kotlin_1_3.creating.ResultAssertions b/misc/deprecated/domain/robstoll/extensions/kotlin_1_3/atrium-domain-robstoll-kotlin_1_3-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.kotlin_1_3.creating.ResultAssertions deleted file mode 100644 index f22d0f132..000000000 --- a/misc/deprecated/domain/robstoll/extensions/kotlin_1_3/atrium-domain-robstoll-kotlin_1_3-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.domain.kotlin_1_3.creating.ResultAssertions +++ /dev/null @@ -1 +0,0 @@ -ch.tutteli.atrium.domain.robstoll.kotlin_1_3.creating.ResultAssertionsImpl diff --git a/misc/deprecated/domain/robstoll/extensions/kotlin_1_3/atrium-domain-robstoll-kotlin_1_3-jvm/src/module/module-info.java b/misc/deprecated/domain/robstoll/extensions/kotlin_1_3/atrium-domain-robstoll-kotlin_1_3-jvm/src/module/module-info.java deleted file mode 100644 index 46b0907a9..000000000 --- a/misc/deprecated/domain/robstoll/extensions/kotlin_1_3/atrium-domain-robstoll-kotlin_1_3-jvm/src/module/module-info.java +++ /dev/null @@ -1,8 +0,0 @@ -module ch.tutteli.atrium.domain.robstoll.kotlin_1_3 { - requires transitive ch.tutteli.atrium.domain.api.kotlin_1_3; - requires ch.tutteli.atrium.domain.robstoll.lib.kotlin_1_3; - requires kotlin.stdlib; - - provides ch.tutteli.atrium.domain.kotlin_1_3.creating.ResultAssertions - with ch.tutteli.atrium.domain.robstoll.kotlin_1_3.creating.ResultAssertionsImpl; -} diff --git a/misc/deprecated/translations/atrium-translations-de_CH-deprecated/build.gradle b/misc/deprecated/translations/atrium-translations-de_CH-deprecated/build.gradle deleted file mode 100644 index 5379ecead..000000000 --- a/misc/deprecated/translations/atrium-translations-de_CH-deprecated/build.gradle +++ /dev/null @@ -1,6 +0,0 @@ -description = "Deprecated translation project - use ${rootProject.name}-translations-de_CH-jvm instead." - -dependencies { - api prefixedProject('core-api-jvm') - implementation prefixedProject('translations-de_CH-jvm') -} diff --git a/misc/deprecated/translations/atrium-translations-de_CH-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/DescriptionAnyAssertion.kt b/misc/deprecated/translations/atrium-translations-de_CH-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/DescriptionAnyAssertion.kt deleted file mode 100644 index 48bacf3ca..000000000 --- a/misc/deprecated/translations/atrium-translations-de_CH-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/DescriptionAnyAssertion.kt +++ /dev/null @@ -1,19 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0*/) -package ch.tutteli.atrium.assertions - -import ch.tutteli.atrium.reporting.translating.StringBasedTranslatable -import ch.tutteli.atrium.translations.DescriptionBasic - -/** - * Contains the [DescriptiveAssertion.description]s of the assertion functions which are applicable to [Any]. - */ -@Deprecated( - "Use the description from package translations; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.translations.DescriptionAnyAssertion") -) -enum class DescriptionAnyAssertion(override val value: String) : StringBasedTranslatable { - TO_BE(DescriptionBasic.TO_BE.value), - NOT_TO_BE(DescriptionBasic.NOT_TO_BE.value), - IS_SAME(ch.tutteli.atrium.translations.DescriptionAnyAssertion.IS_SAME.value), - IS_NOT_SAME(ch.tutteli.atrium.translations.DescriptionAnyAssertion.IS_NOT_SAME.value), -} diff --git a/misc/deprecated/translations/atrium-translations-de_CH-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/DescriptionBasic.kt b/misc/deprecated/translations/atrium-translations-de_CH-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/DescriptionBasic.kt deleted file mode 100644 index c844166e1..000000000 --- a/misc/deprecated/translations/atrium-translations-de_CH-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/DescriptionBasic.kt +++ /dev/null @@ -1,17 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0*/) -package ch.tutteli.atrium.assertions - -import ch.tutteli.atrium.reporting.translating.StringBasedTranslatable - -/** - * Contains the [DescriptiveAssertion.description]s which are so basic that one does not want to use a different wording in - * a two different assertion functions. - */ -@Deprecated( - "Use the description from package translations; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.translations.DescriptionBasic") -) -enum class DescriptionBasic(override val value: String) : StringBasedTranslatable { - IS(ch.tutteli.atrium.translations.DescriptionBasic.IS.value), - IS_NOT(ch.tutteli.atrium.translations.DescriptionBasic.IS_NOT.value), -} diff --git a/misc/deprecated/translations/atrium-translations-de_CH-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/DescriptionBigDecimalAssertion.kt b/misc/deprecated/translations/atrium-translations-de_CH-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/DescriptionBigDecimalAssertion.kt deleted file mode 100644 index 349f259b6..000000000 --- a/misc/deprecated/translations/atrium-translations-de_CH-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/DescriptionBigDecimalAssertion.kt +++ /dev/null @@ -1,20 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0*/) -package ch.tutteli.atrium.assertions - -import ch.tutteli.atrium.reporting.translating.StringBasedTranslatable -import java.math.BigDecimal - -/** - * Contains the [DescriptiveAssertion.description]s of the assertion functions which are applicable to [BigDecimal]. - */ -@Deprecated( - "Use the description from package translations; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.translations.DescriptionBigDecimalAssertion") -) -enum class DescriptionBigDecimalAssertion(override val value: String) : StringBasedTranslatable { - FAILURE_TO_BE_BUT_NUMERICALLY_EQUAL(ch.tutteli.atrium.translations.DescriptionBigDecimalAssertion.FAILURE_IS_EQUAL_INCLUDING_SCALE_BUT_NUMERICALLY_EQUAL.value), - IS_EQUAL_INCLUDING_SCALE(ch.tutteli.atrium.translations.DescriptionBigDecimalAssertion.IS_EQUAL_INCLUDING_SCALE.value), - IS_NOT_EQUAL_INCLUDING_SCALE(ch.tutteli.atrium.translations.DescriptionBigDecimalAssertion.IS_NOT_EQUAL_INCLUDING_SCALE.value), - IS_NUMERICALLY_EQUAL_TO(ch.tutteli.atrium.translations.DescriptionBigDecimalAssertion.IS_NUMERICALLY_EQUAL_TO.value), - IS_NOT_NUMERICALLY_EQUAL_TO(ch.tutteli.atrium.translations.DescriptionBigDecimalAssertion.IS_NOT_NUMERICALLY_EQUAL_TO.value), -} diff --git a/misc/deprecated/translations/atrium-translations-de_CH-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/DescriptionCharSequenceAssertion.kt b/misc/deprecated/translations/atrium-translations-de_CH-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/DescriptionCharSequenceAssertion.kt deleted file mode 100644 index 5ffff69df..000000000 --- a/misc/deprecated/translations/atrium-translations-de_CH-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/DescriptionCharSequenceAssertion.kt +++ /dev/null @@ -1,26 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0*/) -package ch.tutteli.atrium.assertions - -import ch.tutteli.atrium.reporting.translating.StringBasedTranslatable - -/** - * Contains the [DescriptiveAssertion.description]s of the assertion functions which are applicable to [CharSequence]. - */ -@Deprecated( - "Use the description from package translations; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.translations.DescriptionCharSequenceAssertion") -) -enum class DescriptionCharSequenceAssertion(override val value: String) : StringBasedTranslatable { - AT_LEAST(ch.tutteli.atrium.translations.DescriptionCharSequenceAssertion.AT_LEAST.value), - AT_MOST(ch.tutteli.atrium.translations.DescriptionCharSequenceAssertion.AT_MOST.value), - CONTAINS(ch.tutteli.atrium.translations.DescriptionCharSequenceAssertion.CONTAINS.value), - CONTAINS_NOT(ch.tutteli.atrium.translations.DescriptionCharSequenceAssertion.CONTAINS_NOT.value), - EMPTY(ch.tutteli.atrium.translations.DescriptionCharSequenceAssertion.EMPTY.value), - ENDS_WITH(ch.tutteli.atrium.translations.DescriptionCharSequenceAssertion.ENDS_WITH.value), - ENDS_NOT_WITH(ch.tutteli.atrium.translations.DescriptionCharSequenceAssertion.ENDS_NOT_WITH.value), - EXACTLY(ch.tutteli.atrium.translations.DescriptionCharSequenceAssertion.EXACTLY.value), - IGNORING_CASE(ch.tutteli.atrium.translations.DescriptionCharSequenceAssertion.IGNORING_CASE.value), - NUMBER_OF_OCCURRENCES(ch.tutteli.atrium.translations.DescriptionCharSequenceAssertion.NUMBER_OF_OCCURRENCES.value), - STARTS_WITH(ch.tutteli.atrium.translations.DescriptionCharSequenceAssertion.STARTS_WITH.value), - STARTS_NOT_WITH(ch.tutteli.atrium.translations.DescriptionCharSequenceAssertion.STARTS_NOT_WITH.value), -} diff --git a/misc/deprecated/translations/atrium-translations-de_CH-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/DescriptionCollectionAssertion.kt b/misc/deprecated/translations/atrium-translations-de_CH-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/DescriptionCollectionAssertion.kt deleted file mode 100644 index fb9fe0cc2..000000000 --- a/misc/deprecated/translations/atrium-translations-de_CH-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/DescriptionCollectionAssertion.kt +++ /dev/null @@ -1,16 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0*/) -package ch.tutteli.atrium.assertions - -import ch.tutteli.atrium.reporting.translating.StringBasedTranslatable - -/** - * Contains the [DescriptiveAssertion.description]s of the assertion functions which are applicable to [Collection]. - */ -@Deprecated( - "Use the description from package translations; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.translations.DescriptionCollectionAssertion") -) -enum class DescriptionCollectionAssertion(override val value: String) : StringBasedTranslatable { - EMPTY(ch.tutteli.atrium.translations.DescriptionCollectionAssertion.EMPTY.value), - HAS_SIZE("hat die Grösse"), -} diff --git a/misc/deprecated/translations/atrium-translations-de_CH-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/DescriptionComparableAssertion.kt b/misc/deprecated/translations/atrium-translations-de_CH-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/DescriptionComparableAssertion.kt deleted file mode 100644 index e36a74c54..000000000 --- a/misc/deprecated/translations/atrium-translations-de_CH-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/DescriptionComparableAssertion.kt +++ /dev/null @@ -1,18 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0*/) -package ch.tutteli.atrium.assertions - -import ch.tutteli.atrium.reporting.translating.StringBasedTranslatable - -/** - * Contains the [DescriptiveAssertion.description]s of the assertion functions which are applicable to [Comparable]. - */ -@Deprecated( - "Use the description from package translations; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.translations.DescriptionComparableAssertion") -) -enum class DescriptionComparableAssertion(override val value: String) : StringBasedTranslatable { - IS_LESS_THAN(ch.tutteli.atrium.translations.DescriptionComparableAssertion.IS_LESS_THAN.value), - IS_LESS_OR_EQUALS(ch.tutteli.atrium.translations.DescriptionComparableAssertion.IS_LESS_THAN_OR_EQUAL.value), - IS_GREATER_THAN(ch.tutteli.atrium.translations.DescriptionComparableAssertion.IS_GREATER_THAN.value), - IS_GREATER_OR_EQUALS(ch.tutteli.atrium.translations.DescriptionComparableAssertion.IS_GREATER_THAN_OR_EQUAL.value), -} diff --git a/misc/deprecated/translations/atrium-translations-de_CH-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/DescriptionFloatingPointAssertion.kt b/misc/deprecated/translations/atrium-translations-de_CH-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/DescriptionFloatingPointAssertion.kt deleted file mode 100644 index c8b9b562d..000000000 --- a/misc/deprecated/translations/atrium-translations-de_CH-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/DescriptionFloatingPointAssertion.kt +++ /dev/null @@ -1,19 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0*/) -package ch.tutteli.atrium.assertions - -import ch.tutteli.atrium.reporting.translating.StringBasedTranslatable -import java.math.BigDecimal - -/** - * Contains the [DescriptiveAssertion.description]s of the assertion functions which are applicable to [Float], [Double] - * and [BigDecimal]. - */ -@Deprecated( - "Use the description from package translations; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.translations.DescriptionFloatingPointAssertion") -) -enum class DescriptionFloatingPointAssertion(override val value: String) : StringBasedTranslatable { - TO_BE_WITH_ERROR_TOLERANCE(ch.tutteli.atrium.translations.DescriptionFloatingPointAssertion.TO_BE_WITH_ERROR_TOLERANCE.value), - FAILURE_DUE_TO_FLOATING_POINT_NUMBER(ch.tutteli.atrium.translations.DescriptionFloatingPointAssertion.FAILURE_DUE_TO_FLOATING_POINT_NUMBER.value), - TO_BE_WITH_ERROR_TOLERANCE_EXPLAINED(ch.tutteli.atrium.translations.DescriptionFloatingPointAssertion.TO_BE_WITH_ERROR_TOLERANCE_EXPLAINED.value), -} diff --git a/misc/deprecated/translations/atrium-translations-de_CH-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/DescriptionIterableAssertion.kt b/misc/deprecated/translations/atrium-translations-de_CH-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/DescriptionIterableAssertion.kt deleted file mode 100644 index 51a4aa7de..000000000 --- a/misc/deprecated/translations/atrium-translations-de_CH-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/DescriptionIterableAssertion.kt +++ /dev/null @@ -1,33 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0*/) -package ch.tutteli.atrium.assertions - -import ch.tutteli.atrium.reporting.translating.StringBasedTranslatable - -/** - * Contains the [DescriptiveAssertion.description]s of the assertion functions which are applicable to [Iterable]. - */ -@Deprecated( - "Use the description from package translations; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.translations.DescriptionIterableAssertion") -) -enum class DescriptionIterableAssertion(override val value: String) : StringBasedTranslatable { - AN_ENTRY_WHICH(ch.tutteli.atrium.translations.DescriptionIterableAssertion.AN_ENTRY_WHICH.value), - AN_ENTRY_WHICH_IS(ch.tutteli.atrium.translations.DescriptionIterableAssertion.AN_ENTRY_WHICH_IS.value), - AT_LEAST(ch.tutteli.atrium.translations.DescriptionIterableAssertion.AT_LEAST.value), - AT_MOST(ch.tutteli.atrium.translations.DescriptionIterableAssertion.AT_MOST.value), - CONTAINS(ch.tutteli.atrium.translations.DescriptionIterableAssertion.CONTAINS.value), - CONTAINS_NOT(ch.tutteli.atrium.translations.DescriptionIterableAssertion.CONTAINS_NOT.value), - ENTRY_WITH_INDEX(ch.tutteli.atrium.translations.DescriptionIterableAssertion.ENTRY_WITH_INDEX.value), - EXACTLY(ch.tutteli.atrium.translations.DescriptionIterableAssertion.EXACTLY.value), - IN_ANY_ORDER(ch.tutteli.atrium.translations.DescriptionIterableAssertion.IN_ANY_ORDER.value), - IN_ANY_ORDER_ONLY(ch.tutteli.atrium.translations.DescriptionIterableAssertion.IN_ANY_ORDER_ONLY.value), - IN_ORDER(ch.tutteli.atrium.translations.DescriptionIterableAssertion.IN_ORDER.value), - IN_ORDER_ONLY(ch.tutteli.atrium.translations.DescriptionIterableAssertion.IN_ORDER_ONLY.value), - NUMBER_OF_OCCURRENCES(ch.tutteli.atrium.translations.DescriptionIterableAssertion.NUMBER_OF_OCCURRENCES.value), - SIZE_EXCEEDED(ch.tutteli.atrium.translations.DescriptionIterableAssertion.SIZE_EXCEEDED.value), - CANNOT_EVALUATE_SUBJECT_EMPTY_ITERABLE(ch.tutteli.atrium.translations.DescriptionIterableAssertion.CANNOT_EVALUATE_SUBJECT_EMPTY_ITERABLE.value), - CANNOT_EVALUATE_SUBJECT_ONLY_NULL(ch.tutteli.atrium.translations.DescriptionIterableAssertion.CANNOT_EVALUATE_SUBJECT_ONLY_NULL.value), - WARNING_ADDITIONAL_ENTRIES(ch.tutteli.atrium.translations.DescriptionIterableAssertion.WARNING_ADDITIONAL_ENTRIES.value), - WARNING_MISMATCHES(ch.tutteli.atrium.translations.DescriptionIterableAssertion.WARNING_MISMATCHES.value), - WARNING_MISMATCHES_ADDITIONAL_ENTRIES(ch.tutteli.atrium.translations.DescriptionIterableAssertion.WARNING_MISMATCHES_ADDITIONAL_ENTRIES.value), -} diff --git a/misc/deprecated/translations/atrium-translations-de_CH-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/DescriptionThrowableAssertion.kt b/misc/deprecated/translations/atrium-translations-de_CH-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/DescriptionThrowableAssertion.kt deleted file mode 100644 index dbb569c2d..000000000 --- a/misc/deprecated/translations/atrium-translations-de_CH-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/DescriptionThrowableAssertion.kt +++ /dev/null @@ -1,16 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0*/) -package ch.tutteli.atrium.assertions - -import ch.tutteli.atrium.reporting.translating.StringBasedTranslatable - -/** - * Contains the [DescriptiveAssertion.description]s of the assertion functions which are applicable to [Throwable]. - */ -@Deprecated( - "Use the description from package translations; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.translations.DescriptionThrowableAssertion") -) -enum class DescriptionThrowableAssertion(override val value: String) : StringBasedTranslatable { - IS_A(ch.tutteli.atrium.translations.DescriptionThrowableAssertion.IS_A.value), - NO_EXCEPTION_OCCURRED(ch.tutteli.atrium.translations.DescriptionThrowableAssertion.NO_EXCEPTION_OCCURRED.value), -} diff --git a/misc/deprecated/translations/atrium-translations-de_CH-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/DescriptionTypeTransformationAssertion.kt b/misc/deprecated/translations/atrium-translations-de_CH-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/DescriptionTypeTransformationAssertion.kt deleted file mode 100644 index dbaef816b..000000000 --- a/misc/deprecated/translations/atrium-translations-de_CH-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/DescriptionTypeTransformationAssertion.kt +++ /dev/null @@ -1,18 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0*/) -package ch.tutteli.atrium.assertions - -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.reporting.translating.StringBasedTranslatable - -/** - * Contains the [DescriptiveAssertion.description]s of the assertion functions which postulate that a - * [AssertionPlant.subject][SubjectProvider.subject] of type `T` can be transformed (usually down-casting or unboxing) to `TSub`. - */ -@Deprecated( - "Use the description from package translations; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.translations.DescriptionTypeTransformationAssertion") -) -enum class DescriptionTypeTransformationAssertion(override val value: String) : StringBasedTranslatable { - IS_A(ch.tutteli.atrium.translations.DescriptionTypeTransformationAssertion.IS_A.value), - WARNING_DOWN_CAST_FAILED(ch.tutteli.atrium.translations.DescriptionTypeTransformationAssertion.WARNING_DOWN_CAST_FAILED.value), -} diff --git a/misc/deprecated/translations/atrium-translations-en_UK-deprecated/build.gradle b/misc/deprecated/translations/atrium-translations-en_UK-deprecated/build.gradle deleted file mode 100644 index 8af099dbe..000000000 --- a/misc/deprecated/translations/atrium-translations-en_UK-deprecated/build.gradle +++ /dev/null @@ -1,6 +0,0 @@ -description = "Deprecated translation project - use ${rootProject.name}-translations-en_GB-jvm instead." - -dependencies { - api prefixedProject('core-api-jvm') - implementation prefixedProject('translations-en_GB-jvm') -} diff --git a/misc/deprecated/translations/atrium-translations-en_UK-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/DescriptionAnyAssertion.kt b/misc/deprecated/translations/atrium-translations-en_UK-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/DescriptionAnyAssertion.kt deleted file mode 100644 index 54b9875fe..000000000 --- a/misc/deprecated/translations/atrium-translations-en_UK-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/DescriptionAnyAssertion.kt +++ /dev/null @@ -1,20 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0*/) - -package ch.tutteli.atrium.assertions - -import ch.tutteli.atrium.reporting.translating.StringBasedTranslatable -import ch.tutteli.atrium.translations.DescriptionBasic - -/** - * Contains the [DescriptiveAssertion.description]s of the assertion functions which are applicable to [Any]. - */ -@Deprecated( - "Use the description from package translations; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.translations.DescriptionAnyAssertion") -) -enum class DescriptionAnyAssertion(override val value: String) : StringBasedTranslatable { - TO_BE(DescriptionBasic.TO_BE.value), - NOT_TO_BE(DescriptionBasic.NOT_TO_BE.value), - IS_SAME(ch.tutteli.atrium.translations.DescriptionAnyAssertion.IS_SAME.value), - IS_NOT_SAME(ch.tutteli.atrium.translations.DescriptionAnyAssertion.IS_NOT_SAME.value), -} diff --git a/misc/deprecated/translations/atrium-translations-en_UK-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/DescriptionBasic.kt b/misc/deprecated/translations/atrium-translations-en_UK-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/DescriptionBasic.kt deleted file mode 100644 index c844166e1..000000000 --- a/misc/deprecated/translations/atrium-translations-en_UK-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/DescriptionBasic.kt +++ /dev/null @@ -1,17 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0*/) -package ch.tutteli.atrium.assertions - -import ch.tutteli.atrium.reporting.translating.StringBasedTranslatable - -/** - * Contains the [DescriptiveAssertion.description]s which are so basic that one does not want to use a different wording in - * a two different assertion functions. - */ -@Deprecated( - "Use the description from package translations; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.translations.DescriptionBasic") -) -enum class DescriptionBasic(override val value: String) : StringBasedTranslatable { - IS(ch.tutteli.atrium.translations.DescriptionBasic.IS.value), - IS_NOT(ch.tutteli.atrium.translations.DescriptionBasic.IS_NOT.value), -} diff --git a/misc/deprecated/translations/atrium-translations-en_UK-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/DescriptionBigDecimalAssertion.kt b/misc/deprecated/translations/atrium-translations-en_UK-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/DescriptionBigDecimalAssertion.kt deleted file mode 100644 index 349f259b6..000000000 --- a/misc/deprecated/translations/atrium-translations-en_UK-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/DescriptionBigDecimalAssertion.kt +++ /dev/null @@ -1,20 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0*/) -package ch.tutteli.atrium.assertions - -import ch.tutteli.atrium.reporting.translating.StringBasedTranslatable -import java.math.BigDecimal - -/** - * Contains the [DescriptiveAssertion.description]s of the assertion functions which are applicable to [BigDecimal]. - */ -@Deprecated( - "Use the description from package translations; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.translations.DescriptionBigDecimalAssertion") -) -enum class DescriptionBigDecimalAssertion(override val value: String) : StringBasedTranslatable { - FAILURE_TO_BE_BUT_NUMERICALLY_EQUAL(ch.tutteli.atrium.translations.DescriptionBigDecimalAssertion.FAILURE_IS_EQUAL_INCLUDING_SCALE_BUT_NUMERICALLY_EQUAL.value), - IS_EQUAL_INCLUDING_SCALE(ch.tutteli.atrium.translations.DescriptionBigDecimalAssertion.IS_EQUAL_INCLUDING_SCALE.value), - IS_NOT_EQUAL_INCLUDING_SCALE(ch.tutteli.atrium.translations.DescriptionBigDecimalAssertion.IS_NOT_EQUAL_INCLUDING_SCALE.value), - IS_NUMERICALLY_EQUAL_TO(ch.tutteli.atrium.translations.DescriptionBigDecimalAssertion.IS_NUMERICALLY_EQUAL_TO.value), - IS_NOT_NUMERICALLY_EQUAL_TO(ch.tutteli.atrium.translations.DescriptionBigDecimalAssertion.IS_NOT_NUMERICALLY_EQUAL_TO.value), -} diff --git a/misc/deprecated/translations/atrium-translations-en_UK-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/DescriptionCharSequenceAssertion.kt b/misc/deprecated/translations/atrium-translations-en_UK-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/DescriptionCharSequenceAssertion.kt deleted file mode 100644 index 5ffff69df..000000000 --- a/misc/deprecated/translations/atrium-translations-en_UK-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/DescriptionCharSequenceAssertion.kt +++ /dev/null @@ -1,26 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0*/) -package ch.tutteli.atrium.assertions - -import ch.tutteli.atrium.reporting.translating.StringBasedTranslatable - -/** - * Contains the [DescriptiveAssertion.description]s of the assertion functions which are applicable to [CharSequence]. - */ -@Deprecated( - "Use the description from package translations; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.translations.DescriptionCharSequenceAssertion") -) -enum class DescriptionCharSequenceAssertion(override val value: String) : StringBasedTranslatable { - AT_LEAST(ch.tutteli.atrium.translations.DescriptionCharSequenceAssertion.AT_LEAST.value), - AT_MOST(ch.tutteli.atrium.translations.DescriptionCharSequenceAssertion.AT_MOST.value), - CONTAINS(ch.tutteli.atrium.translations.DescriptionCharSequenceAssertion.CONTAINS.value), - CONTAINS_NOT(ch.tutteli.atrium.translations.DescriptionCharSequenceAssertion.CONTAINS_NOT.value), - EMPTY(ch.tutteli.atrium.translations.DescriptionCharSequenceAssertion.EMPTY.value), - ENDS_WITH(ch.tutteli.atrium.translations.DescriptionCharSequenceAssertion.ENDS_WITH.value), - ENDS_NOT_WITH(ch.tutteli.atrium.translations.DescriptionCharSequenceAssertion.ENDS_NOT_WITH.value), - EXACTLY(ch.tutteli.atrium.translations.DescriptionCharSequenceAssertion.EXACTLY.value), - IGNORING_CASE(ch.tutteli.atrium.translations.DescriptionCharSequenceAssertion.IGNORING_CASE.value), - NUMBER_OF_OCCURRENCES(ch.tutteli.atrium.translations.DescriptionCharSequenceAssertion.NUMBER_OF_OCCURRENCES.value), - STARTS_WITH(ch.tutteli.atrium.translations.DescriptionCharSequenceAssertion.STARTS_WITH.value), - STARTS_NOT_WITH(ch.tutteli.atrium.translations.DescriptionCharSequenceAssertion.STARTS_NOT_WITH.value), -} diff --git a/misc/deprecated/translations/atrium-translations-en_UK-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/DescriptionCollectionAssertion.kt b/misc/deprecated/translations/atrium-translations-en_UK-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/DescriptionCollectionAssertion.kt deleted file mode 100644 index 97f48bc47..000000000 --- a/misc/deprecated/translations/atrium-translations-en_UK-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/DescriptionCollectionAssertion.kt +++ /dev/null @@ -1,16 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0*/) -package ch.tutteli.atrium.assertions - -import ch.tutteli.atrium.reporting.translating.StringBasedTranslatable - -/** - * Contains the [DescriptiveAssertion.description]s of the assertion functions which are applicable to [Collection]. - */ -@Deprecated( - "Use the description from package translations; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.translations.DescriptionCollectionAssertion") -) -enum class DescriptionCollectionAssertion(override val value: String) : StringBasedTranslatable { - EMPTY(ch.tutteli.atrium.translations.DescriptionCollectionAssertion.EMPTY.value), - HAS_SIZE("has size"), -} diff --git a/misc/deprecated/translations/atrium-translations-en_UK-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/DescriptionComparableAssertion.kt b/misc/deprecated/translations/atrium-translations-en_UK-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/DescriptionComparableAssertion.kt deleted file mode 100644 index e36a74c54..000000000 --- a/misc/deprecated/translations/atrium-translations-en_UK-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/DescriptionComparableAssertion.kt +++ /dev/null @@ -1,18 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0*/) -package ch.tutteli.atrium.assertions - -import ch.tutteli.atrium.reporting.translating.StringBasedTranslatable - -/** - * Contains the [DescriptiveAssertion.description]s of the assertion functions which are applicable to [Comparable]. - */ -@Deprecated( - "Use the description from package translations; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.translations.DescriptionComparableAssertion") -) -enum class DescriptionComparableAssertion(override val value: String) : StringBasedTranslatable { - IS_LESS_THAN(ch.tutteli.atrium.translations.DescriptionComparableAssertion.IS_LESS_THAN.value), - IS_LESS_OR_EQUALS(ch.tutteli.atrium.translations.DescriptionComparableAssertion.IS_LESS_THAN_OR_EQUAL.value), - IS_GREATER_THAN(ch.tutteli.atrium.translations.DescriptionComparableAssertion.IS_GREATER_THAN.value), - IS_GREATER_OR_EQUALS(ch.tutteli.atrium.translations.DescriptionComparableAssertion.IS_GREATER_THAN_OR_EQUAL.value), -} diff --git a/misc/deprecated/translations/atrium-translations-en_UK-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/DescriptionFloatingPointAssertion.kt b/misc/deprecated/translations/atrium-translations-en_UK-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/DescriptionFloatingPointAssertion.kt deleted file mode 100644 index c8b9b562d..000000000 --- a/misc/deprecated/translations/atrium-translations-en_UK-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/DescriptionFloatingPointAssertion.kt +++ /dev/null @@ -1,19 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0*/) -package ch.tutteli.atrium.assertions - -import ch.tutteli.atrium.reporting.translating.StringBasedTranslatable -import java.math.BigDecimal - -/** - * Contains the [DescriptiveAssertion.description]s of the assertion functions which are applicable to [Float], [Double] - * and [BigDecimal]. - */ -@Deprecated( - "Use the description from package translations; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.translations.DescriptionFloatingPointAssertion") -) -enum class DescriptionFloatingPointAssertion(override val value: String) : StringBasedTranslatable { - TO_BE_WITH_ERROR_TOLERANCE(ch.tutteli.atrium.translations.DescriptionFloatingPointAssertion.TO_BE_WITH_ERROR_TOLERANCE.value), - FAILURE_DUE_TO_FLOATING_POINT_NUMBER(ch.tutteli.atrium.translations.DescriptionFloatingPointAssertion.FAILURE_DUE_TO_FLOATING_POINT_NUMBER.value), - TO_BE_WITH_ERROR_TOLERANCE_EXPLAINED(ch.tutteli.atrium.translations.DescriptionFloatingPointAssertion.TO_BE_WITH_ERROR_TOLERANCE_EXPLAINED.value), -} diff --git a/misc/deprecated/translations/atrium-translations-en_UK-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/DescriptionIterableAssertion.kt b/misc/deprecated/translations/atrium-translations-en_UK-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/DescriptionIterableAssertion.kt deleted file mode 100644 index 51a4aa7de..000000000 --- a/misc/deprecated/translations/atrium-translations-en_UK-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/DescriptionIterableAssertion.kt +++ /dev/null @@ -1,33 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0*/) -package ch.tutteli.atrium.assertions - -import ch.tutteli.atrium.reporting.translating.StringBasedTranslatable - -/** - * Contains the [DescriptiveAssertion.description]s of the assertion functions which are applicable to [Iterable]. - */ -@Deprecated( - "Use the description from package translations; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.translations.DescriptionIterableAssertion") -) -enum class DescriptionIterableAssertion(override val value: String) : StringBasedTranslatable { - AN_ENTRY_WHICH(ch.tutteli.atrium.translations.DescriptionIterableAssertion.AN_ENTRY_WHICH.value), - AN_ENTRY_WHICH_IS(ch.tutteli.atrium.translations.DescriptionIterableAssertion.AN_ENTRY_WHICH_IS.value), - AT_LEAST(ch.tutteli.atrium.translations.DescriptionIterableAssertion.AT_LEAST.value), - AT_MOST(ch.tutteli.atrium.translations.DescriptionIterableAssertion.AT_MOST.value), - CONTAINS(ch.tutteli.atrium.translations.DescriptionIterableAssertion.CONTAINS.value), - CONTAINS_NOT(ch.tutteli.atrium.translations.DescriptionIterableAssertion.CONTAINS_NOT.value), - ENTRY_WITH_INDEX(ch.tutteli.atrium.translations.DescriptionIterableAssertion.ENTRY_WITH_INDEX.value), - EXACTLY(ch.tutteli.atrium.translations.DescriptionIterableAssertion.EXACTLY.value), - IN_ANY_ORDER(ch.tutteli.atrium.translations.DescriptionIterableAssertion.IN_ANY_ORDER.value), - IN_ANY_ORDER_ONLY(ch.tutteli.atrium.translations.DescriptionIterableAssertion.IN_ANY_ORDER_ONLY.value), - IN_ORDER(ch.tutteli.atrium.translations.DescriptionIterableAssertion.IN_ORDER.value), - IN_ORDER_ONLY(ch.tutteli.atrium.translations.DescriptionIterableAssertion.IN_ORDER_ONLY.value), - NUMBER_OF_OCCURRENCES(ch.tutteli.atrium.translations.DescriptionIterableAssertion.NUMBER_OF_OCCURRENCES.value), - SIZE_EXCEEDED(ch.tutteli.atrium.translations.DescriptionIterableAssertion.SIZE_EXCEEDED.value), - CANNOT_EVALUATE_SUBJECT_EMPTY_ITERABLE(ch.tutteli.atrium.translations.DescriptionIterableAssertion.CANNOT_EVALUATE_SUBJECT_EMPTY_ITERABLE.value), - CANNOT_EVALUATE_SUBJECT_ONLY_NULL(ch.tutteli.atrium.translations.DescriptionIterableAssertion.CANNOT_EVALUATE_SUBJECT_ONLY_NULL.value), - WARNING_ADDITIONAL_ENTRIES(ch.tutteli.atrium.translations.DescriptionIterableAssertion.WARNING_ADDITIONAL_ENTRIES.value), - WARNING_MISMATCHES(ch.tutteli.atrium.translations.DescriptionIterableAssertion.WARNING_MISMATCHES.value), - WARNING_MISMATCHES_ADDITIONAL_ENTRIES(ch.tutteli.atrium.translations.DescriptionIterableAssertion.WARNING_MISMATCHES_ADDITIONAL_ENTRIES.value), -} diff --git a/misc/deprecated/translations/atrium-translations-en_UK-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/DescriptionThrowableAssertion.kt b/misc/deprecated/translations/atrium-translations-en_UK-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/DescriptionThrowableAssertion.kt deleted file mode 100644 index dbb569c2d..000000000 --- a/misc/deprecated/translations/atrium-translations-en_UK-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/DescriptionThrowableAssertion.kt +++ /dev/null @@ -1,16 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0*/) -package ch.tutteli.atrium.assertions - -import ch.tutteli.atrium.reporting.translating.StringBasedTranslatable - -/** - * Contains the [DescriptiveAssertion.description]s of the assertion functions which are applicable to [Throwable]. - */ -@Deprecated( - "Use the description from package translations; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.translations.DescriptionThrowableAssertion") -) -enum class DescriptionThrowableAssertion(override val value: String) : StringBasedTranslatable { - IS_A(ch.tutteli.atrium.translations.DescriptionThrowableAssertion.IS_A.value), - NO_EXCEPTION_OCCURRED(ch.tutteli.atrium.translations.DescriptionThrowableAssertion.NO_EXCEPTION_OCCURRED.value), -} diff --git a/misc/deprecated/translations/atrium-translations-en_UK-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/DescriptionTypeTransformationAssertion.kt b/misc/deprecated/translations/atrium-translations-en_UK-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/DescriptionTypeTransformationAssertion.kt deleted file mode 100644 index dbaef816b..000000000 --- a/misc/deprecated/translations/atrium-translations-en_UK-deprecated/src/main/kotlin/ch/tutteli/atrium/assertions/DescriptionTypeTransformationAssertion.kt +++ /dev/null @@ -1,18 +0,0 @@ -@file:Suppress("DEPRECATION" /* TODO remove with 1.0.0*/) -package ch.tutteli.atrium.assertions - -import ch.tutteli.atrium.creating.SubjectProvider -import ch.tutteli.atrium.reporting.translating.StringBasedTranslatable - -/** - * Contains the [DescriptiveAssertion.description]s of the assertion functions which postulate that a - * [AssertionPlant.subject][SubjectProvider.subject] of type `T` can be transformed (usually down-casting or unboxing) to `TSub`. - */ -@Deprecated( - "Use the description from package translations; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.translations.DescriptionTypeTransformationAssertion") -) -enum class DescriptionTypeTransformationAssertion(override val value: String) : StringBasedTranslatable { - IS_A(ch.tutteli.atrium.translations.DescriptionTypeTransformationAssertion.IS_A.value), - WARNING_DOWN_CAST_FAILED(ch.tutteli.atrium.translations.DescriptionTypeTransformationAssertion.WARNING_DOWN_CAST_FAILED.value), -} diff --git a/misc/kdoc/packages.md b/misc/kdoc/packages.md index a2988d0f3..c3afb076b 100644 --- a/misc/kdoc/packages.md +++ b/misc/kdoc/packages.md @@ -53,130 +53,19 @@ Misc modules: no backward compatibility guarantees. Atrium has currently several modules to retain backward compatibility. -You should not rely on them and move to the suggested predecessor: -- **atrium-cc-de_CH-robstoll** use `atrium-fluent-de_CH` instead. This bundle defines to have a dependency on - atrium-api-cc-de_CH, atrium-translations-de_CH, atrium-domain-robstoll and atrium-core-robstoll -- **atrium-cc-en_GB-robstoll** use `atrium-fluent-en_GB` instead. This bundle defines to have a dependency on - atrium-api-cc-en_GB, atrium-translations-en_GB, atrium-domain-robstoll and atrium-core-robstoll -- **atrium-cc-infix-en_GB-robstoll** defines to have a dependency on - atrium-api-cc-infix-en_GB, atrium-translations-en_GB, atrium-domain-robstoll and and atrium-core-robstoll -- **atrium-cc-en_UK-robstoll** use `atrium-cc-en_GB-robstoll` instead. This bundle defines to have a dependency on - atrium-api-cc-en_UK, atrium-translations-en_UK, atrium-domain-robstoll, atrium-core-robstoll - and some deprecated modules -- **atrium-cc-infix-en_UK-robstoll** use `atrium-cc-infix-en_GB-robstoll` instead. - This bundle defines to have a dependency on atrium-api-cc-infix-en_UK, atrium-translations-en_UK, - atrium-domain-robstoll, atrium-core-robstoll and some deprecated modules - -- **atrium-api-cc-de_CH** use `atrium-api-fluent-de_CH` instead. -- **atrium-api-cc-en_GB** use `atrium-api-fluent-en_GB` instead. -- **atrium-api-cc-infix-en_GB** use `atrium-api-infix-en_GB` instead. -- **atrium-api-cc-en_UK** use `atrium-api-cc-en_GB` instead. - +You should not rely on them and move to the suggested predecessor: - **atrium-domain-api** use `atrium-logic` instead. - **atrium-domain-robstoll** use `atrium-logic` instead. - **atrium-domain-robstoll-lib** use `atrium-logic` instead. - **atrium-domain-builders** use `atrium-logic` instead. -- **atrium-domain-api-deprecated** contains deprecated domain-api code -- **atrium-core-robstoll-deprecated** contains the deprecated AtriumFactory => use - [coreFactory](./ch.tutteli.atrium.core/core-factory.html) instead -- **atrium-assertions** is `deprecated` and you should not longer rely on it. - It will be removed with 1.0.0. - Use the replacements suggested in the `@Deprecated` annotations. - - -# ch.tutteli.atrium -Contains the `@Deprecated` [IAtriumFactory](./ch.tutteli.atrium/-i-atrium-factory/index.html). - -# ch.tutteli.atrium.api.cc.de_CH -`@Deprecated` API use [ch.tutteli.atrium.api.fluent.de_CH] instead. - -# ch.tutteli.atrium.api.cc.de_CH.assertions.charsequence.contains.builders -Contains `@Deprecated` builders, use the builders from package `creating`; will all be removed with 1.0.0 - -# ch.tutteli.atrium.api.cc.de_CH.assertions.iterable.contains.builders -Contains `@Deprecated` builders, use the builders from package `creating`; will all be removed with 1.0.0 - -# ch.tutteli.atrium.api.cc.de_CH.creating.charsequence.contains.builders -Contains `@Deprecated` builders, use the builders from package `fluent.de_CH`; will all be removed with 1.0.0 - -# ch.tutteli.atrium.api.cc.de_CH.creating.iterable.contains.builders -Contains `@Deprecated` builders, use the builders from package `fluent.de_CH`; will all be removed with 1.0.0 - - -# ch.tutteli.atrium.api.fluent.de_CH -Contains API which provides a pure fluent API in German and which has its design focus on usability -in conjunction with code completion. - -# ch.tutteli.atrium.api.fluent.de_CH.creating.charsequence.contains.builders -Contains the builders -- necessary to provide an extensible fluent API -- which allow to create sophisticated `contains` -assertions for CharSequence. - -# ch.tutteli.atrium.api.fluent.de_CH.creating.iterable.contains.builders -Contains the builders -- necessary to provide an extensible fluent API -- which allow to create sophisticated `contains` -assertions for Iterable. - - -# ch.tutteli.atrium.api.cc.en_GB -`@Deprecated` API use [ch.tutteli.atrium.api.fluent.en_GB] instead. - -# ch.tutteli.atrium.api.cc.en_GB.creating.charsequence.contains.builders -Contains `@Deprecated` builders, use the builders from package `fluent.en_GB`; will all be removed with 1.0.0 - -# ch.tutteli.atrium.api.cc.en_GB.creating.iterable.contains.builders -Contains `@Deprecated` builders, use the builders from package `fluent.en_GB`; will all be removed with 1.0.0 - # ch.tutteli.atrium.api.fluent.en_GB Contains API which provides a pure fluent API in English and which has its design focus on usability in conjunction with code completion. -# ch.tutteli.atrium.api.fluent.en_GB.creating.charsequence.contains.builders -Contains the builders -- necessary to provide an extensible fluent API -- which allow to create sophisticated `contains` -assertions for CharSequence. - -# ch.tutteli.atrium.api.fluent.en_GB.creating.iterable.contains.builders -Contains the builders -- necessary to provide an extensible fluent API -- which allow to create sophisticated `contains` -assertions for Iterable. - -# ch.tutteli.atrium.api.fluent.en_GB.jdk8 -Contains an API for types introduced with jdk8 - `@Deprecated` though as it was merged into [ch.tutteli.atrium.api.fluent.en_GB]. - # ch.tutteli.atrium.api.fluent.en_GB.kotlin_1_3 Contains an API for types introduced with Kotlin 1.3 -# ch.tutteli.atrium.api.cc.en_UK -`@Depreacted` API use [ch.tutteli.atrium.api.fluent.en_GB] instead. - -# ch.tutteli.atrium.api.cc.en_UK.assertions.charsequence.contains.builders -Contains `@Deprecated` builders, use the builders from package `creating`; will all be removed with 1.0.0 - -# ch.tutteli.atrium.api.cc.en_UK.assertions.iterable.contains.builders -Contains `@Deprecated` builders, use the builders from package `creating`; will all be removed with 1.0.0 - -# ch.tutteli.atrium.api.cc.en_UK.creating.charsequence.contains.builders -Contains `@Deprecated` builders, use the builders from package `en_GB`; will all be removed with 1.0.0 - -# ch.tutteli.atrium.api.cc.en_UK.creating.iterable.contains.builders -Contains `@Deprecated` builders, use the builders from package `en_GB`; will all be removed with 1.0.0 - - -# ch.tutteli.atrium.api.cc.infix.en_GB -`@Depreacted` API use [ch.tutteli.atrium.api.infix.en_GB] instead. - -# ch.tutteli.atrium.api.cc.infix.en_GB.creating.charsequence.contains.builders -Contains `@Deprecated` builders, switch from package `cc.infix` to `infix`; will all be removed with 1.0.0 -# ch.tutteli.atrium.api.cc.infix.en_GB.creating.iterable.contains.builders -Contains `@Deprecated` builders, switch from package `cc.infix` to `infix`; will all be removed with 1.0.0 - -# ch.tutteli.atrium.api.cc.infix.en_GB.creating.list.get.builders -Contains `@Deprecated` builders, switch from package `cc.infix` to `infix`; will all be removed with 1.0.0 -# ch.tutteli.atrium.api.cc.infix.en_GB.creating.map.get.builders -Contains `@Deprecated` builders, switch from package `cc.infix` to `infix`; will all be removed with 1.0.0 - -# ch.tutteli.atrium.api.cc.infix.en_GB.keywords -Contains `@Deprecated` pseudo keywords, switch from package `cc.infix` to `infix`; will all be removed with 1.0.0 - - # ch.tutteli.atrium.api.infix.en_GB Contains API which provides an infix API in English and which has its design focus on usability in conjunction with code completion. @@ -184,20 +73,12 @@ in conjunction with code completion. # ch.tutteli.atrium.api.infix.en_GB.creating Contains parameter objects . -# ch.tutteli.atrium.api.infix.en_GB.creating.charsequence.contains.builders -Contains the builders -- necessary to provide an extensible fluent API -- which allow to create sophisticated `contains` -assertions for CharSequence. - # ch.tutteli.atrium.api.infix.en_GB.creating.feature Contains parameter objects related to feature assertions. # ch.tutteli.atrium.api.infix.en_GB.creating.iterable Contains parameter objects related to Iterable. -# ch.tutteli.atrium.api.infix.en_GB.creating.iterable.contains.builders -Contains the builders -- necessary to provide an extensible fluent API -- which allow to create sophisticated `contains` -assertions for Iterable. - # ch.tutteli.atrium.api.infix.en_GB.creating.map Contains parameter objects related to Map. @@ -211,46 +92,15 @@ Contains an API for types introduced with Kotlin 1.3 Contains functions necessary for the infix API to work due to Kotlin related bugs / or insufficient type inference capabilities . -# ch.tutteli.atrium.api.cc.infix.en_UK -`@Depreacted` API use [ch.tutteli.atrium.api.infix.en_GB] instead. - -# ch.tutteli.atrium.api.cc.infix.en_UK.assertions.charsequence.contains.builders -Contains `@Deprecated` builders, use the builders from package `creating`; will all be removed with 1.0.0 - -# ch.tutteli.atrium.api.cc.infix.en_UK.assertions.iterable.contains.builders -Contains `@Deprecated` builders, use the builders from package `creating`; will all be removed with 1.0.0 - -# ch.tutteli.atrium.api.cc.infix.en_UK.creating.charsequence.contains.builders -Contains `@Deprecated` builders, use the builders from package `en_GB`; will all be removed with 1.0.0 - -# ch.tutteli.atrium.api.cc.infix.en_UK.creating.iterable.contains.builders -Contains `@Deprecated` builders, use the builders from package `en_GB`; will all be removed with 1.0.0 - - # ch.tutteli.atrium.api.verbs Contains the [out-of-the-box Assertion Verbs](https://github.com/robstoll/atrium#out-of-the-box-assertion-verbs) such as [expect](./ch.tutteli.atrium.api.verbs/expect.html), [assert](./ch.tutteli.atrium.api.verbs/assert.html) and [assertThat](./ch.tutteli.atrium.api.verbs/assert-that.html). -# ch.tutteli.atrium.api.verbs.internal -Contains the assertion verbs Atrium uses internally. -Use with care, no backward compatibility guarantees and reporting might change. - # ch.tutteli.atrium.assertions Contains different types of [Assertion](./ch.tutteli.atrium.assertions/-assertion/index.html), e.g. [DescriptiveAssertion](./ch.tutteli.atrium.assertions/-descriptive-assertion/index.html). -Currently it contains also `@Deprecated` impl-functions which will be removed with 1.0.0 - -# ch.tutteli.atrium.assertions.any.typetransformation -Contains `@Deprecated` classes/interfaces/functions, use the ones from package `creating`; will all be removed with 1.0.0 -# ch.tutteli.atrium.assertions.basic.contains -Contains `@Deprecated` classes/interfaces/functions, use the ones from package `creating`; will all be removed with 1.0.0 -# ch.tutteli.atrium.assertions.basic.contains.builders -Contains `@Deprecated` classes/interfaces/functions, use the ones from package `creating`; will all be removed with 1.0.0 -# ch.tutteli.atrium.assertions.basic.contains.checkers -Contains `@Deprecated` classes/interfaces/functions, use the ones from package `creating`; will all be removed with 1.0.0 -# ch.tutteli.atrium.assertions.basic.contains.creators -Contains `@Deprecated` classes/interfaces/functions, use the ones from package `creating`; will all be removed with 1.0.0 +Currently, it contains also `@Deprecated` types which will be made internal with 0.17.0 or earlier # ch.tutteli.atrium.assertions.builders The [AssertionBuilder](./ch.tutteli.atrium.assertions.builders/-assertion-builder/index.html) @@ -259,42 +109,6 @@ and other builders to ease the creation of Assertions. # ch.tutteli.atrium.assertions.builders.common Package containing/defining common steps for builders. -# ch.tutteli.atrium.assertions.charsequence.contains -Contains `@Deprecated` classes/interfaces/functions, use the ones from package `creating`; will all be removed with 1.0.0 -# ch.tutteli.atrium.assertions.charsequence.contains.builders -Contains `@Deprecated` classes/interfaces/functions, use the ones from package `creating`; will all be removed with 1.0.0 -# ch.tutteli.atrium.assertions.charsequence.contains.checkers -Contains `@Deprecated` classes/interfaces/functions, use the ones from package `creating`; will all be removed with 1.0.0 -# ch.tutteli.atrium.assertions.charsequence.contains.creators -Contains `@Deprecated` classes/interfaces/functions, use the ones from package `creating`; will all be removed with 1.0.0 -# ch.tutteli.atrium.assertions.charsequence.contains.searchbehaviours -Contains `@Deprecated` classes/interfaces/functions, use the ones from package `creating`; will all be removed with 1.0.0 -# ch.tutteli.atrium.assertions.charsequence.contains.searchers -Contains `@Deprecated` classes/interfaces/functions, use the ones from package `creating`; will all be removed with 1.0.0 - -# ch.tutteli.atrium.assertions.iterable.contains -Contains `@Deprecated` classes/interfaces/functions, use the ones from package `creating`; will all be removed with 1.0.0 -# ch.tutteli.atrium.assertions.iterable.contains.builders -Contains `@Deprecated` classes/interfaces/functions, use the ones from package `creating`; will all be removed with 1.0.0 -# ch.tutteli.atrium.assertions.iterable.contains.checkers -Contains `@Deprecated` classes/interfaces/functions, use the ones from package `creating`; will all be removed with 1.0.0 -# ch.tutteli.atrium.assertions.iterable.contains.creators -Contains `@Deprecated` classes/interfaces/functions, use the ones from package `creating`; will all be removed with 1.0.0 -# ch.tutteli.atrium.assertions.iterable.contains.searchbehaviours -Contains `@Deprecated` classes/interfaces/functions, use the ones from package `creating`; will all be removed with 1.0.0 -# ch.tutteli.atrium.assertions.throwable.thrown -Contains `@Deprecated` classes/interfaces/functions, use the ones from package `creating`; will all be removed with 1.0.0 -# ch.tutteli.atrium.assertions.throwable.thrown.builders -Contains `@Deprecated` classes/interfaces/functions, use the ones from package `creating`; will all be removed with 1.0.0 -# ch.tutteli.atrium.assertions.throwable.thrown.creators -Contains `@Deprecated` classes/interfaces/functions, use the ones from package `creating`; will all be removed with 1.0.0 -# ch.tutteli.atrium.assertions.throwable.thrown.providers -Contains `@Deprecated` classes/interfaces/functions, use the ones from package `creating`; will all be removed with 1.0.0 - - -# ch.tutteli.atrium.checking -Everything involved in checking [Assertion](./ch.tutteli.atrium.assertions/-assertion/index.html)s. - # ch.tutteli.atrium.core Contains the [CoreFactory](./ch.tutteli.atrium.core/-core-factory/index.html). @@ -328,35 +142,10 @@ Contains extension functions for the # ch.tutteli.atrium.domain.builders.creating Builders involved in delegating to assertion implementations. -# ch.tutteli.atrium.domain.builders.creating.basic.contains -Contains helper functions for -[Contains.Builder](./ch.tutteli.atrium.domain.creating.basic.contains/-contains/-builder/index.html) - -# ch.tutteli.atrium.domain.builders.creating.changers -Contains builders for [ch.tutteli.atrium.domain.creating.changers]. - -# ch.tutteli.atrium.domain.builders.creating.charsequence.contains.builders -Contains base classes for -[CharSequenceContains.CheckerOption](./ch.tutteli.atrium.domain.creating.charsequence.contains/-char-sequence-contains/-checker-option.html). - # ch.tutteli.atrium.domain.builders.creating.collectors Contains the builder behind [ExpectImpl.collector](./ch.tutteli.atrium.domain.builders.creating.collectors/-assertion-collector-builder/index.html) -# ch.tutteli.atrium.domain.builders.creating.iterable.contains.builders -Contains base classes for -[IterableContains.CheckerOption](./ch.tutteli.atrium.domain.creating.iterable.contains/-iterable-contains/-checker-option.html). - -# ch.tutteli.atrium.domain.builders.kotlin_1_3 -Builders involved in delegating to assertion implementations. - -# ch.tutteli.atrium.domain.builders.kotlin_1_3.creating -Builders involved in creating [Assertion](./ch.tutteli.atrium.assertions/-assertion/index.html)s. - -# ch.tutteli.atrium.domain.builders.migration -Contains helper functions such as [asExpect](./ch.tutteli.atrium.domain.builders.migration/as-expect.html) -to ease the migration from deprecated functionality to new functionality - # ch.tutteli.atrium.domain.builders.reporting Contains the [ReporterBuilder](./ch.tutteli.atrium.domain.builders.reporting/-reporter-builder/index.html). @@ -368,93 +157,9 @@ Contains utility functions for APIs. # ch.tutteli.atrium.domain.creating Contains interfaces defining the minimum set of assertion functions (on level domain) which an implementation has to provide. -# ch.tutteli.atrium.domain.creating.any.typetransformation -Contains `@Deprecated` functionality in conjunction with `Assert` and type transformations; will all be removed with 1.0.0 - -# ch.tutteli.atrium.domain.creating.any.typetransformation.creators -Contains `@Deprecated` functionality in conjunction with `Assert` and type transformations; will all be removed with 1.0.0 - -# ch.tutteli.atrium.domain.creating.any.typetransformation.failurehandlers -Contains `@Deprecated` functionality in conjunction with `Assert` and type transformations; will all be removed with 1.0.0 - -# ch.tutteli.atrium.domain.creating.basic.contains -Contains the basic contract for contains assertion builders --- [Contains](./ch.tutteli.atrium.domain.creating.basic.contains/-contains/index.html). - -# ch.tutteli.atrium.domain.creating.changers -Contains contracts for subject-change related functionality such as -[SubjectChanger](./ch.tutteli.atrium.domain.creating.changers/-subject-changer/index.html) -and [ExtractedFeaturePostStep](./ch.tutteli.atrium.domain.creating.changers/-extracted-feature-post-step/index.html) - -# ch.tutteli.atrium.domain.creating.charsequence.contains -Contains the contract for sophisticated CharSequence `contains` assertions --- [CharSequenceContains](./ch.tutteli.atrium.domain.creating.charsequence.contains/-char-sequence-contains/index.html) - -# ch.tutteli.atrium.domain.creating.charsequence.contains.checkers -Contains [CheckerFactory](./ch.tutteli.atrium.domain.creating.charsequence.contains.checkers/-checker-factory/index.html) -which defines the minimum set of [CharSequenceContains.Checker](./ch.tutteli.atrium.domain.creating.charsequence.contains/-char-sequence-contains/-checker.html) -an implementation has to provide. - -# ch.tutteli.atrium.domain.creating.charsequence.contains.creators -Contains [CharSequenceContainsAssertions](./ch.tutteli.atrium.domain.creating.charsequence.contains.creators/-char-sequence-contains-assertions/index.html) -which defines the minimum set of `CharSequence contains` assertion functions (on level domain) an implementation has to provide. - -# ch.tutteli.atrium.domain.creating.charsequence.contains.searchbehaviours -Contains [SearchBehaviourFactory](./ch.tutteli.atrium.domain.creating.charsequence.contains.searchbehaviours/-search-behaviour-factory/index.html) -which defines the minimum set of [CharSequenceContains.SearchBehaviour](./ch.tutteli.atrium.domain.creating.charsequence.contains/-char-sequence-contains/-search-behaviour.html) -an implementation has to provide. - - # ch.tutteli.atrium.domain.creating.collectors Contains [AssertionCollector](./ch.tutteli.atrium.domain.creating.collectors/-assertion-collector/index.html). -# ch.tutteli.atrium.domain.creating.feature.extract -Contains the contract for sophisticated feature extraction assertions --- [FeatureExtractor](./ch.tutteli.atrium.domain.creating.feature.extract/-feature-extractor/index.html) - -# ch.tutteli.atrium.domain.creating.feature.extract.creators -Contains the [FeatureExtractorCreatorFactory](./ch.tutteli.atrium.domain.creating.feature.extract.creators/-feature-extractor-creator-factory/index.html) - - -# ch.tutteli.atrium.domain.creating.iterable.contains -Contains the contract for sophisticated Iterable `contains` assertions --- [IterableContains](./ch.tutteli.atrium.domain.creating.iterable.contains/-iterable-contains/index.html) - -# ch.tutteli.atrium.domain.creating.iterable.contains.checkers -Contains [CheckerFactory](./ch.tutteli.atrium.domain.creating.iterable.contains.checkers/-checker-factory/index.html) -which defines the minimum set of [IterableContains.Checker](./ch.tutteli.atrium.domain.creating.iterable.contains/-iterable-contains/-checker.html) -an implementation has to provide. - -# ch.tutteli.atrium.domain.creating.iterable.contains.creators -Contains [IterableContainsAssertions](./ch.tutteli.atrium.domain.creating.iterable.contains.creators/-iterable-contains-assertions/index.html) -which defines the minimum set of `Iterable contains` assertion functions (on level domain) an implementation has to provide. - -# ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours -Contains [SearchBehaviourFactory](./ch.tutteli.atrium.domain.creating.iterable.contains.searchbehaviours/-search-behaviour-factory/index.html) -which defines the minimum set of [IterableContains.SearchBehaviour](./ch.tutteli.atrium.domain.creating.iterable.contains/-iterable-contains/-search-behaviour.html) -an implementation has to provide. - - -# ch.tutteli.atrium.domain.creating.throwable.thrown -Contains the contract for sophisticated a Throwable was thrown assertions --- [ThrowableThrown](./ch.tutteli.atrium.domain.creating.throwable.thrown/-throwable-thrown/index.html) - -# ch.tutteli.atrium.domain.creating.throwable.thrown.creators -Contains [IterableContainsAssertions](./ch.tutteli.atrium.domain.creating.throwable.thrown.creators/-throwable-thrown-assertions/index.html) -which defines the minimum set of `a Throwable was thrown` assertion functions (on level domain) an implementation has to provide. - -# ch.tutteli.atrium.domain.creating.throwable.thrown.providers -Contains [AbsentThrowableMessageProviderFactory](./ch.tutteli.atrium.domain.creating.throwable.thrown.providers/-absent-throwable-message-provider-factory/index.html) -which defines the minimum set of [IterableContains.AbsentThrowableMessageProvider](./ch.tutteli.atrium.domain.creating.throwable.thrown/-throwable-thrown/-absent-throwable-message-provider/index.html) -an implementation has to provide. - -# ch.tutteli.atrium.domain.creating.typeutils -Type aliases to improve the API. - -# ch.tutteli.atrium.domain.kotlin_1_3.creating -Contains interfaces defining the minimum set of assertion functions (on level domain) which an implementation -has to provide for the Kotlin 1.3 extension. - # ch.tutteli.atrium.logic Contains all the assertion interfaces (e.g. [AnyAssertions](./ch.tutteli.atrium.logic/-any-assertions/index.html) as well as [_logic](./ch.tutteli.atrium.logic/_logic.html) and helper functions for [AssertionContainer](./ch.tutteli.atrium.creating/-assertion-container/index.html) @@ -515,28 +220,5 @@ Everything involved in reporting [Assertion](./ch.tutteli.atrium.assertions/-ass # ch.tutteli.atrium.reporting.translating Everything involved in translating [Translatable](./ch.tutteli.atrium.reporting.translating/-translatable/index.html)s. - -# ch.tutteli.atrium.spec -Contains inter alia [DeprecationTestEngine](ch.tutteli.atrium.spec/-deprecation-test-engine/index.html) -which is used in backward compatibility tests. - - # ch.tutteli.atrium.translations Contains [Translatable](./ch.tutteli.atrium.reporting.translating/-translatable/index.html)s. - - -# ch.tutteli.atrium.verbs -Contains the `@Deprecated` [out-of-the-box Assertion Verbs](https://github.com/robstoll/atrium#out-of-the-box-assertion-verbs) -for `Assert` which is itself `@Deprecated`. - -# ch.tutteli.atrium.verbs.assert -The `@Deprecated` version of the assertion verb `assert`; will be removed with 1.0.0 - -# ch.tutteli.atrium.verbs.assertthat -The `@Deprecated` version of the assertion verb `assertThat`; will be removed with 1.0.0 - -# ch.tutteli.atrium.verbs.expect -The `@Deprecated` version of the assertion verb `expect`; will be removed with 1.0.0 - -# ch.tutteli.atrium.verbs.internal -Contains the `@Deprecated` assertion verbs Atrium used internally for `Assert`; will all be removed with 1.0.0. \ No newline at end of file diff --git a/misc/specs/atrium-specs-common/build.gradle b/misc/specs/atrium-specs-common/build.gradle index cc1fada16..535f1c57d 100644 --- a/misc/specs/atrium-specs-common/build.gradle +++ b/misc/specs/atrium-specs-common/build.gradle @@ -14,11 +14,8 @@ dependencies { // exclude this dependency in case you want to use another implementation runtimeOnly prefixedProject('core-robstoll-common') + //TODO remove with 0.17.0 runtimeOnly prefixedProject('domain-robstoll-common') - runtimeOnly prefixedProject('domain-robstoll-kotlin_1_3-common') - - //TODO 1.0.0 remove, only needed for returnValueOf test - implementation prefixedProject('api-cc-en_GB-common') } dependencies { diff --git a/misc/specs/atrium-specs-common/src/main/kotlin/ch/tutteli/atrium/specs/checking/DelegatingAssertionCheckerSpec.kt b/misc/specs/atrium-specs-common/src/main/kotlin/ch/tutteli/atrium/specs/checking/DelegatingAssertionCheckerSpec.kt deleted file mode 100644 index e5a5d56cf..000000000 --- a/misc/specs/atrium-specs-common/src/main/kotlin/ch/tutteli/atrium/specs/checking/DelegatingAssertionCheckerSpec.kt +++ /dev/null @@ -1,76 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.specs.checking - -import ch.tutteli.atrium.api.fluent.en_GB.* -import ch.tutteli.atrium.api.verbs.internal.expect -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.assertions.AssertionGroup -import ch.tutteli.atrium.assertions.InvisibleAssertionGroupType -import ch.tutteli.atrium.checking.AssertionChecker -import ch.tutteli.atrium.creating.AssertionHolder -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.specs.AssertionVerb -import ch.tutteli.atrium.specs.describeFunTemplate -import io.mockk.* -import org.spekframework.spek2.Spek -import org.spekframework.spek2.style.specification.Suite - -abstract class DelegatingAssertionCheckerSpec( - testeeFactory: (AssertionHolder) -> AssertionChecker, - describePrefix: String = "[Atrium] " -) : Spek({ - - fun describeFun(vararg funName: String, body: Suite.() -> Unit) = - describeFunTemplate(describePrefix, funName, body = body) - - val assertions = ArrayList() - assertions.add(object : Assertion { - override fun holds() = true - }) - val assertionVerb = AssertionVerb.VERB - val assertionWhichFails = object : Assertion { - override fun holds() = false - } - val assertionWhichHolds = object : Assertion { - override fun holds() = true - } - - describeFun("check") { - context("empty assertion list") { - it("does not throw an exception") { - val testee = testeeFactory(mockk(relaxed = true)) - testee.check(assertionVerb, 1, listOf()) - } - } - - mapOf( - "one assertion which fails" to listOf(assertionWhichFails), - "one assertion which holds" to listOf(assertionWhichHolds), - "one assertion which fails and one which holds" to listOf(assertionWhichFails, assertionWhichHolds), - "one assertion which holds and one which fails" to listOf(assertionWhichHolds, assertionWhichFails) - ).forEach { (description, assertions) -> - context(description) { - it("adds the assertion(s) to the assertion container") { - //arrange - val expect = mockk>() - every { expect.addAssertion(any()) } returns expect - - val testee = testeeFactory(expect) - //act - testee.check(assertionVerb, 1, assertions) - //assert - val captor = slot() - verify(exactly = 1) { expect.addAssertion(assertion = capture(captor)) } - expect(captor.captured).isA { - feature(AssertionGroup::type).isA() - feature(AssertionGroup::assertions) { - contains.inAnyOrder.only.values(assertions.first(), *assertions.drop(1).toTypedArray()) - } - } - } - } - } - } -}) diff --git a/misc/specs/atrium-specs-common/src/main/kotlin/ch/tutteli/atrium/specs/checking/FeatureAssertionCheckerSpec.kt b/misc/specs/atrium-specs-common/src/main/kotlin/ch/tutteli/atrium/specs/checking/FeatureAssertionCheckerSpec.kt deleted file mode 100644 index 1e582ff44..000000000 --- a/misc/specs/atrium-specs-common/src/main/kotlin/ch/tutteli/atrium/specs/checking/FeatureAssertionCheckerSpec.kt +++ /dev/null @@ -1,77 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.specs.checking - -import ch.tutteli.atrium.api.fluent.en_GB.* -import ch.tutteli.atrium.api.verbs.internal.expect -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.assertions.AssertionGroup -import ch.tutteli.atrium.assertions.FeatureAssertionGroupType -import ch.tutteli.atrium.checking.AssertionChecker -import ch.tutteli.atrium.creating.AssertionHolder -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.specs.AssertionVerb -import ch.tutteli.atrium.specs.describeFunTemplate -import io.mockk.* -import org.spekframework.spek2.Spek -import org.spekframework.spek2.lifecycle.CachingMode -import org.spekframework.spek2.style.specification.Suite - -abstract class FeatureAssertionCheckerSpec( - testeeFactory: (AssertionHolder) -> AssertionChecker, - describePrefix: String = "[Atrium] " -) : Spek({ - - fun describeFun(vararg funName: String, body: Suite.() -> Unit) = - describeFunTemplate(describePrefix, funName, body = body) - - val assertions = ArrayList() - assertions.add(object : Assertion { - override fun holds() = true - }) - val assertionVerb = AssertionVerb.VERB - val valueUnderTest = 1 - val expect = mockk>() - every { expect.addAssertion(any()) } returns expect - val testee = testeeFactory(expect) - - - describeFun("check") { - context("creates a ${AssertionGroup::class.simpleName} and passes it to its subjectFactory") { - - val captured by memoized(mode = CachingMode.SCOPE) { - testee.check(assertionVerb, valueUnderTest, assertions) - val slot = slot() - verify(exactly = 1) { expect.addAssertion(capture(slot)) } - confirmVerified(expect) - slot.captured - } - - it("its type is ${FeatureAssertionGroupType::class.simpleName}") { - expect(captured).isA { - feature { f(it::type) }.isA() - } - } - - it("its ${AssertionGroup::representation.name} corresponds to the passed assertionVerb") { - expect(captured).isA { - feature { f(it::description) }.toBe(assertionVerb) - } - } - - it("its ${AssertionGroup::representation.name} corresponds to the passed subject") { - expect(captured).isA { - feature { f(it::representation) }.toBe(1) - } - } - - it("copies the assertion") { - assertions.clear() - expect(captured).isA { - feature { f(it::assertions) }.hasSize(1).and.isNotSameAs(assertions) - } - } - } - } -}) diff --git a/misc/specs/atrium-specs-common/src/main/kotlin/ch/tutteli/atrium/specs/checking/ThrowingAssertionCheckerSpec.kt b/misc/specs/atrium-specs-common/src/main/kotlin/ch/tutteli/atrium/specs/checking/ThrowingAssertionCheckerSpec.kt deleted file mode 100644 index a190f79e5..000000000 --- a/misc/specs/atrium-specs-common/src/main/kotlin/ch/tutteli/atrium/specs/checking/ThrowingAssertionCheckerSpec.kt +++ /dev/null @@ -1,68 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.specs.checking - -import ch.tutteli.atrium.api.fluent.en_GB.message -import ch.tutteli.atrium.api.fluent.en_GB.toBe -import ch.tutteli.atrium.api.fluent.en_GB.toThrow -import ch.tutteli.atrium.api.verbs.internal.expect -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.checking.AssertionChecker -import ch.tutteli.atrium.core.coreFactory -import ch.tutteli.atrium.reporting.Reporter -import ch.tutteli.atrium.specs.AssertionVerb -import ch.tutteli.atrium.specs.describeFunTemplate -import io.mockk.* -import org.spekframework.spek2.Spek -import org.spekframework.spek2.style.specification.Suite - -abstract class ThrowingAssertionCheckerSpec( - testeeFactory: (Reporter) -> AssertionChecker, - describePrefix: String = "[Atrium] " -) : Spek({ - - fun describeFun(vararg funName: String, body: Suite.() -> Unit) = - describeFunTemplate(describePrefix, funName, body = body) - - val assertionVerb = AssertionVerb.VERB - val reporterResponse = "hello" - val strbldSlot = slot() - - val reporter = mockk { - every { format(any(), @Suppress("RemoveExplicitTypeArguments") capture(strbldSlot)) } answers { - (strbldSlot.captured).append(reporterResponse) - } - every { atriumErrorAdjuster } returns (coreFactory.newNoOpAtriumErrorAdjuster()) - } - val testee = testeeFactory(reporter) - val assertionWhichHolds = object : Assertion { - override fun holds() = true - } - val assertionWhichFails = object : Assertion { - override fun holds() = false - } - - describeFun("check") { - it("does not throw an AssertionError if all assertions hold") { - testee.check(assertionVerb, 1, listOf(assertionWhichHolds, assertionWhichHolds)) - } - - mapOf( - "first assertion fails" to listOf(assertionWhichFails, assertionWhichHolds, assertionWhichHolds), - "middle assertion fails" to listOf(assertionWhichHolds, assertionWhichFails, assertionWhichHolds), - "last assertion fails" to listOf(assertionWhichHolds, assertionWhichHolds, assertionWhichFails) - - ).forEach { (assertionFails, assertions) -> - it("throws an AssertionError with the message formatted by the reporter if the $assertionFails") { - expect { - testee.check(assertionVerb, 1, assertions) - }.toThrow { - message { - toBe(reporterResponse) - } - } - } - } - } -}) diff --git a/misc/specs/atrium-specs-common/src/main/kotlin/ch/tutteli/atrium/specs/creating/CollectingAssertionPlantSpec.kt b/misc/specs/atrium-specs-common/src/main/kotlin/ch/tutteli/atrium/specs/creating/CollectingAssertionPlantSpec.kt deleted file mode 100644 index bfdfba10c..000000000 --- a/misc/specs/atrium-specs-common/src/main/kotlin/ch/tutteli/atrium/specs/creating/CollectingAssertionPlantSpec.kt +++ /dev/null @@ -1,64 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.specs.creating - -import ch.tutteli.atrium.api.fluent.en_GB.containsExactly -import ch.tutteli.atrium.api.fluent.en_GB.feature -import ch.tutteli.atrium.api.fluent.en_GB.toBe -import ch.tutteli.atrium.api.verbs.internal.expect -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.core.Option -import ch.tutteli.atrium.core.Some -import ch.tutteli.atrium.creating.CollectingAssertionContainer -import ch.tutteli.atrium.specs.describeFunTemplate -import org.spekframework.spek2.Spek -import org.spekframework.spek2.lifecycle.CachingMode -import org.spekframework.spek2.style.specification.Suite - -abstract class CollectingAssertionContainerSpec( - testeeFactory: (Option) -> CollectingAssertionContainer, - describePrefix: String = "[Atrium] " -) : Spek({ - - fun describeFun(vararg funName: String, body: Suite.() -> Unit) = - describeFunTemplate(describePrefix, funName, body = body) - - val assertion: Assertion = object : Assertion { - override fun holds() = true - } - - describeFun(CollectingAssertionContainer::getAssertions.name) { - - - context("no assertion has been added so far") { - it("returns an empty list") { - expect(testeeFactory(Some(1)).getAssertions()).toBe(listOf()) - } - - context("an assertion is added") { - val testee by memoized(CachingMode.SCOPE) { - testeeFactory(Some(1)).addAssertion(assertion) - } - - it("returns the assertion") { - expect(testee.getAssertions()).toBe(listOf(assertion)) - } - - it("returns the assertion when calling ${CollectingAssertionContainer::getAssertions.name} a second time") { - expect(testee.getAssertions()).toBe(listOf(assertion)) - } - } - } - } - - describeFun(CollectingAssertionContainer::addAssertionsCreatedBy.name) { - it("adds a failing assertion in case an empty assertionCreator-lambda is passed") { - val testee = testeeFactory(Some(1)) - testee.addAssertionsCreatedBy { } - expect(testee.getAssertions()).containsExactly { - feature { f(it::holds) }.toBe(false) - } - } - } -}) diff --git a/misc/specs/atrium-specs-common/src/main/kotlin/ch/tutteli/atrium/specs/creating/ReportingAssertionContainerSpec.kt b/misc/specs/atrium-specs-common/src/main/kotlin/ch/tutteli/atrium/specs/creating/ReportingAssertionContainerSpec.kt deleted file mode 100644 index 0809e53a4..000000000 --- a/misc/specs/atrium-specs-common/src/main/kotlin/ch/tutteli/atrium/specs/creating/ReportingAssertionContainerSpec.kt +++ /dev/null @@ -1,148 +0,0 @@ -//TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.specs.creating - -import ch.tutteli.atrium.api.fluent.en_GB.messageContains -import ch.tutteli.atrium.api.fluent.en_GB.toThrow -import ch.tutteli.atrium.api.verbs.internal.expect -import ch.tutteli.atrium.assertions.DescriptiveAssertion -import ch.tutteli.atrium.core.Some -import ch.tutteli.atrium.core.coreFactory -import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.creating.ReportingAssertionContainer -import ch.tutteli.atrium.reporting.reporter -import ch.tutteli.atrium.specs.AssertionVerb -import ch.tutteli.atrium.specs.describeFunTemplate -import ch.tutteli.atrium.translations.DescriptionAnyAssertion.TO_BE -import org.spekframework.spek2.Spek -import org.spekframework.spek2.style.specification.Suite - -abstract class ReportingAssertionContainerSpec( - testeeFactory: (ReportingAssertionContainer.AssertionCheckerDecorator) -> ReportingAssertionContainer, - describePrefix: String = "[Atrium] " -) : Spek({ - - fun describeFun(vararg funName: String, body: Suite.() -> Unit) = - describeFunTemplate(describePrefix, funName, body = body) - - val assertionVerb = AssertionVerb.VERB - val subject = 10 - val description = TO_BE - val expected = -12 - - //This contains a side effect that reporter is fixed to no-op and since feature hard coded uses reporter and not - //reporter of current expect this is important for all tests to pass :( - expect(1) - fun createTestee() = testeeFactory( - ReportingAssertionContainer.AssertionCheckerDecorator.create( - assertionVerb, - Some(subject), - subject, - coreFactory.newThrowingAssertionChecker(reporter) - ) - ) - - fun triple( - funName: String, - holdingFun: Expect.() -> Expect, - failingFun: Expect.() -> Expect - ): Triple.() -> Expect, Expect.() -> Expect> = - Triple(funName, holdingFun, failingFun) - - val basicAssertionWhichHolds = object : DescriptiveAssertion { - override val description = description - override val representation = expected - override fun holds() = true - } - val basicAssertionWhichFails = object : DescriptiveAssertion { - override val description = description - override val representation = expected - override fun holds() = false - } - - val trueProvider: (Int) -> Boolean = { true } - val falseProvider: (Int) -> Boolean = { false } - - listOf( - triple( - "createAndAddAssertion", - { createAndAddAssertion(description, expected, trueProvider) }, - { createAndAddAssertion(description, expected, falseProvider) } - ), - triple( - Expect::addAssertion.name, - { addAssertion(basicAssertionWhichHolds) }, - { addAssertion(basicAssertionWhichFails) }), - triple( - "${Expect::addAssertionsCreatedBy.name} using createAndAddAssertion inside", - { addAssertionsCreatedBy { createAndAddAssertion(description, expected, trueProvider) } }, - { addAssertionsCreatedBy { createAndAddAssertion(description, expected, falseProvider) } } - ), - triple( - "${Expect::addAssertionsCreatedBy.name} using ${Expect::addAssertion.name} inside", - { addAssertionsCreatedBy { addAssertion(basicAssertionWhichHolds) } }, - { addAssertionsCreatedBy { addAssertion(basicAssertionWhichFails) } } - ), - triple( - "${Expect::addAssertionsCreatedBy.name} using ${Expect::addAssertionsCreatedBy.name} inside", - { addAssertionsCreatedBy { addAssertionsCreatedBy { addAssertion(basicAssertionWhichHolds) } } }, - { addAssertionsCreatedBy { addAssertionsCreatedBy { addAssertion(basicAssertionWhichFails) } } } - ) - ).forEach { (funName, holdingFun, failingFun) -> - describeFun(funName) { - context("in case of an assertion which holds") { - val testee = createTestee() - it("does not throw an Exception") { - testee.holdingFun() - } - - it("throws an AssertionError when an additional assertion does not hold") { - expect { - testee.failingFun() - }.toThrow() - } - } - - context("in case of assertion which fails") { - context("throws an AssertionError") { - fun expectFun(): Expect<() -> Any?> { - val testee = createTestee() - return expect { - testee.failingFun() - } - } - - context("exception message") { - - it("contains the assertion verb") { - expectFun().toThrow { messageContains(assertionVerb.getDefault()) } - } - it("contains the subject") { - expectFun().toThrow { - messageContains(subject) - } - } - it("contains the '${DescriptiveAssertion::description.name}' of the assertion-message") { - expectFun().toThrow { messageContains(description.getDefault()) } - } - it("contains the '${DescriptiveAssertion::representation.name}' of the assertion-message") { - expectFun().toThrow { messageContains(expected) } - } - } - - context("adding a another assertion which holds") { - val testee = createTestee() - expect { - testee.failingFun() - }.toThrow() - - it("does not re-throw due to the previous failing assertion") { - testee.holdingFun() - } - } - } - } - } - } -}) diff --git a/misc/specs/atrium-specs-common/src/main/kotlin/ch/tutteli/atrium/specs/integration/CharSequenceContainsExactlyAssertionsSpec.kt b/misc/specs/atrium-specs-common/src/main/kotlin/ch/tutteli/atrium/specs/integration/CharSequenceContainsExactlyAssertionsSpec.kt index 8c3771f5c..9a9a82602 100644 --- a/misc/specs/atrium-specs-common/src/main/kotlin/ch/tutteli/atrium/specs/integration/CharSequenceContainsExactlyAssertionsSpec.kt +++ b/misc/specs/atrium-specs-common/src/main/kotlin/ch/tutteli/atrium/specs/integration/CharSequenceContainsExactlyAssertionsSpec.kt @@ -6,6 +6,7 @@ import ch.tutteli.atrium.creating.Expect import ch.tutteli.atrium.specs.* import ch.tutteli.atrium.translations.DescriptionCharSequenceAssertion.EXACTLY import org.spekframework.spek2.style.specification.Suite +import org.spekframework.spek2.style.specification.describe abstract class CharSequenceContainsExactlyAssertionsSpec( containsExactlyPair: Pair<(String, String) -> String, Fun3>>, @@ -31,11 +32,11 @@ abstract class CharSequenceContainsExactlyAssertionsSpec( val fluent = expect(text as CharSequence) val fluentHelloWorld = expect(helloWorld as CharSequence) - fun Expect.containsExactlyFun(atLeast: Int, a: Any, vararg aX: Any) = - containsExactly(this, atLeast, a, aX) + fun Expect.containsExactlyFun(exactly: Int, a: Any, vararg aX: Any) = + containsExactly(this, exactly, a, aX) - fun Expect.containsExactlyIgnoringCaseFun(atLeast: Int, a: Any, vararg aX: Any) = - containsExactlyIgnoringCase(this, atLeast, a, aX) + fun Expect.containsExactlyIgnoringCaseFun(exactly: Int, a: Any, vararg aX: Any) = + containsExactlyIgnoringCase(this, exactly, a, aX) val exactly = EXACTLY.getDefault() val indentRootBulletPoint = " ".repeat(rootBulletPoint.length) @@ -68,6 +69,11 @@ abstract class CharSequenceContainsExactlyAssertionsSpec( } } + context("text 'aaaa'") { + it("search for 'aa' finds 3 hits since we want non disjoint matches") { + expect("aaaa" as CharSequence).containsExactlyFun(3, "aa") + } } + context("text '$helloWorld'") { context("happy case with $containsExactly once") { diff --git a/misc/specs/atrium-specs-common/src/main/kotlin/ch/tutteli/atrium/specs/integration/CharSequenceContainsRegexAssertionsSpec.kt b/misc/specs/atrium-specs-common/src/main/kotlin/ch/tutteli/atrium/specs/integration/CharSequenceContainsRegexAssertionsSpec.kt index 26db3a7d4..36a68ee77 100644 --- a/misc/specs/atrium-specs-common/src/main/kotlin/ch/tutteli/atrium/specs/integration/CharSequenceContainsRegexAssertionsSpec.kt +++ b/misc/specs/atrium-specs-common/src/main/kotlin/ch/tutteli/atrium/specs/integration/CharSequenceContainsRegexAssertionsSpec.kt @@ -1,8 +1,6 @@ package ch.tutteli.atrium.specs.integration -import ch.tutteli.atrium.api.fluent.en_GB.contains -import ch.tutteli.atrium.api.fluent.en_GB.message -import ch.tutteli.atrium.api.fluent.en_GB.toThrow +import ch.tutteli.atrium.api.fluent.en_GB.* import ch.tutteli.atrium.api.verbs.internal.expect import ch.tutteli.atrium.creating.Expect import ch.tutteli.atrium.specs.* diff --git a/misc/specs/atrium-specs-common/src/main/kotlin/ch/tutteli/atrium/specs/integration/IterableAnyAssertionsSpec.kt b/misc/specs/atrium-specs-common/src/main/kotlin/ch/tutteli/atrium/specs/integration/IterableAnyAssertionsSpec.kt index 353daab0c..41fd43f34 100644 --- a/misc/specs/atrium-specs-common/src/main/kotlin/ch/tutteli/atrium/specs/integration/IterableAnyAssertionsSpec.kt +++ b/misc/specs/atrium-specs-common/src/main/kotlin/ch/tutteli/atrium/specs/integration/IterableAnyAssertionsSpec.kt @@ -1,14 +1,10 @@ package ch.tutteli.atrium.specs.integration -import ch.tutteli.atrium.api.cc.en_GB.returnValueOf import ch.tutteli.atrium.api.fluent.en_GB.* import ch.tutteli.atrium.api.verbs.internal.expect import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.domain.builders.migration.asAssert -import ch.tutteli.atrium.domain.builders.migration.asExpect import ch.tutteli.atrium.specs.* import ch.tutteli.atrium.translations.DescriptionComparableAssertion -import ch.tutteli.atrium.creating.ErrorMessages abstract class IterableAnyAssertionsSpec( any: Fun1, Expect.() -> Unit>, @@ -57,18 +53,6 @@ abstract class IterableAnyAssertionsSpec( } } - //TODO remove with 1.0.0 - it("$returnValueOfFun(...) states warning that subject is not set") { - expect { - expect(fluentEmpty()).anyFun { - @Suppress("DEPRECATION") - asAssert().returnValueOf(subject::dec).asExpect().toBe(1.0) - } - }.toThrow { - @Suppress("DEPRECATION") - messageContains(ErrorMessages.SUBJECT_ACCESSED_TOO_EARLY.getDefault()) - } - } } context("iterable ${oneToSeven().toList()}") { diff --git a/misc/specs/atrium-specs-common/src/main/kotlin/ch/tutteli/atrium/specs/integration/IterableContainsInAnyOrderAtLeast1EntriesAssertionsSpec.kt b/misc/specs/atrium-specs-common/src/main/kotlin/ch/tutteli/atrium/specs/integration/IterableContainsInAnyOrderAtLeast1EntriesAssertionsSpec.kt index 7da0f08fe..0421fd49f 100644 --- a/misc/specs/atrium-specs-common/src/main/kotlin/ch/tutteli/atrium/specs/integration/IterableContainsInAnyOrderAtLeast1EntriesAssertionsSpec.kt +++ b/misc/specs/atrium-specs-common/src/main/kotlin/ch/tutteli/atrium/specs/integration/IterableContainsInAnyOrderAtLeast1EntriesAssertionsSpec.kt @@ -1,14 +1,10 @@ package ch.tutteli.atrium.specs.integration -import ch.tutteli.atrium.api.cc.en_GB.returnValueOf import ch.tutteli.atrium.api.fluent.en_GB.* import ch.tutteli.atrium.api.verbs.internal.expect import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.domain.builders.migration.asAssert -import ch.tutteli.atrium.domain.builders.migration.asExpect import ch.tutteli.atrium.logic.utils.expectLambda import ch.tutteli.atrium.specs.* -import ch.tutteli.atrium.creating.ErrorMessages abstract class IterableContainsInAnyOrderAtLeast1EntriesAssertionsSpec( containsInAnyOrderEntries: Fun2, Expect.() -> Unit, Array.() -> Unit>>, @@ -91,18 +87,6 @@ abstract class IterableContainsInAnyOrderAtLeast1EntriesAssertionsSpec( } } } - //TODO remove with 1.0.0 - it("$returnValueOfFun(...) states warning that subject is not set") { - expect { - expect(fluentEmpty()).containsEntriesFun({ - @Suppress("DEPRECATION") - asAssert().returnValueOf(subject::dec).asExpect().toBe(1.0) - }) - }.toThrow { - @Suppress("DEPRECATION") - messageContains(ErrorMessages.SUBJECT_ACCESSED_TOO_EARLY.getDefault()) - } - } } context("iterable ${oneToSeven().toList()}") { diff --git a/misc/specs/atrium-specs-common/src/main/kotlin/ch/tutteli/atrium/specs/integration/IterableContainsInAnyOrderOnlyEntriesAssertionsSpec.kt b/misc/specs/atrium-specs-common/src/main/kotlin/ch/tutteli/atrium/specs/integration/IterableContainsInAnyOrderOnlyEntriesAssertionsSpec.kt index 2065e5dd5..143abdb4c 100644 --- a/misc/specs/atrium-specs-common/src/main/kotlin/ch/tutteli/atrium/specs/integration/IterableContainsInAnyOrderOnlyEntriesAssertionsSpec.kt +++ b/misc/specs/atrium-specs-common/src/main/kotlin/ch/tutteli/atrium/specs/integration/IterableContainsInAnyOrderOnlyEntriesAssertionsSpec.kt @@ -1,14 +1,10 @@ package ch.tutteli.atrium.specs.integration -import ch.tutteli.atrium.api.cc.en_GB.returnValueOf import ch.tutteli.atrium.api.fluent.en_GB.* import ch.tutteli.atrium.api.verbs.internal.expect import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.domain.builders.migration.asAssert -import ch.tutteli.atrium.domain.builders.migration.asExpect import ch.tutteli.atrium.logic.utils.expectLambda import ch.tutteli.atrium.specs.* -import ch.tutteli.atrium.creating.ErrorMessages abstract class IterableContainsInAnyOrderOnlyEntriesAssertionsSpec( containsInAnyOrderOnlyEntries: Fun2, Expect.() -> Unit, Array.() -> Unit>>, @@ -100,19 +96,6 @@ abstract class IterableContainsInAnyOrderOnlyEntriesAssertionsSpec( } } } - - //TODO remove with 1.0.0 - it("$returnValueOfFun(...) states warning that subject is not set") { - expect { - expect(fluentEmpty()).containsEntriesFun({ - @Suppress("DEPRECATION") - asAssert().returnValueOf(subject::dec).asExpect().toBe(1.0) - }) - }.toThrow { - @Suppress("DEPRECATION") - messageContains(ErrorMessages.SUBJECT_ACCESSED_TOO_EARLY.getDefault()) - } - } } context("iterable ${oneToFour().toList()}") { diff --git a/misc/specs/atrium-specs-common/src/main/kotlin/ch/tutteli/atrium/specs/integration/IterableContainsInOrderOnlyEntriesAssertionsSpec.kt b/misc/specs/atrium-specs-common/src/main/kotlin/ch/tutteli/atrium/specs/integration/IterableContainsInOrderOnlyEntriesAssertionsSpec.kt index 5d7b728bd..e23822eae 100644 --- a/misc/specs/atrium-specs-common/src/main/kotlin/ch/tutteli/atrium/specs/integration/IterableContainsInOrderOnlyEntriesAssertionsSpec.kt +++ b/misc/specs/atrium-specs-common/src/main/kotlin/ch/tutteli/atrium/specs/integration/IterableContainsInOrderOnlyEntriesAssertionsSpec.kt @@ -1,14 +1,11 @@ package ch.tutteli.atrium.specs.integration -import ch.tutteli.atrium.api.cc.en_GB.returnValueOf import ch.tutteli.atrium.api.fluent.en_GB.* import ch.tutteli.atrium.api.verbs.internal.expect +import ch.tutteli.atrium.creating.ErrorMessages import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.domain.builders.migration.asAssert -import ch.tutteli.atrium.domain.builders.migration.asExpect import ch.tutteli.atrium.logic.utils.expectLambda import ch.tutteli.atrium.specs.* -import ch.tutteli.atrium.creating.ErrorMessages abstract class IterableContainsInOrderOnlyEntriesAssertionsSpec( containsInOrderOnlyEntries: Fun2, Expect.() -> Unit, Array.() -> Unit>>, @@ -118,18 +115,6 @@ abstract class IterableContainsInOrderOnlyEntriesAssertionsSpec( } } } - //TODO remove with 1.0.0 - it("$returnValueOfFun(...) states warning that subject is not set") { - expect { - expect(fluentEmpty()).containsEntriesFun({ - @Suppress("DEPRECATION") - asAssert().returnValueOf(subject::dec).asExpect().toBe(1.0) - }) - }.toThrow { - @Suppress("DEPRECATION") - messageContains(ErrorMessages.SUBJECT_ACCESSED_TOO_EARLY.getDefault()) - } - } } context("iterable ${oneToFour().toList()}") { diff --git a/misc/specs/atrium-specs-common/src/main/kotlin/ch/tutteli/atrium/specs/verbs/VerbSpec.kt b/misc/specs/atrium-specs-common/src/main/kotlin/ch/tutteli/atrium/specs/verbs/VerbSpec.kt index 5ea7dfca7..8f36583a4 100644 --- a/misc/specs/atrium-specs-common/src/main/kotlin/ch/tutteli/atrium/specs/verbs/VerbSpec.kt +++ b/misc/specs/atrium-specs-common/src/main/kotlin/ch/tutteli/atrium/specs/verbs/VerbSpec.kt @@ -3,7 +3,6 @@ package ch.tutteli.atrium.specs.verbs import ch.tutteli.atrium.api.fluent.en_GB.* import ch.tutteli.atrium.core.polyfills.fullName import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.domain.builders.ExpectImpl import ch.tutteli.atrium.domain.builders.reporting.ExpectBuilder import ch.tutteli.atrium.domain.builders.reporting.ExpectOptions import ch.tutteli.atrium.domain.builders.reporting.ReporterBuilder diff --git a/misc/specs/atrium-specs-js/build.gradle b/misc/specs/atrium-specs-js/build.gradle index 417322890..d04121135 100644 --- a/misc/specs/atrium-specs-js/build.gradle +++ b/misc/specs/atrium-specs-js/build.gradle @@ -14,12 +14,8 @@ dependencies { // `api` and not `implementation` in order that a depending module can use dependOn_... api prefixedProject('core-robstoll-js') api prefixedProject('domain-robstoll-js') - api prefixedProject('domain-robstoll-kotlin_1_3-js') implementation prefixedProject('api-fluent-en_GB-js') - - //TODO 1.0.0 remove, only needed for returnValueOf test - implementation prefixedProject('api-cc-en_GB-js') } dependencies { diff --git a/misc/specs/atrium-specs-jvm/build.gradle b/misc/specs/atrium-specs-jvm/build.gradle index 7532c9cd5..edc3e87c5 100644 --- a/misc/specs/atrium-specs-jvm/build.gradle +++ b/misc/specs/atrium-specs-jvm/build.gradle @@ -16,10 +16,6 @@ dependencies { // exclude this dependency in case you want to use another implementation runtimeOnly prefixedProject('core-robstoll-jvm') runtimeOnly prefixedProject('domain-robstoll-jvm') - runtimeOnly prefixedProject('domain-robstoll-kotlin_1_3-jvm') - - //TODO 1.0.0 remove, only needed for returnValueOf test - implementation prefixedProject('api-cc-en_GB-jvm') } dependencies { @@ -30,8 +26,6 @@ dependencies { api "org.spekframework.spek2:spek-dsl-jvm:$spek2_version", excludeKotlin runtimeOnly "org.spekframework.spek2:spek-runner-junit5:$spek2_version", excludeKotlin - //TODO #116 remove once there aren't any spek1 specs anymore - api "org.jetbrains.spek:spek-api:$spek_version", excludeKotlin api mockito(), excludeKotlin api niok(), excludeKotlin } diff --git a/misc/tools/atrium-bc-test/build.gradle b/misc/tools/atrium-bc-test/build.gradle index 71cc0f78f..9493206f7 100644 --- a/misc/tools/atrium-bc-test/build.gradle +++ b/misc/tools/atrium-bc-test/build.gradle @@ -21,12 +21,6 @@ dependencies { common "org.spekframework.spek2:spek-runtime-jvm:$spek2_version" common "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" - //spek1 - common "org.jetbrains.spek:spek-api:$spek_version", excludeKotlin - common "org.jetbrains.spek:spek-junit-platform-engine:$spek_version", excludeKotlin - common "org.junit.jupiter:junit-jupiter-engine:$jupiter_version" - common "org.junit.platform:junit-platform-console:$junit_platform_version" - common mockito(), excludeKotlin common kotlinStdlib() @@ -44,7 +38,7 @@ def bcTests = task("bcTests", group: 'Verification') { dependsOn build } -['fluent-en_GB', 'infix-en_GB', /* TODO remove with 1.0.0 => */ 'cc-de_CH', 'cc-en_GB', 'cc-infix-en_GB', 'cc-en_UK', 'cc-infix-en_UK'].each { apiName -> +['fluent-en_GB', 'infix-en_GB'].each { apiName -> task("bcBbc-$apiName", group: 'Verification') { description = "runs all backward compatibility and binary backward compatibility tests for $apiName" dependsOn build @@ -61,20 +55,30 @@ def bcTests = task("bcTests", group: 'Verification') { } } -def createBcAndBbcTasksForApis(String oldVersion, String forgive, String... apis) { +def createBcAndBbcTasksForApis(String oldVersion, String forgive, Boolean withBc, Boolean withBbc, String... apis) { - def bc_version = task("bc-$oldVersion", group: 'Verification') - def bbc_version = task("bbc-$oldVersion", group: 'Verification') + Task bc_version = null + Task bbc_version = null + if (withBc) { + bc_version = task("bc-$oldVersion", group: 'Verification') + } + if (withBbc) { + bbc_version = task("bbc-$oldVersion", group: 'Verification') + } apis.each { apiName -> - createBcAndBbcTasks(apiName, oldVersion, forgive) - bc_version.dependsOn "bc-${apiName}-$oldVersion" - bbc_version.dependsOn "bbc-${apiName}-$oldVersion" + createBcAndBbcTasks(apiName, oldVersion, forgive, withBc, withBbc) def bcBbcApi = project."bcBbc-$apiName" - bcBbcApi.dependsOn "bc-${apiName}-$oldVersion" - bcBbcApi.dependsOn "bbc-${apiName}-$oldVersion" - project."bc-$apiName".dependsOn "bc-${apiName}-$oldVersion" - project."bbc-$apiName".dependsOn "bbc-${apiName}-$oldVersion" + if (withBc) { + bc_version.dependsOn "bc-${apiName}-$oldVersion" + bcBbcApi.dependsOn "bc-${apiName}-$oldVersion" + project."bc-$apiName".dependsOn "bc-${apiName}-$oldVersion" + } + if (withBbc) { + bbc_version.dependsOn "bbc-${apiName}-$oldVersion" + bcBbcApi.dependsOn "bbc-${apiName}-$oldVersion" + project."bbc-$apiName".dependsOn "bbc-${apiName}-$oldVersion" + } } } @@ -83,13 +87,11 @@ Task createJacocoReportTask(String apiName, String name, Task runTask) { sourceSets sourceSets.main executionData runTask - def projects = apiName.contains('en_UK') || apiName.contains('en_GB') ? + def projects = apiName.contains('en_GB') ? jacocoMulti.sourceProjects : jacocoMulti.sourceProjects - prefixedProject('translations-en_GB-jvm') - - prefixedProject('translations-en_UK-deprecated') + - prefixedProject('translations-de_CH-jvm') + - prefixedProject('translations-de_CH-deprecated') + prefixedProject('translations-de_CH-jvm') projects.each { sourceSets it.sourceSets.main @@ -113,7 +115,7 @@ File getSrcDirectory(String apiName, String oldVersion) { return file("${project.projectDir}/src/old/$oldVersion/atrium-api-$apiName") } -def createBcAndBbcTasks(String apiName, String oldVersion, String forgive) { +def createBcAndBbcTasks(String apiName, String oldVersion, String forgive, Boolean withBc, Boolean withBbc) { def nameUnderline = getNameUnderline(apiName, oldVersion) def name = "${apiName}-$oldVersion" def srcName = "src_$nameUnderline" @@ -136,10 +138,8 @@ def createBcAndBbcTasks(String apiName, String oldVersion, String forgive) { create(testJarSources) } - def isFluentOrInfix = apiName.startsWith("fluent") || apiName.startsWith("infix") - dependencies { - def groupId = oldVersion == '0.6.0' ? 'ch.tutteli' : 'ch.tutteli.atrium' + def groupId = 'ch.tutteli.atrium' add(testJar, "$groupId:atrium-api-$apiName:$oldVersion:tests") { exclude group: '*' } @@ -147,58 +147,30 @@ def createBcAndBbcTasks(String apiName, String oldVersion, String forgive) { exclude group: '*' } - //TODO remove with 1.0.0, keep only else branch - if (oldVersion == '0.6.0') { - add(confCommon, "$groupId:atrium-spec:$oldVersion") { - exclude group: '*' - } - add(confCommon, prefixedProject("api-cc-en_UK")) { //required by atrium-spec - exclude group: '*' - } - } else if (oldVersion == '0.7.0' || oldVersion == '0.8.0') { - add(confCommon, "$groupId:atrium-spec:$oldVersion") { - exclude group: '*' - } - add(confCommon, prefixedProject("api-cc-en_GB-jvm")) { //required by atrium-spec - exclude group: '*' - } - if (!apiName.endsWith('cc-de_CH')) { - add(confCommon, prefixedProject("verbs-internal-jvm")) { //required by spec in the APIs - exclude group: '*' - } - } - } else { - //TODO tests are now mostly in the common module. However, we cannot unzip this to the jvm project but - // require a common module for it. Probably easiest to introduce a second bc-test which is an MPP project + //TODO tests are now mostly in the common module. However, we cannot unzip this to the jvm project but + // require a common module for it. Probably easiest to introduce a second bc-test which is an MPP project // add(testJarSources, "$groupId:atrium-api-$apiName-common:$oldVersion:testsources") { // exclude group: '*' // } - add(confCommon, "$groupId:atrium-specs:$oldVersion") { - exclude group: 'ch.tutteli.atrium' - } - add(confCommon, prefixedProject("verbs-internal-jvm")) { //required by specs in the APIs - exclude group: '*' - } + add(confCommon, "$groupId:atrium-specs:$oldVersion") { + exclude group: 'ch.tutteli.atrium' + } + //required by atrium-specs + add(confCommon, "$groupId:atrium-api-fluent-en_GB:$oldVersion") { + exclude group: 'ch.tutteli.atrium' + } + add(confCommon, prefixedProject("verbs-internal-jvm")) { //required by specs in the APIs + exclude group: '*' } - //TODO keep only if branch, remove the rest with 1.0.0 - if (isFluentOrInfix) { - //required by atrium-specs - add(confCommon, prefixedProject("$apiName-jvm")) + //required by atrium-specs + add(confCommon, prefixedProject("$apiName-jvm")) + + // dependencies for samples + add(confCommon, "org.jetbrains.kotlin:kotlin-test:$kotlin_version") + add(confCommon, "org.jetbrains.kotlin:kotlin-test-junit5:$kotlin_version") + add(confCommon, "org.junit.jupiter:junit-jupiter-engine:$jupiter_version") - //TODO remove if with 1.0.0 - // dependencies for samples - if (!(oldVersion in ['0.6.0', '0.7.0', '0.8.0', '0.9.0', '0.10.0', '0.11.0', '0.12.0', '0.13.0'])) { - //for samples - add(confCommon, "org.jetbrains.kotlin:kotlin-test:$kotlin_version") - add(confCommon, "org.jetbrains.kotlin:kotlin-test-junit5:$kotlin_version") - add(confCommon, "org.junit.jupiter:junit-jupiter-engine:$jupiter_version") - } - } else if (!apiName.endsWith('en_UK')) { - add(confCommon, prefixedProject("$apiName-robstoll-jvm")) - } else { - add(confCommon, prefixedProject("$apiName-robstoll")) - } add(confCommon, sourceSets.main.runtimeClasspath) owner."${srcName}Implementation" configurations[confCommon].dependencies @@ -209,7 +181,7 @@ def createBcAndBbcTasks(String apiName, String oldVersion, String forgive) { '--scan-class-path', scanClassPath, '--disable-banner', '--fail-if-no-tests', - '--include-engine', isFluentOrInfix ? 'spek2-deprecation' : 'spek1-deprecation', + '--include-engine', 'spek2-deprecation', // to execute samples '--include-engine', 'junit-jupiter', '--include-classname', '.*(Samples|Spec)', @@ -218,70 +190,76 @@ def createBcAndBbcTasks(String apiName, String oldVersion, String forgive) { ] } - def bbcTask = task("bbc-$name", type: JavaExec, group: 'Verification') { - description = "Checks if specs from $apiName $oldVersion can be run against the current version." - - inputs.files configurations[testJar] - inputs.files configurations[confCommon] - - classpath configurations[confCommon].asPath - classpath configurations[testJar].asPath - - main = 'org.junit.platform.console.ConsoleLauncher' - args = getArgs(configurations[testJar].asPath) - } - - def unzip = task("unzip-$name") { - inputs.files configurations[testJarSources] - - outputs.dir srcDirectory - doLast { - configurations[testJarSources].each { - def jar = it - copy { - from zipTree(jar) - into srcDirectory - } - } - } - } - - project."compileSrc_${nameUnderline}Kotlin" { - kotlinOptions.suppressWarnings = true - dependsOn unzip - } - - def bcTask = task("bc-$name", type: JavaExec, group: 'Verification') { - description = "Checks if specs from $apiName $oldVersion can be compiled and run against the current version." - - inputs.files sourceSets[srcName].runtimeClasspath - - classpath sourceSets[srcName].runtimeClasspath - - main = 'org.junit.platform.console.ConsoleLauncher' - args = getArgs(sourceSets[srcName].output.classesDirs.asPath) - } - apply plugin: 'jacoco' jacoco { toolVersion = "$jacoco_tool_version" - applyTo bcTask - applyTo bbcTask } - def jacocoBbcReport = createJacocoReportTask(apiName, "bbc-$name", bbcTask) - def jacocoBcReport = createJacocoReportTask(apiName, "bc-$name", bcTask) + if (withBbc) { + def bbcTask = task("bbc-$name", type: JavaExec, group: 'Verification') { + description = "Checks if specs from $apiName $oldVersion can be run against the current version." - //if we want it to be part of the build - //check.dependsOn jacocoReport - //check.dependsOn bbcTask - //check.dependsOn bcTask + inputs.files configurations[testJar] + inputs.files configurations[confCommon] - bbcTests.dependsOn jacocoBbcReport - bbcTests.dependsOn bbcTask - bcTests.dependsOn jacocoBcReport - bcTests.dependsOn bcTask + classpath configurations[confCommon].asPath + classpath configurations[testJar].asPath + + main = 'org.junit.platform.console.ConsoleLauncher' + args = getArgs(configurations[testJar].asPath) + } + + def jacocoBbcReport = createJacocoReportTask(apiName, "bbc-$name", bbcTask) + jacoco { + applyTo bbcTask + } + + bbcTests.dependsOn jacocoBbcReport + bbcTests.dependsOn bbcTask + } + + if (withBc) { + + def unzip = task("unzip-$name") { + inputs.files configurations[testJarSources] + + outputs.dir srcDirectory + doLast { + configurations[testJarSources].each { + def jar = it + copy { + from zipTree(jar) + into srcDirectory + } + } + } + } + + + project."compileSrc_${nameUnderline}Kotlin" { + kotlinOptions.suppressWarnings = true + dependsOn unzip + } + + def bcTask = task("bc-$name", type: JavaExec, group: 'Verification') { + description = "Checks if specs from $apiName $oldVersion can be compiled and run against the current version." + + inputs.files sourceSets[srcName].runtimeClasspath + + classpath sourceSets[srcName].runtimeClasspath + + main = 'org.junit.platform.console.ConsoleLauncher' + args = getArgs(sourceSets[srcName].output.classesDirs.asPath) + } + + def jacocoBcReport = createJacocoReportTask(apiName, "bc-$name", bcTask) + jacoco { + applyTo bcTask + } + bcTests.dependsOn jacocoBcReport + bcTests.dependsOn bcTask + } } def createFixSrcTask(String apiName, String oldVersion, String file, Closure modifyContent) { @@ -300,171 +278,18 @@ def createFixSrcTask(String apiName, String oldVersion, String file, Closure mod } //@formatter:off -createBcAndBbcTasksForApis('0.6.0', - 'forgive=.*ch\\.tutteli\\.atrium\\.api\\.cc\\.(de_CH|en_UK|infix\\.en_UK)\\.(' + - '(IterableContainsNotAssertionsSpec.*:(enthaeltNicht|containsNot|notTo contain) 4.0 throws AssertionError.*)|' + - '(IterableContainsInAnyOrderNotOrAtMostObjectsAssertionsSpec.*:(' + - '((enthaelt|contains|to contain) 5.0 (nichtOderHoechstens|notOrAtMost) once throws AssertionError)|' + - '((enthaelt|contains|to contain) 5.0 and 4.0 (nichtOderHoechstens|notOrAtMost) twice throws AssertionError)' + - ').*)|' + - '(IterableContainsInAnyOrderExactlyObjectsAssertionsSpec.*:(' + - '((enthaelt|contains|to contain) 5.0 (genau|exactly) 3 times throws AssertionError)|' + - '((enthaelt|contains|to contain) 5.0 and 4.0 (genau|exactly) twice throws AssertionError)|' + - '((enthaelt|contains|to contain) 5.0 and 4.0 (genau|exactly) 3 times throws AssertionError)' + - ').*)|' + - '(IterableContainsInAnyOrderAtMostObjectsAssertionsSpec.*:(enthaelt|contains|to contain) 5.0 and 4.0 (hoechstens|atMost) twice throws AssertionError.*)|' + - '(IterableContainsInAnyOrderAtLeastObjectsAssertionsSpec.*:(' + - '((enthaelt|contains|to contain) 5.0 in any order (zumindest|atLeast) 3 times throws AssertionError)|' + - '((enthaelt|contains|to contain) 5.0 and 4.0 in any order (zumindest|atLeast) 3 times throws AssertionError)|' + - '((enthaelt|contains|to contain) 5.0 and 4.0 (zumindest|atLeast) once (aberHoechstens|butAtMost) twice throws AssertionError)|' + - '((enthaelt|contains|to contain) 5.0 and 4.0 (zumindest|atLeast) 3 times (aberHoechstens|butAtMost) 4 times throws AssertionError)' + - ').*)|' + - '(CharSequenceContainsNotOrAtMostAssertionsSpec.*:(' + - '((enthaelt|contains|to contain) \'o\' (nichtOderHoechstens|notOrAtMost) once throws AssertionError)|' + - '((enthaelt|contains|to contain) \'o\' and \'l\' (nichtOderHoechstens|notOrAtMost) twice throws AssertionError)' + - ').*)|' + - '(CharSequenceContainsNotAssertionsSpec.*:(' + - '((enthaeltNicht|containsNot|notTo contain) \'l\' throws AssertionError)|' + - '((enthaeltNicht|containsNot|notTo contain) \'H\', \'l\' throws AssertionError)|' + - '((enthaeltNicht|containsNot|notTo contain) \'l\', \'H\' once throws AssertionError)|' + - '((enthaeltNicht|containsNot|notTo contain) (ignoriereGrossKleinschreibung|ignoringCase|ignoring case) \'H\', \'l\' throws AssertionError)' + - ').*)|' + - '(CharSequenceContainsExactlyAssertionsSpec.*:(' + - '((enthaelt|contains|to contain) (ignoriereGrossKleinschreibung|ignoringCase|ignoring case) \'o\' (genau|exactly) twice throws)|' + - '((enthaelt|contains|to contain) \'o\' (genau|exactly) 3 times throws AssertionError)|' + - '((enthaelt|contains|to contain) \'o\' and \'l\' (genau|exactly) twice throws AssertionError)|' + - '((enthaelt|contains|to contain) \'o\' and \'l\' (genau|exactly) 3 times throws AssertionError)' + - ').*)|' + - '(CharSequenceContainsContainsNotAssertionsSpec.*:(enthaelt|contains|contains Values) \'hello\' and \'robert\' throws AssertionError.*)|' + - '(CharSequenceContainsAtMostAssertionsSpec.*:(' + - '((enthaelt|contains|to contain) (ignoriereGrossKleinschreibung|ignoringCase|ignoring case) \'o\' (hoechstens|atMost) twice throws AssertionError )|' + - '((enthaelt|contains|to contain) \'o\' and \'l\' (hoechstens|atMost) twice throws AssertionError)' + - ').*)|' + - '(CharSequenceContainsAtLeastAssertionsSpec.*:(' + - '((enthaelt|contains|to contain) \'o\' (zumindest|atLeast) 3 times throws AssertionError)|' + - '((enthaelt|contains|to contain) \'o\' and \'l\' (zumindest|atLeast) 3 times throws AssertionError)|' + - '((enthaelt|contains|to contain) \'o\' and \'l\' (zumindest|atLeast) once (aberHoechstens|butAtMost) twice throws AssertionError)|' + - '((enthaelt|contains|to contain) \'o\' and \'l\' (zumindest|atLeast) 3 times (aberHoechstens|butAtMost) 4 times throws AssertionError)' + - ').*)|' + - '(CharSequenceAssertionsSpec.*:(' + - '((enthaeltStandardUebersetzungVon|containsDefaultTranslationOf|contains DefaultTranslationsOf) HELLO and WELCOME, throws AssertionError)|' + - '((enthaeltNichtDieStandardUebersetzungVon|containsNotDefaultTranslationOf|containsNot DefaultTranslationsOf) HELLO and WELCOME, throws AssertionError)|' + - '(.*can be used in ExplanatoryAssertionGroup and reported without failure.*fun `(' + - 'enthaeltStandardUebersetzungVon|enthaeltNichtDieStandardUebersetzungVon|' + - 'containsDefaultTranslationOf|containsNotDefaultTranslationOf|' + - '(contains DefaultTranslationsOf)|(containsNot DefaultTranslationsOf)' + - ')`)' + - ').*)|' + - '(Iterable.*Spec.*fun.*`[^`]*(' + - 'enthaelt|enthaeltNicht|enthaeltStrikt|eintraege|' + - 'contains|containsNot|containsStrictly|[Ee]ntries' + - ')`.*(error cases|failing cases|context empty collection).*)|' + - '(CollectionAssertionsSpec.*(hatDieGroesse|hasSize).*)|' + - '(BigDecimalAssertionsSpec.*throws UnsupportedOperationException.*)|' + - '(FloatingPointAssertionsSpec.*throws AssertionError.*)|' + - '(FloatingPointWithErrorToleranceAssertionsSpec.*throws AssertionError.*)|' + - '(ThrowableAssertionsSpec.*throws an AssertionError.*shows message and stacktrace.*)' + - ')', - 'cc-de_CH', 'cc-en_UK', 'cc-infix-en_UK' -) -createBcAndBbcTasksForApis('0.7.0', - 'forgive=(.*ch\\.tutteli\\.atrium\\.api\\.cc\\.(de_CH|en_UK|en_GB|(infix\\.(en_UK|en_GB)))\\.(' + - '(FloatingPointWithErrorToleranceAssertionsSpec.*throws AssertionError.*)|' + - '(ThrowableAssertionsSpec.*throws an AssertionError.*shows message and stacktrace.*)|' + - '(CharSequenceContainsRegexAssertionsSpec.*16 times throws AssertionError.*)|' + - '(ComparableAssertionsSpec.*(isGreaterOrEquals|istGroesserOderGleich|isLessOrEquals|istKleinerOderGleich).*)' + - '))|(.*ch\\.tutteli\\.atrium\\.VerbSpec.*which immediately evaluates assertions.*)', - 'cc-de_CH', 'cc-en_GB', 'cc-infix-en_GB' -) -createBcAndBbcTasksForApis('0.8.0', - 'forgive=(.*ch\\.tutteli\\.atrium\\.api\\.cc\\.(de_CH|en_GB|(infix\\.en_GB))\\.('+ - '(CharSequenceContainsRegexAssertionsSpec.*(16 times throws AssertionError|(roberto?.*once throws AssertionError)).*)|' + - '(ComparableAssertionsSpec.*(isGreaterOrEquals|istGroesserOderGleich|isLessOrEquals|istKleinerOderGleich).*)' + - '))|(.*ch\\.tutteli\\.atrium\\.VerbSpec.*which immediately evaluates assertions.*)', - 'cc-de_CH', 'cc-en_GB', 'cc-infix-en_GB' -) -createBcAndBbcTasksForApis('0.9.2', - 'forgive=(ch/tutteli/atrium/api/fluent/en_GB/('+ - '(ComparableAssertionsSpec.*(isLessThanOrEqual|isGreaterThanOrEqual))|'+ - '(IterableContainsInOrderOnly.*Spec)'+ - ').*)', - 'fluent-en_GB' -) -createBcAndBbcTasksForApis('0.10.0', - 'forgive=(ch/tutteli/atrium/api/fluent/en_GB/('+ - '(ComparableAssertionsSpec.*(isLessThanOrEqual|isGreaterThanOrEqual))|'+ - '(IterableContainsInOrderOnly.*Spec)'+ - ').*)', - 'fluent-en_GB' -) -createBcAndBbcTasksForApis('0.11.1', - 'forgive=(ch/tutteli/atrium/api/fluent/en_GB/('+ - '(ComparableAssertionsSpec.*(isLessThanOrEqual|isGreaterThanOrEqual))|'+ - '(Fun0AssertionsSpec.*/notToThrow( \\(feature\\))? - throws an AssertionError)|'+ - '(IterableContainsInOrderOnly.*Spec)'+ - ').*)', - 'fluent-en_GB' -) -createBcAndBbcTasksForApis('0.12.0', - 'forgive=(ch/tutteli/atrium/api/fluent/en_GB/(' + - '(PathAssertionsSpec/.*`is(Readable|Writable|RegularFile|Directory)`)'+ - ').*)|(ch/tutteli/atrium/api/infix/en_GB/(' + - '(Fun0AssertionsJvmSpec/)|' + - '(PathAssertionsSpec/.*`toBe (readable|writable|aRegularFile|aDirectory)`)' + - ').*)|(ch/tutteli/atrium/api/(fluent|infix)/en_GB/('+ - '(ComparableAssertionsSpec.*(isLessThanOrEqual|isGreaterThanOrEqual))|'+ - '(Fun0AssertionsSpec.*/notToThrow( \\(feature\\))? - throws an AssertionError)|'+ - '(IterableContainsInOrderOnly.*Spec)'+ - ').*)', - 'fluent-en_GB','infix-en_GB' -) -// we are not setting up bbc/bc tests for 0.13.0. The problem is: -// We inline toThrow, making atrium-logic part of the API in binary terms. atrium-logic is experimental though and we -// changed toThrow -- we are no longer using ChangedSubjectPostStep -- making almost every spec fail. Forgiving each -// does not make sensen -//createBcAndBbcTasksForApis('0.13.0', -//// 'forgive=(.*(\\(feature\\)|(describe empty assertion creator lambda)).*)', -// 'forgive=^$', -// 'fluent-en_GB', 'infix-en_GB') -//@formatter:on - createBcAndBbcTasksForApis('0.14.0', 'forgive=(ch/tutteli/atrium/api/(fluent|infix)/en_GB/(' + '(IterableContainsInOrderOnly.*Spec)|' + '(MapAssertionsSpec.*)' + - ').*)', + ').*)', + /* withBc = */ true, + /* withBbc = */ false, 'fluent-en_GB', 'infix-en_GB' ) createBcAndBbcTasksForApis('0.15.0', 'forgive=^$', + /* withBc = */ true, + /* withBbc = */ false, 'fluent-en_GB', 'infix-en_GB' ) - -['cc-de_CH', 'cc-en_GB', 'cc-infix-en_GB'].each { apiName -> - createFixSrcTask(apiName, '0.7.0', 'ArrayAsIterableAssertionsSpec.kt') { String content -> - return content.replaceAll(/Assert>::asIterable.name/, '"asIterable"') - } - createFixSrcTask(apiName, '0.7.0', 'IterableContainsInOrderOnlyGroupedEntriesAssertionsSpec.kt') { String content -> - return content.replaceAll(/ ((?:Entry|Eintrag)\(groups\[0]\)|(?:Entries|Eintraege)\(groups\[0], \*groups.drop\(1\)\.toTypedArray\(\)\))/, ' $1 as GroupWithoutNullableEntries.() -> Unit>') - } -} -createFixSrcTask('cc-infix-en_GB', '0.7.0', 'BigDecimalAssertionsSpec.kt') { String content -> - return content.replaceAll(/Assert::toBe.name/, '"toBe"').replaceAll(/Assert::notToBe.name/, '"notToBe"') -} -createFixSrcTask('cc-infix-en_GB', '0.7.0', 'CharSequenceAssertionsSpec.kt') { String content -> - return content.replaceAll(/"\$\{Assert::notToBe.name}/, '"notToBe') -} -createFixSrcTask('cc-infix-en_GB', '0.7.0', 'IterableContainsInOrderOnlyValuesAssertionsSpec.kt') { String content -> - return content.replaceAll(/NullableValues/, 'NullableValues') -} -['fluent-en_GB', 'infix-en_GB'].each { apiName -> - createFixSrcTask(apiName, '0.12.0', 'ChronoLocalDateTimeAssertionSpec.kt') { String content -> - return content.replaceAll(/ fun1/, ' fun1, ChronoLocalDateTime<*>>') - } - createFixSrcTask(apiName, '0.12.0', 'ChronoLocalDateAssertionsSpec.kt') { String content -> - return content.replaceAll(/ fun1/, ' fun1') - } - createFixSrcTask(apiName, '0.12.0', 'ChronoZonedDateTimeAssertionSpec.kt') { String content -> - return content.replaceAll(/ fun1/, ' fun1, ChronoZonedDateTime<*>>') - } -} diff --git a/misc/tools/atrium-bc-test/src/main/kotlin/ch/tutteil/atrium/bctest/DeprecationSpek1TestEngine.kt b/misc/tools/atrium-bc-test/src/main/kotlin/ch/tutteil/atrium/bctest/DeprecationSpek1TestEngine.kt deleted file mode 100644 index 944b2c2d3..000000000 --- a/misc/tools/atrium-bc-test/src/main/kotlin/ch/tutteil/atrium/bctest/DeprecationSpek1TestEngine.kt +++ /dev/null @@ -1,93 +0,0 @@ -package ch.tutteil.atrium.bctest - -import org.jetbrains.spek.engine.Scope -import org.jetbrains.spek.engine.SpekEngineDescriptor -import org.jetbrains.spek.engine.SpekExecutionContext -import org.jetbrains.spek.engine.SpekTestEngine -import org.junit.platform.engine.* -import org.junit.platform.engine.support.descriptor.AbstractTestDescriptor -import org.junit.platform.engine.support.hierarchical.Node -import java.lang.reflect.InvocationTargetException - -/** - * Represents a [TestEngine] (id 'spek-deprecation') which uses the [SpekTestEngine] but allows to define tests - * which shall be converted to [ForgivingTest]s. - * - * Which tests shall be forgivable can be defined with the custom config property `forgive` and a regular expression - * matches desired [UniqueId]s. For instance: - * - * `forgive=.*\.Iterable\..*` - * - * Turns all tests containing `.Iterable.` in their [UniqueId] into a [ForgivingTest]. - * - * Moreover, the engine fails if no tests were discovered or if an error occurs during discovery. - */ -class DeprecationSpek1TestEngine : TestEngine { - private val spek = SpekTestEngine() - - override fun getId() = "spek1-deprecation" - override fun execute(request: ExecutionRequest) = spek.execute(request) - - override fun discover(discoveryRequest: EngineDiscoveryRequest, uniqueId: UniqueId): TestDescriptor { - return try { - val descriptor = spek.discover(discoveryRequest, uniqueId) - val forgive = discoveryRequest.configurationParameters.get("forgive").orElse(null) - if (forgive != null) { - exchangeWithForgivingTests(descriptor, Regex(forgive)) - } - require(descriptor.children.isNotEmpty()) { - "Could not find any specification, check your runtime classpath" - } - descriptor - } catch (t: Throwable) { - //since the junit gradle platform does not treat an error during discovery as failure, - // we have to return a fake descriptor which fails - // TODO check if this changes with https://github.com/junit-team/junit5/issues/1298 - SpekEngineDescriptor(uniqueId).apply { - addChild(DiscoveryFailed(uniqueId, t)) - } - } - } - - private fun exchangeWithForgivingTests(descriptor: TestDescriptor, testToForgive: Regex) { - descriptor.children.toList().forEach { child -> - if (child is Scope.Test) { - if (child.uniqueId.toString().matches(testToForgive)) { - val parent = child.getParent() - descriptor.removeChild(child) - parent.ifPresent { - child.setParent(it) - } - val forgivingTest = ForgivingTest(child) - descriptor.addChild(forgivingTest) - } - } - exchangeWithForgivingTests(child, testToForgive) - } - } - - private class DiscoveryFailed( - uniqueId: UniqueId, - private val throwable: Throwable - ) : AbstractTestDescriptor(uniqueId.append("discovery", "fail"), "discovering specifications"), - Node { - - override fun getType() = TestDescriptor.Type.TEST - override fun execute(context: SpekExecutionContext?, dynamicTestExecutor: Node.DynamicTestExecutor?) = - when (throwable) { - is InvocationTargetException -> - throw AssertionError( - "InvocationTargetException occurred with targetException:" + - "\n ${throwable.targetException}", - throwable - ) - is ExceptionInInitializerError -> throw AssertionError( - "ExceptionInInitializerError occurred with exception:" + - "\n ${throwable.exception}", - throwable - ) - - else -> throw throwable - } - } -} diff --git a/misc/tools/atrium-bc-test/src/main/kotlin/ch/tutteil/atrium/bctest/ForgivingTest.kt b/misc/tools/atrium-bc-test/src/main/kotlin/ch/tutteil/atrium/bctest/ForgivingTest.kt deleted file mode 100644 index 7f1b5233c..000000000 --- a/misc/tools/atrium-bc-test/src/main/kotlin/ch/tutteil/atrium/bctest/ForgivingTest.kt +++ /dev/null @@ -1,36 +0,0 @@ -package ch.tutteil.atrium.bctest - -import org.jetbrains.spek.api.dsl.TestBody -import org.jetbrains.spek.api.lifecycle.TestScope -import org.jetbrains.spek.engine.Scope -import org.jetbrains.spek.engine.SpekExecutionContext -import org.junit.platform.engine.TestDescriptor -import org.junit.platform.engine.support.hierarchical.Node - -/** - * Represents a [TestScope] which accepts [AssertionError] but fails for any other exception. - */ -class ForgivingTest(private val test: Test) : - Scope.Group(test.uniqueId, test.pending, test.source, test.lifecycleManager) - , Node by test - , TestScope by test { - - override val parent = test.parent - override fun getType() = TestDescriptor.Type.TEST - - override fun execute( - context: SpekExecutionContext, - dynamicTestExecutor: Node.DynamicTestExecutor? - ): SpekExecutionContext { - try { - test.body.invoke(object : TestBody {}) - } catch (e: AssertionError) { - println("forgiving $test") - } catch (@Suppress("DEPRECATION") e: ch.tutteli.atrium.creating.PlantHasNoSubjectException) { - println("forgiving $test") - } catch (e: IllegalArgumentException) { - println("forgiving $test") - } - return context - } -} diff --git a/misc/tools/atrium-bc-test/src/main/resources/META-INF/services/org.junit.platform.engine.TestEngine b/misc/tools/atrium-bc-test/src/main/resources/META-INF/services/org.junit.platform.engine.TestEngine index bf07e15e0..79e44fc47 100644 --- a/misc/tools/atrium-bc-test/src/main/resources/META-INF/services/org.junit.platform.engine.TestEngine +++ b/misc/tools/atrium-bc-test/src/main/resources/META-INF/services/org.junit.platform.engine.TestEngine @@ -1,2 +1 @@ - ch.tutteil.atrium.bctest.DeprecationSpek1TestEngine ch.tutteil.atrium.bctest.DeprecationSpek2TestEngine diff --git a/misc/tools/readme-examples/src/main/kotlin/readme/examples/ReadmeSpec.kt b/misc/tools/readme-examples/src/main/kotlin/readme/examples/ReadmeSpec.kt index 1ef030c84..f61c7d675 100644 --- a/misc/tools/readme-examples/src/main/kotlin/readme/examples/ReadmeSpec.kt +++ b/misc/tools/readme-examples/src/main/kotlin/readme/examples/ReadmeSpec.kt @@ -1,5 +1,6 @@ package readme.examples +//@formatter:off //snippet-import-start import ch.tutteli.atrium.api.fluent.en_GB.* import ch.tutteli.atrium.api.verbs.expect @@ -9,7 +10,6 @@ import ch.tutteli.atrium.api.fluent.en_GB.isRegularFile import ch.tutteli.atrium.api.fluent.en_GB.isWritable import ch.tutteli.atrium.assertions.Assertion import ch.tutteli.atrium.creating.Expect -import ch.tutteli.atrium.domain.builders.ExpectImpl //snippet-mapArguments-start import ch.tutteli.atrium.logic.utils.mapArguments //snippet-mapArguments-end @@ -22,6 +22,7 @@ import ch.tutteli.atrium.creating.AssertionContainer //snippet-import-logic-start import ch.tutteli.atrium.logic.* //snippet-import-logic-end +//@formatter:on import ch.tutteli.atrium.reporting.Text import ch.tutteli.atrium.reporting.translating.StringBasedTranslatable import ch.tutteli.atrium.translations.DescriptionBasic diff --git a/misc/verbs-internal/atrium-verbs-internal-common/build.gradle b/misc/verbs-internal/atrium-verbs-internal-common/build.gradle index 458dcb303..4c37c9376 100644 --- a/misc/verbs-internal/atrium-verbs-internal-common/build.gradle +++ b/misc/verbs-internal/atrium-verbs-internal-common/build.gradle @@ -4,7 +4,6 @@ dependencies { api prefixedProject('core-api-common') api prefixedProject('domain-builders-common') - runtimeOnly prefixedProject('domain-robstoll-common') runtimeOnly prefixedProject('core-robstoll-common') testImplementation prefixedProject('specs-common') diff --git a/misc/verbs-internal/atrium-verbs-internal-common/src/main/kotlin/ch/tutteli/atrium/verbs/internal/atriumVerbs.kt b/misc/verbs-internal/atrium-verbs-internal-common/src/main/kotlin/ch/tutteli/atrium/verbs/internal/atriumVerbs.kt deleted file mode 100644 index 34c8f1893..000000000 --- a/misc/verbs-internal/atrium-verbs-internal-common/src/main/kotlin/ch/tutteli/atrium/verbs/internal/atriumVerbs.kt +++ /dev/null @@ -1,80 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") - -package ch.tutteli.atrium.verbs.internal - -import ch.tutteli.atrium.core.newReportingPlantNullable -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.domain.builders.AssertImpl -import ch.tutteli.atrium.domain.builders.reporting.ReporterBuilder -import ch.tutteli.atrium.reporting.Reporter -import ch.tutteli.atrium.reporting.ReporterFactory -import ch.tutteli.atrium.reporting.reporter -import ch.tutteli.atrium.reporting.translating.StringBasedTranslatable - -@Suppress("DEPRECATION") -@Deprecated("use ch.tutteli.atrium.api.verbs.expect instead; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.verbs.expect(subject)")) -fun assert(subject: T) = AssertImpl.coreFactory.newReportingPlant(AssertionVerb.ASSERT, { subject }, reporter) - -@Suppress("DEPRECATION") -@Deprecated("use ch.tutteli.atrium.api.verbs.expect instead; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.verbs.expect(subject, assertionCreator)")) -fun assert(subject: T, assertionCreator: Assert.() -> Unit) = - AssertImpl.coreFactory.newReportingPlantAndAddAssertionsCreatedBy( - AssertionVerb.ASSERT, - { subject }, - reporter, - assertionCreator - ) - -@Suppress("DEPRECATION") -@Deprecated("use ch.tutteli.atrium.api.verbs.expect instead; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.verbs.expect(subject)")) -fun assert(subject: T) = - AssertImpl.coreFactory.newReportingPlantNullable(AssertionVerb.ASSERT, { subject }, reporter) - -@Suppress("DEPRECATION") -@Deprecated("use ch.tutteli.atrium.api.verbs.expect instead; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.verbs.expect(subject)")) -fun expect(act: () -> Unit) = AssertImpl.throwable.thrownBuilder(AssertionVerb.EXPECT_THROWN, act, reporter) - -@Deprecated("Switch to api.verbs.internal.AssertionVerb; will be removed with 1.0.0") -@Suppress("DEPRECATION") -/** - * Deprecated, switch to api.verbs.internal.AssertionVerb; will be removed with 1.0.0 - */ -enum class AssertionVerb(override val value: String) : StringBasedTranslatable { - ASSERT("assert"), - EXPECT_THROWN("expect the thrown exception"), - ; - - init { - // we specify the factory here because we only need to specify it once and - // we do not want to specify it if it is not used. The verbs have to be loaded on their first usage - // and thus this is a good place. - @Suppress("DEPRECATION") - ReporterFactory.specifyFactoryIfNotYetSet(NoAdjustingReporterFactory.ID) - } -} - -@Deprecated( - "Switch to api.verbs.internal.NoAdjustingReporterFactory; will be removed with 1.0.0", - ReplaceWith("ch.tutteli.atrium.api.verbs.internal.NoAdjustingReporterFactory") -) -class NoAdjustingReporterFactory : ReporterFactory { - override val id: String = ID - - override fun create(): Reporter { - return ReporterBuilder.create() - .withoutTranslationsUseDefaultLocale() - .withDetailedObjectFormatter() - .withDefaultAssertionFormatterController() - .withDefaultAssertionFormatterFacade() - .withTextSameLineAssertionPairFormatter() - .withTextCapabilities() - .withNoOpAtriumErrorAdjuster() - .withOnlyFailureReporter() - .build() - } - - companion object { - const val ID: String = "default-no-adjusting" - } -} diff --git a/misc/verbs-internal/atrium-verbs-internal-js/build.gradle b/misc/verbs-internal/atrium-verbs-internal-js/build.gradle index 27f26b498..5ee2869e4 100644 --- a/misc/verbs-internal/atrium-verbs-internal-js/build.gradle +++ b/misc/verbs-internal/atrium-verbs-internal-js/build.gradle @@ -4,7 +4,6 @@ dependencies { api prefixedProject('core-api-js') api prefixedProject('domain-builders-js') - runtimeOnly prefixedProject('domain-robstoll-js') runtimeOnly prefixedProject('core-robstoll-js') testImplementation prefixedProject('specs-js') diff --git a/misc/verbs-internal/atrium-verbs-internal-js/src/main/kotlin/ch/tutteli/atrium/verbs/internal/registerServices.kt b/misc/verbs-internal/atrium-verbs-internal-js/src/main/kotlin/ch/tutteli/atrium/verbs/internal/registerServices.kt index 7ee6f1658..d67a2ea86 100644 --- a/misc/verbs-internal/atrium-verbs-internal-js/src/main/kotlin/ch/tutteli/atrium/verbs/internal/registerServices.kt +++ b/misc/verbs-internal/atrium-verbs-internal-js/src/main/kotlin/ch/tutteli/atrium/verbs/internal/registerServices.kt @@ -7,5 +7,5 @@ import ch.tutteli.atrium.core.polyfills.registerService @Suppress("unused" /* here in order that the code is executed when module is loaded */) private val register = run { - registerService { ch.tutteli.atrium.verbs.internal.NoAdjustingReporterFactory() } + registerService { ch.tutteli.atrium.api.verbs.internal.NoAdjustingReporterFactory() } } diff --git a/misc/verbs-internal/atrium-verbs-internal-jvm/build.gradle b/misc/verbs-internal/atrium-verbs-internal-jvm/build.gradle index 0713f78e0..be9ce500e 100644 --- a/misc/verbs-internal/atrium-verbs-internal-jvm/build.gradle +++ b/misc/verbs-internal/atrium-verbs-internal-jvm/build.gradle @@ -3,9 +3,7 @@ description = 'Specifies the internally used assertion verbs' dependencies { api prefixedProject('domain-builders-jvm') api prefixedProject('core-api-jvm') - api prefixedProject('spec') - runtimeOnly prefixedProject('domain-robstoll-jvm') runtimeOnly prefixedProject('core-robstoll-jvm') testImplementation prefixedProject('specs-jvm') diff --git a/misc/verbs-internal/atrium-verbs-internal-jvm/src/main/kotlin/ch/tutteli/atrium/verbs/internal/AssertionVerbFactory.kt b/misc/verbs-internal/atrium-verbs-internal-jvm/src/main/kotlin/ch/tutteli/atrium/verbs/internal/AssertionVerbFactory.kt deleted file mode 100644 index bdedac92b..000000000 --- a/misc/verbs-internal/atrium-verbs-internal-jvm/src/main/kotlin/ch/tutteli/atrium/verbs/internal/AssertionVerbFactory.kt +++ /dev/null @@ -1,24 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") -package ch.tutteli.atrium.verbs.internal - -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.reporting.ObjectFormatter -import ch.tutteli.atrium.reporting.Reporter - -/** - * Only required if you implement a custom component (for instance an own [Reporter], [ObjectFormatter] etc.) - * or an own assertion function API (e.g., atrium-api-cc-en_GB in a different language) - * and you want to reuse a specification from atrium-spec to test your custom component against it. - */ -@Suppress("DEPRECATION") -object AssertionVerbFactory : ch.tutteli.atrium.spec.AssertionVerbFactory { - - override fun checkImmediately(subject: T) = assert(subject) - override fun checkLazily(subject: T, assertionCreator: Assert.() -> Unit): AssertionPlant = - assert(subject, assertionCreator) - - override fun checkNullable(subject: T) = assert(subject) - override fun checkException(act: () -> Unit) = expect(act) -} diff --git a/misc/verbs-internal/atrium-verbs-internal-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.reporting.ReporterFactory b/misc/verbs-internal/atrium-verbs-internal-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.reporting.ReporterFactory index 994f9dd03..b4e3dd4da 100644 --- a/misc/verbs-internal/atrium-verbs-internal-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.reporting.ReporterFactory +++ b/misc/verbs-internal/atrium-verbs-internal-jvm/src/main/resources/META-INF/services/ch.tutteli.atrium.reporting.ReporterFactory @@ -1 +1 @@ -ch.tutteli.atrium.verbs.internal.NoAdjustingReporterFactory +ch.tutteli.atrium.api.verbs.internal.NoAdjustingReporterFactory diff --git a/misc/verbs-internal/atrium-verbs-internal-jvm/src/module/module-info.java b/misc/verbs-internal/atrium-verbs-internal-jvm/src/module/module-info.java index bcbea5ea2..b50221457 100644 --- a/misc/verbs-internal/atrium-verbs-internal-jvm/src/module/module-info.java +++ b/misc/verbs-internal/atrium-verbs-internal-jvm/src/module/module-info.java @@ -4,5 +4,5 @@ module ch.tutteli.atrium.verbs.internal { uses ch.tutteli.atrium.reporting.ReporterFactory; - exports ch.tutteli.atrium.verbs.internal; + exports ch.tutteli.atrium.api.verbs.internal; } diff --git a/misc/verbs-internal/atrium-verbs-internal-jvm/src/test/kotlin/ch/tutteli/atrium/verbs/internal/VerbSpec.kt b/misc/verbs-internal/atrium-verbs-internal-jvm/src/test/kotlin/ch/tutteli/atrium/verbs/internal/VerbSpec.kt deleted file mode 100644 index 779b898d8..000000000 --- a/misc/verbs-internal/atrium-verbs-internal-jvm/src/test/kotlin/ch/tutteli/atrium/verbs/internal/VerbSpec.kt +++ /dev/null @@ -1,13 +0,0 @@ -//TODO remove with 1.0.0 -package ch.tutteli.atrium.verbs.internal - -/** - * You need to add atrium-spec to your dependencies in order to be able to reuse the ch.tutteli.atrium.verbs.internal.VerbSpec. - */ -@Suppress("DEPRECATION") -internal object VerbSpec : ch.tutteli.atrium.spec.verbs.VerbSpec( - "assert" to { subject -> assert(subject) }, - "assert" to { subject, assertionCreator -> assert(subject, assertionCreator) }, - "assert" to { subject -> assert(subject) }, - "expect" to { act -> expect { act() } } -) diff --git a/misc/verbs/atrium-verbs-common/src/main/kotlin/ch/tutteli/atrium/verbs/AssertionVerb.kt b/misc/verbs/atrium-verbs-common/src/main/kotlin/ch/tutteli/atrium/verbs/AssertionVerb.kt deleted file mode 100644 index ffe9a36df..000000000 --- a/misc/verbs/atrium-verbs-common/src/main/kotlin/ch/tutteli/atrium/verbs/AssertionVerb.kt +++ /dev/null @@ -1,18 +0,0 @@ -@file:Suppress("DEPRECATION" /* will be removed with 1.0.0 */) -package ch.tutteli.atrium.verbs - -import ch.tutteli.atrium.reporting.translating.StringBasedTranslatable -import ch.tutteli.atrium.reporting.translating.Translatable - -/** - * The [Translatable]s for the assertion functions [assert], [assertThat] and [expect]. - */ -@Deprecated("Use the assertion verbs from package api.verbs; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.api.verbs.AssertionVerb")) -enum class AssertionVerb(override val value: String) : StringBasedTranslatable { - ASSERT("assert"), - ASSERT_THROWN("assert the thrown exception"), - ASSERT_THAT("assert that"), - ASSERT_THAT_THROWN("assert that the thrown exception"), - EXPECT("expect"), - EXPECT_THROWN("expect the thrown exception"), -} diff --git a/misc/verbs/atrium-verbs-common/src/main/kotlin/ch/tutteli/atrium/verbs/assert.kt b/misc/verbs/atrium-verbs-common/src/main/kotlin/ch/tutteli/atrium/verbs/assert.kt deleted file mode 100644 index 5eb5dff07..000000000 --- a/misc/verbs/atrium-verbs-common/src/main/kotlin/ch/tutteli/atrium/verbs/assert.kt +++ /dev/null @@ -1,67 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") - -package ch.tutteli.atrium.verbs - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.core.CoreFactory -import ch.tutteli.atrium.core.newReportingPlantNullable -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.creating.AssertionPlantNullable -import ch.tutteli.atrium.domain.builders.AssertImpl -import ch.tutteli.atrium.domain.creating.throwable.thrown.ThrowableThrown -import ch.tutteli.atrium.reporting.Reporter -import ch.tutteli.atrium.reporting.reporter -import ch.tutteli.atrium.verbs.AssertionVerb.ASSERT -import ch.tutteli.atrium.verbs.AssertionVerb.ASSERT_THROWN - -/** - * Creates an [AssertionPlant] for the given [subject]. - * - * @return The newly created plant. - * - * @see CoreFactory.newReportingPlant - */ -fun assert(subject: T) - = AssertImpl.coreFactory.newReportingPlant(ASSERT, { subject }, reporter) - -/** - * Creates an [AssertionPlant] for the given [subject] and [AssertionPlant.addAssertionsCreatedBy] the - * given [assertionCreator] lambda where the created [Assertion]s are added as a group and usually (depending on - * the configured [Reporter]) reportBuilder as a whole. - * - * @return The newly created plant. - * - * @see CoreFactory.newReportingPlantAndAddAssertionsCreatedBy - */ -fun assert(subject: T, assertionCreator: Assert.() -> Unit) - = AssertImpl.coreFactory.newReportingPlantAndAddAssertionsCreatedBy(ASSERT, { subject }, reporter, assertionCreator) - -/** - * Creates an [AssertionPlantNullable] for the given [subject] which might be `null`. - * - * @return The newly created plant. - * - * @see CoreFactory.newReportingPlantNullable - */ -fun assert(subject: T) - = AssertImpl.coreFactory.newReportingPlantNullable(ASSERT, { subject }, reporter) - -/** - * Creates a [ThrowableThrown.Builder] for the given function [act] which is expected to throw a [Throwable]. - * - * @return The newly created [ThrowableThrown.Builder]. - */ -fun assert(act: () -> Unit) - = AssertImpl.throwable.thrownBuilder(ASSERT_THROWN, act, reporter) - -@Deprecated( - "`assert` should not be nested, use `property` instead.", - ReplaceWith("AssertImpl.feature.property(this, { newSubject /* see also other overloads which do not require `name of the feature` or even better, switch from Assert to Expect and use `feature` */}, Untranslatable(\"name of the feature\"))", - "ch.tutteli.atrium.reporting.translating.Untranslatable", - "ch.tutteli.atrium.domain.builders.AssertImpl" - ) -) -fun Assert.assert(newSubject: R): Assert = - AssertImpl.feature.property(this, { newSubject }, ASSERT) diff --git a/misc/verbs/atrium-verbs-common/src/main/kotlin/ch/tutteli/atrium/verbs/assertThat.kt b/misc/verbs/atrium-verbs-common/src/main/kotlin/ch/tutteli/atrium/verbs/assertThat.kt deleted file mode 100644 index 85e0761eb..000000000 --- a/misc/verbs/atrium-verbs-common/src/main/kotlin/ch/tutteli/atrium/verbs/assertThat.kt +++ /dev/null @@ -1,67 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") - -package ch.tutteli.atrium.verbs - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.core.CoreFactory -import ch.tutteli.atrium.core.newReportingPlantNullable -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.creating.AssertionPlantNullable -import ch.tutteli.atrium.domain.builders.AssertImpl -import ch.tutteli.atrium.domain.creating.throwable.thrown.ThrowableThrown -import ch.tutteli.atrium.reporting.Reporter -import ch.tutteli.atrium.reporting.reporter -import ch.tutteli.atrium.verbs.AssertionVerb.ASSERT_THAT -import ch.tutteli.atrium.verbs.AssertionVerb.ASSERT_THAT_THROWN - -/** - * Creates an [AssertionPlant] for the given [subject]. - * - * @return The newly created plant. - * - * @see CoreFactory.newReportingPlant - */ -fun assertThat(subject: T) - = AssertImpl.coreFactory.newReportingPlant(ASSERT_THAT, { subject }, reporter) - -/** - * Creates an [AssertionPlant] for the given [subject] and [AssertionPlant.addAssertionsCreatedBy] the - * given [assertionCreator] lambda where the created [Assertion]s are added as a group and usually (depending on - * the configured [Reporter]) reportBuilder as a whole. - * - * @return The newly created plant. - * - * @see CoreFactory.newReportingPlantAndAddAssertionsCreatedBy - */ -fun assertThat(subject: T, assertionCreator: Assert.() -> Unit) - = AssertImpl.coreFactory.newReportingPlantAndAddAssertionsCreatedBy(ASSERT_THAT, { subject }, reporter, assertionCreator) - -/** - * Creates an [AssertionPlantNullable] for the given [subject] which might be `null`. - * - * @return The newly created plant. - * - * @see CoreFactory.newReportingPlantNullable - */ -fun assertThat(subject: T) - = AssertImpl.coreFactory.newReportingPlantNullable(ASSERT_THAT, { subject }, reporter) - -/** - * Creates a [ThrowableThrown.Builder] for the given function [act] which is expected to throw a [Throwable]. - * - * @return The newly created [ThrowableThrown.Builder]. - */ -fun assertThat(act: () -> Unit) - = AssertImpl.throwable.thrownBuilder(ASSERT_THAT_THROWN, act, reporter) - -@Deprecated( - "`assertThat` should not be nested, use `property` instead.", - ReplaceWith("AssertImpl.feature.property(this, { newSubject /* see also other overloads which do not require `name of the feature` or even better, switch from Assert to Expect and use `feature` */}, Untranslatable(\"name of the feature\"))", - "ch.tutteli.atrium.reporting.translating.Untranslatable", - "ch.tutteli.atrium.domain.builders.AssertImpl" - ) -) -fun Assert.assertThat(newSubject: R): Assert = - AssertImpl.feature.property(this, { newSubject }, ASSERT_THAT) diff --git a/misc/verbs/atrium-verbs-common/src/main/kotlin/ch/tutteli/atrium/verbs/expect.kt b/misc/verbs/atrium-verbs-common/src/main/kotlin/ch/tutteli/atrium/verbs/expect.kt deleted file mode 100644 index 346126550..000000000 --- a/misc/verbs/atrium-verbs-common/src/main/kotlin/ch/tutteli/atrium/verbs/expect.kt +++ /dev/null @@ -1,67 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") - -package ch.tutteli.atrium.verbs - -import ch.tutteli.atrium.assertions.Assertion -import ch.tutteli.atrium.core.CoreFactory -import ch.tutteli.atrium.core.newReportingPlantNullable -import ch.tutteli.atrium.creating.Assert -import ch.tutteli.atrium.creating.AssertionPlant -import ch.tutteli.atrium.creating.AssertionPlantNullable -import ch.tutteli.atrium.domain.builders.AssertImpl -import ch.tutteli.atrium.domain.creating.throwable.thrown.ThrowableThrown -import ch.tutteli.atrium.reporting.Reporter -import ch.tutteli.atrium.reporting.reporter -import ch.tutteli.atrium.verbs.AssertionVerb.EXPECT -import ch.tutteli.atrium.verbs.AssertionVerb.EXPECT_THROWN - -/** - * Creates an [AssertionPlant] for the given [subject]. - * - * @return The newly created plant. - * - * @see CoreFactory.newReportingPlant - */ -fun expect(subject: T) - = AssertImpl.coreFactory.newReportingPlant(EXPECT, { subject }, reporter) - -/** - * Creates an [AssertionPlant] for the given [subject] and [AssertionPlant.addAssertionsCreatedBy] the - * given [assertionCreator] lambda where the created [Assertion]s are added as a group and usually (depending on - * the configured [Reporter]) reportBuilder as a whole. - * - * @return The newly created plant. - * - * @see CoreFactory.newReportingPlantAndAddAssertionsCreatedBy - */ -fun expect(subject: T, assertionCreator: Assert.() -> Unit) - = AssertImpl.coreFactory.newReportingPlantAndAddAssertionsCreatedBy(EXPECT, { subject }, reporter, assertionCreator) - -/** - * Creates an [AssertionPlantNullable] for the given [subject] which might be `null`. - * - * @return The newly created plant. - * - * @see CoreFactory.newReportingPlantNullable - */ -fun expect(subject: T) - = AssertImpl.coreFactory.newReportingPlantNullable(EXPECT, { subject }, reporter) - -/** - * Creates a [ThrowableThrown.Builder] for the given function [act] which is expected to throw a [Throwable]. - * - * @return The newly created [ThrowableThrown.Builder]. - */ -fun expect(act: () -> Unit) - = AssertImpl.throwable.thrownBuilder(EXPECT_THROWN, act, reporter) - -@Deprecated( - "`expect` should not be nested, use `property` instead.", - ReplaceWith("AssertImpl.feature.property(this, { newSubject /* see also other overloads which do not require `name of the feature` or even better, switch from Assert to Expect and use `feature` */}, Untranslatable(\"name of the feature\"))", - "ch.tutteli.atrium.reporting.translating.Untranslatable", - "ch.tutteli.atrium.domain.builders.AssertImpl" - ) -) -fun Assert.expect(newSubject: R): Assert = - AssertImpl.feature.property(this, { newSubject }, EXPECT) diff --git a/misc/verbs/atrium-verbs-jvm/build.gradle b/misc/verbs/atrium-verbs-jvm/build.gradle index 9a0ee25e6..2e03eb4f6 100644 --- a/misc/verbs/atrium-verbs-jvm/build.gradle +++ b/misc/verbs/atrium-verbs-jvm/build.gradle @@ -5,9 +5,5 @@ dependencies { api prefixedProject('core-api-jvm') testImplementation prefixedProject('specs-jvm') - testRuntimeOnly prefixedProject('domain-robstoll-jvm') testRuntimeOnly prefixedProject('core-robstoll-jvm') - - //TODO remove with 1.0.0 - testImplementation prefixedProject('spec') } diff --git a/misc/verbs/atrium-verbs-jvm/src/main/kotlin/ch/tutteli/atrium/verbs/assert/Assert.kt b/misc/verbs/atrium-verbs-jvm/src/main/kotlin/ch/tutteli/atrium/verbs/assert/Assert.kt deleted file mode 100644 index 47054b431..000000000 --- a/misc/verbs/atrium-verbs-jvm/src/main/kotlin/ch/tutteli/atrium/verbs/assert/Assert.kt +++ /dev/null @@ -1,23 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") - - -package ch.tutteli.atrium.verbs.assert - -import ch.tutteli.atrium.creating.Assert - -@Deprecated("Use assert from package verbs; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.verbs.assert(subject)")) -fun assert(subject: T) - = ch.tutteli.atrium.verbs.assert(subject) - -@Deprecated("Use assert from package verbs; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.verbs.assert(subject, assertionCreator)")) -fun assert(subject: T, assertionCreator: Assert.() -> Unit) - = ch.tutteli.atrium.verbs.assert(subject, assertionCreator) - -@Deprecated("Use assert from package verbs; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.verbs.assert(subject)")) -fun assert(subject: T) - = ch.tutteli.atrium.verbs.assert(subject) - -@Deprecated("Use assert from package verbs; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.verbs.assert(act)")) -fun assert(act: () -> Unit) - = ch.tutteli.atrium.verbs.assert(act) diff --git a/misc/verbs/atrium-verbs-jvm/src/main/kotlin/ch/tutteli/atrium/verbs/assertthat/AssertThat.kt b/misc/verbs/atrium-verbs-jvm/src/main/kotlin/ch/tutteli/atrium/verbs/assertthat/AssertThat.kt deleted file mode 100644 index f0732f095..000000000 --- a/misc/verbs/atrium-verbs-jvm/src/main/kotlin/ch/tutteli/atrium/verbs/assertthat/AssertThat.kt +++ /dev/null @@ -1,23 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") - - -package ch.tutteli.atrium.verbs.assertthat - -import ch.tutteli.atrium.creating.Assert - -@Deprecated("Use assertThat from package verbs; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.verbs.assertThat(subject)")) -fun assertThat(subject: T) - = ch.tutteli.atrium.verbs.assertThat(subject) - -@Deprecated("Use assertThat from package verbs; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.verbs.assertThat(subject, assertionCreator)")) -fun assertThat(subject: T, assertionCreator: Assert.() -> Unit) - = ch.tutteli.atrium.verbs.assertThat(subject, assertionCreator) - -@Deprecated("Use assertThat from package verbs; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.verbs.assertThat(subject)")) -fun assertThat(subject: T) - = ch.tutteli.atrium.verbs.assertThat(subject) - -@Deprecated("Use assertThat from package verbs; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.verbs.assertThat(act)")) -fun assertThat(act: () -> Unit) - = ch.tutteli.atrium.verbs.assertThat(act) diff --git a/misc/verbs/atrium-verbs-jvm/src/main/kotlin/ch/tutteli/atrium/verbs/expect/Expect.kt b/misc/verbs/atrium-verbs-jvm/src/main/kotlin/ch/tutteli/atrium/verbs/expect/Expect.kt deleted file mode 100644 index ac910fd46..000000000 --- a/misc/verbs/atrium-verbs-jvm/src/main/kotlin/ch/tutteli/atrium/verbs/expect/Expect.kt +++ /dev/null @@ -1,22 +0,0 @@ -// TODO remove file with 1.0.0 -@file:Suppress("DEPRECATION", "TYPEALIAS_EXPANSION_DEPRECATION") - -package ch.tutteli.atrium.verbs.expect - -import ch.tutteli.atrium.creating.Assert - -@Deprecated("Use expect from package verbs; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.verbs.expect(subject)")) -fun expect(subject: T) - = ch.tutteli.atrium.verbs.expect(subject) - -@Deprecated("Use expect from package verbs; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.verbs.expect(subject, assertionCreator)")) -fun expect(subject: T, assertionCreator: Assert.() -> Unit) - = ch.tutteli.atrium.verbs.expect(subject, assertionCreator) - -@Deprecated("Use expect from package verbs; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.verbs.expect(subject)")) -fun expect(subject: T) - = ch.tutteli.atrium.verbs.expect(subject) - -@Deprecated("Use expect from package verbs; will be removed with 1.0.0", ReplaceWith("ch.tutteli.atrium.verbs.expect(act)")) -fun expect(act: () -> Unit) - = ch.tutteli.atrium.verbs.expect(act) diff --git a/misc/verbs/atrium-verbs-jvm/src/module/module-info.java b/misc/verbs/atrium-verbs-jvm/src/module/module-info.java index 07f55f423..563337dfb 100644 --- a/misc/verbs/atrium-verbs-jvm/src/module/module-info.java +++ b/misc/verbs/atrium-verbs-jvm/src/module/module-info.java @@ -5,5 +5,4 @@ module ch.tutteli.atrium.verbs { uses ch.tutteli.atrium.reporting.ReporterFactory; exports ch.tutteli.atrium.api.verbs; - exports ch.tutteli.atrium.verbs; } diff --git a/misc/verbs/atrium-verbs-jvm/src/test/kotlin/ch/tutteli/atrium/verbs/VerbSpec.kt b/misc/verbs/atrium-verbs-jvm/src/test/kotlin/ch/tutteli/atrium/verbs/VerbSpec.kt deleted file mode 100644 index d658e61a2..000000000 --- a/misc/verbs/atrium-verbs-jvm/src/test/kotlin/ch/tutteli/atrium/verbs/VerbSpec.kt +++ /dev/null @@ -1,48 +0,0 @@ -@file:Suppress("DEPRECATION") - -package ch.tutteli.atrium.verbs - -import ch.tutteli.atrium.spec.verbs.VerbSpec -import ch.tutteli.atrium.verbs.assert.assert as deprecatedAssert -import ch.tutteli.atrium.verbs.assertthat.assertThat as deprecatedAssertThat -import ch.tutteli.atrium.verbs.expect.expect as deprecatedExpect - -object AssertSpec : VerbSpec( - "assert" to { subject -> assert(subject) }, - "assert" to { subject, assertionCreator -> assert(subject, assertionCreator) }, - "assert" to { subject -> assert(subject) }, - "assert" to { act -> assert { act() } }) - -object AssertThatSpec : VerbSpec( - "assertThat" to { subject -> assertThat(subject) }, - "assertThat" to { subject, assertionCreator -> assertThat(subject, assertionCreator) }, - "assertThat" to { subject -> assertThat(subject) }, - "assertThat" to { act -> assertThat { act() } }) - -object ExpectSpec : VerbSpec( - "expect" to { subject -> expect(subject) }, - "expect" to { subject, assertionCreator -> expect(subject, assertionCreator) }, - "expect" to { subject -> expect(subject) }, - "expect" to { act -> expect { act() } }) - - -@Suppress("DEPRECATION" /* TODO remove with 1.0.0*/) -object DepreactedAssertSpec : VerbSpec( - "assert" to { subject -> deprecatedAssert(subject) }, - "assert" to { subject, assertionCreator -> deprecatedAssert(subject, assertionCreator) }, - "assert" to { subject -> deprecatedAssert(subject) }, - "assert" to { act -> deprecatedAssert { act() } }) - -@Suppress("DEPRECATION" /* TODO remove with 1.0.0*/) -object DeprecatedAssertThatSpec : VerbSpec( - "assertThat" to { subject -> deprecatedAssertThat(subject) }, - "assertThat" to { subject, assertionCreator -> deprecatedAssertThat(subject, assertionCreator) }, - "assertThat" to { subject -> deprecatedAssertThat(subject) }, - "assertThat" to { act -> deprecatedAssertThat { act() } }) - -@Suppress("DEPRECATION" /* TODO remove with 1.0.0*/) -object DeprecatedExpectSpec : VerbSpec( - "expect" to { subject -> deprecatedExpect(subject) }, - "expect" to { subject, assertionCreator -> deprecatedExpect(subject, assertionCreator) }, - "expect" to { subject -> deprecatedExpect(subject) }, - "expect" to { act -> deprecatedExpect { act() } }) diff --git a/settings.gradle b/settings.gradle index 90b84533d..210619597 100644 --- a/settings.gradle +++ b/settings.gradle @@ -85,75 +85,12 @@ include { //TODO remove all below with 1.0.0 misc { folder("deprecated") { - bundles { - _ 'cc-en_UK-robstoll' - _ 'cc-infix-en_UK-robstoll' - kotlinJvmJs('cc-de_CH-robstoll') - kotlinJvmJs('cc-en_GB-robstoll') - kotlinJvmJs('cc-infix-en_GB-robstoll') - if (JavaVersion.current() >= JavaVersion.VERSION_1_9) { - folder('cc-en_GB-robstoll') { - _ 'cc-en_GB-robstoll-smoke-test' - } - folder('cc-infix-en_GB-robstoll') { - _ 'cc-infix-en_GB-robstoll-smoke-test' - } - } - } - - folder('apis', 'api-') { - _ 'cc-en_UK' - _ 'cc-infix-en_UK' - kotlinJvmJs('cc-de_CH') - kotlinJvmJs('cc-en_GB') - kotlinJvmJs('cc-infix-en_GB') - kotlinJvm(delegate, 'fluent-en_GB-jdk8') - } - - core('core-') { - _ 'api-deprecated' - _ 'robstoll-deprecated' - } - - _ 'assertions' domain('domain-') { - _ 'api-deprecated' - kotlinJvmJs('api') kotlinJvmJs('builders') kotlinJvmJs('robstoll') kotlinJvmJs('robstoll-lib') - - api('api-') { - extensions { - kotlinJvmJs('kotlin_1_3') - } - } - - builders('builders-') { - extensions { - kotlinJvmJs('kotlin_1_3') - } - } - - robstoll('robstoll-') { - extensions { - kotlinJvmJs('kotlin_1_3') - } - } - - folder('robstoll-lib', 'robstoll-lib-') { - extensions { - kotlinJvmJs('kotlin_1_3') - } - } - } - _ 'spec' - - translations('translations-') { - _ 'de_CH-deprecated' - _ 'en_UK-deprecated' } }