Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
-5 votes
1 answer
110 views

Should code be refactored to be more unit testable or should a framework like PowerMock be used?

Assume there's some code that's already in production that needs some unit testing. Generally speaking, would you want to refactor this code that's already in production by adding things like adding ...
JobHunter69's user avatar
17 votes
2 answers
37k views

Unit testing utility classes

All of us have some utility classes, which contain only static methods, for usage from different sources. Now, there can be two approaches which can be taken towards testing this piece of code. ...
alpha_ulrich's user avatar
70 votes
7 answers
28k views

How to deal with static utility classes when designing for testability

We are trying to design our system to be testable and in most parts developed using TDD. Currently we are trying to solve the following problem: In various places it is necessary for us to use static ...
Benedikt's user avatar
  • 891