com.googlecode.lightest.core
Interface ITaskResult

All Known Implementing Classes:
TaskResult

public interface ITaskResult

Represents a domain-specific task to be performed in a test. ITask's are typically owned by IDomainSpecificApi's.


Field Summary
static List HUMAN_READABLE_STATUS
          maps numeric status values to their respective String status names, by List index.
static int STATUS_DOOMED
           
static int STATUS_FAILED
           
static int STATUS_FLAGGED
           
static int STATUS_OK
           
 
Method Summary
 void addLink(String link)
          Adds a URL referencing a resource that provides additional information related to this result, to a collection maintained by the result object.
 void addLink(TaskResultLink link)
          Adds a URL referencing a resource that provides additional information related to this result, to a collection maintained by the result object.
 void appendChild(ITaskResult childResult)
          Adds to the list of child task results.
 List children()
          Returns a list of child task results.
 void doom()
          Sets the status of this result to STATUS_DOOMED, which indicates that the failure of the task means the remainder of the test cannot continue successfully, and should be aborted.
 void fail()
          Sets the status of this result to STATUS_FAILED.
 void flag()
          Sets the status of this result to STATUS_FLAGGED, but only if it is not already STATUS_FAILED.
 String getDetailedMessage()
          Returns a detailed message about the task execution, for example, the data generated by performing the task, if any.
 long getEndTime()
          Returns the time the task was finished.
 List getLinks()
          Returns the list of URL's associated with this result.
 String getMessage()
          Returns a message describing the result.
 ITaskResult getParent()
          Returns the parent task result.
 long getStartTime()
          Returns the time the task was started.
 int getStatus()
          Returns the status of the result.
 ITask getTask()
          Returns the task whose performance returned this result.
 void setDetailedMessage(String detailedMessage)
          Sets the return value of getDetailedMessage().
 void setEndTime(long endTime)
          Sets the time the task was finished.
 void setMessage(String message)
          Sets the return value of getMessage().
 void setParent(ITaskResult parentResult)
          Sets the parent task result.
 void setStartTime(long startTime)
          Sets the time the task was started.
 

Field Detail

HUMAN_READABLE_STATUS

static final List HUMAN_READABLE_STATUS
maps numeric status values to their respective String status names, by List index.


STATUS_OK

static final int STATUS_OK
See Also:
Constant Field Values

STATUS_FLAGGED

static final int STATUS_FLAGGED
See Also:
Constant Field Values

STATUS_FAILED

static final int STATUS_FAILED
See Also:
Constant Field Values

STATUS_DOOMED

static final int STATUS_DOOMED
See Also:
Constant Field Values
Method Detail

getMessage

String getMessage()
Returns a message describing the result.


getDetailedMessage

String getDetailedMessage()
Returns a detailed message about the task execution, for example, the data generated by performing the task, if any.


getLinks

List getLinks()
Returns the list of URL's associated with this result.


getStatus

int getStatus()
Returns the status of the result.


getTask

ITask getTask()
Returns the task whose performance returned this result.


getStartTime

long getStartTime()
Returns the time the task was started.


getEndTime

long getEndTime()
Returns the time the task was finished.


setMessage

void setMessage(String message)
Sets the return value of getMessage().

Parameters:
message -

setDetailedMessage

void setDetailedMessage(String detailedMessage)
Sets the return value of getDetailedMessage().

Parameters:
detailedMessage -

addLink

void addLink(String link)
Adds a URL referencing a resource that provides additional information related to this result, to a collection maintained by the result object.

Parameters:
link - the string representation of the URL to add

addLink

void addLink(TaskResultLink link)
Adds a URL referencing a resource that provides additional information related to this result, to a collection maintained by the result object.

Parameters:
link - the link object to add

setStartTime

void setStartTime(long startTime)
Sets the time the task was started.


setEndTime

void setEndTime(long endTime)
Sets the time the task was finished.


setParent

void setParent(ITaskResult parentResult)
Sets the parent task result.

Parameters:
parentResult -

getParent

ITaskResult getParent()
Returns the parent task result.


appendChild

void appendChild(ITaskResult childResult)
Adds to the list of child task results.


children

List children()
Returns a list of child task results.


flag

void flag()
Sets the status of this result to STATUS_FLAGGED, but only if it is not already STATUS_FAILED. The default status of the task should be STATUS_OK. Flagging a child will also flag the parent, but not vice versa.


fail

void fail()
Sets the status of this result to STATUS_FAILED. The default status of the task should be STATUS_OK. Failing a child will also fail the parent, but not vice versa.


doom

void doom()
Sets the status of this result to STATUS_DOOMED, which indicates that the failure of the task means the remainder of the test cannot continue successfully, and should be aborted. Dooming a child will also doom the parent, but not vice versa.



Copyright © 2009. All Rights Reserved.