use of com.ibm.cloud.sdk.core.security.NoAuthAuthenticator in project java-sdk by watson-developer-cloud.
the class DiscoveryTest 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();
discoveryService = new Discovery(version, serviceName, authenticator);
String url = server.url("/").toString();
discoveryService.setServiceUrl(url);
}
use of com.ibm.cloud.sdk.core.security.NoAuthAuthenticator in project java-sdk by watson-developer-cloud.
the class LanguageTranslatorTest method constructClientService.
// Constructs an instance of the service to be used by the tests
public void constructClientService() {
final String serviceName = "testService";
// set mock values for global params
String version = "2018-05-01";
final Authenticator authenticator = new NoAuthAuthenticator();
languageTranslatorService = new LanguageTranslator(version, serviceName, authenticator);
String url = server.url("/").toString();
languageTranslatorService.setServiceUrl(url);
}
use of com.ibm.cloud.sdk.core.security.NoAuthAuthenticator in project java-sdk by watson-developer-cloud.
the class NaturalLanguageUnderstandingTest method constructClientService.
// Constructs an instance of the service to be used by the tests
public void constructClientService() {
final String serviceName = "testService";
// set mock values for global params
String version = "testString";
final Authenticator authenticator = new NoAuthAuthenticator();
naturalLanguageUnderstandingService = new NaturalLanguageUnderstanding(version, serviceName, authenticator);
String url = server.url("/").toString();
naturalLanguageUnderstandingService.setServiceUrl(url);
}
use of com.ibm.cloud.sdk.core.security.NoAuthAuthenticator in project java-sdk by watson-developer-cloud.
the class AssistantTest method constructClientService.
// Constructs an instance of the service to be used by the tests
public void constructClientService() {
final String serviceName = "testService";
// set mock values for global params
String version = "testString";
final Authenticator authenticator = new NoAuthAuthenticator();
assistantService = new Assistant(version, serviceName, authenticator);
String url = server.url("/").toString();
assistantService.setServiceUrl(url);
}
use of com.ibm.cloud.sdk.core.security.NoAuthAuthenticator in project java-sdk by watson-developer-cloud.
the class DiscoveryServiceTest method setup.
/**
* Setup.
*
* @throws Exception the exception
*/
@Before
public void setup() throws Exception {
super.setUp();
discoveryService = new Discovery(VERSION, new NoAuthAuthenticator());
discoveryService.setServiceUrl(getMockWebServerUrl());
environmentId = "mock_envid";
environmentName = "my_environment";
environmentDesc = "My environment";
uniqueConfigName = "my-config";
configurationId = "mock_confid";
uniqueCollectionName = "mock_collname";
collectionId = "mock_collid";
documentId = "mock_docid";
queryId = "mock_queryid";
date = new Date();
testStream = new FileInputStream(RESOURCE + "get_env_resp.json");
envResp = loadFixture(RESOURCE + "get_env_resp.json", Environment.class);
envsResp = loadFixture(RESOURCE + "get_envs_resp.json", ListEnvironmentsResponse.class);
createEnvResp = loadFixture(RESOURCE + "create_env_resp.json", Environment.class);
deleteEnvResp = loadFixture(RESOURCE + "delete_env_resp.json", DeleteEnvironmentResponse.class);
updateEnvResp = loadFixture(RESOURCE + "update_env_resp.json", Environment.class);
createConfResp = loadFixture(RESOURCE + "create_conf_resp.json", Configuration.class);
getConfsResp = loadFixture(RESOURCE + "get_confs_resp.json", ListConfigurationsResponse.class);
getConfResp = loadFixture(RESOURCE + "get_conf_resp.json", Configuration.class);
deleteConfResp = loadFixture(RESOURCE + "delete_conf_resp.json", DeleteConfigurationResponse.class);
updateConfResp = loadFixture(RESOURCE + "update_conf_resp.json", Configuration.class);
createCollResp = loadFixture(RESOURCE + "create_coll_resp.json", Collection.class);
getCollsResp = loadFixture(RESOURCE + "get_coll_resp.json", ListCollectionsResponse.class);
getCollResp = loadFixture(RESOURCE + "get_coll1_resp.json", Collection.class);
deleteCollResp = loadFixture(RESOURCE + "delete_coll_resp.json", DeleteCollectionResponse.class);
listfieldsCollResp = loadFixture(RESOURCE + "listfields_coll_resp.json", ListCollectionFieldsResponse.class);
createDocResp = loadFixture(RESOURCE + "create_doc_resp.json", DocumentAccepted.class);
updateDocResp = loadFixture(RESOURCE + "update_doc_resp.json", DocumentAccepted.class);
getDocResp = loadFixture(RESOURCE + "get_doc_resp.json", DocumentStatus.class);
deleteDocResp = loadFixture(RESOURCE + "delete_doc_resp.json", DeleteDocumentResponse.class);
queryResp = loadFixture(RESOURCE + "query1_resp.json", QueryResponse.class);
queryNoticesResp = loadFixture(RESOURCE + "query1_resp.json", QueryNoticesResponse.class);
addTrainingQueryResp = loadFixture(RESOURCE + "add_training_query_resp.json", TrainingQuery.class);
listTrainingDataResp = loadFixture(RESOURCE + "list_training_data_resp.json", TrainingDataSet.class);
createTrainingExampleResp = loadFixture(RESOURCE + "add_training_example_resp.json", TrainingExample.class);
getTrainingDataResp = loadFixture(RESOURCE + "get_training_data_resp.json", TrainingQuery.class);
getTrainingExampleResp = loadFixture(RESOURCE + "get_training_example_resp.json", TrainingExample.class);
updateTrainingExampleResp = loadFixture(RESOURCE + "update_training_example_resp.json", TrainingExample.class);
listTrainingExamplesResp = loadFixture(RESOURCE + "list_training_examples_resp.json", TrainingExampleList.class);
listFieldsResp = loadFixture(RESOURCE + "list_fields_resp.json", ListCollectionFieldsResponse.class);
expansionsResp = loadFixture(RESOURCE + "expansions_resp.json", Expansions.class);
credentialsResp = loadFixture(RESOURCE + "credentials_resp.json", Credentials.class);
listCredentialsResp = loadFixture(RESOURCE + "list_credentials_resp.json", CredentialsList.class);
deleteCredentialsResp = loadFixture(RESOURCE + "delete_credentials_resp.json", DeleteCredentials.class);
createEventResp = loadFixture(RESOURCE + "create_event_resp.json", CreateEventResponse.class);
metricResp = loadFixture(RESOURCE + "metric_resp.json", MetricResponse.class);
metricTokenResp = loadFixture(RESOURCE + "metric_token_resp.json", MetricTokenResponse.class);
logQueryResp = loadFixture(RESOURCE + "log_query_resp.json", LogQueryResponse.class);
tokenDictStatusResponse = loadFixture(RESOURCE + "token_dict_status_resp.json", TokenDictStatusResponse.class);
tokenDictStatusResponseStopwords = loadFixture(RESOURCE + "token_dict_status_resp_stopwords.json", TokenDictStatusResponse.class);
gatewayResponse = loadFixture(RESOURCE + "gateway_resp.json", Gateway.class);
listGatewaysResponse = loadFixture(RESOURCE + "list_gateways_resp.json", GatewayList.class);
deleteGatewayResponse = loadFixture(RESOURCE + "delete_gateway_resp.json", GatewayDelete.class);
}
Aggregations