summaryrefslogtreecommitdiff
path: root/container-compiler-plugin/src/test/java/io/trygvis/container/compiler/UtilsTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'container-compiler-plugin/src/test/java/io/trygvis/container/compiler/UtilsTest.java')
-rw-r--r--container-compiler-plugin/src/test/java/io/trygvis/container/compiler/UtilsTest.java25
1 files changed, 25 insertions, 0 deletions
diff --git a/container-compiler-plugin/src/test/java/io/trygvis/container/compiler/UtilsTest.java b/container-compiler-plugin/src/test/java/io/trygvis/container/compiler/UtilsTest.java
new file mode 100644
index 0000000..0dd1414
--- /dev/null
+++ b/container-compiler-plugin/src/test/java/io/trygvis/container/compiler/UtilsTest.java
@@ -0,0 +1,25 @@
+package io.trygvis.container.compiler;
+
+import org.testng.annotations.DataProvider;
+import org.testng.annotations.Test;
+
+import static io.trygvis.container.compiler.Utils.toFieldName;
+import static org.testng.Assert.assertEquals;
+
+public class UtilsTest {
+ @DataProvider(name = "toFieldName", parallel = true)
+ public static Object[][] SqlNameDataProvider() {
+ return new Object[][] {
+ new Object[]{"FooBar", "fooBar"},
+ new Object[]{"fooBar", "fooBar"},
+ new Object[]{"foo_bar", "fooBar"},
+ new Object[]{"_foo_bar", "fooBar"},
+ new Object[]{"foo_bar_", "fooBar"},
+ };
+ }
+
+ @Test(dataProvider = "toFieldName")
+ public void testToFieldName(String input, String output) {
+ assertEquals(toFieldName(input), output);
+ }
+}