use of org.hamcrest.collection.IsIterableContainingInOrder in project cactoos by yegor256.
the class SortedTest method mustSortTextIterableAsSetUsingCustomCOmparator.
@Test
@SuppressWarnings("unchecked")
void mustSortTextIterableAsSetUsingCustomCOmparator() {
new Assertion<>("Must keep unique integer numbers sorted in descending order", new Sorted<Text>((first, second) -> {
final String left = new UncheckedText(first).asString();
final String right = new UncheckedText(second).asString();
return left.compareTo(right);
}, new TextOf("cd"), new TextOf("ab"), new TextOf("gh"), new TextOf("ef")), new IsIterableContainingInOrder<Text>(new ListOf<>(new IsText("ab"), new IsText("cd"), new IsText("ef"), new IsText("gh")))).affirm();
}
Aggregations