Browse by Tags

All Tags » UnitTesting (RSS)

Using hg bisect to hunt down bugs

The “bisect” command in Mercurial (git has it too) is a great way to quickly find which version of your code introduced a bug.  This post will show you how to use the bisect command along with handling a small “gotcha” I encountered while using it...
Posted by PSteele | 1 comment(s)
Filed under: ,

HOWTO: Change which “.testsettings” file Visual Stuido 2010 uses

I’m blogging this mainly for historical reasons.  I just spent over 30 minutes trying to figure this out.  Well, the first 10 or 15 minutes was getting code coverage enabled in Visual Studio 2010.  There’s plenty of coverage on that topic...
Posted by PSteele | 1 comment(s)

Updates to Nino’s .hgignore files for Visual Studio

As I move more of my repositories from SVN to Mercurial , I’m constantly referring to Nino’s sample .hgignore file he provided for Visual Studio developers.  I always start with his file but add a few more lines and thought I’d share them here. ...

Verbosity Isn’t Always a Bad Thing

There was a message posted to the Rhino.Mocks forums yesterday about verifying a single parameter of a method that accepted 5 parameters.  The code looked like this:   [TestMethod] public void ShouldCallTheAvanceServiceWithTheAValidGuid() {...
Posted by PSteele | 1 comment(s)
Filed under: , ,

Talks Submitted for Ann Arbor Day of .NET 2010

Just submitted my session abstracts for Ann Arbor's Day of .NET 2010 .   Getting up to speed with .NET 3.5 -- Just in time for 4.0! Yes, C# 4.0 is just around the corner.  But if you haven't had the chance to use C# 3.5 extensively, this session...

Unit Tests and Debug.Assert()

I recently found some code that had a couple of issues: There was a try/catch block that did a "catch(Exception e)".  And no, it didn't rethrow the exception.  See item #2. Inside the exception handler, it had the following code: catch...
Posted by PSteele | 4 comment(s)
Filed under: ,

Enabling Windsor Integration in MonoRail

I recently wanted to take on old MonoRail application and update it to use Windsor for dependency injection (DI).  The application stated as a sort of prototype and slowing grew into a decent sized application.  There's a couple of places that...
Posted by PSteele | 1 comment(s)
Filed under: , ,

ASP.NET MVC + MVC Contrib + Unit Testing

One of the key benefits of the MVC (Model View Controller) pattern is a separation of concerns that leads to better testability.  Microsoft recognizes this and will automatically create a separate MS Test project when creating a new ASP.NET MVC solution...
Posted by PSteele | 6 comment(s)

Verifying collections/arrays in MS Unit Testing

If you're using Microsoft's unit testing framework that is built in to VS2008 (and some VS2005 SKU's), you're probably aware of the Assert class.  You use that a lot to make assertions on properties and return values to determine if your unit test...
Posted by PSteele | 4 comment(s)
Filed under: ,
More Posts