Skip to content

AdvancedForgery

Xavier Gouchet edited this page Apr 14, 2021 · 2 revisions

@Target([AnnotationTarget.VALUE_PARAMETER, AnnotationTarget.FIELD, AnnotationTarget.PROPERTY]) annotation class AdvancedForgery

Mark a field, property or method parameter as an advanced forgery.

Advanced allow you to provide a list of ways the forgery can be created. Only one of each parameter can be provided.

Parameters

string - describes all the way a String can be forged

int - describes all the way a Int can be forged

long - describes all the way a Long can be forged

float - describes all the way a Float can be forged

double - describes all the way a Double can be forged

map - describes all the way a Map can be forged

pair - describes all the way a Pair can be forged

Constructors

<init>

AdvancedForgery(string: Array<StringForgery> = emptyArray(), int: Array<IntForgery> = emptyArray(), long: Array<LongForgery> = emptyArray(), float: Array<FloatForgery> = emptyArray(), double: Array<DoubleForgery> = emptyArray(), map: Array<MapForgery> = emptyArray(), pair: Array<PairForgery> = emptyArray())

Mark a field, property or method parameter as an advanced forgery.

Advanced allow you to provide a list of ways the forgery can be created. Only one of each parameter can be provided.

Parameters

string - describes all the way a String can be forged

int - describes all the way a Int can be forged

long - describes all the way a Long can be forged

float - describes all the way a Float can be forged

double - describes all the way a Double can be forged

map - describes all the way a Map can be forged

pair - describes all the way a Pair can be forged

Properties

double

val double: Array<DoubleForgery>

describes all the way a Double can be forged

float

val float: Array<FloatForgery>

describes all the way a Float can be forged

int

val int: Array<IntForgery>

describes all the way a Int can be forged

long

val long: Array<LongForgery>

describes all the way a Long can be forged

map

val map: Array<MapForgery>

describes all the way a Map can be forged

pair

val pair: Array<PairForgery>

describes all the way a Pair can be forged

string

val string: Array<StringForgery>

describes all the way a String can be forged