@Test public void testEmptyPushProviders() { client.fetchRemoteData(DateUtils.createIso8601TimeStamp(System.currentTimeMillis()), new Locale("en")); Uri uri = Uri.parse(testRequest.getURL().toString()); assertNull(uri.getQueryParameter("push_providers")); }
@Nullable Response fetchRemoteData(@Nullable String lastModified, @NonNull Locale locale) { URL url = getRemoteDataURL(locale); if (url == null) { Logger.debug("Remote Data URL null. Unable to update tagGroups."); return null; } Request request = requestFactory.createRequest("GET", url) .setCredentials(runtimeConfig.getConfigOptions().appKey, runtimeConfig.getConfigOptions().appSecret); if (lastModified != null) { request.setHeader("If-Modified-Since", lastModified); } return request.safeExecute(); }
RemoteDataApiClient { @Nullable Response fetchRemoteData(@Nullable String lastModified, @NonNull Locale locale) { URL url = getRemoteDataURL(locale); if (url == null) { Logger.debug("Remote Data URL null. Unable to update tagGroups."); return null; } Request request = requestFactory.createRequest("GET", url) .setCredentials(runtimeConfig.getConfigOptions().appKey, runtimeConfig.getConfigOptions().appSecret); if (lastModified != null) { request.setHeader("If-Modified-Since", lastModified); } return request.safeExecute(); } }
RemoteDataApiClient { @Nullable Response fetchRemoteData(@Nullable String lastModified, @NonNull Locale locale) { URL url = getRemoteDataURL(locale); if (url == null) { Logger.debug("Remote Data URL null. Unable to update tagGroups."); return null; } Request request = requestFactory.createRequest("GET", url) .setCredentials(runtimeConfig.getConfigOptions().appKey, runtimeConfig.getConfigOptions().appSecret); if (lastModified != null) { request.setHeader("If-Modified-Since", lastModified); } return request.safeExecute(); } RemoteDataApiClient(@NonNull AirshipRuntimeConfig runtimeConfig,
                        @NonNull PushProviders pushProviders); @VisibleForTesting  RemoteDataApiClient(@NonNull AirshipRuntimeConfig runtimeConfig,
                        @NonNull PushProviders pushProviders,
                        @NonNull RequestFactory requestFactory); }
RemoteDataApiClient { @Nullable Response fetchRemoteData(@Nullable String lastModified, @NonNull Locale locale) { URL url = getRemoteDataURL(locale); if (url == null) { Logger.debug("Remote Data URL null. Unable to update tagGroups."); return null; } Request request = requestFactory.createRequest("GET", url) .setCredentials(runtimeConfig.getConfigOptions().appKey, runtimeConfig.getConfigOptions().appSecret); if (lastModified != null) { request.setHeader("If-Modified-Since", lastModified); } return request.safeExecute(); } RemoteDataApiClient(@NonNull AirshipRuntimeConfig runtimeConfig,
                        @NonNull PushProviders pushProviders); @VisibleForTesting  RemoteDataApiClient(@NonNull AirshipRuntimeConfig runtimeConfig,
                        @NonNull PushProviders pushProviders,
                        @NonNull RequestFactory requestFactory);  }
RemoteDataApiClient { @Nullable Response fetchRemoteData(@Nullable String lastModified, @NonNull Locale locale) { URL url = getRemoteDataURL(locale); if (url == null) { Logger.debug("Remote Data URL null. Unable to update tagGroups."); return null; } Request request = requestFactory.createRequest("GET", url) .setCredentials(runtimeConfig.getConfigOptions().appKey, runtimeConfig.getConfigOptions().appSecret); if (lastModified != null) { request.setHeader("If-Modified-Since", lastModified); } return request.safeExecute(); } RemoteDataApiClient(@NonNull AirshipRuntimeConfig runtimeConfig,
                        @NonNull PushProviders pushProviders); @VisibleForTesting  RemoteDataApiClient(@NonNull AirshipRuntimeConfig runtimeConfig,
                        @NonNull PushProviders pushProviders,
                        @NonNull RequestFactory requestFactory);   }