Changeset 10937 in josm for trunk/test/functional/org


Ignore:
Timestamp:
2016-09-03T12:24:18+02:00 (8 years ago)
Author:
Don-vip
Message:

sonar - squid:S3658 - Unit tests should throw exceptions

Location:
trunk/test/functional/org/openstreetmap/josm/io
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/functional/org/openstreetmap/josm/io/MultiFetchServerObjectReaderTest.java

    r10758 r10937  
    66import static org.junit.Assert.assertNotNull;
    77import static org.junit.Assert.assertTrue;
    8 import static org.junit.Assert.fail;
    98
    109import java.io.File;
     
    4039import org.openstreetmap.josm.gui.progress.NullProgressMonitor;
    4140
     41/**
     42 * Unit tests of {@link MultiFetchServerObjectReader}.
     43 */
    4244public class MultiFetchServerObjectReaderTest {
    4345    private static Logger logger = Logger.getLogger(MultiFetchServerObjectReader.class.getName());
     
    138140    }
    139141
     142    /**
     143     * Setup test.
     144     * @throws Exception if an error occurs
     145     */
    140146    @BeforeClass
    141     public static void init() throws OsmTransferException {
     147    public static void init() throws Exception {
    142148        logger.info("initializing ...");
    143149        JOSMFixture.createFunctionalTestFixture().init();
     
    177183                w.footer();
    178184            }
    179         } catch (IOException e) {
    180             fail(MessageFormat.format("failed to open file ''{0}'' for writing", dataSetCacheOutputFile.toString()));
    181185        }
    182186    }
     
    200204    }
    201205
     206    /**
     207     * Test to multi-get 10 nodes.
     208     * @throws OsmTransferException if an error occurs
     209     */
    202210    @Test
    203211    public void testMultiGet10Nodes() throws OsmTransferException {
     
    217225    }
    218226
     227    /**
     228     * Test to multi-get 10 ways.
     229     * @throws OsmTransferException if an error occurs
     230     */
    219231    @Test
    220232    public void testMultiGet10Ways() throws OsmTransferException {
     
    235247    }
    236248
     249    /**
     250     * Test to multi-get 10 relations.
     251     * @throws OsmTransferException if an error occurs
     252     */
    237253    @Test
    238254    public void testMultiGet10Relations() throws OsmTransferException {
     
    253269    }
    254270
     271    /**
     272     * Test to multi-get 800 nodes.
     273     * @throws OsmTransferException if an error occurs
     274     */
    255275    @Test
    256276    public void testMultiGet800Nodes() throws OsmTransferException {
     
    270290    }
    271291
     292    /**
     293     * Test to multi-get non-existing node.
     294     * @throws OsmTransferException if an error occurs
     295     */
    272296    @Test
    273297    public void testMultiGetWithNonExistingNode() throws OsmTransferException {
  • trunk/test/functional/org/openstreetmap/josm/io/OsmServerBackreferenceReaderTest.java

    r10758 r10937  
    151151     * @throws OsmTransferException if something goes wrong
    152152     * @throws CyclicUploadDependencyException if a cyclic dependency is detected
     153     * @throws IOException if an I/O error occurs
    153154     */
    154155    @BeforeClass
    155     public static void setUpBeforeClass() throws OsmTransferException, CyclicUploadDependencyException {
     156    public static void setUpBeforeClass() throws OsmTransferException, CyclicUploadDependencyException, IOException {
    156157        logger.info("initializing ...");
    157158
     
    196197                w.footer();
    197198            }
    198         } catch (IOException e) {
    199             fail(MessageFormat.format("failed to open file ''{0}'' for writing", dataSetCacheOutputFile.toString()));
    200199        }
    201200    }
     
    219218    }
    220219
     220    /**
     221     * Test reading references for a node.
     222     * @throws OsmTransferException if an error occurs
     223     */
    221224    @Test
    222225    public void testBackreferenceForNode() throws OsmTransferException {
     
    272275    }
    273276
     277    /**
     278     * Test reading full references for a node.
     279     * @throws OsmTransferException if an error occurs
     280     */
    274281    @Test
    275282    public void testBackreferenceForNodeFull() throws OsmTransferException {
     
    316323    }
    317324
     325    /**
     326     * Test reading references for a way.
     327     * @throws OsmTransferException if an error occurs
     328     */
    318329    @Test
    319330    public void testBackreferenceForWay() throws OsmTransferException {
     
    356367    }
    357368
     369    /**
     370     * Test reading full references for a way.
     371     * @throws OsmTransferException if an error occurs
     372     */
    358373    @Test
    359374    public void testBackreferenceForWayFull() throws OsmTransferException {
     
    390405    }
    391406
     407    /**
     408     * Test reading references for a relation.
     409     * @throws OsmTransferException if an error occurs
     410     */
    392411    @Test
    393412    public void testBackreferenceForRelation() throws OsmTransferException {
     
    505524    }
    506525
     526    /**
     527     * Test reading full references for a relation.
     528     * @throws OsmTransferException if an error occurs
     529     */
    507530    @Test
    508531    public void testBackreferenceForRelationFull() throws OsmTransferException {
Note: See TracChangeset for help on using the changeset viewer.