Releases: robstoll/atrium
v1.2.0 toHoldThirdPartyExpectation, extractSubject
Table of Content
- New Features
- Fixes
- Improvements
- Deprecation
- Breaking Changes
- Migrating deprecated functionality
- Sponsors
Full Changelog: v1.1.0...v1.2.0
New Features
All APIs
- add IterableFeatureExtractor.last #1654 => thanks to @constantine-zubrilin
- add extractSubject #1703 => see also https://github.com/robstoll/atrium/blob/v1.2.0/README.md#subject-extraction
- toHoldThirdPartyExpectation, support the usage of third party expectation libraries - ease the migration to Atrium #1702 => see also https://github.com/robstoll/atrium/blob/v1.2.0/README.md#integrate-other-assertionexpectation-libraries
api-fluent
- introduce CharSequence...matchFor(Regex) as replacement of regex(Regex) #1499 (matchFor already exists in api-infix, thus api-fluent only)
api-infx
- no infix only additions this time
Logic / Core
- withHelpOnFailureBasedOnDefinedSubject has now an
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) #1674 - use better names than TSub, TExpected, TNotExpected #1706 (thanks to @vlsi for the idea)
Fixes
- Library lacks support for IR compiler #1481
- workaround intellij KotlinJs bug which removes column numbers in stack traces #1655
- only last failing expectation(-group) is shown in reporting #1705
Improvements
- apply publishing plugins, esp. tutteli-dokka only if env PUB is true #1612
- use IR-backend for JS
- Improve/samples for Iterable.toContain.atLeast/butAtMost/atMost #1669 => thanks to @fergbaldo for some pre-work
- add tests for reportOptions to MapToContainInOrderOnlyKeyValueExpectationsSpec #1129 => thanks to @simonNozaki for some pre-work
- samples for Iterable feature extractors #1569 => => thanks to @constantine-zubrilin
- Hyperlink for atrium-fluent in Examples section of README routes to non-existant file #1718 => thanks to @lkorsman
Deprecation
- all enums in atrium-translations-de_CH were deprecated, switch to atrium-translations-en_GB (we will drop it with Atrium v1.3.0)
Deprecations with 1.3.0
We will make a major refactoring on core and logic level. Those changes should not affect most Atrium users. It might 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
- we will drop the support for internationalization with 1.4.0, all functions involving Translatable will be deprecated in v1.4.0
- might be we drop
en_GB
from package names - might be we move BulletPointProvider to another package
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 1.5.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 1.3.0)
Breaking Changes
Planned (previously deprecated or announced)
- dropped support for Kotlin 1.3
- we use the IR compiler backend for JS
Unplanned
- we added an extra parameter (with default) to withHelpOnFailureBasedOnDefinedSubject, a binary BC, please re-compile
Breaking Changes with 1.3.0
- we will drop support for translating the output - API might persist until 2.0.0 but we might already only use UsingDefaultTranslator
- we might introduce interface groups for ReporterBuilder - binary compatibility break
- BulletPointProvider might use a BulletPointIdentifier from a different package
- we might drop the experimental expectExtension such as
expect(...).withOptions
provide it in a different form
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.0.0 or newer
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
v1.1.0 expectGrouped and drop Kotlin 1.2 support
Table of Content
- New Features
- Fixes
- Improvements
- Deprecation
- Breaking Changes
- Migrating deprecated functionality
- Sponsors
Full Changelog: v1.0.0...v1.1.0
New Features
All APIs
- introduce expectGrouped (ExpectGrouping) and group #1560 => see data-driven testing for examples and explanation
CharSequence.toContain....matchFor(Regex)
as replacement for...regex(Regex)
#1499- Add notToBeAnInstanceOf #1400 => thanks to @AncutaIoan
api-fluent-en_GB
- no fluent only additions this time
api-infx-en_GB
- no infix only additions this time
Logic / Core
- none this time
Fixes
- none this time
Improvements
- change report for notToEqualNull #330 => thanks to @JordanllHarper
- also discourage the usage of notToEqual in case of nullable BigDecimal #1507
- typo fixed in README.md #1472 => thanks to @jufickel-b
- restrict E in Expect<Optional>.toBePresent to : Any #1509 => thanks to @Nikos-Tsiougranas
- add samples for BigDecimal expectation functions in api-infix #1505 => thanks to @VarunEnishetty
- samples for CharSequence.toContain.atMost #1517 => thanks to @Nikos-Tsiougranas
- samples for CharSequence.toContain.atLeast.butAtMost #1515 => thanks to @Nikos-Tsiougranas
- samples for CharSequence.toContain.atMost #1517 => thanks to @Nikos-Tsiougranas
- samples for CharSequence.toContain.exactly #1516 => thanks to @Nikos-Tsiougranas
- samples for CharSequence.toContain...value #1520 => thanks to @Nikos-Tsiougranas
- samples for CharSequence.toContain...values #1519 => thanks to @Nikos-Tsiougranas
- samples for CharSequence.toContain...regex/matchFor #1521 => thanks to @Nikos-Tsiougranas
- samples for CharSequence.toContain...elementsOf #1522 => thanks to @Nikos-Tsiougranas
- samples for Iterable.toContain.exactly #1544 => thanks to @Nikos-Tsiougranas
- samples for Map.toContain....entry #1555 => thanks to @danherrera
- samples for Map.toContain....entries #1556 => thanks to @danherrera
- samples for Map.toContain....entriesOf #1557 => thanks to @danherrera
- add Map.toContain... infix samples #1567 => thanks to @danherrera
- add CharSequence.ignoringCaseWithNotChecker sample #1571
- add JVM kotest sample project #1325 => thanks to @ReccaFlames
- use kotlin 1.8.21 but api/languageLevel 1.4 #1454 (except for the kotlin 1.3 module)
- update to gradle 8.1.1 #1455
- rewrite build to build-logic #1465 => big thanks to @vlsi for the idea and most of the work
- introduce (build)libs.versions.toml and move yarn.lock into /gradle #1566
- create sample project to demonstrate how Atrium can be used in combination with TestNG #1562 => thanks to @Zuretto
Deprecation
- deprecated Kotlin 1.3 support, i.e. deprecated the package ch.tutteli.atrium.api.fluent.en_GB.kotlin_1_3 => we moved the functions to
ch.tutteli.atrium.api.fluent.en_GB (same same for infix), use those instead CharSequence.toContain....regex(Regex)
=> use...matchFor(Regex)
- api-infix: keyValues in the context of mapLike => use entries
Deprecations with 1.2.0
- we will drop the support for internationalization with 1.3.0, all functions involving Translatable will be deprecated in v1.2.0
Deprecations with 1.3.0
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:
- created own expectation function based on
assertionBuilder
or other types which are defined in core or logic. - use an own expectation verb
- might be we drop
en_GB
from package names - might be we move BulletPointProvider to another package
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 1.5.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 1.3.0)
Breaking Changes
Planned (previously deprecated or announced)
- dropped support for Kotlin 1.2 (support for Kotlin 1.3 is deprecated and will be dropped with Atrium v1.2.0 -- we will emit languageLevel = 1.4, which in theory should still be consumable by Kotlin 1.3 as long as we don't use a feature which was introduced with Kotlin 1.4 -- no guarantee though)
- we use the IR compiler backend for JVM
- dropped the support for jdk 14 (i.e. we no longer build against it, most likely it still works without problems) and officially support jdk 17)
Unplanned
- was planned to be deprecated but Windows was in the way due to its case-insensitive file system: we renamed the package
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-compile - renamed parameter name of
Map... the keyValues
from keyValues to entries sincekeyValues
is deprecated in favour ofentries
. 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. - fixed typo in mapLikeToCntain => mapLikeToContain, this is a bc break, please re-compile
Breaking Changes with 1.2.0
- we will switch from LEGACY compiler backend to IR backend for JS
- we will drop support for translating the output - API will persist until 1.3.0 but we might already only use UsingDefaultTranslator
- we might introduce interface groups for ReporterBuilder - binary compatibility break
- we drop the kotlin_1_3 extension which was deprecated with Atrium 1.1.0
- BulletPointProvider might use a BulletPointIdentifier from a different package
- we might drop the experimental expectExtension such as
expect(...).withOptions
provide it in a different form
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.0.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
1.1.0 preview (not complete) and with JS IR support
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:
- it lacks the kotlin_1_3 extension but the corresponding expectation functions are already integrated into the normal module. Iin case you also switch from LEGACY to IR and were using the kotlin_1_3 extension, then search and replace the import statement. search
import ch.tutteli.atrium.api.fluent.en_GB.kotlin_1_3
and replace withimport ch.tutteli.atrium.api.fluent.en_GB
- it does not fix the backward-compatibility issues Jetbrains has introduces from LEGACY to IR -- in case you should see
<unknown> (js: ...)
in reporting, then it's due to the breaking change => I assume Atrium should still be usable in 99.99% of the cases
v1.0.0 notToHaveElementsOr... and based on current Multiplatform Plugin
Table of Content
- New Features
- Fixes
- Improvements
- Deprecation
- Breaking Changes
- Migrating deprecated functionality
- Sponsors
Full Changelog: v0.18.0...v1.0.0
New Features
All APIs
- notToHaveElementsOrAny
- notToHaveElementsOrAll
- notToHaveElementsOrNone
- deprecate ChronoZonedDateTime.toBeLessThan etc. in favour of isBefore etc. #709 => thanks to @JordanllHarper
- add asLocalDate for java.util.Date #1285 => thanks to @sajalverma17
- add asLocalDateTime for java.util.Date #1286 => thanks to @Jujusp
- undeprecate nested
expect
in preparation of #1330
api-fluent-en_GB
- no fluent only additions this time
api-infx-en_GB
- no infix only additions this time
Logic / Core
- none this time
Fixes
- stackBacktrace is removed in JS when the NoOpAtriumErrorAdjuster is used #1383
- Kotlin (1.4, 1.5) bug: Result unwrapping affects Atrium #1234 => thanks to @JordanllHarper
Improvements
- Hint for
not to contain
#1156 - Add icon for JetBrains IDEA / Toolbox #1434 => thanks @vlsi for the idea
- Add a version switcher to the Code Documentation: https://docs.atriumlib.org and and out-of-date warning
build
- Redo Build Logic #744 (update MPP plugins from old to new plugins)
- rewrite readme-examples/build.gradle to build.gradle.kts #1159 => thanks to @jakubriegel
- rewrite misc/tools/atrium-js-sample-test/build.gradle to build.gradle.kts #1160 => thanks to @femialaka
- rewrite misc/tools/atrium-samples-test/build.gradle to build.gradle.kts #1161 => thanks to @Stexxe
- rewrite the root build.gradle to build.gradle.kts and update tutteli-gradle-plugin
- update to new dokka plugin #641
- Builds take too long #971
samples
- Added SequenceSubjectChangerSamples.kt with samples #1179 => thanks to @JordanllHarper
- add ResultExpectationSamples also to api-infix #1157
- add samples for iterableSubjectChangers to api-fluent and api-infix #1038 => thanks to @simonNozaki
- add samples for sequenceSubjectChangers also to api-infix #1046 => thanks to @JordanllHarper
migrations
- migrate DescriptiveWithBasedOnSubjectSpec from spek to kotest #1194 => thanks to @jakubriegel
- migrate BulletPointProviderSpec from spek to kotest #1195 => thanks to @jakubriegel
- migrate AtriumErrorSpec from spek to kotest #1196 => thanks to @jakubriegel
- migrate AdjustStackSpec from spek to kotest #1201 => thanks to @Dark-Knight11
- migrate TextSpec from spek to kotest #1197 => thanks to @Dark-Knight11
- migrate fluent-en_GB SmokeTest from spek to kotest #1202 => thanks to @Dark-Knight11
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
Deprecation
- none this time
Deprecations with 1.1.0
- we will drop the support for internationalization with 1.2.0, all functions involving Translatable will be deprecated in v1.1.0
- we will rename the package
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 API - same same for iterable.toContain (fluent and infix API)
- we will drop support for Kotlin 1.2 and deprecate the package ch.tutteli.atrium.api.fluent.en_GB.kotlin_1_3 as we move the functions to
ch.tutteli.atrium.api.fluent.en_GB (same same for infix) - might be we drop
en_GB
from package names - might be we move BulletPointProvider to another package
Deprecations with 1.2.0
We will make a major refactoring on core and logic level. Those changes should not affect most Atrium users. It might 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 1.5.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 1.3.0) - rename StringBuilder.appendln() to appendLine (to follow kotlin)
Breaking Changes
Planned (previously deprecated or announced)
- removed COULD_NOT_EVALUATE_DEFINED_ASSERTIONS => will be removed without replacement
- removed VISIT_COULD_NOT_EVALUATE_ASSERTIONS => will be removed without replacement
- removed ContainsAssertionCreator#getDescriptionContains => use descriptionToContain
- removed InOrderOnlyReportingOptions.showOnlyFailingIfMoreElementsThan => use showOnlyFailingIfMoreElementsThan
- removed InOrderOnlyReportingOptions.numberOfElementsInSummary => use maxNumberOfExpectedElementsForSummary
- removed ErrorMessages enum entries which contained ASSERTION
- removed maplike.contains.checkers.* => looks like they were introduced by accident, removed without replacement
- removed all deprecated function/classes/interfaces/translations etc. which were marked to be removed with 1.0.0 latest
Unplanned
- not really a breaking change but we already removed en_GB from artifact names.
Breaking Changes with 1.1.0
- we will drop support for Kotlin 1.2 (might even drop support for kotlin 1.3)
- we will switch from LEGACY compiler backend to IR backend for JS
- we will use the IR compiler backend for JVM
- we will drop support for jdk 14 (i.e. we no longer build against it, most likely it still works without problems) and officially support jdk 17
- we will drop support for translating the output - API will persist until 1.2.0 but we might already only use UsingDefaultTranslator
- we might introduce interface groups for ReporterBuilder - binary compatibility break
Breaking Changes with 1.2.0
- we might drop support for kotlin 1.3 (if not already in 1.1.0)
- BulletPointProvider will most likely use a BulletPointIdentifier from a different package
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.18.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
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
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....
to + infinitive naming schema change - please test migration
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)
Path.isSymbolicLink/isEmptyDirecty, `its` and logic/core refactorings
Table of Content
- New Features
- Fixes
- Improvements
- Deprecation
- Breaking Changes
- Migrating deprecated functionality
- Sponsors
New Features
All APIs
- #765 Path.isSymbolicLink => thanks to @fimbulwint for the implementation
- #766 Path.isEmptyDirectory => thanks to @mai2412 for the implementation
- #837 introduce
its
as convenience feature extractor at the cost of poorer reporting
api-fluent-en_GB
- no fluent only additions this time
api-infx-en_GB
- no infix only additions this time
Logic / Core
- #586 refactor core, don't use ServiceLoader
- introduced experimental ComponentFactoryContainer which replaces the current ServiceLoader approach
- moved most functionality from core-robstoll-lib to atrium-api-core (though in impl packages and not exposed via module-info, create an issue if you have the need to use an implementation directly)
Fixes
- #771 contains all no longer working in infix
- #777 containsNoDuplicate reports
has duplicates
=> reports nowhas not: duplicate elements
Improvements
- #677 add samples for iteratorAssertions of api-infix => thanks to @lilimapradhan9
- #678 add samples for listAssertions of api-infix => thanks to @lilimapradhan9 and thanks to @szatyinadam for a fix
- #676 add samples for comparableAssertions of api-infix => thanks to @mai2412
- #680 add samples for collectionAssertions of api-infix => thanks to @szatyinadam
- #741 Improve the Documentation for
because
=> thanks to @jGleitz - #742 Remove ‘@throws AssertionError’ KDoc from Assertion Functions => thanks to @jGleitz
- #756 create PR with generated README examples on master if necessary
- #746 Change Wording from ‘Assertion’ to ‘Expectation’ => thanks to @jGleitz for the idea and part of the work
- #806 filter out io.kotest runner from RemoveRunnerAtriumError => thanks to @mai2412 for the implementation
- #803 don't depend on jcenter
Deprecation
- VarArgHelper, Group, and helper functions in package ch.tutteli.atrium.domain.builders.utils; they will all be removed with 0.17.0 => use the equivalent from atrium-logic (search & replace import)
- moved PleaseUseReplacementException from domain-builders to core
- evalOnce; will be removed with 0.17.0 without replacement.
- SubjectProvider; will be removed with 0.17.0 without replacement. => use Expect on the API level and AssertionContainer on the logic level
- AssertionBuilder.createDescriptive => use _logic.createDescriptiveAssertion instead
- AssertionContainer.collectForDifferentSubject => use collectBasedOnDifferentSubject
- FeatureExpectOptionsChooser from atrium-core => use the one from atrium-logic instead
- Reporter.atriumErrorAdjuster; will be removed with 0.17.0 => use ComponentFactoryContainer instead
- MethodCallFormatter.format; will be removed with 0.17.0 => use formatCall
- Feature.description and FeatureWithCreator.description in api-infix; will be removed with 0.17.0 => use descriptionProvider instead
- ReporterFactory and reporter => use ComponentFactoryContainer instead
- ReporterBuilder including all steps => use ComponentFactoryContainer instead
- ExpectBuilder including all steps => use RootExpectBuilder from atrium-logic
- MetaFeature; will be removed with 0.17.0 => use MetaFeature from atrium-logic
- MetaFeatureBuilder; will be removed with 0.17.0 without replacement
- MetaFeatureOption; will be removed with 0.17.0 => use MetaFeatureOption from the API
Deprecations with 0.17.0
Basically 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.
Breaking Changes
Planned (previously deprecated or announced)
see #755
- removed deprecated APIS and bundles
- removed deprecated functions in domain-api, domain-robstoll, domain-robstoll-lib and domain-builders
- removed deprecated atrium-spec
- removed other deprecated modules
moreover:
- #773 we do no longer build against jdk 9, jdk10, jdk12, jdk13 or in other words we drop support for those versions => update to jdk 11 or stick with jdk8
- removed AssertionHolder -> changed DelegatingExpect accordingly, expects now an AssertionContainer
- removed DescriptionMapAssertion
- parameter objects extending Group from domain-builders now extend Group from builders => binary backward compatibility break - most likely you will not notice anything. If you should have used own types extending Group, then switch to atrium-logic as well.
- we removed deprecated ...Assertions as well as other deprecating stuff on the logic level.
Unplanned
- removed stuff in core as well, which was already deprecated and only used by the above deprecated functionality. This was not announced prior but we doubt that someone will be affected.
- made BasicAssertionGroup, ExplanatoryAssertionGroup, InvisibleAssertionGroup, BasicExplanatoryAssertion, BasicDescriptiveAssertion and EmptyNameAndRepresentationAssertionGroup internal
- removed deprecated translations which were scheduled to be removed with 1.0.0, we kept them long enough.
- made constructor of ArgumentMapperBuilder internal => use mapArguments instead
- moved MetaFeature to atrium-logic and MetaFeatureOption to the APIs, this is a binary backward compatible break only => please re-compile.
Breaking Changes with 0.17.0
First of all, see deprecation above which will be removed with 0.17.0, some of them are breaking as well
- we will remove RawString => switch to Text
- we will remove StringBasedRawString => switch to Text
- we will remove Untranslatable.constructor which expect CharSequence and a lambda => use the primary constructor which expects a string
- we will remove Feature.description and FeatureWithCreator.description in api-infix => use descriptionProvider instead
- we will remove domain-builders => switch to atrium-logic
- we will remove domain-robstoll and domain-robstoll-lib => switch to atrium-logic
- we will remove core-robstoll => create components via ComponentFactoryContainer (still experimental currently thought)
- we will remove core-robstoll-lib => implementation is now part of core
- not really a breaking change but just as info, we will most likely rename core-api to core (as we no longer split core into api and implementation)
- 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.17.0
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 ./ -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
Sponsors
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:
- sponsoring robstoll (Author and main contributor)
- share your expectation functions with others
- report bugs
- provide feedback in case you miss a feature
MapLike.contains
Table of Content
- New Features
- Fixes
- Improvements
- Breaking Changes
- Deprecation
- Migrating deprecated functionality
- Sponsors
New Features
All APIs
- #173 MapLike.contains including sophisticated builder (also for inOrder.only)
- #68 MapLike.containsOnly
- #733 MapLike.size
- #660 add Expect.because to document the reason for an assertion => thanks to @Valefant for most of the implementation and @jGleitz for the proposition and discussion.
api-fluent-en_GB
- no fluent only additions this time
api-infx-en_GB
- no infix only additions this time
Logic / Core
- #711 turn MapAssertions into MapLikeAssertions
Fixes
- #719 fix link to examples in README
Improvements
- #717 reword entry in reporting of Iterable.contains to element
- #720 don't show the feature value in an explanatory assertion group
- #736 don't show the down-cast in toBeNullIfNullGivenElse
- #738 use the info bullet point for unexpected Exceptions
- #739 use info bullet point for notice in BigDecimal.isEqualIncludingScale
- add link to output of examples in README
- list third-party extensions in README => create a pull request if you are a maintainer of an extension, we happily add yours as well.
Breaking Changes
Planned (previously deprecated or announced)
- none this time
Unplanned
- none this time
Deprecation
- AnyAssertions.toBeNull on the logic level; will be removed with 0.16.0 => use toBe(null)
- DescriptionMapAssertion; will be removed with 0.16.0 => use DescriptionMapLikeAssertion
Deprecations with 0.16.0
- we will transform the api-fluent to a consistent
to + infinitive
syntax and will therefore deprecate most of the assertion functions, see robstoll/atrium-roadmap#93 for more information.
Breaking Changes with 0.16.0
- we will remove all deprecated APIs (you need to migrate to api-fluent or api-infix if you want to use this version or onwards, see older release notes for migration hints and scripts).
- we will also remove deprecated stuff on the domain/core level where they only remained due to the deprecated APIs.
- remove AnyAssertions.toBeNullIfNullGivenElse which expects a kClass => use the one which does not
- might be we have to break compatibility when we deprecate core-robstoll and core-robstoll-lib
- might also be, that we have to break compatibility when we move ExpectBuilder and ExpectOptions from domain-builders to atrium-logic
- we will break binary compatibility when we move Group from atrium-domain-builders to atrium-logic (or to the individual APIs)
- we will break binary compatibility when we move VarArgHelper from atrium-domain-builders to atrium-logic
- we might skip the process of deprecating stuff on the logic level. We will rename ...Assertions to ...Expectations
- we will rename files on the API level which is a binary break
- 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.16.0
- we will drop support for Java 9 and 10 (we will build 0.16.0 with jdk11) => update to jdk 11 or stick with jdk8
- we will no longer check if compatible with jdk 12 or 13 => use jdk11 (or jdk14 but we will move to jdk15 as soon as jacoco supports it)
Breaking Changes with 1.0.0
See atrium-roadmap -> Milestone 1.0.0
Migrating deprecated functionality
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
Sponsors
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:
- sponsoring robstoll (Author and main contributor)
- share your assertion functions with others
- report bugs
- provide feedback in case you miss a feature
Path assertions and ZonedDateTime as string
Table of Content
- New Features
- Fixes
- Improvements
- Breaking Changes
- Deprecation
- Migrating deprecated functionality
- Sponsors
New Features
All APIs
- #461 Sequence.asList => thanks to @Valefant for the implementation
- #462 Iterable.asList => thanks to @Valefant for the implementation
- #172 Iterable.containsNoDuplicates => thanks to @frikit for the implementation
- #480 accept date as string in ISO 8601 format for ChronoLocalDate => thanks to @Valefant for implementation
- #482 accept date and time as string in ISO 8601 for ChronoZonedDateTime => thanks to @Valefant for implementation
- #591 Path.isExecutable => thanks to @jGleitz for the implementation
- #629 Path.isAbsolute => thanks to @jakubriegel for the implementation
- #630 Path.isRelative => thanks to @jakubriegel for the implementation
- #590 Path.hasDirectoryEntry => thanks to @jgrgt for the first implementation (api-fluent) and @jGleitz for the completion (generalise to logic and add to infix)
api-fluent-en_GB
- no fluent only additions this time
api-infx-en_GB
- no infix only additions this time
Domain / Core
- we transition away from atrium-domain-... to atrium-logic, getting rid of ServiceLoader and other changes. Some parts of domain were already deprecated (see below)
Fixes
- #631 Atrium stops working for JS with Kotlin 1.4 => thanks to @chadmarchand for the fix
Improvements
- #628 Report Evaluation Result After notToThrow(), catch exceptions in feature extraction
- #329 fuse FeatureAssertionSpec with AssertionSpec => thanks to @tarczynskitomek for the first few adjustments
- #349 configure dependabot to update samples => thanks to @uzilan for the implementation
- #400 check if Js isIntance bug is really fixed in Kotlin => thanks to @Valefant for the time and simplification
- #409 limit representation to 10'000 chars => thanks to @Valefant for the implementation
- #600 make generateLogic more readable with named matches => thanks to @jgrgt for the suggestion and implementation
- #637 update gradle wrapper => thanks to @fejd
- #473 update js samples to use the new org.jetbrains.kotlin.js gradle plugin => thanks to @chadmarchand for most of the work
- #643 add samples for anyAssertions => thanks to @jdornieden
- #644 add samples for arrayAssertions => thanks to @jdornieden
- #646 add samples for collectionAssertions => thanks to @Gosunet
- #647 add samples for comparableAssertions => thanks to @Gosunet
- #649 add samples for floatingPointAssertions => thanks to @BimuratMukhtar
- #652 add samples for iteratorAssertions => thanks to @Gosunet
- #653 add samples for listAssertions => thanks to @BimuratMukhtar
- #656 add samples for pairAssertions => thanks to @BimuratMukhtar
Breaking Changes
Planned (previously deprecated or announced)
- we are no longer using the builders defined in the API for CharSequence/Iterable.contains but the new ones from atrium-logic. This constitutes a binary backward compatibility break. Please re-compile, it is still source compatible.
Unplanned
- we are no longer using the builders defined in atrium-domain-builders for a subject change and feature extraction but the once from atrium-logic. This constitutes a binary backward compatibility break. Please re-compile, it is still source compatible.
Deprecation
- the helper function
asExpect
to turn anAssert<T>
into anExpect<T>
=> time to move on 😉 - most of the module atrium-domain-builders -> use atrium-logic instead, see migration hints further down below. Inter alia:
- SubjectChanger and SubjectChangerBuilder
- FeatureExtractor and FeatureExtractorBuilder
- toVarArg, iterableLikeToIterable
- nullable, nullableContainer, nullableKeyMap etc.
- mapArguments
Breaking Changes with 0.15.0
- might be we have to break compatibility when we deprecate core-robstoll and core-robstoll-lib
- might also be, that we have to break compatibility when we move ExpectBuilder and ExpectOptions from domain-builders to atrium-logic
- we will break binary compatibility when we move Group from atrium-domain-builders to atrium-logic (or to the individual APIs)
- we will break binary compatibility when we move VarArgHelper from atrium-domain-builders to atrium-logic
Breaking Changes with 1.0.0
See atrium-roadmap -> Milestone 1.0.0
Migrating deprecated functionality
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 forimport ch.tutteli.atrium.domain.builders.utils.mapArguments
and replace it withimport ch.tutteli.atrium.logic.utils.mapArguments
nullable
, then search forimport ch.tutteli.atrium.domain.builders.utils.nullable
and replace withimport ch.tutteli.atrium.logic.utils.nullable
subExpect
, then search forsubExpect
and replace withexpectLambda
and search forimport ch.tutteli.atrium.domain.builders.utils.subExpect
and replace withimport ch.tutteli.atrium.logic.utils.expectLambda
Some further search&replace patterns for assertion writers, in case you use:
CharSequenceOrNumberOrChar
orCharSequenceOrNumberOrChar
, search forimport ch.tutteli.atrium.domain.creating.typeutils
and replace withimport 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 withcollectAndAppend
- we removed
genericSubjectBasedFeature
andgenericFeature
from FeatureAssertions -> use either manualFeature or FeatureExtractor/FeatureExtractorBuilder instead
Please have a look at the older release-notes in case you don't migrate from 0.12.0 or 0.13.0
Sponsors
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:
- sponsoring robstoll (Author and main contributor)
- share your assertion functions with others
- report bugs
- provide feedback in case you miss a feature