| jacareto.record.Recordable jacareto.test.Test
All known Subclasses: jacareto.test.JComponentTest,
Constructor Summary | |
public | Test(Environment env, String componentName, boolean isIgnoring, boolean isCorrecting) Creates a new test record element with the specified values. | public | Test(Environment env, Components components, Component component) Creates a new test with the values of the given component and default values. | public | Test() Creates a new test with default values and no environment. |
Method Summary | |
abstract public boolean | evaluate(Components components) Evaluates the test. | public String | getComponentName() Returns the component name. | public String | getEvaluationMessage() Returns the evaluation message. | public boolean | getLastCorrected() Returns whether or not the failure of the last run has been corrected. | public boolean | getLastIgnored() Returns whether or not the failure of the last run has been ignored. | public boolean | getLastResult() Returns the result of the last test run. | public boolean | isAtomic() Returns true , because usually a test is an atomic record element. | public boolean | isCorrecting() Returns whether or not the test result will be corrected. | public boolean | isIgnoring() Returns whether or not the test result will be ignored. | public void | setComponentName(String componentName) Sets the component's name. | public void | setCorrecting(boolean isCorrecting) Specifies whether or not the values of the component should be corrected when the test has
failed. | protected void | setEvaluationMessage(String evaluationMessage) Defines the evaluation message. | public void | setIgnoring(boolean isIgnoring) Specifies whether or not the test result should be ignored or not. | protected void | setLastCorrected(boolean lastCorrected) Sets whether or not the failure of the last run has been corrected. | protected void | setLastIgnored(boolean lastIgnored) Sets whether or not the failure of the last run has been ignored. | protected void | setLastResult(boolean lastResult) Sets the result of the last test run. |
Test | public Test(Environment env, String componentName, boolean isIgnoring, boolean isCorrecting)(Code) | | Creates a new test record element with the specified values.
Parameters: env - the environment Parameters: componentName - the name of the component Parameters: isIgnoring - if the test result should be ignored Parameters: isCorrecting - if the values of the component should be corrected when the test hasfailed |
Test | public Test(Environment env, Components components, Component component)(Code) | | Creates a new test with the values of the given component and default values.
Parameters: env - the environment. Parameters: components - the components instance Parameters: component - the component to test |
evaluate | abstract public boolean evaluate(Components components)(Code) | | Evaluates the test. Should return false if the test fails, otherwise
true . If the test has failed, the error message can be retrieved. by calling
the method
Test.getEvaluationMessage() . If
Test.isCorrecting() returns
true , after the test the fields (or whatever) of the component will be set to
the right values in case of a failure. If
Test.isIgnoring() returns true ,
the behavior of this method is exactly the same as in the opposite case, except it always
returns true .
Parameters: components - the components instance true if all is ok, otherwise false |
getComponentName | public String getComponentName()(Code) | | Returns the component name.
DOCUMENT ME! |
getLastCorrected | public boolean getLastCorrected()(Code) | | Returns whether or not the failure of the last run has been corrected.
DOCUMENT ME! |
getLastIgnored | public boolean getLastIgnored()(Code) | | Returns whether or not the failure of the last run has been ignored.
DOCUMENT ME! |
getLastResult | public boolean getLastResult()(Code) | | Returns the result of the last test run.
DOCUMENT ME! |
isAtomic | public boolean isAtomic()(Code) | | Returns true , because usually a test is an atomic record element.
true |
isCorrecting | public boolean isCorrecting()(Code) | | Returns whether or not the test result will be corrected.
DOCUMENT ME! |
isIgnoring | public boolean isIgnoring()(Code) | | Returns whether or not the test result will be ignored.
DOCUMENT ME! |
setComponentName | public void setComponentName(String componentName)(Code) | | Sets the component's name.
Parameters: componentName - the name of the component. |
setCorrecting | public void setCorrecting(boolean isCorrecting)(Code) | | Specifies whether or not the values of the component should be corrected when the test has
failed.
Parameters: isCorrecting - whether or not the values will be corrected |
setEvaluationMessage | protected void setEvaluationMessage(String evaluationMessage)(Code) | | Defines the evaluation message.
Parameters: evaluationMessage - the evaluaton message |
setIgnoring | public void setIgnoring(boolean isIgnoring)(Code) | | Specifies whether or not the test result should be ignored or not. If it should be ignored,
the method
Test.evaluate(Components) will always return true
Parameters: isIgnoring - whether or not this test ignores the test result |
setLastCorrected | protected void setLastCorrected(boolean lastCorrected)(Code) | | Sets whether or not the failure of the last run has been corrected.
Parameters: lastCorrected - DOCUMENT ME! |
setLastIgnored | protected void setLastIgnored(boolean lastIgnored)(Code) | | Sets whether or not the failure of the last run has been ignored.
Parameters: lastIgnored - DOCUMENT ME! |
setLastResult | protected void setLastResult(boolean lastResult)(Code) | | Sets the result of the last test run.
Parameters: lastResult - DOCUMENT ME! |
|
|