Package rife.bld.extension.junitreporter
Class TestClassFailures
java.lang.Object
rife.bld.extension.junitreporter.TestClassFailures
Represents the aggregated test failures for a specific test class.
- Since:
- 1.0
- Author:
- Erik C. Thauvin
-
Constructor Summary
ConstructorsConstructorDescriptionTestClassFailures
(String className) Constructs a newTestClassFailures
object for a specific test class. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addFailure
(TestFailure failure) Adds a test failure to the collection of failures for this specific test class.boolean
Determines if this object is equal to another object.Retrieves the name of the test class associated with the test failures.Retrieves a sorted list of all test failures associated with this test class.int
Retrieves the total number of test failures associated with a specific test class.double
Retrieves the total execution time of the test failures associated with a specific test class.int
hashCode()
Calculates the hash code for this object.void
Sorts the failures in-place.toString()
Returns a string representation of this object.
-
Constructor Details
-
TestClassFailures
Constructs a newTestClassFailures
object for a specific test class.- Parameters:
className
- the name of the test class; must not be null
-
-
Method Details
-
addFailure
Adds a test failure to the collection of failures for this specific test class.- Parameters:
failure
- theTestFailure
object to be added; must not be null- Throws:
NullPointerException
- if the failure is null
-
getClassName
Retrieves the name of the test class associated with the test failures.- Returns:
- the name of the test class as a non-null string
-
getFailures
Retrieves a sorted list of all test failures associated with this test class.The failures are sorted by class name first, then by test name.
- Returns:
- a sorted list of
TestFailure
objects representing all test failures for this test class
-
getTotalFailures
public int getTotalFailures()Retrieves the total number of test failures associated with a specific test class.- Returns:
- the total count of test failures as an integer
-
getTotalTime
public double getTotalTime()Retrieves the total execution time of the test failures associated with a specific test class.- Returns:
- the total execution time as a double
-
hashCode
public int hashCode()Calculates the hash code for this object. -
equals
Determines if this object is equal to another object. -
toString
Returns a string representation of this object. -
sortFailures
public void sortFailures()Sorts the failures in-place. This method is called internally to ensure failures are sorted before the final results are returned.
-