use of nl.tudelft.watchdog.core.logic.storage.WatchDogItem in project watchdog by TestRoots.
the class EventJsonConverterTest method testJsonClassBreakpointAddEventRepresentation.
@Test
public void testJsonClassBreakpointAddEventRepresentation() {
BreakpointAddEvent event = new BreakpointAddEvent(1, BreakpointType.CLASS, new Date());
ArrayList<WatchDogItem> events = createSampleEvents(event);
assertEquals("[{\"bh\":1,\"bt\":\"cp\",\"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 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));
}
use of nl.tudelft.watchdog.core.logic.storage.WatchDogItem in project watchdog by TestRoots.
the class NetworkUtilsTest method testIntervalTransfer.
@Test
@Ignore
public void testIntervalTransfer() {
JsonTransferer it = new JsonTransferer();
IntervalBase interval = new IDEOpenInterval(new Date());
ArrayList<WatchDogItem> intervals = createSampleIntervals(interval);
String json = it.toJson(intervals);
try {
NetworkUtils.transferJsonAndGetResponse(NetworkUtils.buildIntervalsPostURL(fooBarUser, fooBarProject), json);
} catch (ServerCommunicationException | ServerReturnCodeException e) {
fail(e.getMessage());
}
}
Aggregations