Changeset 4074 in josm for trunk/test/unit/org/openstreetmap
- Timestamp:
- 2011-05-05T20:49:14+02:00 (14 years ago)
- Location:
- trunk/test/unit/org/openstreetmap/josm/gui/mappaint
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/gui/mappaint/MapCSSWithExtendedTextDirectivesTest.groovy
r4069 r4074 1 1 // License: GPL. For details, see LICENSE file. 2 2 package org.openstreetmap.josm.gui.mappaint 3 4 3 import java.awt.Color 5 4 … … 8 7 import org.openstreetmap.josm.gui.mappaint.LabelCompositionStrategy.DeriveLabelFromNameTagsCompositionStrategy 9 8 import org.openstreetmap.josm.gui.mappaint.LabelCompositionStrategy.TagLookupCompositionStrategy 9 import org.openstreetmap.josm.gui.mappaint.MapPaintStyles.TagKeyReference 10 10 class MapCSSWithExtendedTextDirectivesTest { 11 11 … … 21 21 c.put("text", new Keyword("auto")) 22 22 23 TextElement te = TextElement.create(c, Color.WHITE )23 TextElement te = TextElement.create(c, Color.WHITE, false /* no default annotate */) 24 24 assert te.labelCompositionStrategy != null 25 25 assert te.labelCompositionStrategy instanceof DeriveLabelFromNameTagsCompositionStrategy … … 29 29 public void createTextElementComposingTextFromTag() { 30 30 Cascade c = new Cascade() 31 c.put("text", "my_name")31 c.put("text", new TagKeyReference("my_name")) 32 32 33 TextElement te = TextElement.create(c, Color.WHITE) 34 assert te.labelCompositionStrategy != null 35 assert te.labelCompositionStrategy instanceof TagLookupCompositionStrategy 36 assert te.labelCompositionStrategy.getDefaultLabelTag() == "my_name" 37 } 38 39 @Test 40 public void createTextElementComposingTextFromTag_2() { 41 Cascade c = new Cascade() 42 c.put("text", new Keyword("my_name")) 43 44 TextElement te = TextElement.create(c, Color.WHITE) 33 TextElement te = TextElement.create(c, Color.WHITE, false /* no default annotate */) 45 34 assert te.labelCompositionStrategy != null 46 35 assert te.labelCompositionStrategy instanceof TagLookupCompositionStrategy … … 52 41 Cascade c = new Cascade() 53 42 54 TextElement te = TextElement.create(c, Color.WHITE )43 TextElement te = TextElement.create(c, Color.WHITE, false /* no default annotate */) 55 44 assert te.labelCompositionStrategy == null 56 45 } -
trunk/test/unit/org/openstreetmap/josm/gui/mappaint/mapcss/KeyConditionTest.groovy
r4069 r4074 101 101 } 102 102 } 103 -
trunk/test/unit/org/openstreetmap/josm/gui/mappaint/mapcss/KeyValueConditionTest.groovy
r4069 r4074 90 90 91 91 } 92 -
trunk/test/unit/org/openstreetmap/josm/gui/mappaint/mapcss/ParsingLinkSelectorTest.groovy
r4069 r4074 56 56 } 57 57 } 58
Note:
See TracChangeset
for help on using the changeset viewer.