@Test public void shouldCreateCountLookupMethodNames() { assertEquals("countSampleLookupMethod", LookupName.lookupCountMethod("Sample lookup Method")); assertEquals("countSampleLookupMethod", LookupName.lookupCountMethod("SampleLookup Method")); assertEquals("countSampleLookupMethod", LookupName.lookupCountMethod("sample lookup method")); assertEquals("countSample", LookupName.lookupCountMethod("Sample")); assertEquals("countSample", LookupName.lookupCountMethod("sample")); }
public static String lookupCountMethod(String lookupNameOrMethodName) { return "count" + StringUtils.capitalize(lookupMethod(lookupNameOrMethodName)); }
LookupName { public static String lookupCountMethod(String lookupNameOrMethodName) { return "count" + StringUtils.capitalize(lookupMethod(lookupNameOrMethodName)); } }
LookupName { public static String lookupCountMethod(String lookupNameOrMethodName) { return "count" + StringUtils.capitalize(lookupMethod(lookupNameOrMethodName)); } private  LookupName(); }
LookupName { public static String lookupCountMethod(String lookupNameOrMethodName) { return "count" + StringUtils.capitalize(lookupMethod(lookupNameOrMethodName)); } private  LookupName(); static String lookupMethod(String lookupName); static String lookupCountMethod(String lookupNameOrMethodName); static String buildLookupFieldName(String fieldName, String relatedFieldName); static String getRelatedFieldName(String lookupFieldName); static String getFieldName(String lookupFieldName); }
LookupName { public static String lookupCountMethod(String lookupNameOrMethodName) { return "count" + StringUtils.capitalize(lookupMethod(lookupNameOrMethodName)); } private  LookupName(); static String lookupMethod(String lookupName); static String lookupCountMethod(String lookupNameOrMethodName); static String buildLookupFieldName(String fieldName, String relatedFieldName); static String getRelatedFieldName(String lookupFieldName); static String getFieldName(String lookupFieldName);  }