Platform (jvm, jdk8, js, android): all
expect(listOf(1,2,3)).min().toBe(3)
expect(listOf(1,2,3)).min {
isGreaterThan(3)
isLessThan(5)
}
//instead of
expect(listOf(1,2,3)).feature { f(it::min) }.notToBeNull().toBe(3)
expect(listOf(1,2,3)).feature({ f(it::min) }) {
notToBeNull {
isGreaterThan(3)
isLessThan(5)
}
}
However, in reporting we want to see the following in case there aren't any elements in the iterable:
expect: List()
* min: !! cannot be determined, empty Iterable
>> to be: 3
Following the things you need to do:
domain
min (see ListAssertions.get as a guideline)lib
ExpectImpl.feature.extractor (see listAssertions -> _get) => use the following as failure representationNO_ELEMENTS("鉂椻潡 cannot be determined, empty Iterable") to DescriptionIterable of en_GBNO_ELEMENTS("鉂椻潡 kann nicht eruiert werden, leeres Iterable") to DescriptionIterable of de_CHapi (only fluent-en_GB)
assertionCreator-lambda and returns ExpectT : Iterable<E>, E : Comparable<E> (see collectionAssertions.kt as a guideline)min in specs-common (see for instance CollectionFeatureAssertionsSpec) and extend it in atrium-api-fluent-en_GB-common/src/testI'll work on this if you would like to take this issue over.I'll work on this
is someone still working on this? else I will start
@ntedgi please answer if you are. @piyushmor feel free to start, in the worst case you both do the same work => assigned you
sorry didn't manged to finish that yet
@ntedgi did you already start? If so, you could still push your changes as WIP PR and @piyushmor could take over from there. Up to you two
Would totally like to take over
@robstoll Kindly check the PR again. If the changes are fine. I have issues in adding the Feature Test
What issues? I'll take a look now
I took size as a reference, which returns an Expect<Iterable<E>> whereas get returns an Expect<E>. Not sure why the test expects a different behavior. will commit the test even if compilation breaks once you confirm what i have done so far is fine.
Please push the code as well, hard to tell what you mean without further context (I reviewed your code)
Implemented by da897cb2322872452deb0e22ef875c16043a3b9d