Changeset 17762 in josm for trunk/test/unit/org/openstreetmap/josm/gui/mappaint/mapcss/ConditionFactoryTest.java
- Timestamp:
- 2021-04-12T22:43:33+02:00 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/gui/mappaint/mapcss/ConditionFactoryTest.java
r17275 r17762 13 13 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; 14 14 import net.trajano.commons.testing.UtilityClassTestUtil; 15 16 import java.lang.reflect.Method; 15 17 16 18 /** … … 43 45 UtilityClassTestUtil.assertUtilityClassWellDefined(PseudoClasses.class); 44 46 } 47 48 /** 49 * Tests that all functions have been registered to {@link ConditionFactory.PseudoClassCondition#CONDITION_MAP} 50 */ 51 @Test 52 void testAllPseudoClassesRegistered() { 53 for (Method method : PseudoClasses.class.getDeclaredMethods()) { 54 String name = method.getName().replaceFirst("^_new$", "new"); 55 Context context = name.equals("sameTags") ? Context.LINK : Context.PRIMITIVE; 56 ConditionFactory.PseudoClassCondition.createPseudoClassCondition(name, false, context); 57 ConditionFactory.PseudoClassCondition.createPseudoClassCondition(name, true, context); 58 } 59 } 45 60 }
Note:
See TracChangeset
for help on using the changeset viewer.