Last change
on this file since 8881 was 8881, checked in by Don-vip, 9 years ago |
add unit test for plugin list download
|
File size:
1.1 KB
|
Line | |
---|
1 | // License: GPL. For details, see LICENSE file.
|
---|
2 | package org.openstreetmap.josm.plugins;
|
---|
3 |
|
---|
4 | import static org.junit.Assert.assertFalse;
|
---|
5 |
|
---|
6 | import java.util.List;
|
---|
7 |
|
---|
8 | import org.junit.BeforeClass;
|
---|
9 | import org.junit.Test;
|
---|
10 | import org.openstreetmap.josm.JOSMFixture;
|
---|
11 | import org.openstreetmap.josm.Main;
|
---|
12 |
|
---|
13 | /**
|
---|
14 | * Unit tests of {@link ReadRemotePluginInformationTask} class.
|
---|
15 | */
|
---|
16 | public class ReadRemotePluginInformationTaskTest {
|
---|
17 |
|
---|
18 | /**
|
---|
19 | * Setup test.
|
---|
20 | */
|
---|
21 | @BeforeClass
|
---|
22 | public static void setUp() {
|
---|
23 | JOSMFixture.createUnitTestFixture().init();
|
---|
24 | }
|
---|
25 |
|
---|
26 | /**
|
---|
27 | * Test of plugin list download.
|
---|
28 | */
|
---|
29 | @Test
|
---|
30 | public void testDownloadPluginList() {
|
---|
31 | ReadRemotePluginInformationTask pluginInfoDownloadTask = new ReadRemotePluginInformationTask(
|
---|
32 | Main.pref.getOnlinePluginSites());
|
---|
33 | pluginInfoDownloadTask.run();
|
---|
34 | List<PluginInformation> list = pluginInfoDownloadTask.getAvailablePlugins();
|
---|
35 | assertFalse(list.isEmpty());
|
---|
36 | PluginInformation info = list.get(0);
|
---|
37 | assertFalse(info.getName().isEmpty());
|
---|
38 | assertFalse(info.getClass().getName().isEmpty());
|
---|
39 | }
|
---|
40 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.