-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
ancap-kun
committed
Feb 18, 2023
1 parent
ce85459
commit 36a22a4
Showing
16 changed files
with
198 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,6 @@ | |
</parent> | ||
|
||
<artifactId>ConfigurationAPI</artifactId> | ||
<version>1.0</version> | ||
<version>1.0.1</version> | ||
|
||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
ConfigurationAPI/src/main/java/ru/ancap/framework/configuration/Case.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package ru.ancap.framework.configuration; | ||
|
||
public class Case { | ||
|
||
public static String camelToKebab(String str) { | ||
return str.replaceAll("([a-z])([A-Z]+)", "$1-$2").toLowerCase(); | ||
} | ||
|
||
} |
20 changes: 20 additions & 0 deletions
20
ConfigurationAPI/src/test/java/ru/ancap/framework/config/test/CaseTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package ru.ancap.framework.config.test; | ||
|
||
import org.junit.Test; | ||
import ru.ancap.framework.configuration.Case; | ||
|
||
import static org.junit.Assert.assertEquals; | ||
|
||
public class CaseTest { | ||
|
||
@Test | ||
public void testCase() { | ||
assertEquals("example-text-in-this-case", Case.camelToKebab("exampleTextInThisCase")); | ||
assertEquals("lowercase", Case.camelToKebab("lowercase")); | ||
assertEquals("uppercase", Case.camelToKebab("UPPERCASE")); | ||
assertEquals("example123in-this-case", Case.camelToKebab("example123InThisCase")); | ||
assertEquals("example!text@in-this#case", Case.camelToKebab("example!Text@InThis#Case")); | ||
assertEquals("foo-bar", Case.camelToKebab("FooBar")); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
set JAVA_HOME=C:\Program Files\BellSoft\LibericaJDK-19-Full | ||
call mvn clean install | ||
pause |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.