use of net.sf.sahi.report.TestResult in project sakuli by ConSol.
the class RhinoAspectTest method verifySahiReport.
private void verifySahiReport(ResultType resultTyp, int initialListSize) {
if (resultTyp != null) {
Report sahiReport2 = BeanLoader.loadBaseActionLoader().getSahiReport();
int newLisSize = sahiReport2.getListResult().size();
assertEquals(newLisSize, initialListSize + 1);
TestResult testResult = sahiReport2.getListResult().get(newLisSize - 1);
assertNotNull(testResult);
SakuliExceptionHandler sakuliExceptionHandler = BeanLoader.loadBean(SakuliExceptionHandler.class);
if (resultTyp.equals(ResultType.ERROR) || resultTyp.equals(ResultType.FAILURE)) {
verify(sakuliExceptionHandler).handleException(any(LogResult.class));
} else {
verify(sakuliExceptionHandler, never()).handleException(any(LogResult.class));
}
}
}
Aggregations