Class RandomNumberFunction
java.lang.Object
org.citrusframework.functions.core.RandomNumberFunction
- All Implemented Interfaces:
org.citrusframework.functions.Function,org.citrusframework.functions.ParameterizedFunction<RandomNumberFunction.Parameters>
public class RandomNumberFunction
extends Object
implements org.citrusframework.functions.ParameterizedFunction<RandomNumberFunction.Parameters>
Function returning a random numeric value. Argument specifies the number of digits and
padding boolean flag.
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface org.citrusframework.functions.ParameterizedFunction
org.citrusframework.functions.ParameterizedFunction.FunctionParameters -
Field Summary
Fields inherited from interface org.citrusframework.functions.Function
functions, logger, RESOURCE_PATH -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringcheckLeadingZeros(String generated, boolean paddingOn) Remove leading Zero numbers.execute(RandomNumberFunction.Parameters params, org.citrusframework.context.TestContext context) static StringgetRandomNumber(int numberLength, boolean paddingOn) Static number generator method.static StringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.citrusframework.functions.ParameterizedFunction
execute
-
Constructor Details
-
RandomNumberFunction
public RandomNumberFunction()
-
-
Method Details
-
execute
public String execute(RandomNumberFunction.Parameters params, org.citrusframework.context.TestContext context) - Specified by:
executein interfaceorg.citrusframework.functions.ParameterizedFunction<RandomNumberFunction.Parameters>
-
getRandomNumber
-
getRandomNumber
Static number generator method. -
checkLeadingZeros
Remove leading Zero numbers. -
getParameters
- Specified by:
getParametersin interfaceorg.citrusframework.functions.ParameterizedFunction<RandomNumberFunction.Parameters>
-