org.sonar.api.batch.sensor.test
Interface TestCaseCoverage

All Known Implementing Classes:
DefaultTestCaseCoverage

public interface TestCaseCoverage

Represents line coverage produced by a single test in a test file on a single main file.

Since:
5.0

Method Summary
 TestCaseCoverage cover(InputFile mainFile)
          Set file covered by this test.
 InputFile coveredFile()
          InputFile covered by this test.
 List<Integer> coveredLines()
          List of line numbers (1-based) covered by this test.
 TestCaseCoverage onLines(List<Integer> lines)
          Set list of line numbers (1-based) covered by this test.
 void save()
          Call this method only once when your are done with defining the test case coverage.
 InputFile testFile()
          InputFile where this test is located.
 TestCaseCoverage testFile(InputFile testFile)
          Set file where this test is located.
 String testName()
          Name of this test case.
 TestCaseCoverage testName(String name)
          Set name of this test.
 

Method Detail

testFile

InputFile testFile()
InputFile where this test is located.


testFile

TestCaseCoverage testFile(InputFile testFile)
Set file where this test is located. Mandatory.


testName

String testName()
Name of this test case.


testName

TestCaseCoverage testName(String name)
Set name of this test. Name is mandatory.


coveredFile

InputFile coveredFile()
InputFile covered by this test.


cover

TestCaseCoverage cover(InputFile mainFile)
Set file covered by this test. Mandatory.


coveredLines

List<Integer> coveredLines()
List of line numbers (1-based) covered by this test.


onLines

TestCaseCoverage onLines(List<Integer> lines)
Set list of line numbers (1-based) covered by this test. Mandatory.


save

void save()
Call this method only once when your are done with defining the test case coverage.



Copyright © 2009–2015 SonarSource. All rights reserved.