use of org.eclipse.che.api.debug.shared.model.event.BreakpointActivatedEvent in project che by eclipse.
the class JavaDebuggerTest method testGetAllBreakpoints.
@Test(priority = 8)
public void testGetAllBreakpoints() throws Exception {
assertFalse(debugger.getAllBreakpoints().isEmpty());
debugger.deleteAllBreakpoints();
assertTrue(debugger.getAllBreakpoints().isEmpty());
debugger.addBreakpoint(new BreakpointImpl(new LocationImpl("com.HelloWorld", 18), false, null));
DebuggerEvent debuggerEvent = events.take();
assertTrue(debuggerEvent instanceof BreakpointActivatedEvent);
assertEquals(debugger.getAllBreakpoints().size(), 1);
Breakpoint breakpoint = debugger.getAllBreakpoints().get(0);
assertEquals(breakpoint.getLocation().getLineNumber(), 18);
assertEquals(breakpoint.getLocation().getTarget(), "com.HelloWorld");
assertTrue(breakpoint.isEnabled());
}
use of org.eclipse.che.api.debug.shared.model.event.BreakpointActivatedEvent in project che by eclipse.
the class GdbDebuggerTest method addBreakpoint.
private void addBreakpoint() throws DebuggerException, InterruptedException {
Location location = new LocationImpl("h.cpp", 7);
Breakpoint breakpoint = new BreakpointImpl(location);
gdbDebugger.addBreakpoint(breakpoint);
assertEquals(events.size(), 1);
DebuggerEvent debuggerEvent = events.take();
assertTrue(debuggerEvent instanceof BreakpointActivatedEvent);
BreakpointActivatedEvent breakpointActivatedEvent = (BreakpointActivatedEvent) debuggerEvent;
assertEquals(breakpointActivatedEvent.getBreakpoint().getLocation().getTarget(), "h.cpp");
assertEquals(breakpointActivatedEvent.getBreakpoint().getLocation().getLineNumber(), 7);
}
Aggregations