source: josm/trunk/test/unit/org/openstreetmap/josm/io/JpgImporterTest.java@ 12287

Last change on this file since 12287 was 12287, checked in by Don-vip, 7 years ago

see #11166 - make SimplifyWayAction.simplifyWay static + fix javadoc

  • 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.io;
3
4import static org.junit.Assert.assertEquals;
5
6import java.io.File;
7import java.io.IOException;
8import java.util.ArrayList;
9import java.util.Arrays;
10import java.util.HashSet;
11import java.util.List;
12
13import org.junit.Rule;
14import org.junit.Test;
15import org.openstreetmap.josm.gui.progress.NullProgressMonitor;
16import org.openstreetmap.josm.testutils.JOSMTestRules;
17
18import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
19
20/**
21 * Unit tests of {@link JpgImporter} class.
22 */
23public class JpgImporterTest {
24
25 /**
26 * Setup test
27 */
28 @Rule
29 @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
30 public JOSMTestRules test = new JOSMTestRules();
31
32 /**
33 * Non-regression test for <a href="https://josm.openstreetmap.de/ticket/14868">Bug #14868</a>.
34 * @throws IOException if an error occurs
35 */
36 @Test
37 public void testTicket14868() throws IOException {
38 List<File> files = new ArrayList<>();
39 JpgImporter.addRecursiveFiles(files, new HashSet<>(), Arrays.asList(
40 new File("foo.jpg"), new File("foo.jpeg")
41 ), NullProgressMonitor.INSTANCE);
42 assertEquals(2, files.size());
43 assertEquals("foo.jpg", files.get(0).getName());
44 assertEquals("foo.jpeg", files.get(1).getName());
45 }
46}
Note: See TracBrowser for help on using the repository browser.