Skip to content

Commit

Permalink
Add more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mrapplexz committed Dec 28, 2019
1 parent 982be57 commit 75c30d2
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/commonTest/kotlin/net/pearx/kasechange/test/ComplexTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ package net.pearx.kasechange.test
import net.pearx.kasechange.*
import net.pearx.kasechange.formatter.CaseFormatterConfig
import net.pearx.kasechange.formatter.CaseFormatterConfigurable
import net.pearx.kasechange.splitter.WordSplitter
import net.pearx.kasechange.splitter.WordSplitterConfig
import kotlin.test.Test
import kotlin.test.assertEquals

Expand Down Expand Up @@ -63,7 +65,17 @@ class ComplexTest {
}

@Test
fun testMulti1() {
fun testCustom1() {
assertEquals("My**Xml**Request**V2**Updated", "MY XML-REQUEST.V2_UPDATED".toCase(CaseFormatterConfig(false, "**", wordCapitalize = true, firstWordCapitalize = true), universalWordSplitter(false)))
}

@Test
fun testCustom2() {
assertEquals("My**Xml**Request**V2**Updated", "MY_XML_REQUEST_V2_UPDATED".toCase(CaseFormatterConfig(false, "**", wordCapitalize = true, firstWordCapitalize = true), CaseFormat.UPPER_UNDERSCORE))
}

@Test
fun testCustom3() {
assertEquals("My**Xml**Request**V2**Updated", "my*xml*request*v2*updated".toCase(CaseFormatterConfig(false, "**", wordCapitalize = true, firstWordCapitalize = true), WordSplitterConfig(boundaries = setOf('*'))))
}
}

0 comments on commit 75c30d2

Please sign in to comment.