Package com.sun.jersey.api.client

Examples of com.sun.jersey.api.client.UniformInterfaceException


    @Test
    public void informationWillPassUpIfServiceExceptionIsRootCauseOfClientHandlerExceptions() {
        // Arrange
        ClientResponse response = new ClientResponse(503, null,
                new ByteArrayInputStream(new byte[0]), null);
        UniformInterfaceException rootCause = new UniformInterfaceException(
                response);
        ServiceException originalDescription = ServiceExceptionFactory.process(
                "underlying", new ServiceException(rootCause));
        ClientHandlerException wrappingException = new ClientHandlerException(
                originalDescription);
View Full Code Here


    @Test
    public void serviceNameAndMessageAndCauseAppearInException() {
        // Arrange
        ClientResponse response = new ClientResponse(404, null,
                new ByteArrayInputStream(new byte[0]), null);
        UniformInterfaceException cause = new UniformInterfaceException(
                response);

        // Act
        ServiceException exception = ServiceExceptionFactory.process("testing",
                new ServiceException("this is a test", cause));
View Full Code Here

    @Test
    public void httpStatusCodeAndReasonPhraseAppearInException() {
        // Arrange
        ClientResponse response = new ClientResponse(404, null,
                new ByteArrayInputStream(new byte[0]), null);
        UniformInterfaceException cause = new UniformInterfaceException(
                response);

        // Act
        ServiceException exception = ServiceExceptionFactory.process("testing",
                new ServiceException("this is a test", cause));
View Full Code Here

    @Test
    public void informationWillPassUpIfServiceExceptionIsRootCauseOfClientHandlerExceptions() {
        // Arrange
        ClientResponse response = new ClientResponse(503, null,
                new ByteArrayInputStream(new byte[0]), null);
        UniformInterfaceException rootCause = new UniformInterfaceException(
                response);
        ServiceException originalDescription = ServiceExceptionFactory.process(
                "underlying", new ServiceException(rootCause));
        ClientHandlerException wrappingException = new ClientHandlerException(
                originalDescription);
View Full Code Here

    @Test
    public void serviceNameAndMessageAndCauseAppearInException() {
        // Arrange
        ClientResponse response = new ClientResponse(404, null,
                new ByteArrayInputStream(new byte[0]), null);
        UniformInterfaceException cause = new UniformInterfaceException(
                response);

        // Act
        ServiceException exception = ServiceExceptionFactory.process("testing",
                new ServiceException("this is a test", cause));
View Full Code Here

    @Test
    public void httpStatusCodeAndReasonPhraseAppearInException() {
        // Arrange
        ClientResponse response = new ClientResponse(404, null,
                new ByteArrayInputStream(new byte[0]), null);
        UniformInterfaceException cause = new UniformInterfaceException(
                response);

        // Act
        ServiceException exception = ServiceExceptionFactory.process("testing",
                new ServiceException("this is a test", cause));
View Full Code Here

    @Test
    public void informationWillPassUpIfServiceExceptionIsRootCauseOfClientHandlerExceptions() {
        // Arrange
        ClientResponse response = new ClientResponse(503, null,
                new ByteArrayInputStream(new byte[0]), null);
        UniformInterfaceException rootCause = new UniformInterfaceException(
                response);
        ServiceException originalDescription = ServiceExceptionFactory.process(
                "underlying", new ServiceException(rootCause));
        ClientHandlerException wrappingException = new ClientHandlerException(
                originalDescription);
View Full Code Here

TOP

Related Classes of com.sun.jersey.api.client.UniformInterfaceException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.