Class HttpExternalSystemCommunicationTest


  • public class HttpExternalSystemCommunicationTest
    extends WeldBaseTest
    Tests to cover the sending of data with HttpExternalSystem. Note: these tests expect to have the server running as they execute HTTP requests and evaluate the responses.
    • Constructor Detail

      • HttpExternalSystemCommunicationTest

        public HttpExternalSystemCommunicationTest()
    • Method Detail

      • init

        public void init()
      • cleanUp

        public void cleanUp()
      • sendWithBasicAuth

        public void sendWithBasicAuth()
                               throws org.codehaus.jettison.json.JSONException,
                                      javax.servlet.ServletException
        Throws:
        org.codehaus.jettison.json.JSONException
        javax.servlet.ServletException
      • sendWithBasicAuthAlwaysInHeader

        public void sendWithBasicAuthAlwaysInHeader()
                                             throws org.codehaus.jettison.json.JSONException,
                                                    javax.servlet.ServletException
        Throws:
        org.codehaus.jettison.json.JSONException
        javax.servlet.ServletException
      • checkOAuth2TokenRetrieval

        public void checkOAuth2TokenRetrieval()
                                       throws org.codehaus.jettison.json.JSONException,
                                              javax.servlet.ServletException
        Throws:
        org.codehaus.jettison.json.JSONException
        javax.servlet.ServletException
      • retryOnceWithOAuth2OnUnauthorizedError

        public void retryOnceWithOAuth2OnUnauthorizedError()
                                                    throws org.codehaus.jettison.json.JSONException,
                                                           javax.servlet.ServletException
        Throws:
        org.codehaus.jettison.json.JSONException
        javax.servlet.ServletException
      • sendUnauthorized

        public void sendUnauthorized()
                              throws org.codehaus.jettison.json.JSONException
        Throws:
        org.codehaus.jettison.json.JSONException
      • cannotSendWithUnsupportedRequestMethod

        public void cannotSendWithUnsupportedRequestMethod()
      • sendRequestToUnknownResource

        public void sendRequestToUnknownResource()
                                          throws org.codehaus.jettison.json.JSONException
        Throws:
        org.codehaus.jettison.json.JSONException
      • sendWithDeleteOperation

        public void sendWithDeleteOperation()
                                     throws javax.servlet.ServletException
        Throws:
        javax.servlet.ServletException
      • sendWithReadOperation

        public void sendWithReadOperation()
                                   throws javax.servlet.ServletException
        Throws:
        javax.servlet.ServletException
      • sendWithQueryParams

        public void sendWithQueryParams()
                                 throws javax.servlet.ServletException,
                                        org.codehaus.jettison.json.JSONException
        Throws:
        javax.servlet.ServletException
        org.codehaus.jettison.json.JSONException
      • sendWithCreateOperation

        public void sendWithCreateOperation()
                                     throws javax.servlet.ServletException,
                                            org.codehaus.jettison.json.JSONException
        Throws:
        javax.servlet.ServletException
        org.codehaus.jettison.json.JSONException
      • sendWithUpdateOperation

        public void sendWithUpdateOperation()
                                     throws javax.servlet.ServletException,
                                            org.codehaus.jettison.json.JSONException
        Throws:
        javax.servlet.ServletException
        org.codehaus.jettison.json.JSONException
      • cannotSendPayloadInGetRequests

        public void cannotSendPayloadInGetRequests()
      • cannotSendPayloadInDeleteRequests

        public void cannotSendPayloadInDeleteRequests()