Repository navigation
Table of Content
- New Features
- Fixes
- Improvements
- Deprecation
- Breaking Changes
- Migrating deprecated functionality
- Sponsors
Full Changelog: v1.2.0...v1.3.0
New Features
All APIs
- feature extractor for Iterator.next - #1816 => thanks to @hubtanaka
- Expect<ClosedRange>.toBeIn - #2055 => thanks to @matcha4smiley
- Expect.length - #2106 => thanks to @joonseolee
api-fluent only
- toBeIn, notToBeIn, deprecate notToEqualOneOf/In - #2201
- add expectation functions for OffsetDateTime - #2202
- Add feature extractors for SQLException - #1821
api-infx only
- none this time
Caution
We will discontinue the api-infix, the usage is too low to justify the additional work. This was the last release, get in touch in case you would like to sponsor it.
Core
- AtriumError now extends AssertionFailedError from opentest4j on the jvm. IntelliJ thus offers the
click to see differencelink which offers a diff view. - testFactory as preparation to get rid of spek
Fixes
- another hack/workaround for the double exception msg printing problem - #1751 and #1802
- double error message in intellij now also for JS, find workaround - #1804
- toContain.exactly.matchFor doesn't work if BnMS Node is used in Pattern - #1886
- typo in Expect.notToContainKey - #1885
Improvements
- migrate check-dexer.gradle from groovy to kotlin i.e. to check-dexer.gradle.kts - #1949 => thanks to @amasotti
- Use random github matrix generation - #1776 => thanks to @BereKanters
- samples for CharSequence.toContain... in api-infix - #1774 => thanks to @BereKanters
- samples for Iterable.toContain....value - #1808 => thanks to @hubtanaka
- samples for Iterable.toContain....values - #1810 => thanks to @hubtanaka
- samples for Iterable.toContain....entries - #1815 => thanks to @hubtanaka
- add FeatureExtractorSamples to api-infix - #1901 => thanks to @ragul-engg
- rewrite :readme-examples from spek to junit5 - #1834 => thanks to @hubtanaka for the pre-work
- migrate js-stubs from kotlin-js to mpp with target js - #1921, #1972 => thanks to @ragul-engg
- add IterableLikeToContainCheckerSamples to api-infix - #1916 => thanks to @ragul-engg
- add IterableLikeToContainInAnyOrderCreatorSamples to api-infix - #1917 => thanks to @ragul-engg
- add IterableLikeToContainInAnyOrderOnlyCreatorSamples to api-infix - #1941 => thanks to @Onaizit3
- add IterableLikeToContainInOrderOnlyCreatorSamples to api-infix - #1971 => thanks to @ragul-engg
- add IterableLikeToContainInOrderOnlyGroupedCreatorSamples to api-infix - #1977, #1998 => thanks to @AlexChulo
- remove validate-gradle-wrapper.yml, ensure each workflow uses setup-gradle - #1945 => thanks to @kavyanshkhandelwal
- fix update to junit 5.12.1 in maven sample project - #1936 => thanks to @henriquedefreitas
- fix update to Kotlin 2.1.20 in the multiplatform and js sample projects - #1948 => thanks to @amasotti
- migrate CharSequenceExpectationsSpec to kotlin-test - #1993 => thanks to @anson-ryea
- migrate CharSequenceNotToContainExpectationsSpec to kotlin-test - #1994 => thanks to @hubtanaka
- migrate CharSequenceNotToContainOrAtMostExpectationsSpec to kotlin-test - #1999 => thanks to @anson-ryea
- migrate CharSequenceToContainAtLeastExpectationsSpec to kotlin-test - #2001 => thanks to @anson-ryea
- migrate CharSequenceToContainAtMostExpectationsSpec to kotlin-test - #2005 => thanks to @anson-ryea
- migrate CharSequenceToContainExactlyExpectationsSpec to kotlin-test - #1995 => thanks to @markrizkalla
- migrate CharSequenceToContainNotToContainExpectationsSpec to kotlin-test - #2031 => thanks to @anson-ryea
- migrate CollectionExpectationsSpec to kotlin-test - #2082 => thanks to @TomerPacific
- migrate Fun0ExpectationsSpec to kotlin-test - #2101
- migrate IterableExpectationsSpec to kotlin-test - #2113 => Thanks to @FelixSchwer for part of the work
- migrate IterableNotToContainValuesExpectationsSpec to kotlin-test - #2086 => thanks to @TomerPacific
- migrate IterableNotToHaveElementsOrAllExpectationsSpec to kotlin-test - #2091 => thanks to @TomerPacific
- migrate IterableNotToHaveElementsOrAnyExpectationsSpec to kotlin-test - #2100 => thanks to @TomerPacific
- migrate IterableNotToHaveElementsOrNoneExpectationsSpec to kotlin-test - #2104 => thanks to @TomerPacific
- migrate IterableToContainInAnyOrderAtLeast1EntriesExpectationsSpec to kotlin-test - #2107 => thanks to @TomerPacific
- migrate IterableToContainInAnyOrderAtLeast1ValuesExpectationsSpec to kotlin-test - #2114 => thanks to @TomerPacific
- migrate IterableToContainInAnyOrderNotOrAtMostValuesExpectationsSpec to kotlin-test - #2127 => thanks to @HusseinYasser
- migrate IterableToContainInAnyOrderOnlyValuesExpectationsSpec to kotlin-test - #2080, #2090 => thanks to @TomerPacific
- migrate IterableToContainInAnyOrderOnlyEntriesExpectationsSpec to kotlin-test - #2188 => thanks to @ShahriyarSheikh
- Correct a broken link to a source file - #2160 => thanks to @liblit
- correct capitalization in a usage hint - #2164 => thanks to @liblit
Deprecation
- notToEqualOneOf/notToEqualOneIn was deprecated => use toBeIn/notToBeIn
- We had to postpone the rewrite from Assertion to Proof initially planned for 1.3.0. This will now follow in 2.x, see the next section. v1.3.0-alpha-1 and v1.3.0-alpha-2 contained work of it but was dropped from the v1.3.0 release in the end
Deprecations with v2.x
We will make a major refactoring on core and logic level (not before 2.1.0). Those changes should not affect most Atrium users. It might affect you if you:
- created own expectation function based on
assertionBuilderor other types which are defined in core or logic. - use an own expectation verb
- everything related to Assertions
- everything related to Translatable (Untranslatable, TranslatableWithArgs) => use Text
- all Description...Expectation -> switch to Description...Proof => you can use the provided ReplaceWith (see also Migration for hints)
- everything in atrium-logic, we move the functionality to core and will drop this module in the future (with 3.0.0 at the latest)
- we will drop the support for internationalization with 3.0.0, all functions involving Translatable will be deprecated in v2.0.0
Migration steps/pointers will be provided in the release notes as usual.
The following changes are planned:
- replace
AssertionwithProofand along with it rename many types incorporating Assertion in its name or in its package's name => we will remove Assertion and co. with 3.0.0 at the latest) - re-write reporting entirely, a lot of types in
ch.tutteli.atrium.reportingwill be affected
Breaking Changes
Planned (previously deprecated or announced)
- removed translations_de_CH
Unplanned
- we updated kbox from 1.x to 3.x, should you use kbox as well, then you need to update to a 3.x version as well due to the removal of mapWithIndex (see https://github.com/robstoll/kbox/releases/tag/v2.0.0)
- AtriumError now extends AssertionFailedError from opentest4j in JVM. Should most likely not be a concern but could require a re-compile.
Breaking Changes with 2.0.0
- we drop the api-infix
- we will drop the support for Kotlin 1.4 (most likely we will require Kotlin 2.0)
- we will require jdk 17 and drop support for jdk 11
- we will remove deprecated functionality in
implpackages (sometimes without replacement). As always there are no backward compatibility guarantees for classes inimplpackages, use at your own risk. - we will switch the CharSequence toContain searches from a non-disjoint search to a disjoint search. Please contact us if you really need a non-disjoint search, we might introduce an option in this case.
- we most likely drop
en_GBfrom package names - might be we move BulletPointProvider to another package
Breaking Changes with 3.0.0
- we will remove everything deprecated in 2.x i.e. everything related to Assertions, Translations etc.
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 1.2.0
Sponsors
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:
- sponsoring robstoll (Author and main contributor)
- share your expectation functions with others
- report bugs
- provide feedback in case you miss a feature