if (argMap == null) argMap = getTestConfig();
final ProcessRunner runner = ProcessRunner.getInstance(argMap);
runner.setName(this.baseName);
final TestProgressMontitor monitor = new TestProgressMontitor();
runner.run(monitor);
Controller controller = runner.getController();
// verify process completed as expected
if (expectProcessSuccess) {
verifyInsertCorrectByContent(controller, createAttachmentFileMap(files), myAttachmentTemplateListener);
// this should also still work
assertTrue("Process failed: " + monitor.getMessage(), monitor.isSuccess());
verifyFailureFile(controller, numFailures); // A.S.: To be removed and replaced
verifySuccessFile(controller, numInserts, numUpdates, false);
} else {
assertFalse("Expected process to fail but got success: " + monitor.getMessage(), monitor.isSuccess());
}
// TODO: validate all messages, including nulls if those exist
if (failMessage != null) {
assertEquals("wrong message: ", failMessage, monitor.getMessage());
}
// return the controller used by the process so that the tests can validate success/error output files, etc
return controller;
}