Search in sources :

Example 16 with NoAuthAuthenticator

use of com.ibm.cloud.sdk.core.security.NoAuthAuthenticator in project cloudant-java-sdk by IBM.

the class ValidationTest method validatesStripTrailingSlash.

@Test
void validatesStripTrailingSlash() {
    CloudantBaseService cloudantBaseService = new CloudantBaseService(null, new NoAuthAuthenticator()) {
    };
    cloudantBaseService.setServiceUrl("https://cloudant.example/");
    assertEquals(cloudantBaseService.getServiceUrl(), "https://cloudant.example");
}
Also used : NoAuthAuthenticator(com.ibm.cloud.sdk.core.security.NoAuthAuthenticator) Test(org.testng.annotations.Test)

Example 17 with NoAuthAuthenticator

use of com.ibm.cloud.sdk.core.security.NoAuthAuthenticator in project java-sdk by watson-developer-cloud.

the class ToneAnalyzerTest 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();
    toneAnalyzerService = new ToneAnalyzer(version, serviceName, authenticator);
    String url = server.url("/").toString();
    toneAnalyzerService.setServiceUrl(url);
}
Also used : NoAuthAuthenticator(com.ibm.cloud.sdk.core.security.NoAuthAuthenticator) Authenticator(com.ibm.cloud.sdk.core.security.Authenticator) NoAuthAuthenticator(com.ibm.cloud.sdk.core.security.NoAuthAuthenticator)

Example 18 with NoAuthAuthenticator

use of com.ibm.cloud.sdk.core.security.NoAuthAuthenticator in project java-sdk by watson-developer-cloud.

the class CompareComplyTest 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();
    compareComplyService = new CompareComply(version, serviceName, authenticator);
    String url = server.url("/").toString();
    compareComplyService.setServiceUrl(url);
}
Also used : NoAuthAuthenticator(com.ibm.cloud.sdk.core.security.NoAuthAuthenticator) NoAuthAuthenticator(com.ibm.cloud.sdk.core.security.NoAuthAuthenticator) Authenticator(com.ibm.cloud.sdk.core.security.Authenticator)

Example 19 with NoAuthAuthenticator

use of com.ibm.cloud.sdk.core.security.NoAuthAuthenticator 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);
}
Also used : NoAuthAuthenticator(com.ibm.cloud.sdk.core.security.NoAuthAuthenticator) Authenticator(com.ibm.cloud.sdk.core.security.Authenticator) NoAuthAuthenticator(com.ibm.cloud.sdk.core.security.NoAuthAuthenticator)

Example 20 with NoAuthAuthenticator

use of com.ibm.cloud.sdk.core.security.NoAuthAuthenticator 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);
}
Also used : NoAuthAuthenticator(com.ibm.cloud.sdk.core.security.NoAuthAuthenticator) NoAuthAuthenticator(com.ibm.cloud.sdk.core.security.NoAuthAuthenticator) Authenticator(com.ibm.cloud.sdk.core.security.Authenticator)

Aggregations

NoAuthAuthenticator (com.ibm.cloud.sdk.core.security.NoAuthAuthenticator)20 Authenticator (com.ibm.cloud.sdk.core.security.Authenticator)14 Test (org.testng.annotations.Test)5 Request (okhttp3.Request)4 HttpUrl (okhttp3.HttpUrl)3 Collection (com.ibm.watson.discovery.v1.model.Collection)1 Configuration (com.ibm.watson.discovery.v1.model.Configuration)1 CreateEventResponse (com.ibm.watson.discovery.v1.model.CreateEventResponse)1 Credentials (com.ibm.watson.discovery.v1.model.Credentials)1 CredentialsList (com.ibm.watson.discovery.v1.model.CredentialsList)1 DeleteCollectionResponse (com.ibm.watson.discovery.v1.model.DeleteCollectionResponse)1 DeleteConfigurationResponse (com.ibm.watson.discovery.v1.model.DeleteConfigurationResponse)1 DeleteCredentials (com.ibm.watson.discovery.v1.model.DeleteCredentials)1 DeleteDocumentResponse (com.ibm.watson.discovery.v1.model.DeleteDocumentResponse)1 DeleteEnvironmentResponse (com.ibm.watson.discovery.v1.model.DeleteEnvironmentResponse)1 DocumentAccepted (com.ibm.watson.discovery.v1.model.DocumentAccepted)1 DocumentStatus (com.ibm.watson.discovery.v1.model.DocumentStatus)1 Environment (com.ibm.watson.discovery.v1.model.Environment)1 Expansions (com.ibm.watson.discovery.v1.model.Expansions)1 Gateway (com.ibm.watson.discovery.v1.model.Gateway)1