Test Review #3 – Unity

My blog has moved. You can view this post at the following address: http://www.osherove.com/blog/2009/3/22/test-review-3-unity.html
Published Monday, March 23, 2009 1:58 AM by RoyOsherove

Comments

Monday, March 23, 2009 5:31 AM by Duncan Butler

# re: Test Review #3 – Unity

Thanks for the screencast and hard work!

very informative, I for one have been guilty of many of these errors, and hopefully I have been made aware of them now.

Thanks again for a great screencast

Monday, March 23, 2009 7:10 AM by Koistya `Navin

# re: Test Review #3 – Unity

Thanks Roy. Great tips.

Monday, March 23, 2009 1:05 PM by DotNetShoutout

# Test Review #3 – Unity - ISerializable - Roy Osherove's Blog

Thank you for submitting this cool story - Trackback from DotNetShoutout

Tuesday, March 24, 2009 3:10 AM by Jaco

# re: Test Review #3 – Unity

Thanks for the screencast.  Very cool.  Just a thought on what you call "magic string".  Instead of specifying the simplest value (you used "a" everywhere), I use something like "AnythingWillWorkHere".  Similarly, when a value is not used (in a mock or stub, for example) I will use "Ignored".  Just a thought.

Tuesday, March 24, 2009 9:41 AM by Emanuele DelBono

# re: Test Review #3 – Unity

Thanks Roy. These videos are very interesting and full of helpful tips!

It would be great to see a review of an application with really _good_ tests.

Tuesday, March 24, 2009 1:57 PM by csharptest

# re: Test Review #3 – Unity

Dig the comments on the use of Ignore, though I would have been a little more brutal.  I personally wish it had never been introduced.  Either fix the broken implementation if the test is correct, or delete the broken test.  If your actually going the TDD route, then the test should continue to fail until the development of the feature/component is complete.

As to the unneeded asserts of not null, I still can't find the issue here.  Roy clearly believes that a single assert per test is THE way to go.  My problem is I still fail to see his reasoning here.  He has stated in all three videos that this is a bad idea since all the asserts after the first failure will not execute.  OK, this is true; however, isn't the goal to make it all pass and if so why does it matter?  Even if the arrange/act of the test is only 1 or 2 lines, I would be livid with a developer that copy/pasted those lines into 20+ functions just so he have a single assert per test.  Doesn't that make it unmaintainable?  Doesn't spreading this across 20+ methods make it hard to read?  Just my 2 cents.

Tuesday, March 24, 2009 2:07 PM by C# test.net » Multiple asserts in a test?

# C# test.net » Multiple asserts in a test?

Pingback from  C# test.net » Multiple asserts in a test?

Thursday, April 02, 2009 4:39 AM by Dennis van der Stelt

# re: Test Review #3 – Unity

Show us the surf board!!! :)

Friday, June 05, 2009 12:38 PM by Duncan

# re: Test Review #3 – Unity

Roy, I would be very interested to see your comments on what "csharptest" had to say about single-assert-per-test.  Could a refactoring into [Setup] resolve his concerns?  What do you think?

Thursday, July 09, 2009 2:49 AM by Scott Muc

# Book Review - The Art of Unit Testing by Roy Osherove

In a recent splurge I purchased 4 books from Manning Pres s with one of them being The Art of Unit Testing by Roy Osherove. I would categorize myself as relatively new to unit testing. My first hands on testing was when I took the Nothing but .Net bootcamp

Wednesday, September 02, 2009 11:55 AM by Unit Test Videos « Legalize Adulthood!

# Unit Test Videos « Legalize Adulthood!

Pingback from  Unit Test Videos « Legalize Adulthood!