abstract class AbstractFakeDataProvider<T : FakeDataProvider> : FakeDataProvider, Any

Abstract class for all concrete FakeDataProvider's that do not use yml files as data source.

Fields

Name Description
protected abstract category: Category

Category of this fake data provider class.

protected abstract localUniqueDataProvider: LocalUniqueDataProvider<T>

A LocalUniqueDataProvider instance that is used with this unique provider.

abstract unique: T

An instance of T for generating unique values

protected fakerService: FakerService

Methods

clear

fun clear(name: String)

Clears used unique values for the function name of this provider.

Parameters

Name Description
name: String

ReturnValue

Name Description
Unit

clearAll

fun clearAll()

Clears all used unique values of this provider.

ReturnValue

Name Description
Unit

resolveUniqueValue

protected fun resolveUniqueValue(primaryKey: String, result: ()->String): String

Parameters

Name Description
primaryKey: String
result: ()->String

ReturnValue

Name Description
String

resolveUniqueValue

protected fun resolveUniqueValue(primaryKey: String, secondaryKey: String?, result: ()->String): String

Parameters

Name Description
primaryKey: String
secondaryKey: String?
result: ()->String

ReturnValue

Name Description
String

resolveUniqueValue

protected fun resolveUniqueValue(primaryKey: String, secondaryKey: String?, thirdKey: String?, result: ()->String): String

Parameters

Name Description
primaryKey: String
secondaryKey: String?
thirdKey: String?
result: ()->String

ReturnValue

Name Description
String

resolveUniqueValue

protected fun <T> resolveUniqueValue(primaryKey: String, result: ()->T): T

Parameters

Name Description
primaryKey: String
result: ()->T

ReturnValue

Name Description
T