Posts tagged with "test driven"
Writing JUnit Tests for an application is always a good thing. Writing tests for a Tabris or RAP application for the first time seems more challenging: You might encounter an “java.lang.IllegalStateException: No context available outside of the request processing.” exception while running the tests. So, after a quick google you will find a blog post [...]
Whenever a group of people gathers to discuss the pre-release phase of a piece of software, the word test appears on the agenda. While the general idea of testing seems more or less clear to everybody, only rarely do two people have the same implicit understanding of the details. To name a few, try to [...]
JUnit and Eclipse are a great combination, but one thing that I missed every time I worked with JUnit4 was the code templates. Currently, Eclipse ships with pre-defined templates for JUnit3 but not for JUnit4. So, I wrote three basic JUnit4 templates that can be imported from the “Templates” Preference Page. Take a look at [...]
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 [...]
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 [...]
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 [...]