@Test public void ignoreApiAccessPlan() throws IOException { String vcapMultipleBindings = IOUtils.resourceToString("/vcap_multipleBindings.json", Charset.forName("UTF-8")); XsuaaServicesParser cut = new XsuaaServicesParser(vcapMultipleBindings); Properties properties = cut.parseCredentials(); assertThat(properties.getProperty("clientid")).isEqualTo("client-id"); }
public Properties parseCredentials() throws IOException { Properties properties = new Properties(); JSONObject credentialsJsonObject = parseCredentials(vcapServices); if (credentialsJsonObject != null) { Set<String> keys = credentialsJsonObject.keySet(); for (String key : keys) { properties.put(key, credentialsJsonObject.get(key).toString()); } } return properties; }
XsuaaServicesParser { public Properties parseCredentials() throws IOException { Properties properties = new Properties(); JSONObject credentialsJsonObject = parseCredentials(vcapServices); if (credentialsJsonObject != null) { Set<String> keys = credentialsJsonObject.keySet(); for (String key : keys) { properties.put(key, credentialsJsonObject.get(key).toString()); } } return properties; } }
XsuaaServicesParser { public Properties parseCredentials() throws IOException { Properties properties = new Properties(); JSONObject credentialsJsonObject = parseCredentials(vcapServices); if (credentialsJsonObject != null) { Set<String> keys = credentialsJsonObject.keySet(); for (String key : keys) { properties.put(key, credentialsJsonObject.get(key).toString()); } } return properties; } XsuaaServicesParser();  XsuaaServicesParser(InputStream inputStream);  XsuaaServicesParser(String vcapServicesJson); }
XsuaaServicesParser { public Properties parseCredentials() throws IOException { Properties properties = new Properties(); JSONObject credentialsJsonObject = parseCredentials(vcapServices); if (credentialsJsonObject != null) { Set<String> keys = credentialsJsonObject.keySet(); for (String key : keys) { properties.put(key, credentialsJsonObject.get(key).toString()); } } return properties; } XsuaaServicesParser();  XsuaaServicesParser(InputStream inputStream);  XsuaaServicesParser(String vcapServicesJson); @Deprecated Optional<String> getAttribute(String name); Properties parseCredentials(); }
XsuaaServicesParser { public Properties parseCredentials() throws IOException { Properties properties = new Properties(); JSONObject credentialsJsonObject = parseCredentials(vcapServices); if (credentialsJsonObject != null) { Set<String> keys = credentialsJsonObject.keySet(); for (String key : keys) { properties.put(key, credentialsJsonObject.get(key).toString()); } } return properties; } XsuaaServicesParser();  XsuaaServicesParser(InputStream inputStream);  XsuaaServicesParser(String vcapServicesJson); @Deprecated Optional<String> getAttribute(String name); Properties parseCredentials();  }