From f16e0c63de43a65f14b924993941aca9a4e7ff95 Mon Sep 17 00:00:00 2001 From: Duarte Meneses Date: Tue, 31 Aug 2021 11:13:39 -0500 Subject: [PATCH] SONAR-15259 Remove dead code and minor fixes --- .../java/org/sonar/db/component/ComponentDbTester.java | 9 +++++++++ 1 file changed, 9 insertions(+) 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); -- 2.39.5