Ignore:
Timestamp:
2014-08-04T00:34:17+02:00 (10 years ago)
Author:
Don-vip
Message:

code refactorization for non-regression tests

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

Legend:

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

    r7356 r7365  
    5555        Comparator<Relation> comparator = DefaultNameFormatter.getInstance().getRelationComparator();
    5656
    57         try (InputStream is = new FileInputStream(TestUtils.getTestDataRoot() + "regress/9632/data.osm.zip")) {
     57        try (InputStream is = new FileInputStream(TestUtils.getRegressionDataFile(9632, "data.osm.zip"))) {
    5858            DataSet ds = OsmReader.parseDataSet(Compression.ZIP.getUncompressedInputStream(is), null);
    5959
  • trunk/test/unit/org/openstreetmap/josm/gui/tagging/TaggingPresetReaderTest.java

    r7081 r7365  
    3232
    3333    /**
    34      * Gets path to test data directory for given ticketid.
    35      * @param ticketid
    36      * @return
    37      */
    38     protected static String getRegressionDataDir(int ticketid) {
    39         return TestUtils.getTestDataRoot() + "/regress/" + ticketid;
    40     }
    41 
    42     /**
    43      * Gets path to given file in test data directory for given ticketid.
    44      * @param ticketid
    45      * @param filename
    46      * @return
    47      */
    48     protected static String getRegressionDataFile(int ticketid, String filename) {
    49         return getRegressionDataDir(ticketid) + '/' + filename;
    50     }
    51 
    52     /**
    5334     * #8954 - last checkbox in the preset is not added
    5435     */
    5536    @Test
    5637    public void test8954() throws SAXException, IOException {
    57         String presetfile = getRegressionDataFile(8954, "preset.xml");
     38        String presetfile = TestUtils.getRegressionDataFile(8954, "preset.xml");
    5839        final Collection<TaggingPreset> presets = TaggingPresetReader.readAll(presetfile, false);
    5940        Assert.assertEquals("Number of preset items", 1, presets.size());
Note: See TracChangeset for help on using the changeset viewer.