Last change
on this file since 11241 was 10962, checked in by Don-vip, 8 years ago |
improve unit tests
|
-
Property svn:eol-style
set to
native
|
File size:
1.2 KB
|
Line | |
---|
1 | // License: GPL. For details, see LICENSE file.
|
---|
2 | package org.openstreetmap.josm.gui.io;
|
---|
3 |
|
---|
4 | import static org.junit.Assert.assertNotNull;
|
---|
5 |
|
---|
6 | import org.junit.Rule;
|
---|
7 | import org.junit.Test;
|
---|
8 | import org.openstreetmap.josm.data.osm.DataSet;
|
---|
9 | import org.openstreetmap.josm.gui.layer.OsmDataLayer;
|
---|
10 | import org.openstreetmap.josm.testutils.JOSMTestRules;
|
---|
11 |
|
---|
12 | import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
|
---|
13 |
|
---|
14 | /**
|
---|
15 | * Unit tests of {@link SaveLayerTask} class.
|
---|
16 | */
|
---|
17 | public class SaveLayerTaskTest {
|
---|
18 | /**
|
---|
19 | * Setup test.
|
---|
20 | */
|
---|
21 | @Rule
|
---|
22 | @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
|
---|
23 | public JOSMTestRules test = new JOSMTestRules();
|
---|
24 |
|
---|
25 | /**
|
---|
26 | * Test of {@link SaveLayerTask} class - null case.
|
---|
27 | */
|
---|
28 | @Test(expected = IllegalArgumentException.class)
|
---|
29 | @SuppressFBWarnings(value = "NP_NULL_PARAM_DEREF_NONVIRTUAL")
|
---|
30 | public void testSaveLayerTaskNull() {
|
---|
31 | new SaveLayerTask(null, null);
|
---|
32 | }
|
---|
33 |
|
---|
34 | /**
|
---|
35 | * Test of {@link SaveLayerTask} class - nominal case.
|
---|
36 | */
|
---|
37 | @Test
|
---|
38 | public void testSaveLayerTaskNominal() {
|
---|
39 | assertNotNull(new SaveLayerTask(new SaveLayerInfo(new OsmDataLayer(new DataSet(), "", null)), null));
|
---|
40 | }
|
---|
41 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.