aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--server/sonar-ce-common/build.gradle1
-rw-r--r--server/sonar-ce-task-projectanalysis/build.gradle1
-rw-r--r--server/sonar-ce-task/build.gradle1
-rw-r--r--server/sonar-ce/build.gradle1
-rw-r--r--server/sonar-ce/src/test/resources/logback-test.xml22
-rw-r--r--server/sonar-db-dao/build.gradle8
-rw-r--r--server/sonar-db-dao/src/testFixtures/java/org/sonar/db/DbTester.java (renamed from server/sonar-db-dao/src/test/java/org/sonar/db/DbTester.java)0
-rw-r--r--server/sonar-db-dao/src/testFixtures/java/org/sonar/db/OrchestratorSettingsUtils.java (renamed from server/sonar-db-dao/src/test/java/org/sonar/db/OrchestratorSettingsUtils.java)0
-rw-r--r--server/sonar-db-dao/src/testFixtures/java/org/sonar/db/SQDatabase.java (renamed from server/sonar-db-dao/src/test/java/org/sonar/db/SQDatabase.java)0
-rw-r--r--server/sonar-db-dao/src/testFixtures/java/org/sonar/db/TestDBSessions.java (renamed from server/sonar-db-dao/src/test/java/org/sonar/db/TestDBSessions.java)0
-rw-r--r--server/sonar-db-dao/src/testFixtures/java/org/sonar/db/TestDbImpl.java (renamed from server/sonar-db-dao/src/test/java/org/sonar/db/TestDbImpl.java)0
-rw-r--r--server/sonar-db-dao/src/testFixtures/java/org/sonar/db/alm/AlmDbTester.java (renamed from server/sonar-db-dao/src/test/java/org/sonar/db/alm/AlmDbTester.java)0
-rw-r--r--server/sonar-db-dao/src/testFixtures/java/org/sonar/db/ce/CeQueueTesting.java (renamed from server/sonar-db-dao/src/test/java/org/sonar/db/ce/CeQueueTesting.java)0
-rw-r--r--server/sonar-db-dao/src/testFixtures/java/org/sonar/db/component/ComponentDbTester.java (renamed from server/sonar-db-dao/src/test/java/org/sonar/db/component/ComponentDbTester.java)70
-rw-r--r--server/sonar-db-dao/src/testFixtures/java/org/sonar/db/component/ComponentTesting.java (renamed from server/sonar-db-dao/src/test/java/org/sonar/db/component/ComponentTesting.java)0
-rw-r--r--server/sonar-db-dao/src/testFixtures/java/org/sonar/db/component/ProjectLinkDbTester.java (renamed from server/sonar-db-dao/src/test/java/org/sonar/db/component/ProjectLinkDbTester.java)0
-rw-r--r--server/sonar-db-dao/src/testFixtures/java/org/sonar/db/component/ProjectLinkTesting.java (renamed from server/sonar-db-dao/src/test/java/org/sonar/db/component/ProjectLinkTesting.java)0
-rw-r--r--server/sonar-db-dao/src/testFixtures/java/org/sonar/db/component/ResourceTypesRule.java (renamed from server/sonar-db-dao/src/test/java/org/sonar/db/component/ResourceTypesRule.java)0
-rw-r--r--server/sonar-db-dao/src/testFixtures/java/org/sonar/db/component/SnapshotTesting.java (renamed from server/sonar-db-dao/src/test/java/org/sonar/db/component/SnapshotTesting.java)0
-rw-r--r--server/sonar-db-dao/src/testFixtures/java/org/sonar/db/event/EventDbTester.java (renamed from server/sonar-db-dao/src/test/java/org/sonar/db/event/EventDbTester.java)0
-rw-r--r--server/sonar-db-dao/src/testFixtures/java/org/sonar/db/event/EventTesting.java (renamed from server/sonar-db-dao/src/test/java/org/sonar/db/event/EventTesting.java)0
-rw-r--r--server/sonar-db-dao/src/testFixtures/java/org/sonar/db/favorite/FavoriteDbTester.java (renamed from server/sonar-db-dao/src/test/java/org/sonar/db/favorite/FavoriteDbTester.java)0
-rw-r--r--server/sonar-db-dao/src/testFixtures/java/org/sonar/db/issue/IssueDbTester.java (renamed from server/sonar-db-dao/src/test/java/org/sonar/db/issue/IssueDbTester.java)0
-rw-r--r--server/sonar-db-dao/src/testFixtures/java/org/sonar/db/measure/MeasureDbTester.java (renamed from server/sonar-db-dao/src/test/java/org/sonar/db/measure/MeasureDbTester.java)0
-rw-r--r--server/sonar-db-dao/src/testFixtures/java/org/sonar/db/measure/MeasureTesting.java (renamed from server/sonar-db-dao/src/test/java/org/sonar/db/measure/MeasureTesting.java)0
-rw-r--r--server/sonar-db-dao/src/testFixtures/java/org/sonar/db/measure/custom/CustomMeasureTesting.java (renamed from server/sonar-db-dao/src/test/java/org/sonar/db/measure/custom/CustomMeasureTesting.java)0
-rw-r--r--server/sonar-db-dao/src/testFixtures/java/org/sonar/db/metric/MetricTesting.java (renamed from server/sonar-db-dao/src/test/java/org/sonar/db/metric/MetricTesting.java)0
-rw-r--r--server/sonar-db-dao/src/testFixtures/java/org/sonar/db/notification/NotificationDbTester.java (renamed from server/sonar-db-dao/src/test/java/org/sonar/db/notification/NotificationDbTester.java)0
-rw-r--r--server/sonar-db-dao/src/testFixtures/java/org/sonar/db/organization/OrganizationDbTester.java (renamed from server/sonar-db-dao/src/test/java/org/sonar/db/organization/OrganizationDbTester.java)0
-rw-r--r--server/sonar-db-dao/src/testFixtures/java/org/sonar/db/organization/OrganizationTesting.java (renamed from server/sonar-db-dao/src/test/java/org/sonar/db/organization/OrganizationTesting.java)0
-rw-r--r--server/sonar-db-dao/src/testFixtures/java/org/sonar/db/permission/PermissionsTestHelper.java (renamed from server/sonar-db-dao/src/test/java/org/sonar/db/permission/PermissionsTestHelper.java)0
-rw-r--r--server/sonar-db-dao/src/testFixtures/java/org/sonar/db/permission/template/PermissionTemplateDbTester.java (renamed from server/sonar-db-dao/src/test/java/org/sonar/db/permission/template/PermissionTemplateDbTester.java)0
-rw-r--r--server/sonar-db-dao/src/testFixtures/java/org/sonar/db/permission/template/PermissionTemplateTesting.java (renamed from server/sonar-db-dao/src/test/java/org/sonar/db/permission/template/PermissionTemplateTesting.java)0
-rw-r--r--server/sonar-db-dao/src/testFixtures/java/org/sonar/db/plugin/PluginDbTester.java (renamed from server/sonar-db-dao/src/test/java/org/sonar/db/plugin/PluginDbTester.java)0
-rw-r--r--server/sonar-db-dao/src/testFixtures/java/org/sonar/db/plugin/PluginTesting.java (renamed from server/sonar-db-dao/src/test/java/org/sonar/db/plugin/PluginTesting.java)0
-rw-r--r--server/sonar-db-dao/src/testFixtures/java/org/sonar/db/property/InternalComponentPropertyDbTester.java (renamed from server/sonar-db-dao/src/test/java/org/sonar/db/property/InternalComponentPropertyDbTester.java)0
-rw-r--r--server/sonar-db-dao/src/testFixtures/java/org/sonar/db/property/PropertyDbTester.java (renamed from server/sonar-db-dao/src/test/java/org/sonar/db/property/PropertyDbTester.java)0
-rw-r--r--server/sonar-db-dao/src/testFixtures/java/org/sonar/db/property/PropertyTesting.java (renamed from server/sonar-db-dao/src/test/java/org/sonar/db/property/PropertyTesting.java)0
-rw-r--r--server/sonar-db-dao/src/testFixtures/java/org/sonar/db/qualitygate/QualityGateDbTester.java (renamed from server/sonar-db-dao/src/test/java/org/sonar/db/qualitygate/QualityGateDbTester.java)0
-rw-r--r--server/sonar-db-dao/src/testFixtures/java/org/sonar/db/qualityprofile/QualityProfileDbTester.java (renamed from server/sonar-db-dao/src/test/java/org/sonar/db/qualityprofile/QualityProfileDbTester.java)0
-rw-r--r--server/sonar-db-dao/src/testFixtures/java/org/sonar/db/qualityprofile/QualityProfileTesting.java (renamed from server/sonar-db-dao/src/test/java/org/sonar/db/qualityprofile/QualityProfileTesting.java)0
-rw-r--r--server/sonar-db-dao/src/testFixtures/java/org/sonar/db/rule/RuleDbTester.java (renamed from server/sonar-db-dao/src/test/java/org/sonar/db/rule/RuleDbTester.java)0
-rw-r--r--server/sonar-db-dao/src/testFixtures/java/org/sonar/db/rule/RuleTesting.java (renamed from server/sonar-db-dao/src/test/java/org/sonar/db/rule/RuleTesting.java)0
-rw-r--r--server/sonar-db-dao/src/testFixtures/java/org/sonar/db/source/FileSourceTester.java (renamed from server/sonar-db-dao/src/test/java/org/sonar/db/source/FileSourceTester.java)0
-rw-r--r--server/sonar-db-dao/src/testFixtures/java/org/sonar/db/user/GroupTesting.java (renamed from server/sonar-db-dao/src/test/java/org/sonar/db/user/GroupTesting.java)0
-rw-r--r--server/sonar-db-dao/src/testFixtures/java/org/sonar/db/user/RootFlagAssertions.java (renamed from server/sonar-db-dao/src/test/java/org/sonar/db/user/RootFlagAssertions.java)0
-rw-r--r--server/sonar-db-dao/src/testFixtures/java/org/sonar/db/user/UserDbTester.java (renamed from server/sonar-db-dao/src/test/java/org/sonar/db/user/UserDbTester.java)22
-rw-r--r--server/sonar-db-dao/src/testFixtures/java/org/sonar/db/user/UserTesting.java (renamed from server/sonar-db-dao/src/test/java/org/sonar/db/user/UserTesting.java)0
-rw-r--r--server/sonar-db-dao/src/testFixtures/java/org/sonar/db/user/UserTokenTesting.java (renamed from server/sonar-db-dao/src/test/java/org/sonar/db/user/UserTokenTesting.java)0
-rw-r--r--server/sonar-db-dao/src/testFixtures/java/org/sonar/db/webhook/WebhookDbTester.java (renamed from server/sonar-db-dao/src/test/java/org/sonar/db/webhook/WebhookDbTester.java)0
-rw-r--r--server/sonar-db-dao/src/testFixtures/java/org/sonar/db/webhook/WebhookDeliveryDbTester.java (renamed from server/sonar-db-dao/src/test/java/org/sonar/db/webhook/WebhookDeliveryDbTester.java)0
-rw-r--r--server/sonar-db-dao/src/testFixtures/java/org/sonar/db/webhook/WebhookDeliveryTesting.java (renamed from server/sonar-db-dao/src/test/java/org/sonar/db/webhook/WebhookDeliveryTesting.java)0
-rw-r--r--server/sonar-db-dao/src/testFixtures/java/org/sonar/db/webhook/WebhookTesting.java (renamed from server/sonar-db-dao/src/test/java/org/sonar/db/webhook/WebhookTesting.java)0
-rw-r--r--server/sonar-db-testing/build.gradle2
-rw-r--r--server/sonar-webserver-api/build.gradle1
-rw-r--r--server/sonar-webserver-auth/build.gradle1
-rw-r--r--server/sonar-webserver-core/build.gradle1
57 files changed, 71 insertions, 60 deletions
diff --git a/server/sonar-ce-common/build.gradle b/server/sonar-ce-common/build.gradle
index fb674e92796..f346ac18aa1 100644
--- a/server/sonar-ce-common/build.gradle
+++ b/server/sonar-ce-common/build.gradle
@@ -35,7 +35,6 @@ dependencies {
compile 'org.slf4j:jul-to-slf4j'
compile 'org.slf4j:slf4j-api'
compile project(':server:sonar-ce-task')
- compile project(':server:sonar-db-dao')
compile project(':server:sonar-server-common')
compile project(':sonar-core')
compile project(path: ':sonar-plugin-api', configuration: 'shadow')
diff --git a/server/sonar-ce-task-projectanalysis/build.gradle b/server/sonar-ce-task-projectanalysis/build.gradle
index 15226d64134..1052d12965a 100644
--- a/server/sonar-ce-task-projectanalysis/build.gradle
+++ b/server/sonar-ce-task-projectanalysis/build.gradle
@@ -38,7 +38,6 @@ dependencies {
compile project(':sonar-core')
compile project(':server:sonar-ce-task')
- compile project(':server:sonar-db-dao')
compile project(':server:sonar-db-migration')
compile project(':server:sonar-process')
compile project(':server:sonar-server-common')
diff --git a/server/sonar-ce-task/build.gradle b/server/sonar-ce-task/build.gradle
index ed02c72c1ca..4cf16892980 100644
--- a/server/sonar-ce-task/build.gradle
+++ b/server/sonar-ce-task/build.gradle
@@ -22,7 +22,6 @@ dependencies {
compile 'org.slf4j:jul-to-slf4j'
compile 'org.slf4j:slf4j-api'
- compile project(':server:sonar-db-dao')
compile project(':server:sonar-server-common')
compile project(':sonar-core')
compileOnly project(path: ':sonar-plugin-api', configuration: 'shadow')
diff --git a/server/sonar-ce/build.gradle b/server/sonar-ce/build.gradle
index c828f41e767..6ce9decb822 100644
--- a/server/sonar-ce/build.gradle
+++ b/server/sonar-ce/build.gradle
@@ -18,7 +18,6 @@ dependencies {
compile project(':server:sonar-ce-common')
compile project(':server:sonar-ce-task')
compile project(':server:sonar-ce-task-projectanalysis')
- compile project(':server:sonar-db-dao')
compile project(':server:sonar-process')
compile project(':server:sonar-ce-task')
compile project(':server:sonar-server-common')
diff --git a/server/sonar-ce/src/test/resources/logback-test.xml b/server/sonar-ce/src/test/resources/logback-test.xml
new file mode 100644
index 00000000000..7cfba2985f6
--- /dev/null
+++ b/server/sonar-ce/src/test/resources/logback-test.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<configuration debug="false">
+ <contextListener class="ch.qos.logback.classic.jul.LevelChangePropagator"/>
+
+ <appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
+ <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
+ <pattern>
+ %d{yyyy.MM.dd HH:mm:ss} %-5level %msg%n
+ </pattern>
+ </encoder>
+ </appender>
+
+ <root>
+ <level value="INFO"/>
+ <appender-ref ref="CONSOLE"/>
+ </root>
+
+ <logger name="ch.qos.logback">
+ <level value="WARN"/>
+ </logger>
+
+</configuration>
diff --git a/server/sonar-db-dao/build.gradle b/server/sonar-db-dao/build.gradle
index ac0c3db3aa8..6877e8d4eba 100644
--- a/server/sonar-db-dao/build.gradle
+++ b/server/sonar-db-dao/build.gradle
@@ -22,7 +22,6 @@ dependencies {
compileOnly 'com.google.code.findbugs:jsr305'
- testCompile 'com.h2database:h2'
testCompile 'com.tngtech.java:junit-dataprovider'
testCompile 'junit:junit'
testCompile 'org.assertj:assertj-core'
@@ -30,7 +29,6 @@ dependencies {
testCompile 'org.mockito:mockito-core'
testCompile 'org.sonarsource.orchestrator:sonar-orchestrator'
testCompile project(':sonar-testing-harness')
- testCompile testFixtures(project(':server:sonar-db-core'))
testCompile project(':sonar-plugin-api-impl')
testCompileOnly 'com.google.code.findbugs:jsr305'
@@ -39,6 +37,12 @@ dependencies {
testRuntime 'com.microsoft.sqlserver:mssql-jdbc'
testRuntime 'com.oracle.jdbc:ojdbc8'
testRuntime 'org.postgresql:postgresql'
+
+ testFixturesApi testFixtures(project(':server:sonar-db-core'))
+
+ testFixturesImplementation 'com.h2database:h2'
+
+ testFixturesCompileOnly 'com.google.code.findbugs:jsr305'
}
test {
diff --git a/server/sonar-db-dao/src/test/java/org/sonar/db/DbTester.java b/server/sonar-db-dao/src/testFixtures/java/org/sonar/db/DbTester.java
index ecccc986685..ecccc986685 100644
--- a/server/sonar-db-dao/src/test/java/org/sonar/db/DbTester.java
+++ b/server/sonar-db-dao/src/testFixtures/java/org/sonar/db/DbTester.java
diff --git a/server/sonar-db-dao/src/test/java/org/sonar/db/OrchestratorSettingsUtils.java b/server/sonar-db-dao/src/testFixtures/java/org/sonar/db/OrchestratorSettingsUtils.java
index b3f5e8f02ab..b3f5e8f02ab 100644
--- a/server/sonar-db-dao/src/test/java/org/sonar/db/OrchestratorSettingsUtils.java
+++ b/server/sonar-db-dao/src/testFixtures/java/org/sonar/db/OrchestratorSettingsUtils.java
diff --git a/server/sonar-db-dao/src/test/java/org/sonar/db/SQDatabase.java b/server/sonar-db-dao/src/testFixtures/java/org/sonar/db/SQDatabase.java
index 4a4fd2eae79..4a4fd2eae79 100644
--- a/server/sonar-db-dao/src/test/java/org/sonar/db/SQDatabase.java
+++ b/server/sonar-db-dao/src/testFixtures/java/org/sonar/db/SQDatabase.java
diff --git a/server/sonar-db-dao/src/test/java/org/sonar/db/TestDBSessions.java b/server/sonar-db-dao/src/testFixtures/java/org/sonar/db/TestDBSessions.java
index 34a4908bb9c..34a4908bb9c 100644
--- a/server/sonar-db-dao/src/test/java/org/sonar/db/TestDBSessions.java
+++ b/server/sonar-db-dao/src/testFixtures/java/org/sonar/db/TestDBSessions.java
diff --git a/server/sonar-db-dao/src/test/java/org/sonar/db/TestDbImpl.java b/server/sonar-db-dao/src/testFixtures/java/org/sonar/db/TestDbImpl.java
index d984564bb08..d984564bb08 100644
--- a/server/sonar-db-dao/src/test/java/org/sonar/db/TestDbImpl.java
+++ b/server/sonar-db-dao/src/testFixtures/java/org/sonar/db/TestDbImpl.java
diff --git a/server/sonar-db-dao/src/test/java/org/sonar/db/alm/AlmDbTester.java b/server/sonar-db-dao/src/testFixtures/java/org/sonar/db/alm/AlmDbTester.java
index 579f505a602..579f505a602 100644
--- a/server/sonar-db-dao/src/test/java/org/sonar/db/alm/AlmDbTester.java
+++ b/server/sonar-db-dao/src/testFixtures/java/org/sonar/db/alm/AlmDbTester.java
diff --git a/server/sonar-db-dao/src/test/java/org/sonar/db/ce/CeQueueTesting.java b/server/sonar-db-dao/src/testFixtures/java/org/sonar/db/ce/CeQueueTesting.java
index 07b8074a0d9..07b8074a0d9 100644
--- a/server/sonar-db-dao/src/test/java/org/sonar/db/ce/CeQueueTesting.java
+++ b/server/sonar-db-dao/src/testFixtures/java/org/sonar/db/ce/CeQueueTesting.java
diff --git a/server/sonar-db-dao/src/test/java/org/sonar/db/component/ComponentDbTester.java b/server/sonar-db-dao/src/testFixtures/java/org/sonar/db/component/ComponentDbTester.java
index d8ed910582f..472ea47c2f3 100644
--- a/server/sonar-db-dao/src/test/java/org/sonar/db/component/ComponentDbTester.java
+++ b/server/sonar-db-dao/src/testFixtures/java/org/sonar/db/component/ComponentDbTester.java
@@ -31,14 +31,6 @@ import static com.google.common.base.Preconditions.checkArgument;
import static com.google.common.base.Preconditions.checkState;
import static java.util.Arrays.asList;
import static org.sonar.db.component.BranchType.LONG;
-import static org.sonar.db.component.ComponentTesting.newApplication;
-import static org.sonar.db.component.ComponentTesting.newBranchDto;
-import static org.sonar.db.component.ComponentTesting.newPrivateProjectDto;
-import static org.sonar.db.component.ComponentTesting.newProjectBranch;
-import static org.sonar.db.component.ComponentTesting.newPublicProjectDto;
-import static org.sonar.db.component.ComponentTesting.newSubView;
-import static org.sonar.db.component.ComponentTesting.newView;
-import static org.sonar.db.component.SnapshotTesting.newAnalysis;
public class ComponentDbTester {
private final DbTester db;
@@ -61,7 +53,7 @@ public class ComponentDbTester {
private SnapshotDto insertComponentAndSnapshot(ComponentDto component) {
dbClient.componentDao().insert(dbSession, component);
- SnapshotDto snapshot = dbClient.snapshotDao().insert(dbSession, newAnalysis(component));
+ SnapshotDto snapshot = dbClient.snapshotDao().insert(dbSession, SnapshotTesting.newAnalysis(component));
db.commit();
return snapshot;
@@ -72,7 +64,7 @@ public class ComponentDbTester {
}
public ComponentDto insertPrivateProject() {
- return insertComponentImpl(newPrivateProjectDto(db.getDefaultOrganization()), true, noExtraConfiguration());
+ return insertComponentImpl(ComponentTesting.newPrivateProjectDto(db.getDefaultOrganization()), true, noExtraConfiguration());
}
public ComponentDto insertPublicProject() {
@@ -81,43 +73,43 @@ public class ComponentDbTester {
@SafeVarargs
public final ComponentDto insertPrivateProject(Consumer<ComponentDto>... dtoPopulators) {
- return insertComponentImpl(newPrivateProjectDto(db.getDefaultOrganization()), true, dtoPopulators);
+ return insertComponentImpl(ComponentTesting.newPrivateProjectDto(db.getDefaultOrganization()), true, dtoPopulators);
}
@SafeVarargs
public final ComponentDto insertPublicProject(Consumer<ComponentDto>... dtoPopulators) {
- return insertComponentImpl(newPublicProjectDto(db.getDefaultOrganization()), false, dtoPopulators);
+ return insertComponentImpl(ComponentTesting.newPublicProjectDto(db.getDefaultOrganization()), false, dtoPopulators);
}
@SafeVarargs
public final ComponentDto insertPrivateProject(OrganizationDto organizationDto, Consumer<ComponentDto>... dtoPopulators) {
- return insertComponentImpl(newPrivateProjectDto(organizationDto), true, dtoPopulators);
+ return insertComponentImpl(ComponentTesting.newPrivateProjectDto(organizationDto), true, dtoPopulators);
}
@SafeVarargs
public final ComponentDto insertPublicProject(OrganizationDto organizationDto, Consumer<ComponentDto>... dtoPopulators) {
- return insertComponentImpl(newPublicProjectDto(organizationDto), false, dtoPopulators);
+ return insertComponentImpl(ComponentTesting.newPublicProjectDto(organizationDto), false, dtoPopulators);
}
public ComponentDto insertPrivateProject(OrganizationDto organizationDto) {
- return insertComponentImpl(newPrivateProjectDto(organizationDto), true, noExtraConfiguration());
+ return insertComponentImpl(ComponentTesting.newPrivateProjectDto(organizationDto), true, noExtraConfiguration());
}
public ComponentDto insertPublicProject(OrganizationDto organizationDto) {
- return insertComponentImpl(newPublicProjectDto(organizationDto), false, noExtraConfiguration());
+ return insertComponentImpl(ComponentTesting.newPublicProjectDto(organizationDto), false, noExtraConfiguration());
}
public ComponentDto insertPrivateProject(OrganizationDto organizationDto, String uuid) {
- return insertComponentImpl(newPrivateProjectDto(organizationDto, uuid), true, noExtraConfiguration());
+ return insertComponentImpl(ComponentTesting.newPrivateProjectDto(organizationDto, uuid), true, noExtraConfiguration());
}
public ComponentDto insertPublicProject(OrganizationDto organizationDto, String uuid) {
- return insertComponentImpl(newPublicProjectDto(organizationDto, uuid), false, noExtraConfiguration());
+ return insertComponentImpl(ComponentTesting.newPublicProjectDto(organizationDto, uuid), false, noExtraConfiguration());
}
@SafeVarargs
public final ComponentDto insertPrivateProject(OrganizationDto organizationDto, String uuid, Consumer<ComponentDto>... dtoPopulators) {
- return insertComponentImpl(newPrivateProjectDto(organizationDto, uuid), true, dtoPopulators);
+ return insertComponentImpl(ComponentTesting.newPrivateProjectDto(organizationDto, uuid), true, dtoPopulators);
}
/**
@@ -126,7 +118,7 @@ public class ComponentDbTester {
*/
@Deprecated
public ComponentDto insertView() {
- return insertComponentImpl(newView(db.getDefaultOrganization()), false, noExtraConfiguration());
+ return insertComponentImpl(ComponentTesting.newView(db.getDefaultOrganization()), false, noExtraConfiguration());
}
/**
@@ -134,7 +126,7 @@ public class ComponentDbTester {
* @see #insertPublicPortfolio(OrganizationDto, Consumer[])
*/
public ComponentDto insertView(Consumer<ComponentDto> dtoPopulator) {
- return insertComponentImpl(newView(db.getDefaultOrganization()), false, dtoPopulator);
+ return insertComponentImpl(ComponentTesting.newView(db.getDefaultOrganization()), false, dtoPopulator);
}
/**
@@ -142,7 +134,7 @@ public class ComponentDbTester {
* @see #insertPublicPortfolio(OrganizationDto, Consumer[])
*/
public ComponentDto insertView(OrganizationDto organizationDto) {
- return insertComponentImpl(newView(organizationDto), false, noExtraConfiguration());
+ return insertComponentImpl(ComponentTesting.newView(organizationDto), false, noExtraConfiguration());
}
/**
@@ -150,7 +142,7 @@ public class ComponentDbTester {
* @see #insertPublicPortfolio(OrganizationDto, Consumer[])
*/
public ComponentDto insertView(OrganizationDto organizationDto, Consumer<ComponentDto> dtoPopulator) {
- return insertComponentImpl(newView(organizationDto), false, dtoPopulator);
+ return insertComponentImpl(ComponentTesting.newView(organizationDto), false, dtoPopulator);
}
/**
@@ -158,7 +150,7 @@ public class ComponentDbTester {
* @see #insertPublicPortfolio(OrganizationDto, Consumer[])
*/
public ComponentDto insertView(String uuid) {
- return insertComponentImpl(newView(db.getDefaultOrganization(), uuid), false, noExtraConfiguration());
+ return insertComponentImpl(ComponentTesting.newView(db.getDefaultOrganization(), uuid), false, noExtraConfiguration());
}
/**
@@ -166,27 +158,27 @@ public class ComponentDbTester {
* @see #insertPublicPortfolio(OrganizationDto, Consumer[])
*/
public ComponentDto insertView(OrganizationDto organizationDto, String uuid) {
- return insertComponentImpl(newView(organizationDto, uuid), false, noExtraConfiguration());
+ return insertComponentImpl(ComponentTesting.newView(organizationDto, uuid), false, noExtraConfiguration());
}
@SafeVarargs
public final ComponentDto insertPublicPortfolio(OrganizationDto organization, Consumer<ComponentDto>... dtoPopulators) {
- return insertComponentImpl(newView(organization).setPrivate(false), false, dtoPopulators);
+ return insertComponentImpl(ComponentTesting.newView(organization).setPrivate(false), false, dtoPopulators);
}
@SafeVarargs
public final ComponentDto insertPrivatePortfolio(OrganizationDto organization, Consumer<ComponentDto>... dtoPopulators) {
- return insertComponentImpl(newView(organization).setPrivate(true), true, dtoPopulators);
+ return insertComponentImpl(ComponentTesting.newView(organization).setPrivate(true), true, dtoPopulators);
}
@SafeVarargs
public final ComponentDto insertPublicApplication(OrganizationDto organization, Consumer<ComponentDto>... dtoPopulators) {
- return insertComponentImpl(newApplication(organization).setPrivate(false), false, dtoPopulators);
+ return insertComponentImpl(ComponentTesting.newApplication(organization).setPrivate(false), false, dtoPopulators);
}
@SafeVarargs
public final ComponentDto insertPrivateApplication(OrganizationDto organization, Consumer<ComponentDto>... dtoPopulators) {
- return insertComponentImpl(newApplication(organization).setPrivate(true), true, dtoPopulators);
+ return insertComponentImpl(ComponentTesting.newApplication(organization).setPrivate(true), true, dtoPopulators);
}
/**
@@ -195,12 +187,12 @@ public class ComponentDbTester {
*/
@SafeVarargs
public final ComponentDto insertApplication(OrganizationDto organizationDto, Consumer<ComponentDto>... dtoPopulators) {
- return insertComponentImpl(newApplication(organizationDto), false, dtoPopulators);
+ return insertComponentImpl(ComponentTesting.newApplication(organizationDto), false, dtoPopulators);
}
@SafeVarargs
public final ComponentDto insertSubView(ComponentDto view, Consumer<ComponentDto>... dtoPopulators) {
- return insertComponentImpl(newSubView(view), view.isPrivate(), dtoPopulators);
+ return insertComponentImpl(ComponentTesting.newSubView(view), view.isPrivate(), dtoPopulators);
}
private static <T> Consumer<T> noExtraConfiguration() {
@@ -254,13 +246,13 @@ public class ComponentDbTester {
@SafeVarargs
public final ComponentDto insertMainBranch(OrganizationDto organization, Consumer<ComponentDto>... dtoPopulators) {
- ComponentDto project = newPrivateProjectDto(organization);
+ ComponentDto project = ComponentTesting.newPrivateProjectDto(organization);
Arrays.stream(dtoPopulators).forEach(dtoPopulator -> dtoPopulator.accept(project));
return insertMainBranch(project);
}
public final ComponentDto insertMainBranch(ComponentDto project) {
- BranchDto branchDto = newBranchDto(project, LONG);
+ BranchDto branchDto = ComponentTesting.newBranchDto(project, LONG);
insertComponent(project);
dbClient.branchDao().insert(dbSession, branchDto);
db.commit();
@@ -269,8 +261,8 @@ public class ComponentDbTester {
@SafeVarargs
public final ComponentDto insertMainBranch(OrganizationDto organization, String mainBranchName, Consumer<ComponentDto>... dtoPopulators) {
- ComponentDto project = newPrivateProjectDto(organization);
- BranchDto branchDto = newBranchDto(project, LONG).setKey(mainBranchName);
+ ComponentDto project = ComponentTesting.newPrivateProjectDto(organization);
+ BranchDto branchDto = ComponentTesting.newBranchDto(project, LONG).setKey(mainBranchName);
Arrays.stream(dtoPopulators).forEach(dtoPopulator -> dtoPopulator.accept(project));
insertComponent(project);
dbClient.branchDao().insert(dbSession, branchDto);
@@ -281,9 +273,9 @@ public class ComponentDbTester {
@SafeVarargs
public final ComponentDto insertProjectBranch(ComponentDto project, Consumer<BranchDto>... dtoPopulators) {
// MainBranchProjectUuid will be null if it's a main branch
- BranchDto branchDto = newBranchDto(firstNonNull(project.getMainBranchProjectUuid(), project.projectUuid()), LONG);
+ BranchDto branchDto = ComponentTesting.newBranchDto(firstNonNull(project.getMainBranchProjectUuid(), project.projectUuid()), LONG);
Arrays.stream(dtoPopulators).forEach(dtoPopulator -> dtoPopulator.accept(branchDto));
- ComponentDto branch = newProjectBranch(project, branchDto);
+ ComponentDto branch = ComponentTesting.newProjectBranch(project, branchDto);
insertComponent(branch);
dbClient.branchDao().insert(dbSession, branchDto);
db.commit();
@@ -292,14 +284,14 @@ public class ComponentDbTester {
@SafeVarargs
public final ComponentDto insertProjectBranch(OrganizationDto organization, Consumer<BranchDto>... dtoPopulators) {
- ComponentDto project = newPrivateProjectDto(organization);
+ ComponentDto project = ComponentTesting.newPrivateProjectDto(organization);
return insertProjectBranch(project, dtoPopulators);
}
public final ComponentDto insertProjectBranch(ComponentDto project, BranchDto branchDto) {
// MainBranchProjectUuid will be null if it's a main branch
checkArgument(branchDto.getProjectUuid().equals(firstNonNull(project.getMainBranchProjectUuid(), project.projectUuid())));
- ComponentDto branch = newProjectBranch(project, branchDto);
+ ComponentDto branch = ComponentTesting.newProjectBranch(project, branchDto);
insertComponent(branch);
dbClient.branchDao().insert(dbSession, branchDto);
db.commit();
diff --git a/server/sonar-db-dao/src/test/java/org/sonar/db/component/ComponentTesting.java b/server/sonar-db-dao/src/testFixtures/java/org/sonar/db/component/ComponentTesting.java
index de911e71fe3..de911e71fe3 100644
--- a/server/sonar-db-dao/src/test/java/org/sonar/db/component/ComponentTesting.java
+++ b/server/sonar-db-dao/src/testFixtures/java/org/sonar/db/component/ComponentTesting.java
diff --git a/server/sonar-db-dao/src/test/java/org/sonar/db/component/ProjectLinkDbTester.java b/server/sonar-db-dao/src/testFixtures/java/org/sonar/db/component/ProjectLinkDbTester.java
index 86c9a7adfb8..86c9a7adfb8 100644
--- a/server/sonar-db-dao/src/test/java/org/sonar/db/component/ProjectLinkDbTester.java
+++ b/server/sonar-db-dao/src/testFixtures/java/org/sonar/db/component/ProjectLinkDbTester.java
diff --git a/server/sonar-db-dao/src/test/java/org/sonar/db/component/ProjectLinkTesting.java b/server/sonar-db-dao/src/testFixtures/java/org/sonar/db/component/ProjectLinkTesting.java
index 08170f8855c..08170f8855c 100644
--- a/server/sonar-db-dao/src/test/java/org/sonar/db/component/ProjectLinkTesting.java
+++ b/server/sonar-db-dao/src/testFixtures/java/org/sonar/db/component/ProjectLinkTesting.java
diff --git a/server/sonar-db-dao/src/test/java/org/sonar/db/component/ResourceTypesRule.java b/server/sonar-db-dao/src/testFixtures/java/org/sonar/db/component/ResourceTypesRule.java
index 25945d9848f..25945d9848f 100644
--- a/server/sonar-db-dao/src/test/java/org/sonar/db/component/ResourceTypesRule.java
+++ b/server/sonar-db-dao/src/testFixtures/java/org/sonar/db/component/ResourceTypesRule.java
diff --git a/server/sonar-db-dao/src/test/java/org/sonar/db/component/SnapshotTesting.java b/server/sonar-db-dao/src/testFixtures/java/org/sonar/db/component/SnapshotTesting.java
index 1f65b38e2b2..1f65b38e2b2 100644
--- a/server/sonar-db-dao/src/test/java/org/sonar/db/component/SnapshotTesting.java
+++ b/server/sonar-db-dao/src/testFixtures/java/org/sonar/db/component/SnapshotTesting.java
diff --git a/server/sonar-db-dao/src/test/java/org/sonar/db/event/EventDbTester.java b/server/sonar-db-dao/src/testFixtures/java/org/sonar/db/event/EventDbTester.java
index bc97784ed3b..bc97784ed3b 100644
--- a/server/sonar-db-dao/src/test/java/org/sonar/db/event/EventDbTester.java
+++ b/server/sonar-db-dao/src/testFixtures/java/org/sonar/db/event/EventDbTester.java
diff --git a/server/sonar-db-dao/src/test/java/org/sonar/db/event/EventTesting.java b/server/sonar-db-dao/src/testFixtures/java/org/sonar/db/event/EventTesting.java
index b3a4c135e65..b3a4c135e65 100644
--- a/server/sonar-db-dao/src/test/java/org/sonar/db/event/EventTesting.java
+++ b/server/sonar-db-dao/src/testFixtures/java/org/sonar/db/event/EventTesting.java
diff --git a/server/sonar-db-dao/src/test/java/org/sonar/db/favorite/FavoriteDbTester.java b/server/sonar-db-dao/src/testFixtures/java/org/sonar/db/favorite/FavoriteDbTester.java
index feb803c5f0d..feb803c5f0d 100644
--- a/server/sonar-db-dao/src/test/java/org/sonar/db/favorite/FavoriteDbTester.java
+++ b/server/sonar-db-dao/src/testFixtures/java/org/sonar/db/favorite/FavoriteDbTester.java
diff --git a/server/sonar-db-dao/src/test/java/org/sonar/db/issue/IssueDbTester.java b/server/sonar-db-dao/src/testFixtures/java/org/sonar/db/issue/IssueDbTester.java
index a7c5c0c7355..a7c5c0c7355 100644
--- a/server/sonar-db-dao/src/test/java/org/sonar/db/issue/IssueDbTester.java
+++ b/server/sonar-db-dao/src/testFixtures/java/org/sonar/db/issue/IssueDbTester.java
diff --git a/server/sonar-db-dao/src/test/java/org/sonar/db/measure/MeasureDbTester.java b/server/sonar-db-dao/src/testFixtures/java/org/sonar/db/measure/MeasureDbTester.java
index 59b8c3160bd..59b8c3160bd 100644
--- a/server/sonar-db-dao/src/test/java/org/sonar/db/measure/MeasureDbTester.java
+++ b/server/sonar-db-dao/src/testFixtures/java/org/sonar/db/measure/MeasureDbTester.java
diff --git a/server/sonar-db-dao/src/test/java/org/sonar/db/measure/MeasureTesting.java b/server/sonar-db-dao/src/testFixtures/java/org/sonar/db/measure/MeasureTesting.java
index 60b0c188757..60b0c188757 100644
--- a/server/sonar-db-dao/src/test/java/org/sonar/db/measure/MeasureTesting.java
+++ b/server/sonar-db-dao/src/testFixtures/java/org/sonar/db/measure/MeasureTesting.java
diff --git a/server/sonar-db-dao/src/test/java/org/sonar/db/measure/custom/CustomMeasureTesting.java b/server/sonar-db-dao/src/testFixtures/java/org/sonar/db/measure/custom/CustomMeasureTesting.java
index 318633e316b..318633e316b 100644
--- a/server/sonar-db-dao/src/test/java/org/sonar/db/measure/custom/CustomMeasureTesting.java
+++ b/server/sonar-db-dao/src/testFixtures/java/org/sonar/db/measure/custom/CustomMeasureTesting.java
diff --git a/server/sonar-db-dao/src/test/java/org/sonar/db/metric/MetricTesting.java b/server/sonar-db-dao/src/testFixtures/java/org/sonar/db/metric/MetricTesting.java
index 2158cc56dba..2158cc56dba 100644
--- a/server/sonar-db-dao/src/test/java/org/sonar/db/metric/MetricTesting.java
+++ b/server/sonar-db-dao/src/testFixtures/java/org/sonar/db/metric/MetricTesting.java
diff --git a/server/sonar-db-dao/src/test/java/org/sonar/db/notification/NotificationDbTester.java b/server/sonar-db-dao/src/testFixtures/java/org/sonar/db/notification/NotificationDbTester.java
index 4449bbaafc2..4449bbaafc2 100644
--- a/server/sonar-db-dao/src/test/java/org/sonar/db/notification/NotificationDbTester.java
+++ b/server/sonar-db-dao/src/testFixtures/java/org/sonar/db/notification/NotificationDbTester.java
diff --git a/server/sonar-db-dao/src/test/java/org/sonar/db/organization/OrganizationDbTester.java b/server/sonar-db-dao/src/testFixtures/java/org/sonar/db/organization/OrganizationDbTester.java
index 5daf1ff867d..5daf1ff867d 100644
--- a/server/sonar-db-dao/src/test/java/org/sonar/db/organization/OrganizationDbTester.java
+++ b/server/sonar-db-dao/src/testFixtures/java/org/sonar/db/organization/OrganizationDbTester.java
diff --git a/server/sonar-db-dao/src/test/java/org/sonar/db/organization/OrganizationTesting.java b/server/sonar-db-dao/src/testFixtures/java/org/sonar/db/organization/OrganizationTesting.java
index 57f1b59a289..57f1b59a289 100644
--- a/server/sonar-db-dao/src/test/java/org/sonar/db/organization/OrganizationTesting.java
+++ b/server/sonar-db-dao/src/testFixtures/java/org/sonar/db/organization/OrganizationTesting.java
diff --git a/server/sonar-db-dao/src/test/java/org/sonar/db/permission/PermissionsTestHelper.java b/server/sonar-db-dao/src/testFixtures/java/org/sonar/db/permission/PermissionsTestHelper.java
index 3eb75f13258..3eb75f13258 100644
--- a/server/sonar-db-dao/src/test/java/org/sonar/db/permission/PermissionsTestHelper.java
+++ b/server/sonar-db-dao/src/testFixtures/java/org/sonar/db/permission/PermissionsTestHelper.java
diff --git a/server/sonar-db-dao/src/test/java/org/sonar/db/permission/template/PermissionTemplateDbTester.java b/server/sonar-db-dao/src/testFixtures/java/org/sonar/db/permission/template/PermissionTemplateDbTester.java
index 35e48b0d6f7..35e48b0d6f7 100644
--- a/server/sonar-db-dao/src/test/java/org/sonar/db/permission/template/PermissionTemplateDbTester.java
+++ b/server/sonar-db-dao/src/testFixtures/java/org/sonar/db/permission/template/PermissionTemplateDbTester.java
diff --git a/server/sonar-db-dao/src/test/java/org/sonar/db/permission/template/PermissionTemplateTesting.java b/server/sonar-db-dao/src/testFixtures/java/org/sonar/db/permission/template/PermissionTemplateTesting.java
index a029200457e..a029200457e 100644
--- a/server/sonar-db-dao/src/test/java/org/sonar/db/permission/template/PermissionTemplateTesting.java
+++ b/server/sonar-db-dao/src/testFixtures/java/org/sonar/db/permission/template/PermissionTemplateTesting.java
diff --git a/server/sonar-db-dao/src/test/java/org/sonar/db/plugin/PluginDbTester.java b/server/sonar-db-dao/src/testFixtures/java/org/sonar/db/plugin/PluginDbTester.java
index 5fc1afab4e8..5fc1afab4e8 100644
--- a/server/sonar-db-dao/src/test/java/org/sonar/db/plugin/PluginDbTester.java
+++ b/server/sonar-db-dao/src/testFixtures/java/org/sonar/db/plugin/PluginDbTester.java
diff --git a/server/sonar-db-dao/src/test/java/org/sonar/db/plugin/PluginTesting.java b/server/sonar-db-dao/src/testFixtures/java/org/sonar/db/plugin/PluginTesting.java
index e42b939864d..e42b939864d 100644
--- a/server/sonar-db-dao/src/test/java/org/sonar/db/plugin/PluginTesting.java
+++ b/server/sonar-db-dao/src/testFixtures/java/org/sonar/db/plugin/PluginTesting.java
diff --git a/server/sonar-db-dao/src/test/java/org/sonar/db/property/InternalComponentPropertyDbTester.java b/server/sonar-db-dao/src/testFixtures/java/org/sonar/db/property/InternalComponentPropertyDbTester.java
index 4588ad91853..4588ad91853 100644
--- a/server/sonar-db-dao/src/test/java/org/sonar/db/property/InternalComponentPropertyDbTester.java
+++ b/server/sonar-db-dao/src/testFixtures/java/org/sonar/db/property/InternalComponentPropertyDbTester.java
diff --git a/server/sonar-db-dao/src/test/java/org/sonar/db/property/PropertyDbTester.java b/server/sonar-db-dao/src/testFixtures/java/org/sonar/db/property/PropertyDbTester.java
index b00cc9f1964..b00cc9f1964 100644
--- a/server/sonar-db-dao/src/test/java/org/sonar/db/property/PropertyDbTester.java
+++ b/server/sonar-db-dao/src/testFixtures/java/org/sonar/db/property/PropertyDbTester.java
diff --git a/server/sonar-db-dao/src/test/java/org/sonar/db/property/PropertyTesting.java b/server/sonar-db-dao/src/testFixtures/java/org/sonar/db/property/PropertyTesting.java
index 904f350cf9a..904f350cf9a 100644
--- a/server/sonar-db-dao/src/test/java/org/sonar/db/property/PropertyTesting.java
+++ b/server/sonar-db-dao/src/testFixtures/java/org/sonar/db/property/PropertyTesting.java
diff --git a/server/sonar-db-dao/src/test/java/org/sonar/db/qualitygate/QualityGateDbTester.java b/server/sonar-db-dao/src/testFixtures/java/org/sonar/db/qualitygate/QualityGateDbTester.java
index 6b72f94b4a2..6b72f94b4a2 100644
--- a/server/sonar-db-dao/src/test/java/org/sonar/db/qualitygate/QualityGateDbTester.java
+++ b/server/sonar-db-dao/src/testFixtures/java/org/sonar/db/qualitygate/QualityGateDbTester.java
diff --git a/server/sonar-db-dao/src/test/java/org/sonar/db/qualityprofile/QualityProfileDbTester.java b/server/sonar-db-dao/src/testFixtures/java/org/sonar/db/qualityprofile/QualityProfileDbTester.java
index d2ba860709e..d2ba860709e 100644
--- a/server/sonar-db-dao/src/test/java/org/sonar/db/qualityprofile/QualityProfileDbTester.java
+++ b/server/sonar-db-dao/src/testFixtures/java/org/sonar/db/qualityprofile/QualityProfileDbTester.java
diff --git a/server/sonar-db-dao/src/test/java/org/sonar/db/qualityprofile/QualityProfileTesting.java b/server/sonar-db-dao/src/testFixtures/java/org/sonar/db/qualityprofile/QualityProfileTesting.java
index 0ef23d5ad99..0ef23d5ad99 100644
--- a/server/sonar-db-dao/src/test/java/org/sonar/db/qualityprofile/QualityProfileTesting.java
+++ b/server/sonar-db-dao/src/testFixtures/java/org/sonar/db/qualityprofile/QualityProfileTesting.java
diff --git a/server/sonar-db-dao/src/test/java/org/sonar/db/rule/RuleDbTester.java b/server/sonar-db-dao/src/testFixtures/java/org/sonar/db/rule/RuleDbTester.java
index 5e1c497f11f..5e1c497f11f 100644
--- a/server/sonar-db-dao/src/test/java/org/sonar/db/rule/RuleDbTester.java
+++ b/server/sonar-db-dao/src/testFixtures/java/org/sonar/db/rule/RuleDbTester.java
diff --git a/server/sonar-db-dao/src/test/java/org/sonar/db/rule/RuleTesting.java b/server/sonar-db-dao/src/testFixtures/java/org/sonar/db/rule/RuleTesting.java
index 9df18d86726..9df18d86726 100644
--- a/server/sonar-db-dao/src/test/java/org/sonar/db/rule/RuleTesting.java
+++ b/server/sonar-db-dao/src/testFixtures/java/org/sonar/db/rule/RuleTesting.java
diff --git a/server/sonar-db-dao/src/test/java/org/sonar/db/source/FileSourceTester.java b/server/sonar-db-dao/src/testFixtures/java/org/sonar/db/source/FileSourceTester.java
index e450b0d8c63..e450b0d8c63 100644
--- a/server/sonar-db-dao/src/test/java/org/sonar/db/source/FileSourceTester.java
+++ b/server/sonar-db-dao/src/testFixtures/java/org/sonar/db/source/FileSourceTester.java
diff --git a/server/sonar-db-dao/src/test/java/org/sonar/db/user/GroupTesting.java b/server/sonar-db-dao/src/testFixtures/java/org/sonar/db/user/GroupTesting.java
index cfb6379e188..cfb6379e188 100644
--- a/server/sonar-db-dao/src/test/java/org/sonar/db/user/GroupTesting.java
+++ b/server/sonar-db-dao/src/testFixtures/java/org/sonar/db/user/GroupTesting.java
diff --git a/server/sonar-db-dao/src/test/java/org/sonar/db/user/RootFlagAssertions.java b/server/sonar-db-dao/src/testFixtures/java/org/sonar/db/user/RootFlagAssertions.java
index 0b84443f834..0b84443f834 100644
--- a/server/sonar-db-dao/src/test/java/org/sonar/db/user/RootFlagAssertions.java
+++ b/server/sonar-db-dao/src/testFixtures/java/org/sonar/db/user/RootFlagAssertions.java
diff --git a/server/sonar-db-dao/src/test/java/org/sonar/db/user/UserDbTester.java b/server/sonar-db-dao/src/testFixtures/java/org/sonar/db/user/UserDbTester.java
index 138f9f85395..bc58c94d529 100644
--- a/server/sonar-db-dao/src/test/java/org/sonar/db/user/UserDbTester.java
+++ b/server/sonar-db-dao/src/testFixtures/java/org/sonar/db/user/UserDbTester.java
@@ -61,24 +61,24 @@ public class UserDbTester {
// USERS
public UserDto insertUser() {
- return insertUser(newUserDto());
+ return insertUser(UserTesting.newUserDto());
}
public UserDto insertUser(String login) {
- UserDto dto = newUserDto().setLogin(login).setActive(true);
+ UserDto dto = UserTesting.newUserDto().setLogin(login).setActive(true);
return insertUser(dto);
}
@SafeVarargs
public final UserDto insertUser(Consumer<UserDto>... populators) {
- UserDto dto = newUserDto().setActive(true);
+ UserDto dto = UserTesting.newUserDto().setActive(true);
stream(populators).forEach(p -> p.accept(dto));
return insertUser(dto);
}
@SafeVarargs
public final UserDto insertDisabledUser(Consumer<UserDto>... populators) {
- UserDto dto = newDisabledUser();
+ UserDto dto = UserTesting.newDisabledUser();
stream(populators).forEach(p -> p.accept(dto));
return insertUser(dto);
}
@@ -121,7 +121,7 @@ public class UserDbTester {
@SafeVarargs
public final UserPropertyDto insertUserSetting(UserDto user, Consumer<UserPropertyDto>... populators) {
- UserPropertyDto dto = newUserSettingDto(user);
+ UserPropertyDto dto = UserTesting.newUserSettingDto(user);
stream(populators).forEach(p -> p.accept(dto));
dbClient.userPropertiesDao().insertOrUpdate(db.getSession(), dto);
db.commit();
@@ -131,7 +131,7 @@ public class UserDbTester {
// GROUPS
public GroupDto insertGroup(OrganizationDto organization, String name) {
- GroupDto group = newGroupDto().setName(name).setOrganizationUuid(organization.getUuid());
+ GroupDto group = GroupTesting.newGroupDto().setName(name).setOrganizationUuid(organization.getUuid());
return insertGroup(group);
}
@@ -139,7 +139,7 @@ public class UserDbTester {
* Create group in default organization
*/
public GroupDto insertGroup() {
- GroupDto group = newGroupDto().setOrganizationUuid(db.getDefaultOrganization().getUuid());
+ GroupDto group = GroupTesting.newGroupDto().setOrganizationUuid(db.getDefaultOrganization().getUuid());
return insertGroup(group);
}
@@ -147,7 +147,7 @@ public class UserDbTester {
* Create group in specified organization
*/
public GroupDto insertGroup(OrganizationDto organizationDto) {
- GroupDto group = newGroupDto().setOrganizationUuid(organizationDto.getUuid());
+ GroupDto group = GroupTesting.newGroupDto().setOrganizationUuid(organizationDto.getUuid());
return insertGroup(group);
}
@@ -170,11 +170,11 @@ public class UserDbTester {
}
public GroupDto insertDefaultGroup(OrganizationDto organization, String name) {
- return insertDefaultGroup(newGroupDto().setName(name).setOrganizationUuid(organization.getUuid()));
+ return insertDefaultGroup(GroupTesting.newGroupDto().setName(name).setOrganizationUuid(organization.getUuid()));
}
public GroupDto insertDefaultGroup(OrganizationDto organization) {
- return insertDefaultGroup(newGroupDto().setOrganizationUuid(organization.getUuid()));
+ return insertDefaultGroup(GroupTesting.newGroupDto().setOrganizationUuid(organization.getUuid()));
}
@CheckForNull
@@ -368,7 +368,7 @@ public class UserDbTester {
@SafeVarargs
public final UserTokenDto insertToken(UserDto user, Consumer<UserTokenDto>... populators) {
- UserTokenDto dto = newUserToken().setUserUuid(user.getUuid());
+ UserTokenDto dto = UserTokenTesting.newUserToken().setUserUuid(user.getUuid());
stream(populators).forEach(p -> p.accept(dto));
db.getDbClient().userTokenDao().insert(db.getSession(), dto);
db.commit();
diff --git a/server/sonar-db-dao/src/test/java/org/sonar/db/user/UserTesting.java b/server/sonar-db-dao/src/testFixtures/java/org/sonar/db/user/UserTesting.java
index 65e76738293..65e76738293 100644
--- a/server/sonar-db-dao/src/test/java/org/sonar/db/user/UserTesting.java
+++ b/server/sonar-db-dao/src/testFixtures/java/org/sonar/db/user/UserTesting.java
diff --git a/server/sonar-db-dao/src/test/java/org/sonar/db/user/UserTokenTesting.java b/server/sonar-db-dao/src/testFixtures/java/org/sonar/db/user/UserTokenTesting.java
index 3d83071824f..3d83071824f 100644
--- a/server/sonar-db-dao/src/test/java/org/sonar/db/user/UserTokenTesting.java
+++ b/server/sonar-db-dao/src/testFixtures/java/org/sonar/db/user/UserTokenTesting.java
diff --git a/server/sonar-db-dao/src/test/java/org/sonar/db/webhook/WebhookDbTester.java b/server/sonar-db-dao/src/testFixtures/java/org/sonar/db/webhook/WebhookDbTester.java
index 24b823aa981..24b823aa981 100644
--- a/server/sonar-db-dao/src/test/java/org/sonar/db/webhook/WebhookDbTester.java
+++ b/server/sonar-db-dao/src/testFixtures/java/org/sonar/db/webhook/WebhookDbTester.java
diff --git a/server/sonar-db-dao/src/test/java/org/sonar/db/webhook/WebhookDeliveryDbTester.java b/server/sonar-db-dao/src/testFixtures/java/org/sonar/db/webhook/WebhookDeliveryDbTester.java
index 2bd8a385975..2bd8a385975 100644
--- a/server/sonar-db-dao/src/test/java/org/sonar/db/webhook/WebhookDeliveryDbTester.java
+++ b/server/sonar-db-dao/src/testFixtures/java/org/sonar/db/webhook/WebhookDeliveryDbTester.java
diff --git a/server/sonar-db-dao/src/test/java/org/sonar/db/webhook/WebhookDeliveryTesting.java b/server/sonar-db-dao/src/testFixtures/java/org/sonar/db/webhook/WebhookDeliveryTesting.java
index edefc760292..edefc760292 100644
--- a/server/sonar-db-dao/src/test/java/org/sonar/db/webhook/WebhookDeliveryTesting.java
+++ b/server/sonar-db-dao/src/testFixtures/java/org/sonar/db/webhook/WebhookDeliveryTesting.java
diff --git a/server/sonar-db-dao/src/test/java/org/sonar/db/webhook/WebhookTesting.java b/server/sonar-db-dao/src/testFixtures/java/org/sonar/db/webhook/WebhookTesting.java
index 52e532b70b0..52e532b70b0 100644
--- a/server/sonar-db-dao/src/test/java/org/sonar/db/webhook/WebhookTesting.java
+++ b/server/sonar-db-dao/src/testFixtures/java/org/sonar/db/webhook/WebhookTesting.java
diff --git a/server/sonar-db-testing/build.gradle b/server/sonar-db-testing/build.gradle
index 0b76a66038d..73ce5f115a4 100644
--- a/server/sonar-db-testing/build.gradle
+++ b/server/sonar-db-testing/build.gradle
@@ -9,5 +9,5 @@ dependencies {
compile 'com.h2database:h2'
compile testFixtures(project(':server:sonar-db-core'))
- compile project(':server:sonar-db-dao').sourceSets.test.output
+ compile testFixtures(project(':server:sonar-db-dao'))
}
diff --git a/server/sonar-webserver-api/build.gradle b/server/sonar-webserver-api/build.gradle
index 62d2bd8c42f..966bc42daf6 100644
--- a/server/sonar-webserver-api/build.gradle
+++ b/server/sonar-webserver-api/build.gradle
@@ -21,7 +21,6 @@ dependencies {
compile 'io.jsonwebtoken:jjwt-api'
compile 'io.jsonwebtoken:jjwt-impl'
compile project(':sonar-core')
- compile project(':server:sonar-db-dao')
compile project(':server:sonar-process')
compile project(':server:sonar-server-common')
compile project(path: ':sonar-plugin-api', configuration: 'shadow')
diff --git a/server/sonar-webserver-auth/build.gradle b/server/sonar-webserver-auth/build.gradle
index 44ae241588c..1a61303a9f6 100644
--- a/server/sonar-webserver-auth/build.gradle
+++ b/server/sonar-webserver-auth/build.gradle
@@ -18,7 +18,6 @@ dependencies {
compile 'io.jsonwebtoken:jjwt-api'
compile 'io.jsonwebtoken:jjwt-impl'
compile project(':sonar-core')
- compile project(':server:sonar-db-dao')
compile project(':server:sonar-process')
compile project(':server:sonar-server-common')
compile project(':server:sonar-webserver-api')
diff --git a/server/sonar-webserver-core/build.gradle b/server/sonar-webserver-core/build.gradle
index ea21d81838d..618d5cfebc3 100644
--- a/server/sonar-webserver-core/build.gradle
+++ b/server/sonar-webserver-core/build.gradle
@@ -39,7 +39,6 @@ dependencies {
compile project(':server:sonar-ce-common')
compile project(':server:sonar-ce-task')
compile project(':server:sonar-ce-task-projectanalysis')
- compile project(':server:sonar-db-dao')
compile project(':server:sonar-db-migration')
compile project(':server:sonar-process')
compile project(':server:sonar-server-common')