]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-15259 Remove dead code and minor fixes
authorDuarte Meneses <duarte.meneses@sonarsource.com>
Tue, 31 Aug 2021 16:13:39 +0000 (11:13 -0500)
committersonartech <sonartech@sonarsource.com>
Wed, 8 Sep 2021 20:03:35 +0000 (20:03 +0000)
server/sonar-db-dao/src/testFixtures/java/org/sonar/db/component/ComponentDbTester.java

index e7ee9c0cc639da8e758b213ed9d276c44621d20e..402b3a5b401ad7459afc0b12094c1a29098f110f 100644 (file)
@@ -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);