Link Details

Link 982019 thumbnail
User 966553 avatar

By gregorin
via toomuchcoding.blogspot.com
Submitted: Jun 12 2013 / 07:14

In the code I have quite recently came across a really bad piece of code that based on class casting in terms of performing some actions on objects. Of course the code needed to be refactored but sometimes you can't do it / or don't want to do it (and it should be understandable) if first you don't have unit tests of that functionality. In the following post I will show how to test such code, how to refactor it and in fact what I think about such code ;)
  • 2
  • 0
  • 155
  • 43

Add your comment


Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.

Voters For This Link (2)



Voters Against This Link (0)



    Play Framework
    Written by: Ryan Knight
    Featured Refcardz: Top Refcardz:
    1. Akka
    2. Design Patterns
    3. OO JS
    4. Cont. Delivery
    5. HTML5 Mobile
    1. Akka
    2. JUnit/EasyMock
    3. Java Performance
    4. REST
    5. Java