From 996e582a854f01c031a811fcd8685b9a5a8a00ca Mon Sep 17 00:00:00 2001 From: rob bygrave Date: Fri, 29 Nov 2019 21:03:44 +1300 Subject: [PATCH] No effective change - add simple UnderscoreNamingConvention tests --- .../config/UnderscoreNamingConventionTest.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/test/java/io/ebean/config/UnderscoreNamingConventionTest.java b/src/test/java/io/ebean/config/UnderscoreNamingConventionTest.java index 402567430..a1574ebed 100644 --- a/src/test/java/io/ebean/config/UnderscoreNamingConventionTest.java +++ b/src/test/java/io/ebean/config/UnderscoreNamingConventionTest.java @@ -29,6 +29,19 @@ public class UnderscoreNamingConventionTest { assertThat(namingConvention.toCamelFromUnderscore(col)).isEqualTo("helloThereId"); } + @Test + public void with_suffix_ID() { + String col = namingConvention.getColumnFromProperty(null, "helloID"); + assertThat(col).isEqualTo("hello_id"); + + assertThat(namingConvention.toCamelFromUnderscore(col)).isEqualTo("helloId"); + + col = namingConvention.getColumnFromProperty(null, "helloThereID"); + assertThat(col).isEqualTo("hello_there_id"); + + assertThat(namingConvention.toCamelFromUnderscore(col)).isEqualTo("helloThereId"); + } + @Test public void getColumnFromProperty() {