Skip to content

v1.2.0 toHoldThirdPartyExpectation, extractSubject

Latest
Compare
Choose a tag to compare
@robstoll robstoll released this 26 Mar 08:25
· 167 commits to main since this release
v1.2.0
c8ab1a7

Table of Content

Full Changelog: v1.1.0...v1.2.0

New Features

All APIs

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 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.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 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