source: josm/trunk/test/unit/org/openstreetmap/josm/gui/io/SaveLayerTaskTest.java@ 17531

Last change on this file since 17531 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.3 KB
Line 
1// License: GPL. For details, see LICENSE file.
2package org.openstreetmap.josm.gui.io;
3
4import static org.junit.jupiter.api.Assertions.assertNotNull;
5import static org.junit.jupiter.api.Assertions.assertThrows;
6
7import org.junit.jupiter.api.Test;
8import org.junit.jupiter.api.extension.RegisterExtension;
9import org.openstreetmap.josm.data.osm.DataSet;
10import org.openstreetmap.josm.gui.layer.OsmDataLayer;
11import org.openstreetmap.josm.testutils.JOSMTestRules;
12
13import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
14
15/**
16 * Unit tests of {@link SaveLayerTask} class.
17 */
18class SaveLayerTaskTest {
19 /**
20 * Setup test.
21 */
22 @RegisterExtension
23 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
24 public JOSMTestRules test = new JOSMTestRules();
25
26 /**
27 * Test of {@link SaveLayerTask} class - null case.
28 */
29 @Test
30 @SuppressFBWarnings(value = "NP_NULL_PARAM_DEREF_NONVIRTUAL")
31 void testSaveLayerTaskNull() {
32 assertThrows(IllegalArgumentException.class, () -> new SaveLayerTask(null, null));
33 }
34
35 /**
36 * Test of {@link SaveLayerTask} class - nominal case.
37 */
38 @Test
39 void testSaveLayerTaskNominal() {
40 assertNotNull(new SaveLayerTask(new SaveLayerInfo(new OsmDataLayer(new DataSet(), "", null)), null));
41 }
42}
Note: See TracBrowser for help on using the repository browser.