-
Notifications
You must be signed in to change notification settings - Fork 30
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
Provide affected lines for code delta #404
Conversation
Codecov Report
@@ Coverage Diff @@
## master #404 +/- ##
============================================
+ Coverage 68.44% 68.74% +0.29%
- Complexity 365 369 +4
============================================
Files 48 48
Lines 1160 1171 +11
Branches 100 100
============================================
+ Hits 794 805 +11
Misses 325 325
Partials 41 41
Continue to review full report at Codecov.
|
public Change(final ChangeEditType changeEditType, final int fromLine, final int toLine) { | ||
this.changeEditType = changeEditType; | ||
this.fromLine = fromLine; | ||
this.toLine = toLine; | ||
} | ||
|
||
/** |
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 this(...)
to initialize the deprecated constructor
Change change = createChange(); | ||
assertThat(change.getEditType()).isEqualTo(EDIT_TYPE); | ||
assertThat(change.getChangedFromLine()).isEqualTo(CHANGED_FROM_LINE); |
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.
It would be more fluent if you could use the custom assertions. So:
assertThat(change.getChangedFromLine()).isEqualTo(CHANGED_FROM_LINE); | |
assertThat(change).hasChangedFromLine(CHANGED_FROM_LINE) | |
.hasChangedToLine(...) | |
...; |
I expanded the code delta API that it also provides the affected lines, which will be changed by a new commit, as they were before the change has been made.