A multiplatform expectation library for Kotlin
Full Changelog: https://github.com/robstoll/atrium/compare/v1.1.0...v1.2.0
showOnlyIf
parameter which allows to define an optional predicate next to the check that the subject is present (otherwise the failure hint is not shown) #1674We will make a major refactoring on core and logic level. Those changes should not affect most Atrium users. It might affect you if you:
assertionBuilder
or other types which are defined in core or logic.en_GB
from package namesMigration steps/pointers will be provided in the release notes as usual.
The following changes are planned:
Assertion
with Proof
and along with it rename many types incorporating Assertion in its name or in its package's name => we will remove Assertion and co. with 1.5.0 at the latest)ch.tutteli.atrium.reporting
will be affected (could be we move this to 1.3.0)Planned (previously deprecated or announced)
Unplanned
expect(...).withOptions
provide it in a different formUse the ReplaceWith in the corresponding @Deprecated
annotations.
Please have a look at older release-notes in case you don't migrate from 1.0.0
We would like to thank (Tegonal Cooperative, Bern, Switzerland) for sponsoring the time @robstoll is working on Atrium.
Are you using Atrium at work?
Please consider to support the project as well by:
Full Changelog: https://github.com/robstoll/atrium/compare/v1.0.0...v1.1.0
CharSequence.toContain....matchFor(Regex)
as replacement for ...regex(Regex)
#1499CharSequence.toContain....regex(Regex)
=> use ...matchFor(Regex)
We plan to make a major refactoring on core and logic level. Those changes should not affect most Atrium users. It might affect you if you:
assertionBuilder
or other types which are defined in core or logic.en_GB
from package namesMigration steps/pointers will be provided in the release notes as usual.
The following changes are planned:
Assertion
with Proof
and along with it rename many types incorporating Assertion in its name or in its package's name => we will remove Assertion and co. with 1.5.0 at the latest)ch.tutteli.atrium.reporting
will be affected (could be we move this to 1.3.0)Planned (previously deprecated or announced)
Unplanned
ch.tutteli.atrium.api.fluent.en_GB.creating.charsequence.contains
to charsequence.toCtonain` but dropped the old instead of deprecation -- same same for the infix API => this is a binary backward-compatibility break, please re-compileMap... the keyValues
from keyValues to entries since keyValues
is deprecated in favour of entries
. We don't expect that people are using named parameters with the infix API (as they disallow to use a function as infix call). But in cas you do, then please give feedback.expect(...).withOptions
provide it in a different formUse the ReplaceWith in the corresponding @Deprecated
annotations.
Please have a look at older release-notes in case you don't migrate from 1.0.0
We would like to thank (Tegonal Cooperative, Bern, Switzerland) for sponsoring the time @robstoll is working on Atrium.
Are you using Atrium at work?
Please consider to support the project as well by:
This is an extra release so that Atrium can be used with JS using the IR compiler backend.
Note that's not the final 1.1.0 version and that:
import ch.tutteli.atrium.api.fluent.en_GB.kotlin_1_3
and replace with import ch.tutteli.atrium.api.fluent.en_GB
<unknown> (js: ...)
in reporting, then it's due to the breaking change => I assume Atrium should still be usable in 99.99% of the casesFull Changelog: https://github.com/robstoll/atrium/compare/v0.18.0...v1.0.0
expect
in preparation of #1330not to contain
#1156build
samples
migrations
Sadly, we had to move back to Spek for the moment as kotest is buggy in terms of the JS platform. Kotlin-test (i.e. all samples) where no longer run as soon as kotest was specified as dependency
ch.tutteli.atrium.api.fluent.en_GB.creating.charsequence.contains
to charsequence.toCtonain` and thus deprecated the existing packages (will be dropped with 1.5.0 latest) -- same same for the infix APIen_GB
from package namesWe will make a major refactoring on core and logic level. Those changes should not affect most Atrium users. It might affect you if you:
assertionBuilder
or other types which are defined in core or logic.Migration steps/pointers will be provided in the release notes as usual.
The following changes are planned:
Assertion
with Proof
and along with it rename many types incorporating Assertion in its name or in its package's name => we will remove Assertion and co. with 1.5.0 at the latest)ch.tutteli.atrium.reporting
will be affected (could be we move this to 1.3.0)Planned (previously deprecated or announced)
Unplanned
Use the ReplaceWith in the corresponding @Deprecated
annotations.
Please have a look at older release-notes in case you don't migrate from 0.18.0
We would like to thank (Tegonal Cooperative, Bern, Switzerland) for sponsoring the time @robstoll is working on Atrium.
Are you using Atrium at work?
Please consider to support the project as well by:
to + infinitive
schemaI expected...
#1090inGiven order and only
in api-infix #1050We will make a major refactoring on core and logic level. Those changes should not affect most Atrium users. It will affect you if you:
assertionBuilder
or other types which are defined in core or logic.Migration steps/pointers will be provided in the release notes as usual.
The following changes are planned:
Assertion
with Proof
and along with it rename many types incorporating Assertion in its name or in its package's name => we will remove Assertion and co. with 0.22.0 at the latest)ch.tutteli.atrium.reporting
will be affected (could be we move this to 0.21.0)Planned (previously deprecated or announced)
assert
and assertThat
as they do not fit the to + infinitive naming schema => switch to expect
to + infinitive
convention from ...Assertions.kt to the corresponding ...Expectations.kt file which is a binary breaking change => please re-compile your sourcesUnplanned
inAnyOrder.only
=> please re-compileinOrder.only.grouped
=> please re-compileFirst of all, see deprecation above which will be removed with 0.19.0, some of them are breaking as well
See atrium-roadmap -> Milestone 1.0.0
Use the ReplaceWith in the corresponding @Deprecated
annotations.
Please have a look at older release-notes in case you don't migrate from 0.17.0
We would like to thank (Tegonal GmbH, Bern, Switzerland) for sponsoring the time @robstoll is working on Atrium.
Are you using Atrium at work?
Please consider to support the project as well by:
assert
and assertThat
as they do not fit the to + infinitive naming schema; they will be removed with 0.18.0 => switch to expectto + infinitive
naming schema => see migration further belowto + infinitive
naming schemaWe will make a major refactoring on core and logic level where we will:
Assertion
with Proof
and along with it rename many types incorporating Assertion in its name or in its package's name => we will remove Assertion and co. with 0.21.0 at the latest)ch.tutteli.atrium.reporting
will be affected (could be we move this to 0.20.0)Those changes should not affect most Atrium users. It will affect you if you:
assertionBuilder
or other types which are defined in core or logic.Migration steps/pointers will be provided in the release notes as usual.
Planned (previously deprecated or announced)
Unplanned
First of all, see deprecation above which will be removed with 0.18.0, some of them are breaking as well
to + infinitive
convention from ...Assertions.kt to the corresponding ...Expectations.kt file which is a binary breaking change => please re-compile your sourcesSee atrium-roadmap -> Milestone 1.0.0
The following command is carrying out some search & replace so that you don't need to rely on the (unfortunately sometimes buggy) behaviour of ReplaceWith.
find . -type f -name "*.kt" -a \( -path "*/src/test/*" -o -path "*/src/*Test/*" \) | xargs perl -0777 -i \
-pe 's/import ch.tutteli.atrium.api.verbs.(assert|assertThat)\n/import ch.tutteli.atrium.api.verbs.expect\n/g;' \
-pe 's/(assert|assertThat)(\(| ?\{)/expect$2/g;' \
-pe 's/import ch.tutteli.atrium.api.(fluent|infix).en_GB.toBe\n/import ch.tutteli.atrium.api.$1.en_GB.toEqual\n/g;' \
-pe 's/([\. ])toBe([\( ])/$1toEqual$2/g;' \
-pe 's/import ch.tutteli.atrium.api.(fluent|infix).en_GB.notToBe\n/import ch.tutteli.atrium.api.$1.en_GB.notToEqual\n/g;' \
-pe 's/([\. ])notToBe([\( ])/$1notToEqual$2/g;' \
-pe 's/import ch.tutteli.atrium.api.(fluent|infix).en_GB.isSameAs\n/import ch.tutteli.atrium.api.$1.en_GB.toBeTheInstance\n/g;' \
-pe 's/([\. ])isSameAs([\( ])/$1toBeTheInstance$2/g;' \
-pe 's/import ch.tutteli.atrium.api.(fluent|infix).en_GB.isNotSameAs\n/import ch.tutteli.atrium.api.$1.en_GB.notToBeTheInstance\n/g;' \
-pe 's/([\. ])isNotSameAs([\( ])/$1notToBeTheInstance$2/g;' \
-pe 's/import ch.tutteli.atrium.api.(fluent|infix).en_GB.notToBeNull\n/import ch.tutteli.atrium.api.$1.en_GB.notToEqualNull\n/g;' \
-pe 's/([\. ])notToBeNull([\( ])/$1notToEqualNull$2/g;' \
-pe 's/import ch.tutteli.atrium.api.(fluent|infix).en_GB.isA\n/import ch.tutteli.atrium.api.$1.en_GB.toBeAnInstanceOf\n/g;' \
-pe 's/([\. ])isA</$toBeAnInstanceOf</g;' \
-pe 's/import ch.tutteli.atrium.api.(fluent|infix).en_GB.isNoneOf\n/import ch.tutteli.atrium.api.$1.en_GB.notToBeOneOf\n/g;' \
-pe 's/([\. ])isNoneOf([\( ])/$1notToBeOneOf$2/g;' \
-pe 's/import ch.tutteli.atrium.api.(fluent|infix).en_GB.isNotIn\n/import ch.tutteli.atrium.api.$1.en_GB.notToBeIn\n/g;' \
-pe 's/([\. ])isNotIn([\( ])/$1notToBeIn$2/g;' \
-pe 's/import ch.tutteli.atrium.api.(fluent|infix).en_GB.contains\n/import ch.tutteli.atrium.api.$1.en_GB.toContain\n/g;' \
-pe 's/([\. ])contains([\( \.])/$1toContain$2/g;' \
-pe 's/import ch.tutteli.atrium.api.(fluent|infix).en_GB.containsNot\n/import ch.tutteli.atrium.api.$1.en_GB.notToContain\n/g;' \
-pe 's/([\. ])containsNot([\( \.])/$1notToContain$2/g;' \
-pe 's/import ch.tutteli.atrium.api.(fluent|infix).en_GB.containsRegex\n/import ch.tutteli.atrium.api.$1.en_GB.toContainRegex\n/g;' \
-pe 's/([\. ])containsRegex([\( ])/$1toContainRegex$2/g;' \
-pe 's/import ch.tutteli.atrium.api.(fluent|infix).en_GB.contains\n/import ch.tutteli.atrium.api.$1.en_GB.toContain\n/g;' \
-pe 's/([\. ])contains([\( ])/$1toContain$2/g;' \
-pe 's/import ch.tutteli.atrium.api.(fluent|infix).en_GB.startsWith\n/import ch.tutteli.atrium.api.$1.en_GB.toStartWith\n/g;' \
-pe 's/([\. ])startsWith([\( ])/$1toStartWith$2/g;' \
-pe 's/import ch.tutteli.atrium.api.(fluent|infix).en_GB.startsNotWith\n/import ch.tutteli.atrium.api.$1.en_GB.notToStartWith\n/g;' \
-pe 's/([\. ])startsNotWith([\( ])/$1notToStartWith$2/g;' \
-pe 's/import ch.tutteli.atrium.api.(fluent|infix).en_GB.endsWith\n/import ch.tutteli.atrium.api.$1.en_GB.toEndWith\n/g;' \
-pe 's/([\. ])endsWith([\( ])/$1toEndWith$2/g;' \
-pe 's/import ch.tutteli.atrium.api.(fluent|infix).en_GB.endsNotWith\n/import ch.tutteli.atrium.api.$1.en_GB.notToEndWith\n/g;' \
-pe 's/([\. ])endsNotWith([\( ])/$1notToEndWith$2/g;' \
-pe 's/import ch.tutteli.atrium.api.fluent.en_GB.isEmpty\n/import ch.tutteli.atrium.api.fluent.en_GB.toBeEmpty\n/g;' \
-pe 's/([\. ])isEmpty\(/$1toBeEmpty\(/g;' \
-pe 's/import ch.tutteli.atrium.api.fluent.en_GB.isNotEmpty\n/import ch.tutteli.atrium.api.fluent.en_GB.notToBeEmpty\n/g;' \
-pe 's/([\. ])isNotEmpty\(/$1notToBeEmpty\(/g;' \
-pe 's/import ch.tutteli.atrium.api.fluent.en_GB.isNotBlank\n/import ch.tutteli.atrium.api.fluent.en_GB.notToBeBlank\n/g;' \
-pe 's/([\. ])isNotBlank\(/notToBeBlank\(/g;' \
-pe 's/import ch.tutteli.atrium.api.(fluent|infix).en_GB.matches\n/import ch.tutteli.atrium.api.$1.en_GB.toMatch\n/g;' \
-pe 's/([\. ])matches([\( ])/$1toMatch$2/g;' \
-pe 's/import ch.tutteli.atrium.api.(fluent|infix).en_GB.mismatches\n/import ch.tutteli.atrium.api.$1.en_GB.notToMatch\n/g;' \
-pe 's/([\. ])mismatches([\( ])/$1notToMatch$2/g;' \
-pe 's/import ch.tutteli.atrium.api.(fluent|infix).en_GB.hasSize\n/import ch.tutteli.atrium.api.$1.en_GB.toHaveSize\n/g;' \
-pe 's/([\. ])hasSize([\( ])/$1toHaveSize$2/g;' \
-pe 's/import ch.tutteli.atrium.api.(fluent|infix).en_GB.isLessThan\n/import ch.tutteli.atrium.api.$1.en_GB.toBeLessThan\n/g;' \
-pe 's/([\. ])isLessThan([\( ])/$1toBeLessThan$2/g;' \
-pe 's/import ch.tutteli.atrium.api.(fluent|infix).en_GB.isLessThanOrEqual\n/import ch.tutteli.atrium.api.$1.en_GB.toBeLessThanOrEqualTo\n/g;' \
-pe 's/([\. ])isLessThanOrEqual([\( ])/$1toBeLessThanOrEqualTo$2/g;' \
-pe 's/import ch.tutteli.atrium.api.(fluent|infix).en_GB.isGreaterThan\n/import ch.tutteli.atrium.api.$1.en_GB.toBeGreaterThan\n/g;' \
-pe 's/([\. ])isGreaterThan([\( ])/$1toBeGreaterThan$2/g;' \
-pe 's/import ch.tutteli.atrium.api.(fluent|infix).en_GB.isGreaterThanOrEqualTo\n/import ch.tutteli.atrium.api.$1.en_GB.toBeGreaterThanOrEqualTo\n/g;' \
-pe 's/([\. ])isGreaterThanOrEqual([\( ])/$1toBeGreaterThanOrEqual$2/g;' \
-pe 's/import ch.tutteli.atrium.api.(fluent|infix).en_GB.isEqualComparingTo\n/import ch.tutteli.atrium.api.$1.en_GB.toBeEqualComparingTo\n/g;' \
-pe 's/([\. ])isEqualComparingTo([\( ])/$1toBeEqualComparingTo$2/g;' \
-pe 's/import ch.tutteli.atrium.api.(fluent|infix).en_GB.toBeWithErrorTolerance\n/import ch.tutteli.atrium.api.$1.en_GB.toEqualWithErrorTolerance\n/g;' \
-pe 's/([\. ])toBeWithErrorTolerance([\( ])/$1toEqualWithErrorTolerance$2/g;' \
-pe 's/import ch.tutteli.atrium.api.(fluent|infix).en_GB.containsExactly\n/import ch.tutteli.atrium.api.$1.en_GB.toContainExactly\n/g;' \
-pe 's/([\. ])containsExactly([\( ])/$1toContainExactly$2/g;' \
-pe 's/import ch.tutteli.atrium.api.(fluent|infix).en_GB.containsExactlyElementsOf\n/import ch.tutteli.atrium.api.$1.en_GB.toContainExactlyElementsOf\n/g;' \
-pe 's/([\. ])containsExactlyElementsOf([\( ])/$1toContainExactlyElementsOf$2/g;' \
-pe 's/import ch.tutteli.atrium.api.(fluent|infix).en_GB.containsElementsOf\n/import ch.tutteli.atrium.api.$1.en_GB.toContainElementsOf\n/g;' \
-pe 's/([\. ])containsElementsOf([\( ])/$1toContainElementsOf$2/g;' \
-pe 's/import ch.tutteli.atrium.api.(fluent|infix).en_GB.any\n/import ch.tutteli.atrium.api.$1.en_GB.toHaveElementsAndAny\n/g;' \
-pe 's/([\. ])any([\( ])/$1toHaveElementsAndAny$2/g;' \
-pe 's/import ch.tutteli.atrium.api.(fluent|infix).en_GB.none\n/import ch.tutteli.atrium.api.$1.en_GB.toHaveElementsAndNone\n/g;' \
-pe 's/([\. ])none([\( ])/$1toHaveElementsAndNone$2/g;' \
-pe 's/import ch.tutteli.atrium.api.(fluent|infix).en_GB.all\n/import ch.tutteli.atrium.api.$1.en_GB.toHaveElementsAndAll\n/g;' \
-pe 's/([\. ])all([\( ])/$1toHaveElementsAndAll$2/g;' \
-pe 's/import ch.tutteli.atrium.api.(fluent|infix).en_GB.all\n/import ch.tutteli.atrium.api.$1.en_GB.toHaveElementsAndAll\n/g;' \
-pe 's/([\. ])all([\( ])/$1toHaveElementsAndAll$2/g;' \
-pe 's/import ch.tutteli.atrium.api.(fluent|infix).en_GB.containsNoDuplicates\n/import ch.tutteli.atrium.api.$1.en_GB.toHaveElementsAndNoDuplicates\n/g;' \
-pe 's/([\. ])containsNoDuplicates([\( ])/$toHaveElementsAndNoDuplicates$2/g;' \
-pe 's/import ch.tutteli.atrium.api.(fluent|infix).en_GB.containsOnly\n/import ch.tutteli.atrium.api.$1.en_GB.toContainOnly\n/g;' \
-pe 's/([\. ])containsOnly([\( ])/$1toContainOnly$2/g;' \
-pe 's/import ch.tutteli.atrium.api.(fluent|infix).en_GB.containsEntriesOf\n/import ch.tutteli.atrium.api.$1.en_GB.toContainEntriesOf\n/g;' \
-pe 's/([\. ])containsEntriesOf([\( ])/$1toContainEntriesOf$2/g;' \
-pe 's/import ch.tutteli.atrium.api.(fluent|infix).en_GB.containsOnlyEntriesOf\n/import ch.tutteli.atrium.api.$1.en_GB.toContainOnlyEntriesOf\n/g;' \
-pe 's/([\. ])containsOnlyEntriesOf([\( ])/$1toContainOnlyEntriesOf$2/g;' \
-pe 's/import ch.tutteli.atrium.api.(fluent|infix).en_GB.containsKey\n/import ch.tutteli.atrium.api.$1.en_GB.toContainKey\n/g;' \
-pe 's/([\. ])containsKey([\( ])/$1toContainKey$2/g;' \
-pe 's/import ch.tutteli.atrium.api.(fluent|infix).en_GB.containsNotKey\n/import ch.tutteli.atrium.api.$1.en_GB.notToContainKey\n/g;' \
-pe 's/([\. ])containsNotKey([\( ])/$1notToContainKey$2/g;' \
-pe 's/import ch.tutteli.atrium.api.(fluent|infix).en_GB.isKeyValue\n/import ch.tutteli.atrium.api.$1.en_GB.toEqualKeyValue\n/g;' \
-pe 's/([\. ])isKeyValue([\( ])/$1toEqualKeyValue$2/g;' \
-pe 's/import ch.tutteli.atrium.api.(fluent|infix).en_GB.messageContains\n/import ch.tutteli.atrium.api.$1.en_GB.messageToContain\n/g;' \
-pe 's/([\. ])messageContains([\( ])/$1messageToContain$2/g;' \
-pe 's/import ch.tutteli.atrium.api.(fluent|infix).en_GB.isNumericallyEqualTo\n/import ch.tutteli.atrium.api.$1.en_GB.toEqualNumerically\n/g;' \
-pe 's/([\. ])isNumericallyEqualTo([\( ])/$1toEqualNumerically$2/g;' \
-pe 's/import ch.tutteli.atrium.api.(fluent|infix).en_GB.isNotNumericallyEqualTo\n/import ch.tutteli.atrium.api.$1.en_GB.notToEqualNumerically\n/g;' \
-pe 's/([\. ])isNotNumericallyEqualTo([\( ])/$1notToEqualNumerically$2/g;' \
-pe 's/import ch.tutteli.atrium.api.(fluent|infix).en_GB.isEqualIncludingScale\n/import ch.tutteli.atrium.api.$1.en_GB.toEqualIncludingScale\n/g;' \
-pe 's/([\. ])isEqualIncludingScale([\( ])/$1toEqualIncludingScale$2/g;' \
-pe 's/import ch.tutteli.atrium.api.(fluent|infix).en_GB.isNotEqualIncludingScale\n/import ch.tutteli.atrium.api.$1.en_GB.notToEqualIncludingScale\n/g;' \
-pe 's/([\. ])isNotEqualIncludingScale([\( ])/$1notToEqualIncludingScale$2/g;' \
-pe 's/import ch.tutteli.atrium.api.(fluent|infix).en_GB.isBefore\n/import ch.tutteli.atrium.api.$1.en_GB.toBeBefore\n/g;' \
-pe 's/([\. ])isBefore([\( ])/$1toBeBefore$2/g;' \
-pe 's/import ch.tutteli.atrium.api.(fluent|infix).en_GB.isBeforeOrEqual\n/import ch.tutteli.atrium.api.$1.en_GB.toBeBeforeOrTheSamePointInTimeAs\n/g;' \
-pe 's/([\. ])isBeforeOrEqual([\( ])/$1toBeBeforeOrTheSamePointInTimeAs$2/g;' \
-pe 's/import ch.tutteli.atrium.api.(fluent|infix).en_GB.isAfter\n/import ch.tutteli.atrium.api.$1.en_GB.toBeAfter\n/g;' \
-pe 's/([\. ])isAfter([\( ])/$1toBeAfter$2/g;' \
-pe 's/import ch.tutteli.atrium.api.(fluent|infix).en_GB.isAfterOrEqual\n/import ch.tutteli.atrium.api.$1.en_GB.toBeAfterOrTheSamePointInTimeAs\n/g;' \
-pe 's/([\. ])isAfterOrEqual([\( ])/$1toBeAfterOrTheSamePointInTimeAs$2/g;' \
-pe 's/import ch.tutteli.atrium.api.(fluent|infix).en_GB.isEqual\n/import ch.tutteli.atrium.api.$1.en_GB.toBeTheSamePointInTimeAs\n/g;' \
-pe 's/([\. ])isEqual([\( ])/$1toBeTheSamePointInTimeAs$2/g;' \
-pe 's/import ch.tutteli.atrium.api.fluent.en_GB.isPresent\n/import ch.tutteli.atrium.api.fluent.en_GB.toBePresent\n/g;' \
-pe 's/([\. ])isPresent\(/$1toBePresent\(/g;' \
-pe 's/import ch.tutteli.atrium.api.fluent.en_GB.isSuccess\n/import ch.tutteli.atrium.api.fluent.en_GB.toBeASuccess\n/g;' \
-pe 's/([\. ])isSuccess\(/$1toBeASuccess\(/g;' \
-pe 's/import ch.tutteli.atrium.api.infix.en_GB.success\n/import ch.tutteli.atrium.api.infix.en_GB.aSuccess\n/g;' \
-pe 's/toBe\(success\)/toBe\(aSuccess\)/g;' \
-pe 's/toBe success \{/toBe aSuccess \{/g;' \
-pe 's/import ch.tutteli.atrium.api.(fluent|infix).en_GB.isFailure\n/import ch.tutteli.atrium.api.$1.en_GB.toBeAFailure\n/g;' \
-pe 's/([\. ])isFailure([\( ])/$1toBeAFailure$2/g;' \
-pe 's/import ch.tutteli.atrium.api.fluent.en_GB.exists\n/import ch.tutteli.atrium.api.fluent.en_GB.toExist\n/g;' \
-pe 's/([\. ])exists\(/$1toExist\(/g;' \
-pe 's/import ch.tutteli.atrium.api.fluent.en_GB.existsNot\n/import ch.tutteli.atrium.api.fluent.en_GB.notToExist\n/g;' \
-pe 's/([\. ])existsNot\(/$1notToExist\(/g;' \
-pe 's/import ch.tutteli.atrium.api.fluent.en_GB.is(Readable|Writable|Executable|Absolute|Relative)\n/import ch.tutteli.atrium.api.fluent.en_GB.toBe$1\n/g;' \
-pe 's/([\. ])is(Readable|Writable|Executable|Absolute|Relative)\(/$1toBe$2\(/g;' \
-pe 's/import ch.tutteli.atrium.api.fluent.en_GB.is(RegularFile|Directory|SymbolicLink)\n/import ch.tutteli.atrium.api.fluent.en_GB.toBeA$1\n/g;' \
-pe 's/([\. ])is(RegularFile|Directory|SymbolicLink)\(/$1toBeA$2\(/g;' \
-pe 's/import ch.tutteli.atrium.api.fluent.en_GB.isEmptyDirectory\n/import ch.tutteli.atrium.api.fluent.en_GB.toBeAnEmptyDirectory\n/g;' \
-pe 's/([\. ])isEmptyDirectory\(/$1toBeAnEmptyDirectory\(/g;' \
-pe 's/import ch.tutteli.atrium.api.fluent.en_GB.hasDirectoryEntry\n/import ch.tutteli.atrium.api.fluent.en_GB.toHaveTheDirectoryEntries\n/g;' \
-pe 's/([\. ])hasDirectoryEntry\(/$1toHaveTheDirectoryEntries\(/g;' \
-pe 's/import ch.tutteli.atrium.api.fluent.en_GB.hasSameTextualContentAs\n/import ch.tutteli.atrium.api.fluent.en_GB.toHaveTheSameTextualContentAs\n/g;' \
-pe 's/([\. ])hasSameTextualContentAs\(/$1toHaveTheSameTextualContentAs\(/g;' \
-pe 's/import ch.tutteli.atrium.api.fluent.en_GB.hasSameBinaryContentAs\n/import ch.tutteli.atrium.api.fluent.en_GB.toHaveTheSameBinaryContentAs\n/g;' \
-pe 's/([\. ])hasSameBinaryContentAs\(/$1toHaveTheSameBinaryContentAs\(/g;'
It might well be that the above commands replace a bit too much in certain cirumstances (e.g. if you use Kotlin's all
, any
or none
in tests or startsWith
, endsWith
etc.) - we guess that reverting those cases is still faster than applying suggestions manually. Feel free to remove the corresponding problematic lines and use the replacements for those cases instead.
The above command does not include the replacement of hasNext
and hasNotNext
as the replacement is depending on the type of the subject of the assertion. Please use the suggested replacements in the @Deprecated
annotation.
Please have a look at older release-notes in case you don't migrate from 0.12.0 - 0.16.0
We would like to thank Tegonal GmbH for sponsoring Support and PR-Review time. And also a big thank you for sponsoring some time to speed up the transition to the new to + infitive naming schema 🙃
Are you are using Atrium at work?
Please consider to support the project as well by:
Official release notes will be done with v0.17.0 (see https://github.com/robstoll/atrium/wiki/Release-notes-0.17.0-draft in the meantime)
its
as convenience feature extractor at the cost of poorer reportinghas duplicates
=> reports now has not: duplicate elements
because
=> thanks to @jGleitzBasically all assertion functions in api-fluent (and maybe also in api-infix) as we move to a consistent to + infinitive
naming schema in api-fluent. We might deprecate all translation enum entries which do not follow the to+infinitive schema but since we plan to rename those in 0.18.0 anyway, we might also wait until then.
Planned (previously deprecated or announced)
see #755
moreover:
Unplanned
First of all, see deprecation above which will be removed with 0.17.0, some of them are breaking as well
See atrium-roadmap -> Milestone 1.0.0
The following command is carrying out some search & replace so that you don't need to rely on the (unfortunately sometimes buggy) behaviour of ReplaceWith.
find ./ -path "*/test/*" -name "*.kt" | xargs perl -0777 -i \
-pe 's/import ch.tutteli.atrium.domain.builders.utils/import ch.tutteli.atrium.logic.utils/g;'
Please have a look at older release-notes in case you don't migrate from 0.12.0 - 0.15.0
We would like to thank Tegonal GmbH for sponsoring Support and PR-Review time.
Are you are using Atrium at work?
Please consider to support the project as well by:
Planned (previously deprecated or announced)
Unplanned
to + infinitive
syntax and will therefore deprecate most of the assertion functions, see https://github.com/robstoll/atrium-roadmap/issues/93 for more information.See atrium-roadmap -> Milestone 1.0.0
We provide @Deprecated
annotations with ReplaceWith
-> use the suggestions as advertised.
Please have a look at older release-notes in case you don't migrate from 0.12.0, 0.13.0 or 0.14.0
We would like to thank Tegonal GmbH for sponsoring Support and PR-Review time.
Are you are using Atrium at work?
Please consider to support the project as well by:
Planned (previously deprecated or announced)
Unplanned
asExpect
to turn an Assert<T>
into an Expect<T>
=> time to move on :wink:See atrium-roadmap -> Milestone 1.0.0
We don't provide ReplaceWith
to transition from atrium-domain-robstoll/-robstoll-lib to atrium-logic in all cases. We don't expect that there are enough users using types of those modules directly. Let us know if you do and have troubles migrating.
In case you should use:
mapArguments
, then search for import ch.tutteli.atrium.domain.builders.utils.mapArguments
and replace it with import ch.tutteli.atrium.logic.utils.mapArguments
nullable
, then search for import ch.tutteli.atrium.domain.builders.utils.nullable
and replace with import ch.tutteli.atrium.logic.utils.nullable
subExpect
, then search for subExpect
and replace with expectLambda
and search for import ch.tutteli.atrium.domain.builders.utils.subExpect
and replace with import ch.tutteli.atrium.logic.utils.expectLambda
Some further search&replace patterns for assertion writers, in case you use:
CharSequenceOrNumberOrChar
or CharSequenceOrNumberOrChar
, search for import ch.tutteli.atrium.domain.creating.typeutils
and replace with import ch.tutteli.atrium.logic.creating.typeutils
In case you already started using the experimental atrium-logic module, then you might run into the problem that:
getExpectOfFeature()
does not exist => replace with transform()addToInitial
does not exist => replace with collectAndAppend
genericSubjectBasedFeature
and genericFeature
from FeatureAssertions -> use either manualFeature or FeatureExtractor/FeatureExtractorBuilder insteadPlease have a look at the older release-notes in case you don't migrate from 0.12.0 or 0.13.0
We would like to thank Tegonal GmbH for sponsoring Support and PR-Review time.
Are you are using Atrium at work?
Please consider to support the project as well by: