Posts tagged with "Mockito"
A Software Craftsman’s Toolbox: Lightweight Java libraries that make life easier.
As a software developer you will use plenty of frameworks during your career. There are the big beasts like Spring, ActiveMQ or OSGi that you have to master in order to build the foundations of your applications. And then, there are the small frameworks. Let’s call them lightweight tools. Like a carpenter, the lightweight tools [...]
Software Craftsmanship at EclipseCon Europe 2012
In some of my previous posts I’ve talked about well-crafted code. I’m really convinced that software development is a craft – but what does that mean? The “Manifesto for Software Craftsmanship” contains the following 4 points: Considering these points I took a look at the EclipseCon Europe 2012 session schedule and picked out a view [...]
Advanced Android testing with RoboGuice and Robolectric
I’ve been using the Android framework RoboGuiceĀ 2.0 a lot lately. RoboGuice is an extension for the Google Guice dependency injection framework that adds several Android specific mechanisms to easily inject views, services or custom objects. Coming from an OSGi background, it is interesting to see how much deeper Guice is able to be interwoven into [...]
Serious unit testing on Android
It is not a secret that we are big fans of Mockito at EclipseSource. Our Java mocking framework of choice has helped us in many projects to stay on the test driven development path. Luckily we are also able to apply these same principles when developing Java code on Android. Although Mockito is great for [...]
Effective Mockito Part 5
With this effective Mockito Post I want to share a really simple pattern with you. We call this pattern “check answers” and we use it whenever we work with Mockito Answers. The code resulting from creating Mockito Answers generally looks ugly. But, as good programmers we care about test quality, right? Let’s see how we [...]
Effective Mockito Part 4
This Effective Mockito Post will be IDE specific again but related to the last post on Mockito’s spies. If you’ve read Part 3 you should now be familiar how to use them to “pseudo mock” statics. When writing code it often comes to a point where we want to debug using single step debugging. When [...]
Effective Mockito Part 3
In the previous Effective Mockito post we saw how to use the @Mock Annotation to get a clean test. In this post I want to show you how to use Mockito’s spy mechanism to eliminate testing troubles with third party libraries. Testing is one of the most important things in software development. I assume you [...]
Effective Mockito Part 2
As promised in the first part of the “Effective Mockito” blog series, I will concentrate on Mockito specifics in the followup posts. So, the main topic for Part 2 is Mockito’s @Mock Annotation. When I write tests I try to follow an explicit pattern, called the build-operate-check pattern. This was described by Uncle Bob in [...]
Effective Mockito Part 1
Last week I talked to a fellow developer, Frank Appel, about Mockito. We’ve been using this mocking library for over a year. We both agreed that of all the innovations we’ve tried in the last year or so, Mockito has boosted our coding productivity the most. With this blog series we want to share our [...]




