Skip to content

FactoryProperty

Xavier Gouchet edited this page Feb 17, 2020 · 1 revision

class FactoryProperty<T : Any> : ForgeryProperty<T>

This class implements a ReadOnlyProperty, forging a random object with a factory provided to the forge.

Parameters

T - the type of the object to forge

clazz - the class of the type to be forged

Constructors

<init>

FactoryProperty(clazz: Class<T>)

This class implements a ReadOnlyProperty, forging a random object with a factory provided to the forge.

Parameters

T - the type of the object to forge

clazz - the class of the type to be forged

Functions

getForgery

fun getForgery(forge: Forge): T

Inheritdoc

Companion Object Functions

factoryForgery

fun <reified T : Any> factoryForgery(): ForgeryProperty<T>

Creates a ReadOnlyProperty that will forge a random object with a factory provided to the Forge.

Parameters

T - the type of the object to forge

Clone this wiki locally