Examples of EanWsError


Examples of com.ean.wsapi.hotel.v3.EanWsError

     *                        will be contained within this object. See our
     *                        exceptions overview for details on this object.
     */
    public final S call() throws EanWsException {
        S response = response();
        final EanWsError error = response.getEanWsError();
        if (error == null) {
            return response;
        } else {
            throw new EanWsException(error);
        }
View Full Code Here

Examples of com.ean.wsapi.hotel.v3.EanWsError

                    .locale(LocaleType.EN_US)
                    .customer(uuid, uuid, uuid)
                    .call();
        } catch (EanWsException fault) {
            // CHECK ERROR MESSAGE PROPERTIES
            final EanWsError error = fault.getError();
            assertThat("Itinerary IDs should be the same.",
                    error.getItineraryId(), is(equalTo((long) -1)));
            assertThat("Error handling behaviours should be the same.",
                    error.getHandling(), is(equalTo(ErrorHandling.RECOVERABLE)));
            assertThat("Error categories should be the same.",
                    error.getCategory(),
                    is(equalTo(ErrorCategory.DATA_VALIDATION)));
            assertThat("Exception condition IDs should be the same.",
                    error.getExceptionConditionId(), is(equalTo(-1)));
            final String message = "Data in this request could not be validated: "
                    + "Specified city could not be resolved as valid location.";
            assertThat("Presentation messages should be the same.",
                    error.getPresentationMessage(), is(equalTo(message)));
            assertThat("Verbose messages should be the same.",
                    error.getVerboseMessage(), is(equalTo(message)));

            // SERVER INFO ATTRIBUTES
            final ServerInfo info = error.getServerInfo();
            assertThat("Server time should not be empty.",
                    info.getServerTime(), is(notNullValue()));
            assertThat("Timestamp should not be empty.",
                    info.getTimestamp(), is(notNullValue()));
            assertThat("Server instance should not be empty.",
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.