February 05, 2013

How to make a basic test framework in C#

Unit testing can be an excellent approach to building applications. In C#, there is a fairly standard convention that you often see. You'll often see a test structure like this:

          public class UnitTest1
            public void Setup()
            public void TestMethod1()
Continue reading
  January 14, 2013

WPF Binding Errors

I find the binding aspect of WPF to be very powerful. There's one part that I found challenging. If the binding wasn't just right, the problem wouldn't be obvious. If I make a typo when binding to a property, I like it to be painfully obvious. So, the project now displays a message box if there was…

Continue reading
  January 11, 2013


I saw an interesting approach to view rendering. Often in web projects, the template or views will grow to include many conditionals. You will start to see conditions littered about. Some get to contain logic like this:

<% If (someObject.Count() > 0) { %>
          <% } %>


Continue reading
  July 07, 2012

Using NCrunch to find bottlenecks visually

All examples are from NCrunch Version 1.40b.

NCrunch is a continuous test runner for C#. I enjoy using it to test my code with a less jarring mental switch. It displays the status of test runs in visual studio as a color coded circle. In addition, it shows the status next to each line that was run.

Continue reading