-
Notifications
You must be signed in to change notification settings - Fork 182
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
Garment Size Test Tweak #657
Conversation
Check the the value returned is one of the expected values, vs just not empty. Signed-off-by: kingthorin <kingthorin@users.noreply.github.com>
|
assertThat(faker.garmentSize().size()).isNotEmpty(); | ||
void testSize() { | ||
// Given | ||
List<String> actualSizes = getActualSizes(); |
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.
I had considered doing this as:
List<String> actualSizes = List.of("XS", "S", "M", "L", "XL", "XXL", "XXXL");
Since it's likely always a small set of values, but I kept waffling back and forth. So let me know which form you like better.
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.
Oh I just realized that List.of wouldn’t have been good for your Java 8 support. Still coulda declared it more inline’ishly.
I'm sure there's lots of testing that could be more specific like this. This one just caught my eye for some reason. If this is merged I'm happy to tackle more. |
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 #657 +/- ##
============================================
+ Coverage 92.73% 92.77% +0.04%
- Complexity 2623 2626 +3
============================================
Files 281 281
Lines 5397 5415 +18
Branches 589 589
============================================
+ Hits 5005 5024 +19
- Misses 241 242 +1
+ Partials 151 149 -2
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Hi @kingthorin , there's quite a few tests which hardly test anything, so this is a great contribution, thank you! |
Check the the value returned is one of the expected values, vs just not empty.
Signed-off-by: kingthorin kingthorin@users.noreply.github.com