Chris Thompson
Chris Thompson

Reputation: 16841

New to TDD: Are there sample applications with tests to show how to do TDD?

I really want to get into TDD development but I have no point of reference where to start.

I think that looking at code and seeing how they write tests and make classes testable that it'll be easier for me to digest and start using myself.

Is anyone aware of any sample or small open source C# applications that include unit tests?

Upvotes: 6

Views: 1163

Answers (5)

John Deters
John Deters

Reputation: 4391

Microsoft Press has the book, "Test Driven Development in Microsoft .NET", by Newkirk and Vorontsov, two members of the NUnit development team. It's a few years old now, but it'll show you a more complete view of the process.

Upvotes: 0

Jimmy Chandra
Jimmy Chandra

Reputation: 6580

I personally believe it's better to see web / screencasts for this than reading sample source code.

I'd go watch Rob Connery's MVC storefront series here. He covers most of what you are looking for.

Also, look at DnRTV episodes w/ JP Boodhoo. Find it here.

Upvotes: 0

sigint
sigint

Reputation: 1882

If you're looking for a real-life open source application where the unit tests are critical to evaluating correctness, I'd suggest BouncyCastle C#, the source is available here. It's an open source crypto API for .NET, has loads of tests and obviously the tests help establish whether things are working or not. Great if you like jumping into the thick of things.

Upvotes: 0

James Hugard
James Hugard

Reputation: 3236

I highly recommend "Test Driven Development: By Example (Addison-Wesley Signature Series)" by Kent Beck.

Far, far better than any other resources I've found on the net or elsewhere. Well worth the $40 - $50.

Upvotes: 3

daveb
daveb

Reputation: 76171

For shakalpesh,

I would recommend the ObjectMentor katas.

  • One is to create a bowling game scoring algorithm
  • Another is to convert infix expressions to postfix. (The shunting yard algorithm)

Bolwing Game

Shunting Yard Algorithm

Upvotes: 6

Related Questions