Skip to content

expectGrouped and drop Kotlin 1.2 support

Compare
Choose a tag to compare
@robstoll robstoll released this 31 Oct 22:34
· 181 commits to main since this release
v1.1.0
521bfec

Table of Content

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

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 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)
  • 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 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.
  • 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 Genossenschaft (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