Add extracting()/returns() method to most assertions
See original GitHub issueFeature summary
when testing a spring-data-jpa application, I found org.assertj.core.api.Assertions.assertThat(org.springframework.data.domain.Page)
returns IterableAssert
which has no extracting()
and returns()
method.
I have to use org.assertj.core.api.Assertions#assertThatObject
.
In Java world, Iterable
implement instances are all expected to be Object
, so can we add method extracting
and returns
(maybe some more) functions to IterableAssert
? It should make writing unittest more easy.
Issue Analytics
- State:
- Created a year ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
Extracting function from entries for Map · Issue #1370 - GitHub
Summary I like very much the extracting function feature of AssertJ. With Iterable objects, it is really fine as that is defined in...
Read more >AssertJ / Fluent assertions for java
Like extracting but instead of extracting properties/fields, it extracts the result of a given method invocation on the elements of the Iterable/Array under ......
Read more >AssertJ: Retrieving First Items From Extracting List Returns List ...
extracting for Object assertion extracts the object under test (here asia ) properties resulting in a List of extracted property values.
Read more >Asserting Lists with AssertJ - Reflectoring
How can we extract certain elements out of a list to assert them? This article shows how to work with lists in AssertJ....
Read more >Testing Java Collections with AssertJ. - Medium
Let's dive into fluent assertions java library “AssertJ”, that can make your life easier and your tests more reliable and readable.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
All my questions are get answered. Thanks for all of your reponse.
@fishautumn is there anything else you need from us or can we close this issue?