I'm using JunitJupiter for unit testing. Now I'm at a point where I don't know how to check the order of a list.
Code:
@Test
@DisplayName("Should be in ascending order")
void sortAscending() {
List<List<AccountlinevaluesEntity>> finalList = monthlySuSa;
for (List<AccountlinevaluesEntity> list : finalList) {
list.sort(Comparator.comparing(AccountlinevaluesEntity::getAccountNumber));
assert(list, ...........);
}
}
I'm pretty new to unit testing, i searched a lot but I didn't figure out how to do it.
So, is there any way to do this with jUnitJupiter or are there other ways to do this?