Skip to content

Path.isSymbolicLink/isEmptyDirecty, `its` and logic/core refactorings

Compare
Choose a tag to compare
@robstoll robstoll released this 30 Mar 12:14
v0.16.0
5a9b74b

Table of Content

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 now has 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