Package com.google.cloud.translate.testing (2.6.0)

A testing helper for Google Translation.

A simple usage example:

Before the test:


 RemoteTranslateHelper helper = RemoteTranslateHelper.create();
 Translate translate = helper.getOptions().getService();
 

See Also: Google Cloud Java tools for testing

Classes

RemoteTranslateHelper

Utility to create a remote translate configuration for testing. Translate options can be obtained via the #getOptions() ()} method. Returned options have custom TranslateOptions#getRetrySettings(): RetrySettings#getMaxAttempts() is 10, RetrySettings#getMaxRetryDelay() is 30000, RetrySettings#getTotalTimeout() is 120000 and RetrySettings#getInitialRetryDelay() is 250. HttpTransportOptions#getConnectTimeout() and HttpTransportOptions#getReadTimeout() are both both set to 60000.

Exceptions

RemoteTranslateHelper.TranslateHelperException