@Test public void shouldGenerateStringForMulitpleCategories() { String result = CategoryStringGenerator.getPostgresCategoryString(MULTI_CAT); assertEquals(result, MULTI_CAT_RESULT); }
public static String getPostgresCategoryString(String searchString) { if (searchString == null || !(searchString.trim().length() > 0)) { return "{}"; } List<String> categories = parse(searchString.trim().toLowerCase()); return PostgreSQLTextArray.stringArrayToPostgreSQLTextArray(categories.toArray(new String[categories.size()])); }
CategoryStringGenerator { public static String getPostgresCategoryString(String searchString) { if (searchString == null || !(searchString.trim().length() > 0)) { return "{}"; } List<String> categories = parse(searchString.trim().toLowerCase()); return PostgreSQLTextArray.stringArrayToPostgreSQLTextArray(categories.toArray(new String[categories.size()])); } }
CategoryStringGenerator { public static String getPostgresCategoryString(String searchString) { if (searchString == null || !(searchString.trim().length() > 0)) { return "{}"; } List<String> categories = parse(searchString.trim().toLowerCase()); return PostgreSQLTextArray.stringArrayToPostgreSQLTextArray(categories.toArray(new String[categories.size()])); } private  CategoryStringGenerator(); }
CategoryStringGenerator { public static String getPostgresCategoryString(String searchString) { if (searchString == null || !(searchString.trim().length() > 0)) { return "{}"; } List<String> categories = parse(searchString.trim().toLowerCase()); return PostgreSQLTextArray.stringArrayToPostgreSQLTextArray(categories.toArray(new String[categories.size()])); } private  CategoryStringGenerator(); static String getPostgresCategoryString(String searchString); }
CategoryStringGenerator { public static String getPostgresCategoryString(String searchString) { if (searchString == null || !(searchString.trim().length() > 0)) { return "{}"; } List<String> categories = parse(searchString.trim().toLowerCase()); return PostgreSQLTextArray.stringArrayToPostgreSQLTextArray(categories.toArray(new String[categories.size()])); } private  CategoryStringGenerator(); static String getPostgresCategoryString(String searchString);  }