StringForgery - xgouchet/Elmyr GitHub Wiki
@Target([AnnotationTarget.VALUE_PARAMETER, AnnotationTarget.FIELD, AnnotationTarget.PROPERTY]) annotation class StringForgery
Mark a field, property or method parameter as a String forgery.
Parameters
type
- the StringForgeryType of String to forge (StringForgeryType.ALPHABETICAL by default)
case
- the case to use (Case.ANY by default, doesn't apply to regex). This will only be used for the
following types :
StringForgeryType.ALPHABETICAL, StringForgeryType.ALPHA_NUMERICAL, StringForgeryType.NUMERICAL,
StringForgeryType.HEXADECIMAL
size
- the size of the String, or -1 for a random size (doesn't apply to regex).
regex
- the regex pattern to match (leave empty to use the type, case and size instead).
Constructors
<init>
StringForgery(type:
StringForgeryType
= StringForgeryType.ALPHABETICAL, case:
Case
= Case.ANY, size:
Int
= -1, regex:
String
= "")
Mark a field, property or method parameter as a String forgery.
Parameters
type
- the StringForgeryType of String to forge (StringForgeryType.ALPHABETICAL by default)
case
- the case to use (Case.ANY by default, doesn't apply to regex). This will only be used for the
following types :
StringForgeryType.ALPHABETICAL, StringForgeryType.ALPHA_NUMERICAL, StringForgeryType.NUMERICAL,
StringForgeryType.HEXADECIMAL
size
- the size of the String, or -1 for a random size (doesn't apply to regex).
regex
- the regex pattern to match (leave empty to use the type, case and size instead).
Properties
case
val case:
Case
the case to use (Case.ANY by default, doesn't apply to regex). This will only be used for the following types : StringForgeryType.ALPHABETICAL, StringForgeryType.ALPHA_NUMERICAL, StringForgeryType.NUMERICAL, StringForgeryType.HEXADECIMAL
regex
val regex:
String
the regex pattern to match (leave empty to use the type, case and size instead).
size
val size:
Int
the size of the String, or -1 for a random size (doesn't apply to regex).
type
val type:
StringForgeryType
the StringForgeryType of String to forge (StringForgeryType.ALPHABETICAL by default)