-
-
Notifications
You must be signed in to change notification settings - Fork 10.2k
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
Test coverage #4280
Test coverage #4280
Conversation
Codecov Report
@@ Coverage Diff @@
## master #4280 +/- ##
============================================
+ Coverage 52.56% 53.12% +0.56%
- Complexity 2641 2666 +25
============================================
Files 488 488
Lines 15253 15253
Branches 1577 1577
============================================
+ Hits 8017 8103 +86
+ Misses 6685 6593 -92
- Partials 551 557 +6
Continue to review full report at Codecov.
|
public void testMapByKeyEmptyList() { | ||
List<Integer> someList = new ArrayList<>(); | ||
assertNotNull(BeanUtils.mapByKey(null, someList)); | ||
|
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.
List<KeyClass> someList = new ArrayList<>(); | ||
someList.add(new KeyClass()); | ||
assertNotNull(BeanUtils.mapByKey("keys", someList)); | ||
|
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.
List<KeyClass> someList = new ArrayList<>(); | ||
someList.add(new KeyClass()); | ||
assertNotNull(BeanUtils.mapByKey("wrongKey", someList)); | ||
|
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.
public void testAggByKeyToListEmpty() { | ||
List<KeyClass> someList = new ArrayList<>(); | ||
assertNotNull(BeanUtils.aggByKeyToList("keys", someList)); | ||
|
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.
List<KeyClass> someList = new ArrayList<>(); | ||
someList.add(new KeyClass()); | ||
assertNotNull(BeanUtils.aggByKeyToList("keys", someList)); | ||
|
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.
public void testToPropertySetEmpty() { | ||
List<KeyClass> someList = new ArrayList<>(); | ||
assertNotNull(BeanUtils.toPropertySet("keys", someList)); | ||
|
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.
List<KeyClass> someList = new ArrayList<>(); | ||
someList.add(new KeyClass()); | ||
assertNotNull(BeanUtils.toPropertySet("keys", someList)); | ||
|
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.
List<KeyClass> someList = new ArrayList<>(); | ||
someList.add(new KeyClass()); | ||
assertNotNull(BeanUtils.toPropertySet("wrongKey", someList)); | ||
|
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.
public void testGetAndsetProperty() { | ||
BeanUtils.setProperty(new KeyClass(), "keys", "value"); | ||
assertNull(BeanUtils.getProperty(new KeyClass(), "keys")); | ||
|
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.
|
||
|
||
|
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.
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.
LGTM
What's the purpose of this PR
This PR increases the JUnit coverage and also test's out the classes involved.
XXXXX
Which issue(s) this PR fixes:
Fixes #3874
Brief changelog
XXXXX
Follow this checklist to help us incorporate your contribution quickly and easily:
mvn clean test
to make sure this pull request doesn't break anything.CHANGES
log.