That is particularly useful when working on POJO trees as, for example, generated when parsing JSON/YAML documents.
(Inspired by ListAssert.singleElement().)
That is assuming, of course, that we generate the assertions for SomeClass.
The return type would be OtherClassAssert if we generate the assertions for that class as well, of ObjectAssert<OtherClass> otherwise.
We would like to write something like:
That is particularly useful when working on POJO trees as, for example, generated when parsing JSON/YAML documents. (Inspired by
ListAssert.singleElement()
.)That is assuming, of course, that we generate the assertions for
SomeClass
. The return type would beOtherClassAssert
if we generate the assertions for that class as well, ofObjectAssert<OtherClass>
otherwise.