@Test public void testReadPropertiesFromConfiguration_onlyKeyFilePathAndUser() throws Exception { PropertiesConfiguration config = new PropertiesConfiguration(); config.setProperty("api.admanager.jsonKeyFilePath", "jsonKeyFilePath"); config.setProperty("api.admanager.serviceAccountUser", "someUser@example.com"); OfflineCredentials credentials = new Builder().forApi(Api.AD_MANAGER).from(config).build(); assertEquals( "service account user should have been set from the config", "someUser@example.com", credentials.getServiceAccountUser()); }
@VisibleForTesting final String getServiceAccountUser() { return serviceAccountUser; }
OfflineCredentials { @VisibleForTesting final String getServiceAccountUser() { return serviceAccountUser; } }
OfflineCredentials { @VisibleForTesting final String getServiceAccountUser() { return serviceAccountUser; } private  OfflineCredentials(ForApiBuilder builder); }
OfflineCredentials { @VisibleForTesting final String getServiceAccountUser() { return serviceAccountUser; } private  OfflineCredentials(ForApiBuilder builder); HttpTransport getHttpTransport(); String getRefreshToken(); String getClientId(); String getClientSecret(); String getJsonKeyFilePath(); Credential generateCredential(); }
OfflineCredentials { @VisibleForTesting final String getServiceAccountUser() { return serviceAccountUser; } private  OfflineCredentials(ForApiBuilder builder); HttpTransport getHttpTransport(); String getRefreshToken(); String getClientId(); String getClientSecret(); String getJsonKeyFilePath(); Credential generateCredential();  }