Conversation
Codecov Report
@@ Coverage Diff @@
## develop #28 +/- ##
=============================================
+ Coverage 94.78% 95.01% +0.22%
- Complexity 138 210 +72
=============================================
Files 26 40 +14
Lines 307 461 +154
Branches 50 70 +20
=============================================
+ Hits 291 438 +147
- Misses 5 9 +4
- Partials 11 14 +3
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
refactor this method
it can be implemented in a single line of code
There was a problem hiding this comment.
why this method is called size ?
| * @param scannedAccount of String type. | ||
| * @return true. | ||
| */ | ||
| private static boolean sizeImageIsValid(final String scannedAccount) { |
| * @return true if the checksum is ok. | ||
| */ | ||
|
|
||
| public static boolean validate(final String eAN) { |
There was a problem hiding this comment.
refactor this code
avoid the else condition
| * @param stringNumber number | ||
| * @return true if stringNumber length is exactly 13. | ||
| */ | ||
| public static boolean checkCorrectLength(final String stringNumber) { |
There was a problem hiding this comment.
Remove this class since you will add unit tests
| final boolean actualResult = EANValidator.validate(eanStringNumber); | ||
|
|
||
| // then: | ||
| assertTrue(!actualResult); |
There was a problem hiding this comment.
first argument should be expectedResult and the second argument should be actualResult
| @Test | ||
| public void testRentalEmpty() { | ||
| // given: | ||
| Customer customer = new Customer("Test"); |
There was a problem hiding this comment.
you are repeating this code in all your test
Consider put it in a @before method
There was a problem hiding this comment.
Do we need this test class?
There was a problem hiding this comment.
@AT-03/at-03
Do we need this unit tests?
| @Test | ||
| public void testCalculateAmountWhenTheRentedDaysIsLessThanThree() { | ||
| // given: | ||
| NewRelease newReleaseInstance = new NewRelease("Test"); |
There was a problem hiding this comment.
@AT-03/at-03
what is wrong here?
| */ | ||
| public class RentalTest { | ||
|
|
||
| private Movie movie = new Movie("test") { |
There was a problem hiding this comment.
@AT-03/at-03
what is wrong here?
| * @param numberAccount image of type String. | ||
| * @return <code>true</code> \\ <code>false</code> | ||
| */ | ||
| private static boolean isCorrectLength(final String numberAccount) { |
There was a problem hiding this comment.
you can still refactor this
all katas of the coding.