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:
779 bytes
|
Line | |
---|
1 | // License: GPL. For details, see LICENSE file.
|
---|
2 | package org.openstreetmap.josm.io;
|
---|
3 |
|
---|
4 | import static org.junit.jupiter.api.Assertions.assertFalse;
|
---|
5 | import static org.junit.jupiter.api.Assertions.assertTrue;
|
---|
6 |
|
---|
7 | import org.junit.jupiter.api.Test;
|
---|
8 | import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
|
---|
9 |
|
---|
10 | /**
|
---|
11 | * Unit tests of {@link OsmApiException} class.
|
---|
12 | */
|
---|
13 | @BasicPreferences
|
---|
14 | class OsmApiExceptionTest {
|
---|
15 | /**
|
---|
16 | * Non-regression test for <a href="https://josm.openstreetmap.de/ticket/17328">Bug #17328</a>.
|
---|
17 | */
|
---|
18 | @Test
|
---|
19 | void testTicket17328() {
|
---|
20 | assertFalse(new OsmApiException(503, "foo", "bar").isHtml());
|
---|
21 | assertTrue(new OsmApiException(503, null, "<h2>This website is under heavy load (queue full)</h2><p>Sorry...</p>").isHtml());
|
---|
22 | }
|
---|
23 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.