Ignore:
Timestamp:
2018-08-05T21:43:31+02:00 (6 years ago)
Author:
Don-vip
Message:

drop unitils library. It was only added to avoid implementing hashCode/equals in template engine and search classes

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

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/plugins/PluginHandlerTestIT.java

    r13993 r14093  
    1616import java.util.stream.Collectors;
    1717
    18 import org.apache.commons.collections.MapUtils;
    19 import org.apache.commons.lang.exception.ExceptionUtils;
     18import org.apache.commons.lang3.exception.ExceptionUtils;
    2019import org.junit.Rule;
    2120import org.junit.Test;
     
    7271        }
    7372
    74         MapUtils.debugPrint(System.out, null, invalidManifestEntries);
    75         MapUtils.debugPrint(System.out, null, loadingExceptions);
    76         MapUtils.debugPrint(System.out, null, layerExceptions);
     73        debugPrint(invalidManifestEntries);
     74        debugPrint(loadingExceptions);
     75        debugPrint(layerExceptions);
    7776        String msg = Arrays.toString(invalidManifestEntries.entrySet().toArray()) + '\n' +
    7877                     Arrays.toString(loadingExceptions.entrySet().toArray()) + '\n' +
    7978                     Arrays.toString(layerExceptions.entrySet().toArray());
    8079        assertTrue(msg, invalidManifestEntries.isEmpty() && loadingExceptions.isEmpty() && layerExceptions.isEmpty());
     80    }
     81
     82    private static void debugPrint(Map<String, ?> invalidManifestEntries) {
     83        System.out.println(invalidManifestEntries.entrySet()
     84                .stream()
     85                .map(e -> e.getKey() + "=\"" + e.getValue() + "\"")
     86                .collect(Collectors.joining(", ")));
    8187    }
    8288
  • trunk/test/unit/org/openstreetmap/josm/tools/template_engine/TemplateParserTest.java

    r13004 r14093  
    11// License: GPL. For details, see LICENSE file.
    22package org.openstreetmap.josm.tools.template_engine;
     3
     4import static org.junit.Assert.assertEquals;
    35
    46import java.util.Arrays;
     
    1618import org.openstreetmap.josm.data.osm.search.SearchParseError;
    1719import org.openstreetmap.josm.testutils.DatasetFactory;
    18 import org.unitils.reflectionassert.ReflectionAssert;
    1920
    2021/**
     
    3839    public void testEmpty() throws ParseError {
    3940        TemplateParser parser = new TemplateParser("");
    40         ReflectionAssert.assertReflectionEquals(new StaticText(""), parser.parse());
     41        assertEquals(new StaticText(""), parser.parse());
    4142    }
    4243
     
    4849    public void testVariable() throws ParseError {
    4950        TemplateParser parser = new TemplateParser("abc{var}\\{ef\\$\\{g");
    50         ReflectionAssert.assertReflectionEquals(CompoundTemplateEntry.fromArray(new StaticText("abc"),
     51        assertEquals(CompoundTemplateEntry.fromArray(new StaticText("abc"),
    5152                new Variable("var"), new StaticText("{ef${g")), parser.parse());
    5253    }
     
    6364            new Variable("name"),
    6465            new Variable("desc")));
    65         ReflectionAssert.assertReflectionEquals(condition, parser.parse());
     66        assertEquals(condition, parser.parse());
    6667    }
    6768
     
    7778                new Variable("name"),
    7879                new Variable("desc")));
    79         ReflectionAssert.assertReflectionEquals(condition, parser.parse());
     80        assertEquals(condition, parser.parse());
    8081    }
    8182
     
    9697                new SearchExpressionCondition(compile("admin_level = 4"), new StaticText("NUTS 2")),
    9798                new Variable("admin_level")));
    98         ReflectionAssert.assertReflectionEquals(condition, parser.parse());
     99        TemplateEntry parse = parser.parse();
     100        assertEquals(condition, parse);
    99101    }
    100102
Note: See TracChangeset for help on using the changeset viewer.