Skip to content

AGDIGGER-60 - fetching and saving artifacts api - #4

Merged
wtrocki merged 2 commits into
aerogear-attic:masterfrom
wtrocki:AGDIGGER-57
Dec 13, 2016
Merged

AGDIGGER-60 - fetching and saving artifacts api#4
wtrocki merged 2 commits into
aerogear-attic:masterfrom
wtrocki:AGDIGGER-57

Conversation

@wtrocki

@wtrocki wtrocki commented Dec 12, 2016

Copy link
Copy Markdown
Contributor

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

Comment thread pom.xml
<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
Copy Markdown
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);

Copy link
Copy Markdown

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
Copy Markdown
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 ?

Copy link
Copy Markdown

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

Copy link
Copy Markdown

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

wtrocki commented Dec 13, 2016

Copy link
Copy Markdown
Contributor Author

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