use of com.djrapitops.plan.gathering.cache.SessionCache in project Plan by plan-player-analytics.
the class BukkitAFKListenerTest method setUp.
@BeforeAll
static void setUp() {
PlanConfig config = Mockito.mock(PlanConfig.class);
when(config.get(TimeSettings.AFK_THRESHOLD)).thenReturn(TimeUnit.MINUTES.toMillis(3));
errorLogger = Mockito.mock(ErrorLogger.class);
underTest = new BukkitAFKListener(config, errorLogger);
new SessionCache().cacheSession(TestConstants.PLAYER_ONE_UUID, new ActiveSession(null, null, 0, null, null));
new SessionCache().cacheSession(TestConstants.PLAYER_TWO_UUID, new ActiveSession(null, null, 0, null, null));
}
use of com.djrapitops.plan.gathering.cache.SessionCache in project Plan by plan-player-analytics.
the class NukkitAFKListenerTest method setUp.
@BeforeAll
static void setUp() {
PlanConfig config = Mockito.mock(PlanConfig.class);
when(config.get(TimeSettings.AFK_THRESHOLD)).thenReturn(TimeUnit.MINUTES.toMillis(3));
errorLogger = Mockito.mock(ErrorLogger.class);
underTest = new NukkitAFKListener(config, errorLogger);
new SessionCache().cacheSession(TestConstants.PLAYER_ONE_UUID, new ActiveSession(null, null, 0, null, null));
new SessionCache().cacheSession(TestConstants.PLAYER_TWO_UUID, new ActiveSession(null, null, 0, null, null));
}
use of com.djrapitops.plan.gathering.cache.SessionCache in project Plan by plan-player-analytics.
the class AFKTrackerTest method setUpAfkTracker.
@BeforeEach
void setUpAfkTracker() {
PlanConfig config = Mockito.mock(PlanConfig.class);
afkThreshold = TimeUnit.MINUTES.toMillis(1L);
when(config.get(TimeSettings.AFK_THRESHOLD)).thenReturn(afkThreshold);
new SessionCache().cacheSession(playerUUID, new ActiveSession(playerUUID, null, 0, null, null));
underTest = new AFKTracker(config);
}
Aggregations