diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2013-08-03 15:06:46 +0200 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2013-08-03 15:06:46 +0200 |
commit | b5d6f23d8ac3d4bedb139fdaecc2e9dc621f385a (patch) | |
tree | ede2d0de570efcbb546fabcb2d5d050511792ae1 /container-compiler-plugin/src/test/java/io/trygvis/container/compiler/UtilsTest.java | |
parent | 34137b599dbea13c94224dff2955376b1394dbc9 (diff) | |
download | container-playground-b5d6f23d8ac3d4bedb139fdaecc2e9dc621f385a.tar.gz container-playground-b5d6f23d8ac3d4bedb139fdaecc2e9dc621f385a.tar.bz2 container-playground-b5d6f23d8ac3d4bedb139fdaecc2e9dc621f385a.tar.xz container-playground-b5d6f23d8ac3d4bedb139fdaecc2e9dc621f385a.zip |
wip
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.java | 25 |
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); + } +} |