AGDIGGER-60 - fetching and saving artifacts api - #4
Merged
Conversation
matzew
reviewed
Dec 13, 2016
| <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> |
|
|
||
| @Test | ||
| public void shouldFetchArtifactsWithNoResults() throws Exception { | ||
| JobWithDetails job = mock(JobWithDetails.class); |
There was a problem hiding this comment.
I would gather all mocked objects together, below @mock annotation or at least at the top of the test.
Contributor
There was a problem hiding this comment.
@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.
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.
No need to instantiate mocks when using @mock annotation.
Contributor
Author
|
Updated all comments. Change was also reviewed in previous PR. Going to merge now! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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