fixture

fun <T> PublicApi.Fixture.fixture(iterable: Iterable<T>): T

Picks an value from a given Iterable.

Parameters

T

the type which is supposed to be created.

iterable
  • an iterable with values where to pick from.

inline fun <T> PublicApi.Fixture.fixture(qualifier: PublicApi.Qualifier? = null): T

Creates a value for a given type, excluding generics like List or Array.

Parameters

T

the type which is supposed to be created.

qualifier

a optional qualifier for a special flavour of a type.

Throws

kotlin.IllegalStateException

if the no matching Generator was found for the given type.

@JvmName(name = mutableListFixtureAlias)
inline fun <C : MutableList<T>, T> PublicApi.Fixture.fixture(type: KClass<MutableList<*>>, qualifier: PublicApi.Qualifier? = null, size: Int? = null): C

Creates a MutableList of values for a given type.

Parameters

T

the type which is supposed to be created.

C

the enclosing List.

type

the identifying type of the generic.

qualifier

a optional qualifier for a special flavour of a type.

size

the size of the List.

Throws

kotlin.IllegalStateException

if the no matching Generator was found for the given type.

@JvmName(name = listFixtureAlias)
inline fun <C : List<T>, T> PublicApi.Fixture.fixture(type: KClass<List<*>>, qualifier: PublicApi.Qualifier? = null, size: Int? = null): C

Creates a List of values for a given type.

Parameters

T

the type which is supposed to be created.

C

the enclosing List.

type

the identifying type of the generic.

qualifier

a optional qualifier for a special flavour of a type.

size

the size of the List.

Throws

kotlin.IllegalStateException

if the no matching Generator was found for the given type.

@JvmName(name = mutableCollectionFixtureAlias)
inline fun <C : MutableCollection<T>, T> PublicApi.Fixture.fixture(type: KClass<MutableCollection<*>>, qualifier: PublicApi.Qualifier? = null, size: Int? = null): C

Creates a MutableCollection of values for a given type.

Parameters

T

the type which is supposed to be created.

C

the enclosing Collection.

type

the identifying type of the generic.

qualifier

a optional qualifier for a special flavour of a type.

size

the size of the Collection.

Throws

kotlin.IllegalStateException

if the no matching Generator was found for the given type.

@JvmName(name = collectionFixtureAlias)
inline fun <C : Collection<T>, T> PublicApi.Fixture.fixture(type: KClass<Collection<*>>, qualifier: PublicApi.Qualifier? = null, size: Int? = null): C

Creates an Collection of values for a given type.

Parameters

T

the type which is supposed to be created.

C

the enclosing Collection.

type

the identifying type of the generic.

qualifier

a optional qualifier for a special flavour of a type.

size

the size of the Collection.

Throws

kotlin.IllegalStateException

if the no matching Generator was found for the given type.

@JvmName(name = arrayListFixtureAlias)
inline fun <T> PublicApi.Fixture.fixture(type: KClass<Array<*>>, qualifier: PublicApi.Qualifier? = null, size: Int? = null): Array<T>

Creates a Array of values for a given type.

Parameters

T

the type which is supposed to be created.

type

the identifying type of the generic.

qualifier

a optional qualifier for a special flavour of a type.

size

the size of the Array.

Throws

kotlin.IllegalStateException

if the no matching Generator was found for the given type.

@JvmName(name = sequenceFixtureAlias)
inline fun <C : Sequence<T>, T> PublicApi.Fixture.fixture(type: KClass<Sequence<*>>, qualifier: PublicApi.Qualifier? = null, size: Int? = null): C

Creates a Sequence of values for a given type.

Parameters

T

the type which is supposed to be created.

C

the enclosing Sequence.

type

the identifying type of the generic.

qualifier

a optional qualifier for a special flavour of a type.

size

the size of the Sequence.

Throws

kotlin.IllegalStateException

if the no matching Generator was found for the given type.

@JvmName(name = pairFixtureAlias)
inline fun <C : Pair<First, Second>, First, Second> PublicApi.Fixture.fixture(type: KClass<Pair<*, *>>, firstQualifier: PublicApi.Qualifier? = null, secondQualifier: PublicApi.Qualifier? = null): C

Creates a Pair of values for given types.

Parameters

First
  • the type which is supposed to be created for the first value.

Second
  • the type which is supposed to be created for the second value.

C

the enclosing Pair.

type

the identifying type of the generic.

firstQualifier
  • a optional qualifier for a special flavour of a type of the first value.

secondQualifier
  • a optional qualifier for a special flavour of a type of the second value.

Throws

kotlin.IllegalStateException

if the no matching Generator was found for the given type.

@JvmName(name = tripleFixtureAlias)
inline fun <C : Triple<First, Second, Third>, First, Second, Third> PublicApi.Fixture.fixture(type: KClass<Triple<*, *, *>>, firstQualifier: PublicApi.Qualifier? = null, secondQualifier: PublicApi.Qualifier? = null, thirdQualifier: PublicApi.Qualifier? = null): C

Creates a Triple of values for given types.

Parameters

First

the type which is supposed to be created for the first value.

Second

the type which is supposed to be created for the second value.

Third

the type which is supposed to be created for the third value.

C

the enclosing Triple.

type

the identifying type of the generic.

firstQualifier

a optional qualifier for a special flavour of a type of the first value.

secondQualifier

a optional qualifier for a special flavour of a type of the second value.

thirdQualifier

a optional qualifier for a special flavour of a type of the third value.

Throws

kotlin.IllegalStateException

if the no matching Generator was found for the given type.

@JvmName(name = mapFixtureAlias)
inline fun <C : Map<Key, Value>, Key, Value> PublicApi.Fixture.fixture(type: KClass<Map<*, *>>, keyQualifier: PublicApi.Qualifier? = null, valueQualifier: PublicApi.Qualifier? = null, size: Int? = null): C

Creates a Map of values for given types.

Parameters

Key

the type which is supposed to be created for the key value.

Value

the type which is supposed to be created for the value.

C

the enclosing Map.

type

the identifying type of the generic.

keyQualifier

a optional qualifier for a special flavour of a type of the key value.

valueQualifier

a optional qualifier for a special flavour of a type of the value.

size

the size of the Map.

Throws

kotlin.IllegalStateException

if the no matching Generator was found for the given type.

@JvmName(name = mutableMapFixtureAlias)
inline fun <C : MutableMap<Key, Value>, Key, Value> PublicApi.Fixture.fixture(type: KClass<MutableMap<*, *>>, keyQualifier: PublicApi.Qualifier? = null, valueQualifier: PublicApi.Qualifier? = null, size: Int? = null): C

Creates a MutableMap of values for given types.

Parameters

Key

the type which is supposed to be created for the key value.

Value

the type which is supposed to be created for the value.

C

the enclosing Map.

type

the identifying type of the generic.

keyQualifier

a optional qualifier for a special flavour of a type of the key value.

valueQualifier

a optional qualifier for a special flavour of a type of the value.

size

the size of the Map.

Throws

kotlin.IllegalStateException

if the no matching Generator was found for the given type.

@JvmName(name = mutableSetFixtureAlias)
inline fun <C : MutableSet<T>, T> PublicApi.Fixture.fixture(type: KClass<MutableSet<*>>, qualifier: PublicApi.Qualifier? = null, size: Int? = null): C

Creates a MutableSet of values for given types.

Parameters

T

the type which is supposed to be created for the value.

C

the enclosing Set.

type

the identifying type of the generic.

qualifier

a optional qualifier for a special flavour of a type of the value.

size

the size of the Set.

Throws

kotlin.IllegalStateException

if the no matching Generator was found for the given type.

@JvmName(name = setFixtureAlias)
inline fun <C : Set<T>, T> PublicApi.Fixture.fixture(type: KClass<Set<*>>, qualifier: PublicApi.Qualifier? = null, size: Int? = null): C

Creates a Set of values for given types.

Parameters

T

the type which is supposed to be created for the value.

C

the enclosing Set.

type

the identifying type of the generic.

qualifier

a optional qualifier for a special flavour of a type of the value.

size

the size of the Set.

Throws

kotlin.IllegalStateException

if the no matching Generator was found for the given type.