This project is read-only.

Unit testing of the BlogSettings.cs file

Topics: ASP.NET 2.0
Jun 20, 2010 at 4:25 PM

Hi there,

I have started to work through the code of the engine to familiarise myself with the project, and I noticed that a singleton pattern was used to load all the website settings in the BlogSettings.cs class.  Is there a reason for this?  I have been reading up on this pattern and I have read quite a lot of negatives regarding this pattern.  How did you guy go around unit testing this pattern?  I also read that it is difficult to unit test it because it break all kinds of rules as to what constitutes a valid unit test, and a singleton pattern is not one of them.  Has any one got unit tests that I can check out that was used in this project for the BlogSettings.cs class?  I am new to unit tests and would like to have a look please :)