Skip to content

FactorySetProperty

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

class FactorySetProperty<T : Any> : ForgeryProperty<Set<T>>

This class implements a ReadOnlyProperty, forging a random set of 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>

FactorySetProperty(clazz: Class<T>)

This class implements a ReadOnlyProperty, forging a random set of 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): Set<T>

Inheritdoc

Companion Object Functions

factorySetForgery

fun <reified T : Any> factorySetForgery(): ForgeryProperty<Set<T>>

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

Parameters

T - the type of the object to forge