source: josm/trunk/test/unit/org/openstreetmap/josm/data/osm/DataIntegrityProblemExceptionTest.java@ 17442

Last change on this file since 17442 was 17275, checked in by Don-vip, 3 years ago

see #16567 - upgrade almost all tests to JUnit 5, except those depending on WiremockRule

See https://github.com/tomakehurst/wiremock/issues/684

  • Property svn:eol-style set to native
File size: 1.2 KB
Line 
1// License: GPL. For details, see LICENSE file.
2package org.openstreetmap.josm.data.osm;
3
4import static org.junit.jupiter.api.Assertions.assertEquals;
5import static org.junit.jupiter.api.Assertions.assertNull;
6
7import org.junit.jupiter.api.extension.RegisterExtension;
8import org.junit.jupiter.api.Test;
9import org.openstreetmap.josm.testutils.JOSMTestRules;
10
11import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
12
13/**
14 * Unit tests for class {@link DataIntegrityProblemException}.
15 */
16class 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.