-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Yani (Ioannis) Metaxas edited this page Oct 18, 2017
·
33 revisions
Welcome to the Reality Check wiki!
New Feature Ideas
import com.google.common.collect.Ordering;
public static <T> void assertCollections(Collection<?> actual, Collection<T> expected) {
Ordering<T> 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));
}
- Test POJO Equals: https://github.com/jdereg/java-util/blob/master/src/test/java/com/cedarsoftware/util/TestDeepEquals.java
- Check the https://github.com/FasterXML/jackson
References: This has more ideas than REST practices https://blog.philipphauer.de/testing-restful-services-java-best-practices/