Class Functions

java.lang.Object
org.citrusframework.functions.Functions

public final class Functions extends Object
Since:
2.1
  • Method Summary

    Modifier and Type
    Method
    Description
    static String
    changeDate(String date, String dateOffset, String dateFormat, org.citrusframework.context.TestContext context)
    Runs change date function with arguments.
    static String
    changeDate(String date, String dateOffset, org.citrusframework.context.TestContext context)
    Runs change date function with arguments.
    static String
    currentDate(String dateFormat, org.citrusframework.context.TestContext context)
    Runs current date function with arguments.
    static String
    currentDate(org.citrusframework.context.TestContext context)
    Runs current date function with arguments.
    static String
    decodeBase64(String content, Charset charset, org.citrusframework.context.TestContext context)
    Runs decode base 64 function with arguments.
    static String
    decodeBase64(String content, org.citrusframework.context.TestContext context)
    Runs decode base 64 function with arguments.
    static String
    digestAuthHeader(String username, String password, String realm, String noncekey, String method, String uri, String opaque, String algorithm, org.citrusframework.context.TestContext context)
    Runs create digest auth header function with arguments.
    static String
    encodeBase64(String content, Charset charset, org.citrusframework.context.TestContext context)
    Runs encode base 64 function with arguments.
    static String
    encodeBase64(String content, org.citrusframework.context.TestContext context)
    Runs encode base 64 function with arguments.
    static String
    randomNumber(Long length, boolean padding, org.citrusframework.context.TestContext context)
    Runs random number function with arguments.
    static String
    randomNumber(Long length, org.citrusframework.context.TestContext context)
    Runs random number function with arguments.
    static String
    randomString(Long numberOfLetters, boolean useNumbers, org.citrusframework.context.TestContext context)
    Runs random string function with arguments.
    static String
    randomString(Long numberOfLetters, String notationMethod, boolean useNumbers, org.citrusframework.context.TestContext context)
    Runs random string function with arguments.
    static String
    randomString(Long numberOfLetters, String notationMethod, org.citrusframework.context.TestContext context)
    Runs random string function with arguments.
    static String
    randomString(Long numberOfLetters, org.citrusframework.context.TestContext context)
    Runs random string function with arguments.
    static String
    randomUUID(org.citrusframework.context.TestContext context)
    Runs random UUID function with arguments.
    static String
    readFile(String filePath, org.citrusframework.context.TestContext context)
    Reads the file resource and returns the complete file content.
    static String
    unixTimestamp(org.citrusframework.context.TestContext context)
    Runs unix timestamp function with arguments.
    static String
    urlDecode(String content, Charset charset, org.citrusframework.context.TestContext context)
    Runs URL decode function with arguments.
    static String
    urlDecode(String content, org.citrusframework.context.TestContext context)
    Runs URL decode function with arguments.
    static String
    urlEncode(String content, Charset charset, org.citrusframework.context.TestContext context)
    Runs URL encode function with arguments.
    static String
    urlEncode(String content, org.citrusframework.context.TestContext context)
    Runs URL encode function with arguments.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • currentDate

      public static String currentDate(org.citrusframework.context.TestContext context)
      Runs current date function with arguments.
      Returns:
    • currentDate

      public static String currentDate(String dateFormat, org.citrusframework.context.TestContext context)
      Runs current date function with arguments.
      Returns:
    • changeDate

      public static String changeDate(String date, String dateOffset, String dateFormat, org.citrusframework.context.TestContext context)
      Runs change date function with arguments.
      Parameters:
      date -
      dateOffset -
      dateFormat -
      Returns:
    • changeDate

      public static String changeDate(String date, String dateOffset, org.citrusframework.context.TestContext context)
      Runs change date function with arguments.
      Parameters:
      date -
      dateOffset -
      Returns:
    • encodeBase64

      public static String encodeBase64(String content, org.citrusframework.context.TestContext context)
      Runs encode base 64 function with arguments.
      Returns:
    • encodeBase64

      public static String encodeBase64(String content, Charset charset, org.citrusframework.context.TestContext context)
      Runs encode base 64 function with arguments.
      Returns:
    • decodeBase64

      public static String decodeBase64(String content, org.citrusframework.context.TestContext context)
      Runs decode base 64 function with arguments.
      Returns:
    • decodeBase64

      public static String decodeBase64(String content, Charset charset, org.citrusframework.context.TestContext context)
      Runs decode base 64 function with arguments.
      Returns:
    • urlEncode

      public static String urlEncode(String content, org.citrusframework.context.TestContext context)
      Runs URL encode function with arguments.
      Returns:
    • urlEncode

      public static String urlEncode(String content, Charset charset, org.citrusframework.context.TestContext context)
      Runs URL encode function with arguments.
      Returns:
    • urlDecode

      public static String urlDecode(String content, org.citrusframework.context.TestContext context)
      Runs URL decode function with arguments.
      Returns:
    • urlDecode

      public static String urlDecode(String content, Charset charset, org.citrusframework.context.TestContext context)
      Runs URL decode function with arguments.
      Returns:
    • digestAuthHeader

      public static String digestAuthHeader(String username, String password, String realm, String noncekey, String method, String uri, String opaque, String algorithm, org.citrusframework.context.TestContext context)
      Runs create digest auth header function with arguments.
      Returns:
    • randomUUID

      public static String randomUUID(org.citrusframework.context.TestContext context)
      Runs random UUID function with arguments.
      Returns:
    • randomNumber

      public static String randomNumber(Long length, org.citrusframework.context.TestContext context)
      Runs random number function with arguments.
      Parameters:
      length -
      Returns:
    • randomNumber

      public static String randomNumber(Long length, boolean padding, org.citrusframework.context.TestContext context)
      Runs random number function with arguments.
      Parameters:
      length -
      padding -
      Returns:
    • randomString

      public static String randomString(Long numberOfLetters, org.citrusframework.context.TestContext context)
      Runs random string function with arguments.
      Parameters:
      numberOfLetters -
      Returns:
    • randomString

      public static String randomString(Long numberOfLetters, boolean useNumbers, org.citrusframework.context.TestContext context)
      Runs random string function with arguments.
      Parameters:
      numberOfLetters -
      useNumbers -
      Returns:
    • randomString

      public static String randomString(Long numberOfLetters, String notationMethod, boolean useNumbers, org.citrusframework.context.TestContext context)
      Runs random string function with arguments.
      Parameters:
      numberOfLetters -
      notationMethod -
      useNumbers -
      Returns:
    • randomString

      public static String randomString(Long numberOfLetters, String notationMethod, org.citrusframework.context.TestContext context)
      Runs random string function with arguments.
      Parameters:
      numberOfLetters -
      notationMethod -
      Returns:
    • readFile

      public static String readFile(String filePath, org.citrusframework.context.TestContext context)
      Reads the file resource and returns the complete file content.
      Parameters:
      filePath -
      Returns:
    • unixTimestamp

      public static String unixTimestamp(org.citrusframework.context.TestContext context)
      Runs unix timestamp function with arguments.
      Returns: