Search Options
close
Search the following clips:
All Clips
Everyone's Clips
My Guides
Sign Up
Install
Learn More
Login
Getting started with NUnit's RowTest
travislaborde
follow
0
11-6-2008 7:11 AM
423 views
tags:
programming
,
.net
,
unit testing
Add a Comment
Login
to Comment. Not a member yet?
Sign up
Today's Top Clips
Very Nice Animal Photographs for Your Desktop
Congratulations shaor
Navajo Code Talkers break silence for Veterans Day
Beautiful Butterfly [PICS]
8 Stay young foods
Elderly Who Forget Age Remember Better
REM
Heartbreaking: Fort Hood soldiers remembered, in pictures (21 images)
Five Japanese Gardens
How to Prevent Heart Hackers From Turning Off Pacemakers
visit the
Top Clips page
View the Top Clips from
November 6, 2008
Embed This Clip In Your Site...
<div style="margin: 12px 0px; font-family: arial; color: #333333; background: #ffffff; border: solid 4px #e5e5e5; width: 100%; clear: left;"><div class="CM_CTB_Content_Wrap" style="margin: 0px; padding: 0px;background-color: #ffffff;"><div style="border-bottom: solid 1px #dcdcdc; white-space: nowrap; margin-bottom: 8px; background-color: #eeeeee ;background-image: url(http://www.clipmarks.com/images/source-bg.gif); background-repeat: repeat-x; height: 24px; line-height: 24px; vertical-align: middle; padding-bottom: 4px; color: #666666; font-size: 10px;" ><a href="http://clipmarks.com/clip-to-blog/" title="see clips that are hot right now"><img src="http://content.clipmarks.com/blog_embed/3b641728-542c-4330-b7ea-eac5f06916bc/9F796FE1-A1AF-4A17-9C2A-F8675176ED1A/" alt="" width="19" height="19" border="0" style="vertical-align: middle; margin: 0px 4px; display: inline; border: none; float:none;" /></a>clipped from <a title="http://michaeleatonconsulting.com/blog/archive/2008/11/03/getting-started-with-nunits-rowtest.aspx" href="http://michaeleatonconsulting.com/blog/archive/2008/11/03/getting-started-with-nunits-rowtest.aspx" style="font-size: 11px;">michaeleatonconsulting.com</a></div><blockquote style="text-align: left; padding: 0px 8px; margin: 4px 0px 8px 0px; background: transparent; border: none;" cite="http://michaeleatonconsulting.com/blog/archive/2008/11/03/getting-started-with-nunits-rowtest.aspx"><H1 class="post-title"><A href="http://michaeleatonconsulting.com/blog/archive/2008/11/03/getting-started-with-nunits-rowtest.aspx" title="Title of this entry." id="viewpost_ascx_TitleUrl">Getting started with NUnit's RowTest</A></H1></blockquote><div style="height: 2px; font-size: 2px; background: #dcdcdc; border-bottom: solid 1px #f5f5f5; margin: 2px 4px;"></div><blockquote style="text-align: left; padding: 0px 8px; margin: 4px 0px 8px 0px; background: transparent; border: none;" cite="http://michaeleatonconsulting.com/blog/archive/2008/11/03/getting-started-with-nunits-rowtest.aspx"><P>Maybe I've been living under a rock, but I just found out that the latest versions of <A href="http://nunit.org/index.php">NUnit</A> <A href="http://nunit.org/index.php?p=releaseNotes&r=2.4.7">support</A> [RowTest]! Over the weekend, I was about to replace NUnit with mbUnit because I need [RowTest], but thankfully, after a bit of surfing, I found <A href="http://www.davidhayden.com/blog/dave/archive/2007/12/21/NUnitGetsMbUnitsRowTestTestDrivenDevelopmentUnitTestingExcitement.aspx">this</A> post by <A href="http://www.davidhayden.com/blog.aspx">David Hayden</A> (dated December 2007). David's post described an add-in for NUnit that has since been rolled into NUnit proper.</P></blockquote><div style="height: 2px; font-size: 2px; background: #dcdcdc; border-bottom: solid 1px #f5f5f5; margin: 2px 4px;"></div><blockquote style="text-align: left; padding: 0px 8px; margin: 4px 0px 8px 0px; background: transparent; border: none;" cite="http://michaeleatonconsulting.com/blog/archive/2008/11/03/getting-started-with-nunits-rowtest.aspx">[RowTest] [Row(<SPAN class="str">"foo"</SPAN>, <SPAN class="kwrd">false</SPAN>, <SPAN class="kwrd">true</SPAN>)] [Row(<SPAN class="str">""</SPAN>, <SPAN class="kwrd">false</SPAN>, <SPAN class="kwrd">false</SPAN>)] [Row(<SPAN class="kwrd">null</SPAN>, <SPAN class="kwrd">false</SPAN>, <SPAN class="kwrd">false</SPAN>)] [Row(<SPAN class="str">"___-__-____"</SPAN>, <SPAN class="kwrd">false</SPAN>, <SPAN class="kwrd">true</SPAN>)] [Row(<SPAN class="str">"___-__-____"</SPAN>, <SPAN class="kwrd">true</SPAN>, <SPAN class="kwrd">false</SPAN>)] <SPAN class="kwrd">public</SPAN> <SPAN class="kwrd">void</SPAN> testRequiredFieldValidator(<SPAN class="kwrd">string</SPAN> data, <SPAN class="kwrd">bool</SPAN> ignoreChars, <SPAN class="kwrd">bool</SPAN> result) { var rule = <SPAN class="kwrd">new</SPAN> RequiredFieldValidationRule(<SPAN class="str">"test field"</SPAN>); rule.IgnoreMaskCharacters = ignoreChars; ValidationResult temp = rule.Validate(data, CultureInfo.CurrentCulture); Assert.That(temp.IsValid, Is.EqualTo(result)); }</blockquote><div style="height: 2px; font-size: 2px; background: #dcdcdc; border-bottom: solid 1px #f5f5f5; margin: 2px 4px;"></div><blockquote style="text-align: left; padding: 0px 8px; margin: 4px 0px 8px 0px; background: transparent; border: none;" cite="http://michaeleatonconsulting.com/blog/archive/2008/11/03/getting-started-with-nunits-rowtest.aspx"><div align="center"><img src="http://content8.clipmarks.com/blog_cache/michaeleatonconsulting.com/img/B44B7D53-854B-4DF7-8A65-BBF0C5C486A1" alt="nunit.results.2" /></div></blockquote><div style="height: 2px; font-size: 2px; background: #dcdcdc; border-bottom: solid 1px #f5f5f5; margin: 2px 4px;"></div><blockquote style="text-align: left; padding: 0px 8px; margin: 4px 0px 8px 0px; background: transparent; border: none;" cite="http://michaeleatonconsulting.com/blog/archive/2008/11/03/getting-started-with-nunits-rowtest.aspx">did have to download the a new version of TestDriven.net, but </blockquote><div style="height: 2px; font-size: 2px; background: #dcdcdc; border-bottom: solid 1px #f5f5f5; margin: 2px 4px;"></div><blockquote style="text-align: left; padding: 0px 8px; margin: 4px 0px 8px 0px; background: transparent; border: none;" cite="http://michaeleatonconsulting.com/blog/archive/2008/11/03/getting-started-with-nunits-rowtest.aspx">pretty simple process.</blockquote></div><div style="margin: 0px 6px 6px 4px;"><table style="font-size: 11px;border-spacing: 0px;padding: 0px;" cellpadding="0" cellspacing="0" width="100%"><tr><td style="background:transparent;border-width:0px;padding:0px;"> </td><td align="right" style="background:transparent;border-width:0px;padding:0px;width:107px" width="107"><a href="http://clipmarks.com/share/9F796FE1-A1AF-4A17-9C2A-F8675176ED1A/blog/" title="blog or email this clip"><img src="http://content9.clipmarks.com/images/c2b-foot.png" border="0" alt="blog it" width="107" height="17" style="border-width:0px;padding:0px;margin:0px;" /></a></td></tr></table></div></div>
New from the makers of Clipmarks:
Amplify.com - Don't just share the news...Amplify it!
Clipmarks
Home
New Clips
Top Clips
Dashboard
Popular Topics
News
Life
Science
Technology
Entertainment
Get Started
Sign Up
Install Clipping Tool
How Clipping Works
Clip-to-Blog™
ClipSearch
Tools and Resources
FAQ
ClipWeek
Top Clippers
Top Tags
Site Map
About Clipmarks
About Us
Contact
Copyright
Privacy
EULA
OK