In my previous post “Why choose DI Interception over Aspect Oriented
Programming?”
[https://www.kenneth-truyers.net/2013/05/16/why-choose-di-interception-over-aspect-oriented-programming/]
I explained my preference for DI interception over AOP. I received a lot of
comments on this (especially on reddit) which pointed out some errors....
Dividing an application in N layers is considered a standard and a best
practice. It is often thought that this automatically creates a decoupled
application. However, just creating layers doesn’t make your code loosely
coupled.
A typical N-layer application
Let’s take a simple...
In my previous post I explained how you could use “Extract Interface” and “
Subclass and override” as effective techniques for breaking dependencies and get
existing code under test. In some situations there are other methods either more
appropriate or easier to implement.
Simplify Parameters
When...
When you first start writing unit tests, you probably already have quite a large
working codebase. Now, how can you start writing tests for this code?
Usually this code isn’t written with testing in mind and it’s probably very hard
to test. Your...
In order for our unit tests to become effective we need to lay out some ground
rules. What is a good unit test and what can we do to make sure we create tests
that actually help us in our development efforts?
Because it’s...