Package com.pawelmaslyk.gerritintegration4sonar.sonar

Examples of com.pawelmaslyk.gerritintegration4sonar.sonar.SonarAnalysisResult


    // when
    when(commit.getProjectName()).thenReturn("projectname");
    when(commit.getChange()).thenReturn("1");
    when(commit.getPatch()).thenReturn("2");
    String command = GerritCommand.createCodeReview(commit, new SonarAnalysisResult("Sonar analysis",
        SonarAnalysisStatus.NO_PROBLEMS));

    // then
    assertEquals("gerrit approve --project projectname --message \"Sonar analysis\" --code-review 1 1,2", command);
  }
View Full Code Here


    // when
    when(commit.getProjectName()).thenReturn("projectname");
    when(commit.getChange()).thenReturn("1");
    when(commit.getPatch()).thenReturn("2");
    String command = GerritCommand.createCodeReview(commit, new SonarAnalysisResult("Some\n message",
        SonarAnalysisStatus.WARNINGS));

    // then
    assertEquals("gerrit approve --project projectname --message \"Some\n message\" --code-review -1 1,2", command);
  }
View Full Code Here

    // when
    when(commit.getProjectName()).thenReturn("projectname");
    when(commit.getChange()).thenReturn("1");
    when(commit.getPatch()).thenReturn("2");
    String command = GerritCommand.createCodeReview(commit, new SonarAnalysisResult("Error message",
        SonarAnalysisStatus.ERRORS));

    // then
    assertEquals("gerrit approve --project projectname --message \"Error message\" --code-review -2 1,2", command);
  }
View Full Code Here

TOP

Related Classes of com.pawelmaslyk.gerritintegration4sonar.sonar.SonarAnalysisResult

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.