* @param greaterThanOrEqualTo true if should use greaterThanOrEqualToComparison
*/
private void verifySendCounts(List<Module> modules, int msgCountExpected, boolean greaterThanOrEqualTo) {
Iterator<Module> iter = modules.iterator();
while (iter.hasNext()) {
Module module = iter.next();
if (!module.getModuleChannel().equals("output")
&& !module.getModuleChannel().equals("input")) {
continue;
}
int sendCount = Integer.parseInt(module.getSendCount());
if (greaterThanOrEqualTo) {
assertThat("Module " + module.getModuleName() + " for channel " + module.getModuleChannel() +
" did not have at least expected count ",
sendCount, greaterThanOrEqualTo(msgCountExpected));
}
else {
assertEquals("Module "
+ module.getModuleName() + " for channel "
+ module.getModuleChannel()
+ " did not have expected count ", msgCountExpected, sendCount);
}
int errorCount = Integer.parseInt(module.getSendErrorCount());
assertFalse("Module "
+ module.getModuleName() + " for channel "
+ module.getModuleChannel() + " had an error count of "
+ errorCount + ", expected 0.", errorCount > 0);
}
}