@Test public void testFindPluginNamesNoAdvanced() throws IOException { ObjectMapper mapper = new ObjectMapper(); JsonNode design = mapper.readTree("{ \"pizza\" : { } }"); App app2 = new App("App Name", "choose.iriscouch.com", "choose", 81, null); List<String> results = app2.findPluginNamess(design); assertEquals(0, results.size()); }
protected List<String> findPluginNamess(JsonNode design){ List<String> plugins = new ArrayList<String>(); try { for (JsonNode plugin : design.get("advanced").get("plugins")) { plugins.add(plugin.getTextValue()); } } catch (Exception e) {} try { String appClass = design.get("advanced").get("appClass").getTextValue(); plugins.add(appClass); } catch(Exception e) { } return plugins; }
App { protected List<String> findPluginNamess(JsonNode design){ List<String> plugins = new ArrayList<String>(); try { for (JsonNode plugin : design.get("advanced").get("plugins")) { plugins.add(plugin.getTextValue()); } } catch (Exception e) {} try { String appClass = design.get("advanced").get("appClass").getTextValue(); plugins.add(appClass); } catch(Exception e) { } return plugins; } }
App { protected List<String> findPluginNamess(JsonNode design){ List<String> plugins = new ArrayList<String>(); try { for (JsonNode plugin : design.get("advanced").get("plugins")) { plugins.add(plugin.getTextValue()); } } catch (Exception e) {} try { String appClass = design.get("advanced").get("appClass").getTextValue(); plugins.add(appClass); } catch(Exception e) { } return plugins; } App(String appName, String src_host, String src_db, int src_port, String src_username); }
App { protected List<String> findPluginNamess(JsonNode design){ List<String> plugins = new ArrayList<String>(); try { for (JsonNode plugin : design.get("advanced").get("plugins")) { plugins.add(plugin.getTextValue()); } } catch (Exception e) {} try { String appClass = design.get("advanced").get("appClass").getTextValue(); plugins.add(appClass); } catch(Exception e) { } return plugins; } App(String appName, String src_host, String src_db, int src_port, String src_username); void setLocalCouchManager(LocalCouch localCouchManager); void start(); String getSrcReplicationUrl(boolean includeUserDetails); CouchDbConnector getSrcConnector(); static void main(String[] args); static String[] parseUsernamePass(String arg); }
App { protected List<String> findPluginNamess(JsonNode design){ List<String> plugins = new ArrayList<String>(); try { for (JsonNode plugin : design.get("advanced").get("plugins")) { plugins.add(plugin.getTextValue()); } } catch (Exception e) {} try { String appClass = design.get("advanced").get("appClass").getTextValue(); plugins.add(appClass); } catch(Exception e) { } return plugins; } App(String appName, String src_host, String src_db, int src_port, String src_username); void setLocalCouchManager(LocalCouch localCouchManager); void start(); String getSrcReplicationUrl(boolean includeUserDetails); CouchDbConnector getSrcConnector(); static void main(String[] args); static String[] parseUsernamePass(String arg);  }