Last change
on this file was 18037, checked in by Don-vip, 3 years ago |
fix #21064 - Add JUnit 5 extension for preferences (patch by taylor.smock)
|
-
Property svn:eol-style
set to
native
|
File size:
830 bytes
|
Line | |
---|
1 | // License: GPL. For details, see LICENSE file.
|
---|
2 | package org.openstreetmap.josm.tools.bugreport;
|
---|
3 |
|
---|
4 | import java.util.concurrent.CountDownLatch;
|
---|
5 |
|
---|
6 | import org.junit.jupiter.api.Test;
|
---|
7 |
|
---|
8 | /**
|
---|
9 | * Unit tests of {@link BugReportExceptionHandler} class.
|
---|
10 | */
|
---|
11 | class BugReportExceptionHandlerTest {
|
---|
12 | /**
|
---|
13 | * Unit test for {@link BugReportExceptionHandler#handleException} method.
|
---|
14 | * @throws InterruptedException if the current thread is interrupted while waiting
|
---|
15 | */
|
---|
16 | @Test
|
---|
17 | void testHandleException() throws InterruptedException {
|
---|
18 | CountDownLatch latch = new CountDownLatch(1);
|
---|
19 | BugReportQueue.getInstance().addBugReportHandler(e -> {
|
---|
20 | latch.countDown(); return false;
|
---|
21 | });
|
---|
22 | BugReportExceptionHandler.handleException(new Exception("testHandleException"));
|
---|
23 | latch.await();
|
---|
24 | }
|
---|
25 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.