Search in sources :

Example 1 with DebugEventBase

use of nl.tudelft.watchdog.core.logic.event.eventtypes.debugging.DebugEventBase in project watchdog by TestRoots.

the class TrackingEventManagerTest method testAddStepIntoEvent.

@Test
public void testAddStepIntoEvent() {
    DebugEventBase eventReal = new DebugEventBase(TrackingEventType.STEP_INTO, new Date());
    DebugEventBase event = Mockito.spy(eventReal);
    trackingEventManager.addEvent(event);
    Mockito.verify(event).setSessionSeed(sessionSeed);
    Mockito.verify(eventsToTransferPersister).save(Mockito.isA(DebugEventBase.class));
    Mockito.verify(eventsStatisticsPersister).save(Mockito.isA(DebugEventBase.class));
}
Also used : Date(java.util.Date) DebugEventBase(nl.tudelft.watchdog.core.logic.event.eventtypes.debugging.DebugEventBase) Test(org.junit.Test)

Example 2 with DebugEventBase

use of nl.tudelft.watchdog.core.logic.event.eventtypes.debugging.DebugEventBase in project watchdog by TestRoots.

the class EventJsonConverterTest method testJsonStepOutEvent.

@Test
public void testJsonStepOutEvent() {
    DebugEventBase event = new DebugEventBase(TrackingEventType.STEP_OUT, new Date());
    ArrayList<WatchDogItem> events = createSampleEvents(event);
    assertEquals("[{\"et\":\"st\",\"ts\":1,\"ss\":\"\"," + pasteWDVAndClient() + "}]", transferer.toJson(events));
}
Also used : Date(java.util.Date) DebugEventBase(nl.tudelft.watchdog.core.logic.event.eventtypes.debugging.DebugEventBase) WatchDogItem(nl.tudelft.watchdog.core.logic.storage.WatchDogItem) Test(org.junit.Test)

Example 3 with DebugEventBase

use of nl.tudelft.watchdog.core.logic.event.eventtypes.debugging.DebugEventBase in project watchdog by TestRoots.

the class EventJsonConverterTest method testJsonStepIntoEvent.

@Test
public void testJsonStepIntoEvent() {
    DebugEventBase event = new DebugEventBase(TrackingEventType.STEP_INTO, new Date());
    ArrayList<WatchDogItem> events = createSampleEvents(event);
    assertEquals("[{\"et\":\"si\",\"ts\":1,\"ss\":\"\"," + pasteWDVAndClient() + "}]", transferer.toJson(events));
}
Also used : Date(java.util.Date) DebugEventBase(nl.tudelft.watchdog.core.logic.event.eventtypes.debugging.DebugEventBase) WatchDogItem(nl.tudelft.watchdog.core.logic.storage.WatchDogItem) Test(org.junit.Test)

Example 4 with DebugEventBase

use of nl.tudelft.watchdog.core.logic.event.eventtypes.debugging.DebugEventBase in project watchdog by TestRoots.

the class EventJsonConverterTest method testJsonStepOverEvent.

@Test
public void testJsonStepOverEvent() {
    DebugEventBase event = new DebugEventBase(TrackingEventType.STEP_OVER, new Date());
    ArrayList<WatchDogItem> events = createSampleEvents(event);
    assertEquals("[{\"et\":\"so\",\"ts\":1,\"ss\":\"\"," + pasteWDVAndClient() + "}]", transferer.toJson(events));
}
Also used : Date(java.util.Date) DebugEventBase(nl.tudelft.watchdog.core.logic.event.eventtypes.debugging.DebugEventBase) WatchDogItem(nl.tudelft.watchdog.core.logic.storage.WatchDogItem) Test(org.junit.Test)

Example 5 with DebugEventBase

use of nl.tudelft.watchdog.core.logic.event.eventtypes.debugging.DebugEventBase in project watchdog by TestRoots.

the class EventJsonConverterTest method testJsonResumeClientEvent.

@Test
public void testJsonResumeClientEvent() {
    DebugEventBase event = new DebugEventBase(TrackingEventType.RESUME_CLIENT, new Date());
    ArrayList<WatchDogItem> events = createSampleEvents(event);
    assertEquals("[{\"et\":\"rc\",\"ts\":1,\"ss\":\"\"," + pasteWDVAndClient() + "}]", transferer.toJson(events));
}
Also used : Date(java.util.Date) DebugEventBase(nl.tudelft.watchdog.core.logic.event.eventtypes.debugging.DebugEventBase) WatchDogItem(nl.tudelft.watchdog.core.logic.storage.WatchDogItem) Test(org.junit.Test)

Aggregations

Date (java.util.Date)10 DebugEventBase (nl.tudelft.watchdog.core.logic.event.eventtypes.debugging.DebugEventBase)10 Test (org.junit.Test)8 WatchDogItem (nl.tudelft.watchdog.core.logic.storage.WatchDogItem)6