Tag Archives: unit tests

When optionals are… required

Assume you have developed a service, with methods requiring arguments, properly extracted into a interface. Then you (or your customers) would write nice clients for your service. Of course, such clients will probably be unit tested in isolation, such as … Continue reading

Posted in C# | Tagged , , , | Leave a comment

Why interfaces?

We should almost always extract interfaces from your service classes because: We should use dependency injection to load and compose implementations: to avoid the need of manually constructing chains of dependent objects and/or to be able to release implementation changes … Continue reading

Posted in Development | Tagged , , , | Leave a comment

Can we skip unit tests for infrastructural code?

Almost always we end up with infrastructural code in our projects. That is extension code on top of the framework that we’re using internally, added so that the main functional code of the app is cleaner, clearer, shorter, and also … Continue reading

Posted in Architecture | Tagged , | Leave a comment

Too much dependency injection?

I’m sure you use dependency injection in many of your projects. And usually, it’s a very good thing to do. However, I found out that many people use it somehow blindly: every time they need to extract a new class just … Continue reading

Posted in Architecture | Tagged , , | 1 Comment

About TDD

In my opinion test driven design (TDD) is trading too much agility (i.e. too much time) for quality, at least on projects that have ever changing requirements (like there are most of them, at least in my experience). While agility and speed are very, very important nowadays. If you … Continue reading

Posted in Architecture, Miscellaneous | Tagged , , , | Leave a comment