Add ability to use whitelist conditions#1668
Conversation
PR Summary
|
994d588 to
2444351
Compare
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1668 +/- ##
============================================
- Coverage 92.45% 92.44% -0.02%
- Complexity 3388 3396 +8
============================================
Files 333 333
Lines 6697 6714 +17
Branches 665 666 +1
============================================
+ Hits 6192 6207 +15
- Misses 346 350 +4
+ Partials 159 157 -2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
To be honest, I don't understand why it's needed. Do I correctly understand that
But if you don't need names, just don't call |
| } | ||
|
|
||
| public BaseFaker(FakeValuesService fakeValuesService, FakerContext context) { | ||
| this(fakeValuesService, context, null); |
There was a problem hiding this comment.
A minor thing: maybe instead of null, it's better to pass a Predicate that always returns true? (to avoid potential NPEs and simplify the logic)
yes
it works if you control the input however if input comes from a third party then you can not say just don't call smth... or even if you say you can not be sure in it |
Sometimes especially for prod systems it is required to have kind of limitations like whitelist or blacklist for providers.
Instead of having both, just add predicate where condition could be supplied
without predicate it behaves as before