-
Notifications
You must be signed in to change notification settings - Fork 198
OscarMovie should store rules to access data but not the actual field names #742
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
Conversation
PR Summary
|
Codecov Report
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more @@ Coverage Diff @@
## main #742 +/- ##
=========================================
Coverage 92.82% 92.82%
- Complexity 2586 2589 +3
=========================================
Files 281 281
Lines 5126 5126
Branches 530 530
=========================================
Hits 4758 4758
Misses 239 239
Partials 129 129
... and 4 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
faker.stream(() -> f.apply(oscarMovie)).len(10).build() | ||
.<Stream<?>>get().collect(Collectors.toSet())) | ||
.hasSizeGreaterThan(1); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't really test that the values aren't consistent, just that something is generated. (Or I'm missing something?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the problem was that it generated same values for a series of invocations like
Faker faker = new Faker();
String movie1 = faker.oscarMovie().movieName();
String movie2 = faker.oscarMovie().movieName();
String movie3 = faker.oscarMovie().movieName();
before that fix it generates same values for all 3 vars.
So the test checks that the generated value are not same after 10 times of invocations
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry missed it was collecting to set which would mean unique entries. Tks
The issue is that
OscarMovie
stores field names inyear
,choice
,str
which are used to find out the next result.Providers should not do that, so just replace it with suppliers storing only the rules how to get such data but not the actual field names
fixes #741