Closed GianfrancoMS closed 5 years ago
The exception tells you the problem. You are combining raw values with matchers (any()
creates a Matcher
):
currentWeatherRepository.getCurrentWeather(<matcher>, <matcher>, <raw value>)
Mockito enforces that you should only use either matchers xor raw values.
Btw. Not đź’Ż percent sure of best practice, but I usually avoid using matchers in the methods I'm testing.
Seems resolved, thanks @bohsen!
This is the test I'm trying to run
But it throws the following exception:
And then, JUnit's Assertion Error:
If I replace any() with other value like Double.MAX_VALUE, the test alway pass.