Changeset 16019 in josm


Ignore:
Timestamp:
2020-03-03T23:54:01+01:00 (3 months ago)
Author:
Don-vip
Message:

see #18845 - fix unit test

File:
1 edited

Legend:

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

    r11899 r16019  
    3030    @Test
    3131    public void testGetAgentString() {
    32         String v = Version.getInstance().getAgentString(false);
    33         assertTrue(v, v.matches("JOSM/1\\.5 \\([1-9][0-9]* SVN en\\)"));
    34         v = Version.getInstance().getAgentString(true);
    35         assertTrue(v, v.matches("JOSM/1\\.5 \\([1-9][0-9]* SVN en\\).*"));
     32        Version version = new Version();
     33        version.initFromRevisionInfo(null);
     34        String v = version.getAgentString(false);
     35        assertTrue(v, v.matches("JOSM/1\\.5 \\(UNKNOWN en\\)"));
     36        v = version.getAgentString(true);
     37        assertTrue(v, v.matches("JOSM/1\\.5 \\(UNKNOWN en\\).*"));
    3638    }
    3739
Note: See TracChangeset for help on using the changeset viewer.