use of com.linkedin.restli.client.testutils.MockRestliResponseExceptionBuilder in project rest.li by linkedin.
the class TestMockRestliResponseExceptionBuilder method testNullCookies.
@Test(expectedExceptions = IllegalArgumentException.class)
public void testNullCookies() {
MockRestliResponseExceptionBuilder exceptionBuilder = new MockRestliResponseExceptionBuilder();
exceptionBuilder.setCookies(null);
}
use of com.linkedin.restli.client.testutils.MockRestliResponseExceptionBuilder in project rest.li by linkedin.
the class TestMockRestliResponseExceptionBuilder method testNullProtocolVersion.
@Test(expectedExceptions = IllegalArgumentException.class)
public void testNullProtocolVersion() {
MockRestliResponseExceptionBuilder exceptionBuilder = new MockRestliResponseExceptionBuilder();
exceptionBuilder.setProtocolVersion(null);
}
use of com.linkedin.restli.client.testutils.MockRestliResponseExceptionBuilder in project rest.li by linkedin.
the class TestMockRestliResponseExceptionBuilder method testNullStatus.
@Test(expectedExceptions = IllegalArgumentException.class)
public void testNullStatus() {
MockRestliResponseExceptionBuilder exceptionBuilder = new MockRestliResponseExceptionBuilder();
exceptionBuilder.setStatus(null);
}
use of com.linkedin.restli.client.testutils.MockRestliResponseExceptionBuilder in project rest.li by linkedin.
the class TestMockRestliResponseExceptionBuilder method testNullHeaders.
@Test(expectedExceptions = IllegalArgumentException.class)
public void testNullHeaders() {
MockRestliResponseExceptionBuilder exceptionBuilder = new MockRestliResponseExceptionBuilder();
exceptionBuilder.setHeaders(null);
}
use of com.linkedin.restli.client.testutils.MockRestliResponseExceptionBuilder in project rest.li by linkedin.
the class TestMockRestliResponseExceptionBuilder method testBuildDefaults.
@Test
public void testBuildDefaults() {
RestLiResponseException exception = new MockRestliResponseExceptionBuilder().build();
RestResponse errorResponse = exception.getResponse();
assertEquals(exception.getStatus(), 500);
assertEquals(errorResponse.getHeader(RestConstants.HEADER_RESTLI_ERROR_RESPONSE), "true");
assertEquals(errorResponse.getHeader(RestConstants.HEADER_RESTLI_PROTOCOL_VERSION), AllProtocolVersions.LATEST_PROTOCOL_VERSION.toString());
assertTrue(errorResponse.getCookies().isEmpty());
}
Aggregations