use of org.eclipse.che.api.debug.shared.dto.action.ResumeActionDto in project che by eclipse.
the class DebuggerTest method testResume.
@Test
public void testResume() throws Exception {
ResumeActionDto resumeAction = mock(ResumeActionDto.class);
doReturn(promiseVoid).when(service).resume(SESSION_ID, resumeAction);
doReturn(resumeAction).when(dtoFactory).createDto(ResumeActionDto.class);
debugger.resume();
verify(observer).onPreResume();
verify(promiseVoid).catchError(operationPromiseErrorCaptor.capture());
operationPromiseErrorCaptor.getValue().apply(promiseError);
verify(promiseError).getCause();
assertTrue(debugger.isConnected());
}
use of org.eclipse.che.api.debug.shared.dto.action.ResumeActionDto in project che by eclipse.
the class AbstractDebugger method resume.
@Override
public void resume() {
if (isConnected()) {
for (DebuggerObserver observer : observers) {
observer.onPreResume();
}
removeCurrentLocation();
preserveDebuggerState();
ResumeActionDto action = dtoFactory.createDto(ResumeActionDto.class);
action.setType(Action.TYPE.RESUME);
Promise<Void> promise = service.resume(debugSessionDto.getId(), action);
promise.catchError(new Operation<PromiseError>() {
@Override
public void apply(PromiseError arg) throws OperationException {
Log.error(AbstractDebugger.class, arg.getCause());
}
});
}
}
Aggregations