public class TestCase extends Formula implements Serializable
Modifier and Type | Class and Description |
---|---|
static class |
TestCase.ValidationState
The validation states of a test case.
|
Constructor and Description |
---|
TestCase(TestableCell cell,
Set<TestCaseParam> params)
Creates a new test case for the given cell in the given spreadsheet.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object other)
Returns whether the other object has the same parameters
and cell as this has.
|
Value |
evaluate()
Evaluates the expression and returns the result.
|
TestableCell |
getCell()
Returns the cell to which the formula belongs.
|
Set<TestCaseParam> |
getParams() |
TestCase.ValidationState |
getValidationState() |
int |
hashCode()
Returns the hash code of the test case.
|
boolean |
hasParam(TestCaseParam param)
Test if the TestCase is based on a specified TestCaseParam.
|
void |
setValidationState(TestCase.ValidationState state) |
accept, getExpression, getReferences, hasCircularReference, toString
public TestCase(TestableCell cell, Set<TestCaseParam> params)
cell
- the cell for which the test case is to be createdparams
- the set of test case parameters to usepublic TestableCell getCell()
Formula
public Value evaluate()
Expression
evaluate
in interface Expression
evaluate
in class Formula
public Set<TestCaseParam> getParams()
public TestCase.ValidationState getValidationState()
public void setValidationState(TestCase.ValidationState state)
state
- Sets the ValidationState of the TestCase to the param's state.public boolean hasParam(TestCaseParam param)
param
- The TestCaseParam we want to know it the TestCase usespublic boolean equals(Object other)