Mocking Your File System

Introduction In this post, I’m going to talk about basic dependency injection and mocking a method that is used to access hardware.  The method I’ll be mocking is the System.IO.Directory.Exists(). Mocking Methods One of the biggest headaches with unit testing is that you have to make sure you mock any objects that your method under … Read moreMocking Your File System

.Net MVC Project with AutoFac, SQL and Redis Cache

Summary In this blog post I’m going to demonstrate a simple .Net MVC project that uses MS SQL server to access data.  Then I’m going to show how to use Redis caching to cache your results to reduce the amount of traffic hitting your database.  Finally, I’m going to show how to use the AutoFac … Read more.Net MVC Project with AutoFac, SQL and Redis Cache

Dot Net Core Using the IOC Container

I’ve talked about Inversion Of Control in previous posts, but I’m going to go over it again.  If you’re new to IOC containers, breaking dependencies and unit testing, then this is the blog post you’ll want to read.  So let’s get started… Basic Concept of Unit Testing Developing and maintaining software is one of the … Read moreDot Net Core Using the IOC Container