@Test public void testGoogleSecretsReadPropertiesFromConfiguration_properPrefix() throws ValidationException { PropertiesConfiguration config = new PropertiesConfiguration(); config.setProperty("api.admanager.clientId", "clientIdDfp"); config.setProperty("api.admanager.clientSecret", "clientSecretDfp"); config.setProperty("api.adwords.clientId", "clientIdAdWords"); config.setProperty("api.adwords.clientSecret", "clientSecretAdWords"); GoogleClientSecrets googleClientSecrets = new GoogleClientSecretsBuilder() .forApi(GoogleClientSecretsBuilder.Api.AD_MANAGER) .from(config) .build(); assertEquals("clientIdDfp", googleClientSecrets.getInstalled().getClientId()); assertEquals("clientSecretDfp", googleClientSecrets.getInstalled().getClientSecret()); }
public GoogleClientSecretsForApiBuilder forApi(Api api) { return new GoogleClientSecretsForApiBuilder(api); }
GoogleClientSecretsBuilder { public GoogleClientSecretsForApiBuilder forApi(Api api) { return new GoogleClientSecretsForApiBuilder(api); } }
GoogleClientSecretsBuilder { public GoogleClientSecretsForApiBuilder forApi(Api api) { return new GoogleClientSecretsForApiBuilder(api); } GoogleClientSecretsBuilder(); }
GoogleClientSecretsBuilder { public GoogleClientSecretsForApiBuilder forApi(Api api) { return new GoogleClientSecretsForApiBuilder(api); } GoogleClientSecretsBuilder(); GoogleClientSecretsForApiBuilder forApi(Api api); }
GoogleClientSecretsBuilder { public GoogleClientSecretsForApiBuilder forApi(Api api) { return new GoogleClientSecretsForApiBuilder(api); } GoogleClientSecretsBuilder(); GoogleClientSecretsForApiBuilder forApi(Api api);  }