Mocking a class rather than an interface might present some interesting obstacles. Perhaps you have ran into the dreaded: Unexpected method call toString(): toString(): expected: 0, actual: 1 You think nothing of it and happily add an expectation for toString. Then you get: Unexpected method call toString(): toString(): expected: 1, actual: 2 The reason is [...]
Entries from May 2007 ↓
Mocking Classes
May 9th, 2007 by Ulrik Sandberg — Java, Testing
Tags: mock, programming
Sweden Spring UG Birth of a new UG
May 1st, 2007 by Ulrik Sandberg — Events
Once in a while we see a new user group being born. One of those is close to many Java programmers’ hearts – the Sweden Spring User Group. We turned to Ulrik Sandberg, one of the founders of the group. Tell us how you got started with the Sweden Spring User Group. The Sweden Spring [...]
Tags: spring, user group
News On Concurrency
May 1st, 2007 by Jacob Mattsson — Java
Prior to Java 5, most people associated concurrency in Java with the Thread and Runnable concepts. That has all changed now! We now have a compelling high-level API at our hands, including a lot of new concurrent data structures in the Collections Framework and a brand new task Executor framework. In this article, you’ll get [...]
Tags: concurrency, programming
JavaOne 2007 – What’s left?
May 1st, 2007 by Peter Neubauer — Events, Java
Having been at this years JavaOne, the event was impressive as always, but left me with a feeling of being mostly a marketing display for Sun and its partners, not for Java as a whole. I even had the feeling that within Java standard and enterprise computing, things are moving at the pace of evolution, [...]
Mocking Static Methods
May 1st, 2007 by Jan Kronquist — Java
Mock objects is a very useful technique for unit testing as it allows you to focus your testing efforts on the class being tested instead of on its collaborators. Unfortunately, not everything is an object and therefore you cannot always use mock objects. This article will show how mocking can be generalized to include more [...]
Tags: automated testing, jayview, programming
OSGi – not just a four letter word
May 1st, 2007 by Stuart Mcculloch — Java
You may have heard the word OSGi recently: perhaps on a technical blog, or in a passing conversation between developers. In the very near future words like OSGi, bundles, OSGi services and the service registry will be essential concepts that every web application developer and architect should know and understand. This article introduces OSGi, and [...]
Tags: frameworks, jayview, osgi
