Skip to content

Conversation

wtrocki
Copy link
Contributor

@wtrocki wtrocki commented Dec 12, 2016

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

<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>
Copy link
Contributor

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);

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.

Copy link
Contributor

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 ?

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);

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.

@wtrocki
Copy link
Contributor Author

wtrocki commented Dec 13, 2016

Updated all comments. Change was also reviewed in previous PR. Going to merge now!

@wtrocki wtrocki merged commit 18fafcf into aerogear-attic:master Dec 13, 2016
@wtrocki wtrocki deleted the AGDIGGER-57 branch June 1, 2017 09:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants