Skip to content

Releases: robstoll/atrium

Infix API

20 Jul 09:28
Compare
Choose a tag to compare

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.

Multiple APIs

20 Jul 09:28
Compare
Choose a tag to compare

Jar's can be found here: https://bintray.com/robstoll/tutteli-jars/atrium/0.4.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 only to build your own assertion verb might slightly change its API (so migrating will be just a few lines in one file). There won't be any 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 as well as when you provide your own implementation of the core of Atrium.

Included in this release:

Functions to create single assertions and assertion groups.

assertion functions and builders

Components

  • Translator including a PropertiesBasedTranslationSupplier
  • OnlyFailureReporting
  • TextSameLineAssertionFormatter
  • DetailedObjectFormatter
  • ArgumentFormatter

Improvements compared to 0.3.0

  • splitting of API and implementation; which enables to define multiple APIs
  • feature assertion builders for collection/iterable
  • introduction of explanatory assertion groups
  • fixes for IAssertionPlantCheckingLazily -> simplified, introduce ReportingPlant as a replacement
  • improved README, better explained examples

Not included in this release yet

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

i18n for atrium

20 Jul 09:28
Compare
Choose a tag to compare

Jar's can be found here: https://bintray.com/robstoll/tutteli-jars/atrium/0.3.0
API Maturity: Almost Stable
Implementation Maturity: Development
(I provide a more or less a stable API for users of Atrium but not yet for implementers of atrium)

Included in this release:

assertion functions

Components

  • Translator including a PropertiesBasedTranslationSupplier
  • OnlyFailureReporting
  • SameLineAssertionFormatter
  • DetailedObjectFormatter
  • ArgumentFormatter

Improvements compared to 0.2.0

  • i18n support for assertions and assertion verbs
  • feature assertion for methods (0.2.0 had only feature assertions for properties)
  • a few more assertion functions
  • improved formatting in DetailObjectFormatter (boolean, enums, and KClass are treated specially)
  • further improved Code-Documentation incl. a better readable layout (see KDoc)

Not included in this release yet

  • basic assertion functions for collections (containsOnly, contains, containsNot, containsInOrder etc.)

Atrium's first Dev Release

20 Jul 09:28
Compare
Choose a tag to compare
Pre-release

Jar's can be found here: https://bintray.com/robstoll/tutteli-jars/atrium/0.2.0
Maturity: Development

Included in this release:

  • lazily and immediately evaluated assertions
  • assertion for nullable types
  • assertions about thrown exceptions
  • feature assertions for properties (functions should follow with Kotlin 1.1.2 assuming they fixed the reported bug)
  • generich check for properties (functions should follow with Kotlin 1.1.2 assuming they fixed the reported bug)
  • OnlyFailureReporting
  • SameLineAssertionFormatter
  • DetailedObjectFormatter
  • and a minimal set of assertion functions

Improvements compared to 0.1.0

  • cleaner code design (separation of creation, checking and reporting)
  • improved Code-Documentation (KDoc available on gh-pages)
  • Proper README
  • Separation of API and implementation (atrium-impl-robstoll could be exchanged by another implementation)
  • Spec for atrium in form of tests which can be reused by other implementation

Not included in this release yet:

  • basic assertion functions for collections (containsOnly, contains, containsNot, containsInOrder etc.)
  • support for multi-language assertions

Minimal Version

20 Jul 09:28
Compare
Choose a tag to compare
Minimal Version Pre-release
Pre-release

A minimal version of assertK including:

  • assertion verb "assert"
  • lazy and immediate assertions
  • assertion for nullable types
  • feature assertions for properties (functions will follow)
  • except{} for Throwable
  • OnlyFailureReporting
  • SameLineAssertionMessageFormatter
  • and a minimal set of assertion functions

Not included in this release yet:

  • a not operator
  • assertion functions for collections
  • assertion functions in form of operators