-
-
Notifications
You must be signed in to change notification settings - Fork 212
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
first class support for Array and Sequence in api-fluent #459
Comments
I am currently refactoring IterableAssertions to IterableLikeAssertions, which means they can be used by Sequence or Array types on the logic level. Then there is only one step left to provide an API for Array etc. as well. |
Since 0.13.0, you can now pass Sequence and Array types to places where we expected |
@robstoll is this still relevant? |
@jakubriegel it still is in the sense of that one has to write the following
or
instead of
As we can see from the votes, this is not really something people are bothered with that much because there is a good workaround I guess (if you disagree, then please up-vote this issue with a 👍 reaction on the description). |
Platform (jvm, js, android):
Extension (none, kotlin 1.3, jdk8): none
Code related feature
Currently one has to convert an Array or a Sequence to List or Iterable in order to be able to use the corresponding assertion functions such as
contains
. For instanceWe would like to be able to provide the same functionality (well almost the same, more details below) we provide for List to Array (all array types, see arrayAssertions.kt) and the same functionality we provide for Iterable for Sequence.
In detail, for Array:
In detail, for Sequence:
I don't want to limit what approach is taken but it should be generative and please write down your idea here first so that we can discuss it before you start implementing things for nothing.
Note that your approach should be easily adoptable to the api-infix
Please react with 👍 if you would like to see Array and/or Sequence to be first-class citizens in Atrium, the more upvotes the more likely I will implement it myself -- feel free to sponsor me, that would be a motivation too.
You are of course welcome to work on this issue. Write
I'll work on it
as comment so that we can assign the task to you.The text was updated successfully, but these errors were encountered: