Open gd-tmagrys opened 9 years ago
@gd-tmagrys the first 2 commits here are outdated, is that right?
Yes, because this work was created on top of #29 . I'll rebase it on master.
@ctapobep, I rebased work regarding this PR on master. Feel free to review.
Hm. But I see classes like JerseyClientFactory
added within this commit, so it's not just tests.
I haven't looked in much details at the tests, but the overall impression is still that we mock too much..
Also, couple of test design comments:
testPostForTwoMatchedRepositories
M2Repository repository = mock(M2Repository.class);
when(repository.getRemoteUrl()).thenReturn("http://localhost:8081/nexus/content/repositories/snapshots/");
when(repository.getId()).thenReturn("replica-1");
when(repository.getArtifactStoreHelper()).thenReturn(artifactStoreHelper);
repositories.add(repository);
Can be placed in method: private M2Repository repo(String id, String url)
. There may be couple of overloaded methods like private M2Repository repo(String id)
and private M2Repository repo()
that return repos with default or random IDs/URLs.
@ctapobep, I hope that I fix things you've mentioned in my last commit.
Implementing story:
https://github.com/griddynamics/nexus-replication-plugin/issues/16
This PR overrides:
https://github.com/griddynamics/nexus-replication-plugin/pull/24
Please review and merge if possible.