Skip to content
#

mockito

Here are 815 public repositories matching this topic...

maald
maald commented Apr 24, 2020

As a new end user, I cannot find a single user guide or decent documentation. The javadoc reads like it's written as a quick review for someone who already knows the ins/outs of Mockito and just need some sample code. I don't even know what or how Mockito works and the first couple of lines are talking about "mockito inline".

Most open source projects have really great user guides and document

george-hawkins
george-hawkins commented Jul 17, 2018

Verification of method invocations can fail in a non-obvious way if the method takes default arguments, e.g.:

val foo = mock<Foo>()
foo.beta(4)
verify(foo).beta()

Here we're trying to verify that beta() was called but it mysteriously fails, complaining about a different method altogether:

Wanted but not invoked:
foo.alpha();
-> at ...

On investigation, i

AnthonyMillerSF
AnthonyMillerSF commented Apr 16, 2020

I have a library that I generate all of my mocks into that is imported in my unit tests. When mocking a protocol, the generated mock object doesn't have an initializer declared. This means is uses the default initializer, which would be fine, except the default init() method is internal. I can get around this by importing my mock library @testable, but I'd suggest that protocol mocks for publi

Improve this page

Add a description, image, and links to the mockito topic page so that developers can more easily learn about it.

Curate this topic

Add this topic to your repo

To associate your repository with the mockito topic, visit your repo's landing page and select "manage topics."

Learn more

You can’t perform that action at this time.