Skip to content
Yani (Ioannis) Metaxas edited this page Feb 16, 2018 · 33 revisions

Welcome to the Reality Check wiki!

New Feature Ideas

Truth

http://www.baeldung.com/google-truth

assertCollections

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));

}

DeepDifference - Deep & Shallow copies

Date assertions

Iterables

POJO assertions

JSON assertions

java.util.Optional matchers

Future matchers

REST

Check for the actions logic: https://github.com/poetix/fluvius


References: This has more ideas than REST practices https://blog.philipphauer.de/testing-restful-services-java-best-practices/