Hi Clément,
I made a mistake in my previous post:
verifyEquals(String.valueOf(_value == _countOfElement), "true");
should be
verifyEquals(String.valueOf(_value.intValue() ==
_countOfElement.intValue()), "true");
I have added your component to the library, i made some changes in to
what kind of comparisons it can do so that it is a bit clearer in how
it can be used and it provides some more check capabilities.
I also created an Assert version of it.
Currently the checks are performed like this:
if (_action.equalsIgnoreCase("<")) {
verifyEquals(String.valueOf(_countOfElement.intValue() <
_value.intValue()), "true");
} else if (_action.equalsIgnoreCase("==")) {
verifyEquals(String.valueOf(_countOfElement.intValue() ==
_value.intValue()), "true");
} else if (_action.equalsIgnoreCase(">")) {
verifyEquals(String.valueOf(_countOfElement.intValue() >
_value.intValue()), "true");
} else if (_action.equalsIgnoreCase("<=")) {
verifyEquals(String.valueOf(_countOfElement.intValue() <=
_value.intValue()), "true");
} else if (_action.equalsIgnoreCase(">=")) {
verifyEquals(String.valueOf(_countOfElement.intValue() >=
_value.intValue()), "true");
} else if (_action.equalsIgnoreCase("!=")) {
verifyEquals(String.valueOf(_countOfElement.intValue() !=
_value.intValue()), "true");
}
I introduced a new property action which can take on of the following
values <, <=, ==, >=, > and !=.
This also makes it a bit clearer then using 0, 1, 2.