Working effectively with legacy code - Michael C. Feathers
This is an article about the book Working Effectively with Legacy Code by Michael C. Feathers and my thoughts about it.
This is an article about the book Working Effectively with Legacy Code by Michael C. Feathers and my thoughts about it.
In my company we have a some tests that take ages. To discover the most time consuming unit tests I decided to write a small class that prints the top 10 time consuming test methods to maven output. This is more or less the exercise in chapter 8.9.3 of book Practical Unit Testing with Junit and Mockito.
jekyll seems to be nice tool to create your own pages because it supports markdown which is developers friend.
Testing functionality that throws exceptions is quite easy using the expected annotation of JUnit. But there are also other possibilities to test exceptions:
For some reasons it is not possible to assert several aspects of one object within one assert with JUnit or even with Hamcrest. I know that a test case should only test one thing, which also can interpreted as one assert, but sometimes it is better to test more aspects of an object instead of duplicate code. e.g. testing a user with name and gender variables, it is not possible to test them both so if one fails the other is still executed. In this article i will show some ways to solve this problem in a more or less elegant way. If there are some other (better) solution, please let me know! All code sample are available in github.
A journey of a thousand miles begins with a single step.
Lao-tzu, The Way of Lao-tzu
After reading the book Software Craftmanship of Sandro Mancuso, i will share my (future) experiences in software development. I’m a java developer for nearly seven and a half years but there is still a long road to go. With this blog you will hopefully ;-) see my progress.