Changeset 14093 in josm for trunk/test/unit/org/openstreetmap/josm/tools/template_engine/TemplateParserTest.java
- Timestamp:
- 2018-08-05T21:43:31+02:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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.
