About Me

Training

Nothin But .Net Developer Bootcamp

Navigation

Search

Categories

On this page

Slight addition to jpboodhoo.bdd

Archive

Blogroll

 Agile Developer Venkat's Blog
 Ayende @ Blog
 B#
 Barry Gervin's Software Architecture Perspectives
 Boy Meets World
 Brad Abrams
 Canadian Developers
 Christopher Steen
 Claritude Software News
 Clemens Vasters: Enterprise Development and Alien Abductions
 Coding Horror
 Coding in an Igloo
 Dare Obasanjo aka Carnage4Life
 Darrell Norton's Blog [MVP]
 David Hayden [MVP C#]
 Don Box's Spoutlet
 Eric Gunnerson's C# Compendium
 EZWeb guy: Jeffrey Palermo [C# MVP]
 Fear and Loathing
 Generalities & Details: Adventures in the High-tech Underbelly
 Greg Young [MVP]
 Greg's Cool [Insert Clever Name] of the Day
 IanG on Tap
 Ingo Rammer's Weblog
 ISerializable - Roy Osherove's Blog
 James Kovacs' Weblog
 Jason Haley
 Jean-Luc David
 Jeremy D. Miller -- The Shade Tree Developer
 JetBrains .NET Tools Blog
 Jimmy Nilsson's weblog
 John Bristowe's Weblog
 John Papa [MVP C#]
 Jon Skeet's Coding Blog
 JonGalloway.ToString()
 Jump the Fence or Walk Around
 Lambda the Ultimate - Programming Languages Weblog
 Larkware News
 Lutz Roeder
 Marquee de Sells: Chris's insight outlet
 Martin Fowler's Bliki
 Mike Nichols - SonOfNun Technology
 MSDN Magazine - .NET Matters
 MSDN Magazine - All Articles
 OdeToCode Blogs
 Onion Blog
 Planet TW
 Raymond Lewallen [MVP]
 Rockford Lhotka
 RodMan's Corner
 Roger Johansson's blog
 Sahil Malik - blah.winsmarts.com
 Sam Gentile's Blog
 Scott Bellware [MVP]
 Scott Hanselman's Computer Zen
 ScottGu's Blog
 secretGeek
 Service Station, by Aaron Skonnard
 Signum sine tinnitu--by Guy Kawasaki
 Stephen Toub
 Steve Eichert's Blog
 Steven Rockarts
 The Blog Ride
 The Coding Hillbilly
 The Daily WTF
 TheServerSide.net: News
 Tim Gifford
 Vance Morrison's Weblog
 you've been HAACKED

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

RSS 2.0 | Atom 1.0 | CDF

Send mail to the author(s) E-mail

Total Posts: 519
This Year: 28
This Month: 0
This Week: 0
Comments: 1589

 Wednesday, February 04, 2009
Wednesday, February 04, 2009 4:00:00 PM (Mountain Standard Time, UTC-07:00) ( C Sharp )

If you recall from the last post on this topic one of the ways you can record an observation is by simply doing this:

            [Observation]

            public void should_dispose_the_appropriate_items()

            {

                connection.was_told_to(x => x.Dispose());

            }

In addition to be able to define observations using traditional attributes. You can now also define observations by using blocks (like the rest of the code uses). So the following observation is identical to the one above:

            it should_dispose_the_appropriate_items = () =>

                connection.was_told_to(x => x.Dispose());

Because all of this is backed by MBUnit. You can start integrating this into your existing MbUnit test suites with no change required. MBUnit GUI, and Console pick them up with no problem. TestDriven.Net can even run them. You can mix and match traditional attribute based observations and block style observations in the same test:

it should_leverage_db_infrastructure_to_return_a_set_of_rows_from_the_db = () =>

    result.should_not_be_null();

 

[Observation]

public void should_dispose_the_appropriate_items()

{

    connection.was_told_to(x => x.Dispose());

}

The only issue with TD.Net right now, is that you can’t pick a single “it” block to run in a fixture. If you put the cursor on an “it” block and tell TD.Net to run test, it will run all of the “it” blocks in that fixture. If you are using a traditional attribute based Observation block this is not a problem.

If people are interested in how I rolled out this feature, please respond with comments and I will get another post out!!

Develop With Passion!!