Search in sources :

Example 1 with ReadingInterval

use of nl.tudelft.watchdog.core.logic.interval.intervaltypes.ReadingInterval in project watchdog by TestRoots.

the class IntervalJsonConverterTest method testJsonReadingIntervalRepresentation.

/**
 * Tests the format of the returned Json representation.
 */
@Test
public void testJsonReadingIntervalRepresentation() {
    ReadingInterval interval = new ReadingInterval(null, new Date());
    ArrayList<WatchDogItem> intervals = createSampleIntervals(interval);
    assertEquals("[{\"doc\":{\"pn\":\"f6f4da8d93e88a08220e03b7810451d3ba540a34\",\"fn\":\"90a8834de76326869f3e703cd61513081ad73d3c\",\"sloc\":1,\"dt\":\"pr\"},\"it\":\"re\",\"ts\":1,\"te\":2,\"ss\":\"\"," + pasteWDVAndClient() + "}]", transferer.toJson(intervals));
}
Also used : ReadingInterval(nl.tudelft.watchdog.core.logic.interval.intervaltypes.ReadingInterval) Date(java.util.Date) WatchDogItem(nl.tudelft.watchdog.core.logic.storage.WatchDogItem) Test(org.junit.Test)

Aggregations

Date (java.util.Date)1 ReadingInterval (nl.tudelft.watchdog.core.logic.interval.intervaltypes.ReadingInterval)1 WatchDogItem (nl.tudelft.watchdog.core.logic.storage.WatchDogItem)1 Test (org.junit.Test)1