Search in sources :

Example 1 with TestPlanBuilder

use of org.sonar.scanner.deprecated.test.TestPlanBuilder in project sonarqube by SonarSource.

the class GenericTestExecutionReportParserTest method before.

@Before
public void before() {
    context = SensorContextTester.create(new File(""));
    fileWithBranches = setupFile("src/main/java/com/example/ClassWithBranches.java");
    emptyFile = setupFile("src/main/java/com/example/EmptyClass.java");
    testPlanBuilder = mock(TestPlanBuilder.class);
    MutableTestCase testCase = mockMutableTestCase();
    testPlan = mockMutableTestPlan(testCase);
    when(testPlanBuilder.loadPerspective(eq(MutableTestPlan.class), any(InputFile.class))).thenReturn(testPlan);
}
Also used : MutableTestPlan(org.sonar.api.test.MutableTestPlan) MutableTestCase(org.sonar.api.test.MutableTestCase) TestPlanBuilder(org.sonar.scanner.deprecated.test.TestPlanBuilder) InputFile(org.sonar.api.batch.fs.InputFile) DefaultInputFile(org.sonar.api.batch.fs.internal.DefaultInputFile) File(java.io.File) InputFile(org.sonar.api.batch.fs.InputFile) DefaultInputFile(org.sonar.api.batch.fs.internal.DefaultInputFile) Before(org.junit.Before)

Aggregations

File (java.io.File)1 Before (org.junit.Before)1 InputFile (org.sonar.api.batch.fs.InputFile)1 DefaultInputFile (org.sonar.api.batch.fs.internal.DefaultInputFile)1 MutableTestCase (org.sonar.api.test.MutableTestCase)1 MutableTestPlan (org.sonar.api.test.MutableTestPlan)1 TestPlanBuilder (org.sonar.scanner.deprecated.test.TestPlanBuilder)1