Ignore:
Timestamp:
2015-07-27T14:52:11+02:00 (9 years ago)
Author:
floscher
Message:

Don't throw an exception in MapillaryImportedImage.getImage() when file==null

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/mapillary/test/unit/org/openstreetmap/josm/plugins/mapillary/ImportedImageTest.java

    r31348 r31410  
    11package org.openstreetmap.josm.plugins.mapillary;
    22
     3import static org.junit.Assert.assertEquals;
     4
     5import java.io.File;
    36import java.io.IOException;
     7
     8import javax.imageio.IIOException;
    49
    510import org.junit.Before;
     
    1318    }
    1419
    15     @Test(expected=IllegalArgumentException.class)
    16     public void testNullFile() throws IOException {
     20    @Test(expected=IIOException.class)
     21    public void testInvalidFiles() throws IOException {
    1722        MapillaryImportedImage img = new MapillaryImportedImage(0,0,0, null);
     23        assertEquals(null, img.getImage());
     24        assertEquals(null, img.getFile());
     25
     26        img = new MapillaryImportedImage(0, 0, 0, new File(""));
     27        assertEquals(new File(""), img.getFile());
    1828        img.getImage();
    1929    }
Note: See TracChangeset for help on using the changeset viewer.