-
Notifications
You must be signed in to change notification settings - Fork 1k
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
[refactor] move code from MonitorsController to MonitorService #2415
Conversation
when(monitorDao.findAll(specification, PageRequest.of(1, 1))).thenReturn(Page.empty()); | ||
assertNotNull(monitorService.getMonitors(specification, PageRequest.of(1, 1))); | ||
doReturn(Page.empty()).when(monitorDao).findAll(any(Specification.class), any(PageRequest.class)); | ||
assertNotNull(monitorService.getMonitors(null, null, null, null, null, null, null, 1, 1, null)); |
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.
Seems this test case is not match param list of getMonitors
. Some params have a default value.
}; | ||
// Pagination is a must | ||
order = order == null ? "desc" : order; | ||
sort = sort == null ? "gmtCreate" : sort; |
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.
These two lines can be removed once you correct your test case to match param list.
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 changed?
Checklist
Add or update API