tag:blogger.com,1999:blog-5060433.post-991515060049089492008-03-12T10:33:00.002-06:002008-03-12T10:43:58.480-06:00NUnit: Utah DNUGThe topic at last night's meeting of the Utah .Net User Group was NUnit. Kelly Anderson did a fantastic job of explaining the basics, then did a couple of deep dives that didn't get NUnit neophites like me lost in details. I should tell you that Kelly is one of the volunteers working on NUnit 3.0, so he has great passion and knowledge on the topic. Here are things I noted, some of them I already knew, but it's good to review:<br /><br />- Remember the process of Red, Green, Refactor<br /><br />- You can run NUnit tests inside the Visual Studio IDE using either <a href="http://www.testdriven.net/">TestDriven.Net</a> or <a href="http://www.jetbrains.com/resharper/">Resharper</a>. However, Resharper does not support NUnit addins.<br /><br />- Everytime you get green, check in<br /><br />- When you do test driven development (test first development), you naturally get low cohesion between your classes, so they're more loosely coupled. When you develop the standard way, you write the code first and tend to get more tightly coupled classes.<br /><br />- Kelly recommended using <a href="http://www.ncover.com/">nCover</a> to check your testing coverage.<br /><br />- I asked Kelly about how to add unit tests to code that you inherit and he recommend the book <a href="http://www.amazon.com/Working-Effectively-Legacy-Robert-Martin/dp/0131177052/ref=pd_bbs_sr_1?ie=UTF8&amp;s=books&amp;qid=1205340134&amp;sr=8-1">Working Efficiently with Legacy Code</a> by Michael Feathers. The author defines legacy code as anything that doesn't have unit tests.<br /><br />If you weren't there, you missed a great presentation. I've tried to use NUnit, but have not had good success in setting up the tests and getting everything working. After last night's meeting, I feel better prepared to try it again.Craig Berntsonhttp://www.blogger.com/profile/06386883781419438986noreply@blogger.com