Why Dependency Injection?

Hi Friends,

I have been recently asked by one of my book readers on twitter, why you applied Dependency Injection (DI) in controller? Below is the tweet for the same. Below is the glimpse of the same.

Read more

Extending Anything!!!


In today’s section, we’ll see how to extend even inaccessible class and write test against that. But, before that let us assume that, you have following class

Read more

Writing Unit Tests against actual legacy data

Hi Friends, In today’s discussion, we will talk about writing Unit Tests, but it is not about how to get started with Unit Tests. Rather it is about, if you have a scenario where in you need to construct data set which is very primitive and it needs lot of work to construct even mock … Read more

Fluent Assertions

Hi Friends, Today, i will talk about one of the patterns which i usually use while writing unit tests. Apart from MOQ library, i also use Fluent Assertions(http://www.fluentassertions.com/). You can search for the same in nuget package manager and install it in the test project. Out of the box, fluent assertions give tons of extensions … Read more

Thanks, Rahul Happy Coding