Changeset 14093 in josm for trunk/test/unit/org/openstreetmap
- Timestamp:
- 2018-08-05T21:43:31+02:00 (6 years ago)
- 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 16 16 import java.util.stream.Collectors; 17 17 18 import org.apache.commons.collections.MapUtils; 19 import org.apache.commons.lang.exception.ExceptionUtils; 18 import org.apache.commons.lang3.exception.ExceptionUtils; 20 19 import org.junit.Rule; 21 20 import org.junit.Test; … … 72 71 } 73 72 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); 77 76 String msg = Arrays.toString(invalidManifestEntries.entrySet().toArray()) + '\n' + 78 77 Arrays.toString(loadingExceptions.entrySet().toArray()) + '\n' + 79 78 Arrays.toString(layerExceptions.entrySet().toArray()); 80 79 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(", "))); 81 87 } 82 88 -
trunk/test/unit/org/openstreetmap/josm/tools/template_engine/TemplateParserTest.java
r13004 r14093 1 1 // License: GPL. For details, see LICENSE file. 2 2 package org.openstreetmap.josm.tools.template_engine; 3 4 import static org.junit.Assert.assertEquals; 3 5 4 6 import java.util.Arrays; … … 16 18 import org.openstreetmap.josm.data.osm.search.SearchParseError; 17 19 import org.openstreetmap.josm.testutils.DatasetFactory; 18 import org.unitils.reflectionassert.ReflectionAssert;19 20 20 21 /** … … 38 39 public void testEmpty() throws ParseError { 39 40 TemplateParser parser = new TemplateParser(""); 40 ReflectionAssert.assertReflectionEquals(new StaticText(""), parser.parse());41 assertEquals(new StaticText(""), parser.parse()); 41 42 } 42 43 … … 48 49 public void testVariable() throws ParseError { 49 50 TemplateParser parser = new TemplateParser("abc{var}\\{ef\\$\\{g"); 50 ReflectionAssert.assertReflectionEquals(CompoundTemplateEntry.fromArray(new StaticText("abc"),51 assertEquals(CompoundTemplateEntry.fromArray(new StaticText("abc"), 51 52 new Variable("var"), new StaticText("{ef${g")), parser.parse()); 52 53 } … … 63 64 new Variable("name"), 64 65 new Variable("desc"))); 65 ReflectionAssert.assertReflectionEquals(condition, parser.parse());66 assertEquals(condition, parser.parse()); 66 67 } 67 68 … … 77 78 new Variable("name"), 78 79 new Variable("desc"))); 79 ReflectionAssert.assertReflectionEquals(condition, parser.parse());80 assertEquals(condition, parser.parse()); 80 81 } 81 82 … … 96 97 new SearchExpressionCondition(compile("admin_level = 4"), new StaticText("NUTS 2")), 97 98 new Variable("admin_level"))); 98 ReflectionAssert.assertReflectionEquals(condition, parser.parse()); 99 TemplateEntry parse = parser.parse(); 100 assertEquals(condition, parse); 99 101 } 100 102
Note:
See TracChangeset
for help on using the changeset viewer.