|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.jameleon.util.AssertLevel
public class AssertLevel
A singleton that keeps track of the assert levels accross all test cases. This is implemented by calling an "assert" method
that takes an assertLevel
parameter in it. If an "assert" method without that parameter is sent, this singleton will
no be used to check whether the assert can happen or not. The order of test levels follows:
LEVEL
are used when there is a test level that is somewhere between two of the test levels with meaning. It is suggested
that SMOKE, FUNCTION, REGRESSION, and ACCEPTANCE are exclusively used until a need is found for more levels.
Field Summary | |
---|---|
static int |
ACCEPTANCE
An Acceptance level test. |
static int |
FUNCTION
A Function level test. |
protected int |
greaterThanLevel
|
static int |
INVALID_LEVEL
An invalid level. |
protected int |
lessThanLevel
|
protected int |
level
|
static int |
LEVEL1
A test level between a Smoke and Function. |
static int |
LEVEL2
A test level between a Smoke and Function. |
static int |
LEVEL4
A test level between a Function and Regression. |
static int |
LEVEL5
A test level between a Function and Regression. |
static int |
LEVEL7
A test level between a Regression and Acceptance. |
static int |
LEVEL8
A test level between a Regression and Acceptance. |
protected Set |
levels
|
static int |
NO_LEVEL
The default setting of every level |
static int |
REGRESSION
A Regression level test. |
static int |
SMOKE
A Smoke level test. |
Method Summary | |
---|---|
void |
addLevel(int level)
Adds at level at which asserts with levels set to this may be executed to the list of possible levels. |
boolean |
assertPerformable(int assertLevel)
Tests whether an assert should be performed at a certain level. |
void |
clearAll()
Clears any assert levels that may have been set. |
int |
getGreaterThanLevel()
|
static AssertLevel |
getInstance()
|
int |
getLessThanLevel()
|
int |
getLevel()
|
Set |
getLevels()
|
void |
removeLevel(int level)
Removes at level at which asserts with levels set to this may be executed to the list of possible levels. |
void |
setGreaterThanLevel(int greaterThanLevel)
Sets the level at which asserts with set to or greater than the value this is set may be executed. |
void |
setLessThanLevel(int lessThanLevel)
Sets the level at which asserts with levels set to or less than the value this is set may be executed. |
void |
setLevel(int level)
Sets the level at which asserts with levels set to this may be executed. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int SMOKE
public static final int LEVEL1
public static final int LEVEL2
public static final int FUNCTION
public static final int LEVEL4
public static final int LEVEL5
public static final int REGRESSION
public static final int LEVEL7
public static final int LEVEL8
public static final int ACCEPTANCE
public static final int INVALID_LEVEL
public static final int NO_LEVEL
protected int greaterThanLevel
protected int lessThanLevel
protected int level
protected Set levels
Method Detail |
---|
public static AssertLevel getInstance()
public void clearAll()
public boolean assertPerformable(int assertLevel)
assertLevel
- - The level the assert is going to be executed against.
public int getGreaterThanLevel()
public int getLessThanLevel()
public int getLevel()
public Set getLevels()
public void setGreaterThanLevel(int greaterThanLevel)
greaterThanLevel
- - The level at which asserts with set to or greater than the value this is set may be executed.public void setLessThanLevel(int lessThanLevel)
lessThanLevel
- - The level at which asserts with levels set to or less than the value this is set may be executed.public void setLevel(int level)
level
- - The level at which asserts with levels set to this may be executed.public void addLevel(int level)
level
- - The level at which asserts with levels set to this may be executed.public void removeLevel(int level)
level
- - The level at which asserts with levels set to this may be executed.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |