use of nl.tudelft.watchdog.core.logic.event.eventtypes.debugging.BreakpointAddEvent in project watchdog by TestRoots.
the class EventPersisterDuplicatesTest method createEvent.
private static EventBase createEvent() {
EventBase event = new BreakpointAddEvent(1, BreakpointType.LINE, new Date(1));
event.setSessionSeed("444");
return event;
}
use of nl.tudelft.watchdog.core.logic.event.eventtypes.debugging.BreakpointAddEvent in project watchdog by TestRoots.
the class TrackingEventManagerTest method testAddBreakpointAddEvent.
@Test
public void testAddBreakpointAddEvent() {
BreakpointAddEvent eventReal = new BreakpointAddEvent(1, BreakpointType.LINE, new Date());
BreakpointAddEvent event = Mockito.spy(eventReal);
trackingEventManager.addEvent(event);
Mockito.verify(event).setSessionSeed(sessionSeed);
Mockito.verify(eventsToTransferPersister).save(Mockito.isA(BreakpointAddEvent.class));
Mockito.verify(eventsStatisticsPersister).save(Mockito.isA(BreakpointAddEvent.class));
}
use of nl.tudelft.watchdog.core.logic.event.eventtypes.debugging.BreakpointAddEvent in project watchdog by TestRoots.
the class EventJsonConverterTest method testJsonLineBreakpointAddEventRepresentation.
@Test
public void testJsonLineBreakpointAddEventRepresentation() {
BreakpointAddEvent event = new BreakpointAddEvent(1, BreakpointType.LINE, new Date());
ArrayList<WatchDogItem> events = createSampleEvents(event);
assertEquals("[{\"bh\":1,\"bt\":\"li\",\"et\":\"ba\",\"ts\":1,\"ss\":\"\"," + pasteWDVAndClient() + "}]", transferer.toJson(events));
}
use of nl.tudelft.watchdog.core.logic.event.eventtypes.debugging.BreakpointAddEvent in project watchdog by TestRoots.
the class EventPersisterTest method createRandomEvent.
public static EventBase createRandomEvent() {
EventBase event = new BreakpointAddEvent(new Random().nextInt(100000), BreakpointType.LINE, new Date());
event.setSessionSeed("444");
event.setTimestamp(new Date(event.getTimestamp().getTime() + (new Random()).nextInt(100000)));
return event;
}
use of nl.tudelft.watchdog.core.logic.event.eventtypes.debugging.BreakpointAddEvent in project watchdog by TestRoots.
the class BreakpointListener method breakpointAdded.
@Override
public void breakpointAdded(IBreakpoint breakpoint) {
Date timestamp = new Date();
Breakpoint bp = BreakpointCreator.createBreakpoint(breakpoint);
breakpoints.put(bp.getHash(), bp);
BreakpointAddEvent event = new BreakpointAddEvent(bp.getHash(), bp.getBreakpointType(), timestamp);
TrackingEventManager.addEvent(event);
}
Aggregations