Using Moq to override calls to App.config
The other day I was working on a new implementation in our product to re do logging. I’m taking us from a custom File Writer to using Log4Net wrapped in a Facade. To make this transition a bit smoother, and allow us to roll back to the old style if something breaks, I also implemented a Factory Pattern to provide the correct logger based upon the current App.Config settings. To clarify, we are using Ninject for DI, and usually I would use the DI container to inject the correct implementation....