-
Notifications
You must be signed in to change notification settings - Fork 10
AGDIGGER-60 - fetching and saving artifacts api #4
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
Conversation
<jtwig.templates.version>5.65</jtwig.templates.version> | ||
<slf4j.api.version>1.7.21</slf4j.api.version> | ||
<slf4j-log4j12.version>1.7.21</slf4j-log4j12.version> | ||
<assertj-core.version>3.6.1</assertj-core.version> |
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.
😍
|
||
@Test | ||
public void shouldFetchArtifactsWithNoResults() throws Exception { | ||
JobWithDetails job = mock(JobWithDetails.class); |
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.
I would gather all mocked objects together, below @mock annotation or at least at the top of the test.
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.
@josemigallas how about we send a follow request to turn the mock
static calls into proper annotations ? On a new PR ?
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.
My point is about consistency, some mocks are under @mock, some others don't. But yes, whatever suits the your workflow better.
public class ArtifactsServiceTests { | ||
|
||
@Mock | ||
private JenkinsServer server = mock(JenkinsServer.class); |
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.
No need to instantiate mocks when using @mock annotation.
Updated all comments. Change was also reviewed in previous PR. Going to merge now! |
Motivation
Fetch and save artifacts API.
PR against master - previous PR was created against @aliok branch.
For old comments see: aliok#1
review @matzew @aliok