@@ -646,12 +646,12 @@ if (true) {
646646 val responseBodyTypes = listOf (" none" , " text" , " document" , " multipart" )
647647 for (responseBodyNum in responseBodyTypes.indices) {
648648 val responseBodyType = responseBodyTypes[responseBodyNum]
649- val responseBody = responseBodyType.capitalize()
649+ val responseBody = responseBodyType.replaceFirstChar {it.uppercase()}
650650
651651 val requestBodyTypes = listOf (" none" , " urlencoded" , " multipart" )
652652 for (requestBodyNum in requestBodyTypes.indices) {
653653 val requestBodyType = requestBodyTypes[requestBodyNum]
654- val requestBody = requestBodyType.capitalize()
654+ val requestBody = requestBodyType.replaceFirstChar {it.uppercase()}
655655 val modExtension = modExtensions[(responseBodyNum + requestBodyNum) % modExtensions.size]
656656
657657 val requestParams =
@@ -697,7 +697,7 @@ if (true) {
697697 val testBaseEnd = " For$responseBody "
698698
699699 val testBundle = testBaseStart+ testBaseEnd
700- val bundleTested = testBundle.capitalize() + " Bundle"
700+ val bundleTested = testBundle.replaceFirstChar {it.uppercase()} + " Bundle"
701701 val bundleTester = bundleTested+ " Test"
702702 val bundleJSONPath = " $jsonPath$testBundle /"
703703 val bundleFilename = bundleJSONPath+ " service.json"
@@ -775,7 +775,7 @@ if (true) {
775775 " name" to " param1" , " datatype" to atomicCurr,
776776 " multiple" to testMultiple, " nullable" to testNullable
777777 ))
778- val testName = testBaseStart+ atomicCurr.capitalize() + testBaseEnd+ testNum
778+ val testName = testBaseStart+ atomicCurr.replaceFirstChar {it.uppercase()} + testBaseEnd+ testNum
779779 val testdef =
780780 if (responseReturnValue == = null ) mapOf (
781781 " functionName" to testName, " params" to funcParams
@@ -939,7 +939,7 @@ if (true) {
939939 " multiple" to testMultiple, " nullable" to testNullable
940940 ))
941941 val testMax = 2
942- val docTestName = testBaseStart+ docCurr.capitalize() + testBaseEnd+ (testNum * testMax)
942+ val docTestName = testBaseStart+ docCurr.replaceFirstChar {it.uppercase()} + testBaseEnd+ (testNum * testMax)
943943 val docTestdef =
944944 if (responseReturnValue == = null ) mapOf (
945945 " functionName" to docTestName, " params" to docFuncParams
@@ -955,7 +955,7 @@ if (true) {
955955 mapOf (" name" to " param3" , " datatype" to atomic2)
956956 )
957957
958- val testName = testBaseStart+ docCurr.capitalize() + testBaseEnd+ ((testNum * testMax) + j - 1 )
958+ val testName = testBaseStart+ docCurr.replaceFirstChar {it.uppercase()} + testBaseEnd+ ((testNum * testMax) + j - 1 )
959959 val testdef1 = replaceFuncName(docTestdef, testName)
960960 val testdef2 =
961961 if (j < testMax) testdef1
@@ -1089,7 +1089,7 @@ if (true) {
10891089 val funcReturn = mapOf (
10901090 " datatype" to atomicCurr, " nullable" to testNullable
10911091 )
1092- val testName = testBaseStart+ testBaseEnd+ atomicCurr.capitalize() + testNum
1092+ val testName = testBaseStart+ testBaseEnd+ atomicCurr.replaceFirstChar {it.uppercase()} + testNum
10931093 val testdef =
10941094 if (requestParams == = null ) mapOf (
10951095 " functionName" to testName, " return" to funcReturn
@@ -1211,7 +1211,7 @@ if (true) {
12111211 " datatype" to docCurr,
12121212 " multiple" to testMultiple, " nullable" to testNullable
12131213 )
1214- val testName = testBaseStart+ testBaseEnd+ docCurr.capitalize() + testNum
1214+ val testName = testBaseStart+ testBaseEnd+ docCurr.replaceFirstChar {it.uppercase()} + testNum
12151215 val testdef =
12161216 if (requestParams == = null ) mapOf (
12171217 " functionName" to testName, " return" to funcReturn
@@ -1305,7 +1305,7 @@ if (true) {
13051305 " datatype" to docCurr,
13061306 " multiple" to testMultiple, " nullable" to testNullable
13071307 )
1308- val testName = testBaseStart + testBaseEnd + docCurr.capitalize() + testNum
1308+ val testName = testBaseStart + testBaseEnd + docCurr.replaceFirstChar {it.uppercase()} + testNum
13091309 val testdef =
13101310 if (requestParams == = null ) mapOf (
13111311 " functionName" to testName, " return" to funcReturn
@@ -1421,7 +1421,7 @@ if (true) {
14211421if (true ) {
14221422 val atomicMappingConstructors = getAtomicMappingConstructors()
14231423 val atomicMappingBundle = " mapAtomics"
1424- val atomicMappingBundleTested = atomicMappingBundle.capitalize() + " Bundle"
1424+ val atomicMappingBundleTested = atomicMappingBundle.replaceFirstChar {it.uppercase()} + " Bundle"
14251425 val atomicMappingBundleTester = atomicMappingBundleTested+ " Test"
14261426 val atomicMappingBundleJSONPath = " $jsonPath$atomicMappingBundle /"
14271427 val atomicMappingBundleFilename = atomicMappingBundleJSONPath+ " service.json"
@@ -1438,12 +1438,12 @@ if (true) {
14381438 val atomicMappingDatatypes = atomicMappingConstructors.keys.toTypedArray()
14391439 for (datatypeNum in atomicMappingDatatypes.indices) {
14401440 val datatype = atomicMappingDatatypes[datatypeNum]
1441- val testBaseStart = atomicMappingBundle+ datatype.capitalize()
1441+ val testBaseStart = atomicMappingBundle+ datatype.replaceFirstChar {it.uppercase()}
14421442 val datatypeConstructors = atomicMappingConstructors[datatype] as Map <String ,String >
14431443 val modExtension = modExtensions[datatypeNum % modExtensions.size]
14441444 for (mappedType in datatypeConstructors.keys) {
1445- // mappedType.capitalize() .replace('.', '_')
1446- val testMapped = mappedType.split(' .' ).joinToString(" " ) { word -> word.capitalize() }
1445+ // mappedType.replaceFirstChar {it.uppercase()} .replace('.', '_')
1446+ val testMapped = mappedType.split(' .' ).joinToString(" " ) { word -> word.replaceFirstChar {it.uppercase()} }
14471447 val mappedConstructor = datatypeConstructors[mappedType] as String
14481448 val typeConstructors = mapOf (datatype to mappedConstructor)
14491449 for (testNum in allTestTypes.indices) {
@@ -1511,7 +1511,7 @@ if (true) {
15111511if (true ) {
15121512 val documentMappingConstructors = getDocumentMappingConstructors()
15131513 val documentMappingBundle = " mapDocuments"
1514- val documentMappingBundleTested = documentMappingBundle.capitalize() + " Bundle"
1514+ val documentMappingBundleTested = documentMappingBundle.replaceFirstChar {it.uppercase()} + " Bundle"
15151515 val documentMappingBundleTester = documentMappingBundleTested+ " Test"
15161516 val documentMappingBundleJSONPath = " $jsonPath$documentMappingBundle /"
15171517 val documentMappingBundleFilename = documentMappingBundleJSONPath+ " service.json"
@@ -1528,11 +1528,11 @@ if (true) {
15281528 val documentMappedDatatypes = documentMappingConstructors.keys.toTypedArray()
15291529 for (datatypeNum in documentMappedDatatypes.indices) {
15301530 val datatype = documentMappedDatatypes[datatypeNum]
1531- val testBaseStart = documentMappingBundle+ datatype.capitalize()
1531+ val testBaseStart = documentMappingBundle+ datatype.replaceFirstChar {it.uppercase()}
15321532 val datatypeConstructors = documentMappingConstructors[datatype] as Map <String ,String >
15331533 val modExtension = modExtensions[datatypeNum % modExtensions.size]
15341534 for (mappedType in datatypeConstructors.keys) {
1535- val testMapped = mappedType.split(' .' ).joinToString(" " ) { word -> word.capitalize() }
1535+ val testMapped = mappedType.split(' .' ).joinToString(" " ) { word -> word.replaceFirstChar {it.uppercase()} }
15361536 val mappedConstructor = datatypeConstructors[mappedType] as String
15371537 val typeConstructors = mapOf (datatype to mappedConstructor)
15381538 for (testNum in allTestTypes.indices) {
@@ -1662,8 +1662,8 @@ if (true) {
16621662 )
16631663 val moduleInitTestString = serializer.writeValueAsString(moduleInitTestdef)
16641664 for (modExtension in modExtensions) {
1665- val moduleInitBundle = " moduleInit" + modExtension.capitalize()
1666- val moduleInitBundleTested = moduleInitBundle.capitalize() + " Bundle"
1665+ val moduleInitBundle = " moduleInit" + modExtension.replaceFirstChar {it.uppercase()}
1666+ val moduleInitBundleTested = moduleInitBundle.replaceFirstChar {it.uppercase()} + " Bundle"
16671667 val moduleInitBundleTester = moduleInitBundleTested+ " Test"
16681668 val moduleInitBundleJSONPath = " $jsonPath$moduleInitBundle /"
16691669 val moduleInitBundleFilename = moduleInitBundleJSONPath+ " service.json"
0 commit comments