org.sonar.plugins.python.xunit
Class TestSuite

java.lang.Object
  extended by org.sonar.plugins.python.xunit.TestSuite

public class TestSuite
extends Object

Represents a unit test suite. Contains testcases, maintains some statistics. Reports testcase details in sonar-conform XML


Constructor Summary
TestSuite(String key)
          Creates a testsuite instance uniquely identified by the given key
 
Method Summary
 TestSuite addMeasures(TestSuite ts)
          Adds the measures contained by the given test suite to this test suite
 void addTestCase(TestCase tc)
          Adds the given test case to this testsuite maintaining the internal statistics
 boolean equals(Object o)
           
 String getDetails()
          Returns execution details as sonar-conform XML
 int getErrors()
           
 int getFailures()
           
 String getKey()
           
 int getSkipped()
           
 org.sonar.api.resources.File getSonarResource()
           
 List<TestCase> getTestCases()
          Returns the testcases contained by this test suite
 int getTests()
           
 int getTime()
           
 int hashCode()
           
 void setSonarResource(org.sonar.api.resources.File resource)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TestSuite

public TestSuite(String key)
Creates a testsuite instance uniquely identified by the given key

Parameters:
key - The key to construct a testsuite for
Method Detail

getKey

public String getKey()

getErrors

public int getErrors()

getSkipped

public int getSkipped()

getTests

public int getTests()

getTime

public int getTime()

getFailures

public int getFailures()

equals

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

hashCode

public int hashCode()
Overrides:
hashCode in class Object

addTestCase

public void addTestCase(TestCase tc)
Adds the given test case to this testsuite maintaining the internal statistics

Parameters:
tc - the test case to add

addMeasures

public TestSuite addMeasures(TestSuite ts)
Adds the measures contained by the given test suite to this test suite

Parameters:
ts - the test suite to add the measures from

getTestCases

public List<TestCase> getTestCases()
Returns the testcases contained by this test suite


getDetails

public String getDetails()
Returns execution details as sonar-conform XML


setSonarResource

public void setSonarResource(org.sonar.api.resources.File resource)

getSonarResource

public org.sonar.api.resources.File getSonarResource()


Copyright © 2011-2012 SonarSource and Waleri Enns. All Rights Reserved.