Month: November 2008
- 
			
			Test Sclerosis – The Trouble with Unit TestsYour typical system, written in a nice object-oriented way performs its task using a number of collaborating objects that send methods to each other. Ignoring some of the complexities like objects actually creating new objects in response to message, we can draw a diagram like the one below: Each arrow represents a method call. Now… 
- 
			
			Intellij 8 is here!After using Intellij 8 for one hour, I have to say JetBrains raised the bar. What I liked: Extract Method Object Refactoring: Lets you extract an object, where you can’t extract a method, because of multiple return values. I vaguely remember having spent a lot of time doing this manually to castor’s evil 1200 line… 
- 
			
			JUnit Shortcomings IA few days back I wrote a test that used the filesystem. In order to keep my test independant from any particular file layout I usually do something like this: public class SomeFileSystemTest { @Test public void performTest() throws IOException { doStuff(tempDir); … } private File tempDir; @After public void deleteTempDir() throws IOException { FileUtils.deleteDirectory(tempDir);…