mockito
Here are 815 public repositories matching this topic...
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
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
-
Updated
Jun 27, 2020 - Objective-C
-
Updated
Aug 14, 2019 - Kotlin
-
Updated
Jun 28, 2020 - Kotlin
-
Updated
Dec 21, 2017 - Java
Looking at the source I can see we have functions such as deepEqual notNull, objectContaining which seem nice and are well named but aren't documented anywhere. Can you please document these and also document if custom verifications exist.
-
Updated
Jan 17, 2020 - Java
-
Updated
Jul 9, 2020 - Java
-
Updated
May 31, 2020 - Kotlin
-
Updated
Jun 27, 2018 - Java
-
Updated
Jul 9, 2020 - Scala
-
Updated
Feb 23, 2020 - Java
-
Updated
Jul 4, 2020 - Kotlin
-
Updated
Jan 29, 2018 - Kotlin
-
Updated
Oct 26, 2019 - Kotlin
-
Updated
Jul 20, 2017 - Java
-
Updated
Apr 7, 2017 - Kotlin
-
Updated
Oct 28, 2019 - Java
-
Updated
Jan 28, 2019 - Java
-
Updated
Jun 23, 2019 - Java
DROP TABLE IF EXISTS users;
CREATE TABLE users (
user_id BIGINT PRIMARY KEY auto_increment,
username VARCHAR(128) UNIQUE,
password VARCHAR(256),
enabled BOOL,
);
after enabled BOOL,An extra comma
Improve this page
Add a description, image, and links to the mockito topic page so that developers can more easily learn about it.
Add this topic to your repo
To associate your repository with the mockito topic, visit your repo's landing page and select "manage topics."
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