com.atlassian.bamboo.results.tests
Class TestResults

java.lang.Object
  extended by com.atlassian.bamboo.results.tests.TestResults

public class TestResults
extends Object

This class is a POJO for representing unit test results.


Constructor Summary
TestResults(String className, String methodName, String duration)
          Create a new test
 
Method Summary
 void addError(TestResultError error)
          Add an error to the test
 int compareTo(Object obj)
           
 boolean equals(Object o)
           
 String getActualMethodName()
          Returns the actual method name without the pretty spaces
 String getClassName()
          The name of the class
 String getDuration()
          How long did the test take to execute?
 double getDurationInSeconds()
           
 List getErrors()
          How many errors does the test have.
 String getKey()
          A key uniquely identifying this test result
 String getMethodName()
          What is the name of the test
 String getPrettyDuration()
           
 String getSystemOut()
           
 boolean hasErrors()
           
 int hashCode()
           
 void setSystemOut(String systemOut)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TestResults

public TestResults(String className,
                   String methodName,
                   String duration)
Create a new test

Parameters:
className - The name of the class containing the test
methodName - The name of the test
duration - The time the test took to execute in seconds
Method Detail

getKey

public String getKey()
A key uniquely identifying this test result

Returns:
String classname:methodName

getActualMethodName

public String getActualMethodName()
Returns the actual method name without the pretty spaces

Returns:

getMethodName

public String getMethodName()
What is the name of the test

Returns:
The test name

getClassName

public String getClassName()
The name of the class

Returns:
The class name

getDuration

public String getDuration()
How long did the test take to execute?

Returns:
the length of the test in milis

addError

public void addError(TestResultError error)
Add an error to the test

Parameters:
error - a new error

getErrors

public List getErrors()
How many errors does the test have.

Returns:
The collection of errors. An empty list is returned is there are no errors.

setSystemOut

public void setSystemOut(String systemOut)

getSystemOut

public String getSystemOut()

hasErrors

public boolean hasErrors()

getDurationInSeconds

public double getDurationInSeconds()

getPrettyDuration

public String getPrettyDuration()

equals

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

hashCode

public int hashCode()
Overrides:
hashCode in class Object

compareTo

public int compareTo(Object obj)


Copyright © 2006 Atlassian Software Systems. All Rights Reserved.