Tags » Mockito

Modern TDD-oriented Java 8 JUnit test template for Idea (with Mockito and AssertJ)

Tune up your JUnit test class template for Idea with the BDD-like syntax, Java 8 and the Mockito-AssertJ duo.

Topics covered in this article may seem trivial.

1,015 more words
Tricks & Tips

Mockito Tutorial

Mockito is a testing framework and widely used now. Lets see how to use this in this tutorial.

I am going to use Maven + Java 8 + Mockito 2.0.2-beta version for this example. 585 more words

Java

Mockito annotations

This is part of a series on unit testing with Mockito and mock objects.

Intro
Mock objects are objects used in the context of unit tests that mock behavior of real objects. 508 more words

Java

Mockito verify

This is part of a series on unit testing with Mockito and mock objects.

Intro
Mock objects are objects used in the context of unit tests that mock behavior of real objects. 603 more words

Java

Mockito When/Then

Mock objects are objects used in the context of unit tests that mock behavior of real objects. A common use case for mock objects is for when you need to test behavior in a service class that depends on database methods in a DAO class. 428 more words

Java

JAVA Unit Test: Why they can "save" our life?

In the last weeks I was working on a JAVA legacy system that needs to add some new features. The contract with the client included a clause that said “the new release should raise the Test Coverage until 70% of the code”. 872 more words

JAVA

Mockito: the world order

How about verifying the order of the mocks? Interested? I hope you are!

Let’s say that we are about to implement following user story.

User story: 596 more words

JAVA