Search in sources :

Example 1 with AssertException

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"));
}
Also used : AssertException(com.mchange.util.AssertException) RunStatus(com.epam.pipeline.entity.pipeline.run.RunStatus)

Aggregations

RunStatus (com.epam.pipeline.entity.pipeline.run.RunStatus)1 AssertException (com.mchange.util.AssertException)1