use of nl.tudelft.watchdog.core.logic.breakpoint.Breakpoint in project watchdog by TestRoots.
the class BreakpointCreatorTest method testCreateJavaBreakpointSuspendPolicy.
@Test
public void testCreateJavaBreakpointSuspendPolicy() throws CoreException {
IJavaBreakpoint bp = mock(IJavaBreakpoint.class);
when(bp.getSuspendPolicy()).thenReturn(1);
Breakpoint result = BreakpointCreator.createBreakpoint(bp);
assertEquals(1, result.getSuspendPolicy());
}
use of nl.tudelft.watchdog.core.logic.breakpoint.Breakpoint in project watchdog by TestRoots.
the class BreakpointListener method breakpointAdded.
@Override
public void breakpointAdded(@NotNull XBreakpoint xBreakpoint) {
Date timestamp = new Date();
Breakpoint breakpoint = BreakpointCreator.createBreakpoint(xBreakpoint);
breakpoints.put(breakpoint.getHash(), breakpoint);
BreakpointAddEvent event = new BreakpointAddEvent(breakpoint.getHash(), breakpoint.getBreakpointType(), timestamp);
trackingEventManager.addEvent(event);
}
use of nl.tudelft.watchdog.core.logic.breakpoint.Breakpoint in project watchdog by TestRoots.
the class BreakpointListener method breakpointChanged.
@Override
public void breakpointChanged(@NotNull XBreakpoint xBreakpoint) {
Date timestamp = new Date();
Breakpoint breakpoint = BreakpointCreator.createBreakpoint(xBreakpoint);
// Replace entry if present, otherwise create new entry.
Breakpoint oldBreakpoint = breakpoints.put(breakpoint.getHash(), breakpoint);
List<BreakpointChangeType> changes = BreakpointChangeClassifier.classify(oldBreakpoint, breakpoint);
BreakpointChangeEvent event = new BreakpointChangeEvent(breakpoint.getHash(), breakpoint.getBreakpointType(), changes, timestamp);
trackingEventManager.addEvent(event);
}
Aggregations