Class Functions

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

public final class Functions extends Object
Since:
2.1
Author:
Christoph Deppisch
  • Method Details

    • currentDate

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

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

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

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

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

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

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

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

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

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

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

      public static String urlDecode(String content, Charset charset, 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, TestContext context)
      Runs create digest auth header function with arguments.
      Returns:
    • randomUUID

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

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

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

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

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

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

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

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

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