I am trying to apply JUnit in my project but the problem is it has some very complex value objects.Some of the value objects represent report data also. I tried to use EasyMock and jMock but both of them are restricted to particular patterns (interfaces). I am restricted to change the design. Please suggest me how can I take full advantage of JUnit and mock object. Thanks in advance.
Another alternative might be to introduce Sensing Variables in your production classes.
I highly recommend the book "Working Effectively With Legacy Code", which talks explicitly about how to write tests for hard to test code.
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Why am I so drawn to cherry pie? I can't seem to stop. Save me tiny ad!
ScroogeXHTML - small and flexible RTF to HTML converter library