Changeset 8863 in josm for trunk/test/unit/org/openstreetmap/josm/gui/tagging/presets/TaggingPresetReaderTest.java
- Timestamp:
- 2015-10-12T22:58:25+02:00 (9 years ago)
- Location:
- trunk/test/unit/org/openstreetmap/josm/gui/tagging/presets
- Files:
-
- 1 added
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/gui/tagging/presets/TaggingPresetReaderTest.java
r8862 r8863 1 1 // License: GPL. For details, see LICENSE file. 2 package org.openstreetmap.josm.gui.tagging ;2 package org.openstreetmap.josm.gui.tagging.presets; 3 3 4 4 import static org.CustomMatchers.hasSize; … … 15 15 import org.openstreetmap.josm.JOSMFixture; 16 16 import org.openstreetmap.josm.TestUtils; 17 import org.openstreetmap.josm.gui.tagging.presets.items.Check; 18 import org.openstreetmap.josm.gui.tagging.presets.items.Key; 17 19 import org.openstreetmap.josm.tools.Utils; 18 20 import org.xml.sax.SAXException; … … 33 35 /** 34 36 * #8954 - last checkbox in the preset is not added 37 * @throws SAXException if any XML error occurs 38 * @throws IOException if any I/O error occurs 35 39 */ 36 40 @Test … … 42 46 Assert.assertEquals("Number of entries", 1, preset.data.size()); 43 47 final TaggingPresetItem item = preset.data.get(0); 44 Assert.assertTrue("Entry is not checkbox", item instanceof TaggingPresetItems.Check);48 Assert.assertTrue("Entry is not checkbox", item instanceof Check); 45 49 } 46 50 51 /** 52 * Test nested chunks 53 * @throws SAXException if any XML error occurs 54 * @throws IOException if any I/O error occurs 55 */ 47 56 @Test 48 public void testNestedChunks() throws Exception {57 public void testNestedChunks() throws SAXException, IOException { 49 58 final Collection<TaggingPreset> presets = TaggingPresetReader.readAll(TestUtils.getTestDataRoot() + "preset_chunk.xml", true); 50 59 assertThat(presets, hasSize(1)); … … 53 62 @Override 54 63 public String apply(TaggingPresetItem x) { 55 return (( TaggingPresetItems.Key) x).key;64 return ((Key) x).key; 56 65 } 57 66 }); … … 62 71 * Validate internal presets 63 72 * See #9027 73 * @throws SAXException if any XML error occurs 74 * @throws IOException if any I/O error occurs 64 75 */ 65 76 @Test
Note:
See TracChangeset
for help on using the changeset viewer.