to + infinitive naming schema change
Table of Content
- New Features
- Fixes
- Improvements
- Deprecation
- Breaking Changes
- Migrating deprecated functionality
- Sponsors
New Features
All APIs
- Refactor/Renaming to a consistent to + infitive schema #840
- notToBeGreaterThan and notToBeLessThan #878 => thanks to @jGleitz for the feature request
- add Path.notToBeWritable #1001 => thanks to @rhushikesh for the implementation
- add Path.notToBeExecutable #1015 => thanks to @rhushikesh for the implementation
- add Path.notToBeReadable #942 => thanks to @botex98 for the implementation
api-fluent-en_GB
- Add option to display only unexpected or missing elements in asserts on collections #292
api-infx-en_GB
- no infix only additions this time
Logic / Core
- none this time
Fixes
- fix empty feature extractor #950
Improvements
- Move hasNext() check out of Iterable.all #305 => thanks to @wordhou for the implementation
- improve reporting for containsDuplicates #813 => thanks to @wordhou for the implementation
- less verbose containsNot reporting and more hints #722 => thanks to @wordhou for the implementation
- don't show number of occurrences for contains.inAnyOrder.atLeast(1) #310 => thanks to @wordhou for the implementation
- rename withFailureHint to withHelpOnFailure #671 => thanks to @stevenlmcgraw for the implementation
- show more than first line when using mocha test runner #691 => thanks to @wordhou for the implementation
- Empty assertionCreator lambda warning is added twice #933 => thanks to @wordhou for the implementation
- rewrite samples to use Kotlin DSL for gradle #873 => thanks to @wordhou
- add samples for iterableExpectations of api-fluent #651 => thanks to @wordhou
- add samples for fun0Assertions of api-fluent #650 => thanks to @szatyinadam
- add samples for mapExpectations of api-infix #861 => thanks to @kacmacuna
- add samples for mapEntryExpectations of api-infix #862 => thanks to @kacmacuna
- add samples for iterableExpectations of api-infix #992 => thanks to @vinayak03
- add samples for fileAssertions of api-fluent #994 => thanks to @iljakorneckis
- add samples for resultExpectations of api-fluent #993 => thanks to @vinayak03
- add samples for bigDecimalExpectations of api-fluent #904 => thanks to @timacosta
- add samples for pathExpectations of api-fluent #919 => thanks to @kacmacuna
- add samples for throwableExpectations of api-fluent #658 => thanks to @szatyinadam
- add samples for infix throwable expectations #1002 => thanks to @szatyinadam
- add samples for chronoLocalDateExpectations of api-fluent #914 => thanks to @dias-wagner
- add samples for chronoLocalDateTimeExpectations of api-fluent #915 => thanks to @dias-wagner
- add samples for chronoZonedDateTimeExpectations of api-fluent #916 => thanks to @dias-wagner
- add samples for localDateAssertions of api-fluent and api-infix #996 => thanks to @rhushikesh
- add samples for localDateTimeAssertions of api-fluent and api-infix #997 => thanks to @rhushikesh
- add samples for zonedDateTimeAssertions of api-fluent #998 => thanks to @vinayak03
- add samples for arrayAssertions of api-infix #675 => thanks to @szatyinadam
- add samples for pairAssertions of api-infix #679 => thanks to @szatyinadam
- add samples for pathExpectations of api-infix #999 => thanks to @rhushikesh
- add samples for sequenceExpectations of api-fluent #657 => thanks to @loge1998
- add samples for ZonedDateTime to api-infix #1019 => thanks to @iljakorneckis
- Add ChronoLocalDate, ChronoLocalDateTime and ChronoZonedDateTime expectation samples for the infix api #941 => thanks to @dias-wagner
Deprecation
- we deprecated the pre-defined assertion verbs
assert
andassertThat
as they do not fit the to + infinitive naming schema; they will be removed with 0.18.0 => switch to expect - basically all expectation functions which did not follow the
to + infinitive
naming schema => see migration further below
Deprecations with 0.18.0
- we will deprecate all translation enum entries which do not follow the
to + infinitive
naming schema
Deprecations with 0.19.0
We will make a major refactoring on core and logic level where we will:
- replace
Assertion
withProof
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) - re-write reporting entirely, a lot of types in
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:
- created own assertion function based on
assertionBuilder
or other types which are defined in core or logic. - use an own expectation verb
Migration steps/pointers will be provided in the release notes as usual.
Breaking Changes
Planned (previously deprecated or announced)
- removed deprecated modules: atrium-core-robstoll, atrium-core-robstoll-lib, atrium-domain-builders (including ExpectBuilder) -- see #856
- removed deprecated functions/types which were scheduled to be removed with 0.17.0, i.a. ReporterFactory, RawString, collectForDifferentSubject -- see #858 and #859
- not really a breaking change but just as info, we renamed core-api to core (as we no longer split core into api and implementation)
Unplanned
- none this time
Breaking Changes with 0.18.0
First of all, see deprecation above which will be removed with 0.18.0, some of them are breaking as well
- we will move expectation functions already following the
to + infinitive
convention from ...Assertions.kt to the corresponding ...Expectations.kt file which is a binary breaking change => please re-compile your sources - we will rename files named charSequence/iterableLike/mapLikeContains... to charSequence/iterableLike/mapLikeToContain which is a binary breaking change => please re-compile your sources
- we will generate jdk 11 byte code (yes, we skip jdk8 as newer android versions support jdk11 byte code) an no longer jdk1.6 (and thus also rely on Kotlin's stlib-jdk11) => might affect you in case you still generate jdk1.6 or jdk1.8 in tests as inlining will not work (jdk11 code cannot be inlined into jdk1.6 or jdk1.8)
Breaking Changes with 0.19.0
- BulletPointProvider will most likely use a BulletPointIdentifier from a different package
- might be that we need to change package names which is a binary and source backward compatibility break in case we switch to the new Kotlin MPP plugin with 0.19.0
Breaking Changes with 0.20.0
- we will remove all deprecated ...Assertions as well as other deprecating stuff on the logic level.
Breaking Changes with 1.0.0
See atrium-roadmap -> Milestone 1.0.0
Migrating deprecated functionality
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
Sponsors
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:
- sponsoring robstoll (Author and main contributor)
- share your expectation functions with others
- report bugs
- provide feedback in case you miss a feature