aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeryk Bellahsene <teryk.bellahsene@sonarsource.com>2015-09-16 18:46:50 +0200
committerDuarte Meneses <duarte.meneses@sonarsource.com>2015-09-30 16:27:11 +0200
commitf728687b5cf55977ce241695097b8e01418988e3 (patch)
treec6b16a5420d802da2b3e6f87428e4eabe2e2b8cc
parentbf4defa4e88882c7cb891c120c2587577450f228 (diff)
downloadsonarqube-f728687b5cf55977ce241695097b8e01418988e3.tar.gz
sonarqube-f728687b5cf55977ce241695097b8e01418988e3.zip
Rename WS api/project related classes
-rw-r--r--server/sonar-server/src/main/java/org/sonar/server/batch/BatchWsModule.java2
-rw-r--r--server/sonar-server/src/main/java/org/sonar/server/batch/ProjectAction.java10
-rw-r--r--server/sonar-server/src/main/java/org/sonar/server/batch/ProjectDataLoader.java (renamed from server/sonar-server/src/main/java/org/sonar/server/batch/ProjectRepositoryLoader.java)10
-rw-r--r--server/sonar-server/src/main/java/org/sonar/server/batch/ProjectDataQuery.java (renamed from server/sonar-server/src/main/java/org/sonar/server/batch/ProjectRepositoryQuery.java)14
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/batch/BatchWsTest.java2
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/batch/ProjectActionTest.java8
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/batch/ProjectDataLoaderMediumTest.java (renamed from server/sonar-server/src/test/java/org/sonar/server/batch/ProjectRepositoryLoaderMediumTest.java)60
7 files changed, 53 insertions, 53 deletions
diff --git a/server/sonar-server/src/main/java/org/sonar/server/batch/BatchWsModule.java b/server/sonar-server/src/main/java/org/sonar/server/batch/BatchWsModule.java
index 2d0f594eefe..3ea7bbab019 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/batch/BatchWsModule.java
+++ b/server/sonar-server/src/main/java/org/sonar/server/batch/BatchWsModule.java
@@ -28,7 +28,7 @@ public class BatchWsModule extends Module {
BatchIndex.class,
GlobalAction.class,
ProjectAction.class,
- ProjectRepositoryLoader.class,
+ ProjectDataLoader.class,
IssuesAction.class,
UsersAction.class,
BatchWs.class);
diff --git a/server/sonar-server/src/main/java/org/sonar/server/batch/ProjectAction.java b/server/sonar-server/src/main/java/org/sonar/server/batch/ProjectAction.java
index 77d98330d15..646f8662423 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/batch/ProjectAction.java
+++ b/server/sonar-server/src/main/java/org/sonar/server/batch/ProjectAction.java
@@ -33,10 +33,10 @@ public class ProjectAction implements BatchWsAction {
private static final String PARAM_PROFILE = "profile";
private static final String PARAM_PREVIEW = "preview";
- private final ProjectRepositoryLoader projectReferentialsLoader;
+ private final ProjectDataLoader projectDataLoader;
- public ProjectAction(ProjectRepositoryLoader projectReferentialsLoader) {
- this.projectReferentialsLoader = projectReferentialsLoader;
+ public ProjectAction(ProjectDataLoader projectDataLoader) {
+ this.projectDataLoader = projectDataLoader;
}
@Override
@@ -67,12 +67,12 @@ public class ProjectAction implements BatchWsAction {
@Override
public void handle(Request request, Response response) throws Exception {
- ProjectRepositories ref = projectReferentialsLoader.load(ProjectRepositoryQuery.create()
+ ProjectRepositories data = projectDataLoader.load(ProjectDataQuery.create()
.setModuleKey(request.mandatoryParam(PARAM_KEY))
.setProfileName(request.param(PARAM_PROFILE))
.setPreview(request.mandatoryParamAsBoolean(PARAM_PREVIEW)));
response.stream().setMediaType(MimeTypes.JSON);
- IOUtils.write(ref.toJson(), response.stream().output());
+ IOUtils.write(data.toJson(), response.stream().output());
}
}
diff --git a/server/sonar-server/src/main/java/org/sonar/server/batch/ProjectRepositoryLoader.java b/server/sonar-server/src/main/java/org/sonar/server/batch/ProjectDataLoader.java
index 6d4ce4855e1..bf543ceb265 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/batch/ProjectRepositoryLoader.java
+++ b/server/sonar-server/src/main/java/org/sonar/server/batch/ProjectDataLoader.java
@@ -65,9 +65,9 @@ import static com.google.common.collect.Lists.newArrayList;
import static com.google.common.collect.Maps.newHashMap;
@ServerSide
-public class ProjectRepositoryLoader {
+public class ProjectDataLoader {
- private static final Logger LOG = Loggers.get(ProjectRepositoryLoader.class);
+ private static final Logger LOG = Loggers.get(ProjectDataLoader.class);
private final DbClient dbClient;
private final QProfileFactory qProfileFactory;
@@ -76,8 +76,8 @@ public class ProjectRepositoryLoader {
private final Languages languages;
private final UserSession userSession;
- public ProjectRepositoryLoader(DbClient dbClient, QProfileFactory qProfileFactory, QProfileLoader qProfileLoader, RuleService ruleService,
- Languages languages, UserSession userSession) {
+ public ProjectDataLoader(DbClient dbClient, QProfileFactory qProfileFactory, QProfileLoader qProfileLoader, RuleService ruleService,
+ Languages languages, UserSession userSession) {
this.dbClient = dbClient;
this.qProfileFactory = qProfileFactory;
this.qProfileLoader = qProfileLoader;
@@ -86,7 +86,7 @@ public class ProjectRepositoryLoader {
this.userSession = userSession;
}
- public ProjectRepositories load(ProjectRepositoryQuery query) {
+ public ProjectRepositories load(ProjectDataQuery query) {
boolean hasScanPerm = userSession.hasGlobalPermission(GlobalPermissions.SCAN_EXECUTION);
checkPermission(query.isPreview());
diff --git a/server/sonar-server/src/main/java/org/sonar/server/batch/ProjectRepositoryQuery.java b/server/sonar-server/src/main/java/org/sonar/server/batch/ProjectDataQuery.java
index 3de8d774d2d..794887c24ce 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/batch/ProjectRepositoryQuery.java
+++ b/server/sonar-server/src/main/java/org/sonar/server/batch/ProjectDataQuery.java
@@ -23,13 +23,13 @@ package org.sonar.server.batch;
import javax.annotation.CheckForNull;
import javax.annotation.Nullable;
-public class ProjectRepositoryQuery {
+public class ProjectDataQuery {
private String projectOrModuleKey;
private String profileName;
private boolean preview;
- private ProjectRepositoryQuery() {
+ private ProjectDataQuery() {
// No direct call
}
@@ -37,7 +37,7 @@ public class ProjectRepositoryQuery {
return preview;
}
- public ProjectRepositoryQuery setPreview(boolean preview) {
+ public ProjectDataQuery setPreview(boolean preview) {
this.preview = preview;
return this;
}
@@ -47,7 +47,7 @@ public class ProjectRepositoryQuery {
return profileName;
}
- public ProjectRepositoryQuery setProfileName(@Nullable String profileName) {
+ public ProjectDataQuery setProfileName(@Nullable String profileName) {
this.profileName = profileName;
return this;
}
@@ -56,12 +56,12 @@ public class ProjectRepositoryQuery {
return projectOrModuleKey;
}
- public ProjectRepositoryQuery setModuleKey(String projectOrModuleKey) {
+ public ProjectDataQuery setModuleKey(String projectOrModuleKey) {
this.projectOrModuleKey = projectOrModuleKey;
return this;
}
- public static ProjectRepositoryQuery create() {
- return new ProjectRepositoryQuery();
+ public static ProjectDataQuery create() {
+ return new ProjectDataQuery();
}
}
diff --git a/server/sonar-server/src/test/java/org/sonar/server/batch/BatchWsTest.java b/server/sonar-server/src/test/java/org/sonar/server/batch/BatchWsTest.java
index e938e26c05f..c1f20842324 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/batch/BatchWsTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/batch/BatchWsTest.java
@@ -60,7 +60,7 @@ public class BatchWsTest {
public void before() {
tester = new WsTester(new BatchWs(batchIndex,
new GlobalAction(mock(DbClient.class), mock(PropertiesDao.class), userSessionRule),
- new ProjectAction(mock(ProjectRepositoryLoader.class)),
+ new ProjectAction(mock(ProjectDataLoader.class)),
new IssuesAction(mock(DbClient.class), mock(IssueIndex.class), userSessionRule, mock(ComponentFinder.class))));
}
diff --git a/server/sonar-server/src/test/java/org/sonar/server/batch/ProjectActionTest.java b/server/sonar-server/src/test/java/org/sonar/server/batch/ProjectActionTest.java
index 24362ac49c9..5e0afe0995a 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/batch/ProjectActionTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/batch/ProjectActionTest.java
@@ -32,13 +32,13 @@ import static org.mockito.Mockito.when;
public class ProjectActionTest {
- ProjectRepositoryLoader projectRepositoryLoader = mock(ProjectRepositoryLoader.class);
+ ProjectDataLoader projectDataLoader = mock(ProjectDataLoader.class);
WsTester tester;
@Before
public void setUp() {
- tester = new WsTester(new BatchWs(mock(BatchIndex.class), new ProjectAction(projectRepositoryLoader)));
+ tester = new WsTester(new BatchWs(mock(BatchIndex.class), new ProjectAction(projectDataLoader)));
}
@Test
@@ -48,8 +48,8 @@ public class ProjectActionTest {
ProjectRepositories projectReferentials = mock(ProjectRepositories.class);
when(projectReferentials.toJson()).thenReturn("{\"settingsByModule\": {}}");
- ArgumentCaptor<ProjectRepositoryQuery> queryArgumentCaptor = ArgumentCaptor.forClass(ProjectRepositoryQuery.class);
- when(projectRepositoryLoader.load(queryArgumentCaptor.capture())).thenReturn(projectReferentials);
+ ArgumentCaptor<ProjectDataQuery> queryArgumentCaptor = ArgumentCaptor.forClass(ProjectDataQuery.class);
+ when(projectDataLoader.load(queryArgumentCaptor.capture())).thenReturn(projectReferentials);
WsTester.TestRequest request = tester.newGetRequest("batch", "project")
.setParam("key", projectKey)
diff --git a/server/sonar-server/src/test/java/org/sonar/server/batch/ProjectRepositoryLoaderMediumTest.java b/server/sonar-server/src/test/java/org/sonar/server/batch/ProjectDataLoaderMediumTest.java
index 6dde0afeffb..c6b42e7dc98 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/batch/ProjectRepositoryLoaderMediumTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/batch/ProjectDataLoaderMediumTest.java
@@ -64,7 +64,7 @@ import static org.junit.Assert.fail;
import static org.sonar.api.utils.DateUtils.formatDateTime;
import static org.sonar.server.qualityprofile.QProfileTesting.newQProfileDto;
-public class ProjectRepositoryLoaderMediumTest {
+public class ProjectDataLoaderMediumTest {
@ClassRule
public static ServerTester tester = new ServerTester().addXoo();
@@ -74,13 +74,13 @@ public class ProjectRepositoryLoaderMediumTest {
DbSession dbSession;
- ProjectRepositoryLoader loader;
+ ProjectDataLoader loader;
@Before
public void before() {
tester.clearDbAndIndexes();
dbSession = tester.get(DbClient.class).openSession(false);
- loader = tester.get(ProjectRepositoryLoader.class);
+ loader = tester.get(ProjectDataLoader.class);
}
@After
@@ -104,7 +104,7 @@ public class ProjectRepositoryLoaderMediumTest {
);
dbSession.commit();
- ProjectRepositories ref = loader.load(ProjectRepositoryQuery.create().setModuleKey(project.key()));
+ ProjectRepositories ref = loader.load(ProjectDataQuery.create().setModuleKey(project.key()));
Map<String, String> projectSettings = ref.settings(project.key());
assertThat(projectSettings).isEqualTo(ImmutableMap.of(
"sonar.jira.project.key", "SONAR",
@@ -128,7 +128,7 @@ public class ProjectRepositoryLoaderMediumTest {
);
dbSession.commit();
- ProjectRepositories ref = loader.load(ProjectRepositoryQuery.create().setModuleKey(project.key()).setPreview(true));
+ ProjectRepositories ref = loader.load(ProjectDataQuery.create().setModuleKey(project.key()).setPreview(true));
Map<String, String> projectSettings = ref.settings(project.key());
assertThat(projectSettings).isEqualTo(ImmutableMap.of(
"sonar.jira.project.key", "SONAR"
@@ -159,7 +159,7 @@ public class ProjectRepositoryLoaderMediumTest {
dbSession.commit();
- ProjectRepositories ref = loader.load(ProjectRepositoryQuery.create().setModuleKey(project.key()));
+ ProjectRepositories ref = loader.load(ProjectDataQuery.create().setModuleKey(project.key()));
assertThat(ref.settings(project.key())).isEqualTo(ImmutableMap.of(
"sonar.jira.project.key", "SONAR",
"sonar.jira.login.secured", "john"
@@ -191,7 +191,7 @@ public class ProjectRepositoryLoaderMediumTest {
dbSession.commit();
- ProjectRepositories ref = loader.load(ProjectRepositoryQuery.create().setModuleKey(project.key()));
+ ProjectRepositories ref = loader.load(ProjectDataQuery.create().setModuleKey(project.key()));
assertThat(ref.settings(project.key())).isEqualTo(ImmutableMap.of(
"sonar.jira.project.key", "SONAR",
"sonar.jira.login.secured", "john"
@@ -233,7 +233,7 @@ public class ProjectRepositoryLoaderMediumTest {
dbSession.commit();
- ProjectRepositories ref = loader.load(ProjectRepositoryQuery.create().setModuleKey(project.key()));
+ ProjectRepositories ref = loader.load(ProjectDataQuery.create().setModuleKey(project.key()));
assertThat(ref.settings(project.key())).isEqualTo(ImmutableMap.of(
"sonar.jira.project.key", "SONAR",
"sonar.jira.login.secured", "john"
@@ -278,7 +278,7 @@ public class ProjectRepositoryLoaderMediumTest {
dbSession.commit();
- ProjectRepositories ref = loader.load(ProjectRepositoryQuery.create().setModuleKey(project.key()));
+ ProjectRepositories ref = loader.load(ProjectDataQuery.create().setModuleKey(project.key()));
assertThat(ref.settings(project.key())).isEqualTo(ImmutableMap.of(
"sonar.jira.project.key", "SONAR",
"sonar.jira.login.secured", "john"
@@ -308,7 +308,7 @@ public class ProjectRepositoryLoaderMediumTest {
dbSession.commit();
- ProjectRepositories ref = loader.load(ProjectRepositoryQuery.create().setModuleKey(project.key()));
+ ProjectRepositories ref = loader.load(ProjectDataQuery.create().setModuleKey(project.key()));
assertThat(ref.settings(project.key())).isEqualTo(ImmutableMap.of(
"sonar.jira.project.key", "SONAR",
"sonar.jira.login.secured", "john"
@@ -338,7 +338,7 @@ public class ProjectRepositoryLoaderMediumTest {
dbSession.commit();
- ProjectRepositories ref = loader.load(ProjectRepositoryQuery.create().setModuleKey(subModule.key()));
+ ProjectRepositories ref = loader.load(ProjectDataQuery.create().setModuleKey(subModule.key()));
assertThat(ref.settings(project.key())).isEmpty();
assertThat(ref.settings(module.key())).isEmpty();
assertThat(ref.settings(subModule.key())).isEqualTo(ImmutableMap.of(
@@ -372,7 +372,7 @@ public class ProjectRepositoryLoaderMediumTest {
dbSession.commit();
- ProjectRepositories ref = loader.load(ProjectRepositoryQuery.create().setModuleKey(subModule.key()));
+ ProjectRepositories ref = loader.load(ProjectDataQuery.create().setModuleKey(subModule.key()));
assertThat(ref.settings(project.key())).isEmpty();
assertThat(ref.settings(module.key())).isEmpty();
assertThat(ref.settings(subModule.key())).isEqualTo(ImmutableMap.of(
@@ -404,7 +404,7 @@ public class ProjectRepositoryLoaderMediumTest {
dbSession.commit();
- ProjectRepositories ref = loader.load(ProjectRepositoryQuery.create().setModuleKey(subModule.key()));
+ ProjectRepositories ref = loader.load(ProjectDataQuery.create().setModuleKey(subModule.key()));
assertThat(ref.settings(project.key())).isEmpty();
assertThat(ref.settings(module.key())).isEmpty();
assertThat(ref.settings(subModule.key())).isEqualTo(ImmutableMap.of(
@@ -437,7 +437,7 @@ public class ProjectRepositoryLoaderMediumTest {
dbSession.commit();
- ProjectRepositories ref = loader.load(ProjectRepositoryQuery.create().setModuleKey(subModule.key()));
+ ProjectRepositories ref = loader.load(ProjectDataQuery.create().setModuleKey(subModule.key()));
assertThat(ref.settings(project.key())).isEmpty();
assertThat(ref.settings(module.key())).isEmpty();
assertThat(ref.settings(subModule.key())).isEqualTo(ImmutableMap.of(
@@ -462,7 +462,7 @@ public class ProjectRepositoryLoaderMediumTest {
dbSession.commit();
- ProjectRepositories ref = loader.load(ProjectRepositoryQuery.create().setModuleKey(project.key()));
+ ProjectRepositories ref = loader.load(ProjectDataQuery.create().setModuleKey(project.key()));
List<QProfile> profiles = newArrayList(ref.qProfiles());
assertThat(profiles).hasSize(1);
assertThat(profiles.get(0).key()).isEqualTo("abcd");
@@ -485,7 +485,7 @@ public class ProjectRepositoryLoaderMediumTest {
dbSession.commit();
- ProjectRepositories ref = loader.load(ProjectRepositoryQuery.create().setModuleKey(project.key()));
+ ProjectRepositories ref = loader.load(ProjectDataQuery.create().setModuleKey(project.key()));
List<QProfile> profiles = newArrayList(ref.qProfiles());
assertThat(profiles).hasSize(1);
assertThat(profiles.get(0).key()).isEqualTo("abcd");
@@ -508,7 +508,7 @@ public class ProjectRepositoryLoaderMediumTest {
dbSession.commit();
- ProjectRepositories ref = loader.load(ProjectRepositoryQuery.create().setModuleKey(project.key()).setProfileName("SonarQube way"));
+ ProjectRepositories ref = loader.load(ProjectDataQuery.create().setModuleKey(project.key()).setProfileName("SonarQube way"));
List<QProfile> profiles = newArrayList(ref.qProfiles());
assertThat(profiles).hasSize(1);
assertThat(profiles.get(0).key()).isEqualTo("abcd");
@@ -528,7 +528,7 @@ public class ProjectRepositoryLoaderMediumTest {
dbSession.commit();
- ProjectRepositories ref = loader.load(ProjectRepositoryQuery.create().setModuleKey("project"));
+ ProjectRepositories ref = loader.load(ProjectDataQuery.create().setModuleKey("project"));
List<QProfile> profiles = newArrayList(ref.qProfiles());
assertThat(profiles).hasSize(1);
assertThat(profiles.get(0).key()).isEqualTo("abcd");
@@ -553,7 +553,7 @@ public class ProjectRepositoryLoaderMediumTest {
dbSession.commit();
- ProjectRepositories ref = loader.load(ProjectRepositoryQuery.create().setModuleKey(project.key()));
+ ProjectRepositories ref = loader.load(ProjectDataQuery.create().setModuleKey(project.key()));
List<QProfile> profiles = newArrayList(ref.qProfiles());
assertThat(profiles).hasSize(1);
assertThat(profiles.get(0).key()).isEqualTo("abcd");
@@ -570,7 +570,7 @@ public class ProjectRepositoryLoaderMediumTest {
dbSession.commit();
try {
- loader.load(ProjectRepositoryQuery.create().setModuleKey(project.key()));
+ loader.load(ProjectDataQuery.create().setModuleKey(project.key()));
fail();
} catch (Exception e) {
assertThat(e).isInstanceOf(IllegalStateException.class).hasMessage("No quality profile can been found on language 'xoo' for project 'org.codehaus.sonar:sonar'");
@@ -600,7 +600,7 @@ public class ProjectRepositoryLoaderMediumTest {
dbSession.commit();
- ProjectRepositories ref = loader.load(ProjectRepositoryQuery.create().setModuleKey(project.key()));
+ ProjectRepositories ref = loader.load(ProjectDataQuery.create().setModuleKey(project.key()));
List<ActiveRule> activeRules = newArrayList(ref.activeRules());
assertThat(activeRules).hasSize(1);
assertThat(activeRules.get(0).repositoryKey()).isEqualTo("squid");
@@ -640,7 +640,7 @@ public class ProjectRepositoryLoaderMediumTest {
dbSession.commit();
- ProjectRepositories ref = loader.load(ProjectRepositoryQuery.create().setModuleKey(project.key()));
+ ProjectRepositories ref = loader.load(ProjectDataQuery.create().setModuleKey(project.key()));
List<ActiveRule> activeRules = newArrayList(ref.activeRules());
assertThat(activeRules).hasSize(1);
assertThat(activeRules.get(0).repositoryKey()).isEqualTo("squid");
@@ -668,7 +668,7 @@ public class ProjectRepositoryLoaderMediumTest {
dbSession.commit();
- ProjectRepositories ref = loader.load(ProjectRepositoryQuery.create().setModuleKey(project.key()));
+ ProjectRepositories ref = loader.load(ProjectDataQuery.create().setModuleKey(project.key()));
assertThat(ref.activeRules()).hasSize(20);
}
@@ -694,7 +694,7 @@ public class ProjectRepositoryLoaderMediumTest {
dbSession.commit();
- ProjectRepositories ref = loader.load(ProjectRepositoryQuery.create().setModuleKey(project.key()));
+ ProjectRepositories ref = loader.load(ProjectDataQuery.create().setModuleKey(project.key()));
List<ActiveRule> activeRules = newArrayList(ref.activeRules());
assertThat(activeRules).hasSize(1);
assertThat(activeRules.get(0).repositoryKey()).isEqualTo("squid");
@@ -716,7 +716,7 @@ public class ProjectRepositoryLoaderMediumTest {
dbSession.commit();
- ProjectRepositories ref = loader.load(ProjectRepositoryQuery.create().setModuleKey(project.key()));
+ ProjectRepositories ref = loader.load(ProjectDataQuery.create().setModuleKey(project.key()));
List<ActiveRule> activeRules = newArrayList(ref.activeRules());
assertThat(activeRules).extracting("repositoryKey").containsOnly(RuleKey.MANUAL_REPOSITORY_KEY);
assertThat(activeRules).extracting("ruleKey").containsOnly("manualRuleKey");
@@ -734,7 +734,7 @@ public class ProjectRepositoryLoaderMediumTest {
dbSession.commit();
try {
- loader.load(ProjectRepositoryQuery.create().setModuleKey(project.key()));
+ loader.load(ProjectDataQuery.create().setModuleKey(project.key()));
fail();
} catch (Exception e) {
assertThat(e).isInstanceOf(ForbiddenException.class).hasMessage("You're not authorized to execute any SonarQube analysis. Please contact your SonarQube administrator.");
@@ -750,7 +750,7 @@ public class ProjectRepositoryLoaderMediumTest {
dbSession.commit();
try {
- loader.load(ProjectRepositoryQuery.create().setModuleKey(project.key()).setPreview(false));
+ loader.load(ProjectDataQuery.create().setModuleKey(project.key()).setPreview(false));
fail();
} catch (Exception e) {
assertThat(e).isInstanceOf(ForbiddenException.class).hasMessage(
@@ -772,7 +772,7 @@ public class ProjectRepositoryLoaderMediumTest {
dbSession.commit();
- ProjectRepositories ref = loader.load(ProjectRepositoryQuery.create().setModuleKey(project.key()));
+ ProjectRepositories ref = loader.load(ProjectDataQuery.create().setModuleKey(project.key()));
assertThat(ref.fileDataByPath(project.key())).hasSize(1);
FileData fileData = ref.fileData(project.key(), file.path());
assertThat(fileData.hash()).isEqualTo("123456");
@@ -800,7 +800,7 @@ public class ProjectRepositoryLoaderMediumTest {
dbSession.commit();
- ProjectRepositories ref = loader.load(ProjectRepositoryQuery.create().setModuleKey(project.key()));
+ ProjectRepositories ref = loader.load(ProjectDataQuery.create().setModuleKey(project.key()));
assertThat(ref.fileData(project.key(), projectFile.path()).hash()).isEqualTo("123456");
assertThat(ref.fileData(module.key(), moduleFile.path()).hash()).isEqualTo("789456");
}
@@ -827,7 +827,7 @@ public class ProjectRepositoryLoaderMediumTest {
dbSession.commit();
- ProjectRepositories ref = loader.load(ProjectRepositoryQuery.create().setModuleKey(module.key()));
+ ProjectRepositories ref = loader.load(ProjectDataQuery.create().setModuleKey(module.key()));
assertThat(ref.fileData(module.key(), moduleFile.path()).hash()).isEqualTo("789456");
assertThat(ref.fileData(project.key(), projectFile.path())).isNull();
}