source: josm/trunk/test/unit/org/openstreetmap/josm/tools/bugreport/BugReportExceptionHandlerTest.java@ 10103

Last change on this file since 10103 was 10067, checked in by Don-vip, 8 years ago

see #12652 - rework bug report classes to improve unit tests coverage

  • Property svn:eol-style set to native
File size: 1.3 KB
Line 
1// License: GPL. For details, see LICENSE file.
2package org.openstreetmap.josm.tools.bugreport;
3
4import static org.junit.Assert.assertFalse;
5import static org.junit.Assert.assertNotNull;
6
7import org.junit.Before;
8import org.junit.Test;
9import org.openstreetmap.josm.JOSMFixture;
10
11/**
12 * Unit tests of {@link BugReportExceptionHandler} class.
13 */
14public class BugReportExceptionHandlerTest {
15
16 /**
17 * Setup tests.
18 */
19 @Before
20 public void setUp() {
21 JOSMFixture.createUnitTestFixture().init(true);
22 }
23
24 /**
25 * Unit test for {@link BugReportExceptionHandler#buildPanel} method.
26 */
27 @Test
28 public void testBuildPanel() {
29 assertNotNull(BugReportExceptionHandler.buildPanel(new Exception("testBuildPanel")));
30 }
31
32 /**
33 * Unit test for {@link BugReportExceptionHandler.BugReporterThread#askForBugReport} method.
34 */
35 @Test
36 public void testAskForBugReport() {
37 BugReportExceptionHandler.BugReporterThread.askForBugReport(new Exception("testAskForBugReport"));
38 }
39
40 /**
41 * Unit test for {@link BugReportExceptionHandler#handleException} method.
42 */
43 @Test
44 public void testHandleException() {
45 BugReportExceptionHandler.handleException(new Exception("testHandleException"));
46 assertFalse(BugReportExceptionHandler.exceptionHandlingInProgress());
47 }
48}
Note: See TracBrowser for help on using the repository browser.