Last change
on this file was 18870, checked in by taylor.smock, 6 months ago |
See #16567: Update to JUnit 5
This converts most tests to use @Annotations. There are also some performance
improvements as it relates to tests.
|
-
Property svn:eol-style
set to
native
|
File size:
1.1 KB
|
Line | |
---|
1 | // License: GPL. For details, see LICENSE file.
|
---|
2 | package org.openstreetmap.josm.gui.help;
|
---|
3 |
|
---|
4 | import static org.junit.jupiter.api.Assertions.assertFalse;
|
---|
5 | import static org.junit.jupiter.api.Assertions.assertThrows;
|
---|
6 |
|
---|
7 | import org.junit.jupiter.api.Test;
|
---|
8 | import org.junit.jupiter.api.Timeout;
|
---|
9 |
|
---|
10 | /**
|
---|
11 | * Unit tests of {@link HelpContentReader} class.
|
---|
12 | */
|
---|
13 | @Timeout(30)
|
---|
14 | class HelpContentReaderTest {
|
---|
15 | /**
|
---|
16 | * Unit test of {@link HelpContentReader#fetchHelpTopicContent} - null case.
|
---|
17 | */
|
---|
18 | @Test
|
---|
19 | void testFetchHelpTopicContentNull() {
|
---|
20 | assertThrows(HelpContentReaderException.class, () -> new HelpContentReader(null).fetchHelpTopicContent(null, false));
|
---|
21 | }
|
---|
22 |
|
---|
23 | /**
|
---|
24 | * Unit test of {@link HelpContentReader#fetchHelpTopicContent} - nominal case.
|
---|
25 | * @throws HelpContentReaderException never
|
---|
26 | */
|
---|
27 | @Test
|
---|
28 | void testFetchHelpTopicContentNominal() throws HelpContentReaderException {
|
---|
29 | String res = new HelpContentReader(HelpUtil.getWikiBaseUrl()).fetchHelpTopicContent(HelpBrowserTest.URL_1, false);
|
---|
30 | assertFalse(res.trim().isEmpty());
|
---|
31 | }
|
---|
32 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.