Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unique generation config #52

Merged
merged 16 commits into from
Dec 13, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Configure GlobalUniqueDataProvider through configuration class
This deprecates some of the functionality of GlobalUniqueDataProvider
that was moved to the UniqueProviderConfiguration.
  • Loading branch information
serpro69 committed Dec 12, 2020
commit a935de1dd7ebc94d61f294883aa8cfc296f7f156
Original file line number Diff line number Diff line change
Expand Up @@ -141,11 +141,11 @@ abstract class AbstractFakeDataProvider<T : FakeDataProvider> internal construct
)
}
}
} else if (!globalUniqueProvider.markedUnique.contains(this::class)) {
} else if (!globalUniqueProvider.config.markedUnique.contains(this::class)) {
// if global unique provider is not enabled for this category -> return result
result
} else {
val usedValuesMap = requireNotNull(globalUniqueProvider.usedValues[this::class])
val usedValuesMap = requireNotNull(globalUniqueProvider.config.usedValues[this::class])
when (val set = usedValuesMap[key]) {
null -> {
usedValuesMap[key] = mutableSetOf(result)
Expand Down
Loading