net.sf.jameleon.result
Class FunctionResult

java.lang.Object
  extended by net.sf.jameleon.result.JameleonTestResult
      extended by net.sf.jameleon.result.FunctionResult
All Implemented Interfaces:
Serializable, XMLable, LocationAware
Direct Known Subclasses:
CountableFunctionResult

public class FunctionResult
extends JameleonTestResult

An implementation of @see TestResult that represents the result of a function point

See Also:
Serialized Form

Field Summary
protected  boolean postcondition
          If the function is a postcondition
protected  boolean precondition
          If the function is a precondition
protected  String resultsFileName
          The name of the file where the results of the display were written to if any
 
Fields inherited from class net.sf.jameleon.result.JameleonTestResult
columnNumber, E_CDATA, elementTagName, error, errorFile, executionTime, failed, lineNumber, parentResults, S_CDATA, scriptFileName, tag
 
Constructor Summary
FunctionResult()
          The default constructor
FunctionResult(FunctionalPoint tag)
           
FunctionResult(FunctionalPoint tag, HasChildResults parentTestResult)
           
 
Method Summary
 String getErrorMsg()
           
protected  String getErrorMsgPrefix()
           
 boolean hasChildren()
          Tells whether this result has children or not.
 boolean isDataDriven()
          Tells whether this result is data driven or not.
 boolean isParent()
          Tells whether this result is a parent result or not.
 boolean isPostcondition()
          Tells whether the functional point is a postcondition
 boolean isPrecondition()
          Tells whether the functional point is a precondition
 void setPostcondition(boolean postcondition)
          Sets the FunctionalPoint as a postcondition
 void setPrecondition(boolean precondition)
          Sets the FunctionalPoint as a precondition
 String toString()
           
 String toXML()
          Implement this method the same way the toString method would be implemented, except the object's information should be in a valid XML format.
 
Methods inherited from class net.sf.jameleon.result.JameleonTestResult
copyLocationAwareProperties, destroy, equals, escapeXML, failed, findAncestorByClass, getColumnNumber, getDateTimeExecuted, getElementName, getError, getErrorFile, getExecutionTime, getExecutionTimeToDisplay, getFailedRowNum, getFileName, getHtmlFormattedErrorMsg, getHtmlFormattedStackTrace, getIdentifier, getLineNumber, getOutcome, getParentResults, getTag, hashCode, isA, passed, recordFailureToCountableResult, setColumnNumber, setDateTimeExecuted, setElementName, setError, setErrorFile, setExecutionTime, setFailed, setFileName, setLineNumber, setParentResults, setTag
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

resultsFileName

protected String resultsFileName
The name of the file where the results of the display were written to if any


precondition

protected boolean precondition
If the function is a precondition


postcondition

protected boolean postcondition
If the function is a postcondition

Constructor Detail

FunctionResult

public FunctionResult()
The default constructor


FunctionResult

public FunctionResult(FunctionalPoint tag)
Parameters:
tag - - The functional point tied to the results

FunctionResult

public FunctionResult(FunctionalPoint tag,
                      HasChildResults parentTestResult)
Parameters:
tag - - The functional point tied to the results
parentTestResult - - The parent test results to update
Method Detail

getErrorMsgPrefix

protected String getErrorMsgPrefix()

getErrorMsg

public String getErrorMsg()
Overrides:
getErrorMsg in class JameleonTestResult
Returns:
the stack trace stating was happened

isParent

public boolean isParent()
Description copied from class: JameleonTestResult
Tells whether this result is a parent result or not.

Specified by:
isParent in class JameleonTestResult
Returns:
true if this result is a parent result or false if it is a leaf node result

isDataDriven

public boolean isDataDriven()
Description copied from class: JameleonTestResult
Tells whether this result is data driven or not.

Specified by:
isDataDriven in class JameleonTestResult
Returns:
true if this result is a data driven result or false if it is not.

hasChildren

public boolean hasChildren()
Description copied from class: JameleonTestResult
Tells whether this result has children or not.

Specified by:
hasChildren in class JameleonTestResult
Returns:
true if this result has children

isPrecondition

public boolean isPrecondition()
Tells whether the functional point is a precondition

Returns:
true if this is a precondition, otherwise false

setPrecondition

public void setPrecondition(boolean precondition)
Sets the FunctionalPoint as a precondition

Parameters:
precondition - - set to true to make this a precondition

isPostcondition

public boolean isPostcondition()
Tells whether the functional point is a postcondition

Returns:
true if this is a postcondition, otherwise false

setPostcondition

public void setPostcondition(boolean postcondition)
Sets the FunctionalPoint as a postcondition

Parameters:
postcondition - - set to true to make this a postcondition

toString

public String toString()
Overrides:
toString in class JameleonTestResult
Returns:
a String representation of the function point results

toXML

public String toXML()
Description copied from interface: XMLable
Implement this method the same way the toString method would be implemented, except the object's information should be in a valid XML format.

Specified by:
toXML in interface XMLable
Overrides:
toXML in class JameleonTestResult
Returns:
an XML representation of the function point results


Copyright © 2003-2008 Christian Hargraves. All Rights Reserved.