Ignore:
Timestamp:
2015-10-14T23:35:44+02:00 (9 years ago)
Author:
Don-vip
Message:

cleanup unit tests

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

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/io/session/SessionReaderTest.java

    r8857 r8876  
    114114    }
    115115
     116    /**
     117     * Tests to read a .jos file containing Bing imagery.
     118     * @throws IOException if any I/O error occurs
     119     * @throws IllegalDataException is the test file is considered as invalid
     120     */
    116121    @Test
    117122    public void testReadImage() throws IOException, IllegalDataException {
  • trunk/test/unit/org/openstreetmap/josm/io/session/SessionWriterTest.java

    r8837 r8876  
    11// License: GPL. For details, see LICENSE file.
    22package org.openstreetmap.josm.io.session;
     3
     4import static org.junit.Assert.fail;
    35
    46import java.io.File;
     
    8587    }
    8688
    87     private void testWrite(List<Layer> layers, final boolean zip) throws IOException {
     89    private void testWrite(List<Layer> layers, final boolean zip) {
    8890        Map<Layer, SessionLayerExporter> exporters = new HashMap<>();
    8991        if (zip) {
     
    101103        try {
    102104            sw.write(file);
     105        } catch (IOException e) {
     106            e.printStackTrace();
     107            fail(e.getMessage());
    103108        } finally {
    104109            if (file.exists()) {
     
    135140    /**
    136141     * Tests to write an empty .jos file.
    137      * @throws IOException if any I/O error occurs
    138      */
    139     @Test
    140     public void testWriteEmptyJos() throws IOException {
     142     */
     143    @Test
     144    public void testWriteEmptyJos() {
    141145        testWrite(Collections.<Layer>emptyList(), false);
    142146    }
     
    144148    /**
    145149     * Tests to write an empty .joz file.
    146      * @throws IOException if any I/O error occurs
    147      */
    148     @Test
    149     public void testWriteEmptyJoz() throws IOException {
     150     */
     151    @Test
     152    public void testWriteEmptyJoz() {
    150153        testWrite(Collections.<Layer>emptyList(), true);
    151154    }
     
    153156    /**
    154157     * Tests to write a .jos file containing OSM data.
    155      * @throws IOException if any I/O error occurs
    156      */
    157     @Test
    158     public void testWriteOsmJos() throws IOException {
     158     */
     159    @Test
     160    public void testWriteOsmJos() {
    159161        testWrite(Collections.<Layer>singletonList(createOsmLayer()), false);
    160162    }
     
    162164    /**
    163165     * Tests to write a .joz file containing OSM data.
    164      * @throws IOException if any I/O error occurs
    165      */
    166     @Test
    167     public void testWriteOsmJoz() throws IOException {
     166     */
     167    @Test
     168    public void testWriteOsmJoz() {
    168169        testWrite(Collections.<Layer>singletonList(createOsmLayer()), true);
    169170    }
     
    171172    /**
    172173     * Tests to write a .jos file containing GPX data.
    173      * @throws IOException if any I/O error occurs
    174      */
    175     @Test
    176     public void testWriteGpxJos() throws IOException {
     174     */
     175    @Test
     176    public void testWriteGpxJos() {
    177177        testWrite(Collections.<Layer>singletonList(createGpxLayer()), false);
    178178    }
     
    180180    /**
    181181     * Tests to write a .joz file containing GPX data.
    182      * @throws IOException if any I/O error occurs
    183      */
    184     @Test
    185     public void testWriteGpxJoz() throws IOException {
     182     */
     183    @Test
     184    public void testWriteGpxJoz() {
    186185        testWrite(Collections.<Layer>singletonList(createGpxLayer()), true);
    187186    }
     
    189188    /**
    190189     * Tests to write a .joz file containing GPX and marker data.
    191      * @throws IOException if any I/O error occurs
    192      */
    193     @Test
    194     public void testWriteGpxAndMarkerJoz() throws IOException {
     190     */
     191    @Test
     192    public void testWriteGpxAndMarkerJoz() {
    195193        GpxLayer gpx = createGpxLayer();
    196194        testWrite(Arrays.asList(gpx, createMarkerLayer(gpx)), true);
     
    199197    /**
    200198     * Tests to write a .joz file containing an imagery layer.
    201      * @throws IOException if any I/O error occurs
    202      */
    203     @Test
    204     public void testWriteImageryLayer() throws IOException {
     199     */
     200    @Test
     201    public void testWriteImageryLayer() {
    205202        final Layer layer = createImageryLayer();
    206203        testWrite(Collections.singletonList(layer), true);
Note: See TracChangeset for help on using the changeset viewer.