Search in sources :

Example 1 with IDEIntervalManagerBase

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

the class WatchDogEventManagerTest method setup.

@Before
public void setup() {
    MockitoAnnotations.initMocks(this);
    IDEIntervalManagerBase intervalManagerReal = new IntervalManager(Mockito.mock(PersisterBase.class), Mockito.mock(PersisterBase.class));
    intervalManager = Mockito.spy(intervalManagerReal);
    mockedTextEditor = Mockito.mock(ITextEditor.class);
    WatchDogEventType.intervalManager = intervalManager;
    WatchDogEventType.editorSpecificImplementation = new InitializationManager.EclipseWatchDogEventSpecificImplementation(intervalManager);
    InactivityNotifiers.READING.updateNotifier(new InactivityNotifier(USER_ACTIVITY_TIMEOUT, WatchDogEventType.READING_INACTIVITY));
    InactivityNotifiers.USER_INACTIVITY.updateNotifier(new UserInactivityNotifier(USER_ACTIVITY_TIMEOUT, WatchDogEventType.USER_INACTIVITY));
    InactivityNotifiers.TYPING.updateNotifier(new InactivityNotifier(USER_ACTIVITY_TIMEOUT, WatchDogEventType.TYPING_INACTIVITY));
}
Also used : UserInactivityNotifier(nl.tudelft.watchdog.core.logic.ui.UserInactivityNotifier) InactivityNotifier(nl.tudelft.watchdog.core.logic.ui.InactivityNotifier) IDEIntervalManagerBase(nl.tudelft.watchdog.core.logic.interval.IDEIntervalManagerBase) ITextEditor(org.eclipse.ui.texteditor.ITextEditor) InitializationManager(nl.tudelft.watchdog.eclipse.logic.InitializationManager) UserInactivityNotifier(nl.tudelft.watchdog.core.logic.ui.UserInactivityNotifier) PersisterBase(nl.tudelft.watchdog.core.logic.storage.PersisterBase) IntervalManager(nl.tudelft.watchdog.eclipse.logic.interval.IntervalManager) Before(org.junit.Before)

Aggregations

IDEIntervalManagerBase (nl.tudelft.watchdog.core.logic.interval.IDEIntervalManagerBase)1 PersisterBase (nl.tudelft.watchdog.core.logic.storage.PersisterBase)1 InactivityNotifier (nl.tudelft.watchdog.core.logic.ui.InactivityNotifier)1 UserInactivityNotifier (nl.tudelft.watchdog.core.logic.ui.UserInactivityNotifier)1 InitializationManager (nl.tudelft.watchdog.eclipse.logic.InitializationManager)1 IntervalManager (nl.tudelft.watchdog.eclipse.logic.interval.IntervalManager)1 ITextEditor (org.eclipse.ui.texteditor.ITextEditor)1 Before (org.junit.Before)1