Jar's can be found here: https://bintray.com/robstoll/tutteli-jars/atrium/0.6.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 as well if you write your own assertion functions. It also affects you if you provide your own implementation of the core of Atrium.
New Features:
isNumericallyEqualTo
andisNotNumericallyEqualTo
forBigDecimal
isEqualIncludingScale
andisNotEqualIncludingScale
forBigDecimal
=> gives a hint in case of a failure where the assertion would have hold withisNumericallyEqualTo
/isNotNumericallyEqualTo
- overload of
toBe
forBigDecimal
which is deprecated, throws anUnsupportedOperationException
and points the user to the above functions - same same but different for the overload of
notToBe
forBigDecimal
toBeWithErrorTolerance
for floating point numbers (Float
,Double
,BigDecimal
)isLessThan
,isLessThanOrEquals
etc. is now available forComparable<T>
and no longer only forNumber
containsRegex(...)
as shortcut forcontains.atLeast(1).regex(...)
- integrated
contains not
into the sophisticatedcontains
assertion builder (forCharSequence
andIterable
)
=> so that you see how many times it was contained when the assertion fails - identification lambdas for
Iterable
with nullable types. For instance,listOf(null, 1).contains { toBe(1) }
was not possible so far (onlyList<Int>
was supported)- see API differences.md for examples.
- made
AssertionPairFormatter
configurable, one can now chose for instance a multi-line formatter instead of same-line (see README#your-first-assertion for an example) - workaround for a Bug in Kotlin (please upvote it) which causes that
returnValueOf
cannot be used for methods with overloads. - I generalised the
DownCaster
to aTypeTransformer
which you can reuse by using the impl-function_typeTransformation
. You find an example forEither
in TypeTransformerSpec. - I added a few issues with label help wanted so that you get an easy start to contribute to Atrium.
Breaking Changes:
- removed deprecated
ReporterBuilder::withDetailedObjectFormatter
Deprecation:
ReporterBuilder::withSameLineTextAssertionFormatter
-> use the suggested replacement
Not included in this release yet
- sophisticated assertion builder for
toBe
with error tolerance for floating point numbers - failure hint for
toBe
in conjuction with Float or Double - simplify the creation of failure hints, make it reusable for users