Apply comparison against yaml file content for tests within entertainment package#677
Conversation
| package net.datafaker.providers.entertainment; | ||
|
|
||
| import org.junit.jupiter.api.Test; | ||
| import net.datafaker.providers.base.GratefulDead; |
There was a problem hiding this comment.
Should this be moved into the entertainment package?
There was a problem hiding this comment.
good catch
done, thanks
| @Test | ||
| void wookieWords() { | ||
| assertThat(faker.starWars().wookieWords()).isNotEmpty(); | ||
| void alternativeSpelling() { |
There was a problem hiding this comment.
This can’t be done the new way? (I’m on my
Phone and couldn’t check the code or data file
There was a problem hiding this comment.
There are some methods in different classes including this one which are a bit trickier under the hood...
e.g. this method looks like
public String alternateCharacterSpelling() {
return resolve("star_wars.alternate_character_spellings." + CHARACTERS[faker.random().nextInt(CHARACTERS.length)]);
}so it requires some more sophisticated handling...
I would rather migrate everything that's possible to new way and then try to handle the rest
|
Thanks for tackling this FYI any tests in the base package that used regex I just skipped over. I’ll have a better look at them and decide if others should be moved to the new infrastructure. |
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 #677 +/- ##
============================================
- Coverage 92.83% 92.76% -0.08%
+ Complexity 2647 2645 -2
============================================
Files 285 285
Lines 5445 5445
Branches 590 590
============================================
- Hits 5055 5051 -4
- Misses 241 243 +2
- Partials 149 151 +2
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
yes, some of them are tricky... |
The PR applies comparison against yaml file content for tests in entertainment package.
P.S. Probably later will do for others