public class GenericServiceTest extends WatsonServiceUnitTest
DELETE, GET, POST, PUT, serverCONTENT_TYPE, PLACEHOLDER, properties| Constructor and Description |
|---|
GenericServiceTest() |
| Modifier and Type | Method and Description |
|---|---|
void |
serviceUnavailableException()
Service unavailable exception.
|
void |
setUp()
Setups and starts the mock server.
|
void |
testBadRequestException()
Test bad request exception.
|
void |
testConflictException()
Test service conflict exception.
|
void |
testConstructors()
Checks the credential constructors of all services.
|
void |
testCustomUserAgent()
Test custom user agent.
|
void |
testDefaultHeadersAreSet()
Test default headers are set.
|
void |
testForbiddenException()
Test forbidden exception.
|
void |
testIllegalArgumentException()
Test illegal argument exception.
|
void |
testInternalServerErrorException()
Test internal server error exception.
|
void |
testNoAuthentication()
Tests request without authentication.
|
void |
testNotFoundException()
Test not found exception.
|
void |
testReactiveCalls()
Tests the execution of reactive calls.
|
void |
testRequestTooLargeException()
Test request too large exception.
|
void |
testServiceUnavailableException()
Test service unavailable exception.
|
void |
testSkipAuthentication()
Tests request with skipped authentication.
|
void |
testTooManyRequestsException()
Test too many requests exception.
|
void |
testUnauthorizedException()
Test unauthorized exception.
|
void |
testUnsupportedException()
Test unsupported exception.
|
void |
testUserAgentIsSet()
Test user agent is set.
|
getMockWebServerUrl, jsonResponse, tearDowngetDefaultHeaders, getProperty, getStringFromInputStream, loadFixture, writeInputStreamToFilepublic void testConstructors()
public void serviceUnavailableException()
public void setUp()
throws java.lang.Exception
WatsonServiceUnitTestsetUp in class WatsonServiceUnitTestjava.lang.Exception - the exceptionpublic void testBadRequestException()
public void testConflictException()
public void testDefaultHeadersAreSet()
throws java.lang.InterruptedException
java.lang.InterruptedException - the interrupted exceptionpublic void testForbiddenException()
throws java.lang.InterruptedException
java.lang.InterruptedException - the interrupted exceptionpublic void testIllegalArgumentException()
throws java.lang.InterruptedException
java.lang.InterruptedException - the interrupted exceptionpublic void testInternalServerErrorException()
throws java.lang.InterruptedException
java.lang.InterruptedException - the interrupted exceptionpublic void testNotFoundException()
public void testRequestTooLargeException()
public void testServiceUnavailableException()
public void testTooManyRequestsException()
public void testUnauthorizedException()
public void testUnsupportedException()
public void testUserAgentIsSet()
throws java.lang.Exception
java.lang.Exception - the exceptionpublic void testCustomUserAgent()
throws java.lang.InterruptedException
java.lang.InterruptedException - the interrupted exceptionpublic void testNoAuthentication()
public void testSkipAuthentication()
throws java.lang.InterruptedException
java.lang.InterruptedException - the interrupted exceptionpublic void testReactiveCalls()
throws java.lang.InterruptedException,
java.util.concurrent.ExecutionException
java.lang.InterruptedException - the interrupted exceptionjava.util.concurrent.ExecutionException - the execution exception