mockito - Is there an equivalent to anyInt(), anyString(), etc. for checking a parameter is of a particular (non-generic) type? -
if mocked method passed generic type parameter, easy generate same response regardless of value using methods such anyint(), anychar(), anystring(), etc.
is possible parameter must particular type of object?
(for example, anycar(), anyvehicle(), etc.) 
the matcher isa(class<t> clazz) provides functionality. 
for example -
isa(car.class), isa(vehicle.class)
Comments
Post a Comment