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); } }