Changeset 17613 in josm for trunk/test


Ignore:
Timestamp:
2021-03-21T09:23:34+01:00 (3 years ago)
Author:
simon04
Message:

fix #14124 - Add MapCSS function title

Returns a title-cased version of the string where words start with an uppercase character and the remaining characters are lowercase.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/gui/mappaint/mapcss/FunctionsTest.java

    r17275 r17613  
    33
    44import static org.junit.jupiter.api.Assertions.assertEquals;
     5import static org.junit.jupiter.api.Assertions.assertNull;
    56import static org.junit.jupiter.api.Assertions.assertTrue;
    67import static org.openstreetmap.josm.data.osm.OsmPrimitiveType.NODE;
     
    5455            return new Environment(osm);
    5556        }
     57    }
     58
     59    /**
     60     * Unit test of {@link Functions#title}.
     61     */
     62    @Test
     63    void testTitle() {
     64        assertNull(Functions.title(null));
     65        assertEquals("", Functions.title(""));
     66        assertEquals("I Am Fine", Functions.title("i am FINE"));
    5667    }
    5768
Note: See TracChangeset for help on using the changeset viewer.