Platform (jvm, js, android): jvm
Extension (none, kotlin 1.3, jdk8): none
We want to migrate the api-cc-infix-en_GB... modules which are based on Assert to Expect. We have already created the corresponding
modules api-infix-en_GB.... Also there are already fluent-en_GB... modules where we have already done the transition from Assert to Expect
Following the things you need to do:
listAssertions.kt from atrium-api-fluent-en_GB-common to atrium-api-infix-en_GB-commonListFeatureAssertionsSpec.kt from atrium-api-fluent-en_GB-common to atrium-api-infix-en_GB-commonKFunction<...> -- use fun1<..>(...).name)I'll work on this if you would like to take this issue over.I'll work on this
I'll work on this
Question:
What to do with
infix fun <E : Any, T: List<E>> Expect<T>.get(index: Index): ListGetOption<E, T>
= ListGetOption.create(this, index.index)
Do I need also to copy ListGetOption class and provide a fluent builder to finish the assertion? Seems like I can remove this during migration, but not sure.
The same about Index data class. It just holds integer index, does it make sense to keep it?
First of all, I am open for new ideas. Currently the infix API for List looks as follows:
https://github.com/robstoll/atrium/blob/master/apis/differences.md#list-get
Unless you have a different idea how we can provide an infix api without Index and ListGetOption (please name it ListGetStep though, we want to move away from using Option in naming) you have to migrate it (copy&paste basically)
OMG, sorry.
I looked at different file :(
I looked in package atrium-api-cc-infix-en_GB-common instead of atrium-api-fluent-en_GB-common and did totally wrong thing for an hour now.
Reverting back my stuff and going to do it from the scratch.
You're not wrong at all. In the end it is a migration from atrium-api-cc-infix-en_GB-common to atrium-api-infix-en_GB-common and ListGetOption is something you will not find in atrium-api-fluent-en_GB-common