@robstoll robstoll released this Jul 20, 2018 · 819 commits to master since this release

Jar's can be found here: https://bintray.com/robstoll/tutteli-jars/atrium/0.5.0
API Maturity: Almost Stable
Implementation Maturity: Development

I provide more or less a stable API for users of Atrium. Only the ReporterBuilder, which you use to build your own assertion verb might slightly change its API (so migrating will be just a few lines in one file).
There are most likely not any breaking changes in the API of the assertion functions/builders.
However, I do not provide yet a stable API for the core of Atrium -- this might affect you if you write your own assertion functions. It also affects you if you provide your own implementation of the core of Atrium.

New Features:

  • added an infix API including a corresponding bundle module:
    atrium-cc-infix-en_UK-robstoll
  • one can use Assert<T> as entry point for assertion functions instead of AssertionPlant<T>.
  • containsDefaultTranslationOf is now also available in the sophisticated assertion builder for contains assertions for CharSequence

Breaking Changes:

  • it as alias for subject was removed, due to legitimate confusion (see #7). In case you already use it, then
    you can re-add it yourself, paste the following into your assertionVerb.kt: val <T : Any> IAssertionPlant<T>.it get() : T = subject
    However, I recommend you rename it to x or something similar to avoid the confusion that it is actually not an implicit lambda parameter.

  • The assertion function contains for CharSequence checks now that only CharSequence, Number and Char are passed (at runtime).
    I consider it as too risky (prone to bugs) if one can pass Anything -- well compile time still requires only Any; that's because Kotlin does not (yet) support union types.
    IMO it is not possible to define more restrictive types (e.g. with multiple overloads) which does not hinder usability and maintanability. That's the reason why it still expects Any.
    If someone misses the functionality that one can pass in any object, then please open a feature request.

  • atrium-api-code-completion-en_UK was renamed to atrium-api-cc-en_UK, same for atrium-api-code-completion-de_CH. In case you have not used the bunde module atrium-cc-en_UK-robstoll but the API directly, then you need to modify your build.gradle

  • Interfaces are no longer prefixed with I with the exception of IAtriumFactory

  • Simplified the implementation for LocaleOrderDecider -> special cases Norwegian and Chinese.

    • no_NO_NY, no_NO etc. are no longer supported (not the recommended way anyway) -> use nb_... or nn_... instead
    • Locale zh_Hant without specifying the country is no longer supported (not the recommended way anyway)
    • fixed problems loading properties files for Locale with script (e.g. zh_Hant_TW)
    • made ResourceBundleBasedTranslator internal1 -- if you are using ReporterBuilder.withoutTranslation() or ReporterBuilder.withDefaultTranslator(...) respectively, then you don't have to do anything. In case you used ResourceBundleBasedTranslator, then use the mentioned methods instead.

1 ResourceBundleBasedTranslator is just a reference implementation to assure that TranslationSupplierBasedTranslator is compatibel with ResourceBundle. Since it was compatible so far, one could have used ResourceBundleBasedTranslator instead of TranslationSupplierBasedTranslator as well. However, because I detected that there are bugs in the implementation of ResourceBundle in JDK8 I decided that ResourceBundleBasedTranslator should no longe be visible to users (bugs are only concerning the special cases Norwegian and Chinese but maybe there are more).

Deprecation:

  • ReporterBuilder::withDetailedObjectFormatter will be removed in 0.6.0

Not included in this release yet

  • overload for Iterable<T> contains assertions which support identification lambdas for nullable types.
Assets 2