Rename UriInfoStore to ScmPathInfoStore

This commit is contained in:
René Pfeuffer
2018-09-12 08:53:15 +02:00
parent f718a2ba4c
commit 7c09f35ac8
30 changed files with 89 additions and 90 deletions

View File

@@ -43,7 +43,7 @@ public class HgConfigInstallationsResourceTest {
private final URI baseUri = URI.create("/");
@Mock(answer = Answers.RETURNS_DEEP_STUBS)
private UriInfoStore uriInfoStore;
private ScmPathInfoStore scmPathInfoStore;
@InjectMocks
private HgConfigInstallationsToDtoMapper mapper;
@@ -61,7 +61,7 @@ public class HgConfigInstallationsResourceTest {
new HgConfigResource(null, null, null, null,
null, resourceProvider));
when(uriInfoStore.get().getApiRestUri()).thenReturn(baseUri);
when(scmPathInfoStore.get().getApiRestUri()).thenReturn(baseUri);
}
@Test

View File

@@ -23,7 +23,7 @@ public class HgConfigInstallationsToDtoMapperTest {
private URI baseUri = URI.create("http://example.com/base/");
@Mock(answer = Answers.RETURNS_DEEP_STUBS)
private UriInfoStore uriInfoStore;
private ScmPathInfoStore scmPathInfoStore;
@InjectMocks
private HgConfigInstallationsToDtoMapper mapper;
@@ -34,7 +34,7 @@ public class HgConfigInstallationsToDtoMapperTest {
@Before
public void init() {
when(uriInfoStore.get().getApiRestUri()).thenReturn(baseUri);
when(scmPathInfoStore.get().getApiRestUri()).thenReturn(baseUri);
expectedBaseUri = baseUri.resolve(HgConfigResource.HG_CONFIG_PATH_V2 + "/installations/" + expectedPath);
}

View File

@@ -57,7 +57,7 @@ public class HgConfigPackageResourceTest {
private final URI baseUri = java.net.URI.create("/");
@Mock(answer = Answers.RETURNS_DEEP_STUBS)
private UriInfoStore uriInfoStore;
private ScmPathInfoStore scmPathInfoStore;
@InjectMocks
private HgConfigPackagesToDtoMapperImpl mapper;
@@ -81,7 +81,7 @@ public class HgConfigPackageResourceTest {
public void prepareEnvironment() {
setupResources();
when(uriInfoStore.get().getApiRestUri()).thenReturn(baseUri);
when(scmPathInfoStore.get().getApiRestUri()).thenReturn(baseUri);
when(hgPackageReader.getPackages().getPackages()).thenReturn(createPackages());
}

View File

@@ -26,7 +26,7 @@ public class HgConfigPackagesToDtoMapperTest {
private URI baseUri = URI.create("http://example.com/base/");
@Mock(answer = Answers.RETURNS_DEEP_STUBS)
private UriInfoStore uriInfoStore;
private ScmPathInfoStore scmPathInfoStore;
@InjectMocks
private HgConfigPackagesToDtoMapperImpl mapper;
@@ -35,7 +35,7 @@ public class HgConfigPackagesToDtoMapperTest {
@Before
public void init() {
when(uriInfoStore.get().getApiRestUri()).thenReturn(baseUri);
when(scmPathInfoStore.get().getApiRestUri()).thenReturn(baseUri);
expectedBaseUri = baseUri.resolve(HgConfigResource.HG_CONFIG_PATH_V2 + "/packages");
}

View File

@@ -54,7 +54,7 @@ public class HgConfigResourceTest {
private HgConfigDtoToHgConfigMapperImpl dtoToConfigMapper;
@Mock(answer = Answers.RETURNS_DEEP_STUBS)
private UriInfoStore uriInfoStore;
private ScmPathInfoStore scmPathInfoStore;
@InjectMocks
private HgConfigToHgConfigDtoMapperImpl configToDtoMapper;
@@ -79,7 +79,7 @@ public class HgConfigResourceTest {
new HgConfigResource(dtoToConfigMapper, configToDtoMapper, repositoryHandler, packagesResource,
autoconfigResource, installationsResource);
dispatcher.getRegistry().addSingletonResource(gitConfigResource);
when(uriInfoStore.get().getApiRestUri()).thenReturn(baseUri);
when(scmPathInfoStore.get().getApiRestUri()).thenReturn(baseUri);
}
@Test

View File

@@ -29,7 +29,7 @@ public class HgConfigToHgConfigDtoMapperTest {
private URI baseUri = URI.create("http://example.com/base/");
@Mock(answer = Answers.RETURNS_DEEP_STUBS)
private UriInfoStore uriInfoStore;
private ScmPathInfoStore scmPathInfoStore;
@InjectMocks
private HgConfigToHgConfigDtoMapperImpl mapper;
@@ -41,7 +41,7 @@ public class HgConfigToHgConfigDtoMapperTest {
@Before
public void init() {
when(uriInfoStore.get().getApiRestUri()).thenReturn(baseUri);
when(scmPathInfoStore.get().getApiRestUri()).thenReturn(baseUri);
expectedBaseUri = baseUri.resolve(HgConfigResource.HG_CONFIG_PATH_V2);
subjectThreadState.bind();
ThreadContext.bind(subject);