}
@Override
protected void notifyResultEvents(final TestResultMessage testResultMessage) {
for(int i = 0; i < m_testListeners.length; i++) {
final IRemoteTestListener listener = m_testListeners[i];
Platform.run(new ListenerSafeRunnable() {
public void run() {
switch(testResultMessage.getResult()) {
case MessageHelper.TEST_STARTED:
listener.onTestStart(testResultMessage);
break;
case MessageHelper.PASSED_TEST:
listener.onTestSuccess(testResultMessage);
break;
case MessageHelper.FAILED_TEST:
listener.onTestFailure(testResultMessage);
break;
case MessageHelper.SKIPPED_TEST:
listener.onTestSkipped(testResultMessage);
break;
case MessageHelper.FAILED_ON_PERCENTAGE_TEST:
listener.onTestFailedButWithinSuccessPercentage(testResultMessage);
break;
}
}
});
}