Changeset 11033 in josm for trunk/test/unit


Ignore:
Timestamp:
2016-09-20T12:28:48+02:00 (8 years ago)
Author:
simon04
Message:

fix #13663 - Two data layers with the same name

Counting starts from 1 again in an saved session file.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/gui/layer/OsmDataLayerTest.java

    r10950 r11033  
    1010import java.io.File;
    1111
     12import org.fest.assertions.Assertions;
    1213import org.junit.BeforeClass;
    1314import org.junit.Test;
     
    254255        assertTrue(layer.checkSaveConditions());
    255256    }
     257
     258    @Test
     259    public void testLayerNameIncreases() throws Exception {
     260        final OsmDataLayer layer1 = new OsmDataLayer(new DataSet(), OsmDataLayer.createLayerName(147), null);
     261        final OsmDataLayer layer2 = new OsmDataLayer(new DataSet(), OsmDataLayer.createNewName(), null);
     262        assertEquals("Data Layer 147", layer1.getName());
     263        assertEquals("Data Layer 148", layer2.getName());
     264    }
    256265}
Note: See TracChangeset for help on using the changeset viewer.