class UniqueProviderConfiguration: Any
Methods
disable
fun <T : FakeDataProvider> disable(providerFunction: KProperty0<T>)
Disables generation of unique values for providerFunction of T provider.
Parameters
Name | Description |
---|---|
providerFunction: KProperty0<T>
|
a KProperty0 of the provider function that generates a value,
for example |
ReturnValue
Name | Description |
---|---|
Unit
|
disableAll
fun disableAll()
Disables unique generation of values for all providers, and clears all already used (returned) values and any exclusion patterns.
ReturnValue
Name | Description |
---|---|
Unit
|
enable
fun <T : FakeDataProvider> enable(providerFunction: KProperty0<T>, config: UniqueProviderConfiguration.()->Unit)
Enable generation of unique values for providerFunction of T provider.
Parameters
Name | Description |
---|---|
providerFunction: KProperty0<T>
|
a KProperty0 of the provider function that generates a value,
for example |
config: UniqueProviderConfiguration.()->Unit
|
ReturnValue
Name | Description |
---|---|
Unit
|
enable
fun <T : FakeDataProvider> enable(providerFunction: KProperty0<T>)
Enable generation of unique values for providerFunction of T provider.
Parameters
Name | Description |
---|---|
providerFunction: KProperty0<T>
|
a KProperty0 of the provider function that generates a value,
for example |
ReturnValue
Name | Description |
---|---|
Unit
|
excludeFromFunction
fun <T : FakeDataProvider> excludeFromFunction(providerFunction: KFunction1<T, String>, values: List<String>)
Exclude values from being generated with function providerFunction in provider T.
Parameters
Name | Description |
---|---|
providerFunction: KFunction1<T, String>
|
provider function that generates a value,
for example |
values: List<String>
|
values that should not be generated when calling the providerFunction in provider T |
ReturnValue
Name | Description |
---|---|
Unit
|
excludeFromFunction
fun <T : FakeDataProvider> excludeFromFunction(funcName: String, values: List<String>)
Exclude values from being generated with function funcName in provider T.
Parameters
Name | Description |
---|---|
funcName: String
|
name of the function that generates a value,
for example |
values: List<String>
|
values that should not be generated when calling the funcName function in provider T |
ReturnValue
Name | Description |
---|---|
Unit
|
excludeFromFunction
fun <T : FakeDataProvider> excludeFromFunction(funcName: String, vararg values: String)
Exclude values from being generated with function funcName in provider T.
Parameters
Name | Description |
---|---|
funcName: String
|
name of the function that generates a value,
for example |
vararg values: String
|
values that should not be generated when calling the funcName function in provider T |
ReturnValue
Name | Description |
---|---|
Unit
|
excludeFromFunction
inline fun <T : FakeDataProvider> excludeFromFunction(providerFunction: KFunction1<T, String>, patterns: ()->List<Regex>)
Exclude a values from being generated by Regex patterns when a providerFunction in provider T is called
Parameters
Name | Description |
---|---|
providerFunction: KFunction1<T, String>
|
provider function that generates a value,
for example |
patterns: ()->List<Regex>
|
a function that does not take any arguments and returns a List of Regexes |
ReturnValue
Name | Description |
---|---|
Unit
|
excludeFromFunction
inline fun <T : FakeDataProvider> excludeFromFunction(funcName: String, patterns: ()->List<Regex>)
Exclude a values from being generated by Regex patterns when a funcName in provider T is called
Parameters
Name | Description |
---|---|
funcName: String
|
provider function that generates a value,
for example |
patterns: ()->List<Regex>
|
a function that does not take any arguments and returns a List of Regexes |
ReturnValue
Name | Description |
---|---|
Unit
|
excludeFromFunction
fun <T : FakeDataProvider> excludeFromFunction(funcName: String, vararg patterns: Regex)
Exclude a values from being generated by Regex patterns when a funcName in provider T is called
Parameters
Name | Description |
---|---|
funcName: String
|
provider function that generates a value,
for example |
vararg patterns: Regex
|
Regexes to use to exclude generated values |
ReturnValue
Name | Description |
---|---|
Unit
|
excludeFromProvider
fun <T : FakeDataProvider> excludeFromProvider(values: List<String>)
Exclude values from being generated with in provider T.
Parameters
Name | Description |
---|---|
values: List<String>
|
values that should not be generated when calling any of the functions in provider T |
ReturnValue
Name | Description |
---|---|
Unit
|
excludeFromProvider
fun <T : FakeDataProvider> excludeFromProvider(vararg values: String)
Exclude values from being generated with in provider T.
Parameters
Name | Description |
---|---|
vararg values: String
|
values that should not be generated when calling any of the functions in provider T |
ReturnValue
Name | Description |
---|---|
Unit
|
excludeFromProvider
inline fun <T : FakeDataProvider> excludeFromProvider(patterns: ()->List<Regex>)
Exclude a values from being generated by Regex patterns in provider T.
Parameters
Name | Description |
---|---|
patterns: ()->List<Regex>
|
a function that does not take any arguments and returns a List of Regexes |
ReturnValue
Name | Description |
---|---|
Unit
|
exclude
fun exclude(values: List<String>)
Exclude values from being generated.
This applies to ALL providers that are enabled for unique value generation.
Parameters
Name | Description |
---|---|
values: List<String>
|
ReturnValue
Name | Description |
---|---|
Unit
|
exclude
fun exclude(func: ()->List<Regex>)
Exclude a values from being generated by Regex patterns.
This applies to ALL providers that are enabled for unique value generation.
Parameters
Name | Description |
---|---|
func: ()->List<Regex>
|
a function that does not take any arguments and returns a List of Regexes |
ReturnValue
Name | Description |
---|---|
Unit
|
Provides configuration for Unique Generation of values.