use of nl.tudelft.watchdog.core.logic.event.eventtypes.debugging.BreakpointRemoveEvent in project watchdog by TestRoots.
the class EventPersisterDuplicatesTest method test5AddSimilarEventDifferentTypeTestPersisted.
@Test
public void test5AddSimilarEventDifferentTypeTestPersisted() {
event = new BreakpointRemoveEvent(1, BreakpointType.LINE, new Date(1));
event.setSessionSeed("444");
persister.save(event);
assertEquals(3, persister.getSize());
}
use of nl.tudelft.watchdog.core.logic.event.eventtypes.debugging.BreakpointRemoveEvent in project watchdog by TestRoots.
the class TrackingEventManagerTest method testAddBreakpointRemoveEvent.
@Test
public void testAddBreakpointRemoveEvent() {
BreakpointRemoveEvent eventReal = new BreakpointRemoveEvent(1, BreakpointType.LINE, new Date());
BreakpointRemoveEvent event = Mockito.spy(eventReal);
trackingEventManager.addEvent(event);
Mockito.verify(event).setSessionSeed(sessionSeed);
Mockito.verify(eventsToTransferPersister).save(Mockito.isA(BreakpointRemoveEvent.class));
Mockito.verify(eventsStatisticsPersister).save(Mockito.isA(BreakpointRemoveEvent.class));
}
use of nl.tudelft.watchdog.core.logic.event.eventtypes.debugging.BreakpointRemoveEvent in project watchdog by TestRoots.
the class BreakpointListener method breakpointRemoved.
@Override
public void breakpointRemoved(@NotNull XBreakpoint xBreakpoint) {
Date timestamp = new Date();
Breakpoint breakpoint = BreakpointCreator.createBreakpoint(xBreakpoint);
breakpoints.remove(breakpoint.getHash());
BreakpointRemoveEvent event = new BreakpointRemoveEvent(breakpoint.getHash(), breakpoint.getBreakpointType(), timestamp);
trackingEventManager.addEvent(event);
}
use of nl.tudelft.watchdog.core.logic.event.eventtypes.debugging.BreakpointRemoveEvent in project watchdog by TestRoots.
the class BreakpointListener method breakpointRemoved.
@Override
public void breakpointRemoved(IBreakpoint breakpoint, IMarkerDelta delta) {
Date timestamp = new Date();
Breakpoint bp = BreakpointCreator.createBreakpoint(breakpoint);
breakpoints.remove(bp.getHash());
BreakpointRemoveEvent event = new BreakpointRemoveEvent(bp.getHash(), bp.getBreakpointType(), timestamp);
TrackingEventManager.addEvent(event);
}
use of nl.tudelft.watchdog.core.logic.event.eventtypes.debugging.BreakpointRemoveEvent in project watchdog by TestRoots.
the class EventJsonConverterTest method testJsonLineBreakpointRemoveEventRepresentation.
@Test
public void testJsonLineBreakpointRemoveEventRepresentation() {
BreakpointRemoveEvent event = new BreakpointRemoveEvent(1, BreakpointType.LINE, new Date());
ArrayList<WatchDogItem> events = createSampleEvents(event);
assertEquals("[{\"bh\":1,\"bt\":\"li\",\"et\":\"br\",\"ts\":1,\"ss\":\"\"," + pasteWDVAndClient() + "}]", transferer.toJson(events));
}
Aggregations