Did you ever need to just have an instance of a class you cannot instantiate because the default constructor is not available? Do you want to create a test instance just to be used in unit tests? Don’t want to break up the design of your code just for testing? This post might help you: [...]
Archive for February, 2011
Creating (default) test instances of a class, without exposing default constructor.
Posted: February 26, 2011 in Craftmanship, Design Patterns, programming, Refactoring, Unit TestingTags: development, java, refactoring
0
An example of refactoring
Posted: February 20, 2011 in Compose Method, Craftmanship, Design Patterns, Dune II - The Maker, Game Development, programming, Quality, RefactoringTags: c++, clean code, compose method, craftmanship, d2tm, design patterns, programming, refactoring, software quality
As I have promised in my previous post, I would post an example of small refactorings in order to greatly improve the readability and understandability of code. I own a little project called Dune II – The Maker, and I started writing it a little over 10 years ago. In those years I have learned [...]