atrium icon indicating copy to clipboard operation
atrium copied to clipboard

elementsOf(Iterable) for contains.inAnyOrder.only

Open robstoll opened this issue 7 years ago • 9 comments

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).

robstoll avatar Aug 27 '19 08:08 robstoll

I'll work on this

PawelRaciborski avatar Sep 25 '19 19:09 PawelRaciborski

@PawelRaciborski do you need any help?

robstoll avatar Oct 11 '19 06:10 robstoll

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

robstoll avatar Oct 14 '19 12:10 robstoll

I'll work on this

lelloman avatar Oct 15 '19 16:10 lelloman

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

robstoll avatar Nov 11 '19 07:11 robstoll

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 avatar Nov 11 '19 09:11 lelloman

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

robstoll avatar Dec 12 '19 20:12 robstoll

I'll work on this

johnGachihi avatar Jan 09 '20 15:01 johnGachihi

implemented with 3bee602

robstoll avatar Jan 11 '20 12:01 robstoll