From: Duarte Meneses Date: Tue, 31 Aug 2021 16:13:39 +0000 (-0500) Subject: SONAR-15259 Remove dead code and minor fixes X-Git-Tag: 9.1.0.47736~51 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=f16e0c63de43a65f14b924993941aca9a4e7ff95;p=sonarqube.git SONAR-15259 Remove dead code and minor fixes --- 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 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);