Package com.consol.citrus.functions.core
Class RandomNumberFunction
- java.lang.Object
-
- com.consol.citrus.functions.core.RandomNumberFunction
-
- All Implemented Interfaces:
com.consol.citrus.functions.Function
public class RandomNumberFunction extends Object implements com.consol.citrus.functions.Function
Function returning a random numeric value. Argument specifies the number of digits and padding boolean flag.- Author:
- Christoph Deppisch
-
-
Constructor Summary
Constructors Constructor Description RandomNumberFunction()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static String
checkLeadingZeros(String generated, boolean paddingOn)
Remove leading Zero numbers.String
execute(List<String> parameterList, com.consol.citrus.context.TestContext context)
static String
getRandomNumber(int numberLength, boolean paddingOn)
Static number generator method.
-
-
-
Method Detail
-
execute
public String execute(List<String> parameterList, com.consol.citrus.context.TestContext context)
- Specified by:
execute
in interfacecom.consol.citrus.functions.Function
- Throws:
com.consol.citrus.exceptions.InvalidFunctionUsageException
- See Also:
Function.execute(java.util.List, com.consol.citrus.context.TestContext)
-
getRandomNumber
public static String getRandomNumber(int numberLength, boolean paddingOn)
Static number generator method.- Parameters:
numberLength
-paddingOn
-- Returns:
-
-