org.sonar.api.batch.sensor.test.internal
Class DefaultTestCaseCoverage

java.lang.Object
  extended by org.sonar.api.batch.sensor.internal.DefaultStorable
      extended by org.sonar.api.batch.sensor.test.internal.DefaultTestCaseCoverage
All Implemented Interfaces:
TestCaseCoverage

public class DefaultTestCaseCoverage
extends DefaultStorable
implements TestCaseCoverage


Field Summary
 
Fields inherited from class org.sonar.api.batch.sensor.internal.DefaultStorable
storage
 
Constructor Summary
DefaultTestCaseCoverage()
           
DefaultTestCaseCoverage(SensorStorage storage)
           
 
Method Summary
 DefaultTestCaseCoverage 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.
 void doSave()
           
 boolean equals(Object obj)
           
 int hashCode()
           
 DefaultTestCaseCoverage onLines(List<Integer> lines)
          Set list of line numbers (1-based) covered by this test.
 InputFile testFile()
          InputFile where this test is located.
 DefaultTestCaseCoverage testFile(InputFile testFile)
          Set file where this test is located.
 String testName()
          Name of this test case.
 DefaultTestCaseCoverage testName(String name)
          Set name of this test.
 
Methods inherited from class org.sonar.api.batch.sensor.internal.DefaultStorable
save, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.sonar.api.batch.sensor.test.TestCaseCoverage
save
 

Constructor Detail

DefaultTestCaseCoverage

public DefaultTestCaseCoverage()

DefaultTestCaseCoverage

public DefaultTestCaseCoverage(SensorStorage storage)
Method Detail

testFile

public InputFile testFile()
Description copied from interface: TestCaseCoverage
InputFile where this test is located.

Specified by:
testFile in interface TestCaseCoverage

testFile

public DefaultTestCaseCoverage testFile(InputFile testFile)
Description copied from interface: TestCaseCoverage
Set file where this test is located. Mandatory.

Specified by:
testFile in interface TestCaseCoverage

coveredFile

public InputFile coveredFile()
Description copied from interface: TestCaseCoverage
InputFile covered by this test.

Specified by:
coveredFile in interface TestCaseCoverage

cover

public DefaultTestCaseCoverage cover(InputFile mainFile)
Description copied from interface: TestCaseCoverage
Set file covered by this test. Mandatory.

Specified by:
cover in interface TestCaseCoverage

testName

public DefaultTestCaseCoverage testName(String name)
Description copied from interface: TestCaseCoverage
Set name of this test. Name is mandatory.

Specified by:
testName in interface TestCaseCoverage

testName

public String testName()
Description copied from interface: TestCaseCoverage
Name of this test case.

Specified by:
testName in interface TestCaseCoverage

coveredLines

public List<Integer> coveredLines()
Description copied from interface: TestCaseCoverage
List of line numbers (1-based) covered by this test.

Specified by:
coveredLines in interface TestCaseCoverage

onLines

public DefaultTestCaseCoverage onLines(List<Integer> lines)
Description copied from interface: TestCaseCoverage
Set list of line numbers (1-based) covered by this test. Mandatory.

Specified by:
onLines in interface TestCaseCoverage

doSave

public void doSave()
Specified by:
doSave in class DefaultStorable

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object


Copyright © 2009–2015 SonarSource. All rights reserved.