java.lang.Object
org.eclipse.microprofile.opentracing.tck.application.ApplicationUtils

public class ApplicationUtils extends Object
Author:
Pavol Loffay
  • Field Details

    • TEST_WEB_SERVICES_CONTEXT_ROOT

      public static final String TEST_WEB_SERVICES_CONTEXT_ROOT
      The context root of JAXRS web services.
      See Also:
  • Method Details

    • getWebServiceURL

      public static String getWebServiceURL(URL baseUri, String service, String relativePath)
      Create web service URL.
      Parameters:
      baseUri - Base URI.
      service - Web service path
      relativePath - Web service endpoint
      Returns:
      Web service URL
    • getQueryString

      public static String getQueryString(Map<String,Object> queryParameters)
      Convert a map into a query string.
      Parameters:
      queryParameters - Map to convert.
      Returns:
      Query string.
    • urlEncode

      public static String urlEncode(String text)
      URL-encode text.
      Parameters:
      text - Text to encode.
      Returns:
      Encoded text.
    • createExampleRuntimeException

      public static RuntimeException createExampleRuntimeException()
      Create an example RuntimeException used by a web service.
      Returns:
      New RuntimeException.