use of com.ibm.cloud.sdk.core.security.Authenticator in project java-sdk by watson-developer-cloud.
the class PersonalityInsightsTest method constructClientService.
public void constructClientService() throws Throwable {
final String serviceName = "testService";
// set mock values for global params
String version = "testString";
final Authenticator authenticator = new NoAuthAuthenticator();
personalityInsightsService = new PersonalityInsights(version, serviceName, authenticator);
String url = server.url("/").toString();
personalityInsightsService.setServiceUrl(url);
}
use of com.ibm.cloud.sdk.core.security.Authenticator in project java-sdk by watson-developer-cloud.
the class VisualRecognitionIT method setUp.
/**
* Sets up the tests.
*
* @throws Exception the exception
*/
/*
* (non-Javadoc)
* @see com.ibm.watson.common.WatsonServiceTest#setUp()
*/
@Override
@Before
public void setUp() throws Exception {
super.setUp();
String iamApiKey = System.getenv("VISUAL_RECOGNITION_APIKEY");
assertNotNull("VISUAL_RECOGNITION_APIKEY is not defined", iamApiKey);
Authenticator authenticator = new IamAuthenticator(iamApiKey);
service = new VisualRecognition(VERSION, authenticator);
service.setDefaultHeaders(getDefaultHeaders());
}
use of com.ibm.cloud.sdk.core.security.Authenticator in project java-sdk by watson-developer-cloud.
the class VisualRecognitionTest method constructClientService.
public void constructClientService() throws Throwable {
final String serviceName = "testService";
// set mock values for global params
String version = "testString";
final Authenticator authenticator = new NoAuthAuthenticator();
visualRecognitionService = new VisualRecognition(version, serviceName, authenticator);
String url = server.url("/").toString();
visualRecognitionService.setServiceUrl(url);
}
Aggregations