Earlier this week I needed a way to insert test data into my database that was being regenerated at the start of each test fixture. For most scripts, you can use a simple command with CommandText to get the job done. But this doesn’t work with certain Sql statements, such as GO. Luckily, I stumbled [...]
Occasionally my solutions include multiple test projects. And I’d like NAnt to automatically save pick up the new test projects as their added without having to modify the build script. Turns out that there are a couple of ways to do this. Method 1 <target name="run.tests" description="Runs tests for all test projects in solution." depends="compile"> [...]
Today I decided to relearn some of the BDD concepts I picked up at the end of last year and ran into a scenario where I needed to test that a specific type of exception was being thrown by a method. The simple way to do this is to decorate your test method with an [...]
I ran into a case today where one of our unit tests was failing when we ran it, but would pass when we debugged it. We’re using MSTest and had recently branched the project in TFS, and I was working on changes in the new branch. We were getting a “method not found” error when [...]