Skip to content
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

add Iterable.asList #462

Closed
8 tasks
robstoll opened this issue Apr 21, 2020 · 5 comments · Fixed by #561
Closed
8 tasks

add Iterable.asList #462

robstoll opened this issue Apr 21, 2020 · 5 comments · Fixed by #561
Assignees
Milestone

Comments

@robstoll
Copy link
Owner

robstoll commented Apr 21, 2020

Platform (jvm, js, android): all
Extension (none, kotlin 1.3, jdk8): none

Code related feature

expect(iterable).asList().get(20).toBe(2)

Following the things you need to do:

api-fluent

  • provide a fun asList which returns Expect<List<T>> (see asIterable as a guideline)
  • provide a fun asList which expects an assertionCreator-lambda and returns Expect<T> (see asIterable as a guideline)
  • add @since 0.14.0 (adapt to next release version) to KDOC
  • remodel ch.tutteli.atrium.api.fluent.en_GB.ListFeatureAssertionsSpec, extend Spek which includes ListSpec which you create as inner object (see ch.tutteli.atrium.api.fluent.en_GB.IterableAnyAssertionsSpec as a guideline)
    - [ ] add a IterableSpec where you convert the given list to a iterable and then use asList -> see ch.tutteli.atrium.api.fluent.en_GB.IterableAnyAssertionsSpec.IterableSpec)

api-infix

  • provide a fun asList which returns Expect<List<T>> (see asIterable as a guideline)
  • provide a fun asList which expects an assertionCreator-lambda and returns Expect<T> (see asIterable as a guideline)
  • add @since 0.14.0 (adapt to next release version) to KDOC
  • remodel ch.tutteli.atrium.api.infix.en_GB.ListFeatureAssertionsSpec, extend Spek which includes ListSpec which you create as inner object (see ch.tutteli.atrium.api.infix.en_GB.IterableAnyAssertionsSpec as a guideline)
    - [ ] add a IterableSpec where you convert the given list to a iterable and then use asList -> see ch.tutteli.atrium.api.infix.en_GB.IterableAnyAssertionsSpec.IterableSpec)

Your first contribution?

  • Write a comment I'll work on this if you would like to take this issue over.
    This way we get the chance to revise the description in case things have changed in the meantime, we might give you additional hints and we can assign the task to you, so that others do not start as well.
  • See Your first code contribution for guidelines.
  • Do not hesitate to ask questions here or to contact us via Atrium's slack channel if you need help
    (Invite yourself in case you do not have an account yet).
@robstoll robstoll added good first issue Good for newcomers help wanted and removed good first issue Good for newcomers help wanted labels Jul 11, 2020
@gugatkesheladze
Copy link

i'll work on it

@gugatkesheladze
Copy link

which class should i change?

@robstoll
Copy link
Owner Author

@Gugatke I am not sure what you mean, all necessary changes are described in the issue description. Can you please state your question more precisely

@Valefant
Copy link
Collaborator

I'll work on this, if it's ok.

@robstoll
Copy link
Owner Author

Sure, go ahead 👍

robstoll added a commit that referenced this issue Aug 31, 2020
* Provide a method for narrowing down the type of an iterable to list
@robstoll robstoll modified the milestones: 1.0.0, 0.14.0 Aug 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants