File tree Expand file tree Collapse file tree
app/src/test/kotlin/com/vrem/util Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -44,6 +44,38 @@ class StringUtilsTest {
4444 assertThat(actual).isEqualTo(expected)
4545 }
4646
47+ @Test
48+ fun titlecaseFirst () {
49+ // setup
50+ val expected = " Value"
51+ val value = " value"
52+ // execute
53+ val actual: String = value.titlecaseFirst(Locale .US )
54+ // verify
55+ assertThat(actual).isEqualTo(expected)
56+ }
57+
58+ @Test
59+ fun titlecaseFirstWithEmptyString () {
60+ // setup
61+ val value = " "
62+ // execute
63+ val actual: String = value.titlecaseFirst(Locale .US )
64+ // verify
65+ assertThat(actual).isEmpty()
66+ }
67+
68+ @Test
69+ fun titlecaseFirstWithAlreadyTitlecase () {
70+ // setup
71+ val expected = " Value"
72+ val value = " Value"
73+ // execute
74+ val actual: String = value.titlecaseFirst(Locale .US )
75+ // verify
76+ assertThat(actual).isEqualTo(expected)
77+ }
78+
4779 @Test
4880 fun nullToEmptyWhenNull () {
4981 // setup
You can’t perform that action at this time.
0 commit comments