This code is OBSOLETE. You should use ayeseeem/icm-bits-java instead, which is the same code, but with extra features and in different Java packages. This repository is liable to be deleted.
The name jtest
unfortunately - and unintentionally - made it look as though this was related to
Parasoft's
Jtest.
Java test utilities from ayeseeem.org.
Allows clearer, more expressive if
statements testing whether an item is in a
group of items. Which of these do you prefer? Which expresses more clearly
and directly what is being asked?:
if (the(month).isOneOf(SEPTEMBER, OCTOBER, NOVEMBER, DECEMBER) {
// it's name derives from its Latin ordinal in the Roman calendar
}
if (Arrays.asList(SEPTEMBER, OCTOBER, NOVEMBER, DECEMBER).contains(month)) {
// ...
}
if (the(month).isIn(myFavouriteMonths) {
// ...
}
if (myFavouriteMonths.contains(month)) {
// ...
}
Works for a Collection
, an array of objects, or individual items listed
directly (using varargs).
See
ContainedItem.java
and
ContainedItemExamplesTest.java
for more details.
Marks unit tests (whole test classes, or individual test methods) as characterization tests. That is, tests that characterize (capture, or describe, or document) the behaviour of the code, but without necessarily specifying the behaviour. For example,
@Characterization
@Test
public void testDefaultResponseIsNull() {
// ...
}
See
Characterization.java
for more details.