Changeset 11911 in josm


Ignore:
Timestamp:
2017-04-15T01:02:22+02:00 (5 months ago)
Author:
Don-vip
Message:

fix unit test conflict

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/data/osm/UserTest.java

    r11909 r11911  
    2929    @Test
    3030    public void testCreateOsmUser() {
    31         User user1 = User.createOsmUser(1, "name1");
    32         assertEquals(1, user1.getId());
    33         assertEquals("name1", user1.getName());
    34         User user2 = User.createOsmUser(1, "name2");
    35         assertSame(user1, user2);
    36         assertEquals(1, user2.getId());
    37         assertEquals("name2", user2.getName());
    38         assertEquals(2, user2.getNames().size());
    39         assertTrue(user2.getNames().contains("name1"));
    40         assertTrue(user2.getNames().contains("name2"));
     31        try {
     32            User user1 = User.createOsmUser(1, "name1");
     33            assertEquals(1, user1.getId());
     34            assertEquals("name1", user1.getName());
     35            User user2 = User.createOsmUser(1, "name2");
     36            assertSame(user1, user2);
     37            assertEquals(1, user2.getId());
     38            assertEquals("name2", user2.getName());
     39            assertEquals(2, user2.getNames().size());
     40            assertTrue(user2.getNames().contains("name1"));
     41            assertTrue(user2.getNames().contains("name2"));
     42        } finally {
     43            User.clearUserMap();
     44        }
    4145    }
    4246}
Note: See TracChangeset for help on using the changeset viewer.