|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcsheets.ext.CellExtension
csheets.ext.test.TestableCell
public class TestableCell
An extension of a cell in a spreadsheet, with support for test cases.
| Constructor Summary | |
|---|---|
TestableCell(Cell cell)
Creates a testable cell extension for the given cell. |
|
| Method Summary | |
|---|---|
void |
addTestableCellListener(TestableCellListener listener)
Registers the given listener on the cell. |
TestCaseParam |
addTestCaseParam(Value value)
Add a test case parameter to the cell's set of test case parameters. |
TestCaseParam |
addTestCaseParam(Value value,
TestCaseParam.Type type)
Add a test case parameter to the cell's set of test case parameters. |
protected boolean |
allPrecedentsHaveParams()
Tests if all of the cells precedents have test case parameters. |
void |
cellCleared(Cell cell)
Removes the test case parameters from the cell. |
void |
cellCopied(Cell cell,
Cell source)
Copies the user-specified test case parameters from the source cell to this one. |
void |
contentChanged(Cell cell)
Invoked to indicate that the content of the cell in the spreadsheet was modified and that test cases and test case paremeters that depend on that data must be updated, and new ones generated. |
protected void |
extendTestCases(TestableCell firstPrec,
TestCaseParam param)
|
protected void |
fireTestCaseParametersChanged()
Notifies all registered listeners that the cell's test case parameters changed. |
protected void |
fireTestCasesChanged()
Notifies all registered listeners that the cell's test cases changed. |
Set<TestCaseParam> |
getTestCaseParams()
Returns the cell's test case parameters. |
Set<TestCase> |
getTestCases()
Returns the test cases for the cell, which consist of a predetermined value for each of the cell's precedents. |
double |
getTestedness()
Returns the testedness of the cell, i.e. the ratio of valid test cases to available test cases in the cell. |
boolean |
hasTestCaseParams()
Returns whether the cell has any test case parameters. |
boolean |
hasTestCases()
Returns whether the cell has any test cases. |
boolean |
hasTestError()
Returns whether any of the cell's test cases have been rejected. |
void |
precedentAddedParam(TestableCell cell,
TestCaseParam param)
Invoked when a test case parameter is added to one of the cell's precedents. |
void |
precedentRemovedParam(TestableCell cell,
TestCaseParam param)
Invoked when a test case parameter is removed from one of the cell's precedents. |
protected void |
removeAllTcpsOfType(TestCaseParam.Type type)
|
void |
removeTestableCellListener(TestableCellListener listener)
Removes the given listener from the cell. |
void |
removeTestCaseParam(TestCaseParam param)
Removes a test case parameter from the cell's set of test case parameters. |
void |
removeTestCaseParam(TestCaseParam param,
TestCaseParam.Type type)
Removes a test case parameter from the cell's set of test case parameters. |
void |
resetTestCases()
Generates new test cases for the cell, provided that all its precedents have test case parameters. |
| Methods inherited from class csheets.ext.CellExtension |
|---|
addCellListener, clear, compareTo, copyFrom, dependentsChanged, getAddress, getCellListeners, getContent, getDelegate, getDependents, getExtension, getFormula, getName, getPrecedents, getSpreadsheet, getValue, moveFrom, removeCellListener, setContent, toString, valueChanged |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
TestableCell(Cell cell)
cell - the cell to extend| Method Detail |
|---|
public void contentChanged(Cell cell)
contentChanged in interface CellListenercontentChanged in class CellExtensioncell - the cell that was modifiedpublic Set<TestCase> getTestCases()
public boolean hasTestCases()
public boolean hasTestError()
public double getTestedness()
public void resetTestCases()
protected void extendTestCases(TestableCell firstPrec,
TestCaseParam param)
public Set<TestCaseParam> getTestCaseParams()
public boolean hasTestCaseParams()
protected boolean allPrecedentsHaveParams()
public TestCaseParam addTestCaseParam(Value value)
throws DuplicateUserTCPException
value - the value of the test case parameter to be added
DuplicateUserTCPException
public TestCaseParam addTestCaseParam(Value value,
TestCaseParam.Type type)
value - the value of the test case parameter to be addedtype - the type of test case parameterpublic void removeTestCaseParam(TestCaseParam param)
param - the test case parameter to be removed
public void removeTestCaseParam(TestCaseParam param,
TestCaseParam.Type type)
param - the test case parameter to be removedtype - the type of the parameter to removeprotected void removeAllTcpsOfType(TestCaseParam.Type type)
public void precedentAddedParam(TestableCell cell,
TestCaseParam param)
cell - the precedent to which the test case parameter was addedparam - the test case parameter that was added
public void precedentRemovedParam(TestableCell cell,
TestCaseParam param)
cell - the precedent from which the test case parameter was removedparam - the test case parameter that was removedpublic void cellCleared(Cell cell)
cellCleared in interface CellListenercellCleared in class CellExtensioncell - the cell that was modified
public void cellCopied(Cell cell,
Cell source)
cellCopied in interface CellListenercellCopied in class CellExtensioncell - the cell that was modifiedsource - the cell from which data was copiedpublic void addTestableCellListener(TestableCellListener listener)
listener - the listener to be addedpublic void removeTestableCellListener(TestableCellListener listener)
listener - the listener to be removedprotected void fireTestCasesChanged()
protected void fireTestCaseParametersChanged()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||