Skip to content
Yani (Ioannis) Metaxas edited this page Oct 18, 2017 · 33 revisions

Welcome to the Reality Check wiki!

New Feature Ideas

  • assertCollections

import com.google.common.collect.Ordering;

`public static void assertCollections(Collection<?> actual, Collection expected) {

Ordering ordering = Ordering.from(Comparator.comparing(Object::toString));`

List<T> sortedActuals = ordering.sortedCopy((Collection<T>) actual);

List<T> sortedExpected = ordering.sortedCopy(expected);

assertThat(sortedActuals, is(sortedExpected));

}`

Clone this wiki locally