Is there a Java library which would allow me to do comparison operations such as
try {
verify(a).isEqualTo(b);
verify(a).isGreaterThan(b);
verify(a).contains(b);
catch (AssetionError e) {
..
}
I was thinking of guava, but couldn’t find anything, maybe I wasn’t looking hard enough 😉
Sounds like Hamcrest may be of interest. e.g.
It’s normally used for unit testing, but it’s simply providing a DSL and its use isn’t restricted to the testing domain.