diff options
author | Duarte Meneses <duarte.meneses@sonarsource.com> | 2021-08-31 11:13:39 -0500 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2021-09-08 20:03:35 +0000 |
commit | f16e0c63de43a65f14b924993941aca9a4e7ff95 (patch) | |
tree | 17d2a67243876286106d22e734587c8104187cee /server/sonar-db-dao | |
parent | eded18b4837348b53770b13786e141dee515a0d8 (diff) | |
download | sonarqube-f16e0c63de43a65f14b924993941aca9a4e7ff95.tar.gz sonarqube-f16e0c63de43a65f14b924993941aca9a4e7ff95.zip |
SONAR-15259 Remove dead code and minor fixes
Diffstat (limited to 'server/sonar-db-dao')
-rw-r--r-- | server/sonar-db-dao/src/testFixtures/java/org/sonar/db/component/ComponentDbTester.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/server/sonar-db-dao/src/testFixtures/java/org/sonar/db/component/ComponentDbTester.java b/server/sonar-db-dao/src/testFixtures/java/org/sonar/db/component/ComponentDbTester.java index e7ee9c0cc63..402b3a5b401 100644 --- a/server/sonar-db-dao/src/testFixtures/java/org/sonar/db/component/ComponentDbTester.java +++ b/server/sonar-db-dao/src/testFixtures/java/org/sonar/db/component/ComponentDbTester.java @@ -193,6 +193,11 @@ public class ComponentDbTester { return getPortfolioDto(component); } + public final PortfolioDto insertPrivatePortfolioDto(String uuid, Consumer<PortfolioDto> portfolioPopulator) { + ComponentDto component = insertComponentAndPortfolio(ComponentTesting.newPortfolio(uuid).setPrivate(true), true, defaults(), portfolioPopulator); + return getPortfolioDto(component); + } + public final PortfolioDto insertPrivatePortfolioDto() { ComponentDto component = insertComponentAndPortfolio(ComponentTesting.newPortfolio().setPrivate(true), true, defaults(), defaults()); return getPortfolioDto(component); @@ -270,6 +275,10 @@ public class ComponentDbTester { addPortfolioReference(portfolio.getUuid(), referencerUuids); } + public void addPortfolioReference(PortfolioDto portfolio, PortfolioDto reference) { + addPortfolioReference(portfolio.getUuid(), reference.getUuid()); + } + public void addPortfolioProject(String portfolioUuid, String... projectUuids) { for (String uuid : projectUuids) { dbClient.portfolioDao().addProject(dbSession, portfolioUuid, uuid); |