Test driven development

FacebookTwitter

How To Configure ASP.NET Unit Tests in Visual Studio 2010 - SkoNet

(Microsoft .NET,Microsoft ASP.NET,Microsoft Visual Studio) by Jason Skowronek on 02/03/2011 This article demonstrates how to setup a basic unit test project to take care of code coverage of a standard ASP.NET website. This article assumes you have created an ASP.NET Web Application project (not ASP.NET Website). Setup a Unit Test Project Open your solution in Visual Studio 2010 Click Test | New Test Select Basic Unit Test (or any of the others) Name your test class Add to or create a new test project (preferably ProjectName.Tests) http://www.skonet.com/Articles_Archive/How_To_Configure_ASP_NET_Unit_Tests_in_Visual_Studio_2010.aspx

moq - The simplest mocking library for .NET and Silverlight

http://code.google.com/p/moq/ Update : Development of this project has moved to GitHub .
The term 'Mock Objects' has become a popular one to describe special case objects that mimic real objects for testing. Most language environments now have frameworks that make it easy to create mock objects.

Mocks Aren't Stubs

http://martinfowler.com/articles/mocksArentStubs.html
http://blogs.clariusconsulting.net/kzu/state-testing-vs-interaction-testing/ Highly recommended reading: Fowler’s article Mocks aren’t Stubs . It’s a very clear characterization of the types of so-called Test Doubles (mocks, fakes, stubs, etc.) you can use to aid your unit testing needs, but also of the kinds of TDD you can do: classic (or state) TDD and mockist (or interaction) TDD. I got the feeling that the article seemed a bit biased towards mockist TDD, only to see in the “So should I be a classicist or a mockist?” section that Fowler himself is a classic TDDer ). Maybe it’s because mockist TDD is a newer approach to TDD and therefore required a more extensive explanation.

State Testing vs Interaction Testing

Recently I started writing a simple application that would help me organize my music files by automatically renaming them using their tags and moving them to their designated folders. As expected the program will rely on the file system classes that the .Net Framework provides. Naturally, I wanted to cover the I/O logic with tests so that I am confident that when the software is used it will not do damage to my files and will behave according to my requirements.

Mocking The File System to Improve Testability « Milan Nankov’s Blog

http://blog.nankov.com/2009/12/10/mocking-the-file-system-to-improve-testability/