Changelog History
Page 2
-
v0.9.0-alpha2 Changes
January 11, 2020This is a pre-release for early adopters using currently
cc.en_GB
and want to switch tofluent.en_GB
which makes use ofExpect
instead ofAssert
Following the setup instructions:
dependencies { testImplementation "ch.tutteli.atrium:atrium-fluent-en_GB:0.9.0-alpha2" }
๐ Proper release notes will follow with the final release of
0.9.0
.
Already many thanks to all the contributorsFollowing already the migration guide.
๐ Migrating deprecated functionality
๐ In case you migrate from a version < 0.7.0 then please have a look at the migration guide given in the Release Notes of 0.7.0.
Otherwise you can use the suggested replacements (ALT + Enter -> Replace with ...) or the search/replace patterns shown below.Notice, that you don't have to migrate everything at once where
asExpect
andasAssert
allow to switch between the oldAssert
and the newExpect
world.
Ping us in the Atrium slack channel if you need help.The following command is carrying out the points 1 to 10 described below (don't forget the points 11, 12, ...), run it from the root of your project, no guarantees that your system is capable of carrying it out. If not, you can use the manual steps described below.
find ./ -name "*.kt" | xargs perl -0777 -i \ -pe 's/AssertImpl([\n\r\s]*)\.changeSubject\(([^\)\n]+)\)[\n\r\s]*\{[\n\r\s]*subject/ExpectImpl$1.changeSubject\($2\)$1.unreported \{ it/g;' \ -pe 's/AssertImpl([\n\r\s]*)\.changeSubject\(([^\)]+)\)/ExpectImpl$1.changeSubject\($2\).unreported/g;' \ -pe 's/AssertImpl([\n\r\s]*)\.builder([\n\r\s]*)\.createDescriptive\(([^,\n]+,[^\)]+\)[\n\r\s]*\{[\n\r\s]*)plant.subject/AssertImpl([\n\r\s]*)\.builder([\n\r\s]*)\.createDescriptive\(([^,\n]+,[^\)]+\)[\n\r\s]*\{[\n\r\s]*)plant.subject/g;' \ -pe 's/AssertImpl([\n\r\s]*)\.builder([\n\r\s]*)\.descriptive([\n\r\s]*).withTest(\(?[\n\r\s]*)\{([\n\r\s]*)plant.subject/AssertImpl$1.builder$2.descriptive$3.withTest\(plant\)$4\{$5it/g;' \ -pe 's/AssertImpl([\n\r\s]*)\.builder([\n\r\s]*)\.descriptive([\n\r\s]*).withTest(\(?[\n\r\s]*)\{([\n\r\s]*)subject/AssertImpl$1.builder$2.descriptive$3.withTest\(this\)$4\{$5it/g;' \ -pe 's/(?:property|returnValueOf|rueckgabewertVon)\((?:[\n\r\s]*)subject::([^\)]+)\)(\s*\{)/feature(\{ f(it::$1) \})$2/g;' \ -pe 's/(?:property|returnValueOf|rueckgabewertVon)\((?:[\n\r\s]*)subject::([^\)]+)\)/feature \{ f(it::$1) \}/g;' \ -pe 's/(?:property|returnValueOf|rueckgabewertVon)\((?:[\n\r\s]*)subject::([^\)]+)\)(\s*\{)`/feature(\{ f(it::$1) \})$2/g;' \ -pe 's/(?:property|returnValueOf|rueckgabewertVon)\(([A-Z][^:]+)::([^\)]+)\)/feature($1::$2)/g;' \ -pe 's/(?:property|returnValueOf|rueckgabewertVon)\(([^:]+)::([^\)]+)\)/feature("$1.$2", { $1.$2 })/g;' \ -pe 's/(import ch\.tutteli\.atrium\.api\.cc\.(?:\.infix)?(?:en_GB|de_CH))\.(property|returnValueOf)/$1.feature/g;' \ -pe 's/(\.| )((?:toThrow|wirft|isA|istEin)<.*>)\s*\{\s*\}/$1$2()/g;' \ -pe 's/notToBeNull\s*\{\s*\}/notToBe(null)/g;' \ -pe 's/fun <T\s*:\s*Any> ([^\(]+)\(subject:\s*T\)[\n\r\s]*=[\n\r\s]*AssertImpl[\n\r\s]*\.coreFactory[\n\r\s]*\.newReportingPlant\(([^,]+),[\n\r\s]*\{\s*subject\s*\}[\n\r\s]*,[\n\r\s]*reporter\)/fun <T> $1\(subject: T\): Expect<T> = \n ExpectBuilder.forSubject\(subject\)\n .withVerb\($2\)\n .withoutOptions\(\)\n .build\(\)/g;' \ -pe 's/fun <T\s*:\s*Any> ([^\(]+)\(subject:\s*T\s*,[\n\r\s]*assertionCreator: Assert<T>.\(\)\s*->\s*Unit\)[\n\r\s]*=[\n\r\s]*AssertImpl[\n\r\s]*\.coreFactory[\n\r\s]*\.newReportingPlantAndAddAssertionsCreatedBy\(([^,]+),[\n\r\s]*\{\s*subject\s*\}[\n\r\s]*,[\n\r\s]*reporter,[\n\r\s]*assertionCreator\)/fun <T> $1\(subject: T, assertionCreator: Expect<T>.\(\) -> Unit\): Expect<T> = \n $1(subject).addAssertionsCreatedBy(assertionCreator)/g;' \ -pe 's/(?:internal )?fun <T(?:\s*:\s*Any\?)?> ([^\(]+)\(subject:\s*T\)[\n\r\s]*=[\n\r\s]*AssertImpl[\n\r\s]*\.coreFactory[\n\r\s]*\.newReportingPlantNullable\(([^,]+),[\n\r\s]*\{\s*subject\s*\}[\n\r\s]*,[^\)]+\)//g;' \ -pe 's/import ch.tutteli.atrium.verbs\.(expect|assert|assertThat)/import ch.tutteli.atrium.api.verbs.$1/g;' \ -pe 's/AssertImpl/ExpectImpl/g;' \ -pe 's/fun Assert(?:ionPlant(?:Nullable)?)?<(.*)>\./fun <T: $1> Expect<T>\./g;' \ -pe 's/Assert(ionPlant(Nullable)?)?</Expect</g;' \ -pe 's/import ch\.tutteli\.atrium\.creating\.Assert(ionPlant(Nullable)?)?/import ch.tutteli.atrium.creating.Expect/g;' \ -pe 's/import ch.tutteli\.atrium\.api\.cc\.(en_GB|de_CH)/import ch.tutteli.atrium.api.fluent.$1/g;' \ -pe 's/import ch.tutteli\.atrium\.api\.cc\.infix\.en_GB/import ch.tutteli.atrium.api.infix.en_GB/g;'
The following list helps you to migrate faster by using a few regex search replace commands (in Intellij). Make sure you have checked
Regex
as well asMatch Case
in the search options. Notice, that the good will certainly not compile after a single replace, you need to carry out all search&replace commands.
It is not perfect, maybe you need to do a few adjustments in addition, let us now and we improve the search/replace commands here.Switch to ExpectImpl.changeSubject instead of using AssertImpl.changeSubject:
Search:AssertImpl([\n\r\s]*)\.changeSubject\(([^\)\n]+)\)[\n\r\s]*\{[\n\r\s]*subject
Replace:ExpectImpl$1.changeSubject\($2\)$1.unreported { it
Search:
AssertImpl([\n\r\s]*)\.changeSubject\(([^\)]+)\)
Replace:ExpectImpl$1.changeSubject\($2\).unreported
๐ builder.descriptive, safe withTest
๐ Search:
AssertImpl([\n\r\s]*)\.builder([\n\r\s]*)\.createDescriptive\(([^,\n]+,[^\)]+\)[\n\r\s]*\{[\n\r\s]*)plant.subject
๐ Replace:AssertImpl$1.builder$2.createDescriptive\(plant, $3it
๐ Search:
AssertImpl([\n\r\s]*)\.builder([\n\r\s]*)\.descriptive([\n\r\s]*).withTest(\(?[\n\r\s]*)\{([\n\r\s]*)plant.subject
๐ Replace:AssertImpl$1.builder$2.descriptive$3.withTest\(plant\)$4{$5it
๐ Search:
AssertImpl([\n\r\s]*)\.builder([\n\r\s]*)\.descriptive([\n\r\s]*).withTest(\(?[\n\r\s]*)\{([\n\r\s]*)subject
๐ Replace:AssertImpl$1.builder$2.descriptive$3.withTest\(this\)$4{$5it
๐ use new feature mechanism
This one needs extra care as arguments could be function calls. Verify the replacements
Search:
(?:property|returnValueOf|rueckgabewertVon)\((?:[\n\r\s]*)subject::([^\)]+)\)(\s*\{)
Replace:feature(\{ f(it::$1) \})$2
Search:
(?:property|returnValueOf|rueckgabewertVon)\((?:[\n\r\s]*)subject::([^\)]+)\)
Replace:feature \{ f(it::$1) \}
Search:
(?:property|returnValueOf|rueckgabewertVon)\(([A-Z][^:]+)::([^\)]+)\)
Replace:feature($1::$2)
Search:
(?:property|returnValueOf|rueckgabewertVon)\(([^:]+)::([^\)]+)\)
Replace:feature("$1.$2", { $1.$2 })
Search:
(import ch\.tutteli\.atrium\.api\.cc\.(?:\.infix)?(?:en_GB|de_CH))\.(property|returnValueOf)
Replace:$1.feature
toThrow and isA with empty assertionCreator lambda
Search:(\.| )((?:toThrow|wirft|isA|istEin)<.*>)\s*\{\s*\}
Replace$1$2()
notToBeNull with empty assertionCreator lambda
Search:notToBeNull\s*\{\s*\}
Replace:notToBe(null)
migrate custom assertion verbs:
Search:
fun <T\s*:\s*Any> ([^\(]+)\(subject:\s*T\)[\n\r\s]*=[\n\r\s]*AssertImpl[\n\r\s]*\.coreFactory[\n\r\s]*\.newReportingPlant\(([^,]+),[\n\r\s]*\{\s*subject\s*\}[\n\r\s]*,[\n\r\s]*reporter\)
Replace:
๐fun <T> $1\(subject: T\): Expect<T> = \n ExpectBuilder.forSubject\(subject\)\n .withVerb\($2\)\n .withoutOptions\(\)\n .build\(\)
Search:
fun <T\s*:\s*Any> ([^\(]+)\(subject:\s*T\s*,[\n\r\s]*assertionCreator: Assert<T>.\(\)\s*->\s*Unit\)[\n\r\s]*=[\n\r\s]*AssertImpl[\n\r\s]*\.coreFactory[\n\r\s]*\.newReportingPlantAndAddAssertionsCreatedBy\(([^,]+),[\n\r\s]*\{\s*subject\s*\}[\n\r\s]*,[\n\r\s]*reporter,[\n\r\s]*assertionCreator\)
Replace:
fun <T> $1\(subject: T, assertionCreator: Expect<T>.\(\) -> Unit\): Expect<T> = \n $1(subject).addAssertionsCreatedBy(assertionCreator)
Search:
(?:internal )?fun <T(?:\s*:\s*Any\?)?> ([^\(]+)\(subject:\s*T\)[\n\r\s]*=[\n\r\s]*AssertImpl[\n\r\s]*\.coreFactory[\n\r\s]*\.newReportingPlantNullable\(([^,]+),[\n\r\s]*\{\s*subject\s*\}[\n\r\s]*,[^\)]+\)
Replace:(empty string)
In case the above search&replace did not find anything (because your code is different):
๐จ Switch fromAssertImpl.coreFactory.newReportingPlant
toExpectBuilder
๐ => see atriumVerbs.kt for an example of how own assertion verbs are defined now; or use the suggested replacements but please addimport ch.tutteli.atrium.domain.builders.reporting.ExpectBuilder
first as it will not work correctly otherwise due to an Intellij bug
=> Note that you don't need a verb for nullable types any more. Thus:- remove the upper bound
T: Any
- remove the verb which uses `newReportingPlantNullable
- remove the verb which expected
act: () -> Unit
Switch to new built-in assertion verbs which use Expect
Search: import ch.tutteli.atrium.verbs.(expect|assert|assertThat)
Replace: import ch.tutteli.atrium.api.verbs.$1Switch from AssertImpl to ExpectImpl
Search:
AssertImpl
Replace:ExpectImpl
Switch all your assertion functions to use Expect and no longer Assert:
Search:
import ch\.tutteli\.atrium\.creating\.Assert(ionPlant(Nullable)?)?
Replace:import ch.tutteli.atrium.creating.Expect
Search:
fun Assert(?:ionPlant(?:Nullable)?)?<(.*)>\.
Replace:fun <T: $1> Expect<T>\.
Search:
Assert(ionPlant(Nullable)?)?<
Replace:Expect<
Switch the API
Search:
import ch.tutteli\.atrium\.api\.cc\.(en_GB|de_CH)
Replace:import ch.tutteli.atrium.api.fluent.$1
Search:
import ch.tutteli\.atrium\.api\.cc\.infix\.en_GB
Replace:import ch.tutteli.atrium.api.infix.en_GB
In case you have custom assertion verbs
Dealing with thrown exceptions is now handled by Expect as well.
๐ป However, in case you have named the assertion verb differently for expecting an Exception then you have to decide:- ๐ use the same name => rename the corresponding function which expects
act: () -> Unit
to the same name and remove it afterwards - ๐ use a different name => delegate the function which expects
act: () -> Unit
to the other verb
๐ Check if you need to add
import ch.tutteli.atrium.domain.builders.reporting.ExpectBuilder
Try to reduce duplicate Expect imports
Repeat until you don't have duplicate imports anymore
Search:import ch\.tutteli\.atrium\.creating\.Expect\n\s*import ch\.tutteli\.atrium\.creating\.Expect
Replace:import ch.tutteli.atrium.creating.Expect
โ Try to compile your project and watch out for the following warnings:
'MyClass' is a final type, and thus a value of the type parameter is predetermined
=> you can suppress this warning by adding@file:Suppress("FINAL_UPPER_BOUND")
to your file, this is actually a Kotlin bug (https://youtrack.jetbrains.com/issue/KT-34257)
- remove the upper bound
-
v0.9.0-alpha Changes
August 29, 2019This is a pre-release for early adopters using currently
cc.en_GB
and want to switch tofluent.en_GB
which makes use ofExpect
instead ofAssert
Following the setup instructions:
dependencies { testImplementation "ch.tutteli.atrium:atrium-fluent-en_GB:0.9.0-alpha" }
๐ Proper release notes will follow with the final release of
0.9.0
, following already the migration guide๐ Migrating deprecated functionality
๐ In case you migrate from a version < 0.7.0 then please have a look at the migration guide given in the Release Notes of 0.7.0.
Otherwise you can use the suggested replacements (ALT + Enter -> Replace with ...) or the search/replace patterns shown below.๐ Notice, that you don't have to migrate everything at once where
asExpect
andasAssert
allow to switch between the oldAssert
and the newExpect
world.
Ping us in the Atrium slack channel if you need help.Following a few hints how you can migrate faster by using a few regex search replace commands (make sure you have checked
Regex
in the search) -- it might be the search replace is not enough for your use case and require a few adjustements from your part) :Switch all your assertion functions to use Expect and no longer Assert:
Search: import ch.tutteli.atrium.creating.Assert(ionPlant(Nullable)?)?
Replace: import ch.tutteli.atrium.creating.ExpectRepeat until you don't have duplicate imports anymore
Search: import ch.tutteli.atrium.creating.Expect\n\s*ch.tutteli.atrium.creating.Expect
Replace: import ch.tutteli.atrium.creating.ExpectSearch: Assert(ionPlant(Nullable)?)?<
Replace: Expect<Switch to ExpectImpl.changeSubject instead of using AssertImpl.changeSubject:
Search: AssertImpl([\n\r\s]).changeSubject(([)\n]+))[\n\r\s]{[\n\r\s]*subject
Replace: ExpectImpl$1.changeSubject$1.unreported($2) { itSearch: AssertImpl([\n\r\s]*).changeSubject(([)]+))
Replace: ExpectImpl$1changeSubject.unreported($1)๐ builder.descriptive, safe withTest
๐ Search: AssertImpl([\n\r\s]).builder([\n\r\s]).createDescriptive(([,\n]+,[)]+)[\n\r\s]{[\n\r\s])plant.subject
๐ Replace: AssertImpl$1.builder$2.createDescriptive(plant, $3it๐ Search: AssertImpl([\n\r\s]).builder([\n\r\s]).descriptive([\n\r\s]).withTest((?[\n\r\s]){([\n\r\s]*)plant.subject
๐ Replace: AssertImpl$1.builder$2.descriptive$3.withTest(plant)$4{$5it๐ Search: AssertImpl([\n\r\s]).builder([\n\r\s]).descriptive([\n\r\s]).withTest((?[\n\r\s]){([\n\r\s]*)subject
๐ Replace: AssertImpl$1.builder$2.descriptive$3.withTest(this)$4{$5it๐ use new feature mechanism
This one needs extra care as arguments could be function calls. Verify the replacements
Search: (?:property|returnValueOf|rueckgabewertVon)(subject::([)]+)).
Replace: feature { f(it::$1) }.Search: (?:property|returnValueOf|rueckgabewertVon)(subject::([)]+))(\s*{)
Replace: feature({ f(it::$1) })$2$Search: (?:property|returnValueOf|rueckgabewertVon)(([:]+)::([)]+))
Replace: feature($1::$2)toThrow with empty assertionCreator lambda
Search: .((?:toThrow|wirft|isA|istEin)<[>]+>)\s*{\s*}
Replace .$1()migrate custom assertion verbs
๐จ Switch fromAssertImpl.coreFactory.newReportingPlant
toExpectImpl.assertionVerbBuilder
๐ see atriumVerbs.kt for an example -
v0.8.0 Changes
April 28, 2019Jar's can be found here: https://bintray.com/robstoll/tutteli-jars/atrium/0.8.0
API Maturity : Stable
Implementation Maturity : Almost Stable๐ There won't be any breaking changes in the API (assertion functions/builders) until v1.0.0 besides parameter name renaming. But we want to progress as well and deprecate functionality in each version (e.g quite a lot with 0.7.0; please replace deprecated functionality until v1.0.0 where we will remove it.
โ However, we do not provide yet a stable API for the domain and core modules of Atrium -- it is almost stable, but there might be slight breaking changes which we want to introduce before v1.0.0. That is also the reason why we do not have yet established backward compatibility tests for domain/core. This might affect you if you write your own assertion functions. And it also affects you if you provide your own implementation for parts of Atrium.Table of Content
- ๐ New Features
- API
- Domain/Core aka write own assertion functions
- Others
- ๐ Fixes
- Improvments
- ๐ฅ Breaking Changes
- ๐ Deprecation
- ๐ Migrating deprecated functionality
๐ New Features
API
- #27 containsExactly as replacement for containsStrictly, thanks to @msmoljan for the implementation and thanks to @christophsturm for the idea
- #33 isNotBlank for CharSequence, thanks to @pt2121 for the implementation
- #39 make atLeast optional for CharSequence.contains, thanks to @christophsturm for the idea
- #51 keys and values for Map to postulate assertions about the keys or values of a Map
- #37 asEntries for Map, thanks to @arjank for the implementation
- #29/#75 getExisting for Map to postulate assertions about the value of a corresponding key
- #28 containskey, #59 containsNotKey for Map, thanks to @uaArsen for the implementation
- #61/#62 contains for Map
- #30/#76 get for List
- #53 notToThrow as counterpart of toThrow - thanks to @charleskorn for the idea
- #65 shortcut property/fun for Pair.first and Pair.second
- #25 isKeyValue as well as shortcut property/fun key/value for Map.Entry
- #69 toBe was opened up for nullable subjects (accepts now
Any?
), thanks to @dave08 for the discussion - #70 toBeNullIfNullElse for nullable subjects, thanks to @dave08 for the idea
- #71 shortcut property/fun Collection.size
- #78 containsExactly with single assertion creator
- #48 asIterable with assertionCreator block
- #46
o
as alternative tothis
in sub-assertions for the infix API
Domain / Core
๐ Features for assertion-function-writers:
- #67 AssertImpl.mapArguments -> to map a variable length argument lists of the form
first: T, vararg rest: T
(inside a functionT, Array<out T>
) toR, Array<out R>
- #72 changeSubject to a nullable type
- AssertImpl.feature.extractor -> in case you want to make an assertion about a feature which is not always safe to extract (e.g. List.get expects a suitable index)
- โจ AssertImpl.collector.collectOrExplain => collects assertions for later usage but only if it is safe to collect them, otherwise it wraps them into an explanatory assertion so that it can be used to enhance reporting
- AssertImpl.collector.collectNullable which allows to collect assertions for a nullable subject (for AssertionPlantNullable instead of AssertionPlant)
Others
- turned Atrium into an multi-platform project; all dependencies are also available for:
- ๐ #41 deprecated notToBeNullBut for BigDecimal
- ๐ #55 infix API - deprecated calls to
toBe
if a keyword is passed inadvertently - โ stacktraces in error reporting should no longer contain stack frames of Atrium or test runners
๐ Fixes
- none this time
๐ Improvements
- DetailedObjectFormatter shows now Kotlin types instead of Java types (e.g.
kotlin.Int
instead ofjava.lang.Integer
). - an AtriumError is now thrown instead of an AssertionError (AtriumError is a subtype of AssertionError)
๐ฅ Breaking Changes
Planned (previously deprecated or announced)
- none this time
Unplaned
- Made
Group
,GroupWithoutNullableEntries
andGroupWithNullableEntries
invariant. I doubt this will be a problem for someone, otherwise let me know - Made
Value
,Values
,Entry
,Entries
invariant; in case you get problems, try to use user-site variance and specifyout
there
The following breaking changes only bother you if you implemented an own core. Most have been necessary to turn Atrium into a multi-platform project: - core uses now an own implementation of
Locale
and no longer java.util.Locale - core uses now
KClass
instead ofClass
- TranslatableWithArgs takes a List instead of an Array as parameter
- Reporter needs to provide an AtriumErrorAdjuster in addition
- โ removed duplicate anyAssertions in package ch.tutteli.atrium.domain.creating.any.typetransformation.creators (use the one from package ch.tutteli.atrium.domain.creating)
tl;dr the following is only of interest if you rely on binary compatibility
I changed the JvmName ofcontains?
incc-en_UK
andcc-infix-en_UK
tocontainsDeprecated
andenthaelt?
incc-de_CH
toenthaeltDeprecated
due to the DEX compiler for android which cannot handle?
in identifiers. This is a binary backward compatibility break for a method which I introduced in 0.7.0 to retain source backward compatibility. In case you use still use cc-en_UK or cc-infix-en_UK and rely on binary compatibility you will have to recompile when updating to 0.8.0.๐ Deprecation
๐ The following was deprecated and will be removed with 1.0.0:
Assert<Iterable>.containsStrictly
usecontainsExactly
instead.- ๐ ReporterBuilder::withoutTranslations using java.util.Locale => use Atrium's Locale
- 0๏ธโฃ TranslatorOption::withDefaultTranslator using java.util.Locale => use Atrium's Locale
- 0๏ธโฃ TextAssertionFormatterOption::withDefaultTextCapabilities => use withTextCapabilities which uses KClass instead of Class
- ๐ง AtriumErrorAdjusterOption::withOnlyFailureReporter and withCustomReporter => new step in configuration, use either withDefaultAtriumErrorAdjusters or choose one of the other options
- ๐ all functions containing
nullable
in their name => their counterpart withoutnullable
in their name where opened up to accept also nullable types (see #60 for details)
Possible Breaking Changes with 0.9.0
- I will prepare the transition to
Assert<T>
instead ofAssert<out T>
. I will turnAssert
into an own type (currently only a type alias) - you should not notice something but it means that the binary code will change when you compile against 0.9.0 - โ I might reuse opentest4j exceptions to improve error reporting in IDEs. For this to work I might have to make modifications to Assertion/AssertionGroup (would only affect core implementors).
- ๐ป An exception will be thrown where one has to define an assertionCreator -- shall prevent kind of dead code/incomplete assertions; for instance
assert(mapOf("a" to 1)).keys {}
- same for
addAssertionsCreatedBy
/and {}
; they will throw an exception if no sub-assertion is defined
- same for
- toBe, contains etc. which expect
T
where<T: Any>
might be restricted to input types, so that comparing apple with oranges is no longer possible without explicitly stating the type. E.g.assert(1).toBe("hello")
would be a compile error
Possible Breaking Changes with 1.0.0
Please open an issue if you are not happy with one of the changes and state why or contact me via the Atrium slack channel.
Assert<Throwable>.message{}
will returnAssert<Throwable>
instead ofUnit
Assert<T>.isA{}
will returnAssert<T>
instead ofUnit
All property and returnValueOf taking an assertionCreator will return the same type as the current subject.
๐ I will remove
out
ofAssert<out T>
in order that things likeasssert(1).toBe("hello")
is no longer possible, overloads can be simplified etc.returnValueOf functions might be renamed to returnValueOfX where X denotes the number of arguments. Too often it occurs that Kotlin is not able to infer the correct overload, the user does not get the appropriate help in code completion or the error message is too big. This should help.
๐ feature assertion functions might require a lambda in the future. This way error reporting does not blow up in the middle of the way because
subject
is not available. However, there is a bug concerning nullable-features in Kotlin which prevents me from doing it at the moment: https://youtrack.jetbrains.com/issue/KT-23768, please up-vote it.A type parameter might be added to
AssertionGroup
to restrict theAssertionGroupType
.๐ฆ
BulletPointIdentifier
together with subtypes (AssertionGroupType
s) might be moved to another package:ch.tutteli.atrium.reporting.assertions
๐ AssertionPlant/Assert will switch roles => AssertionPlant will be the typealias of Assert, see #26; should only break binary compatibility
๐ I will introduce interface groups for RepoterBuilder as I did in other cases (e.g. see Descriptive); should only break binary compatibility
๐ Migrating deprecated functionality
๐ In case you migrate from a version < 0.7.0 then please have a look at the migration guide given in the Release Notes of 0.7.0.
Otherwise you can use the suggested replacements (ALT + Enter -> Replace with ...)Ping me in the Atrium slack channel if you need help.
- ๐ New Features
-
v0.8.0-RC1
April 13, 2019 -
v0.8.0-beta
April 13, 2019 -
v0.8.0-alpha
January 19, 2019 -
v0.7.0 Changes
November 29, 2018๐ See https://github.com/robstoll/atrium/releases/tag/v0.7.0 for full information. This is a patch-fix-version for Android because the DEX compiler cannot handle
?
in identifiers and treats module-info.class as normal classes instead of ignoring it.๐
v0.8.0
of Atrium will support JS as additional platform and will most probably provide a specific artifact for Android as well. Simplified this means, we won't ship anatrium.jar
with0.8.0-android
as version butatrium-android.jar
with version0.8.0
. -
v0.7.0-RC2
January 19, 2019 -
v0.7.0-RC1
January 19, 2019 -
v0.7.0-android Changes
November 29, 2018๐ See https://github.com/robstoll/atrium/releases/tag/v0.7.0 for full information. This is a patch-fix-version for Android because the DEX compiler cannot handle
?
in identifiers and treats module-info.class as normal classes instead of ignoring it.๐
v0.8.0
of Atrium will support JS as additional platform and will most probably provide a specific artifact for Android as well. Simplified this means, we won't ship anatrium.jar
with0.8.0-android
as version butatrium-android.jar
with version0.8.0
.