Search in sources :

Example 1 with StatusBarController

use of net.sf.latexdraw.instrument.StatusBarController in project latexdraw by arnobl.

the class TestVersionChecker method testCheckVersionNoNewVersion.

@Test
public void testCheckVersionNoNewVersion() throws InterruptedException {
    final StatusBarController controller = mock(StatusBarController.class);
    final FutureTask<Void> future = new FutureTask<>(new VersionChecker(controller, new PreferencesService().getBundle()), null);
    final ExecutorService taskExecutor = Executors.newFixedThreadPool(1);
    taskExecutor.execute(future);
    taskExecutor.shutdown();
    taskExecutor.awaitTermination(5L, TimeUnit.SECONDS);
}
Also used : FutureTask(java.util.concurrent.FutureTask) ExecutorService(java.util.concurrent.ExecutorService) StatusBarController(net.sf.latexdraw.instrument.StatusBarController) PreferencesService(net.sf.latexdraw.service.PreferencesService) Test(org.junit.jupiter.api.Test)

Aggregations

ExecutorService (java.util.concurrent.ExecutorService)1 FutureTask (java.util.concurrent.FutureTask)1 StatusBarController (net.sf.latexdraw.instrument.StatusBarController)1 PreferencesService (net.sf.latexdraw.service.PreferencesService)1 Test (org.junit.jupiter.api.Test)1