DATACMNS-1482 - Polishing.

Slightly improved test case.
This commit is contained in:
Oliver Drotbohm
2019-02-20 13:54:01 +01:00
parent f0a0cfd087
commit d724c5aa4d

View File

@@ -372,13 +372,14 @@ public class QueryExecutionResultHandlerUnitTests {
Object result = handler.postProcessInvocationResult(asList(BigDecimal.ZERO, BigDecimal.ONE),
getMethod("listOfInteger"));
assertThat(result).isInstanceOf(List.class);
assertThat(result).isInstanceOfSatisfying(List.class, list -> {
List list = (List) result;
SoftAssertions.assertSoftly(s -> {
// for making the test failure more obvious:
(list).forEach(v -> s.assertThat(v).isInstanceOf(Integer.class));
s.assertThat(list).containsExactly(0, 1);
SoftAssertions.assertSoftly(s -> {
// for making the test failure more obvious:
s.assertThat(list).allMatch(it -> Integer.class.isInstance(it));
s.assertThat(list).containsExactly(0, 1);
});
});
}
@@ -408,6 +409,7 @@ public class QueryExecutionResultHandlerUnitTests {
Completable completable();
// DATACMNS-1482
List<Integer> listOfInteger();
}