- Timestamp:
- 2007-07-20T17:21:38+02:00 (18 years ago)
- Location:
- test/unit/org/openstreetmap/josm/gui/tagging
- Files:
-
- 2 deleted
- 2 copied
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
test/unit/org/openstreetmap/josm/gui/tagging/TaggingPresetTest.java
r291 r294 1 package org.openstreetmap.josm.gui. annotation;1 package org.openstreetmap.josm.gui.tagging; 2 2 3 3 import java.io.ByteArrayInputStream; … … 11 11 import junit.framework.TestCase; 12 12 13 import org.openstreetmap.josm.gui.annotation.AnnotationPreset.Check; 14 import org.openstreetmap.josm.gui.annotation.AnnotationPreset.Combo; 15 import org.openstreetmap.josm.gui.annotation.AnnotationPreset.Key; 16 import org.openstreetmap.josm.gui.annotation.AnnotationPreset.Label; 17 import org.openstreetmap.josm.gui.annotation.AnnotationPreset.Text; 13 import org.openstreetmap.josm.gui.tagging.TaggingPreset; 14 import org.openstreetmap.josm.gui.tagging.TaggingPreset.Check; 15 import org.openstreetmap.josm.gui.tagging.TaggingPreset.Combo; 16 import org.openstreetmap.josm.gui.tagging.TaggingPreset.Key; 17 import org.openstreetmap.josm.gui.tagging.TaggingPreset.Label; 18 import org.openstreetmap.josm.gui.tagging.TaggingPreset.Text; 18 19 19 public class AnnotationPresetTest extends TestCase {20 public class TaggingPresetTest extends TestCase { 20 21 21 public void test AnnotationPresetLoads() throws Exception {22 InputStream in = getClass().getResourceAsStream(" annotation-test.xml");23 List< AnnotationPreset> all =AnnotationPreset.readAll(in);22 public void testTaggingPresetLoads() throws Exception { 23 InputStream in = getClass().getResourceAsStream("taggingpreset-test.xml"); 24 List<TaggingPreset> all = TaggingPreset.readAll(in); 24 25 25 26 assertEquals(1, all.size()); 26 AnnotationPreset a = all.get(0);27 TaggingPreset a = all.get(0); 27 28 assertEquals("Highway", a.getValue(Action.NAME)); 28 29 Field dataField = a.getClass().getDeclaredField("data"); … … 60 61 public void testIconLoadsFromClasspath() throws Exception { 61 62 String xml = "<annotations><item icon='logo'></item></annotations>"; 62 List< AnnotationPreset> all =AnnotationPreset.readAll(new ByteArrayInputStream(xml.getBytes()));63 List<TaggingPreset> all = TaggingPreset.readAll(new ByteArrayInputStream(xml.getBytes())); 63 64 64 65 assertEquals(1, all.size());
Note:
See TracChangeset
for help on using the changeset viewer.