Atrium: elementsOf(Iterable) for contains.inAnyOrder.only

Created on 27 Aug 2019  路  9Comments  路  Source: robstoll/atrium

Platform (jvm, jdk8, js, android): all

Code related feature

val otherIterable : Iterable<Int>
expect(listOf(1, 2)).contains.inAnyOrder.only.elementsOf(otherIterable)

//instead of

expect(listOf(1, 2)).contains.inAnyOrder.only.elementsOf(otherIterable.first(), *otherIterable.drop(1).toTypedArray())

Following the things you need to do (see also a0b539c0 for a guideline)::

api

  • add fun elementsOf to apis/fluent-en_GB/atrium-fluent_en_GB-common/.../iterableContainsInAnyOrderOnlyCreators.kt (see other functions there for guideance)

    • it is enough if you delegate to values

    • require that the Iterable.hasNext

    • add @since 0.9.0 to the KDOC

  • extend IterableContainsInAnyOrderOnlyValuesAssertionsSpec via inlcude (see BuilderSpec in IterableContainsInAnyOrderAtLeast1ValuesAssertionsSpec for an example)

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).
good first issue help wanted

All 9 comments

I'll work on this

@PawelRaciborski do you need any help?

@PawelRaciborski un-assign you so that others can take over.

I'll work on this

@lelloman are you still working on it, do you need help?

Hi @robstoll sorry I got very busy lately. I tried to implement it once but got lost, I'd like to give it another try this week and eventually ask for specific help if that's OK

@lelloman any updates on this one? Still here if you need help :slightly_smiling_face:

I'll work on this

implemented with 3bee602

Was this page helpful?
0 / 5 - 0 ratings

Related issues

robstoll picture robstoll  路  6Comments

robstoll picture robstoll  路  5Comments

robstoll picture robstoll  路  3Comments

robstoll picture robstoll  路  6Comments

robstoll picture robstoll  路  4Comments