|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface ExternalBooleanTest
Interface to enable interaction between a BooleanProxyTest
and another test external to the framework. Only four methods need to be
implemented like in the example below:
public class MyExternalTest implements ExternalBooleanTest {
// Constructor should not require any parameters
public MyExternalTest() throws TestInitializationException {
public Tag.Level getNegativeResponseLevel() {
// Negative responses should be tagged as warning
return Tag.Level.WARN;
}
public Tag.Level getPositiveResponseLevel() {
// Positive responses should be tagged as information
return Tag.Level.INFO;
}
public DataType[] getParametersDataTypes() {
// Specify number of parameters with expected data types
return new DataType[] { DataType.STRING, DataType.DOUBLE };
}
public CommentedBooleanResponse check( List parameters ) throws TestProcessingException {
// Get parameters in expected order
String param1 = (String)parameters.get( 0 );
Double param2 = (Double)parameters.get( 1 );
// Perform some test
if ( some_condition ) {
return new CommentedBooleanResponse( true, some_comment );
}
else {
return new CommentedBooleanResponse( false, other_comment );
}
}
}
| Method Summary | |
|---|---|
CommentedBooleanResponse |
check(java.util.List parameters)
Returns a commented boolean response given a list of parameter values. |
Tag.Level |
getNegativeResponseLevel()
Returns the tag level (error, warning, etc) to be considered on negative responses. |
DataType[] |
getParametersDataTypes()
Returns an array where each element indicates the data type of the corresponding parameter. |
Tag.Level |
getPositiveResponseLevel()
Returns the tag level (error, warning, etc) to be considered on positive responses. |
| Method Detail |
|---|
Tag.Level getNegativeResponseLevel()
Returns the tag level (error, warning, etc) to be considered on negative responses.
Tag.Level getPositiveResponseLevel()
Returns the tag level (error, warning, etc) to be considered on positive responses.
DataType[] getParametersDataTypes()
Returns an array where each element indicates the data type of the corresponding parameter.
CommentedBooleanResponse check(java.util.List parameters)
throws TestProcessingException
Returns a commented boolean response given a list of parameter values. For now, it is assumed that people should implicitly know which parameters need to be passed to this method according to each individual implementation.
parameters - List with parameter values.
TestProcessingException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||