Package org.citrusframework.functions
Class Functions
java.lang.Object
org.citrusframework.functions.Functions
- Since:
- 2.1
- Author:
- Christoph Deppisch
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
changeDate
(String date, String dateOffset, String dateFormat, TestContext context) Runs change date function with arguments.static String
changeDate
(String date, String dateOffset, TestContext context) Runs change date function with arguments.static String
currentDate
(String dateFormat, TestContext context) Runs current date function with arguments.static String
currentDate
(TestContext context) Runs current date function with arguments.static String
decodeBase64
(String content, Charset charset, TestContext context) Runs decode base 64 function with arguments.static String
decodeBase64
(String content, 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, TestContext context) Runs create digest auth header function with arguments.static String
encodeBase64
(String content, Charset charset, TestContext context) Runs encode base 64 function with arguments.static String
encodeBase64
(String content, TestContext context) Runs encode base 64 function with arguments.static String
randomNumber
(Long length, boolean padding, TestContext context) Runs random number function with arguments.static String
randomNumber
(Long length, TestContext context) Runs random number function with arguments.static String
randomString
(Long numberOfLetters, boolean useNumbers, TestContext context) Runs random string function with arguments.static String
randomString
(Long numberOfLetters, String notationMethod, boolean useNumbers, TestContext context) Runs random string function with arguments.static String
randomString
(Long numberOfLetters, String notationMethod, TestContext context) Runs random string function with arguments.static String
randomString
(Long numberOfLetters, TestContext context) Runs random string function with arguments.static String
randomUUID
(TestContext context) Runs random UUID function with arguments.static String
readFile
(String filePath, TestContext context) Reads the file resource and returns the complete file content.static String
unixTimestamp
(TestContext context) Runs unix timestamp function with arguments.static String
urlDecode
(String content, Charset charset, TestContext context) Runs URL decode function with arguments.static String
urlDecode
(String content, TestContext context) Runs URL decode function with arguments.static String
urlEncode
(String content, Charset charset, TestContext context) Runs URL encode function with arguments.static String
urlEncode
(String content, TestContext context) Runs URL encode function with arguments.
-
Method Details
-
currentDate
Runs current date function with arguments.- Returns:
-
currentDate
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
Runs change date function with arguments.- Parameters:
date
-dateOffset
-- Returns:
-
encodeBase64
Runs encode base 64 function with arguments.- Returns:
-
encodeBase64
Runs encode base 64 function with arguments.- Returns:
-
decodeBase64
Runs decode base 64 function with arguments.- Returns:
-
decodeBase64
Runs decode base 64 function with arguments.- Returns:
-
urlEncode
Runs URL encode function with arguments.- Returns:
-
urlEncode
Runs URL encode function with arguments.- Returns:
-
urlDecode
Runs URL decode function with arguments.- Returns:
-
urlDecode
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
Runs random UUID function with arguments.- Returns:
-
randomNumber
Runs random number function with arguments.- Parameters:
length
-- Returns:
-
randomNumber
Runs random number function with arguments.- Parameters:
length
-padding
-- Returns:
-
randomString
Runs random string function with arguments.- Parameters:
numberOfLetters
-- Returns:
-
randomString
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
Runs random string function with arguments.- Parameters:
numberOfLetters
-notationMethod
-- Returns:
-
readFile
Reads the file resource and returns the complete file content.- Parameters:
filePath
-- Returns:
-
unixTimestamp
Runs unix timestamp function with arguments.- Returns:
-