You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a scenario as below.
arrayList countryList =new arrayList();
I have taken arrayList and added all countries to it . Now I need to verify those are in ascending/Descending order or not.
//working fine for Ascending order.
assertThat(sortAscending(countryList)).as("Ascending Sorted order is: "+countryList).isSorted();
is there is a way to verify for Descending order with assertJ. I have seen "isSortedAccordingTo" . it is using comparator. But in my implementation there is no comparator(it is not required for me to implement comparator).
is any other assert will verfiy Descending order? any example with it ?
Thanks in advance for your help.
The text was updated successfully, but these errors were encountered:
Hi,
I have a scenario as below.
arrayList countryList =new arrayList();
I have taken arrayList and added all countries to it . Now I need to verify those are in ascending/Descending order or not.
//working fine for Ascending order.
assertThat(sortAscending(countryList)).as("Ascending Sorted order is: "+countryList).isSorted();
is there is a way to verify for Descending order with assertJ. I have seen "isSortedAccordingTo" . it is using comparator. But in my implementation there is no comparator(it is not required for me to implement comparator).
is any other assert will verfiy Descending order? any example with it ?
Thanks in advance for your help.
The text was updated successfully, but these errors were encountered: