use of nl.tudelft.watchdog.core.logic.event.eventtypes.debugging.BreakpointChangeEvent in project watchdog by TestRoots.
the class EventJsonConverterTest method testJsonLineBreakpointChangeEventUnknownChange.
@Test
public void testJsonLineBreakpointChangeEventUnknownChange() {
List<BreakpointChangeType> changes = new ArrayList<>();
changes.add(BreakpointChangeType.UNKNOWN);
BreakpointChangeEvent event = new BreakpointChangeEvent(1, BreakpointType.LINE, changes, new Date());
ArrayList<WatchDogItem> events = createSampleEvents(event);
assertEquals("[{\"ch\":[\"un\"],\"bh\":1,\"bt\":\"li\",\"et\":\"bc\",\"ts\":1,\"ss\":\"\"," + pasteWDVAndClient() + "}]", transferer.toJson(events));
}
use of nl.tudelft.watchdog.core.logic.event.eventtypes.debugging.BreakpointChangeEvent in project watchdog by TestRoots.
the class EventJsonConverterTest method testJsonLineBreakpointChangeEventThreeChanges.
@Test
public void testJsonLineBreakpointChangeEventThreeChanges() {
List<BreakpointChangeType> changes = new ArrayList<>();
changes.add(BreakpointChangeType.DISABLED);
changes.add(BreakpointChangeType.COND_DISABLED);
changes.add(BreakpointChangeType.COND_CHANGED);
BreakpointChangeEvent event = new BreakpointChangeEvent(1, BreakpointType.LINE, changes, new Date());
ArrayList<WatchDogItem> events = createSampleEvents(event);
assertEquals("[{\"ch\":[\"ds\",\"cd\",\"cc\"],\"bh\":1,\"bt\":\"li\",\"et\":\"bc\",\"ts\":1,\"ss\":\"\"," + pasteWDVAndClient() + "}]", transferer.toJson(events));
}
use of nl.tudelft.watchdog.core.logic.event.eventtypes.debugging.BreakpointChangeEvent 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