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

Popular posts from this blog

How has firefox/gecko HTML+CSS rendering changed in version 38? -

android - CollapsingToolbarLayout: position the ExpandedText programmatically -

Listeners to visualise results of load test in JMeter -