public void testLoadFile() { try { String datadir = System.getProperty("planworks.test.data.dir") .concat(System.getProperty("file.separator")) .concat("loadTest") .concat(System.getProperty("file.separator")); checkConstraintLoad(datadir); checkConstraintVarMapLoad(datadir); checkObjectLoad(datadir); checkPartialPlanLoad(datadir); checkProjectLoad(datadir); checkSequenceLoad(datadir); checkTokenLoad(datadir); checkVariableLoad(datadir); // checkTransactionLoad(datadir); checkPartialPlanStatsLoad(datadir); checkResourceInstantsLoad(datadir); checkRulesLoad(datadir); checkRuleInstanceLoad(datadir); checkDecisionLoad(datadir); // catch assert errors and Exceptions here, since JUnit seems to not do it } catch (AssertionFailedError err) { err.printStackTrace(); System.exit(-1); } catch (Exception excp) { excp.printStackTrace(); System.exit(-1); } }
public void addFailure(Test test, AssertionFailedError t) { StringBuffer sb = new StringBuffer(); sb.append(test.toString()); sb.append("\n"); StringWriter sw = new StringWriter(); t.printStackTrace(new PrintWriter(sw, true)); sb.append(sw.toString()); Log.getLogWriter().severe("zzzzzFAILURE IN " + test, t); // reportFailure(test, sb.toString()); lastFailClass = getClassName(test); lastFailMethod = getMethodName(test); lastThrowable = t; }