public class TestCaseDef extends Object implements ITestCaseDef
test case
.Constructor and Description |
---|
TestCaseDef()
Creates a new TestCaseDef object.
|
TestCaseDef(TestCaseDef other)
Creates a new TestCaseDef object.
|
Modifier and Type | Method and Description |
---|---|
Tuple |
addBindings(Tuple tuple)
Adds the variable bindings defined by the given tuple.
|
Tuple |
addCompatible(Tuple tuple)
If the given tuple is compatible with the current test case definition, adds any
new bindings.
|
int |
compareTo(ITestCaseDef other) |
int |
getBindingCount()
Returns the number of variable bindings in this test case.
|
Integer |
getId()
Returns the (optional) id for this test case.
|
VarDef |
getInvalidVar()
Returns the variable bound to an invalid value, if any.
|
String |
getName()
Returns the (optional) name for this test case.
|
Set<String> |
getProperties()
Returns the properties of this test case.
|
IConjunct |
getRequired()
Returns the conditions of current bindings not yet satisfied.
|
VarValueDef |
getValue(VarDef var)
Returns the current value binding for the given input variable.
|
Iterator<VarDef> |
getVars()
Returns the variables currently bound in this test case.
|
boolean |
isApplicable(VarDef var)
Returns if the given variable is applicable to the current test case definition.
|
boolean |
isCompatible(Tuple tuple)
Returns if the given tuple is compatible with the current test case definition.
|
boolean |
isCompatible(VarBindingDef binding)
Returns if the given binding is compatible with the current test case definition.
|
boolean |
isInfeasible()
Returns true if the current
required condition for this test case
is unsatisfiable. |
boolean |
isNA(VarDef var)
Returns true if the given value is currently bound to the "not applicable" value.
|
boolean |
isSatisfied()
Returns true if all conditions for current bindings are satisfied.
|
void |
removeBindings(Tuple tuple)
Removes the variable bindings defined by the given tuple.
|
void |
revertBindings(int prevCount)
Removes the most-recently added variable bindings until the number of bindings reverts to
the given previous count.
|
void |
setId(Integer id)
Changes the (optional) id for this test case.
|
void |
setName(String name)
Changes the (optional) name for this test case.
|
void |
setName(Tuple tuple)
Changes the name for this test case to identify the given tuple.
|
String |
toString() |
boolean |
usesBinding(VarBindingDef binding)
Returns true if this test case uses the given binding.
|
boolean |
usesTuple(Tuple tuple)
Returns true if this test case uses all the bindings in the given tuple.
|
public TestCaseDef()
public TestCaseDef(TestCaseDef other)
public void setId(Integer id)
public Integer getId()
getId
in interface ITestCaseDef
public void setName(String name)
public void setName(Tuple tuple)
public String getName()
getName
in interface ITestCaseDef
public VarValueDef getValue(VarDef var)
getValue
in interface ITestCaseDef
public boolean usesTuple(Tuple tuple)
public boolean usesBinding(VarBindingDef binding)
public Tuple addCompatible(Tuple tuple)
public boolean isCompatible(Tuple tuple)
public boolean isCompatible(VarBindingDef binding)
public boolean isApplicable(VarDef var)
public Tuple addBindings(Tuple tuple) throws BindingException
BindingException
public void removeBindings(Tuple tuple)
public void revertBindings(int prevCount)
public Iterator<VarDef> getVars()
getVars
in interface ITestCaseDef
public int getBindingCount()
public boolean isNA(VarDef var)
isNA
in interface ITestCaseDef
public VarDef getInvalidVar()
getInvalidVar
in interface ITestCaseDef
public Set<String> getProperties()
getProperties
in interface ITestCaseDef
public IConjunct getRequired()
public boolean isSatisfied()
public boolean isInfeasible()
required condition
for this test case
is unsatisfiable.public int compareTo(ITestCaseDef other)
compareTo
in interface Comparable<ITestCaseDef>
Copyright © 2024 The Cornutum Project. All rights reserved.