align reporting to new `to + infinitive` schema and more reportingOptions
Table of Content
- New Features
- Fixes
- Improvements
- Deprecation
- Breaking Changes
- Migrating deprecated functionality
- Sponsors
New Features
All APIs
- aligned reporting to new
to + infinitive
schema - start error message with
I expected...
#1090 - also add reportOptions to inAnyOrder.only #1094
api-fluent-en_GB
- no fluent only additions this time
api-infx-en_GB
- add report option to
inGiven order and only
in api-infix #1050
Logic / Core
- not a feature as such but more a recommendation. We started to split API files into XyExpectations.kt, XyFeatureExtractor.kt and XySubjectChangers.kt -- we think it will help to get the distinction between those three categories
- add createAndAppend to AssertionContainer expecting Translatable #1061
Fixes
- additional elements detected wrong for inAnyOrder.only #1103
Improvements
- include given type in error message of IterableLikeToIterableTransformer #1057
- add samples for optionalExpectations of api-fluent #917 => thanks to @timacosta
- add samples for featureAssertions of api-fluent #648 => thanks to @iljakorneckis
- add samples for Map.size to api-fluent and api-infix #1039 => thanks to @ashwini-desai
- add samples for fun0Expectations also to api-infix #1044 => thanks to @Kushiro-C
- generate jdk11 byte code instead of jdk1.6 (see breaking changes below for more details)
Deprecation
- ErrorMessages enum entries which contained ASSERTION => use the replacement with EXPECTATION
- all Description...Assertion.kt => use use the replacement from Description...Expectation.kt
- DescriptionBasic.IS => use TO_BE instead
- DescriptionBasic.IS_NOT => use NOT_TO_BE instead
- maplike.contains.checkers.* => looks like they were introduced by accident, they will be removed with 0.19.0 without replacement
- COULD_NOT_EVALUATE_DEFINED_ASSERTIONS => will be removed without replacement
- VISIT_COULD_NOT_EVALUATE_ASSERTIONS => will be removed without replacement
- InOrderOnlyReportingOptions.showOnlyFailingIfMoreElementsThan => use showOnlyFailingIfMoreElementsThan will be removed with 0.19.0
- InOrderOnlyReportingOptions.numberOfElementsInSummary => use maxNumberOfExpectedElementsForSummary will be removed with 0.19.0
Deprecations with 0.19.0
- we will switch to the new MPP plugin, could be we have to deprecate a few things in this context
Deprecations with 0.20.0
We will make a major refactoring on core and logic level. Those changes should not affect most Atrium users. It will affect you if you:
- created own expectation 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.
The following changes are planned:
- 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.22.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.21.0)
Breaking Changes
Planned (previously deprecated or announced)
- removed the pre-defined assertion verbs
assert
andassertThat
as they do not fit the to + infinitive naming schema => switch toexpect
- moved 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 - renamed 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-jdk8) => 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)
Unplanned
- added InAnyOrderOnlyReportingOptions to
inAnyOrder.only
=> please re-compile - added InOrderOnlyReportingOptions and InAnyOrderOnlyReportingOptions to
inOrder.only.grouped
=> please re-compile - InOrderOnlyMatcher.addSingleEntryAssertion now expects a DescriptionIterableLikeExpectation instead of a DescriptionIterableAssertion => we guess this should not affect 99.999% of the users 😆
- renamed WithInOrderOnlyReportingOptions.report to WithInOrderOnlyReportingOptions.options
Breaking Changes with 0.19.0
First of all, see deprecation above which will be removed with 0.19.0, some of them are breaking as well
- we drop support for jdk 14 (i.e. we no longer build against it, most likely it still works without problems)
- 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
- BulletPointProvider will most likely use a BulletPointIdentifier from a different package
Breaking Changes with 0.21.0
- not pre-seen for now
Breaking Changes with 0.22.0
- we will remove all deprecated...Assertions.kt files in all APIs
- we will remove all deprecated... files in the translation modules
- we will remove all deprecated stuff on the logic/core level
Breaking Changes with 1.0.0
See atrium-roadmap -> Milestone 1.0.0
Migrating deprecated functionality
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
Sponsors
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:
- sponsoring robstoll (Author and main contributor)
- share your expectation functions with others
- report bugs
- provide feedback in case you miss a feature