use of com.mchange.util.AssertException in project cloud-pipeline by epam.
the class MapperVerificationUtils method verifyStatuses.
private static void verifyStatuses(final List<RunStatus> expected, final ArrayList<Map<String, Object>> content) {
if (CollectionUtils.isEmpty(expected)) {
if (CollectionUtils.isNotEmpty(content)) {
throw new AssertException("Expected list is empty but actual not");
}
return;
}
assertEquals(expected.size(), content.size());
// TODO: expand to all sizes
RunStatus expectedRunStatus = expected.get(0);
Map<String, Object> actualRunStatus = content.get(0);
assertEquals(expectedRunStatus.getStatus().name(), actualRunStatus.get("status"));
}
Aggregations