Line | |
---|
1 | // License: GPL. For details, see LICENSE file.
|
---|
2 | package org.openstreetmap.josm.data.osm;
|
---|
3 |
|
---|
4 | import static org.junit.jupiter.api.Assertions.assertEquals;
|
---|
5 | import static org.junit.jupiter.api.Assertions.assertNull;
|
---|
6 |
|
---|
7 | import org.junit.jupiter.api.extension.RegisterExtension;
|
---|
8 | import org.junit.jupiter.api.Test;
|
---|
9 | import org.openstreetmap.josm.testutils.JOSMTestRules;
|
---|
10 |
|
---|
11 | import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
|
---|
12 |
|
---|
13 | /**
|
---|
14 | * Unit tests for class {@link DataIntegrityProblemException}.
|
---|
15 | */
|
---|
16 | class DataIntegrityProblemExceptionTest {
|
---|
17 |
|
---|
18 | /**
|
---|
19 | * Setup test.
|
---|
20 | */
|
---|
21 | @RegisterExtension
|
---|
22 | @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
|
---|
23 | public JOSMTestRules test = new JOSMTestRules();
|
---|
24 |
|
---|
25 | /**
|
---|
26 | * Unit test of {@link DataIntegrityProblemException} constructor.
|
---|
27 | */
|
---|
28 | @Test
|
---|
29 | void testDataIntegrityException() {
|
---|
30 | DataIntegrityProblemException e1 = new DataIntegrityProblemException("foo");
|
---|
31 | assertEquals("foo", e1.getMessage());
|
---|
32 | assertNull(e1.getHtmlMessage());
|
---|
33 | DataIntegrityProblemException e2 = new DataIntegrityProblemException("foo", "<html>bar</html>");
|
---|
34 | assertEquals("foo", e2.getMessage());
|
---|
35 | assertEquals("<html>bar</html>", e2.getHtmlMessage());
|
---|
36 | }
|
---|
37 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.