-
Notifications
You must be signed in to change notification settings - Fork 0
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
Merge master with UnitTests and Code Coverage #8
Conversation
getCalendarWithTime, isWithinRange method tested
small modifications in HabitoDateUtils unit tests
Unit tests written for Habit modell class Removed final modifier from HabitRecord
…t classes to increase code coverage.
Bugfix: HabitoStringUtils.capitalize method crashed when passed empty string as parameter.
…to increase code coverage.
…t method names, removed unused imports and variables, corrected a typo)
…class references, renamed methods to start with lowercase letters)
@@ -5,7 +5,7 @@ | |||
public final class HabitoStringUtils { | |||
|
|||
public static String capitalized(@NonNull final String string) { | |||
return string.substring(0, 1).toUpperCase() + string.substring(1); | |||
return string.isEmpty() ? string : string.substring(0, 1).toUpperCase() + string.substring(1); |
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.
Good catch.
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.
The overall project quality has been greatly improved (according to the Codacy review), but line coverage could use a lot of work still, especially in the model classes.
Approving the request, because the work done here is correct.
Pull request to merge master with the added tests, modifications, bugfixes