-
Notifications
You must be signed in to change notification settings - Fork 31
Add a unit test for RelativeCountCommitStatisticsSeriesBuilder
#352
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
Add a unit test for RelativeCountCommitStatisticsSeriesBuilder
#352
Conversation
Codecov Report
@@ Coverage Diff @@
## master #352 +/- ##
============================================
+ Coverage 50.04% 55.44% +5.39%
- Complexity 253 271 +18
============================================
Files 42 42
Lines 1093 1093
Branches 92 92
============================================
+ Hits 547 606 +59
+ Misses 510 450 -60
- Partials 36 37 +1
Continue to review full report at Codecov.
|
import static org.mockito.Mockito.*; | ||
|
||
class RelativeCountCommitStatisticsSeriesBuilderTest { | ||
|
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.
assertThat(result.get("commits")).isEqualTo(7); | ||
assertThat(result.get("authors")).isEqualTo(11); | ||
assertThat(result.get("files")).isEqualTo(17); |
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.
Use the constants of the builder
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.
A simpler way would be:
assertThat(result)
.containsEntry(COMMITS, 7)
.containsEntry(AUTHORS, 11);
RelativeCountCommitStatisticsSeriesBuilder
RelativeCountCommitStatisticsSeriesBuilder
static final String COMMITS = "commits"; | ||
static final String AUTHORS = "authors"; | ||
static final String FILES = "files"; |
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.
No description provided.