Search in sources :

Example 6 with MutableTestCase

use of org.sonar.api.test.MutableTestCase 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

MutableTestCase (org.sonar.api.test.MutableTestCase)6 File (java.io.File)3 InputFile (org.sonar.api.batch.fs.InputFile)3 MutableTestPlan (org.sonar.api.test.MutableTestPlan)3 IOException (java.io.IOException)2 ArrayList (java.util.ArrayList)1 SMInputCursor (org.codehaus.staxmate.in.SMInputCursor)1 Before (org.junit.Before)1 DefaultInputComponent (org.sonar.api.batch.fs.internal.DefaultInputComponent)1 DefaultInputFile (org.sonar.api.batch.fs.internal.DefaultInputFile)1 CoverageBlock (org.sonar.api.test.CoverageBlock)1 MutableTestable (org.sonar.api.test.MutableTestable)1 TestCase (org.sonar.api.test.TestCase)1 TestPlanBuilder (org.sonar.scanner.deprecated.test.TestPlanBuilder)1