use of nl.tudelft.watchdog.core.logic.storage.WatchDogItem 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.storage.WatchDogItem in project watchdog by TestRoots.
the class EventJsonConverterTest method testJsonFieldBreakpointAddEventRepresentation.
@Test
public void testJsonFieldBreakpointAddEventRepresentation() {
BreakpointAddEvent event = new BreakpointAddEvent(1, BreakpointType.FIELD, new Date());
ArrayList<WatchDogItem> events = createSampleEvents(event);
assertEquals("[{\"bh\":1,\"bt\":\"fi\",\"et\":\"ba\",\"ts\":1,\"ss\":\"\"," + pasteWDVAndClient() + "}]", transferer.toJson(events));
}
use of nl.tudelft.watchdog.core.logic.storage.WatchDogItem 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.storage.WatchDogItem in project watchdog by TestRoots.
the class EventJsonConverterTest method testJsonSuspendClientEvent.
@Test
public void testJsonSuspendClientEvent() {
DebugEventBase event = new DebugEventBase(TrackingEventType.SUSPEND_CLIENT, new Date());
ArrayList<WatchDogItem> events = createSampleEvents(event);
assertEquals("[{\"et\":\"sc\",\"ts\":1,\"ss\":\"\"," + pasteWDVAndClient() + "}]", transferer.toJson(events));
}
use of nl.tudelft.watchdog.core.logic.storage.WatchDogItem in project watchdog by TestRoots.
the class EventJsonConverterTest method testJsonUndefinedBreakpointAddEventRepresentation.
@Test
public void testJsonUndefinedBreakpointAddEventRepresentation() {
BreakpointAddEvent event = new BreakpointAddEvent(1, BreakpointType.UNDEFINED, new Date());
ArrayList<WatchDogItem> events = createSampleEvents(event);
assertEquals("[{\"bh\":1,\"bt\":\"un\",\"et\":\"ba\",\"ts\":1,\"ss\":\"\"," + pasteWDVAndClient() + "}]", transferer.toJson(events));
}
Aggregations